|On this page…|
This example shows how to update the operating point specifications in the Linear Analysis Tool to reflect changes to the Simulink® model.
Modifying your Simulink model can change, add, or remove states, inputs, or outputs, which changes the operating point. If you change your model while the Linear Analysis Tool is open, you must sync the operating point specifications in the Linear Analysis Tool to reflect the changes in the model.
Open Simulink model.
sys = ('scdspeedctrl'); open_system(sys)
In the Simulink Editor, select Analysis > Control Design > Linear Analysis.
The Linear Analysis Tool for the model opens, with the default operating point being set to the model initial condition.
In the Linear Analysis tab, click Trim Model. Then click Specifications.
The Specifications for trim dialog box appears.
The Reference Filter block contains just one state.
In the Simulink Editor, double-click the Reference Filter block. Change the Numerator of the transfer function to 100, and change the Denominator to [1 20 100]. Click OK.
This change adds a state to the Simulink model.
In the Specifications for trim dialog, click Sync with Model to synchronize the operating point specifications in the Linear Analysis Tool with the model.
The dialog now shows two states for the Reference Filter block.
Click to compute the operating point.
This example shows how to use update to update the operating point specification object after you update the Simulink model.
Open Simulink model.
sys = 'scdspeedctrl'; open_system(sys);
Create operating point specification object.
By default, all model states are specified to be at steady state.
opspec = operspec(sys);
In the Simulink Editor, double-click the Reference Filter block. Change the Numerator of the transfer function to  and the Denominator to [1 20 100]. Click OK.
Find the steady state operating point that meets these specifications.
op = findop(sys,opspec)
This command results in an error because the changes to your model are not reflected in your operating point specification object:
??? The model scdspeedctrl has been modified and the operating point object is out of date. Update the object by calling the function update on your operating point object.
Update the operating point specification object with changes to the model. Repeat the operating point search.
opspec = update(opspec); op = findop(sys,opspec) bdclose(sys);
After updating the operating point specifications object, the optimization algorithm successfully finds the operating point.