This package contains ideal sources to drive 1D mechanical rotational drive trains.
Extends from Modelica.Icons.Library2 (Icon for library where additional icon elements shall be added).
Name | Description |
---|---|
Position | Forced movement of a flange according to a reference angle signal |
Speed | Forced movement of a flange according to a reference angular velocity signal |
Accelerate | Forced movement of a flange according to an acceleration signal |
Move | Forced movement of a flange according to an angle, speed and angular acceleration signal |
Torque | Input signal acting as external torque on a flange |
Torque2 | Input signal acting as torque on two flanges |
LinearSpeedDependentTorque | Linear dependency of torque versus speed |
QuadraticSpeedDependentTorque | Quadratic dependency of torque versus speed |
ConstantTorque | Constant torque, not dependent on speed |
ConstantSpeed | Constant speed, not dependent on torque |
TorqueStep | Constant torque, not dependent on speed |
The input signal phi_ref defines the reference angle in [rad]. Flange flange is forced to move according to this reference motion relative to flange support. According to parameter exact (default = false), this is done in the following way:
The input signal can be provided from one of the signal generator blocks of the block library Modelica.Blocks.Sources.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Boolean | exact | false | true/false exact treatment/filtering the input signal |
Frequency | f_crit | 50 | if exact=false, critical frequency of filter to filter input signal [Hz] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
input RealInput | phi_ref | Reference angle of flange with respect to support as input signal [rad] |
model Position "Forced movement of a flange according to a reference angle signal" import SI = Modelica.SIunits; extends Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2; parameter Boolean exact=false "true/false exact treatment/filtering the input signal"; parameter SI.Frequency f_crit=50 "if exact=false, critical frequency of filter to filter input signal"; SI.Angle phi(stateSelect=if exact then StateSelect.default else StateSelect.prefer) "Rotation angle of flange with respect to support"; SI.AngularVelocity w(start=0,stateSelect=if exact then StateSelect.default else StateSelect.prefer) "If exact=false, Angular velocity of flange with respect to support else dummy"; SI.AngularAcceleration a(start=0) "If exact=false, Angular acceleration of flange with respect to support else dummy";Modelica.Blocks.Interfaces.RealInput phi_ref(final quantity="Angle", final unit = "rad", displayUnit="deg") "Reference angle of flange with respect to support as input signal"; protected parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit "Critical frequency"; constant Real af=1.3617 "s coefficient of Bessel filter"; constant Real bf=0.6180 "s*s coefficient of Bessel filter"; initial equation if not exact then phi = phi_ref; end if; equation phi = flange.phi - phi_support; if exact then phi = phi_ref; w = 0; a = 0; else // Filter: a = phi_ref*s^2/(1 + (af/w_crit)*s + (bf/w_crit^2)*s^2) w = der(phi); a = der(w); a = ((phi_ref - phi)*w_crit - af*w)*(w_crit/bf); end if;end Position;
The input signal w_ref defines the reference speed in [rad/s]. Flange flange is forced to move relative to flange support according to this reference motion. According to parameter exact (default = false), this is done in the following way:
The input signal can be provided from one of the signal generator blocks of the block library Modelica.Blocks.Sources.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Boolean | exact | false | true/false exact treatment/filtering the input signal |
Frequency | f_crit | 50 | if exact=false, critical frequency of filter to filter input signal [Hz] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
input RealInput | w_ref | Reference angular velocity of flange with respect to support as input signal |
model Speed "Forced movement of a flange according to a reference angular velocity signal" import SI = Modelica.SIunits; extends Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2; parameter Boolean exact=false "true/false exact treatment/filtering the input signal"; parameter SI.Frequency f_crit=50 "if exact=false, critical frequency of filter to filter input signal"; SI.Angle phi(start=0, fixed=true, stateSelect=StateSelect.prefer) "Rotation angle of flange with respect to support"; SI.AngularVelocity w(stateSelect=if exact then StateSelect.default else StateSelect.prefer) "Angular velocity of flange with respect to support"; SI.AngularAcceleration a "If exact=false, angular acceleration of flange with respect to support else dummy";Modelica.Blocks.Interfaces.RealInput w_ref "Reference angular velocity of flange with respect to support as input signal"; protected parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit "Critical frequency"; initial equation if not exact then w = w_ref; end if; equation phi = flange.phi - phi_support; w = der(phi); if exact then w = w_ref; a = 0; else // Filter: a = w_ref/(1 + (1/w_crit)*s) a = der(w); a = (w_ref - w)*w_crit; end if;end Speed;
The input signal a defines an angular acceleration in [rad/s2]. Flange flange is forced to move relative to flange support with this acceleration. The angular velocity w and the rotation angle phi of the flange are automatically determined by integration of the acceleration.
The input signal can be provided from one of the signal generator blocks of the block library Modelica.Blocks.Sources.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
input RealInput | a_ref | Absolute angular acceleration of flange with respect to support as input signal |
model Accelerate "Forced movement of a flange according to an acceleration signal" import SI = Modelica.SIunits; extends Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2; SI.Angle phi(start=0, fixed=true, stateSelect=StateSelect.prefer) "Rotation angle of flange with respect to support"; SI.AngularVelocity w(start=0, fixed=true, stateSelect=StateSelect.prefer) "Angular velocity of flange with respect to support"; SI.AngularAcceleration a "Angular acceleration of flange with respect to support";Modelica.Blocks.Interfaces.RealInput a_ref "Absolute angular acceleration of flange with respect to support as input signal"; equation phi = flange.phi - phi_support; w = der(phi); a = der(w); a = a_ref;end Accelerate;
Flange flange is forced to move relative to flange support with a predefined motion according to the input signals:
u[1]: angle of flange u[2]: angular velocity of flange u[3]: angular acceleration of flange
The user has to guarantee that the input signals are consistent to each other, i.e., that u[2] is the derivative of u[1] and that u[3] is the derivative of u[2]. There are, however, also applications where by purpose these conditions do not hold. For example, if only the position dependent terms of a mechanical system shall be calculated, one may provide angle = angle(t) and set the angular velocity and the angular acceleration to zero.
The input signals can be provided from one of the signal generator blocks of the block library Modelica.Blocks.Sources.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
input RealInput | u[3] | Angle, angular velocity and angular acceleration of flange with respect to support as input signals |
model Move "Forced movement of a flange according to an angle, speed and angular acceleration signal" import SI = Modelica.SIunits; extends Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2; Modelica.SIunits.Angle phi "Rotation angle of flange with respect to support";Modelica.Blocks.Interfaces.RealInput u[3] "Angle, angular velocity and angular acceleration of flange with respect to support as input signals"; protectedfunction position annotation(derivative=position_der); input Real q_qd_qdd[3] "Required values for position, speed, acceleration"; input Real dummy "Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)"; output Real q; algorithm q :=q_qd_qdd[1]; end position ;function position_der annotation(derivative=position_der2); input Real q_qd_qdd[3] "Required values for position, speed, acceleration"; input Real dummy "Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)"; input Real dummy_der; output Real qd; algorithm qd :=q_qd_qdd[2]; end position_der ;function position_der2 input Real q_qd_qdd[3] "Required values for position, speed, acceleration"; input Real dummy "Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)"; input Real dummy_der; input Real dummy_der2; output Real qdd; algorithm qdd :=q_qd_qdd[3]; end position_der2 ; equation phi = flange.phi - phi_support; phi = position(u,time);end Move;
The input signal tau defines an external torque in [Nm] which acts (with negative sign) at a flange connector, i.e., the component connected to this flange is driven by torque tau.
The input signal can be provided from one of the signal generator blocks of Modelica.Blocks.Sources.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one rotational 1-dim. shaft flange and a support used for textual modeling, i.e., for elementary models).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
input RealInput | tau | Accelerating torque acting at flange (= -flange.tau) |
model Torque "Input signal acting as external torque on a flange" extends Modelica.Mechanics.Rotational.Interfaces.PartialElementaryOneFlangeAndSupport2;Modelica.Blocks.Interfaces.RealInput tau "Accelerating torque acting at flange (= -flange.tau)"; equation flange.tau = -tau;end Torque;
The input signal tau defines an external torque in [Nm] which acts at both flange connectors, i.e., the components connected to these flanges are driven by torque tau.
The input signal can be provided from one of the signal generator blocks of Modelica.Blocks.Sources.
Extends from Rotational.Interfaces.PartialTwoFlanges (Partial model for a component with two rotational 1-dim. shaft flanges).
Type | Name | Description |
---|---|---|
Flange_a | flange_a | Flange of left shaft |
Flange_b | flange_b | Flange of right shaft |
input RealInput | tau | Torque driving the two flanges (a positive value accelerates the flange) |
model Torque2 "Input signal acting as torque on two flanges" extends Rotational.Interfaces.PartialTwoFlanges;Modelica.Blocks.Interfaces.RealInput tau "Torque driving the two flanges (a positive value accelerates the flange)"; equation flange_a.tau = tau; flange_b.tau = -tau;end Torque2;
Model of torque, linearly dependent on angular velocity of flange.
Parameter TorqueDirection chooses whether direction of torque is the same in both directions of rotation or not.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialTorque (Partial model of a torque acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Torque | tau_nominal | Nominal torque (if negative, torque is acting as load) [N.m] | |
Boolean | TorqueDirection | true | Same direction of torque in both directions of rotation |
AngularVelocity | w_nominal | Nominal speed [rad/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
model LinearSpeedDependentTorque "Linear dependency of torque versus speed" extends Modelica.Mechanics.Rotational.Interfaces.PartialTorque; parameter Modelica.SIunits.Torque tau_nominal "Nominal torque (if negative, torque is acting as load)"; parameter Boolean TorqueDirection=true "Same direction of torque in both directions of rotation"; parameter Modelica.SIunits.AngularVelocity w_nominal(min=Modelica.Constants.eps) "Nominal speed"; Modelica.SIunits.AngularVelocity w "Angular velocity of flange with respect to support (= der(phi))"; Modelica.SIunits.Torque tau "Accelerating torque acting at flange (= -flange.tau)"; equation w = der(phi); tau = -flange.tau; if TorqueDirection then tau = tau_nominal*abs(w/w_nominal); else tau = tau_nominal*(w/w_nominal); end if;end LinearSpeedDependentTorque;
Model of torque, quadratic dependent on angular velocity of flange.
Parameter TorqueDirection chooses whether direction of torque is the same in both directions of rotation or not.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialTorque (Partial model of a torque acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Torque | tau_nominal | Nominal torque (if negative, torque is acting as load) [N.m] | |
Boolean | TorqueDirection | true | Same direction of torque in both directions of rotation |
AngularVelocity | w_nominal | Nominal speed [rad/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
model QuadraticSpeedDependentTorque "Quadratic dependency of torque versus speed" extends Modelica.Mechanics.Rotational.Interfaces.PartialTorque; parameter Modelica.SIunits.Torque tau_nominal "Nominal torque (if negative, torque is acting as load)"; parameter Boolean TorqueDirection=true "Same direction of torque in both directions of rotation"; parameter Modelica.SIunits.AngularVelocity w_nominal(min=Modelica.Constants.eps) "Nominal speed"; Modelica.SIunits.AngularVelocity w "Angular velocity of flange with respect to support (= der(phi))"; Modelica.SIunits.Torque tau "Accelerating torque acting at flange (= -flange.tau)"; equation w = der(phi); tau = -flange.tau; if TorqueDirection then tau = tau_nominal*(w/w_nominal)^2; else tau = tau_nominal*smooth(1,if w >= 0 then (w/w_nominal)^2 else -(w/w_nominal)^2); end if;end QuadraticSpeedDependentTorque;
Model of constant torque, not dependent on angular velocity of flange.
Positive torque acts accelerating.
Extends from Rotational.Interfaces.PartialTorque (Partial model of a torque acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Torque | tau_constant | Constant torque (if negative, torque is acting as load) [N.m] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
model ConstantTorque "Constant torque, not dependent on speed" extends Rotational.Interfaces.PartialTorque; parameter Modelica.SIunits.Torque tau_constant "Constant torque (if negative, torque is acting as load)"; Modelica.SIunits.Torque tau "Accelerating torque acting at flange (= -flange.tau)"; equation tau = -flange.tau; tau = tau_constant;end ConstantTorque;
Model of fixed angular verlocity of flange, not dependent on torque.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialTorque (Partial model of a torque acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
AngularVelocity | w_fixed | Fixed speed [rad/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
model ConstantSpeed "Constant speed, not dependent on torque" extends Modelica.Mechanics.Rotational.Interfaces.PartialTorque; Modelica.SIunits.AngularVelocity w "Angular velocity of flange with respect to support (= der(phi))"; parameter Modelica.SIunits.AngularVelocity w_fixed "Fixed speed"; equation w = der(phi); w = w_fixed;end ConstantSpeed;
Model of a torque step at time .
Positive torque acts accelerating.
Extends from Modelica.Mechanics.Rotational.Interfaces.PartialTorque (Partial model of a torque acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Torque | stepTorque | Height of torque step (if negative, torque is acting as load) [N.m] | |
Torque | offsetTorque | Offset of torque [N.m] | |
Time | startTime | 0 | Torque = offset for time < startTime [s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of shaft |
Support | support | Support/housing of component |
model TorqueStep "Constant torque, not dependent on speed" extends Modelica.Mechanics.Rotational.Interfaces.PartialTorque; parameter Modelica.SIunits.Torque stepTorque(start=1) "Height of torque step (if negative, torque is acting as load)"; parameter Modelica.SIunits.Torque offsetTorque(start=0) "Offset of torque"; parameter Modelica.SIunits.Time startTime=0 "Torque = offset for time < startTime"; Modelica.SIunits.Torque tau "Accelerating torque acting at flange (= -flange.tau)"; equation tau = -flange.tau; tau = offsetTorque + (if time < startTime then 0 else stepTorque);end TorqueStep;
Type | Name | Default | Description |
---|---|---|---|
Real | q_qd_qdd[3] | Required values for position, speed, acceleration | |
Real | dummy | Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used) | |
Real | dummy_der |
Type | Name | Description |
---|---|---|
Real | qd |
function position_der annotation(derivative=position_der2); input Real q_qd_qdd[3] "Required values for position, speed, acceleration"; input Real dummy "Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)"; input Real dummy_der; output Real qd; algorithm qd :=q_qd_qdd[2];end position_der;
Type | Name | Default | Description |
---|---|---|---|
Real | q_qd_qdd[3] | Required values for position, speed, acceleration | |
Real | dummy | Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used) | |
Real | dummy_der | ||
Real | dummy_der2 |
Type | Name | Description |
---|---|---|
Real | qdd |
function position_der2 input Real q_qd_qdd[3] "Required values for position, speed, acceleration"; input Real dummy "Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)"; input Real dummy_der; input Real dummy_der2; output Real qdd; algorithm qdd :=q_qd_qdd[3]; end position_der2;