control.matlab.markov

control.matlab.markov(Y, U[, m])[source]

Calculate the first m Markov parameters [D CB CAB …] from data.

This function computes the Markov parameters for a discrete time system

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

given data for u and y. The algorithm assumes that that C A^k B = 0 for k > m-2 (see [1]). Note that the problem is ill-posed if the length of the input data is less than the desired number of Markov parameters (a warning message is generated in this case).

The function can be called with either 1, 2 or 3 arguments:

  • H = markov(data)

  • H = markov(data, m)

  • H = markov(Y, U)

  • H = markov(Y, U, m)

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

Parameters
  • Y (array_like) – Output data. If the array is 1D, the system is assumed to be single input. If the array is 2D and transpose=False, the columns of Y are taken as time points, otherwise the rows of Y are taken as time points.

  • U (array_like) – Input data, arranged in the same way as Y.

  • data (TimeResponseData) – Response data from which the Markov parameters where estimated. Input and output data must be 1D or 2D array.

  • m (int, optional) – Number of Markov parameters to output. Defaults to len(U).

  • dt (True of 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 Markov parameters in order to match the unit-area impulse response of python-control. Default is True for array_like and dt=data.time[1]-data.time[0] for TimeResponseData as input.

  • truncate (bool, optional) – Do not use first m equation for least squares. Default is False.

  • 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

H – First m Markov parameters, [D CB CAB …].

Return type

ndarray

References

1

J.-N. Juang, M. Phan, L. G. Horta, and R. W. Longman, Identification of observer/Kalman filter Markov parameters - Theory and experiments. Journal of Guidance Control and Dynamics, 16(2), 320-329, 2012. http://doi.org/10.2514/3.21006

Examples

>>> T = np.linspace(0, 10, 100)
>>> U = np.ones((1, 100))
>>> T, Y = ct.forced_response(ct.tf([1], [1, 0.5], True), T, U)
>>> H = ct.markov(Y, U, 3, transpose=False)