  LoRaWAN is nowadays one of the most popular protocols for low-power
Internet-of-Things communications. Although its physical layer, namely LoRa,
has been thoroughly studied in the literature, aspects related to the
synchronization of LoRa receivers have received little attention so far. The
estimation and correction of carrier frequency and sampling time offsets is
however crucial to attain the low sensitivity levels offered by the LoRa
spread-spectrum modulation. The goal of this paper is to build a
low-complexity, yet efficient synchronization algorithm capable of correcting
both offsets. To this end, a complete analytical model of a LoRa signal
corrupted by these offsets is first derived. Using this model, we propose a new
estimator for the sampling time offset. We also show that the estimations of
the carrier frequency and the sampling time offsets cannot be performed
independently. Therefore, to avoid a complex joint estimation of both offsets,
an iterative low-complexity synchronization algorithm is proposed. To reach a
packet error rate of 10^-3, performance evaluations show that the proposed
receiver requires only 1 or 2 dB higher SNR than a theoretical perfectly
synchronized receiver, while incurring a very low computational overhead.
