# 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
\Bigg{]}\tilde{R}_{N,N-i+1}^{-1}Y_{N,k-N+i}, \tag{43}\]  
where \(\tilde{G}_{o,i}\) is defined by removing the last zero column from \(\tilde{G}_{i}\), the Equations (39) and (40) can be rewritten as  
\[\hat{x}_{i[k}=M_{i}N_{i}^{-1}S_{i}, \tag{44}\]  
\[P_{i}=M_{i}N_{i}^{-1}M_{i}^{T}. \tag{45}\]For \(i=1\), \(\hat{x}_{1|k}\) can be represented with initial state \(x_{0}\) and covarinace \(P_{0}\) as  
\[ \begin{array}{rcl}\hat{x}_{1|k}&=&A_{0}x_{0}+A_{0}P_{0}C_{0}^{T}(R_{0}+C_{0}P_ {0}C_{0}^{T})^{-1}(y_{0}-C_{0}x_{0})\\ &=&\left[A_{0}-A_{0}P_{0}C_{0}^{T}\left(R_{0}+C_{0}P_{0}C_{0}^{T}\right)^{-1}C_ {0}\right]x_{0}\\ &&+A_{0}P_{0}C_{0}^{T}(R_{0}+C_{0}P_{0}C_{0}^{T})^{-1}y_{0}\\ &=&M_{1}N_{1}^{-1}S_{1},\end{array}  \tag{46}\]  
and \(P_{1}\) is calculated as  
\[ \begin{array}{rcl}P_{1}&=&A_{0}P_{0}A_{0}^{T}+Q_{0}-A_{0}P_{0}C_{0}^{T}\left( R_{0}+C_{0}P_{0}C_{0}^{T}\right)^{-1}C_{0}P_{0}A_{0}^{T}\\ &=&A_{0}\left(P_{0}^{-1}+C_{0}^{T}R_{0}^{-1}C_{0}\right)^{-1}A_{0}^{T}+Q_{0}, \\ &=&\left[\begin{array}{cc}A_{0}&I\end{array}\right]\left[\begin{array}{cc}P _{0}^{-1}+C_{0}^{T}R_{0}^{-1}C_{0}&0\\ 0&Q_{0}^{-1}\end{array}\right]^{-1}\left[\begin{array}{cc}A_{0}&I\end{array} \right]^{T}\\ &=&M_{1}N_{1}^{-1}M_{1}^{\top}.\end{array}  \tag{47}\]  
For \(i+1\), \(\hat{x}_{i+1|k}\) can be calculated from \(\hat{x}_{i|k}\) as  
\[ \begin{array}{rcl}\hat{x}_{i+1|k}&=&\left[A_{i}-A_{i}P_{i}C_{i}^{T}\left(R_ {i}+C_{i}P_{i}C_{i}^{T}\right)^{-1}C_{i}\right]\hat{x}_{i|k}\\ &&+A_{i}P_{i}C_{i}^{T}(R_{i}+C_{i}P_{i}C_{i}^{T})^{-1}y_{i}\\ &=&A_{i}M_{i}\left[N_{i}^{-1}-N_{i}^{-1}M_{i}^{T}C_{i}^{T}\left(R_{i}+C_{i}M_ {i}N_{i}^{-1}M_{i}^{T}C_{i}^{T}\right)^{-1}C_{i}M_{i}N_{i}^{-1}\right]S_{i}\\ &&+A_{i}M_{i}N_{i}^{-1}M_{i}^{T}C_{i}^{T}\left(R_{i}+C_{i}M_{i}N_{i}^{-1}M_{i}^ {T}C_{i}^{T}\right)^{-1}y_{i}\\ &=&A_{i}M_{i}L_{i}^{-1}S_{i}+A_{i}M_{i}L_{i}^{-1}M_{i}^{T}C_{i}^{T}R_{i}^{-1}y _{i}\\ &=&A_{i}M_{i}L_{i}^{-1}\left(S_{i}+M_{i}^{T}C_{i}^{T}R_{i}^{-1}y_{i}\right)\\ &=&\left[\begin{array}{cc}A_{i}M_{i}&I\end{array}\right]\left[\begin{array}[] {cc}L_{i}^{-1}&0\\ 0&Q_{i}\end{array}\right]S_{i+1}\\ &=&M_{i+1}N_{i+1}^{-1}S_{i+1},\end{array}  \tag{48}\]  
and \(P_{i+1}\) can be obtained from \(P_{i}\) as  
\[ \begin{array}{rcl}P_{i+1}&=&A_{i}\left[P_{i}-P_{i}C_{i}^{T}\left(R_{i}+C_{i }P_{i}C_{i}^{T}\right)^{-1}C_{i}P_{i}\right]A_{i}^{T}+Q_{i}\\ &=&A_{i}M_{i}\left[N_{i}^{-1}-N_{i}^{-1}M_{i}^{T}C_{i}^{T}\left(R_{i}+C_{i}M_ {i}N_{i}^{-1}M_{i}^{T}C_{i}^{T}\right)^{-1}\right.\\ &&\left.\times\,C_{i}M_{i}N_{i}^{-1}\right]M_{i}^{T}A_{i}+Q_{i}\\ &=&A_{i}M_{i}\left(N_{i}+M_{i}^{T}C_{i}^{T}R_{i}^{-1}C_{i}M_{i}\right)^{-1}M_{ i}^{T}A_{i}+Q_{i}\\ &=&A_{i}M_{i}L_{i}^{-1}M_{i}^{T}A_{i}+Q_{i}\\ &=&M_{i+1}N_{i+1}^{-1}M_{i+1}^{T}.\end{array}  \tag{49}\]  
This completes the proof. Finally, it can be shown that the finite horizon Kalman filter with estimated initial conditions is equivalent to the conventional optimal FIR filter (32) by applying the estimated initial state (16) and error covariance (19) to the finite horizon Kalman filter (38) as per the following theorem. Theorem 2: The optimal FIR filter (32) can be obtained by replacing \(x_{k-N}\) and \(P_{k-N}\) in the finite Kalman filter (38) with the estimated initial conditions (16 ) and (19), respectively. **Proof of Theorem 2. **\(\Pi_{k-1}^{-1}\) in (11) can be represented as  
\[ \begin{array}{rcl}\Pi_{k-1}^{-1}&=&\left(\tilde{G}_{k-1}\tilde{Q}_{N,1}\tilde{ G}_{k-1}^{T}+\tilde{R}_{N,1}\right)^{-1}\\ &=&\tilde{R}_{N,1}^{-1}-\tilde{R}_{N,1}^{-1}\tilde{G}_{k-1}\left(\tilde{G}_{k- 1}^{T}\tilde{R}_{N,1}^{-1}\tilde{G}_{k-1}+\tilde{Q}_{N,1}^{-1}\right)^{-1} \tilde{G}_{k-1}^{T}\tilde{R}_{N,1}^{-1}.\end{array}  \tag{50}\]  
By using (35)-(37) and (50), \(P_{k-N}^{-1}\) and \(P_{k-N}^{-1}\tilde{x}_{k-N}\) in (38) can be rewritten as  
\[