OKID¶
OKID function. (Book: Applied System Identification, Jer-Nan Juang, 1994)
-
modred.okid.
OKID
(inputs, outputs, num_Markovs)[source]¶ Approximates Markov paramters using arbitrary input and output data.
- Args:
inputs
: Array of input signals. Each row corresponds to a different input, each each column to a different time.outputs
: Array of output signals. Each row corresponds to a different output, each each column to a different time.num_Markovs
: Number of Markov parameters to estimate.- Returns:
Markovs_est
: Array of Markov paramemters. Array dimensions correspond to times, outputs, and inputs, respectively. ThusMarkovs_est[ti]
is the Markov parameter at time indexti
.
OKID can be sensitive to the choice of parameters. A few tips:
- Use a tail (input=0) for your input/output data, otherwise the Markov parameters might grow rather than decay at large times.
- If necessary, artificially append your data with zero input and exponentially decaying output.
- Set
num_Markovs
less than or equal to half of the number of samples (). Estimating too many Markov parameters can produce spurious oscillations. - Data with more than one input tends to be harder to work with.