Products & Services Solutions Academia Support User Community Company

Learn more about System Identification Toolbox   

ar - Estimate parameters of AR model for scalar time series

Syntax

m = ar(y,n)
[m,refl] = ar(y,n,approach,window)
[m,refl] = ar(y,n,approach,window,'P1',V1,...,'PN',VN)

Arguments

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

Lets you choose the algorithm for computing the least squares AR model from the following options:

  • 'burg': Burg's lattice-based method. Solves the lattice filter equations using the harmonic mean of forward and backward squared prediction errors.

  • 'fb': (Default) Forward-backward approach. Minimizes the sum of a least- squares criterion for a forward model, and the analogous criterion for a time-reversed model.

  • 'gl': Geometric lattice approach. Similar to Burg's method, but uses the geometric mean instead of the harmonic mean during minimization.

  • 'ls': Least-squares approach. Minimizes the standard sum of squared forward-prediction errors.

  • 'yw': Yule-Walker approach. Solves the Yule-Walker equations, formed from sample covariances.

window

Lets you specify how to use information about the data outside the measured time interval (past and future values). The following windowing options are available:

  • 'now': (Default) No windowing. This value is the default except when the approach argument is 'yw'. Only measured data is used to form regression vectors. The summation in the criteria starts at the sample index equal to n+1.

  • 'pow': Postwindowing. Missing end values are replaced with zeros and the summation is extended to time N+n (N is the number of observations).

  • 'ppw': Pre- and postwindowing. Used in the Yule-Walker approach.

  • 'prw': Prewindowing. Missing past values are replaced with zeros so that the summation in the criteria can start at time equal to zero.

'P1',V1,...,'PN',VN

Pairs of property names and property values can include any of the following.

Property NameProperty ValueDescription
'Covariance'
  • 'None' Suppresses the calculation of the covariance matrix.

  • [ ]

    Empty.

  • Square matrix containing covariance values of size equal to the length of the parameter vector

Specifies calculation of uncertainties in parameter estimates.
'MaxSize'IntegerSee Algorithm Properties for the description.
'Ts'Real positive numberSets the sampling time and overrides the sampling time of y.

Description

m = ar(y,n) returns an idpoly model m.

[m,refl] = 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,refl] = ar(y,n,approach,window,'P1',V1,...,'PN',VN) returns an idpoly model m and the variable refl using additional windowing criteria.

Remarks

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.

MethodApproach and Windowing
Modified Covariance Method(Default) Forward-backward approach and no windowing.
Correlation MethodYule-Walker approach, which corresponds to least squares plus pre- and postwindowing.
Covariance MethodLeast squares approach with no windowing. arx uses this routine.

Examples

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)

References

Marple, Jr., S.L., Digital Spectral Analysis with Applications, Prentice Hall, Englewood Cliffs, 1987, Chapter 8.

See Also

Algorithm Properties 
arx 
EstimationInfo 
etfe 
idpoly 
ivar 
pem 
spa 
step 

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS