Nonlinear ARX models extend the linear ARX models to the nonlinear case. The structure of these models enables you to model complex nonlinear behavior using flexible nonlinear functions, such as wavelet and sigmoid networks. For information about when to fit nonlinear models, see About Identified Nonlinear Models.
A linear SISO ARX model has the following structure:
Where, u,y, and e are the input, output, and noise. This structure implies that the current output y(t) is predicted as a weighted sum of past output values and current and past input values. na is the number of past output terms, and nb is the number of past input terms used to predict the current output. The input delay nk is set to zero to simplify the notation. Rewriting the equation as a product gives:
where are delayed input and output variables, called regressors. The coefficients vector [–a1, ... ,bnb] represents the weighting applied to these regressors. The linear ARX model thus predicts the current output yp as a weighted sum of its regressors.
The structure of a nonlinear ARX model allows the following additional flexibility:
Instead of the weighted sum of the regressors that represents a linear mapping, the nonlinear ARX model has a more flexible nonlinear mapping function, F.
Inputs to F are model regressors. When you specify the nonlinear ARX model structure, you can choose one of several available nonlinear functions. For example, F can represent a weighted sum of wavelets that operate on the distance of the regressors from their means. For more information, see Available Mapping Functions for Nonlinear ARX Models.
Nonlinear ARX regressors can be both delayed input-output variables and more complex, nonlinear expressions of delayed input and output variables. Examples of such nonlinear regressors are y(t-1)2, u(t-1)*y(t-2), abs(u(t-1)), and max(u(t-1)*y(t-3),-10).
A nonlinear ARX model consists of model regressors and an output function. The output function includes linear and nonlinear functions that act on the model regressors to give the model output and a fixed offset for that output. This block diagram represents the structure of a nonlinear ARX model in a simulation scenario.
The software computes the nonlinear ARX model output y in two stages:
It computes regressor values from the current and past input values and the past output data.
In the simplest case, regressors are delayed inputs and outputs, such as
y(t–3). These kind of regressors are
called linear regressors. You specify linear regressors using
linearRegressor object. You can also specify linear regressors by
using linear ARX model orders as an input argument. For more information, see
Nonlinear ARX Model Orders and Delay. However, this second approach
constrains your regressor set to linear regressors with consecutive delays. To
create polynomial regressors, use the
polynomialRegressor object. You can also specify custom
regressors, which are nonlinear functions of delayed inputs and
outputs. For example,
is a custom regressor that multiplies instances of input and output together.
Specify custom regressors using the
You can assign any of the regressors as inputs to the linear function block of the output function, the nonlinear function block, or both.
It maps the regressors to the model output using an output function block. The output function block can include linear and nonlinear blocks in parallel. For example, consider the following equation:
Here, x is a vector of the regressors, and r is the mean of x. is the output of the linear function block. represents the output of the nonlinear function block. Q is a projection matrix that makes the calculations well-conditioned. d is a scalar offset that is added to the combined outputs of the linear and nonlinear blocks. The exact form of F(x) depends on your choice of output function. You can select from the available mapping objects, such as tree-partition networks, wavelet networks, and multilayer neural networks. You can also exclude either the linear or the nonlinear function block from the output function.
When estimating a nonlinear ARX model, the software computes the model parameter values, such as L, r, d, Q, and other parameters specifying g.
The resulting nonlinear ARX models are
idnlarx objects that store all model data, including model regressors and
parameters of the output function. For more information about these objects, see Nonlinear Model Structures.
Typically, you use nonlinear ARX models as black-box structures. The nonlinear
function of the nonlinear ARX model is a flexible nonlinearity estimator with
parameters that need not have physical significance. You can estimate nonlinear ARX
in the System Identification app or at the command
line using the
nlarx command. You can use uniformly
sampled time-domain input-output data or time-series data (no inputs) for estimating
nonlinear ARX models. Your data can have one or more input and output channels. You
cannot use frequency-domain data for estimation.
You can use the orders and delays of a nonlinear ARX model to define the linear regressors of the model. The orders and delay are defined as follows:
na — Number of past output terms used to predict the current output.
nb — Number of past input terms used to predict the current output.
nk — Delay from input to the output in terms of the number of samples.
The meaning of na, nb, and nk is similar to that for linear ARX model parameters. Orders are specified as scalars for SISO data, and as ny-by-nu matrices for MIMO data, where ny and nu are the number of outputs and inputs. If you are not sure what values to use for the orders and delays, you can estimate them as described in Preliminary Step – Estimating Model Orders and Input Delays. Such an estimate is based on linear ARX models and only provides initial guidance. The best orders for a linear ARX model might not be the best orders for a nonlinear ARX model.
System Identification Toolbox™ software computes linear regressors using the model orders and delays.
For example, suppose that you specify
na = 2,
nk = 5 for a SISO model with input
u and output y. The toolbox computes
linear regressors y(t-2),
Rather than use ARX model order to specify regressor delays, you can also specify regressors directly to capture more complex behavior. When you specify linear regressors directly, you can include nonconsecutive delay terms. You can also specify polynomial regressors and custom regressors. For more information, see Estimate Nonlinear ARX Models in the App and Estimate Nonlinear ARX Models at the Command Line.