# GNSS Signal Acquisition Algorithm Based on Two-Stage Compression of Code-Frequency Domain
## 3 Code-Frequency Two-Stage Compression Acquisition
### Detection Probability Analysis  
Assuming a partial Hadamard matrix is adopted as measurement matrix to assess the performance of the proposed algorithm, the following two hypotheses determine the test statistic for signal detection  
\[\mathbf{\tilde{y}}=\left\{\begin{array}{cc}\mathbf{\Phi}_{1}\mathbf{w}&H_{0 }\\ \mathbf{\Phi}_{1}(\mathbf{x}+\mathbf{w})&H_{1}\end{array}\right. \tag{21}\]  
where \(\mathbf{\Phi}_{1}\in\mathbf{R}^{\left(MT_{\text{p}}/\alpha_{c}\right)\times N}\) denotes a random partial Hadamard matrix, \(\alpha_{c}\) is the maximum subsampling factor, \(T_{\text{p}}\) is the spreading spectrum period, \(H_{1}\) denotes the signal is present  
Figure 4: GNSS signal acquisition based on code-frequency compression.  
Figure 3: The relationship between frequency search step and correlation bandwidth: (**a**) \(f_{\text{step}}\leq B_{\text{c}}/2\); (**b**) \(f_{\text{step}}>B_{\text{c}}\).  
and correctly aligned with the local replica, \(H_{0}\) denotes the signal is absent or not correctly aligned with local replica.  
Consequently, the probability density function of \(\mathbf{\tilde{y}}\) under hypothesis \(H_{1}\) is shown as follows:  
\[p\left(\mathbf{\tilde{y}}\ |\ \mathbf{\widehat{x}},H_{1}\right)=\frac{1}{\left(2\pi \right)^{\left(M/\varepsilon_{\mathrm{c}}\right)/2}\left|\sigma^{2}\mathbf{ \Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}}\right|^{1/2}}\exp\left[-\frac{1}{2}( \mathbf{W})^{\mathrm{T}}\Big{(}\sigma^{2}\mathbf{\Phi}_{1}\mathbf{\Phi}_{1}^{ \mathrm{T}}\Big{)}^{-1}(\mathbf{W})\right] \tag{22}\]  
where \(\mathbf{W}=\mathbf{\tilde{y}}-\mathbf{D}\mathbf{\widehat{x}}\), \(\mathbf{D}{=}\mathbf{\Phi}_{1}\cdot\mathbf{\Psi}\), and \(\mathbf{\widehat{x}}\) denotes  
\[\mathbf{\widehat{x}}=(\mathbf{\Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}})^{-1} \mathbf{\Phi}_{1}^{\mathrm{T}}\mathbf{\tilde{y}} \tag{23}\]  
The \(\mathbf{\widehat{x}}\) denotes the maximum likelihood estimation (MLE) of \(\mathbf{x}\) under \(H_{1}\), which is shown as  
\[\mathbf{\widehat{x}}=\Big{(}\mathbf{D}^{\mathrm{T}}(\sigma^{2}\mathbf{\Phi}_{ 1}\mathbf{\Phi}_{1}^{\mathrm{T}})^{-1}\mathbf{D}\Big{)}^{-1}\mathbf{D}^{ \mathrm{T}}(\sigma^{2}\mathbf{\Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}})^{-1} \mathbf{\tilde{y}} \tag{24}\]  
If the threshold \(\eta\) is selected to attain the required false alarm probability, the detection performance can be obtained as  
\[P_{d}=\Pr\big{(}\Gamma_{\mathbf{\tilde{y}}}>\eta\ |\ H_{1}\big{)}=Q_{\widehat{ KM}_{\mathrm{P}/\mathrm{a}c}^{2}(\lambda)}(\eta) \tag{25}\]  
where \(\Gamma_{\mathbf{\tilde{y}}}\) is a noncentral chi-squared distribution with \(MT_{\mathrm{P}}/\alpha_{c}\) degrees of freedom, which is expressed as  
\[\Gamma_{\mathbf{\tilde{y}}}=\mathbf{\tilde{y}}^{\mathrm{T}}(\sigma^{2}\mathbf{ \Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}})^{-1}\mathbf{D}\Big{(}\mathbf{D}^{ \mathrm{T}}(\sigma^{2}\mathbf{\Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}})^{-1} \mathbf{D}\Big{)}^{-1}\mathbf{D}^{\mathrm{T}}(\sigma^{2}\mathbf{\Phi}_{1} \mathbf{\Phi}_{1}^{\mathrm{T}})^{-1}\mathbf{\tilde{y}} \tag{26}\]  
where \(\lambda\) is a non-centrality parameter specified by  
\[\lambda=\sigma^{-2}(\mathbf{x}^{\mathrm{T}})^{-1}\mathbf{\Phi}_{1}^{\mathrm{ T}}\Big{(}\mathbf{\Phi}_{1}\mathbf{\Phi}_{1}^{\mathrm{T}}\Big{)}^{-1}\mathbf{ \Phi}_{1}\mathbf{x} \tag{27}\]