RelativeStates
Definition of relative state variables
Library
Modelica/Mechanics/Rotational/Components
Description
Usually, the absolute angle and the absolute angular velocity ofModelica.Mechanics.Rotational.Components.Inertia models are used as state variables.In some circumstances, relative quantities are better suited, e.g.,because it may be easier to supply initial values.In such cases, model RelativeStates allows the definition of state variablesin the following way:
- Connect an instance of this model between two flange connectors.
- The relative rotation angle and the relative angular velocity between the two connectors are used as state variables.
An example is given in the next figure
Here, the relative angle and the relative angular velocity betweenthe two inertias are used as state variables. Additionally, thesimulator selects either the absolute angle and absolute angularvelocity of model inertia1 or of model inertia2 as state variables.
See also the discussionState Selectionin the User's Guide of the Rotational library.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_stateSelect | stateSelect | Priority to use the relative angle and relative speed as states | Structure | |
mo_stateSelect/choice1 | StateSelect.never | Number | 0 | |
mo_stateSelect/choice2 | StateSelect.avoid | Number | 0 | |
mo_stateSelect/choice3 | StateSelect.default | Number | 0 | |
mo_stateSelect/choice4 | StateSelect.prefer | Number | 0 | |
mo_stateSelect/choice5 | StateSelect.always | Number | 0 | |
mo_phi_nominal | phi_nominal | Nominal value of the relative angle (used for scaling) | Scalar | |
mo_phi_rel | phi_rel | phi_rel | Structure | |
mo_phi_rel/fixed | fixed | Cell of scalars | true | |
mo_phi_rel/start | start | Cell of scalars | ||
mo_w_rel | w_rel | w_rel | Structure | |
mo_w_rel/fixed | fixed | Cell of scalars | true | |
mo_w_rel/start | start | Cell of scalars | ||
mo_a_rel | a_rel | a_rel | Structure | |
mo_a_rel/fixed | fixed | Cell of scalars | true | |
mo_a_rel/start | start | Cell of scalars |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo__nmodifiers | Number of Modifiers | Specifies the number of modifiers | Number | |
mo__modifiers | Modifiers | Add new modifier | Structure | |
mo__modifiers/varname | Variable name | Cell of strings | ||
mo__modifiers/attribute | Attribute | Cell of strings | 'start' | |
mo__modifiers/value | Value |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
flange_a | implicit | Flange of left shaft | input | 1 |
flange_b | implicit | Flange of right shaft | output | 1 |