7.2 Controllability and Observability Constructs
The controllability matrix of a linear system is defined as
and can be obtained with ControllabilityMatrix. The output controllability matrix,
can be found with OutputControllabilityMatrix. The observability matrix,
is obtainable with ObservabilityMatrix.
Finding controllability and observability matrices.
This is a simple test system.
This is its controllability matrix.
Clearly, this is not a full-rank matrix and, therefore, the system is not completely controllable.
We can come to this conclusion directly.
This is the observability matrix for the system.
This is a full-rank matrix, so the system is completely observable.
Again, we can come to this conclusion directly.
Equally important in controllability and observability studies are the corresponding Gramians, which may be defined as (see, e.g., Moore (1981))
(the controllability Gramian) and
(the observability Gramian). Examples of using the Gramians can be found later in Section 8.4.
Finding controllability and observability Gramians.
This is a mixing tank system (described in Section 10.1).
Here is its controllability Gramian.
ControllabilityGramian and ObservabilityGramian rely on the function LyapunovSolve (see Section 12.2) to solve Lyapunov equations regarding and :
Consequently, these functions accept the same options as LyapunovSolve does. For discrete-time systems, ControllabilityGramian and ObservabilityGramian call DiscreteLyapunovSolve appropriately.
The Gramian functions sometimes must reconstruct the full orthogonal basis of the vector space given a few orthogonal vectors belonging to the basis—a problem that may have more than one solution. In such cases, the choice between equivalent vectors can be made randomly. You may enable this feature by setting the option RandomOrthogonalComplement to True. The same mechanism is used by several other functions, for example, Kalman transform functions and the KNVD algorithm in StateFeedbackGains. To have them all utilize the randomized algorithm, you may change the global variable $RandomOrthogonalComplement to True. Of course, reseeding the random number generator with some number (using the Mathematica built-in function SeedRandom), while employing the randomized algorithm, provides a random, yet reproducible solution.
Enabling the random choice between equivalent orthogonal vectors.