# Kalman Filter Riccati Equation for the Prediction, Estimation, and Smoothing Error Covariance Matrices

Authors: Nicholas Assimakis; Maria Adam
Journal: ISRN Computational Mathematics
 (2013)

---

## Abstract

The classical Riccati equation for the prediction error covariance arises in linear estimation and is derived by the discrete time Kalman filter equations. New Riccati equations for the estimation error covariance as well as for the smoothing error covariance are presented. These equations have the same structure as the classical Riccati equation. The three equations are computationally equivalent. It is pointed out that the new equations can be solved via the solution algorithms for the classical Riccati equation using other well-defined parameters instead of the original Kalman filter parameters.


---

## Body

## 1. Introduction

The classical Riccati equation arises in linear filtering and is associated with time invariant systems described by the following state space equations:(1)x(k+1)=Fx(k)+w(k),z(k+1)=Hx(k+1)+v(k+1),
for k≥0, where x(k) is the n-dimensional state vector at time k, z(k) is the m-dimensional measurement vector at time k, F is the n×n system transition matrix, H is the m×n output matrix, w(k) is the plant noise at time k, and v(k) is the measurement noise at time k. Also, {w(k)} and {v(k)} are Gaussian zero-mean white random processes with covariance matrices Q and R, respectively.Filtering is to use measurements in order to recover information about the state vector. Filtering plays an important role in many fields of science: applications to aerospace industry, chemical process, communication systems design, control, civil engineering, filtering noise from 2-dimensional images, pollution prediction, and power systems are mentioned in [1].We distinguish three kinds of filtering as follows.Prediction. The aim is to obtain at time k information about the state vector at time k+l for some l>0 using measurements up till time k; it is clear that prediction is related to the forecasting side of information processing.Estimation. The aim is to recover at time k information about the state vector at time k using measurements up till time k.Smoothing. The aim is to obtain at time k information about the state vector at time k-l for some l>0 using measurements up till time k; it is clear that smoothing requires delay in producing information about the state vector compared to the estimation case.The discrete time Kalman filter [1] is the most well-known algorithm that solves the filtering problem. Kalman filter uses the measurements up till time k in order to produce the (one step) prediction of the state vector and the corresponding prediction error covariance matrix P(k+1/k), as well as to produce the estimation of the state vector and the corresponding estimation error covariance matrix P(k/k). The Kalman filter equations, needed for the computation of the prediction and estimation error covariance matrices, are given as follows:
(2)K(k)=P(k/k-1)HT[HP(k/k-1)HT+R]-1,(3)P(k/k)=(I-K(k)H)P(k/k-1),(4)P(k+1/k)=Q+FP(k/k)FT,
for k≥0, with initial condition P(0/-1)=P0 for the time instant where there are no measurements given. Here and hereafter, consider that P0 is a nonsingular matrix; thus, all error covariance matrices derived by (3)-(4) are positive definite and hence the prediction and estimation error covariance matrices are nonsingular. Note that K(k) is the Kalman filter gain.Also, the fixed-point or fixed-lag smoothing algorithms [1] emanating from Kalman filter use the measurements up till time k in order to produce the (one step) smoothing of the state vector and the corresponding smoothing error covariance matrix P(k/k+1).The relation between the smoothing error covariance matrix and the prediction and estimation error covariance matrices can be calculated from fixed-point or fixed-lag smoothing algorithms [1] emanating from Kalman filter equations:
(5)P(k/k+1)=P(k/k)+P(k/k)FT[P(k+1/k)]-1×(P(k+1/k+1)-P(k+1/k))×[P(k+1/k)]-1FP(k/k).
The Riccati equation for the prediction error covariance P(k/k-1) is derived by (2)–(4) as
(6)P(k+1/k)=Q+FP(k/k-1)FT-FP(k/k-1)HT×[HP(k/k-1)HT+R]-1×HP(k/k-1)FT,
for k≥0, with initial condition P(0/-1)=P0.The discrete time Riccati equation has attracted recent attention (see [1–12] and the references therein). In view of the importance of the Riccati equation, there exists considerable literature on its algebraic solutions [1, 10–12] or iterative solutions [1–9] concerning per step or doubling algorithms.In this paper, new Riccati equations for the estimation and smoothing error covariance matrices are presented. The paper is organized as follows: In Section2, the (classical) Riccati equation for the prediction error covariance is discussed, and the new Riccati equations for the estimation and smoothing error covariance matrices are presented (Sections 2.2 and 2.3). In Section 2.4, the associated algorithms are proposed and an example verifies the results. Finally, Section 3 summarizes the conclusions.


## 2. Riccati Equations for the Error Covariance Matrices

### 2.1. Riccati Equation for the Prediction Error Covariance

