## 2 An Adaptive Fading-Memory Receding-Horizon Filter
### An Adaptive Fading-Memory Receding-Horizon Filter
Then, the optimal fading factor can be obtained by taking the trace on both sides of Equation (23) as  
\[\delta_{k-N+i|k-1}=y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}. \tag{11}\]9  
Thus, on the horizon \([k-N\;\;k]\), the AFMRH filtering algorithm can be summarized as following Algorithm 1:```
Initialization:\(\hat{\Delta}_{N|N-1}\leftarrow\frac{1}{N}\sum_{i=1}^{N}\delta_{i|N-1}\delta_{i|N-1}^{T}\) for the first horizon \([1\;\;N-1]\)
```

**Step 1: Backward information smoothing on the horizon \([k-N\;\;k-1]\)**

```
Initialization:\(\hat{w}_{k-1|k-1}\gets 0\), \(S_{k-1|k-1}\gets 0\) for\(l\gets 1\) to \(N-1\)do \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]0 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]1 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]2 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]3 endfor Step 2: Finite horizon adaptive fading filtering on the horizon \([k-N\;\;k-1]\)
```

**Algorithm 1** The AFMRH filtering algorithm

```
Initialization:\(\hat{x}_{k-N|k-1}\gets S_{k-N|k-1}^{-1}\hat{w}_{k-N|k-1}\), \(P_{k-N|k-1}\gets S_{k-N|k-1}^{-1}\), \(\hat{\Delta}_{k-N|k-1}\) \(\leftarrow\hat{\Delta}_{k-1|k-2}\) for\(i\gets 0\) to \(N-1\)do \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]4 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]5 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]6 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]7 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]8 \[\Delta_{k-N+i|k-1} = \mathsf{E}\big{[}\delta_{k-N+i|k-1}\delta_{k-N+i|k-1}^{T}\big{]} \tag{12}\]9 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]0 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]1 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]2 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]3 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]4 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]5 \[= \mathsf{E}\Big{[}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1} \big{)}\big{(}y_{k-N+i}-C_{k-N+i}\hat{x}_{k-N+i|k-1}\big{)}^{T}\Big{]}\]6 endfor
```

**Algorithm 2** The AFMRH filtering algorithm

## 3 An Adaptive Fading-Memory Receding-Horizon Fixed-Lag Smoother

In the case where the system can tolerate delay, smoothers can provide better accuracy estimates than filters. However, to the best of the author's knowledge, an adaptive fixed-lag RH smoothing algorithm has not been investigated. Hence, in this section, an AFMRH fixed-lag smoothing algorithm based on the AFMRH filter and Rauch-Tung-Striebel (RTS) smoother is proposed to further improve the estimation performance of the proposed filter. The proposed smoother comprises two passes: forward AFMRH filtering and backward RTS smoothing. In the forward pass, the AFMRH filter is used to obtain the a priori and a posteriori estimates and their error covariance matrices. In the time interval from the fixed-lag time up to the current time, the estimated states and their error covariance matrices are stored for the backward pass. Thereafter, the backward pass based on the RTS smoothing algorithm runs by utilizing the stored data to estimate the fixed-lag state.