# Deep Learning of GNSS Acquisition
## 4 Model Training  
This section provides details on how the model was trained. Particularly, we used a realistic GNSS signal simulator to generate I&Q samples from GPS L1 C/A satellites with various parameters according to the training plan described here. In order to increase the detection and localization accuracy, a larger sampling frequency might be desirable, since that accentuates the correlated samples around the CAF peak and helps in increasing the accuracy. However, this has an impact on the number of samples to be processed, and a tradeoff needs to be considered. Therefore, here, we increased the sampling frequency to 4 MHz, compared with the 2 MHz that was considered in our preliminary work [22]. As discussed earlier in Section 3.2, increasing the sampling frequency can make the CAF image become high-dimensional if applied directly to a DNN model for classification. That would make the use of DNN more complex and expensive; in that case, the processing device might be required to have a GPU with larger memory to process the GNSS acquisition. In order to reduce the complexity and the expense regardless of increasing \(f_{s}\), the full CAF image is split, and a sliding DNN scheme is considered in this work. More precisely, a dataset consisting of three thousand snapshots of GPS L1 C/A, I&Q samples was generated for model training purposes. The dataset consisted of a range of representative carrier-to-noise-density ratios (C/\(N_{0}\)) varying between 33 and 45 dB-Hz. The length of these snapshots was 1 ms, the duration of a code, such that this constitutes the coherent integration time of the approach. Additionally, the dataset was generated with random delays between 0 to 1 ms and Doppler shifts between \(-4000\) and \(4000\) Hz. These I&Q samples were then processed to compute the CAF maps over the Doppler-delay grid, which is then split and processed through the DNN model considered in this article. An analogy to images can be made for these CAFs, where each Doppler/delay cell is a pixel whose value is that of the CAF, \(\mathbf{Z}_{i}\). As discussed earlier in Section 3.2, this can be computationally expensive if a single NN has to process \(\mathbf{Z}_{i}\) entirely. For instance, if 50 Doppler bins are considered (i.e., 200 Hz bins, such that the DNN has more resolution to identify the CAF peak) in generating the CAF for a GPS L1 C/A signal, those images would be \(4000\times 50\)-dimensional for the \(f_{s}\) considered in this work. Alternatively, if \(\mathbf{Z}_{i}\) is split into smaller images of size \(11\times 36\) (read as: Doppler \(\times\) delay), there are a total of 158,600 low-dimensional subimages to be efficiently processed by the NN, potentially in parallel. A sub-image with the size \(11\times 36\) was considered to provide a reasonable tradeoff between sub-image size and model complexity; since, in this method, we consider the subimages with the complete CAF peak exactly in the middle of the subimage. Considering that subimages of smaller sizes than the current size might cause issues, in which the CAF peak might not be included in any of the subimages, larger subimage sizes would cause multiple peaks to appear and higher computational complexity. An interpretation of the sliding concept proposed in this article has some similarities to how the convolutional layers in a CNN are processed through the so-called _stride_ parameter. In the proposed scheme, the CAF is scanned in smaller windows, each of which can contain the signal peak of interest. This peak, in contrast to peaks generated by random noise, shows a correlation in the delay and (more noticeably) in the Doppler domains that can be exploited by the NN classifier. The NN-based classifier uses a subimage (so a collection of delay/Doppler bins) to produce a classification result, as opposed to classical GNSS acquisition methods which use bin-by-bin detection strategies (i.e., every delay/Doppler bin is compared with a threshold to decide for presence/absence of a signal), which seems to bring accuracy benefits to the NN.