Main Content

minreal

Minimal realization or pole-zero cancellation

Description

msys = minreal(sys) eliminates uncontrollable or unobservable state in state-space models, or cancels pole-zero pairs in transfer functions or zero-pole-gain models. The output msys has minimal order and the same response characteristics as the original model sys.

example

msys = minreal(sys,tol) specifies the tolerance used for state elimination or pole-zero cancellation. The default value is tol = sqrt(eps) and increasing this tolerance forces additional cancellations.

[msys,U] = minreal(___) also returns, for state-space model sys, an orthogonal matrix U such that (UAUT,UB,CUT) is a Kalman decomposition of (A,B,C).

example

Examples

collapse all

This example shows how to compute a minimal realization of a zero-pole-gain model.

For this example, consider the following commands which produce a nonminimal zero-pole-gain model cloop.

g = zpk([],1,1);
h = tf([2 1],[1 0]);
cloop = inv(1+g*h) * g
cloop =
 
        s (s-1)
  -------------------
  (s-1) (s^2 + s + 1)
 
Continuous-time zero/pole/gain model.

To cancel the pole-zero pair at s=1, use the minreal function.

cloopmin = minreal(cloop)
cloopmin =
 
        s
  -------------
  (s^2 + s + 1)
 
Continuous-time zero/pole/gain model.

This example shows how to compute a minimal realization of a state-space model.

For this example, consider a 25-state SISO model. Load the model.

load('reduce.mat','gasf35unst');
size(gasf35unst)
State-space model with 1 outputs, 1 inputs, and 25 states.

To compute the minimal realization, use the minreal function.

[msys,U] = minreal(gasf35unst);
11 states removed.

This syntax returns a state-space model msys, along with an orthogonal matrix U, which is used for computing the Kalman decomposition. This decomposition determines the uncontrollable and unobservable states of the original state-space model. Then, to compute the minimal realization, minreal eliminates these uncontrollable or unobservable states. By default, the function removes 11 states for this model. To force eliminate additional states that are near uncontrollable or unobservable, you can increase the tolerance.

Increase the tolerance by 100 times the default value.

tol = sqrt(eps)*100;
[msys2,U2] = minreal(gasf35unst,tol);
16 states removed.

The function now removes five additional states.

Input Arguments

collapse all

Dynamic system model to simplify, specified as one of the following.

  • Continuous-time or discrete-time numeric models, such as ss, tf, or zpk models.

  • Generalized or uncertain state-space models, such as genss or uss (Robust Control Toolbox) models. (Using uncertain models requires Robust Control Toolbox™ software.)

    For such models, the software computes the minimal realization of the numeric portion of the model. For more information about decomposition of these models, see getLFTModel and Internal Structure of Generalized Models.

  • Identified state-space idss (System Identification Toolbox) models. (Using identified models requires System Identification Toolbox™ software.)

  • Array of dynamic system models.

Tolerance for pole-zero cancellation or state elimination, specified as a positive real scalar value.

Output Arguments

collapse all

Simplified model, returned as a model of same type as sys.

Orthogonal matrix, returned as a matrix. When sys is a state-space model, U is an Nx-by-Nx matrix, where Nx is the number of states in sys. For transfer function and zero-pole-gain models, the function returns U as an empty matrix [].

Algorithms

Pole-zero cancellation is a straightforward search through the poles and zeros looking for matches that are within tolerance. Transfer functions are first converted to zero-pole-gain form.

Alternative Functionality

Command Line

reducespec

Live Editor Task

Reduce Model Order

Version History

Introduced before R2006a