| Contents | Index |
m = ar(y,n)
[m,ref1]
= ar(y,n,approach,window)
m= ar(y,n,Name,Value)
m= ar(y,n,___,opt)
m = ar(y,n) returns an idpoly model m.
[m,ref1] = ar(y,n,approach,window) returns an idpoly model m and the variable refl. For the two lattice-based approaches, 'burg' and 'gl', refl stores the reflection coefficients in the first row, and the corresponding loss function values in the second row. The first column of refl is the zeroth-order model, and the (2,1) element of refl is the norm of the time series itself.
m= ar(y,n,Name,Value) specifies model structure attributes using one or more Name,Value pair arguments.
m= ar(y,n,___,opt) specifies the estimations options using opt.
y |
iddata object that contains the time-series data (one output channel). |
n |
Scalar that specifies the order of the model you want to estimate (the number of A parameters in the AR model). |
approach |
One of the following text strings, specifying the algorithm for computing the least squares AR model:
|
window |
One of the following text strings, specifying how to use information about the data outside the measured time interval (past and future values):
|
opt |
Estimation options. opt is an options set that specifies the following:
Use arOptions to create the options set. |
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
Given a sinusoidal signal with noise, compare the spectral estimates of Burg's method with those found from the forward-backward approach and no-windowing method on a Bode plot.
y = sin([1:300]') + 0.5*randn(300,1); y = iddata(y); mb = ar(y,4,'burg'); mfb = ar(y,4); bode(mb,mfb)
Estimate an ARI model.
load iddata9 z9 Ts = z9.Ts; y = cumsum(z9.y); model = ar(y, 4, 'ls', 'Ts', Ts, 'IntegrateNoise', true) compare(y,model,5) % 5 step ahead prediction
Use option set to choose 'ls' estimation approach and to specify that covariance matrix should not be estimated.
y = rand(100,1);
opt = arOptions('Approach', 'ls', 'EstCovar', false);
model = ar(y, N, opt);
The AR model structure is given by the following equation:
![]()
AR model parameters are estimated using variants of the least-squares method. The following table summarizes the common names for methods with a specific combination of approach and window argument values.
| Method | Approach and Windowing |
|---|---|
| Modified Covariance Method | (Default) Forward-backward approach and no windowing. |
| Correlation Method | Yule-Walker approach, which corresponds to least squares plus pre- and postwindowing. |
| Covariance Method | Least squares approach with no windowing. arx uses this routine. |
Marple, Jr., S.L., Digital Spectral Analysis with Applications, Prentice Hall, Englewood Cliffs, 1987, Chapter 8.
arOptions | arx | etfe | forecast | idpoly | ivar | pem | spa

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 |