This package contains ideal sources to drive 1D mechanical translational 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 position |
Speed | Forced movement of a flange according to a reference speed |
Accelerate | Forced movement of a flange according to an acceleration signal |
Move | Forced movement of a flange according to a position, velocity and acceleration signal |
Force | External force acting on a drive train element as input signal |
Force2 | Input signal acting as torque on two flanges |
LinearSpeedDependentForce | Linear dependency of force versus speed |
QuadraticSpeedDependentForce | Quadratic dependency of force versus speed |
ConstantForce | Constant force, not dependent on speed |
ConstantSpeed | Constant speed, not dependent on force |
ForceStep | Constant force, not dependent on speed |
The input signal s_ref defines the reference position in [m]. Flange flange_b is forced to move relative to the support connector 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.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 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 component |
Support | support | Support/housing of component |
input RealInput | s_ref | reference position of flange as input signal |
model Position "Forced movement of a flange according to a reference position" extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 ( s(stateSelect=if exact then StateSelect.default else StateSelect.prefer)); 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.Velocity v(start=0, stateSelect=if exact then StateSelect.default else StateSelect.prefer) "If exact=false, absolute velocity of flange_b else dummy"; SI.Acceleration a(start=0) "If exact=false, absolute acceleration of flange_b else dummy";Modelica.Blocks.Interfaces.RealInput s_ref "reference position of flange 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 s = s_ref; end if; equation if exact then s = s_ref; v = 0; a = 0; else // Filter: a = s_ref*S^2/(1 + (af/w_crit)*S + (bf/w_crit^2)*S^2) v = der(s); a = der(v); a = ((s_ref - s)*w_crit - af*v)*(w_crit/bf); end if;end Position;
The input signal v_ref defines the reference speed in [m/s]. Flange flange_b is forced to move relative to the support connector 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.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 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 component |
Support | support | Support/housing of component |
input RealInput | v_ref | reference speed of flange as input signal |
model Speed "Forced movement of a flange according to a reference speed" extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 ( s(start=0, fixed=true, stateSelect=StateSelect.prefer)); 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.Velocity v(stateSelect=if exact then StateSelect.default else StateSelect.prefer) "Absolute velocity of flange_b"; SI.Acceleration a "If exact=false, absolute acceleration of flange_b else dummy";Modelica.Blocks.Interfaces.RealInput v_ref "reference speed of flange as input signal"; protected parameter Modelica.SIunits.AngularFrequency w_crit=2*Modelica.Constants.pi*f_crit "Critical frequency"; initial equation if not exact then v = v_ref; end if; equation v = der(s); if exact then v = v_ref; a = 0; else // Filter: a = v_ref/(1 + (1/w_crit)*s) a = der(v); a = (v_ref - v)*w_crit; end if;end Speed;
The input signal a in [m/s2] moves the 1D translational flange connector flange_b with a predefined acceleration, i.e., the flange is forced to move relative to the support connector with this acceleration. The velocity and the position of the flange are also predefined and are determined by integration of the acceleration.
The acceleration "a(t)" can be provided from one of the signal generator blocks of the block library Modelica.Blocks.Source.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 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 component |
Support | support | Support/housing of component |
input RealInput | a_ref | absolute acceleration of flange as input signal |
model Accelerate "Forced movement of a flange according to an acceleration signal" extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (s(start=0, fixed=true, stateSelect=StateSelect.prefer)); SI.Velocity v(start=0, fixed=true, stateSelect=StateSelect.prefer) "Absolute velocity of flange_b"; SI.Acceleration a "Absolute acceleration of flange_b";Modelica.Blocks.Interfaces.RealInput a_ref "absolute acceleration of flange as input signal"; equation v = der(s); a = der(v); a = a_ref;end Accelerate;
Flange flange_b is forced to move relative to the support connector with a predefined motion according to the input signals:
u[1]: position of flange u[2]: velocity of flange u[3]: 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. 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 position = position(t) and set the velocity and the 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.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 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 component |
Support | support | Support/housing of component |
input RealInput | u[3] | position, velocity and acceleration of flange as input signals |
model Move "Forced movement of a flange according to a position, velocity and acceleration signal" extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2;Modelica.Blocks.Interfaces.RealInput u[3] "position, velocity and acceleration of flange 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 s = position(u,time);end Move;
The input signal "f" in [N] characterizes an external force which acts (with positive sign) at a flange, i.e., the component connected to the flange is driven by force f.
Input signal f can be provided from one of the signal generator blocks of Modelica.Blocks.Source.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2 (Partial model for a component with one translational 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 component |
Support | support | Support/housing of component |
input RealInput | f | driving force as input signal |
model Force "External force acting on a drive train element as input signal" extends Modelica.Mechanics.Translational.Interfaces.PartialElementaryOneFlangeAndSupport2;Modelica.Blocks.Interfaces.RealInput f "driving force as input signal"; equation flange.f = -f;end Force;
The input signal "f" in [N] characterizes an external force which acts (with positive sign) at both flanges, i.e., the components connected to these flanges are driven by force f.
Input signal s can be provided from one of the signal generator blocks of Modelica.Blocks.Source.
Extends from Translational.Interfaces.PartialTwoFlanges (Component with two translational 1D flanges ).
Type | Name | Description |
---|---|---|
Flange_a | flange_a | (left) driving flange (flange axis directed in to cut plane, e. g. from left to right) |
Flange_b | flange_b | (right) driven flange (flange axis directed out of cut plane) |
input RealInput | f | driving force as input signal |
model Force2 "Input signal acting as torque on two flanges" extends Translational.Interfaces.PartialTwoFlanges;Modelica.Blocks.Interfaces.RealInput f "driving force as input signal"; equation flange_a.f = f; flange_b.f = -f;end Force2;
Model of force, linearly dependent on velocity of flange.
Parameter ForceDirection chooses whether direction of force is the same in both directions of movement or not.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialForce (Partial model of a force acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Force | f_nominal | Nominal force (if negative, force is acting as load) [N] | |
Boolean | ForceDirection | true | Same direction of force in both directions of movement |
Velocity | v_nominal | Nominal speed [m/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of component |
Support | support | Support/housing of component |
model LinearSpeedDependentForce "Linear dependency of force versus speed" extends Modelica.Mechanics.Translational.Interfaces.PartialForce; parameter Modelica.SIunits.Force f_nominal "Nominal force (if negative, force is acting as load)"; parameter Boolean ForceDirection=true "Same direction of force in both directions of movement"; parameter Modelica.SIunits.Velocity v_nominal(min=Modelica.Constants.eps) "Nominal speed"; Modelica.SIunits.Velocity v "Velocity of flange with respect to support (= der(s))"; equation v = der(s); if ForceDirection then f = -f_nominal*abs(v/v_nominal); else f = -f_nominal*(v/v_nominal); end if;end LinearSpeedDependentForce;
Model of force, quadratic dependent on velocity of flange.
Parameter ForceDirection chooses whether direction of force is the same in both directions of movement or not.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialForce (Partial model of a force acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Force | f_nominal | Nominal force (if negative, force is acting as load) [N] | |
Boolean | ForceDirection | true | Same direction of force in both directions of movement |
Velocity | v_nominal | Nominal speed [m/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of component |
Support | support | Support/housing of component |
model QuadraticSpeedDependentForce "Quadratic dependency of force versus speed" extends Modelica.Mechanics.Translational.Interfaces.PartialForce; parameter Modelica.SIunits.Force f_nominal "Nominal force (if negative, force is acting as load)"; parameter Boolean ForceDirection=true "Same direction of force in both directions of movement"; parameter Modelica.SIunits.Velocity v_nominal(min=Modelica.Constants.eps) "Nominal speed"; Modelica.SIunits.Velocity v "Velocity of flange with respect to support (= der(s))"; equation v = der(s); if ForceDirection then f = -f_nominal*(v/v_nominal)^2; else f = -f_nominal*smooth(1, if v >= 0 then (v/v_nominal)^2 else -(v/v_nominal)^2); end if;end QuadraticSpeedDependentForce;
Model of constant force, not dependent on velocity of flange.
Positive force acts accelerating.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialForce (Partial model of a force acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Force | f_constant | Nominal force (if negative, force is acting as load) [N] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of component |
Support | support | Support/housing of component |
model ConstantForce "Constant force, not dependent on speed" extends Modelica.Mechanics.Translational.Interfaces.PartialForce; parameter Modelica.SIunits.Force f_constant "Nominal force (if negative, force is acting as load)"; equation f = -f_constant;end ConstantForce;
Model of fixed verlocity of flange, not dependent on force.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialForce (Partial model of a force acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Velocity | v_fixed | Fixed speed (if negative, force is acting as load) [m/s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of component |
Support | support | Support/housing of component |
model ConstantSpeed "Constant speed, not dependent on force" extends Modelica.Mechanics.Translational.Interfaces.PartialForce; parameter Modelica.SIunits.Velocity v_fixed "Fixed speed (if negative, force is acting as load)"; Modelica.SIunits.Velocity v "Velocity of flange with respect to support (= der(s))"; equation v = der(s); v = v_fixed;end ConstantSpeed;
Model of a force step at time .
Positive force acts accelerating.
Extends from Modelica.Mechanics.Translational.Interfaces.PartialForce (Partial model of a force acting at the flange (accelerates the flange)).
Type | Name | Default | Description |
---|---|---|---|
Boolean | useSupport | false | = true, if support flange enabled, otherwise implicitly grounded |
Force | stepForce | Height of force step (if negative, force is acting as load) [N] | |
Force | offsetForce | Offset of force [N] | |
Time | startTime | 0 | Force = offset for time < startTime [s] |
Type | Name | Description |
---|---|---|
Flange_b | flange | Flange of component |
Support | support | Support/housing of component |
model ForceStep "Constant force, not dependent on speed" extends Modelica.Mechanics.Translational.Interfaces.PartialForce; parameter Modelica.SIunits.Force stepForce(start=1) "Height of force step (if negative, force is acting as load)"; parameter Modelica.SIunits.Force offsetForce(start=0) "Offset of force"; parameter Modelica.SIunits.Time startTime=0 "Force = offset for time < startTime"; equation f = -offsetForce - (if time < startTime then 0 else stepForce);end ForceStep;
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;