Package Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components
Library of components of the robot

Information

This library contains the different components of the r3 robot. Usually, there is no need to use this library directly.

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

Package Contents

NameDescription
AxisControlBusData bus for one robot axis
AxisType1Axis model of the r3 joints 1,2,3
AxisType2Axis model of the r3 joints 4,5,6
ControlBusData bus for all axes of robot
ControllerP-PI cascade controller for one axis
GearType1Motor inertia and gearbox model for r3 joints 1,2,3
GearType2Motor inertia and gearbox model for r3 joints 4,5,6
MechanicalStructureModel of the mechanical part of the r3 robot (without animation)
MotorMotor model including current controller of r3 motors
PathPlanning1Generate reference angles for fastest kinematic movement
PathPlanning6Generate reference angles for fastest kinematic movement
PathToAxisControlBusMap path planning to one axis control bus

Expandable Connector Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​AxisControlBus
Data bus for one robot axis

Information

Signal bus that is used to communicate all signals for one axis. This is an expandable connector which has a "default" set of signals. Note, the input/output causalities of the signals are determined from the connections to this bus.

Extends from Modelica.​Icons.​SignalSubBus (Icon for signal sub-bus).

Fields

TypeNameDescription
Booleanmotion_ref= true, if reference motion is not in rest
Angleangle_refReference angle of axis flange
AngleangleAngle of axis flange
AngularVelocityspeed_refReference speed of axis flange
AngularVelocityspeedSpeed of axis flange
AngularAccelerationacceleration_refReference acceleration of axis flange
AngularAccelerationaccelerationAcceleration of axis flange
Currentcurrent_refReference current of motor
CurrentcurrentCurrent of motor
AnglemotorAngleAngle of motor flange
AngularVelocitymotorSpeedSpeed of motor flange

Expandable Connector Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​ControlBus
Data bus for all axes of robot

Information

Signal bus that is used to communicate all signals of the robot. This is an expandable connector which has a "default" set of signals. Note, the input/output causalities of the signals are determined from the connections to this bus.

Extends from Modelica.​Icons.​SignalBus (Icon for signal bus).

Fields

TypeNameDescription
AxisControlBusaxisControlBus1Bus of axis 1
AxisControlBusaxisControlBus2Bus of axis 2
AxisControlBusaxisControlBus3Bus of axis 3
AxisControlBusaxisControlBus4Bus of axis 4
AxisControlBusaxisControlBus5Bus of axis 5
AxisControlBusaxisControlBus6Bus of axis 6

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​PathPlanning1
Generate reference angles for fastest kinematic movement

Information

Given

this component computes the fastest movement under the given constraints. This means, that:

  1. The axis accelerates with the maximum acceleration until the maximum speed is reached.
  2. Drives with the maximum speed as long as possible.
  3. Decelerates with the negative of the maximum acceleration until rest.

The acceleration, constant velocity and deceleration phase are determined in such a way that the movement starts form the start angles and ends at the end angles. The output of this block are the computed angles, angular velocities and angular acceleration and this information is stored as reference motion on the controlBus of the r3 robot.

Extends from Modelica.​Blocks.​Icons.​Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
RealangleBegDeg0Start angle
RealangleEndDeg1End angle
AngularVelocityspeedMax3Maximum axis speed
AngularAccelerationaccMax2.5Maximum axis acceleration
TimestartTime0Start time of movement
TimeswingTime0.5Additional time after reference motion is in rest before simulation is stopped
final AngleangleBegCv.from_deg(angleBegDeg)Start angles
final AngleangleEndCv.from_deg(angleEndDeg)End angles

Connectors

TypeNameDescription
ControlBuscontrolBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​PathPlanning6
Generate reference angles for fastest kinematic movement

Information

Given

this component computes the fastest movement under the given constraints. This means, that:

  1. Every axis accelerates with the maximum acceleration until the maximum speed is reached.
  2. Drives with the maximum speed as long as possible.
  3. Decelerates with the negative of the maximum acceleration until rest.

The acceleration, constant velocity and deceleration phase are determined in such a way that the movement starts form the start angles and ends at the end angles. The output of this block are the computed angles, angular velocities and angular acceleration and this information is stored as reference motion on the controlBus of the r3 robot.

