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

continuous-time system 
discrete-time system - The observability 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, ObservabilityGramian returns a pair of matrices {wos,wof}, where wos is associated with the slow subsystem, and wof is associated with the fast subsystem.
- The observability Gramians only exist for descriptor systems in which Det[λ e-a]≠0 for some λ.
Examples
open all close allBasic Examples (1)
Scope (4)
The observability Gramian of a continuous-time system:
ObservabilityGramian[StateSpaceModel[{{{-0.5, -0.5, 0}, {0.5, -0.5, 0}, {0, 0, -1}}, {{0}, {0}, {1}}, {{1, 2, 1}},
{{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]]The observability Gramian of a discrete-time system:
ObservabilityGramian[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 -> 5, SystemsModelLabels -> None]]The observability Gramian of a symbolic system:
ObservabilityGramian[StateSpaceModel[{{{-a, 0}, {0, -a}}, {{1}, {1}}, {{1, 1}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None]];
FunctionExpand[%, a∈Reals]The observability Gramian of a descriptor system:
ObservabilityGramian[StateSpaceModel[{{{-3, 0, 0}, {0, 1, 0}, {0, 0, 1}}, {{1}, {0}, {2}}, {{1, 4, 0}}, {{0}},
{{1, 0, 0}, {0, 0, 1}, {0, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]]Applications (1)
Properties & Relations (7)
The observability Gramian is the controllability Gramian of the dual system:
ssm = StateSpaceModel[{{{-5, -0.9, 0}, {0.9, -5, 0}, {0, 0, -3}}, {{1}, {0}, {-1}}, {{1, 0, -1}}, {{0}}},
SamplingPeriod -> None, SystemsModelLabels -> None];
ObservabilityGramian[ssm] == ControllabilityGramian[DualSystemsModel[ssm]]The observability Gramian has the dimension of the state matrix:
Dimensions@ObservabilityGramian[StateSpaceModel[{{{0, 1}, {-Subscript[a, 2], -Subscript[a, 1]}},
{{0}, {1}}, {{1, 0}}, {{0}}}, SamplingPeriod -> None, SystemsModelLabels -> None]]If the observability Gramian has full rank, the system is observable:
ssm = StateSpaceModel[{{{-1, 0}, {0, -4}}, {{1}, {3}}, {{1, 0}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None];
{ObservableModelQ[ssm], MatrixRank[ObservabilityGramian[ssm]] == 2}The observability Gramian of an observable and asymptotically stable system is symmetric and positive definite:
ObservabilityGramian[StateSpaceModel[{{{-3, 0}, {0, -2}}, {{1}, {-1}}, {{1, 1}}, {{0}}}, SamplingPeriod -> None,
SystemsModelLabels -> None]];
SymmetricMatrixQ[%] && PositiveDefiniteMatrixQ[%]The observability Gramian of a continuous-time (discrete-time) system satisfies a continuous (discrete) Lyapunov equation:
{aa, bb, cc} = {{{-3, 1}, {-5, 0}}, {{1}, {5}}, {{1, 0}}};
ssm = StateSpaceModel[{aa, bb, cc}];Chop[ObservabilityGramian[ssm] - LyapunovSolve[aa, -cc.cc]]{aa, bb, cc} = {{{0, 1, 0}, {0, 0, 1}, {0.1054, -1.0183, 1.9052}},
{{0}, {0}, {1}}, {{0.002664, 0.01983, 0.0080859}}};
ssm = StateSpaceModel[{aa, bb, cc}, SamplingPeriod -> 1];Chop[ObservabilityGramian[ssm] - DiscreteLyapunovSolve[aa, -cc.cc]]Descriptor systems give two observability Gramians:
Subscript[ssm, 1] = StateSpaceModel[{{{1, 0, 0}, {0, -3, 0}, {0, 0, -2}}, {{0}, {1}, {0}}, {{1, 3, 0}}, {{0}},
{{0, 0, 0}, {0, 3, 0}, {1, 0, 0}}}, SamplingPeriod -> None, SystemsModelLabels -> None];
gramians = ObservabilityGramian[Subscript[ssm, 1]];The system is completely observable if and only if the sum is positive definite:
PositiveDefiniteMatrixQ[Plus@@gramians]ObservableModelQ[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@@ObservabilityGramian[Subscript[ssm, 2]]]ObservableModelQ[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}, {1}, {1}}, {{1, 2, 5}}, {{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} = ObservabilityGramian[slowssm]The fast subsystem yields a Gramian for the fast states and a zero matrix:
{zeromat, fastgramian} = ObservabilityGramian[fastssm]Inversing the Kronecker transformation gives the Gramians for the original system:
Inverse[p].PadRight[slowgramian, {3, 3}].Inverse[p]Inverse[p].PadLeft[fastgramian, {3, 3}].Inverse[p]This gives the same result as using ObservabilityGramian directly:
ObservabilityGramian[ssm]Possible Issues (1)
Related Guides
Text
Wolfram Research (2010), ObservabilityGramian, Wolfram Language function, https://reference.wolfram.com/language/ref/ObservabilityGramian.html (updated 2012).
CMS
Wolfram Language. 2010. "ObservabilityGramian." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/ObservabilityGramian.html.
APA
Wolfram Language. (2010). ObservabilityGramian. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ObservabilityGramian.html
BibTeX
@misc{reference.wolfram_2026_observabilitygramian, author="Wolfram Research", title="{ObservabilityGramian}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/ObservabilityGramian.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_observabilitygramian, organization={Wolfram Research}, title={ObservabilityGramian}, year={2012}, url={https://reference.wolfram.com/language/ref/ObservabilityGramian.html}, note=[Accessed: 12-June-2026]}