control_gramian: Controllability Gramian

Description Usage Arguments Value Examples

View source: R/control_stats.R

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 = ∑_{t = 0}^T A^tBB^\prime(A^\prime)^t

Usage

1
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

1
2
3
4
5
6
7
8
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)

netcontrol documentation built on March 26, 2020, 7:25 p.m.