control.markov
- control.markov(Y, U[, m])[source]
Calculate Markov parameters [D CB CAB …] from data.
This function computes the the first
m
Markov parameters [D CB CAB …] for a discrete-time system.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 aTimeResponseData
object,YY
is a 1D or 3D array, and r is an integer.- Parameters
- Yarray_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 ofY
are taken as time points, otherwise the rows ofY
are taken as time points.- Uarray_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.
- mint, optional
Number of Markov parameters to output. Defaults to len(U).
- dtTrue 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.- truncatebool, optional
Do not use first m equation for least squares. Default is False.
- transposebool, optional
Assume that input data is transposed relative to the standard Time series data conventions. For
TimeResponseData
this parameter is ignored. Default is False.
- Returns
- Hndarray
First m Markov parameters, [D CB CAB …].
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. https://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)