In the general case whereR and P0 are positive definite matrices, using in (6) the matrix inversion lemma
(7)[A+BCD]-1=A-1-A-1B[C-1+DA-1B]-1DA-1
the classical Riccati equation for the prediction error covariance is derived as follows.Theorem 1.
The Riccati equation for the prediction error covariance is given by(8)P(k+1/k)=qp+fp[[P(k/k-1)]-1+hpTrp-1hp]-1fpT,
where
(9)fp=F,hp=H,qp=Q,rp=R.The Riccati equation emanating from Kalman filter is a nonlinear iterative equation with respect to the prediction error covariance. For time invariant systems, it is well known [1] that if the signal process model is asymptotically stable, then there exist steady state values P-p of the prediction error covariance matrix. In fact, the prediction error covariance tends to the steady state prediction error covariance.The steady state prediction error covariance satisfies theclassical steady state Riccati equation for the prediction error covariance:(10)P-p=qp+fp[P-p-1+hpTrp-1hp]-1fpT,
where fp, hp, qp, and rp are given by (9).From (2), it becomes obvious that the gain tends to a constant value K-, thesteady state gain,which is calculated as a function of the steady state prediction error covariance, as follows:
(11)K-=P-pHT[HP-pHT+R]-1.
Then, from (3) it becomes obvious that the estimation error covariance tends to a constant value P-e, the steady state estimation error covariance which is calculated as a function of the steady state prediction error covariance, as follows:
(12)P-e=P-p-P-pHT[HP-pHT+R]-1HP-p=[P-p-1+HTR-1H]-1.Also, from (5) it becomes obvious that the smoothing error covariance tends to a constant value P-s, the steady state smoothing error covariance which is calculated as a function of the steady state prediction error covariance and the steady state estimation error covariance, as follows:
(13)P-s=P-e+P-eFTP-p-1(P-e-P-p)P-p-1FP-e.It is obvious that the steady state prediction covariance matrix can be calculated off-line by solving the corresponding discrete time Riccati equation. Then, the steady state estimation covariance matrix can be computed using (12) and the steady state smoothing covariance matrix can be computed using (13).


### 2.2. Riccati Equation for the Estimation Error Covariance

In the general case whereQ and R are positive definite matrices, we are able to derive from the Kalman filter equations a new discrete time Riccati equation for the estimation error covariance.Theorem 2.
The Riccati equation for the estimation error covariance is given by(14)P(k+1/k+1)=qe+fe[[P(k/k)]-1+heTre-1he]-1feT,
where
(15)fe=[Q-1+HTR-1H]-1Q-1F=qeQ-1F,(16)he=HF,(17)qe=[Q-1+HTR-1H]-1,(18)re=R+HQHT.Proof.
Applying in (4) the matrix inversion lemma as in (7) and considering the nonsingularity of the covariance Q, P(k/k), the following equation is derived:
(19)[P(k+1/k)]-1=Q-1-Q-1F[[P(k/k)]-1+FTQ-1F]-1FTQ-1.
Moreover, using (2) and (7), (3) can be written as
(20)P(k+1/k+1)=(I-K(k+1)H)P(k+1/k)=(I-P(k+1/k)HT[HP(k+1/k)HT+R]-1H)×P(k+1/k)=P(k+1/k)-P(k+1/k)HT[HP(k+1/k)HT+R]-1HP(k+1/k)=[[P(k+1/k)]-1+HTR-1H]-1.
Substituting in the last equality the matrix [P(k+1/k)]-1 by (19), setting  qe-1=Q-1+HTR-1H, and using the matrix inversion lemma, the following equation is derived:
(21)P(k+1/k+1)=[[P(k+1/k)]-1+HTR-1H]-1=[Q-1-Q-1F[[P(k/k)]-1+FTQ-1F]-1FTQ-1+HTR-1H]-1=[[-[P(k/k)]-1-FTQ-1F]-1(Q-1+HTR-1H)+Q-1F[-[P(k/k)]-1-FTQ-1F]-1FTQ-1]-1=[qe-1+Q-1F[-[P(k/k)]-1-FTQ-1F]-1FTQ-1]-1=qe-qeQ-1F[-[P(k/k)]-1-FTQ-1F+FTQ-1qeQ-1F]-1×FTQ-1qe=qe+qeQ-1F[[P(k/k)]-1+FTQ-1F-FTQ-1qeQ-1F]-1×FTQ-1qe.
Notice that qe=[Q-1+HTR-1H]-1 is a positive definite matrix, since qe is a sum of positive definite matrices as the matrices Q-1, R-1. Thus,  qe  is a nonsingular and symmetric matrix.
Moreover, using some algebra and the lemma in (7) we have
(22)FTQ-1F-FTQ-1qeQ-1F=FT(Q-1-Q-1qeQ-1)F=FT(Q-1-Q-1[Q-1+HTR-1H]-1Q-1)F=FT(Q-1-[Q(Q-1+HTR-1H)Q]-1)F=FT(Q-1-[Q+(QHT)R-1(HQ)]-1)F=FT([R+HQQ-1QHT]-1Q-1-Q-1+Q-1QHT×[R+HQQ-1QHT]-1HQQ-1)F=FTHT[R+HQHT]-1HF=heTre-1he,
where he and re are given by (16) and (18), respectively.
Settingfe=qeQ-1F and using (22) in (21), the proof of (14) is completed.Remark 3.
(1) It is obvious that the new Riccati equation (14) has the same structure as the classical Riccati equation (8) for the prediction error covariance.
(2) The steady state estimation error covariance satisfies the new steady state Riccati equation for the estimation error covariance(23)P-e=qe+fe[P-e-1+heTre-1he]-1feT,
where fe, he, qe, re are given by (15)–(18).
It is also obvious that the new steady state Riccati equation (23) has the same structure as the classical steady state Riccati equation (10) for the prediction error covariance.
(3) It is evident that the steady state estimation covariance matrix can be calculated off-line by solving the corresponding new Riccati equation, using iterative algorithms or algebraic algorithms, analogous to the algorithms for the classical Riccati equation. Of course we are able to use the same algebraic algorithms [1, 10, 12] or iterative algorithms [1–9] that solve the classical Riccati equation, using the parameters fe, he, qe, re in (15)–(18) instead of the original ones fp, hp, qp, rp in (9). Thus, it is evident that the classical and the new Riccati equations are computationally equivalent.
(4) Having computed the steady state estimation covariance matrix and using (4), the steady state prediction covariance matrix can be computed by the equation
(24)P-p=Q+FP-eFT.
Then, the steady state smoothing error covariance can be computed using (13). Also, using the steady state prediction covariance matrix by (24), the steady state gain can be computed using (11).


