# Recursive Optimal Finite Impulse Response Filter and Its Application to Adaptive Estimation
## 2 Recursive Optimal FIR Filter and Adaptive FIR Filter
### Optimality and Unbiasdness of Recursive Optimal FIR Filter  
In this section, the optimality and unbaisedness of the proposed ROFIR filter is verified. Since the conventional optimal FIR filter is optimal and provides unbiased estimate in the finite horizon, the optimality and unbiasedness of the proposed ROFIR filter can be verified by showing the equality with the conventional optimal FIR filter. To begin with, the best linear unbiased FIR filter for linear time-varying state space is introduced. The best linear unbiased FIR filter is designed to have the properties of unbiasedness and optimality by design as per the following lemma. **Lemma 1** ([21]). : _For linear time-varying state-space model (1) and (2), the best linear unbiased FIR filter is obtained as a linear function of finite measurements on the horizon \([k-N\;\;k]\):_  
\[\hat{x}_{k|k}=H_{k}Y_{N,k-1}, \tag{32}\]_where the filter gain matrix \(H_{k}\), chosen to minimize the estimation error variance with unbiased constraint \(E[x_{k}]=E[\hat{x}_{k[k]}]\), is obtained as_  
\[H_{k}=M_{k}\bigg{[} \begin{array}{cc}W_{1k}&W_{2k}\\ W_{2k}^{T}&W_{3k}\end{array} \bigg{]}^{-1}\bigg{[} \begin{array}{c}\mathcal{C} _{k-1}^{T}\\ \mathcal{C}_{k-1}^{T}\end{array} \bigg{]}\tilde{R}_{N,1}^{-1}, \tag{33}\]  
_with_  
\[M_{k}=\big{[} \begin{array}{cccc}\Phi_{1,N}&\Phi_{2,N}&\cdots&\Phi_{N,N}&I \end{array} \big{]}, \tag{34}\]  
\[W_{1k}=\mathcal{C}_{k-1}^{T}\tilde{R}_{N,1}^{-1}\tilde{C}_{k-1}, \tag{35}\]  
\[W_{2k}=\mathcal{C}_{k-1}^{T}\tilde{R}_{N,1}^{-1}\tilde{C}_{k-1}, \tag{36}\]  
\[W_{3k}=\tilde{G}_{k-1}^{T}\tilde{R}_{N,1}^{-1}\tilde{C}_{k-1}+\tilde{Q}_{N,1} ^{-1}. \tag{37}\]  
Next, the finite horizon Kalman filter on the horizon \([k-N\;\;k]\) can be represented as following theorem. **Theorem 1**. : _On the horizon \([k-N\;k]\), a batch form of finite horizon Kalman filter can be obtained as_  
\[\hat{x}_{k[k} = M_{k}\Bigg{[} \begin{array}{cc}W_{1k}+P_{k-N}^{-1}&W_{2k}\\ W_{2k}^{T}&W_{3k}\end{array} \Bigg{]}^{-1}\bigg{(} \begin{bmatrix}P_{k-N}^{-1}\\ 0\end{bmatrix} x_{k-N}+\bigg{[} \begin{array}{c}\mathcal{C}_{k-1}^{T}\\ \mathcal{C}_{k-1}^{T}\end{array} \bigg{]}\tilde{R}_{N,1}^{-1}Y_{N,k-1}\bigg{)}. \tag{38}\]  
**Proof of Theorem 1. ** By using the induction method, we can obtain a batch form of the finite horizon Kalman filter as follows. \(\hat{x}_{i[k}\) and \(P_{i}\) can be obtained from \(\hat{x}_{i-1|k}\) and \(P_{i-1}\) by substuting the Kalman gain matrix and covariance matrix into dynamic equation of Kalman filter as  
\[\hat{x}_{i[k} = \bigg{[}A_{i-1}-A_{i-1}P_{i-1}\mathcal{C}_{i-1}^{T}\Big{(}R_{i-1 }+\mathcal{C}_{i-1}^{T}P_{i-1}\mathcal{C}_{i-1}\Big{)}^{-1}\mathcal{C}_{i-1} \bigg{]}\hat{x}_{i-1|k} \tag{39}\] \[+A_{i-1}P_{i-1}\mathcal{C}_{i-1}^{T}(R_{i-1}+C_{i-1}P_{i-1} \mathcal{C}_{i-1}^{T})^{-1}y_{i-1},\] \[P_{i} = A_{i-1}P_{i-1}\mathcal{A}_{i-1}^{T}+Q_{i-1}-A_{i-1}P_{i-1} \mathcal{C}_{i-1}^{T}\big{(}R_{i-1}+C_{i-1}P_{i-1}\mathcal{C}_{i-1}^{T}\big{)} ^{-1}\] (40) \[\times\mathcal{C}_{i-1}P_{i-1}\mathcal{A}_{i-1}^{T},\]  
where \(i\) is used instead of \(k-N+i\) for simple notation. By defining notations \(L_{i}\), \(N_{i}\), and \(S_{i}\) as  
\[L_{i}=\Bigg{[} \begin{array}{cc}\tilde{C}_{i}^{T}\tilde{R}_{N,N-i+1}^{-1} \tilde{C}_{i}+P_{0}^{-1}&\tilde{C}_{i}^{T}\tilde{R}_{N,N-i+1}^{-1}\tilde{C}_{ o,j}\\ \tilde{G}_{o,j}\tilde{R}_{N,N-i+1}^{-1}\tilde{C}_{i}&\tilde{G}_{o,i}^{T}\tilde{ R}_{N,N-i+1}^{-1}\tilde{C}_{o,i}+\tilde{Q}_{N,N-i+2}^{-1}\end{array} \Bigg{]}, \tag{41}\]  
\[N_{i}=\Bigg{[} \begin{array}{cc}\tilde{C}_{i}^{T}\tilde{R}_{N,N-i-1}^{-1} \tilde{C}_{i}+P_{0}^{-1}&\tilde{C}_{i}^{T}\tilde{R}_{N,N-i+1}^{-1}\tilde{G}_{i} \\ \tilde{G}_{i}\tilde{R}_{N,N-i+1}^{-1}\tilde{C}_{i}&\tilde{G}_{i}^{T}\tilde{R}_ {N,N-i+1}^{-1}\tilde{G}_{i}+\tilde{Q}_{N,N-i+1}^{-1}\end{array} \Bigg{]}, \tag{42}\]  
\[S_{i}=\Bigg{[} \begin{array}{c}P_{0}^{-1}\\ 0\end{array} \Bigg{]}\hat{x}_{i[k}+\Bigg{[} \begin{array}{c}\tilde{C}_{i}^{T}\\ \tilde{G}_{i}^{T}\end{array}