Extends from Modelica.​Blocks.​Icons.​Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Integernaxis6Number of driven axis
RealangleBegDeg[naxis]zeros(naxis)Start angles
RealangleEndDeg[naxis]ones(naxis)End angles
AngularVelocityspeedMax[naxis]fill(3, naxis)Maximum axis speed
AngularAccelerationaccMax[naxis]fill(2.5, naxis)Maximum axis acceleration
TimestartTime0Start time of movement
TimeswingTime0.5Additional time after reference motion is in rest before simulation is stopped
final AngleangleBeg[:]Cv.from_deg(angleBegDeg)Start angles
final AngleangleEnd[:]Cv.from_deg(angleEndDeg)End angles

Connectors

TypeNameDescription
ControlBuscontrolBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​PathToAxisControlBus
Map path planning to one axis control bus

Information

This model stores the 4 reference variables q, qd, qdd, moving from the path planning on the axis control bus.

Extends from Modelica.​Blocks.​Icons.​Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
IntegernAxis6Number of driven axis
IntegeraxisUsed1Map path planning of axisUsed to axisControlBus

Connectors

TypeNameDescription
input RealInputq[nAxis] 
input RealInputqd[nAxis] 
input RealInputqdd[nAxis] 
AxisControlBusaxisControlBus 
input BooleanInputmoving[nAxis] 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​GearType1
Motor inertia and gearbox model for r3 joints 1,2,3

Information

Models the gearbox used in the first three joints with all its effects, like elasticity and friction. Coulomb friction is approximated by a friction element acting at the "motor"-side. In reality, bearing friction should be also incorporated at the driven side of the gearbox. However, this would require considerable more effort for the measurement of the friction parameters. Default values for all parameters are given for joint 1. Model relativeStates is used to define the relative angle and relative angular velocity across the spring (=gear elasticity) as state variables. The reason is, that a default initial value of zero of these states makes always sense. If the absolute angle and the absolute angular velocity of model Jmotor would be used as states, and the load angle (= joint angle of robot) is NOT zero, one has always to ensure that the initial values of the motor angle and of the joint angle are modified correspondingly. Otherwise, the spring has an unrealistic deflection at initial time. Since relative quantities are used as state variables, this simplifies the definition of initial values considerably.

Extends from Modelica.​Mechanics.​Rotational.​Icons.​Gearbox (Icon of a gear box) and Modelica.​Mechanics.​Rotational.​Interfaces.​PartialTwoFlanges (Partial model for a component with two rotational 1-dim. shaft flanges).

Parameters

TypeNameDefaultDescription
Reali-105Gear ratio
Realc43Spring constant
Reald0.005Damper constant
TorqueRv00.4Viscous friction torque at zero velocity
RealRv18.125e-4Viscous friction coefficient (R=Rv0+Rv1*abs(qd))
Realpeak1Maximum static friction torque is peak*Rv0 (peak >= 1)

Connectors

TypeNameDescription
Flange_aflange_aFlange of left shaft
Flange_bflange_bFlange of right shaft

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​GearType2
Motor inertia and gearbox model for r3 joints 4,5,6

Information

The elasticity and damping in the gearboxes of the outermost three joints of the robot is neglected. Default values for all parameters are given for joint 4.

Extends from Modelica.​Mechanics.​Rotational.​Icons.​Gearbox (Icon of a gear box) and Modelica.​Mechanics.​Rotational.​Interfaces.​PartialTwoFlanges (Partial model for a component with two rotational 1-dim. shaft flanges).

Parameters

TypeNameDefaultDescription
Reali-99Gear ratio
TorqueRv021.8Viscous friction torque at zero velocity
RealRv19.8Viscous friction coefficient in [Nms/rad] (R=Rv0+Rv1*abs(qd))
Realpeak1.224770642201835Maximum static friction torque is peak*Rv0 (peak >= 1)

Connectors

TypeNameDescription
Flange_aflange_aFlange of left shaft
Flange_bflange_bFlange of right shaft

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​Motor
Motor model including current controller of r3 motors

Information

Default values are given for the motor of joint 1. The input of the motor is the desired current (the actual current is proportional to the torque produced by the motor).