### 2.3. Riccati Equation for the Smoothing Error Covariance

In the general case whereQ  and R are positive definite matrices, using the Kalman filter equations (2)–(5) we are able to derive a new discrete time Riccati equation for the smoothing error covariance.Theorem 4.
The Riccati equation for the smoothing error covariance is given by(25)P(k+1/k+2)=qs+fs[[P(k/k+1)]-1+hsTrs-1hs]-1fsT,
where
(26)fs=qsQ-1F,hs=HF[Q-1+HTR-1H]-1Q-1F,qs=[Q-1+HTR-1H+FTHT[R+HQHT]-1HF]-1,rs=R+HQHT+HF[Q-1+HTR-1H]-1FTHT.Proof.
Substituting the matricesP(k+1/k+1), K(k+1),P(k+1/k) from (3), (2), and (4), respectively in (5), it is derived that
(27)P(k/k+1)=P(k/k)+P(k/k)FT[P(k+1/k)]-1×((I-K(k+1)H)P(k+1/k)-P(k+1/k))×[P(k+1/k)]-1FP(k/k)=P(k/k)-P(k/k)FT[P(k+1/k)]-1×K(k+1)HP(k+1/k)×[P(k+1/k)]-1FP(k/k)=P(k/k)-P(k/k)FT[P(k+1/k)]-1×P(k+1/k)HT×[HP(k+1/k)HT+R]-1HFP(k/k)=P(k/k)-P(k/k)FTHT×[H(Q+FP(k/k)FT)HT+R]-1HFP(k/k)=P(k/k)-P(k/k)FTHT×[HQHT+R+HFP(k/k)FTHT]-1HFP(k/k).
Applying in the last equation the matrix inversion lemma as in (7), the following equation is derived:
(28)P(k/k+1)=[[P(k/k)]-1+FTHT[HQHT+R]-1HF]-1.
Using the matrices he, re by (16), (18), respectively, (28) yields
(29)[P(k/k+1)]-1=[P(k/k)]-1+FTHT[HQHT+R]-1HF=[P(k/k)]-1+heTre-1he.
From (29), (14), and the matrix inversion lemma, it is derived that
(30)[P(k+1/k+2)]-1=[P(k+1/k+1)]-1+heTre-1he=[qe+fe[[P(k/k)]-1+heTre-1he]-1feT]-1+heTre-1he=[qe+fe[[P(k/k+1)]-1]-1feT]-1+heTre-1he=[qe+feP(k/k+1)feT]-1+heTre-1he=qe-1+heTre-1he+qe-1fe[-[P(k/k+1)]-1-feTqe-1fe]-1feTqe-1;
(30) is implied that
(31)P(k+1/k+2)=[qe-1+heTre-1he+qe-1fe[-[P(k/k+1)]-1-feTqe-1fe]-1feTqe-1]-1.
Setting
(32)A=qe-1+heTre-1he,B=qe-1fe,C=[-[P(k/k+1)]-1-feTqe-1fe]-1,D=feTqe-1,
and applying the matrix inversion lemma, (31) is written as
(33)P(k+1/k+2)=A-1+A-1B[[P(k/k+1)]-1+feTqe-1fe-DA-1B[P(k/k+1)]-1]-1DA-1.
Notice that A is a positive definite matrix, using (16)–(18), A is formulated as
(34)A=qe-1+heTre-1he=Q-1+HTR-1H+FTHT[R+HQHT]-1HF.
Thus, A is a sum of positive definite matrices as the matrices Q-1, R-1.
Similarly,A-1 is a positive definite matrix.
Also, from (17) it is evident that qe is a positive definite matrix; hence, qe-1 is a symmetric matrix. Thus, we can write (A-1B)T=BT[AT]-1=(qe-1fe)TA-1=feTqe-1A-1=DA-1. Moreover, using the matrix inversion lemma and some algebra we have
(35)feTqe-1fe-DA-1B=feTqe-1fe-feTqe-1[qe-1+heTre-1he]-1qe-1fe=feT(qe-1-qe-1[qe-1+heTre-1he]-1qe-1)fe=feT(qe-1-qe-1(qe-qeheT[re+heqeheT]-1heqe)qe-1)fe=feT(qe-1-qe-1+heT[re+heqeheT]-1he)fe=feTheT[re+heqeheT]-1hef.
Using the above remarks and setting in (33) the following relations:
(36)fs=[qe-1+heTre-1he]-1qe-1fe,hs=hefe,qs=[qe-1+heTre-1he]-1,rs=re+heqeheT,
where fe, he, qe, re are given by (15)–(18), the proof of (25) is completed.
It is clear that by substituting the parametersfe, he, qe, re by (15)–(18) in (36), we are able to express the parameters fs, hs, qs, rs with respect to the Kalman filter parameters F, H, Q, R, getting (26).Remark 5.
(1) It is obvious that the new Riccati equation (25) has the same structure as the classical Riccati equation (8) for the prediction error covariance.
(2) The steady state smoothing error covariance satisfies the new steady state Riccati equation for the smoothing error covariance:(37)P-s=qs+fs[P-s-1+hsTrs-1hs]-1fsT,
where fs, hs, qs, rs are given by (26).
It is also obvious that the new steady state Riccati equation (37) has the same structure as the classical steady state Riccati equation (10) for the prediction error covariance.
(3) It is evident that the steady state smoothing covariance matrix can be calculated off-line by solving the corresponding new Riccati equation, using iterative algorithms or algebraic algorithms, analogous to the algorithms for the classical Riccati equation. Of course we are able to use the same algebraic algorithms [1, 10, 12] or iterative algorithms [1–9] that solve the classical Riccati equation, using the parameters fs, hs, qs, rs in (26) instead of the original ones fp, hp, qp, rp in (9). Thus, it is evident that the classical and the new Riccati equations are computationally equivalent.
(4) The equations in (36) describe the relations between the parameters concerning the steady state smoothing covariance matrix and the parameters fe, he, qe, re concerning the steady state estimation covariance matrix.
(5) Having computed the steady state smoothing covariance matrix, the steady state estimation covariance matrix can be computed using (29) by the equation
(38)P-e=[P-s-1-FTHT[HQHT+R]-1HF]-1.
Then, having computed the steady state estimation covariance matrix, the steady state prediction covariance matrix can be computed by (24). Also, using the steady state prediction covariance matrix, the steady state gain can be computed using (11).


