# Performance Evaluation of Adaptive Tracking Techniques with Direct-State Kalman Filter +
## 2 Tracking Scheme of Direct-State Kalman Filter
### Direct-State Kalman Filter  
The DSKF, as in the KF [10; 11; 12], is divided into two stages: prediction and update. The prediction step estimates the predicted state \(\hat{\mathbf{x}}[n]\) and predicted error covariance \(\hat{\mathbf{P}}[n]\). \(\hat{\mathbf{x}}[n]\) and \(\hat{\mathbf{P}}[n]\) are calculated based on the previously updated state \(\mathbf{x}[n-1]\), the previously updated error covariance \(\mathbf{P}[n-1]\), and the process noise covariance matrix \(\mathbf{Q}[n]\):  
\[\hat{\mathbf{x}}[n]=\mathbf{A}\,\mathbf{x}[n-1] \tag{16}\] \[\hat{\mathbf{P}}[n]=\mathbf{A}\,\mathbf{P}[n-1]\,\mathbf{A}^{ \mathrm{T}}+\mathbf{Q}[n]\] (17) \[\hat{\mathbf{x}}\in\Re^{p\times 1}\qquad\left\{\hat{\mathbf{P}}, \,\mathbf{P},\,\mathbf{Q}\right\}\in\Re^{p\times p} \tag{18}\]  
where the superscript \((\cdot)^{\mathrm{T}}\) is the transpose.  
The update stage calculates the updated state \(\mathbf{x}[n]\) based on \(\hat{\mathbf{x}}[n]\), the measurement residual \(\epsilon_{\mathrm{u}}[n]\), and the Kalman gains \(\mathbf{K}[n]\). \(\epsilon_{\mathrm{u}}[n]\) comes from the difference between the observations \(\epsilon[n]\) and the estimated measurement based on \(\hat{\mathbf{x}}[n]\). The Kalman gains \(\mathbf{K}[n]\) indicate how accurate the measurements are. \(\mathbf{K}[n]\) depends on the predicted error covariance \(\hat{\mathbf{P}}[n]\) and the measurement noise covariance \(\mathbf{R}[n]\).  
\[\epsilon_{\mathrm{u}}[n]=\epsilon[n]-\mathbf{H}\,\hat{\mathbf{x}}[n] \tag{19}\] \[\mathbf{S}[n]=\mathbf{H}\,\hat{\mathbf{P}}[n]\,\mathbf{H}^{ \mathrm{T}}+\mathbf{R}[n]\] (20) \[\mathbf{K}[n]=\hat{\mathbf{P}}[n]\,\mathbf{H}^{\mathrm{T}}\, \mathbf{S}^{-1}[n]\] (21) \[\mathbf{x}[n]=\hat{\mathbf{x}}[n]+\mathbf{K}[n]\,\epsilon_{ \mathrm{u}}[n]\] (22) \[\mathbf{P}[n]=\left(\mathbf{I}-\mathbf{K}[n]\,\mathbf{H}\right) \,\hat{\mathbf{P}}[n] \tag{23}\]  
\[\left\{\epsilon_{\mathrm{u}},\,\epsilon\right\}\in\Re^{m\times 1}\qquad\left\{ \mathbf{S},\,\mathbf{R}\right\}\in\Re^{m\times m}\qquad\mathbf{H}\in\Re^{m \times p}\qquad\mathbf{K}\in\Re^{p\times m}\qquad\mathbf{I}\in\Re^{p\times p} \tag{24}\]  
where \(\mathbf{S}[n]\) is the innovation covariance matrix, and \(\mathbf{I}\) is the identity matrix. The order \(p\) and the number of measurements \(m\) determine the dimension of the presented variables. This paper assumes only one measurement (i.e., \(m=1\)) to compare the DSKF with the STL. In that case, Equation (1) is the same as Equation (19).  
Figure 4 shows the linear model of the DSKF considering only one measurement. The innovation block of the DSKF is equivalent to the STL's comparator of Figure 2. The state prediction and update block marked in green correspond to the STL's loop filter and NCO. The main difference between the standard STL and the DSKF is the addition of the Kalman gains' calculation depicted in the dashed yellow block of Figure 4.  
The DSKF's open-loop SSM representation are obtained combining Equations (16) and (22):  
\[\mathbf{x}[n]=\mathbf{A}\,\mathbf{x}[n-1]+\mathbf{K}[n]\,\epsilon_{\mathrm{u}}[n] \tag{25}\]  
\[\epsilon_{\mathrm{s}}[n]=\mathbf{H}\,\hat{\mathbf{x}}[n]=\mathbf{H}\,\mathbf{A }\,\mathbf{x}[n-1] \tag{26}\]  
The SSM of the DSKF is equivalent to the STL's SSM presented in Equations (2) and (3). From this equivalence, the Kalman gains \(\mathbf{K}\) can be related to the STL's filter coefficients \(\boldsymbol{\alpha}\) as:  
\[\mathbf{K}=\boldsymbol{\alpha}\,\tau_{\mathrm{int}} \tag{27}\]  
Figure 5 shows the linear model of a third-order DSKF (i.e., \(p=3\)). The open-loop SSM, the open-loop transfer function \(H_{\mathrm{0}_{3}}\), and the closed-loop transfer function \(H_{\mathrm{c}_{3}}\) are the same as Equations (12)-(15) due to the relation presented in Equation (27).  
Figure 4: Linear model of the direct-state Kalman filter (DSKF) with \(m=1\). #IEEE. Adapted, with permission, from [20].  
Figure 5: Linear model equivalence between a third-order DSKF and a third-order STL. #IEEE. Adapted, with permission, from [20].