Troubleshoot Linearization Results at Command Line
This example shows how to debug the linearization of a Simulink® model at the command
line using a LinearizationAdvisor object. You can also troubleshoot linearization
results interactively. For more information, see “Troubleshoot Linearization Results in
Linear Analysis Tool” on page 4-23.
Open the model.
mdl = 'scdpendulum';
open_system(mdl)
The initial condition for the pendulum angle is 90 degrees counterclockwise from the
upright unstable equilibrium of 0 degrees. The initial condition for the pendulum angular
velocity is 0 deg/s. The nominal torque to maintain this state is -49.05 N m. This
configuration is saved as the model initial condition.
Linearize the Model
Linearize the model using the analysis points defined in the model and the model
operating point.
io = getlinio(mdl);
linsys = linearize(mdl,io);
To check the linearization result, plot its Bode response.
bode(linsys)
4 Troubleshooting Linearization Results