Modelica.Mechanics.Translational.Sources

Sources to drive 1D translational mechanical components

Information


This package contains ideal sources to drive 1D mechanical translational drive trains.

Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).

Package Content

NameDescription
Modelica.Mechanics.Translational.Sources.Position Position Forced movement of a flange according to a reference position
Modelica.Mechanics.Translational.Sources.Speed Speed Forced movement of a flange according to a reference speed
Modelica.Mechanics.Translational.Sources.Accelerate Accelerate Forced movement of a flange according to an acceleration signal
Modelica.Mechanics.Translational.Sources.Move Move Forced movement of a flange according to a position, velocity and acceleration signal
Modelica.Mechanics.Translational.Sources.Force Force External force acting on a drive train element as input signal
Modelica.Mechanics.Translational.Sources.Force2 Force2 Input signal acting as torque on two flanges
Modelica.Mechanics.Translational.Sources.LinearSpeedDependentForce LinearSpeedDependentForce Linear dependency of force versus speed
Modelica.Mechanics.Translational.Sources.QuadraticSpeedDependentForce QuadraticSpeedDependentForce Quadratic dependency of force versus speed
Modelica.Mechanics.Translational.Sources.ConstantForce ConstantForce Constant force, not dependent on speed
Modelica.Mechanics.Translational.Sources.ConstantSpeed ConstantSpeed Constant speed, not dependent on force
Modelica.Mechanics.Translational.Sources.ForceStep ForceStep Constant force, not dependent on speed


Modelica.Mechanics.Translational.Sources.Position Modelica.Mechanics.Translational.Sources.Position

Forced movement of a flange according to a reference position

Modelica.Mechanics.Translational.Sources.Position

Information


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:

  1. exact=true
    The reference position is treated exactly. This is only possible, if the input signal is defined by an analytical function which can be differentiated at least twice. If this prerequisite is fulfilled, the Modelica translator will differentiate the input signal twice in order to compute the reference acceleration of the flange.
  2. exact=false
    The reference position is filtered and the second derivative of the filtered curve is used to compute the reference acceleration of the flange. This second derivative is not computed by numerical differentiation but by an appropriate realization of the filter. For filtering, a second order Bessel filter is used. The critical frequency (also called cut-off frequency) of the filter is defined via parameter f_crit in [Hz]. This value should be selected in such a way that it is higher as the essential low frequencies in the signal.

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).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Booleanexactfalsetrue/false exact treatment/filtering the input signal
Frequencyf_crit50if exact=false, critical frequency of filter to filter input signal [Hz]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component
input RealInputs_refReference position of flange as input signal

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Speed Modelica.Mechanics.Translational.Sources.Speed

Forced movement of a flange according to a reference speed

Modelica.Mechanics.Translational.Sources.Speed

Information


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:

  1. exact=true
    The reference speed is treated exactly. This is only possible, if the input signal is defined by an analytical function which can be differentiated at least once. If this prerequisite is fulfilled, the Modelica translator will differentiate the input signal once in order to compute the reference acceleration of the flange.
  2. exact=false
    The reference speed is filtered and the first derivative of the filtered curve is used to compute the reference acceleration of the flange. This first derivative is not computed by numerical differentiation but by an appropriate realization of the filter. For filtering, a first order filter is used. The critical frequency (also called cut-off frequency) of the filter is defined via parameter f_crit in [Hz]. This value should be selected in such a way that it is higher as the essential low frequencies in the signal.

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).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Booleanexactfalsetrue/false exact treatment/filtering the input signal
Frequencyf_crit50if exact=false, critical frequency of filter to filter input signal [Hz]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component
input RealInputv_refReference speed of flange as input signal

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Accelerate Modelica.Mechanics.Translational.Sources.Accelerate

Forced movement of a flange according to an acceleration signal

Modelica.Mechanics.Translational.Sources.Accelerate