### 2.4. Algorithms and Example

The new Riccati equations have the same structure as the classical Riccati equation as shown in Table1. Hence, the three equations are computationally equivalent. The new Riccati equations can be solved via the solution algorithms for the classical Riccati equation using other well-defined parameters instead of the original Kalman filter parameters, as shown in Table 1.Table 1
Riccati equations.
Riccati equation
Parameters
PredictionP-p=qp+fp[P-p-1+hpTrp-1hp]-1fpT
f
p
=
F
h
p
=
H
q
p
=
Q
r
p
=
R
EstimationP-e=qe+fe[P-e-1+heTre-1he]-1feT
f
e
=
q
e
Q
-
1
F
h
e
=
H
F
q
e
=
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
r
e
=
R
+
H
Q
H
T
SmoothingP-s=qs+fs[P-s-1+hsTrs-1hs]-1fsT
f
s
=
q
s
Q
-
1
F
h
s
=
H
F
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
Q
-
1
F
q
s
=
[
Q
-
1
+
H
T
R
-
1
H
+
F
T
H
T
[
R
+
H
Q
H
T
]
-
1
H
F
]
-
1
r
s
=
R
+
H
Q
H
T
+
H
F
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
F
T
H
TExample 1. Consider a model of dimensions n=2 and m=1 with parameters
(39)F=[-0.90.7-0.30.1],H=[11],Q=[1003],R=1.
Using the matlab function dare with the original parameters fp, hp, qp, rp in (9),f=F;h=H;q=Q;r=R;[pp]=dare(f′,h′,q,r);we computed as the steady state prediction error covariance
(40)P-p=[4.81060.96800.96803.2509].Moreover, using the matlab function dare with the parametersfe, he, qe, re in (15)–(18) instead of the original ones fp, hp, qp, rp:h=H*F;q=inv(inv(Q)+H′*inv(R)*H);r=H*Q*H′+R;f=q*inv(Q)*F;[pe]=dare(f′,h′,q,r);we computed of the steady state estimation error covariance as
(41)P-e=[1.7743-1.2488-1.24881.6325].Also, using the matlab function dare with the parametersfs, hs, qs, rs in (26) instead of the original ones fp, hp, qp, rp:h=H*F*inv(inv(Q)+H′*inv(R)*H)*inv(Q)*F;q=inv(inv(Q)+H′*inv(R)*H+F′*H′*inv(R+H*Q*H′)*H*F);r=R+H*Q*H′+H*F*inv(inv(Q)+H′*inv(R)*H)*F′*H′;f=q*inv(Q)*F;[ps]=dare(f′,h′,q,r);we computed as the steady state smoothing error covariance
(42)P-s=[0.8845-0.4511-0.45110.9172].
The Kalman filter gain is
(43)K-=[0.52540.3836].


