control.balanced_reduction

control.balanced_reduction(sys, orders, method='truncate', alpha=None)[source]

Balanced reduced order model of system of a given order.

States are eliminated based on Hankel singular value. If sys has unstable modes, they are removed, the balanced realization is done on the stable part, then reinserted in accordance with [1].

Parameters
sysStateSpace

Original system to reduce.

ordersinteger or array of integer

Desired order of reduced order model (if a vector, returns a vector of systems).

methodstring

Method of removing states, either ‘truncate’ or ‘matchdc’.

alphafloat

Redefines the stability boundary for eigenvalues of the system matrix A. By default for continuous-time systems, alpha <= 0 defines the stability boundary for the real part of A’s eigenvalues and for discrete-time systems, 0 <= alpha <= 1 defines the stability boundary for the modulus of A’s eigenvalues. See SLICOT routines AB09MD and AB09ND for more information.

Returns
rsysStateSpace

A reduced order model or a list of reduced order models if orders is a list.

Raises
ValueError

If method is not ‘truncate’ or ‘matchdc’.

ImportError

If slycot routine ab09ad, ab09md, or ab09nd is not found.

ValueError

If there are more unstable modes than any value in orders.

References

1

C. S. Hsu and D. Hou, “Reducing unstable linear control systems via real Schur transformation”. Electronics Letters, 27, 984-986, 1991.

Examples

>>> G = ct.rss(4)
>>> Gr = ct.balred(G, orders=2, method='matchdc')
>>> Gr.nstates
2