Linearize
You can linearize a model and return the linearized model as StateSpace object.
-
From the
Behavior Tools section of the
action bar,
click
Linearize
.
Tip: You can also access this command from the Simulation section of the action bar. A dialog box for the corresponding function call in Modelica_LinearSystems2 is displayed. -
If the wanted model is not selected, click
Edit
.
A Select model dialog box is displayed; browse for the model by expanding the trees, select the wanted model and click OK.Note: When a new model is selected, it is translated after the selection. - Optional:
You can enter values of model parameters for the linearization:
-
Click
modelParam in the left pane of the dialog
box in the first figure above.
The modelParam tab is displayed:
-
Click
select in the lower right corner of the
dialog box.
A select dialog box is displayed.
- Browse for, and select, components.
- Click OK to validate selection and close the select dialog box, or Cancel to close the dialog box without any changes.
-
To change the values of selected model parameters, click the
corresponding
Value boxes and change the values.
Tip: To reset the values, click select to reopen the select dialog box and select the Reset from file: Value option, and then click OK.
-
Click
modelParam in the left pane of the dialog
box in the first figure above.
- Optional:
You can change the simulation setup if you start the linearization
after the initial time:
-
Click
simulationSetup in the left pane of the
dialog box.
The simulationSetup tab is displayed:
-
Deselect
linearizeAtInitial.
You can now select the following:
- t_start (simulation start time).
- t_linearize (start time of linearization).
- method (integration method to be used between t_start and t_linearize).
- tolerance (relative error tolerance to be used between t_start and t_linearize).
- fixedStepSize (step size for fixed step integrators, to be used between t_start and t_linearize).
-
Click
simulationSetup in the left pane of the
dialog box.
-
Select
OK or
Execute to execute the function. You could also
select:
- Info to display a Help window and display information about the function.
- Copy Call to copy the function call with the values. This can be used for further scripting.
- Close to exit the dialog box without calling the function.
The following is performed:- The function call is executed.
- The Modelica Scripting window displays the function call and the result. For more information, see The Modelica Scripting Window.
- Information about the execution is displayed in the Messages Reporting window, including where the file is located in which the simulation results are stored. See Messages Reporting Window for more information about this window.