## 2.1. Riccati Equation for the Prediction Error Covariance

In the general case whereR and P0 are positive definite matrices, using in (6) the matrix inversion lemma
(7)[A+BCD]-1=A-1-A-1B[C-1+DA-1B]-1DA-1
the classical Riccati equation for the prediction error covariance is derived as follows.Theorem 1.
The Riccati equation for the prediction error covariance is given by(8)P(k+1/k)=qp+fp[[P(k/k-1)]-1+hpTrp-1hp]-1fpT,
where
(9)fp=F,hp=H,qp=Q,rp=R.The Riccati equation emanating from Kalman filter is a nonlinear iterative equation with respect to the prediction error covariance. For time invariant systems, it is well known [1] that if the signal process model is asymptotically stable, then there exist steady state values P-p of the prediction error covariance matrix. In fact, the prediction error covariance tends to the steady state prediction error covariance.The steady state prediction error covariance satisfies theclassical steady state Riccati equation for the prediction error covariance:(10)P-p=qp+fp[P-p-1+hpTrp-1hp]-1fpT,
where fp, hp, qp, and rp are given by (9).From (2), it becomes obvious that the gain tends to a constant value K-, thesteady state gain,which is calculated as a function of the steady state prediction error covariance, as follows:
(11)K-=P-pHT[HP-pHT+R]-1.
Then, from (3) it becomes obvious that the estimation error covariance tends to a constant value P-e, the steady state estimation error covariance which is calculated as a function of the steady state prediction error covariance, as follows:
(12)P-e=P-p-P-pHT[HP-pHT+R]-1HP-p=[P-p-1+HTR-1H]-1.Also, from (5) it becomes obvious that the smoothing error covariance tends to a constant value P-s, the steady state smoothing error covariance which is calculated as a function of the steady state prediction error covariance and the steady state estimation error covariance, as follows:
(13)P-s=P-e+P-eFTP-p-1(P-e-P-p)P-p-1FP-e.It is obvious that the steady state prediction covariance matrix can be calculated off-line by solving the corresponding discrete time Riccati equation. Then, the steady state estimation covariance matrix can be computed using (12) and the steady state smoothing covariance matrix can be computed using (13).


## 2.2. Riccati Equation for the Estimation Error Covariance

