# cupyx.scipy.signal.StateSpace#

class cupyx.scipy.signal.StateSpace(*system, **kwargs)[source]#

Linear Time Invariant system in state-space form.

Represents the system as the continuous-time, first order differential equation $$\dot{x} = A x + B u$$ or the discrete-time difference equation $$x[k+1] = A x[k] + B u[k]$$. StateSpace systems inherit additional functionality from the lti, respectively the dlti classes, depending on which system representation is used.

Parameters:
• *system (arguments) –

The StateSpace class can be instantiated with 1 or 4 arguments. The following gives the number of input arguments and their interpretation:

• 1: lti or dlti system: (StateSpace, TransferFunction or ZerosPolesGain)

• 4: array_like: (A, B, C, D)

• dt (float, optional) – Sampling time [s] of the discrete-time systems. Defaults to None (continuous-time). Must be specified as a keyword argument, for example, dt=0.1.

Notes

Changing the value of properties that are not part of the StateSpace system representation (such as zeros or poles) is very inefficient and may lead to numerical inaccuracies. It is better to convert to the specific system representation first. For example, call sys = sys.to_zpk() before accessing/changing the zeros, poles or gain.

Methods

to_ss()[source]#

Return a copy of the current StateSpace system.

Returns:

sys – The current system (copy)

Return type:

instance of StateSpace

to_tf(**kwargs)[source]#

Convert system representation to TransferFunction.

Parameters:

kwargs (dict, optional) – Additional keywords passed to ss2zpk

Returns:

sys – Transfer function of the current system

Return type:

instance of TransferFunction

to_zpk(**kwargs)[source]#

Convert system representation to ZerosPolesGain.

Parameters:

kwargs (dict, optional) – Additional keywords passed to ss2zpk

Returns:

sys – Zeros, poles, gain representation of the current system

Return type:

instance of ZerosPolesGain

__eq__(value, /)#

Return self==value.

__ne__(value, /)#

Return self!=value.

__lt__(value, /)#

Return self<value.

__le__(value, /)#

Return self<=value.

__gt__(value, /)#

Return self>value.

__ge__(value, /)#

Return self>=value.

Attributes

A#

State matrix of the StateSpace system.

B#

Input matrix of the StateSpace system.

C#

Output matrix of the StateSpace system.

D#

Feedthrough matrix of the StateSpace system.

dt#

Return the sampling time of the system, None for lti systems.

poles#

Poles of the system.

zeros#

Zeros of the system.