lqe (MathScript RT Module Function)
- Updated2023-03-14
- 2 minute(s) read
lqe (MathScript RT Module Function)
Owning Class: ssdesign
Requires: Control Design and Simulation Module and MathScript RT Module
Syntax
[L, X, eig] = lqe(A, G, C, Q, R)
[L, X, eig] = lqe(A, G, C, Q, R, N)
[L, X, eig] = lqe(SysSS, G, Q, R)
[L, X, eig] = lqe(SysSS, G, Q, R, N)
Description
Calculates the optimal steady-state estimator gain matrix L for a continuous state-space model defined by matrices A and C.
Inputs
| Name | Description |
|---|---|
| A | Specifies an n x n state matrix, where n is the number of states. The default is an empty matrix. A is a real matrix. |
| G | Specifies a matrix that relates the process noise to the states. |
| C | Specifies an r x n output matrix, where r is the number of outputs. C is a real matrix. |
| Q | Specifies a symmetric, positive semi-definite matrix that penalizes the state vector x in the cost function. Q is a real matrix. |
| R | Specifies a symmetric positive definite matrix that penalizes the output vector y in the cost function. The default is the identity matrix. R is a real matrix. |
| N | Specifies a matrix that penalizes the cross product between output and state vectors, such that (Q - N*inv(R)*N') is positive semi-definite. The default is an appropriately-sized matrix of zeros. N is a real matrix. |
| SysSS | Specifies a linear time-invariant (LTI) model in state-space form. |
Outputs
| Name | Description |
|---|---|
| L | Returns the Kalman gain matrix. L is a real matrix. |
| X | Returns the symmetric, positive semi-definite (stabilizing) solution to the discrete algebraic Riccati equation. X is a real matrix. |
| eig | Returns the eigenvalues of the matrix (A - LC). These eigenvalues are the closed-loop pole locations. eig is a complex vector. |
Details
The following table lists the support characteristics of this function.
| Supported in the LabVIEW Run-Time Engine | Yes |
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | Not characterized |
Examples
A = [-1, -2; 0, -4];
G = eye(2)
C = [0; 1];
Q = [2, 0; 0, 2];
R = 1;
[L, X, eig] = lqe(A, G, C, Q, R)