# Variance-Triggered Two-Step GPS Acquisition
## 2 Conventional Serial Acquisition  
The conventional Serial Acquisition (SA) is the simplest acquisition method and is commonly used in hardware GNSS receivers. The basic idea is to test all possible alignments of each satellite's Pseudo Random Noise (PRN) code and their signal's carrier frequency between an incoming signal and its locally generated or stored replica. The signal is acquired when there is a match in the code phase and carrier frequency of both signals. This match is detected when the correlation energy between the signals reaches a predetermined threshold (\(\lambda\)), which depends on the level of noise expected. The mathematical expression for this correlation energy is given by  
\[R_{C_{f,\phi}}=\sum_{j=0}^{J-1}\left(\left(\sum_{n=J/LN}^{(j+1)LN-1}C_{a}^{ \phi}(n)S(n)\cos\left(2\pi\frac{f}{f_{s}}n\right)\right)^{2}+\left(\sum_{n=J/ LN}^{(j+1)LN-1}C_{a}^{\phi}(n)S(n)\sin\left(2\pi\frac{f}{f_{s}}n\right)\right)^{2} \right)\,, \tag{1}\]  
\[\forall f\in\left\{f_{c}+\delta_{\text{SA}}\left(x-\frac{N_{b}^{\text{SA}}}{2 }\right)\mid x\in\mathbb{I},x\;<N_{b}^{\text{SA}}\right\},\;\forall\phi=\left\{ y\mid y\in\mathbb{I},y\;<1023P\right\},\]  
where \(S(n)\) is the incoming signal, \(f_{c}\) is the central frequency used to transmit the signal, \(f\) is the probing frequency, \(C_{a}^{\phi}(n)\) is the satellite's PRN code with phase \(\phi\), \(f_{s}\) is the constant sampling frequency, \(N_{b}^{\text{SA}}\) is the number of frequency bins of the SA, \(\delta_{\text{SA}}\) is the bandwidth of each of those bins, \(N\) is the number of samples per code period, \(P=\frac{N}{1023}\) is the number of samples per chip, \(L\) is the number of code periods, and \(J\) represents the number of signal blocks considered in the calculation of the correlation energy. Each \(j\)-th block consists of \(NL\) signal samples. Figure 1 illustrates the acquisition process. When the incoming signal and its local replica are aligned in \(\phi\), the multiplication of these two signals will strip off the PRN code from the incoming signal, resulting in a continuous wave without the code modulation. After the code removal, the signal is multiplied by two carriers, which generates the in-phase (I) and quadrature (Q) components. The I and Q components are then integrated over \(L\) code periods and the accumulated value in both components are squared and then summed up to each other. This process can be done \(J\) times to produce averaged correlation values. The last step is to compare the correlation energy value of each code phase and carrier frequency combination with a threshold. If this energy value crosses the \(\lambda\) threshold, the signal is considered acquired. Otherwise, the process is repeated for the next replica with a different combination of phase and frequency. Computationally speaking, the I and Q components are represented by two vectors. Each element of these vectors need to be multiplied by the corresponding element of the PRN replica, then accumulated, squared and, finally, the squared values of the I and Q components are added up. Due to the quasi-orthogonality of the PRN codes, if the phases of the incoming signal and its replica are not completely aligned, this final value is very close to zero; otherwise, it peaks [15]. This process is computationally complex due to a large number of different combinations of phase and frequency  
Figure 1: Conventional Acquisition diagram. to be tested for each satellite. Each combination defines a cell for which a new replica needs to be generated and correlated with the incoming signal. The computational complexity of the SA algorithm depends upon the size of the matrix illustrated in Figure 2, the number of samples per chip and the number of integrations. Since the number of possible code phase shifts in GPS is fixed in 1023, the complexity for those signals can vary according to the frequency offset caused by Doppler effect, i.e., the size of the subset of frequencies in the range around the central frequency, and according to the sampling frequency.