control.matlab.modred

control.matlab.modred(sys, ELIM, method='matchdc')[source]

Model reduction of sys by eliminating the states in ELIM using a given method.

Parameters
  • sys (StateSpace) – Original system to reduce

  • ELIM (array) – Vector of states to eliminate

  • method (string) – Method of removing states in ELIM: either 'truncate' or 'matchdc'.

Returns

rsys – A reduced order model

Return type

StateSpace

Raises

ValueError

Raised under the following conditions:

  • if method is not either 'matchdc' or 'truncate'

  • if eigenvalues of sys.A are not all in left half plane (sys must be stable)

Examples

>>> G = ct.rss(4)
>>> Gr = ct.modred(G, [0, 2], method='matchdc')
>>> Gr.nstates
2