ss(A, B, C, D[, dt])¶
Create a state space system.
The function accepts either 1, 4 or 5 parameters:
Convert a linear system into space system form. Always creates a new system, even if sys is already a StateSpace object.
ss(A, B, C, D)
Create a state space system from the matrices of its state and output equations:
ss(A, B, C, D, dt)
Create a discrete-time state space system from the matrices of its state and output equations:
The matrices can be given as array like data types or strings. Everything that the constructor of
numpy.matrixaccepts is permissible here too.
out – The new linear system
- Return type
ValueError – if matrix sizes are not self-consistent
>>> # Create a StateSpace object from four "matrices". >>> sys1 = ss("1. -2; 3. -4", "5.; 7", "6. 8", "9.")
>>> # Convert a TransferFunction to a StateSpace object. >>> sys_tf = tf([2.], [1., 3]) >>> sys2 = ss(sys_tf)