| Contents | Index |
| On this page… |
|---|
Synchronize Simulink Model Changes With Linear Analysis Tool Synchronize Simulink Model Changes With Existing Operating Point Specification Object |
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 model window, select Tools > Control Design > Linear Analysis.
The Linear Analysis Tool for the model opens, with the default operating point being set to the model initial condition.
Select Trim Model > Specifications in the Linear Analysis tab.

The Reference Filter block contains just one state.
In the Simulink model window, 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.
Click Sync with Model in the Specifications for trim dialog 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 Trim 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 model window, double-click the Reference Filter block. Change the Numerator of the transfer function to [100] 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.
![]() | Handling Blocks with Internal State Representation | Linearization | ![]() |

Learn more about resources for designing, testing, and implementing control systems.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |