kalmd (Control Design and Simulation Module, MathScript Function)
Member of the ssdesign class.
Syntax
[SysKalDisc, L, P, M, Z] = kalmd(SysInSSCont, Q, R, Ts)
[SysKalDisc, L, P, M, Z] = kalmd(SysInSSCont, Q, R, N, Ts)
Description
Calculates the optimal steady-state Kalman gain L that minimizes the covariance of the state estimation error. The input system and noise covariance are based on a continuous system. All outputs are based on a discretized system SysKalDisc, which is based on the sample rate Ts.
Inputs
Name | Description |
SysInSSCont | Specifies a continuous linear time-invariant (LTI) model in state-space form. |
Q | Specifies the auto-covariance matrix of the continuous process noise. Q is a real matrix that is symmetric and positive semi-definite. |
R | Specifies the auto-covariance matrix of the continuous measurement noise. R is a real matrix that is symmetric and positive definite. |
Ts | Specifies the sampling time this VI uses to discretize the SysInSSCont model. Ts is a real scalar. |
N | Specifies the cross-covariance matrix between the process noise and measurement noise. The default is an appropriately-sized matrix of zeros, which specifies the process noise and measurement noise are uncorrelated. N must be valid such that (Q-N*inv(R)*N') is positive semi-definite. N is a real matrix. |
Outputs
Name | Description |
SysKalDisc | Returns the definition of the discrete Kalman filter with the gain matrix L applied. SysKalDisc is a discrete LTI model in state-space form. |
L | Returns the gain matrix that minimizes the covariance of the state estimation error. L is a real matrix. |
P | Returns the steady-state covariance of the estimation error. P is a real matrix. |
M | Returns the steady-state innovation gain matrix. This gain matrix weights the difference between the observed and estimated outputs in the state update equation for discrete estimators. M is a real matrix. |
Z | Returns the steady-state error covariance of the error between the actual states and the updated state estimates in the discrete estimation process. Z is a real matrix. |
Examples
SysInSSCont = ss(-1, 1, 1, 0)[SysKalDisc, L, P] = kalmd(SysInSSCont, 1, 2, 1)