Information


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).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component
input RealInputa_refAbsolute acceleration of flange as input signal

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Move Modelica.Mechanics.Translational.Sources.Move

Forced movement of a flange according to a position, velocity and acceleration signal

Modelica.Mechanics.Translational.Sources.Move

Information


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).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component
input RealInputu[3]Position, velocity and acceleration of flange as input signals

Modelica definition

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";
protected 
  function 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;

Modelica.Mechanics.Translational.Sources.Force Modelica.Mechanics.Translational.Sources.Force

External force acting on a drive train element as input signal

Modelica.Mechanics.Translational.Sources.Force

Information


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).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component
input RealInputfDriving force as input signal

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Force2 Modelica.Mechanics.Translational.Sources.Force2

Input signal acting as torque on two flanges

Modelica.Mechanics.Translational.Sources.Force2

Information


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 ).

Connectors

TypeNameDescription
Flange_aflange_a(left) driving flange (flange axis directed in to cut plane, e. g. from left to right)
Flange_bflange_b(right) driven flange (flange axis directed out of cut plane)
input RealInputfDriving force as input signal

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.LinearSpeedDependentForce Modelica.Mechanics.Translational.Sources.LinearSpeedDependentForce

Linear dependency of force versus speed

Modelica.Mechanics.Translational.Sources.LinearSpeedDependentForce

Information


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)).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Forcef_nominal Nominal force (if negative, force is acting as load) [N]
BooleanForceDirectiontrueSame direction of force in both directions of movement
Velocityv_nominal Nominal speed [m/s]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.QuadraticSpeedDependentForce Modelica.Mechanics.Translational.Sources.QuadraticSpeedDependentForce

Quadratic dependency of force versus speed

Modelica.Mechanics.Translational.Sources.QuadraticSpeedDependentForce

Information


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)).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Forcef_nominal Nominal force (if negative, force is acting as load) [N]
BooleanForceDirectiontrueSame direction of force in both directions of movement
Velocityv_nominal Nominal speed [m/s]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.ConstantForce Modelica.Mechanics.Translational.Sources.ConstantForce

Constant force, not dependent on speed

Modelica.Mechanics.Translational.Sources.ConstantForce

Information


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)).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Forcef_constant Nominal force (if negative, force is acting as load) [N]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.ConstantSpeed Modelica.Mechanics.Translational.Sources.ConstantSpeed

Constant speed, not dependent on force

Modelica.Mechanics.Translational.Sources.ConstantSpeed

Information


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)).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
Velocityv_fixed Fixed speed (if negative, force is acting as load) [m/s]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.ForceStep Modelica.Mechanics.Translational.Sources.ForceStep

Constant force, not dependent on speed

Modelica.Mechanics.Translational.Sources.ForceStep

Information


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)).

Parameters

TypeNameDefaultDescription
BooleanuseSupportfalse= true, if support flange enabled, otherwise implicitly grounded
ForcestepForce Height of force step (if negative, force is acting as load) [N]
ForceoffsetForce Offset of force [N]
TimestartTime0Force = offset for time < startTime [s]

Connectors

TypeNameDescription
Flange_bflangeFlange of component
SupportsupportSupport/housing of component

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Move.position_der

Inputs

TypeNameDefaultDescription
Realq_qd_qdd[3] Required values for position, speed, acceleration
Realdummy Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)
Realdummy_der  

Outputs

TypeNameDescription
Realqd 

Modelica definition

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;

Modelica.Mechanics.Translational.Sources.Move.position_der2

Inputs

TypeNameDefaultDescription
Realq_qd_qdd[3] Required values for position, speed, acceleration
Realdummy Just to have one input signal that should be differentiated to avoid possible problems in the Modelica tool (is not used)
Realdummy_der  
Realdummy_der2  

Outputs

TypeNameDescription
Realqdd 

Modelica definition

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;

Automatically generated Fri Nov 12 16:30:51 2010.