control.similarity_transformļƒ

control.similarity_transform(xsys, T, timescale=1, inverse=False)[source]ļƒ

Similarity transformation, with optional time rescaling.

Transform a linear state space system to a new state space representation z = T x, or x = T z, where T is an invertible matrix.

Parameters
xsysStateSpace object

System to transform.

T(M, M) array_like

The matrix T defines the new set of coordinates z = T x.

timescalefloat, optional

If present, also rescale the time unit to tau = timescale * t.

inversebool, optional

If False (default), transform so z = T x. If True, transform so x = T z.

Returns
zsysStateSpace object

System in transformed coordinates, with state ā€˜zā€™.

See also

canonical_form

Examples

>>> Gs = ct.tf2ss([1], [1, 3, 2])
>>> Gs.A
array([[-3., -2.],
       [ 1.,  0.]])
>>> T = np.array([[0, 1], [1, 0]])
>>> Gt = ct.similarity_transform(Gs, T)
>>> Gt.A
array([[ 0.,  1.],
       [-2., -3.]])