Using Hammerstein-Wiener Models
After identifying a Hammerstein-Wiener model, you can use the model for the following tasks:
Simulation — At the command line, use
simto simulate the model output. To compare models to measured output and to each other, use
compare. Note that for Hammerstein-Wiener models, the simulated and predicted model output are equivalent because these models have a trivial noise component, that is disturbance in these models is white noise. For information about plotting simulated output in the app, see Simulation and Prediction in the App.
You can also specify the initial conditions for simulation. The toolbox provides various options to facilitate how you specify initial states. For example, you can use
findstatesto automatically search for state values in simulation and prediction applications. You can also specify the states manually. See the
idnlhwreference page for a definition of the Hammerstein-Wiener model states.
To learn more about how
simcomputes the model output, see How the Software Computes Hammerstein-Wiener Model Output.
linearizecommand provides a first-order Taylor series approximation of the system about an operating point.
linappcomputes 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 using
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 the estimated Hammerstein-Wiener model into Simulink software using the Hammerstein-Wiener block (Hammerstein-Wiener Model) from the System Identification Toolbox block library. After you bring the
idnlhwobject from the workspace into Simulink, you can simulate the model output.
The IDNLHW Model block supports code generation with Simulink Coder™ software, using both generic and embedded targets. Code generation does not work when the model contains
idCustomNetworkas the input or output nonlinearity. For more information, see Simulate Identified Model in Simulink.