# Variance-Triggered Two-Step GPS Acquisition
## 3 Variance-Triggered Two-Step Acquisition
### Variance-Triggered Detection Threshold  
A key requirement for the proposed approach is the ability to detect correlations peaks that are still forming in the search matrix during the CS step. Conventional fixed-threshold strategies are not appropriate because the detection of each signal behaves differently due to the presence of noise. For signals with higher C/N0, the peak values are higher than for lower C/N0 signals. Using a fixed threshold requires a minimum peak amplitude to avoid false positives, which should be strongly avoided. Consequently, at lower C/N0 signals, this would require integration over longer signal periods to enable peaks to reach the minimum amplitude. Moreover, for the proposed approach, having a fixed threshold does not help when the size of the peaks varies after each detection. Therefore, we developed a method to detect peaks in the CS step based on the variance of the normalized intermediate maximum values of the correlation matrix. For the FS step, the VTTS acquisition uses the same method, but with a different threshold level. The proposed detection method relies on an ordered list of peaks that is kept updated after the use of every 1023 samples of the signal. In the proposed VTTS acquisition, the number of possible peaks in the CS step is \(1023\times N_{b}^{CS}\) and in the FS step it is \(2P\times N_{b}^{FS}\). However, only a few peaks are kept in the ordered list. This is necessary to avoid comparing neighbouring secondary peaks that appear under the influence of the main peak, which happens due to the reduced precision and complexity of the CS step. As a chip has \(P\) samples, to avoid the interference of the neighbouring peaks, we proposed the ordered list to hold only the \(3P\) highest peaks. Defining the Threshold Levels  
The GPS acquisition problem is a binary hypothesis test that evaluates the presence or absence of satellites transmitting on the channel. If the null hypothesis 0 (\(H_{0}\)) is accepted, the analyzed samples are considered to be composed only of noise in relation to a searched satellite. Consequently, as \(H0\) states that the satellite is not present, another satellite should be searched. On the other hand, if the null hypothesis is rejected, hypothesis 1 (\(H_{1}\)) is accepted and a searched satellite is considered acquired. This binary hypothesis test can be expressed as:  
\[H_{0} : S[n]=W[n] \tag{4}\] \[H_{1} : S[n]=W[n]+C_{a}[n], \tag{5}\]  
where \(S[n]\) designates the analyzed signal, \(W[n]\) represents the noise, and \(C_{a}[n]\) is the signal transmitted by the satellite. Two types of error can occur and cause degradation in the system performance: false-positive and misdetection. A false-positive happens when a satellite is detected in a wrong frequency and phase. This error drives a lost tracking process which, in the end, will not find any data to calculate the position, speed or time. On the other hand, a misdetection occurs when a search satellite is transmitting, but the acquisition process cannot find it. In this case, the acquisition processing time and energy are wasted. The performance of the detector can be characterized by the error rates, i.e., its probability of false-positive (\(P_{F}\)) and its probability of misdetection (\(P_{MD}\)); or equivalently its probability of detection, given by \(P_{D}=1-P_{MD}\). Ideally, \(P_{D}=100\%\) and \(P_{F}=0\%\), however, usually it is reasonable to accept \(P_{D}\geq 90\%\) and a \(P_{F}\leq 10\%\)[16], where  
\[P_{D} = P(H_{1}|H_{1})=P(\wedge>\lambda_{*}|H_{1}), \tag{6}\] \[P_{F} = P(H_{1}|H_{0})=P(\wedge>\lambda_{*}|H_{0}), \tag{7}\]where \(\lambda_{*}\) is the detection threshold (CS or FS) and \(\wedge\) is the test parameter. In this work, we obtained the threshold by Monte Carlo simulations according to the desired \(P_{\rm F}\).