Learn R Programming

netcontrol (version 0.1)

control_gramian: Controllability Gramian

Description

Compute the (infinite time) controllability Gramian for the discrete linear time invariant system described by \(x(t+1) = Ax(t) + Bu(t)\). The infinite time controllability Gramian is the solution to the discrete Lyapunov equation \(AWA^\prime-W = -BB^\prime\), while the finite time Gramian for time \(T\) is $$W_t = \sum_{t = 0}^T A^tBB^\prime(A^\prime)^t$$

Usage

control_gramian(A, B, t = NA)

Arguments

A

\(n x n\) matrix.

B

\(n x m\) matrix.

t

Either NA for infinite time Gramian, or a positive non-zero integer. Defaults to NA.

Value

The infinite time or finite time controllability Gramian

Examples

Run this code
# NOT RUN {
A = matrix(c(0,-3,-2,2,-2,1,-1,2,-1), 3,3)
B = diag(3)

#Infinite time Gramian
W_inf = control_gramian(A, B)

#4 time Gramian
W_4 = control_gramian(A,B,4)
# }

Run the code above in your browser using DataLab