## 2 KF-Based Tracking Algorithm
### System Model  
For the KF tracking loop, the state space model can be given by the following:  
\[\mathbf{x}_{k}=\boldsymbol{\Phi}\mathbf{x}_{k-1}+\mathbf{n}_{k-1} \tag{1}\]  
\[\mathbf{z}_{k}=\mathbf{H}\mathbf{x}_{k}+v_{k} \tag{2}\]  
\[\text{where }\mathbf{x}_{k}=\begin{bmatrix}\Delta q_{k}&\omega_{k}&\alpha_{k} \end{bmatrix}^{\text{T}},\,\boldsymbol{\Phi}=\begin{bmatrix}1&T&T^{2}/2\\ 0&1&T\\ 0&0&1\end{bmatrix},\,\mathbf{z}_{k}=\delta\varphi_{k},\,\text{and}\,\,\mathbf{ H}=\begin{bmatrix}1&T/2&T^{2}/6\end{bmatrix}.\]  
\(\Delta\varphi_{k}\), \(\omega_{k}\), and \(\alpha_{k}\) are, respectively, the carrier phase error, carrier Doppler error, and carrier Doppler frequency rate error. \(T\) denotes the tracking loop's update period. \(\delta\varphi_{k}\) denotes the measurement value obtained from the phase discriminator.  
In (1), \(\mathbf{n}_{k}\) denotes the system noise, and the corresponding covariance matrix \(\mathbf{Q}_{k}\) is [25]  
\[\begin{split}\mathbf{Q}_{k}&=\begin{pmatrix}\omega_{rf}\\ \hline\mathbb{C}\end{pmatrix}^{2}q_{a}\begin{bmatrix}T^{5}/20&T^{4}/8&T^{3}/6\\ T^{4}/8&T^{3}/3&T^{2}/2\\ T^{3}/6&T^{2}/2&T\end{bmatrix}\\ +\omega_{rf}\gamma^{2}q_{d}\begin{bmatrix}T^{3}/3&T^{2}/2&0\\ T^{2}/2&T&0\\ 0&0&0\end{bmatrix}+\omega_{rf}2q_{b}\begin{bmatrix}T&0&0\\ 0&0&0\\ 0&0&0\end{bmatrix}\end{split} \tag{3}\]  
where \(q_{d}\) and \(q_{b}\) are, respectively, the power spectral density of the local oscillator frequency noise and phase noise. \(q_{a}\) represents the power spectral density of the receiver-satellite line-of-light acceleration disturbance. C is the light velocity. \(\omega_{rf}\) is the nominal carrier frequency.  
The measurement noise in Equation (2) is \(v_{k}\). The covariance matrix \(\mathbf{R}_{k}\) of \(v_{k}\) is obtained as follows [3]:  
\[\mathbf{R}_{k}=\text{E}\Big{[}v_{k}v_{k}^{\text{T}}\Big{]}=\frac{1}{2T(c/n_{0 })_{k}}\bigg{(}1+\frac{1}{2T(c/n_{0})_{k}}\bigg{)} \tag{4}\]  
where \((c/n_{0})_{k}\) represents the signal carrier-to-noise ratio.  
According to the system model in (1) and (2), the KF algorithm is summarized as follows:  
\[\hat{\mathbf{x}}_{k}^{-}=\boldsymbol{\Phi}\hat{\mathbf{x}}_{k-1} \tag{5}\]  
\[\hat{\mathbf{P}}_{k}^{-}=\boldsymbol{\Phi}\hat{\mathbf{P}}_{k-1}\boldsymbol{ \Phi}^{\text{T}}+\mathbf{Q}_{k-1} \tag{6}\]  
Figure 1: Block diagram of the KF-based carrier tracking loop. (I denotes in-phase, Q denotes quadrature).  
\[\mathbf{K}_{k}=\mathbf{\hat{P}}_{k}^{-}\mathbf{H}^{\mathsf{T}}\left(\mathbf{H} \mathbf{\hat{P}}_{k}^{-}\mathbf{H}^{\mathsf{T}}+\mathbf{R}_{k}\right)^{-1} \tag{7}\]  
\[\hat{\mathbf{x}}_{k}=\hat{\mathbf{x}}_{k}^{-}+\mathbf{K}_{k}\left(\mathbf{z}_{ k}-\mathbf{H}\hat{\mathbf{x}}_{k}^{-}\right) \tag{8}\]  
\[\mathbf{\hat{P}}_{k}=\left(\mathbf{I}-\mathbf{K}_{k}\mathbf{H}\right)\mathbf{ \hat{P}}_{k}^{-} \tag{9}\]  
where \(\mathbf{K}_{k}\) denotes the Kalman gain, which can update the weight between measurement values and predicted values of the system model. \(\hat{\mathbf{x}}_{k}^{-}\) and \(\mathbf{\hat{P}}_{k}^{-}\) denote the predicted estimation and covariance matrix of the state vector. \(\hat{\mathbf{x}}_{k}\) and \(\mathbf{\hat{P}}_{k}\) denote the estimated values and covariance matrix.