| Simscape™ | ![]() |
Trimming a system refers to the finding of solutions for inputs, outputs, states, and state derivatives satisfying conditions that you specify beforehand. For example, you can seek steady-state solutions where some or all of the derivatives of a system's states are zero. Once you find an operating point by trimming a model, you can then linearize the model about that operating point.
You can use the Simulink® Control Design™ command findop, as well as the associated graphical user interface under Tools > Control Design > Linear Analysis, to find operating points. Simulink Control Design product is required for trimming Simscape™ models.
Note The Simulink® command trim is not supported for models containing Simscape components. |
The basic process for finding an operating point is given below:
model = 'my_model'; % where my_model is a model name op_spec = operspec(model); op_point = findop(model, op_spec);
The operspec command creates an operating point specification object, op_spec. The op_spec object contains information on desired properties for the operating point to be computed by findop. In particular, for each state independently, its derivative may be requested to be zero (steady-state condition for that state), or the state may be requested to be any desired value. The default setting of these conditions is that all derivatives are requested to be zero (steady-state for the whole model). Note that this is a steady-state for the whole model, not just a Simscape network within the model. The findop command uses the conditions specified in op_spec and attempts to find an operating point which satisfies those conditions and reports on its success or failure. If its search is successful, the state values in op_point satisfy the conditions specified in op_spec.
For more details on the use of operating point specification objects and the related commands and graphical interface, see Simulink Control Design documentation.
![]() | Troubleshooting Simulation Errors | Linearizing Simscape™ Models | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |