modelRRMotor1

Extends from Modelica.Icons.Example (Icon for runnable examples), Servomechanisms.Examples.RRServomechanism.Data (RR Servomechanism Data).

Information

General

With this example the user can characterize the motor for a selected joint by its transfer function assuming a first order transfer function. With the transfer function obtained a proportional gain is then calculated for a proportional control.

Implementation

The system is interconnected using the SignalDCMotor for one joint and a Position source for the other joint (to maintain it at its initial position).
Once simulated, the values of tau (time constant T) and K (gain k) are obtain for the equivalent first order transfer function with the relations:
K = gain of system for steady state/ reference value
tau = time to reach ~ 0.63K

Then the proportional gain is calculated for a maximum overshot (O) requirement using the following equation:
kpequation.png
Note that O is the overshot value (for example 0.1) not a porcentual overshoot PO (for example 10%).

Notes

  • The PID block controller type must be .Modelica.Blocks.Types.SimpleController.P for proportional control.
  • At the moment the K and tau values are obtain after simulating and observing speed responce of motor.
  • At the moment the kp value should be calculated externally, although it could be implemented using a modelica function

Example

Results:

rrmotor1.png
rrmotor12.png

Parameters

TypeNameDefaultDescription
Reall1 (from Data)0.2
Realw1 (from Data)0.02
Realh1 (from Data)0.005
Reald1 (from Data)400
Realmin1 (from Data)0
Realmax1 (from Data)pi/2
Reall2 (from Data)0.1
Realw2 (from Data)0.02
Realh2 (from Data)0.005
Reald2 (from Data)400
Realmin2 (from Data)-pi/2
Realmax2 (from Data)pi/2
Realr (from Data)0.03
Realxc (from Data)0.25
Realyc (from Data)0.075
Realratio1 (from Data)10
Realratio2 (from Data)5
Realperiod (from Data)8
RealR (from Data)0.101
RealL (from Data)0.0000266
Realk (from Data)0.0115
RealJ (from Data)0.0000119
RealVoltage (from Data)12
Realkp2 (from Data)4.423
Realkp1 (from Data)7.1543

Components

TypeNameDefaultDescription
Modelica.Blocks.Sources.Stepstep1
Servomechanisms.Electrical.SignalDCMotorsignaldcmotor2
Modelica.Mechanics.Rotational.Components.IdealGearidealgear2
Modelica.Mechanics.Rotational.Sources.Positionposition1
Modelica.Blocks.Sources.Stepstep2
Modelica.Blocks.Continuous.FirstOrderfirstorder1
Servomechanisms.Mechanism.RRrr1
Modelica.Mechanics.Rotational.Sensors.SpeedSensorspeedsensor1
Modelica.Blocks.Continuous.FirstOrderfirstorder2
Modelica.Blocks.Continuous.Integratorintegrator1
Modelica.Blocks.Sources.Stepstep3
Modelica.Blocks.Continuous.LimPIDPID