| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → System Identification Toolbox |
| Contents | Index |
| Learn more about System Identification Toolbox |
| On this page… |
|---|
Definition of AR and ARMA Models |
For a single-output signal y(t), the AR model is given by the following equation:
![]()
The AR model is a special case of the ARX model with no input.
The ARMA model for a single-output time-series is given by the following equation:
![]()
The ARMA structure reduces to the AR structure for C(q)=1. The ARMA model is a special case of the ARMAX model with no input.
For more information about polynomial models, see What Are Black-Box Polynomial Models?.
Before you begin, you must have accomplished the following:
Prepared the data, as described in Preparing Time-Series Data
Estimated model order, as described in Preliminary Step – Estimating Model Orders and Input Delays
(Multiple-output AR models only) Specified the model-order matrix in the MATLAB workspace before estimation, as described in Options for Multiple-Input and Multiple-Output ARX Orders
To estimate AR and ARMA models using the System Identification Tool GUI:
In the System Identification Tool GUI, select Estimate > Linear parametric models to open the Linear Parametric Models dialog box.
In the Structure list, select the polynomial model structure you want to estimate from the following options:
AR:[na]
ARMA:[na nc]
This action updates the options in the Linear Parametric Models dialog box to correspond with this model structure. For information about each model structure, see Definition of AR and ARMA Models.
In the Orders field, specify the model orders, as follows:
For single-output models. Enter the model orders according to the sequence displayed in the Structure field.
For multiple-output ARX models. (AR models only) Enter the model orders directly, as described in Options for Multiple-Input and Multiple-Output ARX Orders. Alternatively, enter the name of the matrix NA in the MATLAB Workspace browser that stores model orders, which is Ny-by-Ny.
(AR models only) Select the estimation Method as ARX or IV (instrumental variable method). For more information about these methods, see Algorithms for Estimating Polynomial Models.
In the Name field, edit the name of the model or keep the default. The name of the model should be unique in the Model Board.
In the Initial state list, specify how you want the algorithm to treat initial states. For more information about the available options, see Options for Initial States.
In the Covariance list, select Estimate if you want the algorithm to compute parameter uncertainties. Effects of such uncertainties are displayed on plots as model confidence regions.
To omit estimating uncertainty, select None. Skipping uncertainty computation might reduce computation time for complex models and large data sets.
(ARMA only) To view the estimation progress at the command line, select the Trace check box. During estimation, the following information is displayed for each iteration:
Loss function — Equals the determinant of the estimated covariance matrix of the input noise.
Parameter values — Values of the model structure coefficients you specified.
Search direction — Changes in parameter values from the previous iteration.
Fit improvements — Shows the actual versus expected improvements in the fit.
Click Estimate to add this model to the Model Board in the System Identification Tool GUI.
(Prediction-error method only) To stop the search and save the results after the current iteration has been completed, click Stop Iterations. To continue iterations from the current model, click the Continue iter button to assign current parameter values as initial guesses for the next search.
To plot the model, select the appropriate check box in the Model Views area of the System Identification Tool GUI. For more information about validating models, see Model Analysis.
You can export the model to the MATLAB workspace for further analysis by dragging it to the To Workspace rectangle in the System Identification Tool GUI.
You can estimate AR and ARMA models at the command line. For single-output time-series, the resulting models are idpoly model objects. For multiple-output time-series, the resulting models are idarx model objects. For more information about models objects, see Creating Model Structures at the Command Line.
The following table summarizes the commands and specifies whether single-output or multiple-output models are supported.
Commands for Estimating Polynomial Time-Series Models
| Method Name | Description | Supported Data |
|---|---|---|
| ar | Noniterative, least-squares method to estimate linear, discrete-time single-output AR models. | Time-domain, time-series iddata data object. |
| armax | Iterative prediction-error method to estimate linear, single-output ARMAX models. | Time-domain, time-series iddata data object. |
| arx | Noniterative, least-squares method for estimating single-output and multiple-output linear AR models. | Supports time- and frequency-domain time-series iddata data. |
| ivar | Noniterative, instrumental variable method for estimating single-output AR models. | Supports time-domain, time-series iddata data. |
The following code shows usage examples for estimating AR models:
% For scalar signals m = ar(y,na) % For multiple-output vector signals m = arx(y,na) % Instrumental variable method m = ivar(y,na) % For ARMA, do not need to specify nb and nk th = armax(y,[na nc])
The ar command provides additional options to let you choose the algorithm for computing the least-squares from a group of several popular techniques from the following methods:
Burg (geometric lattice)
Yule-Walker
Covariance
For more information about validating models, see Overview of Model Validation and Plots.
![]() | Estimating Time-Series Power Spectra | Estimating State-Space Time-Series Models | ![]() |

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 |