# Sage-Husa Algorithm Based on Adaptive Double Forgetting Factors
## 3 Simulation and Analysis
The AEKF exhibited  
Figure 8: Estimated value \(x_{1,k}\) of traditional Sage–Husa. \[MAE=\frac{1}{N}\sum_{k=1}^{N}\left|x_{k}-\hat{x}_{k}\right| \tag{26}\]0 Estimated value \(x_{1,k}\) of traditional Sage–Husa. of the filtering process but remained largely stable in the later stages. Figures 10 and 11 demonstrate that the MAE and RMSE of the state estimates produced by the proposed AEKF algorithm are consistently smaller than those of the traditional EKF algorithm. Although the advantage of the AEKF algorithm is not evident at the beginning of the simulation, its accuracy progressively improves as the filtering process continues. To generalize the conclusions, the same approach as in Example 1 was employed, and the simulation experiment was repeated 10 times. The MAE and RMSE for each iteration were recorded, and the average values were computed, as presented in \[MAE=\frac{1}{N}\sum_{k=1}^{N}\left|x_{k}-\hat{x}_{k}\right| \tag{26}\]1 As shown in Table 2, the MAE and RMSE of the AEKF algorithm are lower than those of the EKF algorithm in each simulation, with the filtering accuracy of the AEKF improving compared to the EKF. This not only confirms that the AEKF algorithm provides higher accuracy than the traditional EKF but also demonstrates that the adaptive forgetting factor offers greater adaptability compared to the fixed forgetting factor. It solves the divergence issue under the fixed forgetting factor condition, making state estimation more accurate and improving filtering precision. To more clearly observe the changes in the adaptive forgetting factors, the graphs of the two adaptive forgetting factors in the AEKF algorithm are output and compared with the fixed-value forgetting factors. Figures 12 and 13 show the variation curves of the forgetting factors related to the prior residual and the posterior residual, respectively. \[MAE=\frac{1}{N}\sum_{k=1}^{N}\left|x_{k}-\hat{x}_{k}\right| \tag{26}\]2 Root mean square error \(x_{1,k}\) of EKF and AEKF. \[MAE=\frac{1}{N}\sum_{k=1}^{N}\left|x_{k}-\hat{x}_{k}\right| \tag{26}\]3 Forgetting factor value of b\({}_{1}\). \[MAE=\frac{1}{N}\sum_{k=1}^{N}\left|x_{k}-\hat{x}_{k}\right| \tag{26}\]4 Forgetting factor value of b\({}_{2}\). \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Times** & \multicolumn{2}{c}{**EKF**} & \multicolumn{2}{c}{**AEKF**} \\ \hline  & **MAE** & **RMSE** & **MAE** & **RMSE** \\ \hline
1 & 2.52 & 3.53 & 2.22 & 2.91 \\
2 & 2.37 & 3.60 & 2.20 & 2.90 \\
3 & 2.46 & 3.60 & 2.33 & 3.00 \\
4 & 2.28 & 3.47 & 2.24 & 2.94 \\
5 & 2.41 & 3.52 & 2.16 & 2.88 \\
6 & 2.41 & 3.60 & 2.23 & 2.82 \\
7 & 2.44 & 3.50 & 2.28 & 2.84 \\
8 & 2.29 & 3.62 & 2.09 & 3.08 \\
9 & 2.32 & 3.55 & 2.27 & 3.00 \\
10 & 2.23 & 3.58 & 2.10 & 2.88 \\ Average value & 2.37 & 3.56 & 2.21 & 2.93 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of MAE and RMSE under different algorithms in Example 2. From the two figures above, it can be seen that both adaptive forgetting factors fluctuate within the range of 0.95 to 1. Compared to the fixed forgetting factors, the adaptive forgetting factors can adaptively change in response to changes in the residuals, validating the effectiveness of the proposed method of updating the forgetting factors in an exponential form. From the state estimation results obtained under the EKF algorithm, the Sage-Husa algorithm with different forgetting factors, and the AEKF algorithm in Examples 1 and 2, it is evident that the AEKF algorithm demonstrates greater stability, with its estimates being closest to the true values. The simulation experiments confirm that the traditional Sage-Husa algorithm exhibits divergence, which is less pronounced in one-dimensional models but becomes more significant in multi-dimensional models. Upon deeper investigation, the underlying causes can be identified as follows: in the EKF algorithm, the statistical characteristics of the noise are assumed to be constant and, therefore, cannot adapt to changes in the system, leading to limited adaptability.