scispace - formally typeset
Open AccessBook ChapterDOI

A tool for kalman filter tuning

TLDR
This method yields least-squares estimates of the noise covariances, which can be used to compute the Kalman filter gain.
Abstract
The Kalman filter requires knowledge about the noise statistics. In practical applications, however, the noise covariances are generally not known. In this paper, a method for estimating noise covariances from process data has been investigated. This method yields least-squares estimates of the noise covariances, which can be used to compute the Kalman filter gain.

read more

Content maybe subject to copyright    Report

17
th
European Symposium on Computer Aided Process Engineering – ESCAPE17
V. Plesu and P.S. Agachi (Editors)
© 2007 Elsevier B.V./Ltd. All rights reserved.
A Tool for Kalman Filter Tuning
Bernt M. Åkesson,
a
John Bagterp Jørgensen,
b
Niels Kjølstad Poulsen,
b
Sten Bay Jørgensen
a
a
CAPEC, Department of Chemical Engineering, Technical University of Denmark,
2800 Lyngby, Denmark, baa@kt.dtu.dk, sbj@kt.dtu.dk
b
Informatics and Mathematical Modelling, Technical University of Denmark,
2800 Lyngby, Denmark, jbj@imm.dtu.dk, , nkp@imm.dtu.dk
Abstract
The Kalman filter requires knowledge about the noise statistics. In practical
applications, however, the noise covariances are generally not known. A
method for estimating noise covariances from process data has been
investigated. The method gives a least-squares estimate of the noise
covariances, which can be used to compute the Kalman filter gain.
Keywords
Kalman filter; Covariance estimation; State estimation
1. Introduction
In state estimation the state of a system is reconstructed from process
measurements. State estimation has important applications in control,
monitoring and fault detection of chemical processes. The Kalman filter and its
counterpart for nonlinear systems, the extended Kalman filter, are well-
established techniques for state estimation. However, a well-known drawback
of Kalman filters is that knowledge about process and measurement noise
statistics is required from the user. In practical applications the noise
covariances are generally not known. Tuning the filter, i.e. choosing the values
of the process and measurement noise covariances such that the filter
performance is optimized with respect to some performance index, is a

