dlqe
Kalman filter for discrete-time systems.
x[k] = Ax[k] + Bu[k] + Gw[k] (State equation) y[k] = Cx[k] + Du[k] + v[k] (Measurement Equation) E(w) = 0, E(v) = 0, cov(w) = Q, cov(v) = R, cov(w,v) = S |
Inputs
State transition matrix of discrete-time system (n-by-n).
Process noise matrix of discrete-time system (n-by-g).
If g is empty []
, an identity matrix is assumed.
Measurement matrix of discrete-time system (p-by-n).
Process noise covariance matrix (g-by-g).
Measurement noise covariance matrix (p-by-p).
Optional cross term covariance matrix (g-by-p), s = cov(w,v).
If s is empty []
or not specified, a zero matrix is assumed.
Outputs
Kalman filter gain matrix (n-by-p).
Unique stabilizing solution of the discrete-time Riccati equation (n-by-n). Symmetric matrix.
Error covariance (n-by-n), cov(x(k|k)-x)
Closed-loop poles (n-by-1).
Equations
x[k|k] = x[k|k-1] + M(y[k] - Cx[k|k-1] - Du[k]) x[k+1|k] = Ax[k|k] + Bu[k] for S=0 x[k+1|k] = Ax[k|k] + Bu[k] + G*S*(C*P*C' + R)^-1*(y[k] - C*x[k|k-1]) for non-zero S E = eig(A - A*M*C) for S=0 E = eig(A - A*M*C - G*S*(C*P*C' + Rv)^-1*C) for non-zero S |
See also: dare, care, dlqr, lqr, lqe
Source Code: dlqe