modelTrapezoidalTrajectory

The outputs are the position and orientation of the platform to follow a line with a trapezoidal velocity profile (constant orientation)
Diagram of TrapezoidalTrajectory

Extends from StewartPlatform.Icons.TrapezoidalTrajectory (Icon for 'TrapezoidalTrajectory' model), PartialTrajectoryModel (This model collects all the common parameters and interfaces of the trajectory models).

Parameters

TypeNameDefaultDescription
Modelica.Mechanics.MultiBody.Types.RotationSequenceoutputSequence (from PartialTrajectoryModel)gp.defaultSequenceSequence of rotations in which the output pose is defined
Real[3]direction (from PartialTrajectoryModel)normalize(stopPosition - startPosition)Unit vector that indicates the direction of motion
SI.DistancetotalDistance (from PartialTrajectoryModel)norm(stopPosition - startPosition)Distance from initial point to final point
Frames.OrientationR_rel_start (from PartialTrajectoryModel)if rotationType_start == Modelica.Mechanics.MultiBody.Types.RotationTypes.RotationAxis then Frames.planarRotation(Modelica.Math.Vectors.normalizeWithAssert(n_start), from_deg(angle_start), 0) else if rotationType_start == Modelica.Mechanics.MultiBody.Types.RotationTypes.TwoAxesVectors then Frames.from_nxy(n_x_start, n_y_start) else Frames.axesRotations(sequence_start, from_deg(angles_start), zeros(3))Start: fixed rotation object from base frame to platform frame
Frames.OrientationR_rel_stop (from PartialTrajectoryModel)if rotationType_stop == Modelica.Mechanics.MultiBody.Types.RotationTypes.RotationAxis then Frames.planarRotation(Modelica.Math.Vectors.normalizeWithAssert(n_stop), from_deg(angle_stop), 0) else if rotationType_stop == Modelica.Mechanics.MultiBody.Types.RotationTypes.TwoAxesVectors then Frames.from_nxy(n_x_stop, n_y_stop) else Frames.axesRotations(sequence_stop, from_deg(angles_stop), zeros(3))Stop: fixed rotation object from base frame to platform frame
SI.Angle[3]startAngles (from PartialTrajectoryModel)Frames.axesRotationsAngles(R_rel_start, outputSequence)Start: initial values of angles to rotate base frame around 'Sequence' axes into platform frame
SI.Angle[3]stopAngles (from PartialTrajectoryModel)Frames.axesRotationsAngles(R_rel_stop, outputSequence)Stop: initial values of angles to rotate base frame around 'Sequence' axes into platform frame
SI.TimestopTime (from PartialTrajectoryModel)startTime + transitionTimeoutput = stopPosition for time>=stopTime
SI.VelocityinitialSpeed0Initial platform speed (direction = stopPosition-startPosition, in base frame)
SI.VelocityfinalSpeed0Final platform speed (direction = stopPosition-startPosition, in base frame)
SI.VelocitymaxSpeed1Max platform speed (direction = stopPosition-startPosition, in base frame)
SI.AccelerationmaxAcceleration1Max platform acceleration (direction = stopPosition-startPosition, in base frame)
Realtempif case == 1 then 1 else sqrt(0.5*initialSpeed^2 + 0.5*finalSpeed^2 + ai*totalDistance)
SI.TimeTiif case == 1 then Ti_bar else -initialSpeed/ai + temp/aiInitial acceletation time
SI.TimeTfif case == 1 then Tf_bar else (finalSpeed - initialSpeed - ai*Ti)/afFinal acceleration time
SI.TimeTcif case == 1 then (totalDistance - Ti*initialSpeed - Tf*maxSpeed - 0.5*ai*Ti^2 - 0.5*af*Tf^2)/maxSpeed else 0Constant speed time
Real[3]initialSpeedVectorinitialSpeed*direction
Real[3]finalSpeedVectorfinalSpeed*direction
Real[3]maxSpeedVectorif case == 1 then maxSpeed*direction else initialSpeedVector + ai*direction*Ti
Position
SI.Position[3]startPosition (from PartialTrajectoryModel)gp.initPlatformPosInitial platform position resolved in base frame
SI.Position[3]stopPosition (from PartialTrajectoryModel)startPositionFinal platform position resolved in base frame
Orientation › Initial orientation
Modelica.Mechanics.MultiBody.Types.RotationTypesrotationType_start (from PartialTrajectoryModel)Modelica.Mechanics.MultiBody.Types.RotationTypes.PlanarRotationSequenceStart: type of rotation description
Orientation › if rotationType_start = RotationAxis
Modelica.Mechanics.MultiBody.Types.Axisn_start (from PartialTrajectoryModel){1, 0, 0}Start: axis of rotation in base frame (= same as in platform frame)
NonSI.Angle_degangle_start (from PartialTrajectoryModel)0Start: angle to rotate base frame around axis n_start into platform frame
Orientation › if rotationType_start = TwoAxesVectors
Modelica.Mechanics.MultiBody.Types.Axisn_x_start (from PartialTrajectoryModel){1, 0, 0}Start: vector along x-axis of platform frame resolved in base frame
Modelica.Mechanics.MultiBody.Types.Axisn_y_start (from PartialTrajectoryModel){0, 1, 0}Start: vector along y-axis of platform frame resolved in base frame
Orientation › if rotationType_start = PlanarRotationSequence
Modelica.Mechanics.MultiBody.Types.RotationSequencesequence_start (from PartialTrajectoryModel)gp.initSequenceStart: sequence of rotation axes
NonSI.Angle_deg[3]angles_start (from PartialTrajectoryModel)to_deg(gp.initAngles)Start: rotation angles around the axes defined in 'sequence_start'
Orientation › Final orientation
Modelica.Mechanics.MultiBody.Types.RotationTypesrotationType_stop (from PartialTrajectoryModel)Modelica.Mechanics.MultiBody.Types.RotationTypes.PlanarRotationSequenceStop: type of rotation description
Orientation › if rotationType_stop = RotationAxis
Modelica.Mechanics.MultiBody.Types.Axisn_stop (from PartialTrajectoryModel)n_startStop: axis of rotation in base frame (= same as in platform frame)
NonSI.Angle_degangle_stop (from PartialTrajectoryModel)angle_startStop: angle to rotate base frame around axis n_stop into platform frame
Orientation › if rotationType_stop = TwoAxesVectors
Modelica.Mechanics.MultiBody.Types.Axisn_x_stop (from PartialTrajectoryModel)n_x_startStop: vector along x-axis of platform frame resolved in base frame
Modelica.Mechanics.MultiBody.Types.Axisn_y_stop (from PartialTrajectoryModel)n_y_startStop: vector along y-axis of platform frame resolved in base frame
Orientation › if rotationType_stop = PlanarRotationSequence
Modelica.Mechanics.MultiBody.Types.RotationSequencesequence_stop (from PartialTrajectoryModel)sequence_startStop: sequence of rotation axes
NonSI.Angle_deg[3]angles_stop (from PartialTrajectoryModel)angles_startStop: rotation angles around the axes defined in 'sequence_stop'
Time
SI.TimestartTime (from PartialTrajectoryModel)0output = startPosition for time<=startTime
SI.TimetransitionTime (from PartialTrajectoryModel)1Time required for the motion

Connectors

TypeNameDefaultDescription
Interfaces.Posepose (from PartialTrajectoryModel)

Components

TypeNameDefaultDescription
StewartPlatform.Components.GlobalParametersgp (from PartialTrajectoryModel)Object with all global parameters
SI.Position[3]position (from PartialTrajectoryModel)Current position vector
SI.Positiondistance (from PartialTrajectoryModel)Current distance from 'startPosition' to the current position
SI.Angle[3]angles (from PartialTrajectoryModel)Current angles
Interfaces.PoseMuxmux (from PartialTrajectoryModel)
Modelica.Blocks.Sources.Constantconst_startTime (from PartialTrajectoryModel)
Modelica.Blocks.Sources.Constantconst_stopTime (from PartialTrajectoryModel)
SI.Velocity[3]speedCurrent speed vector
SI.Acceleration[3]accelerationCurrent acceleration vector
SI.VelocityspeedModuleModule of current speed vector
SI.AccelerationaccelerationModuleModule of current acceleration vector