| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Control System Toolbox |
| Contents | Index |
| Learn more about Control System Toolbox |
gram
gram calculates controllability and observability gramians. 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
![]()
and the observability gramian by
![]()
The discrete-time counterparts are
![]()
The controllability gramian is positive definite if and only
if
is controllable. Similarly, the
observability gramian is positive definite if and only if
is observable.
Use the commands
Wc = gram(sys,'c') % controllability gramian Wo = gram(sys,'o') % observability gramian
to compute the gramians of a continuous or discrete system. The LTI model sys must be in state-space form.
The controllability gramian
is obtained by solving
the continuous-time Lyapunov equation
![]()
or its discrete-time counterpart
![]()
Similarly, the observability gramian
solves
the Lyapunov equation
![]()
in continuous time, and the Lyapunov equation
![]()
in discrete time.
The
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, lyap, dlyap, obsv
![]() | getoptions | hasdelay | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |