control.eigensys_realization

control.eigensys_realization(YY, r)[source]

Calculate ERA model of order r based on impulse-response data YY.

This function computes a discrete time system

x[k+1] &= A x[k] + B u[k] \\\\
y[k] &= C x[k] + D u[k]

for a given impulse-response data (see [1]).

The function can be called with 2 arguments:

  • sysd, S = eigensys_realization(data, r)

  • sysd, S = eigensys_realization(YY, r)

where data is a TimeResponseData object, YY is a 1D or 3D array, and r is an integer.

Parameters
  • YY (array_like) – Impulse response from which the StateSpace model is estimated, 1D or 3D array.

  • data (TimeResponseData) – Impulse response from which the StateSpace model is estimated.

  • r (integer) – Order of model.

  • m (integer, optional) – Number of rows in Hankel matrix. Default is 2*r.

  • n (integer, optional) – Number of columns in Hankel matrix. Default is 2*r.

  • dt (True or float, optional) – True indicates discrete time with unspecified sampling time and a positive float is discrete time with the specified sampling time. It can be used to scale the StateSpace model in order to match the unit-area impulse response of python-control. Default is True.

  • transpose (bool, optional) – Assume that input data is transposed relative to the standard Time series data. For TimeResponseData this parameter is ignored. Default is False.

Returns

  • sys (StateSpace) – A reduced order model sys=StateSpace(Ar,Br,Cr,Dr,dt).

  • S (array) – Singular values of Hankel matrix. Can be used to choose a good r value.

References

1

Samet Oymak and Necmiye Ozay, Non-asymptotic Identification of LTI Systems from a Single Trajectory. https://arxiv.org/abs/1806.05722

Examples

>>> T = np.linspace(0, 10, 100)
>>> _, YY = ct.impulse_response(ct.tf([1], [1, 0.5], True), T)
>>> sysd, _ = ct.eigensys_realization(YY, r=1)
>>> T = np.linspace(0, 10, 100)
>>> response = ct.impulse_response(ct.tf([1], [1, 0.5], True), T)
>>> sysd, _ = ct.eigensys_realization(response, r=1)