In the general case whereQ and R are positive definite matrices, we are able to derive from the Kalman filter equations a new discrete time Riccati equation for the estimation error covariance.Theorem 2.
The Riccati equation for the estimation error covariance is given by(14)P(k+1/k+1)=qe+fe[[P(k/k)]-1+heTre-1he]-1feT,
where
(15)fe=[Q-1+HTR-1H]-1Q-1F=qeQ-1F,(16)he=HF,(17)qe=[Q-1+HTR-1H]-1,(18)re=R+HQHT.Proof.
Applying in (4) the matrix inversion lemma as in (7) and considering the nonsingularity of the covariance Q, P(k/k), the following equation is derived:
(19)[P(k+1/k)]-1=Q-1-Q-1F[[P(k/k)]-1+FTQ-1F]-1FTQ-1.
Moreover, using (2) and (7), (3) can be written as
(20)P(k+1/k+1)=(I-K(k+1)H)P(k+1/k)=(I-P(k+1/k)HT[HP(k+1/k)HT+R]-1H)×P(k+1/k)=P(k+1/k)-P(k+1/k)HT[HP(k+1/k)HT+R]-1HP(k+1/k)=[[P(k+1/k)]-1+HTR-1H]-1.
Substituting in the last equality the matrix [P(k+1/k)]-1 by (19), setting  qe-1=Q-1+HTR-1H, and using the matrix inversion lemma, the following equation is derived:
(21)P(k+1/k+1)=[[P(k+1/k)]-1+HTR-1H]-1=[Q-1-Q-1F[[P(k/k)]-1+FTQ-1F]-1FTQ-1+HTR-1H]-1=[[-[P(k/k)]-1-FTQ-1F]-1(Q-1+HTR-1H)+Q-1F[-[P(k/k)]-1-FTQ-1F]-1FTQ-1]-1=[qe-1+Q-1F[-[P(k/k)]-1-FTQ-1F]-1FTQ-1]-1=qe-qeQ-1F[-[P(k/k)]-1-FTQ-1F+FTQ-1qeQ-1F]-1×FTQ-1qe=qe+qeQ-1F[[P(k/k)]-1+FTQ-1F-FTQ-1qeQ-1F]-1×FTQ-1qe.
Notice that qe=[Q-1+HTR-1H]-1 is a positive definite matrix, since qe is a sum of positive definite matrices as the matrices Q-1, R-1. Thus,  qe  is a nonsingular and symmetric matrix.
Moreover, using some algebra and the lemma in (7) we have
(22)FTQ-1F-FTQ-1qeQ-1F=FT(Q-1-Q-1qeQ-1)F=FT(Q-1-Q-1[Q-1+HTR-1H]-1Q-1)F=FT(Q-1-[Q(Q-1+HTR-1H)Q]-1)F=FT(Q-1-[Q+(QHT)R-1(HQ)]-1)F=FT([R+HQQ-1QHT]-1Q-1-Q-1+Q-1QHT×[R+HQQ-1QHT]-1HQQ-1)F=FTHT[R+HQHT]-1HF=heTre-1he,
where he and re are given by (16) and (18), respectively.
Settingfe=qeQ-1F and using (22) in (21), the proof of (14) is completed.Remark 3.
(1) It is obvious that the new Riccati equation (14) has the same structure as the classical Riccati equation (8) for the prediction error covariance.
(2) The steady state estimation error covariance satisfies the new steady state Riccati equation for the estimation error covariance(23)P-e=qe+fe[P-e-1+heTre-1he]-1feT,
where fe, he, qe, re are given by (15)–(18).
It is also obvious that the new steady state Riccati equation (23) has the same structure as the classical steady state Riccati equation (10) for the prediction error covariance.
(3) It is evident that the steady state estimation covariance matrix can be calculated off-line by solving the corresponding new Riccati equation, using iterative algorithms or algebraic algorithms, analogous to the algorithms for the classical Riccati equation. Of course we are able to use the same algebraic algorithms [1, 10, 12] or iterative algorithms [1–9] that solve the classical Riccati equation, using the parameters fe, he, qe, re in (15)–(18) instead of the original ones fp, hp, qp, rp in (9). Thus, it is evident that the classical and the new Riccati equations are computationally equivalent.
(4) Having computed the steady state estimation covariance matrix and using (4), the steady state prediction covariance matrix can be computed by the equation
(24)P-p=Q+FP-eFT.
Then, the steady state smoothing error covariance can be computed using (13). Also, using the steady state prediction covariance matrix by (24), the steady state gain can be computed using (11).


## 2.3. Riccati Equation for the Smoothing Error Covariance

