Using Nonlinear ARX Models
After identifying a nonlinear ARX model, you can use the model for the following tasks:
Simulation and prediction — At the command line, use
sim
andpredict
to simulate and predict the model output. To compare models to measured output and to each other, usecompare
. For information about plotting simulated and predicted output in the app, see Simulation and Prediction in the App. You can also specify the initial conditions for simulation and prediction. The toolbox provides several options to facilitate how you specify initial states. For example, you can usefindstates
anddata2state
to compute state values based on the requirement to maximize fit to measured output or based on operating conditions. See theidnlarx
reference page for a definition of the nonlinear ARX model states. To learn more about howsim
andpredict
compute the model output, see How the Software Computes Nonlinear ARX Model Output.You can also forecast the response of a dynamic system by using the
forecast
command. The command predicts future outputs of the system using past output measurements. For more information, see Forecasting Response of Nonlinear ARX Models.Linearization — Compute linear approximation of nonlinear ARX models using
idnlarx/linearize
orlinapp
.The
linearize
command provides a first-order Taylor series approximation of the system about an operating point.linapp
computes a linear approximation of a nonlinear model for a given input data. For more information, see the Linear Approximation of Nonlinear Black-Box Models. You can compute the operating point for linearization usingidnlarx/findop
.After computing a linear approximation of a nonlinear model, you can perform linear analysis and control design on your model using Control System Toolbox™ commands. For more information, see Using Identified Models for Control Design Applications and Create and Plot Identified Models Using Control System Toolbox Software.
Simulation and code generation using Simulink® — You can import estimated nonlinear ARX models into the Simulink software using the Nonlinear ARX block (Nonlinear ARX Model) from the System Identification Toolbox block library. Import the
idnlarx
object from the workspace into Simulink using this block to simulate the model output.The IDNLARX Model block supports code generation with Simulink Coder™ software, using both generic and embedded targets. Code generation does not work when the model contains
idCustomNetwork
oridFeedforwardNetwork
nonlinearity estimator, or custom regressors. For more information, see Simulate Identified Model in Simulink.