Extends from Modelica.​Electrical.​Machines.​Icons.​Machine (Generic icon of an electric machine).

Parameters

TypeNameDefaultDescription
InertiaJ0.0013Moment of inertia of motor
Realk1.1616Gain of motor
Realw4590Time constant of motor
RealD0.6Damping constant of motor
AngularVelocityw_max315Maximum speed of motor
Currenti_max9Maximum current of motor

Connectors

TypeNameDescription
Flange_bflange_motor 
AxisControlBusaxisControlBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​Controller
P-PI cascade controller for one axis

Information

This controller has an inner PI-controller to control the motor speed, and an outer P-controller to control the motor position of one axis. The reference signals are with respect to the gear-output, and the gear ratio is used in the controller to determine the motor reference signals. All signals are communicated via the "axisControlBus".

Extends from Modelica.​Blocks.​Icons.​Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
Realkp10Gain of position controller
Realks1Gain of speed controller
TimeTs0.01Time constant of integrator of speed controller
Realratio1Gear ratio of gearbox

Connectors

TypeNameDescription
AxisControlBusaxisControlBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​AxisType1
Axis model of the r3 joints 1,2,3

Information

Model of axis 1, 2, 3 of the robot r3. An axis consists of a gearbox with modelled gear elasticity and bearing friction, a model of the electrical motor and a continuous-time cascade controller.

Extends from Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​AxisType2 (Axis model of the r3 joints 4,5,6).

Parameters

TypeNameDefaultDescription
Realkp10Gain of position controller
Realks1Gain of speed controller
TimeTs0.01Time constant of integrator of speed controller
Realk1.1616Gain of motor
Realw4590Time constant of motor
RealD0.6Damping constant of motor
InertiaJ0.0013Moment of inertia of motor
Realratio-105Gear ratio
TorqueRv00.4Viscous friction torque at zero velocity in [Nm]
RealRv18.125e-4Viscous friction coefficient in [Nms/rad]
Realpeak1Maximum static friction torque is peak*Rv0 (peak >= 1)
Realc43Spring constant
Realcd0.005Damper constant

Connectors

TypeNameDescription
Flange_bflange 
AxisControlBusaxisControlBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​AxisType2
Axis model of the r3 joints 4,5,6

Information

The axis model consists of the controller, the motor including current controller and the gearbox including gear elasticity and bearing friction. The only difference to the axis model of joints 4,5,6 (= model axisType2) is that elasticity and damping in the gear boxes are not neglected.

The input signals of this component are the desired angle and desired angular velocity of the joint. The reference signals have to be "smooth" (position has to be differentiable at least 2 times). Otherwise, the gear elasticity leads to significant oscillations.

Default values of the parameters are given for the axis of joint 1.

Parameters

TypeNameDefaultDescription
Realkp10Gain of position controller
Realks1Gain of speed controller
TimeTs0.01Time constant of integrator of speed controller
Realk1.1616Gain of motor
Realw4590Time constant of motor
RealD0.6Damping constant of motor
InertiaJ0.0013Moment of inertia of motor
Realratio-105Gear ratio
TorqueRv00.4Viscous friction torque at zero velocity in [Nm]
RealRv18.125e-4Viscous friction coefficient in [Nms/rad]
Realpeak1Maximum static friction torque is peak*Rv0 (peak >= 1)

Connectors

TypeNameDescription
Flange_bflange 
AxisControlBusaxisControlBus 

Model Modelica.​Mechanics.​MultiBody.​Examples.​Systems.​RobotR3.​Components.​MechanicalStructure
Model of the mechanical part of the r3 robot (without animation)

Information

This model contains the mechanical components of the r3 robot (multibody system).

Parameters

TypeNameDefaultDescription
Booleananimationtrue= true, if animation shall be enabled
MassmLoad15Mass of load
PositionrLoad[3]{0, 0.25, 0}Distance from last flange to load mass>
Accelerationg9.81Gravity acceleration

Connectors

TypeNameDescription
Flange_aaxis1 
Flange_aaxis2 
Flange_aaxis3 
Flange_aaxis4 
Flange_aaxis5 
Flange_aaxis6