gives the controllability Gramian of the state-space model ssm.
ControllabilityGramian
gives the controllability Gramian of the state-space model ssm.
Details and Options
- The state-space model ssm can be given as StateSpaceModel[{a,b,…}], where a and b represent the state and input matrices in either the continuous-time system or the discrete-time system:
-

continuous-time system 
discrete-time system - The controllability Gramian:
-

continuous-time system 
discrete-time system - For asymptotically stable systems, the Gramian
can be computed as the solution of a Lyapunov equation: -

continuous-time system 
discrete-time system - For a StateSpaceModel with a descriptor matrix, ControllabilityGramian returns a pair of matrices {wcs,wcf}, where wcs is associated with the slow subsystem, and wcf is associated with the fast subsystem.
- The controllability Gramians only exist for descriptor systems in which Det[λ e-a]≠0 for some λ.
Examples
open all close allBasic Examples (1)
Scope (4)
The controllability Gramian of a continuous-time system:
ControllabilityGramian[StateSpaceModel[{{{0, -1, 1}, {1, -1, -1}, {-2, 0, -1}}, {{-2}, {-2}, {-2}}, {{1, 1, -2}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None]]The controllability Gramian of a discrete-time system:
ControllabilityGramian[StateSpaceModel[{{{0.9512, 0}, {0, 0.9048}}, {{4.88, 4.88}, {-0.019, 0.0095}}, {{0.01, 0}, {0, 1}},
{{0, 0}, {0, 0}}}, SamplingPeriod -> 2, SystemsModelLabels -> None]]The controllability Gramian of a symbolic system:
ControllabilityGramian[StateSpaceModel[{{{-1, a}, {-a, -1}}, {{1}, {a}}},
SamplingPeriod -> None, SystemsModelLabels -> None]];Simplify[%, a∈Reals]The controllability Gramian of a descriptor system:
ControllabilityGramian[StateSpaceModel[{{{-3, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {{1}, {0}, {2}}, {{1, 1, 1}}, {{0}},
{{1, 0, 0}, {0, 0, 1}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]]Applications (1)
Properties & Relations (7)
The controllability Gramian has the dimension of the state matrix:
ssm = StateSpaceModel[{{{0, 1}, {-10, -11}}, {{0}, {1}}, {{5, 1}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];Dimensions /@ {ControllabilityGramian[ssm], First[Normal[ssm]]}If the controllability Gramian has full rank, the system is controllable:
ssm = StateSpaceModel[{{{-3, 0}, {1, -5}}, {{-2}, {0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];{ControllableModelQ[ssm], MatrixRank[ControllabilityGramian[ssm]] == 2}ssm = StateSpaceModel[{{{-5/2, 1/2}, {1/2, -5/2}}, {{1}, {-1}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];{ControllableModelQ[ssm], MatrixRank[ControllabilityGramian[ssm]] == 2}The controllability Gramian of a controllable and asymptotically stable system is symmetric and positive definite:
ControllabilityGramian[StateSpaceModel[{{{-3, 0}, {0, -5}}, {{-1}, {-1}}}, SamplingPeriod -> None,
SystemsModelLabels -> None]]SymmetricMatrixQ[%] && PositiveDefiniteMatrixQ[%]The controllability Gramians of asymptotically stable systems satisfy the corresponding Lyapunov equations:
ssm = StateSpaceModel[{{{-0.5, 0}, {0, -1}}, {{0.5}, {1}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];{Subscript[a, c], Subscript[b, c]} = Normal[ssm][[1 ;; 2]];Chop[ControllabilityGramian[ssm] -
LyapunovSolve[Subscript[a, c], -Subscript[b, c].Subscript[b, c]]]Subscript[ssm, 1] = StateSpaceModel[{{{0.85, -0.56, 0.22}, {0.2, 0.11, 1}, {-0.25, 0.5, 0}}, {{1}, {0}, {0}}},
SamplingPeriod -> 0.1, SystemsModelLabels -> None];{Subscript[a, d], Subscript[b, d]} = Normal[Subscript[ssm, 1]][[1 ;; 2]];Chop[ControllabilityGramian[Subscript[ssm, 1]] - DiscreteLyapunovSolve[Subscript[a, d], -Subscript[b, d].Subscript[b, d]]]The controllability Gramian is the observability Gramian of the dual system:
ssm = StateSpaceModel[{{{-1, -1}, {1, -1}}, {{1}, {0}}, {{1, 0}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];ControllabilityGramian[ssm] == ObservabilityGramian[DualSystemsModel[ssm]]A descriptor state-space model gives two Gramians:
Subscript[ssm, 1] = StateSpaceModel[{{{1, 0, 0}, {0, -3, 0}, {0, 0, -2}}, {{0}, {1}, {0}}, {{1, 3, -2}}, {{0}},
{{0, 0, 0}, {0, 3, 0}, {1, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];
gramians = ControllabilityGramian[Subscript[ssm, 1]];The systems is completely controllable if and only if the sum is positive definite:
PositiveDefiniteMatrixQ[Plus@@gramians]ControllableModelQ[Subscript[ssm, 1]]Subscript[ssm, 2] = StateSpaceModel[{{{1, 0, 0}, {0, -3, 0}, {0, 0, -2}}, {{1}, {1}, {0}}, {{1, 3, -2}}, {{0}},
{{0, 0, 0}, {0, 3, 0}, {1, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];PositiveDefiniteMatrixQ[Plus@@ControllabilityGramian[Subscript[ssm, 2]]]ControllableModelQ[Subscript[ssm, 2]]The fast and slow subsystem Gramians are computed from the Kronecker decomposition:
ssm = StateSpaceModel[{{{-1, 0, 0}, {0, -1, 1}, {0, 0, 1}}, {{1}, {0}, {5}}, {{1, 1, 1}}, {{0}},
{{1, 0, 0}, {0, 0, 1}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];{{p, q}, kssm} = KroneckerModelDecomposition[ssm]{slowssm, fastssm} = {SystemsModelExtract[kssm, All, All, 1], SystemsModelExtract[kssm, All, All, {2, 3}]}The slow subsystem yields a Gramian for the slow states and a zero matrix:
{slowgramian, zeromat} = ControllabilityGramian[slowssm]The fast subsystem yields a Gramian for the fast states and a zero matrix:
{zeromat, fastgramian} = ControllabilityGramian[fastssm]Inversing the Kronecker transformation gives the Gramians for the original system:
Inverse[p].PadRight[slowgramian, {3, 3}].Inverse[p]//MatrixFormInverse[p].PadLeft[fastgramian, {3, 3}].Inverse[p]//MatrixFormThis gives the same result as using ControllabilityGramian directly:
MatrixForm /@ ControllabilityGramian[ssm]Related Guides
Text
Wolfram Research (2010), ControllabilityGramian, Wolfram Language function, https://reference.wolfram.com/language/ref/ControllabilityGramian.html (updated 2012).
CMS
Wolfram Language. 2010. "ControllabilityGramian." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ControllabilityGramian.html.
APA
Wolfram Language. (2010). ControllabilityGramian. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ControllabilityGramian.html
BibTeX
@misc{reference.wolfram_2026_controllabilitygramian, author="Wolfram Research", title="{ControllabilityGramian}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ControllabilityGramian.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_controllabilitygramian, organization={Wolfram Research}, title={ControllabilityGramian}, year={2012}, url={https://reference.wolfram.com/language/ref/ControllabilityGramian.html}, note=[Accessed: 13-June-2026]}