Kalman - MapleSim Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

ControlDesign

  

Kalman

  

design Kalman estimator for a given state-space system

 

Calling Sequence

Parameters

Options

Solvability Conditions

Description

Examples

References

Calling Sequence

Kalman(sys, G, H, Q, R, opts)

Parameters

sys

-

System; system object

G

-

Matrix; process noise matrix in the state equations

H

-

Matrix: process noise matrix in the output equations

Q

-

Matrix; process noise covariance matrix

R

-

Matrix; measurement noise covariance matrix

opts

-

(optional) equation(s) of the form option = value; specify options for the Kalman command

Options

• 

N = Matrix or Vector

  

The cross-correlation matrix between process and measurement noises. If omitted, a zero matrix with appropriate dimensions will be considered.

• 

output = gain or filter

  

Specifies whether the Kalman gains or the Kalman filter object must be returned. The default value is gain.

  

If gain, the Kalman gains and steady state estimation error covariance matrices are returned as follows:

– 

In the continuous-time domain, the gain matrix and steady state error covariance are returned as a sequence of  where  and  are as defined before.

– 

In the discrete-time domain, the gain matrix, the innovation gain, and the steady state error covariance matrices are returned as a sequence of  where , , and  are as defined before and

  

.

  

If filter, the Kalman filter is returned as a state-space DynamicSystems object. The structure of the filter depends on the time-domain and the value of option filtertype (for the discrete Kalman filter).

• 

filtertype =  current or delayed

  

Specifies the type of the discrete Kalman filter. The default value is current.

• 

parameters = {list, set}(name = complexcons)

  

Specifies numeric values for the parameters of sys. These values override any parameters previously specified for sys. The numeric value on the right-hand side of each equation is substituted for the name on the left-hand side in the sys equations. The default is the value of sys given by DynamicSystems:-SystemOptions(parameters).

Solvability Conditions

• 

The pair  must be detectable.

• 

The pair  must have no uncontrollable modes on the imaginary axis in continuous-time domain or on the unit circle in discrete-time domain

where , , and  are as defined before.

• 

 (positive definite) and  (positive semidefinite)

where , , and  are as defined before.

Description

• 

The Kalman command designs the Kalman estimator for a given system and process and measurement noise covariance matrices.

• 

The system sys is a continuous or discrete-time linear system object created using the DynamicSystems package. The system object must be in state-space (SS) form.

• 

If sys contains structural uncontrollable or unobservable states, they are removed using ReduceSystem before computing the Kalman gains.  The resulting Kalman gains are then filled with zeros at positions corresponding to the removed states.

 

• 

Continuous-Time Kalman Estimator (Filter)

Given the continuous-time system

 

 

with known (deterministic) inputs , white process noise , and white measurement noise , satisfying

 

    (process noise has zero mean value)

    (measurement noise has zero mean value)

 

where  is the mathematical expectation of , the Kalman filter provides an optimal state estimation that minimizes the steady state error covariance

 

.

 

The Kalman filter equations are given as

 

.

 

The gain matrix  is calculated as

 

 

where  is the solution of the corresponding algebraic Riccati equation and

 

.

 

• 

Discrete-Time Kalman Estimator (Filter)

Given the discrete-time system

 

 

and the noise covariance data

 

 

the Kalman filter provides an optimal state estimation that minimizes the steady state error covariance

 

.

 

The discrete Kalman filter state equation is given as

 

 

The gain matrix  is calculated as

 

 

where   is the solution of the corresponding algebraic Riccati equation and  and  are as defined before.

 

– 

The output equation structure depends on the type of the filter specified in the option filtertype:

 

– 

The current estimator uses all available measurements up to  and generates state estimates  and output estimates . The updated estimates are obtained from the prediction  using the latest measurement  as

 

.

 

 is called the innovation signal which (under Kalman optimality conditions) is white.

 

The innovation gain, , is given as

 

.

 

The output equation is given as

 

.

 

– 

The delayed estimator uses measurements up to  and generates state estimates  and output estimates .

The output equation is given as

 

.

Examples

Design a Kalman filter for a continuous system

(1)

(2)

(3)

(4)

Design a Kalman filter for a discrete system:

(5)

(6)

(7)

(8)

(9)

References

  

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

  

[2] G. F. Franklin, J. D. Powell and M. L. Workman, Digital Control of Dynamic Systems, 2nd Ed., Addison-Wesley, 1990.

See Also

ControlDesign

ControlDesign[LQR]

ControlDesign[StateFeedback][Ackermann]

ControlDesign[StateFeedback][PolePlacement]

ControlDesign[StateObserver][Ackermann]

ControlDesign[StateObserver][Observer]

ControlDesign[StateObserver][PolePlacement]

 


Download Help Document