RelativeStates
Definition of relative state variables
Library
Modelica/Mechanics/Translational/Components
Description
Usually, the absolute position and the absolute velocity of Modelica.Mechanics.Translational.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 variables in the following way:
- Connect an instance of this model between two flange connectors.
- The relative position and the relative velocity between the two connectors are used as state variables.
An example is given in the next figure
Here, the relative position and the relative velocity between the two masses are used as state variables. Additionally, the simulator selects either the absolute position and absolute velocity of model mass1 or of model mass2 as state variables.
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 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
mo_s_rel | s_rel | s_rel | Structure | |
mo_s_rel/fixed | fixed | Cell of scalars | true | |
mo_s_rel/start | start | Cell of scalars | ||
mo_v_rel | v_rel | v_rel | Structure | |
mo_v_rel/fixed | fixed | Cell of scalars | true | |
mo_v_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 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
flange_a | implicit | (left) driving flange (flange axis directed in to cut plane, e. g. from left to right) | input | 1 |
flange_b | implicit | (right) driven flange (flange axis directed out of cut plane) | output | 1 |