AR model estimation using instrumental variable method
An AR model is represented by the equation:
In the above model, e(t) is an arbitrary process,
assumed to be a moving average process of order
nc, and possibly time
varying. The function assumes that
nc is equal to
na. Instruments are chosen as appropriately filtered outputs, delayed
Estimate AR model Using Instrumental Variable Method
Construct output data by combining sinusoidal signals and noise.
y = iddata(sin([1:500]'*1.2) + sin([1:500]'*1.5) + 0.2*randn(500,1),); plot(y)
Estimate fourth-order models using the IV method (
ivar) and the forward-backward least-squares method (
sysiv = ivar(y,4); sysls = ar(y,4);
Compare the spectra of the two models.
The model estimated with
ivar exhibits the two distinct spectral peaks. The model estimated with
ar exhibits only one peak.
data — Time-series data
Time-series data, specified as an
iddata object that contains a single output channel and an empty input
na — Order of A polynomial
Order of the A polynomial, specified as a positive integer.
nc — Order of moving average process
Order of the moving average process that represents e(t), specified as a positive integer.
max_size — Maximum matrix size
250000 | positive integer
Maximum matrix size for any matrix formed by the algorithm for estimation, specified
as a positive integer. Specify
max_size as a reasonably large
sys — Identified polynomial model
Identified polynomial model, returned as a discrete-time
idpoly model object.
Information about the estimation results and options used is stored in the
Report property of the model.
Report has the
Summary of the model status, which indicates whether the model was created by construction or obtained by estimation.
Estimation command used.
Handling of initial conditions during model estimation, returned as one of the following values:
This field is especially useful to view
how the initial conditions were handled when the
Quantitative assessment of the estimation, returned as a structure. See Loss Function and Model Quality Metrics for more information on these quality metrics. The structure has the following fields:
Estimated values of model parameters.
Attributes of the data used for estimation, returned as a structure with the following fields.
For more information on using
Report, see Estimation Report.
 Stoica, P., T. Soderstrom, and B. Friedlander. Optimal Instrumental Variable Estimates of the AR Parameters of an ARMA Process. IEEE Transactions on Automatic Control 30, no. 11 (November 1985): 1066–74, https://doi.org/10.1109/TAC.1985.1103839.
Introduced before R2006a