idnlarx/plot

Plot nonlinearity of nonlinear ARX model

Syntax

  • plot(model) example
  • plot(model,color)
  • plot(model1,...,modelN)
  • plot(model1,color1...,modelN,colorN) example
  • plot(___,'NumberofSamples',N) example

Description

example

plot(model) plots the nonlinearity of a nonlinear ARX model on a nonlinear ARX plot. The plot shows the nonlinearity for all outputs of the model as a function of its input regressors.

plot(model,color) specifies the color to use.

plot(model1,...,modelN) generates the plot for multiple models.

example

plot(model1,color1...,modelN,colorN) specifies the color for each model. You do not need to specify the color for all models.

example

plot(___,'NumberofSamples',N) specifies the number of samples to use to grid the regressor space on each axis. This syntax can include any of the input argument combinations in the previous syntaxes.

Examples

expand all

Plot Nonlinearity of a Nonlinear ARX Model

Estimate a nonlinear ARX model and plot its nonlinearity.

load iddata1
model1=nlarx(z1,[4 2 1],'wave','nlr',[1:3]);
plot(model1)

In the plot window, you can choose:

  • The regressors to use on the plot axes, and specify the center points for the other regressors in the configuration panel. For multi-output models, each output is plotted separately.

  • The output to view from the drop-down list located at the top of the plot.

Specify Line Style for Multiple Models

load iddata1
model1 = nlarx(z1,[4 2 1],'wave','nlr',[1:3]);
model2 = nlarx(z1,[4 2 1],'sigmoidnet','nlr',[1:3]);
plot(model1,'b', model2, 'g')

Specify Number of Samples

load iddata1
model1 = nlarx(z1,[4 2 1],'wave','nlr',[1:3]);
model2 = nlarx(z1,[4 2 1],'sigmoidnet','nlr',[1:3]);
plot(model1,'b', model2, 'g','NumberofSamples',50)

Input Arguments

expand all

model — Estimated nonlinear ARX modelidnlarx model

Estimated nonlinear ARX model, specified as an idnlarx model object. Use nlarx to estimate the model.

color — Color to usestring | vector of doubles

Color to use to plot the regressors, specified as one of the following:

  • String. The string can be one of the following:

    • 'b'

    • 'y'

    • 'm'

    • 'c'

    • 'r'

    • 'g'

    • 'w'

  • 3-element double vector of RGB values

By default, the colors are automatically chosen.

Data Types: double | char

N — Number of points 20 (default) | positive integer

Number of points used on the regressor axis to display the regressor samples, specified as a positive integer.

Data Types: double

More About

expand all

What is a Nonlinear ARX Plot?

The Nonlinear ARX plot displays the characteristics of model nonlinearities as a function of one or two regressors. The model nonlinearity (model.Nonlinearity) is a nonlinearity estimator function, such as wavenet, sigmoidnet, treepartition, and uses model regressors as its inputs. The value of the nonlinearity is plotted by projecting its response in 2 or 3-dimensional space. The plot uses one or two regressors as the plot axes for 2- or 3-D plots, respectively and a center point (cross-section location) for the other regressors.

Examining a nonlinear ARX plot can help you gain insight into which regressors have the strongest effect on the model output. Understanding the relative importance of the regressors on the output can help you decide which regressors should be included in the nonlinear function.

Furthermore, you can create several nonlinear models for the same data set using different nonlinearity estimators, such a wavenet network and treepartition, and then compare the nonlinear surfaces of these models. Agreement between nonlinear surfaces increases the confidence that these nonlinear models capture the true dynamics of the system.

In the plot window, you can choose:

  • The regressors to use on the plot axes, and specify the center points for the other regressors in the configuration panel. For multi-output models, each output is plotted separately.

  • The output to view from the drop-down list located at the top of the plot.

To learn more about configuring the plot, see Tips.

Tips

  • To configure the nonlinear ARX plot:

    1. If your model contains multiple outputs, select the output channel in the Select nonlinearity at output drop-down list. Selecting the output channel displays the nonlinearity values that correspond to this output channel.

    2. If the regressor selection options are not visible, click to expand the Nonlinear ARX Model Plot window.

    3. Select Regressor 1 from the list of available regressors. In the Range field, enter the range of values to include on the plot for this regressor. The regressor values are plotted on the Reg1 axis.

    4. Specify a second regressor for a 3-D plot by selecting one of the following types of options:

      • Select Regressor 2 to display three axes. In the Range field, enter the range of values to include on the plot for this regressor. The regressor values are plotted on the Reg2 axis.

      • Select <none> in the Regressor 2 list to display only two axes.

    5. To fix the values of the regressor that are not displayed, click Fix Values. In the Fix Regressor Values dialog box, double-click the Value cell to edit the constant value of the corresponding regressor. The default values are determined during model estimation. Click OK.

    6. Click Apply to update the plot.

See Also

| | |

Was this topic helpful?