Modelica.Mechanics.MultiBody.Sensors.Internal

Internal package, should not be used by user

Information

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteSensor PartialAbsoluteSensor Partial absolute sensor model for sensors defined by components
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor PartialAbsoluteBaseSensor Partial absolute sensor models for sensors defined by equations (frame_resolve must be connected exactly once)
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeSensor PartialRelativeSensor Partial relative sensor model for sensors defined by components
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor PartialRelativeBaseSensor Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsolutePosition BasicAbsolutePosition Measure absolute position vector (same as Sensors.AbsolutePosition, but frame_resolve is not conditional and must be connected)
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsoluteAngularVelocity BasicAbsoluteAngularVelocity Measure absolute angular velocity
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativePosition BasicRelativePosition Measure relative position vector (same as Sensors.RelativePosition, but frame_resolve is not conditional and must be connected)
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativeAngularVelocity BasicRelativeAngularVelocity Measure relative angular velocity
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformAbsoluteVector BasicTransformAbsoluteVector Transform absolute vector in to another frame
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformRelativeVector BasicTransformRelativeVector Transform relative vector in to another frame
Modelica.Mechanics.MultiBody.Sensors.Internal.ZeroForceAndTorque ZeroForceAndTorque Set force and torque to zero
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceSensor PartialCutForceSensor Base model to measure the cut force and/or torque between two frames, defined by components
Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor PartialCutForceBaseSensor Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutForce BasicCutForce Measure cut force vector (frame_resolve must be connected)
Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutTorque BasicCutTorque Measure cut torque vector (frame_resolve must be connected)


Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteSensor

Partial absolute sensor model for sensors defined by components

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system at which the kinematic quantities are measured

Modelica definition

partial model PartialAbsoluteSensor 
  "Partial absolute sensor model for sensors defined by components"
  extends Modelica.Icons.RotationalSensor;

  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a 
    "Coordinate system at which the kinematic quantities are measured";

equation 
   assert(cardinality(frame_a) > 0, "Connector frame_a must be connected at least once");
end PartialAbsoluteSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor

Partial absolute sensor models for sensors defined by equations (frame_resolve must be connected exactly once)

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved

Modelica definition

model PartialAbsoluteBaseSensor 
  "Partial absolute sensor models for sensors defined by equations (frame_resolve must be connected exactly once)"
  extends Modelica.Icons.RotationalSensor;

  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a 
    "Coordinate system from which kinematic quantities are measured";

  Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve 
    "Coordinate system in which vector is optionally resolved";

equation 
   assert(cardinality(frame_a) > 0, "Connector frame_a must be connected at least once");
   assert(cardinality(frame_resolve) == 1, "Connector frame_resolve must be connected exactly once");
   frame_a.f = zeros(3);
   frame_a.t = zeros(3);
   frame_resolve.f = zeros(3);
   frame_resolve.t = zeros(3);
end PartialAbsoluteBaseSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeSensor

Partial relative sensor model for sensors defined by components

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b

Modelica definition

partial model PartialRelativeSensor 
  "Partial relative sensor model for sensors defined by components"
  extends Modelica.Icons.RotationalSensor;

  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a "Coordinate system a";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b "Coordinate system b";

equation 
   assert(cardinality(frame_a) > 0, "Connector frame_a must be connected at least once");
   assert(cardinality(frame_b) > 0, "Connector frame_b must be connected at least once");
end PartialRelativeSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor

Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a (measurement is between frame_a and frame_b)
Frame_bframe_bCoordinate system b (measurement is between frame_a and frame_b)
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved

Modelica definition

model PartialRelativeBaseSensor 
  "Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)"
  extends Modelica.Icons.RotationalSensor;

  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a 
    "Coordinate system a (measurement is between frame_a and frame_b)";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b 
    "Coordinate system b (measurement is between frame_a and frame_b)";

  Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve 
    "Coordinate system in which vector is optionally resolved";

