# Sage-Husa Algorithm Based on Adaptive Double Forgetting Factors
## 3 Simulation and Analysis
This indicates that the estimation  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Time**} & \multirow{2}{*}{**EKF**} & \multicolumn{2}{c}{**Sage–Husa**} & \multicolumn{2}{c}{**Sage–Husa**} & \multicolumn{2}{c}{**Sage–Husa**} & \multicolumn{2}{c}{**Age–Husa**} & \multicolumn{2}{c}{**AEKF**} \\  & & \multicolumn{2}{c}{**(_b_ = 0.95)**} & \multicolumn{2}{c}{**(_b_ = 0.99)**} & \multicolumn{2}{c}{**(_b_ = 0.95; \(b_{2}\) = 0.99)**} & & \\ \hline  & **MAE** & **RMSE** & **MAE** & **RMSE** & **MAE** & **RMSE** & **MAE** & **RMSE** & **MAE** & **RMSE** \\ \hline
1 & 0.93 & 1.20 & 0.71 & 0.93 & 0.71 & 0.93 & 0.71 & 0.93 & 0.70 & 0.91 \\
2 & 0.95 & 1.20 & 0.71 & 0.86 & 0.72 & 0.86 & 0  
value of the AEKF algorithm is the most accurate, thereby substantiating the efficacy of the AEKF algorithm. As illustrated in Table 1, the MAE and RMSE of the EKF algorithm are the highest, while the discrepancies between the mean absolute errors and root mean square errors of the three Sage-Husa algorithms are relatively minor. The MAE and RMSE of the AEKF algorithm are smaller than those of the EKF algorithm and the Sage-Husa algorithms, and these are maintained in every run. This is consistent with the curves in Figures 3 and 4, which further confirm the effectiveness of the AEKF algorithm. In order to see the changes in the adaptive forgetting factors more clearly, the two adaptive forgetting factors are saved and output images, which are compared with the fixed values of the two forgetting factors. Figures 5 and 6 illustrate the change curves of the forgetting factors in relation to the prior residual and the posterior residual, respectively. As illustrated in the figures, the values of the two forgetting factors utilized in the AEKF algorithm are partitioned into two parts: the value situated within the window width is 0.95, and the rest of the value fluctuates around 0.99, which proves that the adaptive forgetting factors in the AEKF algorithm not only can follow the change in the system but also that the value of the factors is in the range of 0.95 to 1. This enhances both the adaptability and the precision of the filter. \(W_{k}=[W_{1,k},W_{2,k},W_{3,k}]^{T}\) and \(V_{k}\) are independent Zero-mean Gaussian white noise sequences. The corresponding noise statistics are \(Q=diag([1.5,1.5,1.5])\), \(R=1.5\). In the simulation, the simulation time is 200 s, the sampling interval is 1 s, and 10 Monte Carlo simulations are performed, which means the length of the data samples \(N=200\), the statistical characteristics of the noise are unknown or inaccurate, and the initial values are selected as \(Q_{0}=diag([1,1,1])\) and \(R_{0}=1\). Suppose the theoretical initial value of the system state is \(x_{0}=[0.2,0.5,0.2]^{T}\). The initial values of the error covariance matrix is \(P_{0}=diag([1,1,1])\)._  
As illustrated in Example 2, the system state is estimated using the EKF, Sage-Husa, and AEKF algorithms, with distinct fixed forgetting factors configured within the Sage-Husa algorithm. These are then compared to the adaptive forgetting factors in the AEKF algorithm in order to evaluate the accuracy of each algorithm under different forgetting factors. The simulation experiments revealed that the estimation accuracy of the Sage-Husa algorithm under different forgetting factors was generally low for this model, with jumps of varying magnitudes occurring randomly (see Figures 7 and 8). This indicates that the traditional Sage-Husa algorithm, whether with a single forgetting factor or two forgetting factors, is not well-suited for multi-dimensional models. Based on the analysis above, the filtering performance of the EKF and AEKF algorithms is compared by evaluating their state estimates, mean absolute errors, and root mean square errors, as shown in Figures 9-11. From Figure 9, it can be observed that when the statistical characteristics of the noise are unknown, the EKF algorithm exhibits random jumps in the estimated values during the filtering process.