## 2 An Adaptive Fading-Memory Receding-Horizon Filter
### An Adaptive Fading-Memory Receding-Horizon Filter
Adaptive Horizon Length Adjustment Method and Switching Adaptive Fading-Memory Receding-Horizon Filter

The horizon length influences the estimation performance of the RH filter. In particular, the computational cost of the RH filter can be considerably reduced by using a short horizon length. If modeling uncertainties or numerical errors exist, the RH filter with a short horizon length could generate less estimation error and computational complexity than that with a long horizon length. Moreover, as it could provide faster tracking speed than the long-horizon RH filter when model uncertainty disappears, the RH filter with a short horizon is suitable for cases with temporary model uncertainties or numerical errors [33]. By contrast, when the model represents the real system well and numerical errors do not exist, there is a significant trade-off between estimation accuracy and computational cost. In this situation, as the horizon length of the RH filter increases, its estimation accuracy increases, but the computational cost also significantly increases. The Kalman filter could be the proper choice instead of the RH filter with a long horizon length when the system model is accurate because the estimate of the RH filter converges to that of the Kalman filter with increasing horizon length and the computational cost of the Kalman filter is significantly smaller than that of the RH filter. Accordingly, a simple but efficient way to enhance the computational efficiency and estimation accuracy is to adopt the AHLA method and use the Kalman filter instead of the RH filter with a long horizon length when the system model is accurate. Therefore, a SAFMRH filter based on an AHLA method and the adaptive fading factor is proposed. First, an AFMRH filtering algorithm with a novel AHLA method is introduced. The main idea of the AHLA method is the circulative set of three sequentially obtained estimates. During the three time steps, the three estimates are sequentially obtained from the AFMRH filter with different horizon lengths; then their absolute residual values are compared to find the most suitable one. The horizon length of the estimate that has the minimum of the absolute residual value is selected for the next cycle. The concept of the AHLA method is depicted in \[\mathsf{E}\big{[}\delta_{k-N+i+j|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{13}\]7

The detailed AHLA method is as follows (explained in case of estimating the state in the cycle \([k-2\;\;k]\)):

1. At time \(k-2\), the horizon initial states \(\hat{x}_{k-N_{k-2}-2|k-2}\), \(\hat{x}_{k-N_{k-2}-1|k-2}\), and \(\hat{x}_{k-N_{k-2}|k-2}\) and their error covariance matrices corresponding to the estimates of the states \(x_{k-2}\), \(x_{k-1}\), and \(x_{k}\), respectively, are obtained from backward information filtering (6)-(9) with the initial conditions \(\hat{w}_{k-2|k-2}=0\) and \(S_{k-2|k-2}=0\), where \(N_{k-2,k}\) is the horizon length of the AFMRH filter to estimating the state in the time interval \([k-2\;\;k]\). Note that the horizon initial conditions \(\hat{x}_{k-N_{k-2}-2|k-2}\) and \(\hat{x}_{k-N_{k-2}|k-2}\) are obtained by using measurements \([k-N_{k-2,k}-2\;\;k-2]\), not \([k-N_{k-2,k}-2\;\;k-3]\) and \([k-N_{k-2,k}-1\;\;k-1]\), respectively. At the same time, \(\hat{x}_{k-2|k-2}\) is obtained from the Kalman filtering recursion (3) and (4). Additionally, the predicted estimate \(\hat{x}_{k-1|k-2}\) is obtained from Equation (3) with \(\hat{x}_{k-2|k-2}\) and \(P_{k-2|k-2}\). It is also noted that \(\hat{x}_{k-1|k-2}\) is obtained from the AFMRH filter with the horizon length \(N_{k-2,k}+1\). 2. At time \(k-1\), \(\hat{x}_{k-1|k-2}\) is obtained from the Kalman filtering recursion given by Equations (3) and (4) with the initial conditions \(\hat{x}_{k-N_{k-2,k}-1|k-2}\) and \(P_{k-N_{k-2,k}-1|k-2}\), which are obtained in the previous step.