# Deep Learning of GNSS Acquisition
## 2 GNSS Signal Model and Acquisition  
A receiver observes signals from \(M\) satellites plus noise. After downconversion and sampling (at a rate \(f_{s}=1/T_{s}\)), the samples' discrete-time signal is  
\[y[n] = \sum_{i=1}^{M}x_{i}[n;\theta_{i}]+\eta[n] \tag{1}\] \[x_{i}[n;\theta_{i}] = \alpha_{i}b_{i}(nT_{s}-\tau_{i})c_{i}(nT_{s}-\tau_{i})e^{j2\pi f_{ i}nT_{s}+j\phi_{i}}\]  
with \(\alpha_{i}\) being the amplitude of the \(i\)-th received signal; \(b_{i}(\cdot)\) the data bits of the \(i\)-th navigation message; \(c_{i}(\cdot)\) the spreading code of the \(i\)-th satellite; \(\tau_{i}\) the time-evolving delay of the \(i\)-th satellite; \(f_{d,i}\) the Doppler-shift; \(\phi_{i}\) a carrier-phase term introduced by the channel; and \(\eta[n]\) models the random noise at the receiver, typically complex, zero-mean, and Gaussian-distributed with variance \(\sigma^{2}\). For the sake of clarity, the signal parameters for the \(i\)-th satellite are gathered in a vector \(\theta_{i}=(\alpha_{i},\phi_{i},\tau_{i},f_{d,i})^{\top}\). Signal acquisition is one of the first actions a receiver needs to perform, basically deciding whether the signal from a particular satellite is present or absent, as well providing a rough estimation of the code delay and Doppler frequency of the received signal in case it is deemed present [10]. Therefore, when searching for the \(i\)-th satellite, this problem can be formulated as a hypothesis testing problem with two possibilities:  
\[\mathcal{H}_{0} : i\text{-th satellite is not present}\] \[\mathcal{H}_{1} : i\text{-th satellite is present}\]  
Equivalently, the two competing hypothesis are  
\[\mathcal{H}_{0} : y[n]=\eta[n] \tag{2}\] \[\mathcal{H}_{1} : y[n]=x_{i}[n;\theta_{i}]+\eta[n]\]  
such that \(n=0,\dots,N-1\) index the \(N\) samples used in acquisition (i.e., coherent integration interval). Notice that a common approach when deriving GNSS signal acquisition schemes is to omit the inter-satellite interference effects, which are rather low thanks to the quasi-orthogonality of the spread spectrum codes \(c_{i}(\cdot)\). Therefore, the model in (2) only considers the contribution of the \(i\)-th satellite in (1). Since the parameters in \(\theta_{i}\) are unknown, the optimal detection framework (in the maximum likelihood (ML) sense) is the GeneralizedLikelihood Ratio Test (GLRT), which requires ML estimation (MLE) of the vector \(\theta_{i}\). Given a set of \(N\) observations, \(\mathbf{y}=(y[0],y[1],\ldots,y[N-1])^{\top}\) the MLE of \(\theta_{i}\) is defined as  
\[\hat{\theta}_{i}=\arg\max_{\theta_{i}}p(\mathbf{y}|\theta_{i})\, \tag{3}\]  
where it is typically assumed that the parameters in \(\theta_{i}\) are piecewise constant within the \(N\) samples of \(\mathbf{y}\) and that the codes have ideal cross-correlation properties, so they can be processed independently at the receiver. It can be seen that the GLRT results in the maximization of the correlation between the received signal and a locally generated code. This correlation operation is encoded in the so-called Cross-Ambiguity Function (CAF), which is nothing but the correlation between \(y[n]\) and the spreading code of the \(i\)-th satellite at a given delay/Doppler pair (in discrete time):  
\[\mathcal{C}_{i}(\tau,f_{d})=\frac{1}{N}\sum_{n=0}^{N-1}y[n]\underbrace{c_{i} (n\mathrm{T}_{s}-\tau)\exp\{-j2\pi f_{d,i}n\mathrm{T}_{s}\}}_{\mathrm{Local \ replica}}\, \tag{4}\]  
which can be expressed more compactly in vector notation after gathering \(N\) samples from the samples and the local code as \(\mathbf{y},\mathbf{c}_{i}\in\mathbb{C}^{N\times 1}\) as  
\[\mathcal{C}_{i}(\tau,f_{d})=\frac{\mathbf{c}_{i}^{H}\mathbf{y}}{N}. \tag{5}\]  
The CAF is crucial in the acquisition (and tracking) of the satellites' signals.