dlqry (Control Design and Simulation Module, MathScript Function)

LabView Control Design MathScript Functions

dlqry (Control Design and Simulation Module, MathScript Function)

Member of the ssdesign class.

Syntax

[K, X, eig] = dlqry(SysInSS, Q, R)

[K, X, eig] = dlqry(SysInSS, Q, R, N)

[K, X, eig] = dlqry(A, B, C, D, Q, R)

[K, X,,eig] = dlqry(A, B, C, D, Q, R, N)

Description

Calculates the optimal steady-state feedback gain matrix K that minimizes a quadratic cost function for a linear discrete state-space system model. This cost function weights the model outputs. The quadratic cost function J is defined as the following equation:
sum(y'(k)Qy(k)+u(k)' Ru(k)+2y(k)'Nu(k), k, 0, +inf), where k is discrete time, u is the input vector, and y is the output vector.

Examples

Inputs

Name Description
SysInSS Specifies a linear time-invariant (LTI) model in state-space form.
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.
B Specifies an n x m input matrix, where m is the number of inputs. The default is an empty matrix. B is a real matrix.
C Specifies an r x n output matrix, where r is the number of outputs. The default is an empty matrix. C is a real matrix.
D Specifies an r x m direct transmission matrix. The default is an empty matrix. D is a real matrix.
Q Specifies a symmetric, positive semi-definite matrix that penalizes the output vector y in the cost function. Q is a real matrix.
R Specifies a symmetric positive definite matrix that penalizes the input vector u 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 input and output 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.

Outputs

Name Description
K Returns the gain matrix such that K = inv(B'XB+R)*(B'XA+N'). K 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-BK). These eigenvalues are the closed-loop pole locations. eig is a complex vector.

Examples

A = [.9, 0.25; 0, 0.8]
B = [0; 1]
C = [1, 0]
D = 0
Q = 2
R = 1
[K, X, eig] = dlqry(A, B, C, D, Q, R)

Related Topics

dlqr
lqr
dare
lqry