In the general case whereQ  and R are positive definite matrices, using the Kalman filter equations (2)–(5) we are able to derive a new discrete time Riccati equation for the smoothing error covariance.Theorem 4.
The Riccati equation for the smoothing error covariance is given by(25)P(k+1/k+2)=qs+fs[[P(k/k+1)]-1+hsTrs-1hs]-1fsT,
where
(26)fs=qsQ-1F,hs=HF[Q-1+HTR-1H]-1Q-1F,qs=[Q-1+HTR-1H+FTHT[R+HQHT]-1HF]-1,rs=R+HQHT+HF[Q-1+HTR-1H]-1FTHT.Proof.
Substituting the matricesP(k+1/k+1), K(k+1),P(k+1/k) from (3), (2), and (4), respectively in (5), it is derived that
(27)P(k/k+1)=P(k/k)+P(k/k)FT[P(k+1/k)]-1×((I-K(k+1)H)P(k+1/k)-P(k+1/k))×[P(k+1/k)]-1FP(k/k)=P(k/k)-P(k/k)FT[P(k+1/k)]-1×K(k+1)HP(k+1/k)×[P(k+1/k)]-1FP(k/k)=P(k/k)-P(k/k)FT[P(k+1/k)]-1×P(k+1/k)HT×[HP(k+1/k)HT+R]-1HFP(k/k)=P(k/k)-P(k/k)FTHT×[H(Q+FP(k/k)FT)HT+R]-1HFP(k/k)=P(k/k)-P(k/k)FTHT×[HQHT+R+HFP(k/k)FTHT]-1HFP(k/k).
Applying in the last equation the matrix inversion lemma as in (7), the following equation is derived:
(28)P(k/k+1)=[[P(k/k)]-1+FTHT[HQHT+R]-1HF]-1.
Using the matrices he, re by (16), (18), respectively, (28) yields
(29)[P(k/k+1)]-1=[P(k/k)]-1+FTHT[HQHT+R]-1HF=[P(k/k)]-1+heTre-1he.
From (29), (14), and the matrix inversion lemma, it is derived that
(30)[P(k+1/k+2)]-1=[P(k+1/k+1)]-1+heTre-1he=[qe+fe[[P(k/k)]-1+heTre-1he]-1feT]-1+heTre-1he=[qe+fe[[P(k/k+1)]-1]-1feT]-1+heTre-1he=[qe+feP(k/k+1)feT]-1+heTre-1he=qe-1+heTre-1he+qe-1fe[-[P(k/k+1)]-1-feTqe-1fe]-1feTqe-1;
(30) is implied that
(31)P(k+1/k+2)=[qe-1+heTre-1he+qe-1fe[-[P(k/k+1)]-1-feTqe-1fe]-1feTqe-1]-1.
Setting
(32)A=qe-1+heTre-1he,B=qe-1fe,C=[-[P(k/k+1)]-1-feTqe-1fe]-1,D=feTqe-1,
and applying the matrix inversion lemma, (31) is written as
(33)P(k+1/k+2)=A-1+A-1B[[P(k/k+1)]-1+feTqe-1fe-DA-1B[P(k/k+1)]-1]-1DA-1.
Notice that A is a positive definite matrix, using (16)–(18), A is formulated as
(34)A=qe-1+heTre-1he=Q-1+HTR-1H+FTHT[R+HQHT]-1HF.
Thus, A is a sum of positive definite matrices as the matrices Q-1, R-1.
Similarly,A-1 is a positive definite matrix.
Also, from (17) it is evident that qe is a positive definite matrix; hence, qe-1 is a symmetric matrix. Thus, we can write (A-1B)T=BT[AT]-1=(qe-1fe)TA-1=feTqe-1A-1=DA-1. Moreover, using the matrix inversion lemma and some algebra we have
(35)feTqe-1fe-DA-1B=feTqe-1fe-feTqe-1[qe-1+heTre-1he]-1qe-1fe=feT(qe-1-qe-1[qe-1+heTre-1he]-1qe-1)fe=feT(qe-1-qe-1(qe-qeheT[re+heqeheT]-1heqe)qe-1)fe=feT(qe-1-qe-1+heT[re+heqeheT]-1he)fe=feTheT[re+heqeheT]-1hef.
Using the above remarks and setting in (33) the following relations:
(36)fs=[qe-1+heTre-1he]-1qe-1fe,hs=hefe,qs=[qe-1+heTre-1he]-1,rs=re+heqeheT,
where fe, he, qe, re are given by (15)–(18), the proof of (25) is completed.
It is clear that by substituting the parametersfe, he, qe, re by (15)–(18) in (36), we are able to express the parameters fs, hs, qs, rs with respect to the Kalman filter parameters F, H, Q, R, getting (26).Remark 5.
(1) It is obvious that the new Riccati equation (25) has the same structure as the classical Riccati equation (8) for the prediction error covariance.
(2) The steady state smoothing error covariance satisfies the new steady state Riccati equation for the smoothing error covariance:(37)P-s=qs+fs[P-s-1+hsTrs-1hs]-1fsT,
where fs, hs, qs, rs are given by (26).
It is also obvious that the new steady state Riccati equation (37) has the same structure as the classical steady state Riccati equation (10) for the prediction error covariance.
(3) It is evident that the steady state smoothing covariance matrix can be calculated off-line by solving the corresponding new Riccati equation, using iterative algorithms or algebraic algorithms, analogous to the algorithms for the classical Riccati equation. Of course we are able to use the same algebraic algorithms [1, 10, 12] or iterative algorithms [1–9] that solve the classical Riccati equation, using the parameters fs, hs, qs, rs in (26) instead of the original ones fp, hp, qp, rp in (9). Thus, it is evident that the classical and the new Riccati equations are computationally equivalent.
(4) The equations in (36) describe the relations between the parameters concerning the steady state smoothing covariance matrix and the parameters fe, he, qe, re concerning the steady state estimation covariance matrix.
(5) Having computed the steady state smoothing covariance matrix, the steady state estimation covariance matrix can be computed using (29) by the equation
(38)P-e=[P-s-1-FTHT[HQHT+R]-1HF]-1.
Then, having computed the steady state estimation covariance matrix, the steady state prediction covariance matrix can be computed by (24). Also, using the steady state prediction covariance matrix, the steady state gain can be computed using (11).


