| Contents | Index |
Wc = gram(sys,'c')
Wc = gram(sys,'o')
Wc = gram(sys,'c') calculates the controllability gramian of the state-space (ss) model sys.
Wc = gram(sys,'o') calculates the observability gramian of the ss model sys.
You can use gramians to study the controllability and observability properties of state-space models and for model reduction [1] . They have better numerical properties than the controllability and observability matrices formed by ctrb and obsv.
Given the continuous-time state-space model
![]()
the controllability gramian is defined by
![]()
The controllability gramian is positive definite if and only if (A, B) is controllable.
The observability gramian is defined by
![]()
The observability gramian is positive definite if and only if (C, B) is observable.
The discrete-time counterparts of the controllability and observability gramians are
![]()
respectively.
The controllability gramian Wc is obtained by solving the continuous-time Lyapunov equation
![]()
or its discrete-time counterpart
![]()
Similarly, the observability gramian Wo solves the Lyapunov equation
![]()
in continuous time, and the Lyapunov equation
![]()
in discrete time.
The A matrix must be stable (all eigenvalues have negative real part in continuous time, and magnitude strictly less than one in discrete time).
[1] Kailath, T., Linear Systems, Prentice-Hall, 1980.
balreal | ctrb | dlyap | lyap | obsv

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |