control.similarity_transform
- control.similarity_transform(xsys, T, timescale=1, inverse=False)[source]
Perform a similarity transformation, with option 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
xsys (StateSpace object) – System to transform
T ((M, M) array_like) – The matrix T defines the new set of coordinates z = T x.
timescale (float, optional) – If present, also rescale the time unit to tau = timescale * t
inverse (bool, optional) – If True (default), transform so z = T x. If False, transform so x = T z.
- Returns
zsys – System in transformed coordinates, with state ‘z’
- Return type
StateSpace object
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.]])