Realizations

Internally Balanced Realizations

The Kalman minimal realization algorithm may result in structurally unstable models. In such cases another model reduction technique, based on the internally balanced realization, may be applied. The controllable and observable realization is said to be internally balanced if its controllability and observability Gramians are represented by the same (positive definite) diagonal matrix. InternallyBalancedForm attempts to construct such a realization.

Finding the internally balanced form.

Load the application.

<< ControlSystems`

Consider a SISO system in its controllable canonical form. Evidently, the realization is poorly balanced.

original = 
      StateSpace[{{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 
              1}, {-50, -79, -33, -5}}, {{0}, {0}, {0}, {1}}, {{50, 15, 1, 0}}] // N

This finds the internally balanced realization.

balanced = InternallyBalancedForm[%]

We can verify that the realization has equal and diagonal controllability and observability Gramians.

ControllabilityGramian[%] // Chop

ObservabilityGramian[%%] // Chop

Finally, we can see that the two forms are in fact different realizations of the same transfer function.

TransferFunction[s, original] // ExpandRational // Chop

TransferFunction[s, balanced] // ExpandRational // Chop

Dominant Subsystem

The controllability and observability Gramians in the example in the preceding section reveal the modes that are relatively small and, therefore, contribute little to the input-output characteristic. This suggests a way of reducing the order of the system by eliminating these weak modes.
Schematically, the system breaks up into dominant and weak subsystems connected as shown in Figure 1. DominantSubsystem can be used to select the dominant part.

Model reduction by selection of the dominant subsystem.

A reduced-order model of the system original can be found by selecting the dominant subsystem.

reduced = DominantSubsystem[original]

If the default value of RejectionLevel is not appropriate for the particular case, the user may find the internally balanced realization "manually" and then choose a suitable value for RejectionLevel.

Because we do have the internally balanced realization of the system original, we use it to find the second-order reduced model.

reduced2 = 
      DominantSubsystem[balanced, RejectionLevel ->  .2]

This creates the Bode plots for the three systems and displays them at once. The solid line is for the initial system, and the dashed and dashed-dotted ones are for the third- and second-order reduced models, respectively. Note that in the first plot we set up a plot range sufficient to display all three graphs, and in the second plot we tweak PlotPoints for the phase unwrapping mechanism to operate correctly.

DisplayTogetherGraphicsArray[
        BodePlot[original, PlotRange -> {All, {0, -600}}], 
        BodePlot[reduced, PlotStyle -> Dashing[{0.02}], 
          PlotPoints -> 75], 
        BodePlot[reduced2, 
          PlotStyle -> 
            Dashing[{0.05, 0.015, 0.005, 0.015}]]];

As we can see, in the reduced models the low-frequency behavior is preserved while the high-frequency (fast) states are eliminated.