bundles / scipy 1.17.1 / scipy / signal / _lti_conversion / ss2tf
function
scipy.signal._lti_conversion:ss2tf
Signature
def ss2tf ( A , B , C , D , input = 0 ) Summary
State-space to transfer function.
Extended Summary
A, B, C, D defines a linear state-space system with p inputs, q outputs, and n state variables.
Parameters
A: array_likeState (or system) matrix of shape
(n, n)B: array_likeInput matrix of shape
(n, p)C: array_likeOutput matrix of shape
(q, n)D: array_likeFeedthrough (or feedforward) matrix of shape
(q, p)input: int, optionalFor multiple-input systems, the index of the input to use.
Returns
num: 2-D ndarrayNumerator(s) of the resulting transfer function(s). num has one row for each of the system's outputs. Each row is a sequence representation of the numerator polynomial.
den: 1-D ndarrayDenominator of the resulting transfer function(s). den is a sequence representation of the denominator polynomial.
Notes
Array API Standard Support
ss2tf has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ⛔ PyTorch ⛔ ⛔ JAX ⛔ ⛔ Dask ⛔ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
Convert the state-space representation: .. math:: \dot{\textbf{x}}(t) = \begin{bmatrix} -2 & -1 \\ 1 & 0 \end{bmatrix} \textbf{x}(t) + \begin{bmatrix} 1 \\ 0 \end{bmatrix} \textbf{u}(t) \\ \textbf{y}(t) = \begin{bmatrix} 1 & 2 \end{bmatrix} \textbf{x}(t) + \begin{bmatrix} 1 \end{bmatrix} \textbf{u}(t)A = [[-2, -1], [1, 0]] B = [[1], [0]] # 2-D column vector C = [[1, 2]] # 2-D row vector D = 1✓
from scipy.signal import ss2tf
✓ss2tf(A, B, C, D)
✗Aliases
-
scipy.signal.ss2tf