B. Åkesson et al.
challenging task. If performed manually in an ad hoc fashion it represents a
considerable burden for the user. Therefore there is need for a tool that can
perform filter tuning or provide assistance to the user.
The filter tuning problem is essentially a covariance estimation problem and the
Kalman filter gain is computed based on the estimated covariances. This issue
has been addressed in numerous papers and a number of methods have been
presented, cf. discussion in [1,2] and references therein. A promising technique
for covariance estimation is the autocovariance least-squares method proposed
recently by Odelson and co-workers for linear time-invariant systems [1]. This
method is based on the estimated autocovariance of the output innovations,
which is used to compute a least-squares estimate of the noise covariance
matrices. The estimation problem can be stated in the form of a linear least-
squares problem with additional constraints to ensure positive semidefiniteness
of the covariance matrices.
In this paper, a generalized autocovariance least-squares tuning method is
applied to the Kalman filter. This Kalman filter tuning methodology is
implemented into a software tool to facilitate practical applications.
The performance of the Kalman filter tuning tool (Kalfilt) is demonstrated on a
numerical example.
2. Problem statement
Consider a linear time-invariant system in discrete-time,
kkk
kkkk
vCxy
GwBuAxx
+=
+
+
=
+1
(1)
where A R
n × n
, B R
n × m
, G R
x × g
and C R
p × n
. The process noise w
k
and
the measurement noise v
k
are zero-mean white noise processes with covariance
matrices Q
w
and R
v
, respectively, and cross-covariance S
wv
. Assume that a
stationary Kalman filter is used to estimate the state. The one-step ahead
prediction is given by
)
ˆ
(
ˆˆ
1|1||1 +
+
+
=
kkkpkkkkk
xCyKBuxAx
(2)
where the Kalman filter gain K
p
is defined as

A Tool for Kalman Filter Tuning
1
))((
++=
v
T
pwv
T
pp
RCCPGSCAPK (3)
and P
p
is the covariance of the state prediction error,
1|1|
ˆ
~
=
kkkkk
xxx
. The
covariance
[
]
T
kkkkp
xxEP
1|1|
~
~
= is obtained as the solution to the Riccati equation
)())((
1 TT
wv
T
pv
T
pwv
T
p
T
w
T
pp
GSACPRCCPGSCAP
GGQAAPP
+++
+=
(4)
In the following approach it is assumed that the model is given, along with an
initial suboptimal Kalman filter, based on initial guesses Q
w,0
, R
v,0
and S
wv,0
. The
objective is to estimate the covariance matrices Q
w
, R
v
and S
wv
and use these to
compute the Kalman filter gain K
p
.
3. Paper approach
3.1.
Methodology
A general state-space model of the measurement prediction error can be
defined,
kkkk
kpkkkpkk
vxCe
vKGwxCKAx
+=
+=
+
1|
1||1
~
~
)(
~
(5)
where
1|
ˆ
=
kkkk
xCye .
The autocovariance of the measurement prediction or estimate error is given by
[
]
[ ]
1 )(
)()(
1
1
,
0,
+==
+==
+
j,RKCKAC
GSCKACCPCKACeeER
RCCPeeER
vp
j
p
wv
j
p
T
p
j
p
T
kjkje
v
T
p
T
kke
(6)

B. Åkesson et al.
The autocovariance matrix is defined as
=
0,2,1,
2,0,1,
1,1,0,
)(
eLeLe
T
Leee
T
Le
T
ee
e
RRR
RRR
RRR
LR
L
MOMM
L
L
. (7)
Substitution of Eqs. (6) into Eq. (7) followed by separation of the right-hand
side into terms is performed. After this, the vec operator is applied to both sides
of the resulting equation. The vec operator performs stacking of the matrix
columns to form a column matrix [3]. This allows the problem to be stated as a
linear least-squares problem,
( )
=
43421
X
v
T
wv
wvw
lse
RS
SQ
ALR vec)(vec
(8)
where the parameter matrix A
ls
is formed from system matrices A, G, C and the
Kalman filter gain K
p
. This has the form of a linear least-squares problem. The
left-hand side of Eq. (8) can be estimated from steady-state data. Given a
sequence of data
{
}
d
N
i
i
e
1=
, the estimate of the autocovariance can be computed by
=
+
=
jN
i
T
iji
d
je
d
ee
jN
R
1
,
1
ˆ
, (9)
where N
d
is the length of the data sequence. An estimated autocovariance matrix
)(
ˆ
LR
e
can then be formed analogously to Eq. (7). Solving (8) as a linear least-
squares problem does not gurantee that the estimated covariance matrices are
positive semidefinite. Furthermore, the parameter matrix A
ls
may be poorly
conditioned, which affects the accuracy of the solution. This can be remedied by
adding a regularization term. The estimation problem can be formulated as
follows,

A Tool for Kalman Filter Tuning
( )
( )
( )
te.semidefini positive symmetric .s.t
vec)(
ˆ
vecvecmin
2
2
0
2
2
X
XXLRXA
r
els
X
+
Φ
Φ
44 344 21
4444 34444 21
λ
(10)
where
λ
is a regularization parameter chosen by the user and allows a suitable
bias-variance trade-off. Eq. (10) is a semidefinite least-squares problem, which
is convex and can be solved by an interior point method [1]. A suitable value for
λ
can be found by plotting Φ
r
versus Φ for different values of
λ
. The optimal
Kalman filter gain can then be computed from the estimated covariances using
Eq. (3) after solving the Riccati equation (4).
3.2.
Numerical example
We consider a system with the following system matrices
[ ]
02.01.0,
3
2
1
,
3.000
02.00
1.001.0
=
=
= CGA
and noise covariances Q
w
= 0.5, R
v
= 0.1 and S
wv
= 0.2. A set of 200 simulations
were performed, each comprising a sequence of N
d
= 1000 data points. For each
simulation, the covariances were estimated. The autocovariance lag was chosen
as L = 15.
The effect of regularization was investigated for the first simulation. In Fig. 1
the regularization term Φ
r
and the fit to data Φ are plotted versus each other for
parameter values
λ
[10
-9
- 10]. The parameter value
λ
= 0.1 gave a good
trade-off (Φ
r
= 0.15) and was used subsequently. The covariance estimates are
plotted in Fig. 2. The bias in the estimates is due to regularization.
The performance of the tuned Kalman filter is compared to that of the initial
filter and the ideal filter based on perfect information. The root-mean square
error of output predictions,

Citations
More filters
Journal ArticleDOI

Remaining useful life estimation in aeronautics: Combining data-driven and Kalman filtering

TL;DR: The Kalman filtering technique can improve the accuracy and the bias of the original regression models near the equipment end of life and the approach with the best overall improvement was the nearest neighbors, which suggests that Kalman filters may work the best for instance-based methods.
Proceedings ArticleDOI

Particle Swarm Optimization Aided Kalman Filter for Object Tracking

TL;DR: This paper proposes tuning of noise covariances of Kalman filter for object tracking using particle swarm optimization (PSO) and considers not only object features but also object motion estimation to speed up the searching procedure.
Journal ArticleDOI

Tyre–road grip coefficient assessment – Part II: online estimation using instrumented vehicle, extended Kalman filter, and neural network

TL;DR: The study will focus on finding a method to determine the limit of safe driving conditions by identifying the maximal friction coefficient before reaching the skid, which is valuable information in the context of traffic safety.

Vehicle Mass and Road Grade Estimation Using Kalman Filter

TL;DR: In this article, a method for on-line estimation of vehicle mass and road grade using Kalman filter is presented, aiming at better fuel economy, drivability and safety.
Posted Content

Two novel costs for determining the tuning parameters of the Kalman Filter

TL;DR: In this paper, two new costs have been proposed for determining the filter tuning parameters on the basis of the innovation covariance, which provides a cost function based method for the selection of suitable combination(s) of filter tuning parameter in order to ensure the design of a KF or an EKF having an optimally balanced RMSE performance.
References
More filters
Journal ArticleDOI

Kronecker products and matrix calculus in system theory

TL;DR: In this article, a review of the algebras related to Kronecker products is presented, which have several applications in system theory including the analysis of stochastic steady state.
Journal ArticleDOI

A new autocovariance least-squares method for estimating noise covariances

TL;DR: This paper presents a new method (constrained ALS) to estimate the variances of the disturbances entering the process using routine operating data and guarantees positive semidefinite covariance estimates by adding constraints to the ALS problem.
Journal ArticleDOI

The autocovariance least-squares method for estimating covariances: application to model-based control of chemical reactors

TL;DR: The autocovariance least-squares (ALS) technique is demonstrated on two chemical reactor control problems and has the potential to improve the best industrial practice of process control by a factor of three to five.
Related Papers (5)
Frequently Asked Questions (11)
Q1. What are the contributions in "A tool for kalman filter tuning" ?

In this paper, a generalized autocovariance least-squares tuning method is applied to the Kalman filter. 

The process noise wk and the measurement noise vk are zero-mean white noise processes with covariance matrices Qw and Rv, respectively, and cross-covariance Swv. 

The filter tuning problem is essentially a covariance estimation problem and the Kalman filter gain is computed based on the estimated covariances. 

a well-known drawback of Kalman filters is that knowledge about process and measurement noise statistics is required from the user. 

The objective is to estimate the covariance matrices Qw, Rv and Swv and use these to compute the Kalman filter gain Kp.A general state-space model of the measurement prediction error can be defined,kkkkkpkkkpkkvxCevKGwxCKAx+=−+−=−−+1|1||1~~)(~ (5)where 1|ˆ −−= kkkk xCye . 

Tuning the filter, i.e. choosing the values of the process and measurement noise covariances such that the filter performance is optimized with respect to some performance index, is achallenging task. 

Consider a linear time-invariant system in discrete-time,kkkkkkkvCxyGwBuAxx+=++=+1 (1)where A ∈ Rn × n, B ∈ Rn × m, G ∈ Rx × g and C ∈ Rp × n. 

The estimation problem can be stated in the form of a linear leastsquares problem with additional constraints to ensure positive semidefiniteness of the covariance matrices. 

Given a sequence of data { } dNiie 1= , the estimate of the autocovariance can be computed by∑ −=+ −=jNiT ijid jedee jN R 1, 1ˆ , (9)where Nd is the length of the data sequence. 

The estimation problem can be formulated as follows,( ) ( ) ( )te.semidefini positive symmetric .s.tvec)(ˆvecvecmin 22022XXXLRXArels X −+−ΦΦ44 344 214444 34444 21 λ(10)where λ is a regularization parameter chosen by the user and allows a suitable bias-variance trade-off. 

This allows the problem to be stated as a linear least-squares problem,( ) =43421 Xv T wvwvw lse RSSQ ALR vec)(vec (8)where the parameter matrix