Compute Operating Points from Specifications at the Command Line

You can compute a steady-state operating point of a Simulink® model by specifying constraints on the model states, outputs, and inputs, and by finding a model operating condition that satisfies these constraints. For more information on steady-state operating points, see About Operating Points and Compute Steady-State Operating Points.

To find an operating point for your Simulink model, you can programmatically trim your model using the findop, as shown in this example.

In this example, you compute an operating point to meet output specifications. Using a similar approach, you can define state or input specifications. Also, you can define a combination of state, output, and input specifications; that is, you do not have to use, for example, only state specifications.

The operating point search report shows that the specifications were met successfully, and that both states are at steady state as expected (dx = 0).

You can also specify bounds for outputs during trimming. For example, suppose that you know that there is a steady-state condition between 1900 and 2100 rpm. To trim the speed to this range, modify the operating point specifications.

opspec.Outputs(1).Min = 1900;
opspec.Outputs(1).Max = 2100;

In this case, since you do not know the output value, specify the output as unknown. You can also provide an initial guess for the output value.

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic. By continuing to use this website, you consent to our use of cookies. Please see our Privacy Policy to learn more about cookies and how to change your settings.