Products & Services Industries Academia Support User Community Company

Learn more about Control System Toolbox   

kalman - Design continuous- or discrete-time Kalman estimator

Syntax

kalman
[kest,L,P] = kalman(sys,Qn,Rn,Nn)
[kest,L,P] = kalman(sys,Qn,Rn,Nn,sensors,known)
[kest,L,P,M,Z] = kalman(sys,Qn,Rn,...,type)

Description

kalman designs a Kalman state estimator given a state-space model of the plant and the process and measurement noise covariance data. The Kalman estimator provides the optimal solution to the following continuous or discrete estimation problems.

Continuous-Time Estimation

Given the continuous plant

with known inputs u, white process noise w, and white measurement noise v satisfying

construct a state estimate that minimizes the steady-state error covariance

The optimal solution is the Kalman filter with equations

The filter gain L is determined by solving an algebraic Riccati equation to be

where

and P solves the corresponding algebraic Riccati equation.

The estimator uses the known inputs u and the measurements y to generate the output and state estimates and . Note that estimates the true plant output

Discrete-Time Estimation

Given the discrete plant

and the noise covariance data

The estimator has the following state equation:

The gain matrix L is derived by solving a discrete Riccati equation to be

where

There are two variants of discrete-time Kalman estimators:

Usage

[kest,L,P] = kalman(sys,Qn,Rn,Nn) creates a state-space model kest of the Kalman estimator given the plant model sys and the noise covariance data Qn, Rn, Nn (matrices Q, R, N described in Description). sys must be a state-space model with matrices .

The resulting estimator kest has inputs and outputs (or their discrete-time counterparts). You can omit the last input argument Nn when N = 0.

The function kalman handles both continuous and discrete problems and produces a continuous estimator when sys is continuous and a discrete estimator otherwise. In continuous time, kalman also returns the Kalman gain L and the steady-state error covariance matrix P. P solves the associated Riccati equation.

[kest,L,P] = kalman(sys,Qn,Rn,Nn,sensors,known) handles the more general situation when

The index vectors sensors and known specify which outputs y of sys are measured and which inputs u are known (deterministic). All other inputs or sys are assumed stochastic.

[kest,L,P,M,Z] = kalman(sys,Qn,Rn,...,type) specifies the estimator type for discrete-time plants sys. The string type is either 'current' (default) or 'delayed'. For discrete-time plants, kalman returns the estimator and innovation gains L and M and the steady-state error covariances

Example

See LQG Design for the x-Axis and Kalman Filtering for examples that use the kalman function.

Limitations

The plant and noise data must satisfy:

References

[1] Franklin, G.F., J.D. Powell, and M.L. Workman, Digital Control of Dynamic Systems, Second Edition, Addison-Wesley, 1990.

[2] Lewis, F., Optimal Estimation, John Wiley & Sons, Inc, 1986.

See Also

kalmd, estim, care, dare, lqgreg, lqg, ltimodels, ss

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS