This is documentation for an old release of SciPy (version 0.17.1). Read this page in the documentation of the latest stable release (version 1.15.1).
scipy.signal.tf2ss¶
- scipy.signal.tf2ss(num, den)[source]¶
Transfer function to state-space representation.
Parameters: num, den : array_like
Sequences representing the numerator and denominator polynomials. The denominator needs to be at least as long as the numerator.
Returns: A, B, C, D : ndarray
State space representation of the system, in controller canonical form.
Examples
Convert the transfer function:
H(s)=s2+3s+3s2+2s+1>>> num = [1, 3, 3] >>> den = [1, 2, 1]
to the state-space representation:
˙x(t)=[−2−110]x(t)+[10]u(t)y(t)=[12]x(t)+[1]u(t)>>> from scipy.signal import tf2ss >>> A, B, C, D = tf2ss(num, den) >>> A array([[-2., -1.], [ 1., 0.]]) >>> B array([[ 1.], [ 0.]]) >>> C array([[ 1., 2.]]) >>> D array([ 1.])