control.canonical_form

control.canonical_form(xsys, form='reachable')[source]

Convert a system into canonical form.

Parameters
  • xsys (StateSpace object) – System to be transformed, with state ‘x’

  • form (str) –

    Canonical form for transformation. Chosen from:
    • ’reachable’ - reachable canonical form

    • ’observable’ - observable canonical form

    • ’modal’ - modal canonical form

Returns

  • zsys (StateSpace object) – System in desired canonical form, with state ‘z’

  • T ((M, M) real ndarray) – Coordinate transformation matrix, z = T * x

Examples

>>> Gs = ct.tf2ss([1], [1, 3, 2])
>>> Gc, T = ct.canonical_form(Gs)  # default reachable
>>> Gc.B
array([[1.],
       [0.]])
>>> Gc, T = ct.canonical_form(Gs, 'observable')
>>> Gc.C
array([[1., 0.]])
>>> Gc, T = ct.canonical_form(Gs, 'modal')
>>> Gc.A                                                    
array([[-2.,  0.],
       [ 0., -1.]])