## 2.4. Algorithms and Example

The new Riccati equations have the same structure as the classical Riccati equation as shown in Table1. Hence, the three equations are computationally equivalent. The new Riccati equations can be solved via the solution algorithms for the classical Riccati equation using other well-defined parameters instead of the original Kalman filter parameters, as shown in Table 1.Table 1
Riccati equations.
Riccati equation
Parameters
PredictionP-p=qp+fp[P-p-1+hpTrp-1hp]-1fpT
f
p
=
F
h
p
=
H
q
p
=
Q
r
p
=
R
EstimationP-e=qe+fe[P-e-1+heTre-1he]-1feT
f
e
=
q
e
Q
-
1
F
h
e
=
H
F
q
e
=
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
r
e
=
R
+
H
Q
H
T
SmoothingP-s=qs+fs[P-s-1+hsTrs-1hs]-1fsT
f
s
=
q
s
Q
-
1
F
h
s
=
H
F
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
Q
-
1
F
q
s
=
[
Q
-
1
+
H
T
R
-
1
H
+
F
T
H
T
[
R
+
H
Q
H
T
]
-
1
H
F
]
-
1
r
s
=
R
+
H
Q
H
T
+
H
F
[
Q
-
1
+
H
T
R
-
1
H
]
-
1
F
T
H
TExample 1. Consider a model of dimensions n=2 and m=1 with parameters
(39)F=[-0.90.7-0.30.1],H=[11],Q=[1003],R=1.
Using the matlab function dare with the original parameters fp, hp, qp, rp in (9),f=F;h=H;q=Q;r=R;[pp]=dare(f′,h′,q,r);we computed as the steady state prediction error covariance
(40)P-p=[4.81060.96800.96803.2509].Moreover, using the matlab function dare with the parametersfe, he, qe, re in (15)–(18) instead of the original ones fp, hp, qp, rp:h=H*F;q=inv(inv(Q)+H′*inv(R)*H);r=H*Q*H′+R;f=q*inv(Q)*F;[pe]=dare(f′,h′,q,r);we computed of the steady state estimation error covariance as
(41)P-e=[1.7743-1.2488-1.24881.6325].Also, using the matlab function dare with the parametersfs, hs, qs, rs in (26) instead of the original ones fp, hp, qp, rp:h=H*F*inv(inv(Q)+H′*inv(R)*H)*inv(Q)*F;q=inv(inv(Q)+H′*inv(R)*H+F′*H′*inv(R+H*Q*H′)*H*F);r=R+H*Q*H′+H*F*inv(inv(Q)+H′*inv(R)*H)*F′*H′;f=q*inv(Q)*F;[ps]=dare(f′,h′,q,r);we computed as the steady state smoothing error covariance
(42)P-s=[0.8845-0.4511-0.45110.9172].
The Kalman filter gain is
(43)K-=[0.52540.3836].


## 3. Conclusions

The classical Riccati equation for the prediction error covariance derived from the discrete time Kalman filter was presented. A new Riccati equation for the estimation error covariance was derived from Kalman filter. Also, a new Riccati equation for the smoothing error covariance was derived from fixed-point or fixed-lag smoothing algorithms emanating from Kalman filter. The new Riccati equations have the same structure as the classical Riccati equation, and hence the three equations are computationally equivalent. It was pointed out that the new Riccati equations can be solved via the solution algorithms for the classical Riccati equation using other well-defined parameters instead of the original Kalman filter parameters. The advantage of the new steady state Riccati equations is that we are able to compute off-line the steady state estimation error covariance or the steady state smoothing error covariance, without the need of the prediction error covariance computation.



---

*Source: 249594-2013-12-12.xml*