equation 
   assert(cardinality(frame_a) > 0, "Connector frame_a must be connected at least once");
   assert(cardinality(frame_b) > 0, "Connector frame_b must be connected at least once");
   assert(cardinality(frame_resolve) == 1, "Connector frame_resolve must be connected exactly once");
   frame_a.f = zeros(3);
   frame_a.t = zeros(3);
   frame_b.f = zeros(3);
   frame_b.t = zeros(3);
   frame_resolve.f = zeros(3);
   frame_resolve.t = zeros(3);
end PartialRelativeBaseSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsolutePosition Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsolutePosition

Measure absolute position vector (same as Sensors.AbsolutePosition, but frame_resolve is not conditional and must be connected)

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsolutePosition

Information

Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor (Partial absolute sensor models for sensors defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector r is resolved (1: world, 2: frame_a, 3: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
output RealOutputr[3]Absolute position vector frame_a.r_0 resolved in frame defined by resolveInFrame [m]

Modelica definition

model BasicAbsolutePosition 
  "Measure absolute position vector (same as Sensors.AbsolutePosition, but frame_resolve is not conditional and must be connected)"
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameA;
  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput r[3](each final quantity="Position", each final 
            unit = "m") 
    "Absolute position vector frame_a.r_0 resolved in frame defined by resolveInFrame";

  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a 
    "Frame in which output vector r is resolved (1: world, 2: frame_a, 3: frame_resolve)";

equation 
   if resolveInFrame == ResolveInFrameA.world then
      r = frame_a.r_0;
   elseif resolveInFrame == ResolveInFrameA.frame_a then
      r = Frames.resolve2(frame_a.R, frame_a.r_0);
   elseif resolveInFrame == ResolveInFrameA.frame_resolve then
      r = Frames.resolve2(frame_resolve.R, frame_a.r_0);
   else
      assert(false, "Wrong value for parameter resolveInFrame");
      r = zeros(3);
   end if;
end BasicAbsolutePosition;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsoluteAngularVelocity Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsoluteAngularVelocity

Measure absolute angular velocity

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicAbsoluteAngularVelocity

Information

Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor (Partial absolute sensor models for sensors defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector w is resolved (1: world, 2: frame_a, 3: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
output RealOutputw[3]Absolute angular velocity vector [rad/s]

Modelica definition

model BasicAbsoluteAngularVelocity 
  "Measure absolute angular velocity"
  import Modelica.Mechanics.MultiBody.Frames;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameA;

  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialAbsoluteBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput w[3](final quantity="AngularVelocity",final unit = "rad/s") 
    "Absolute angular velocity vector";
  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a 
    "Frame in which output vector w is resolved (1: world, 2: frame_a, 3: frame_resolve)";

equation 
   if resolveInFrame == ResolveInFrameA.world then
      w = Frames.angularVelocity1(frame_a.R);
   elseif resolveInFrame == ResolveInFrameA.frame_a then
      w = Frames.angularVelocity2(frame_a.R);
   elseif resolveInFrame == ResolveInFrameA.frame_resolve then
      w = Frames.resolveRelative(Frames.angularVelocity1(frame_a.R), frame_a.R, frame_resolve.R);
   else
      assert(false, "Wrong value for parameter resolveInFrame");
      w = zeros(3);
   end if;
end BasicAbsoluteAngularVelocity;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativePosition Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativePosition

Measure relative position vector (same as Sensors.RelativePosition, but frame_resolve is not conditional and must be connected)

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativePosition

Information

Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor (Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameABresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector r_rel is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a (measurement is between frame_a and frame_b)
Frame_bframe_bCoordinate system b (measurement is between frame_a and frame_b)
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
output RealOutputr_rel[3]Relative position vector frame_b.r_0 - frame_a.r_0 resolved in frame defined by resolveInFrame [m]

Modelica definition

model BasicRelativePosition 
  "Measure relative position vector (same as Sensors.RelativePosition, but frame_resolve is not conditional and must be connected)"
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB;
  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput r_rel[3](each final quantity="Position", each final 
            unit = "m") 
    "Relative position vector frame_b.r_0 - frame_a.r_0 resolved in frame defined by resolveInFrame";
    

  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_a 
    "Frame in which output vector r_rel is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)";

equation 
   if resolveInFrame == ResolveInFrameAB.frame_a then
      r_rel = Frames.resolve2(frame_a.R, frame_b.r_0 - frame_a.r_0);
   elseif resolveInFrame == ResolveInFrameAB.frame_b then
      r_rel = Frames.resolve2(frame_b.R, frame_b.r_0 - frame_a.r_0);
   elseif resolveInFrame == ResolveInFrameAB.world then
      r_rel = frame_b.r_0 - frame_a.r_0;
   elseif resolveInFrame == ResolveInFrameAB.frame_resolve then
      r_rel = Frames.resolve2(frame_resolve.R, frame_b.r_0 - frame_a.r_0);
   else
      assert(false, "Wrong value for parameter resolveInFrame");
      r_rel = zeros(3);
   end if;
end BasicRelativePosition;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativeAngularVelocity Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativeAngularVelocity

Measure relative angular velocity

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicRelativeAngularVelocity

Information

Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor (Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameABresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector w_rel is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a (measurement is between frame_a and frame_b)
Frame_bframe_bCoordinate system b (measurement is between frame_a and frame_b)
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
output RealOutputw_rel[3]Relative angular velocity vector [rad/s]

Modelica definition

model BasicRelativeAngularVelocity 
  "Measure relative angular velocity"
  import Modelica.Mechanics.MultiBody.Frames;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB;

  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput w_rel[3](final quantity="AngularVelocity",final unit = "rad/s") 
    "Relative angular velocity vector";
  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_a 
    "Frame in which output vector w_rel is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)";

protected 
  Modelica.Mechanics.MultiBody.Frames.Orientation R_rel 
    "Relative orientation object from frame_a to frame_b";
equation 
   R_rel = Frames.relativeRotation(frame_a.R, frame_b.R);
   if resolveInFrame == ResolveInFrameAB.frame_a then
      w_rel = Frames.angularVelocity1(R_rel);
   elseif resolveInFrame == ResolveInFrameAB.frame_b then
      w_rel = Frames.angularVelocity2(R_rel);
   elseif resolveInFrame == ResolveInFrameAB.world then
      w_rel = Frames.resolve1(frame_a.R, Frames.angularVelocity1(R_rel));
   elseif resolveInFrame == ResolveInFrameAB.frame_resolve then
      w_rel = Frames.resolveRelative(Frames.angularVelocity1(R_rel), frame_a.R, frame_resolve.R);
   else
      assert(false, "Wrong value for parameter resolveInFrame");
      w_rel = zeros(3);
   end if;
end BasicRelativeAngularVelocity;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformAbsoluteVector Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformAbsoluteVector

Transform absolute vector in to another frame

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformAbsoluteVector

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Parameters

TypeNameDefaultDescription
ResolveInFrameAframe_r_inModelica.Mechanics.MultiBody...Frame in which vector r_in is resolved (1: world, 2: frame_a, 3: frame_resolve)
ResolveInFrameAframe_r_outframe_r_inFrame in which vector r_out (= r_in in other frame) is resolved (1: world, 2: frame_a, 3: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system from which absolute kinematic quantities are measured
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out

Modelica definition

model BasicTransformAbsoluteVector 
  "Transform absolute vector in to another frame"
  import Modelica.Mechanics.MultiBody.Frames;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameA;

  extends Modelica.Icons.RotationalSensor;

  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA frame_r_in=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a 
    "Frame in which vector r_in is resolved (1: world, 2: frame_a, 3: frame_resolve)";
  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA frame_r_out=
                  frame_r_in 
    "Frame in which vector r_out (= r_in in other frame) is resolved (1: world, 2: frame_a, 3: frame_resolve)";

  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a 
    "Coordinate system from which absolute kinematic quantities are measured";

  Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve 
    "Coordinate system in which vector is optionally resolved";

  Blocks.Interfaces.RealInput r_in[3] 
    "Input vector resolved in frame defined by frame_r_in";
  Blocks.Interfaces.RealOutput r_out[3] 
    "Input vector r_in resolved in frame defined by frame_r_out";

protected 
  Modelica.Mechanics.MultiBody.Frames.Orientation R1 
    "Orientation object from world frame to frame in which r_in is resolved";
equation 
   assert(cardinality(frame_a) > 0, "Connector frame_a must be connected at least once");
   assert(cardinality(frame_resolve) == 1, "Connector frame_resolve must be connected exactly once");
   frame_a.f = zeros(3);
   frame_a.t = zeros(3);
   frame_resolve.f = zeros(3);
   frame_resolve.t = zeros(3);

   if frame_r_out == frame_r_in then
      r_out = r_in;
      R1 = Frames.nullRotation();
   else
      if frame_r_in == ResolveInFrameA.world then
         R1 = Frames.nullRotation();
      elseif frame_r_in == ResolveInFrameA.frame_a then
         R1 = frame_a.R;
      elseif frame_r_in == ResolveInFrameA.frame_resolve then
         R1 = frame_resolve.R;
      else
         assert(false, "Wrong value for parameter frame_r_in");
         R1 = Frames.nullRotation();
      end if;

      if frame_r_out == ResolveInFrameA.world then
         r_out = Frames.resolve1(R1, r_in);
      elseif frame_r_out == ResolveInFrameA.frame_a then
         r_out = Frames.resolveRelative(r_in, R1, frame_a.R);
      elseif frame_r_out == ResolveInFrameA.frame_resolve then
         r_out = Frames.resolveRelative(r_in, R1, frame_resolve.R);
      else
         assert(false, "Wrong value for parameter frame_r_out");
         r_out = zeros(3);
      end if;
   end if;
end BasicTransformAbsoluteVector;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformRelativeVector Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformRelativeVector

Transform relative vector in to another frame

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicTransformRelativeVector

Information

Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor (Partial relative sensor models for sensors defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameABframe_r_inModelica.Mechanics.MultiBody...Frame in which vector r_in is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)
ResolveInFrameABframe_r_outframe_r_inFrame in which vector r_out (= r_in in other frame) is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a (measurement is between frame_a and frame_b)
Frame_bframe_bCoordinate system b (measurement is between frame_a and frame_b)
Frame_resolveframe_resolveCoordinate system in which vector is optionally resolved
input RealInputr_in[3]Input vector resolved in frame defined by frame_r_in
output RealOutputr_out[3]Input vector r_in resolved in frame defined by frame_r_out

Modelica definition

model BasicTransformRelativeVector 
  "Transform relative vector in to another frame"
  import Modelica.Mechanics.MultiBody.Frames;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB;
  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialRelativeBaseSensor;
  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB frame_r_in=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB.frame_a 
    "Frame in which vector r_in is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)";
  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameAB frame_r_out=
                  frame_r_in 
    "Frame in which vector r_out (= r_in in other frame) is resolved (1: world, 2: frame_a, 3: frame_b, 4: frame_resolve)";

  Blocks.Interfaces.RealInput r_in[3] 
    "Input vector resolved in frame defined by frame_r_in";
  Blocks.Interfaces.RealOutput r_out[3] 
    "Input vector r_in resolved in frame defined by frame_r_out";

protected 
  Modelica.Mechanics.MultiBody.Frames.Orientation R1 
    "Orientation object from world frame to frame in which r_in is resolved";
equation 
   if frame_r_out == frame_r_in then
      r_out = r_in;
      R1 = Frames.nullRotation();
   else
      if frame_r_in == ResolveInFrameAB.world then
         R1 = Frames.nullRotation();
      elseif frame_r_in == ResolveInFrameAB.frame_a then
         R1 = frame_a.R;
      elseif frame_r_in == ResolveInFrameAB.frame_b then
         R1 = frame_b.R;
      else
         R1 = frame_resolve.R;
      end if;

      if frame_r_out == ResolveInFrameAB.world then
         r_out = Frames.resolve1(R1, r_in);
      elseif frame_r_out == ResolveInFrameAB.frame_a then
         r_out = Frames.resolveRelative(r_in, R1, frame_a.R);
      elseif frame_r_out == ResolveInFrameAB.frame_b then
         r_out = Frames.resolveRelative(r_in, R1, frame_b.R);
      else
         r_out = Frames.resolveRelative(r_in, R1, frame_resolve.R);
      end if;
   end if;
end BasicTransformRelativeVector;

Modelica.Mechanics.MultiBody.Sensors.Internal.ZeroForceAndTorque Modelica.Mechanics.MultiBody.Sensors.Internal.ZeroForceAndTorque

Set force and torque to zero

Modelica.Mechanics.MultiBody.Sensors.Internal.ZeroForceAndTorque

Information

Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
Frame_aframe_a 

Modelica definition

model ZeroForceAndTorque "Set force and torque to zero"
   extends Modelica.Blocks.Interfaces.BlockIcon;
  Interfaces.Frame_a frame_a;
equation 
  frame_a.f = zeros(3);
  frame_a.t = zeros(3);
end ZeroForceAndTorque;

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceSensor

Base model to measure the cut force and/or torque between two frames, defined by components

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceSensor

Information


This is a base class for 3-dim. mechanical components with two frames and one output port in order to measure the cut-force and/or cut-torque acting between the two frames and to provide the measured signals as output for further processing with the blocks of package Modelica.Blocks.

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector(s) is/are resolved (1: world, 2: frame_a, 3: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveOutput vectors are optionally resolved in this frame (cut-force/-torque are set to zero)

Modelica definition

partial model PartialCutForceSensor 
  "Base model to measure the cut force and/or torque between two frames, defined by components"

  extends Modelica.Icons.RotationalSensor;
  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a "Coordinate system a";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b "Coordinate system b";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve if 
         resolveInFrame==Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_resolve 
    "Output vectors are optionally resolved in this frame (cut-force/-torque are set to zero)";
    

  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a 
    "Frame in which output vector(s) is/are resolved (1: world, 2: frame_a, 3: frame_resolve)";

protected 
  outer Modelica.Mechanics.MultiBody.World world;
equation 
  assert(cardinality(frame_a) > 0,
    "Connector frame_a of cut-force/-torque sensor object is not connected");
  assert(cardinality(frame_b) > 0,
    "Connector frame_b of cut-force/-torque sensor object is not connected");

end PartialCutForceSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor

Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)

Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor

Information


This is a base class for 3-dim. mechanical components with two frames and one output port in order to measure the cut-force and/or cut-torque acting between the two frames and to provide the measured signals as output for further processing with the blocks of package Modelica.Blocks.

Extends from Modelica.Icons.RotationalSensor (Icon representing a round measurement device).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector is resolved (1: world, 2: frame_a, 3: frame_resolve)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveThe output vector is optionally resolved in this frame (cut-force/-torque are set to zero)

Modelica definition

partial model PartialCutForceBaseSensor 
  "Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)"

  extends Modelica.Icons.RotationalSensor;
  Modelica.Mechanics.MultiBody.Interfaces.Frame_a frame_a "Coordinate system a";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_b frame_b "Coordinate system b";
  Modelica.Mechanics.MultiBody.Interfaces.Frame_resolve frame_resolve 
    "The output vector is optionally resolved in this frame (cut-force/-torque are set to zero)";
    

  parameter Modelica.Mechanics.MultiBody.Types.ResolveInFrameA
    resolveInFrame=
  Modelica.Mechanics.MultiBody.Types.ResolveInFrameA.frame_a 
    "Frame in which output vector is resolved (1: world, 2: frame_a, 3: frame_resolve)";

protected 
  outer Modelica.Mechanics.MultiBody.World world;
equation 
  Connections.branch(frame_a.R, frame_b.R);
  assert(cardinality(frame_a) > 0,
    "Connector frame_a of cut-force/-torque sensor object is not connected");
  assert(cardinality(frame_b) > 0,
    "Connector frame_b of cut-force/-torque sensor object is not connected");

  // frame_a and frame_b are identical
  frame_a.r_0 = frame_b.r_0;
  frame_a.R = frame_b.R;

  // force and torque balance
  zeros(3) = frame_a.f + frame_b.f;
  zeros(3) = frame_a.t + frame_b.t;
  frame_resolve.f = zeros(3);
  frame_resolve.t = zeros(3);
end PartialCutForceBaseSensor;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutForce Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutForce

Measure cut force vector (frame_resolve must be connected)

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutForce

Information



Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor (Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector is resolved (1: world, 2: frame_a, 3: frame_resolve)
BooleanpositiveSigntrue= true, if force with positive sign is returned (= frame_a.f), otherwise with negative sign (= frame_b.f)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveThe output vector is optionally resolved in this frame (cut-force/-torque are set to zero)
output RealOutputforce[3]Cut force resolved in frame defined by resolveInFrame [N]

Modelica definition

model BasicCutForce 
  "Measure cut force vector (frame_resolve must be connected)"

  import SI = Modelica.SIunits;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameA;
  import Modelica.Mechanics.MultiBody.Frames;

  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput force[3](final quantity="Force", final unit="N") 
    "Cut force resolved in frame defined by resolveInFrame";
    parameter Boolean positiveSign=true 
    "= true, if force with positive sign is returned (= frame_a.f), otherwise with negative sign (= frame_b.f)";
protected 
  parameter Integer csign=if positiveSign then +1 else -1;
equation 
   if resolveInFrame == ResolveInFrameA.world then
      force = Frames.resolve1(frame_a.R, frame_a.f)*csign;
   elseif resolveInFrame == ResolveInFrameA.frame_a then
      force = frame_a.f*csign;
   elseif resolveInFrame == ResolveInFrameA.frame_resolve then
      force = Frames.resolveRelative(frame_a.f, frame_a.R, frame_resolve.R)*csign;
   else
      assert(false,"Wrong value for parameter resolveInFrame");
      force = zeros(3);
   end if;
end BasicCutForce;

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutTorque Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutTorque

Measure cut torque vector (frame_resolve must be connected)

Modelica.Mechanics.MultiBody.Sensors.Internal.BasicCutTorque

Information



Extends from Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor (Base model to measure the cut force and/or torque between two frames, defined by equations (frame_resolve must be connected exactly once)).

Parameters

TypeNameDefaultDescription
ResolveInFrameAresolveInFrameModelica.Mechanics.MultiBody...Frame in which output vector is resolved (1: world, 2: frame_a, 3: frame_resolve)
BooleanpositiveSigntrue= true, if torque with positive sign is returned (= frame_a.t), otherwise with negative sign (= frame_b.t)

Connectors

TypeNameDescription
Frame_aframe_aCoordinate system a
Frame_bframe_bCoordinate system b
Frame_resolveframe_resolveThe output vector is optionally resolved in this frame (cut-force/-torque are set to zero)
output RealOutputtorque[3]Cut torque resolved in frame defined by resolveInFrame [N.m]

Modelica definition

model BasicCutTorque 
  "Measure cut torque vector (frame_resolve must be connected)"

  import SI = Modelica.SIunits;
  import Modelica.Mechanics.MultiBody.Types.ResolveInFrameA;
  import Modelica.Mechanics.MultiBody.Frames;

  extends Modelica.Mechanics.MultiBody.Sensors.Internal.PartialCutForceBaseSensor;
  Modelica.Blocks.Interfaces.RealOutput torque[3](final quantity="Torque", final unit=
        "N.m") "Cut torque resolved in frame defined by resolveInFrame";

  parameter Boolean positiveSign=true 
    "= true, if torque with positive sign is returned (= frame_a.t), otherwise with negative sign (= frame_b.t)";

protected 
  parameter Integer csign=if positiveSign then +1 else -1;
equation 
   if resolveInFrame == ResolveInFrameA.world then
      torque = Frames.resolve1(frame_a.R, frame_a.t)*csign;
   elseif resolveInFrame == ResolveInFrameA.frame_a then
      torque = frame_a.t*csign;
   elseif resolveInFrame == ResolveInFrameA.frame_resolve then
      torque = Frames.resolveRelative(frame_a.t, frame_a.R, frame_resolve.R)*csign;
   else
      assert(false,"Wrong value for parameter resolveInFrame");
      torque = zeros(3);
   end if;
end BasicCutTorque;

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