# A New LoRa-like Transceiver Suited for LEO Satellite Communications +
## 2 Synchronization Issues in LoRa  
### LoRa Physical Layer Principle  
The LoRa PHY layer is based on a CSS modulation, which relies on sine waves whose instantaneous frequencies evolve linearly with time over a specific bandwidth \(B\). These specific waves are called chirps. A raw chirp frequency varies linearly from an initial frequency \(f_{i}\) to a final frequency \(f_{f}\) during the symbol time \(T\), with \(B=|f_{f}-f_{i}|\). When \(f_{i}>f_{f}\), the chirp is considered a down-chirp, while, otherwise, it is considered an up-chirp. Initially, the binary information flow to transmit is divided into subsequences, each of length \(SF\). The set of \(SF\) consecutive bits constitutes a symbol. The number of possible symbols is hence equal to \(M=2^{SF}\). \(SF\) indicates the spreading factor and the relation between the bit rate \(D_{b}\) and the symbol rate \(D_{s}\) can be written as: \(D_{s}=D_{b}/SF\). To distinguish between the \(M\) different symbols of the constellation, \(M\) orthogonal chirps have to be defined so that each symbol exhibits a specific instantaneous phase trajectory. This chirp is obtained based on the raw chirp and using \(\gamma_{p}=\frac{S_{p}}{B}\), which allows performing a cyclic shift. It should be noted that \(S_{p}\in[0,M-1]\) is an integer coded on \(SF\) bits that corresponds to the transmitted symbol at time \([(p-1)T,pT)\). The different trajectories are obtained by performing modulo \(T\) operations of a raw chirp. The raw chirp defined for \(t\in[0,T)\) is given by:  
\[f^{0}(t)=B\bigg{(}\frac{t}{T}-\frac{1}{2}\bigg{)} \tag{1}\]  
Then, the modulated chirp instantaneous frequency, corresponding to the \(k^{th}\) transmitted symbol \(S_{p}\), can be defined as:  
\[\forall t\in[0,T),f^{S_{p}}(t)=f^{0}\bigg{(}\bigg{(}t+\frac{S_{p}T}{M}\bigg{)} \mod\ T\bigg{)} \tag{2}\]  
We denote \(f_{p}(t)\) the \(p\)th transmitted chirp by LoRa-like node, uniformly distributed within the set \(\{f^{0}(t),f^{1}(t),\ldots,f^{M-1}(t)\}\). Each chirp \(f_{p}(t)\) is assumed to be transmitted during the period \(t\in[(p-1)T,pT)\), thereby, the complex envelope of a CSS signal \(s(t)\) is a succession of random chirps, such that:  
\[s(t)=\sum_{p=1}^{N_{\text{s}}}e^{i\phi_{p}(t-(p-1)T)}\mathds{1}_{[(p-1)T,pT)}(t) \tag{3}\]  
where \(N_{\text{s}}\) is the number of transmitted symbols and the chirp \(f_{p}(t)\), corresponding to an instantaneous frequency, such that \(f_{p}(t)=f^{S_{p}}(t)\), can be expressed as the derivative of the instantaneous phase \(\phi_{p}(t)\):  
\[f_{p}(t)=\frac{1}{2\pi}\frac{\text{d}\phi_{p}(t)}{\text{d}t} \tag{4}\]Therefore, we obtain for \(t\in\left[0,T-\gamma_{p}\right)\):  
\[\phi_{p}(t)=2\pi M\left[\left(\frac{t}{2T}\right)^{2}+\left(\frac{S_{p}}{M}-\frac {1}{2}\right)\frac{t}{T}\right] \tag{5}\]  
and for \(t\in\left[T-\gamma_{p},T\right)\):  
\[\phi_{p}(t)=2\pi M\left[\left(\frac{t}{2T}\right)^{2}+\left(\frac{S_{p}}{M}- \frac{3}{2}\right)\frac{t}{T}\right] \tag{6}\]  
According to [13], the transmitted symbols are detected by multiplying every \(T\)-long sequence of the received signal by the conjugate of a reference signal \(x_{ref}(t)=e^{i\phi_{p}(t)}\), with \(S_{p}=0\) (i.e., an unmodulated chirp). Moreover, the received signal should be sampled at \(T_{s}=\frac{1}{B}\) in the demodulation stage [14; 19]. A discrete-time version of \(x_{ref}(t)\) sampled at \(T_{s}\) is given by:  
\[x_{ref}(n)=e^{j2\pi\left(\frac{1}{2M}n^{2}-\frac{1}{2}n\right)},\;\;n\in \left[\!0,M-1\!\right] \tag{7}\]  
Then, considering a perfect communication link, to estimate the \(p^{th}\) transmitted symbol, a \(M\)-point FFT, \(Y[k,p]\), is performed as follows:  
\[Y[k,p]=\frac{1}{\sqrt{M}}\sum_{n=0}^{M-1}\underbrace{s_{p}(n)x_{ref}^{*}(n)}_ {d_{p}(n)}e^{-j2\pi\frac{M}{M}} \tag{8}\]  
with \(s_{p}(n)=s(nT_{s}+(p-1)T)\), \(n\in\left[\!0,M-1\!\right]\) is the complex envelope of the \(p^{\text{th}}\) transmitted chirp and \(k\in\left[\!0,M-1\!\right]\).