| Contents | Index |
ir=cra(data)
[ir,R,cl]
= cra(data,M,na,plot)
ir=cra(data) estimates the impulse response for the time-domain data, data.
[ir,R,cl] = cra(data,M,na,plot) estimates correlation/covariance information, R, and the 99% confidence level for the impulse response, cl.
cra prewhitens the input sequence; that is, cra filters u through a filter chosen so that the result is as uncorrelated (white) as possible. The output y is subjected to the same filter, and then the covariance functions of the filtered y and u are computed and graphed. The cross correlation function between (prewhitened) input and output is also computed and graphed. Positive values of the lag variable then correspond to an influence from u to later values of y. In other words, significant correlation for negative lags is an indication of feedback from y to u in the data.
A properly scaled version of this correlation function is also an estimate of the system's impulse response ir. This is also graphed along with 99% confidence levels. The output argument ir is this impulse response estimate, so that its first entry corresponds to lag zero. (Negative lags are excluded in ir.) In the plot, the impulse response is scaled so that it corresponds to an impulse of height 1/T and duration T, where T is the sampling interval of the data.
Compare a second-order ARX model's impulse response with the one obtained by correlation analysis.
load iddata1
z=z1;
ir = cra(z);
m = arx(z,[2 2 1]);
imp = [1;zeros(20,1)];
irth = sim(m,imp);
subplot(211)
plot([ir irth])
title('impulse responses')
subplot(212)
plot([cumsum(ir),cumsum(irth)])
title('step responses')
An often better alternative to cra is the functions impulse and step, which use a high-order FIR model to estimate the impulse response.
covf | impulse | impulseest | spa | step

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |