control.gram

control.gram(sys, type)

Gramian (controllability or observability)

Parameters:

sys: StateSpace

State-space system to compute Gramian for

type: String

Type of desired computation. type is either ‘c’ (controllability) or ‘o’ (observability).

Returns:

gram: array

Gramian of system

Raises:

ValueError

  • if system is not instance of StateSpace class
  • if type is not ‘c’ or ‘o’
  • if system is unstable (sys.A has eigenvalues not in left half plane)

ImportError

if slycot routin sb03md cannot be found

Examples

>>> Wc = gram(sys,'c')
>>> Wo = gram(sys,'o')