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:
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:
Generated at 2024-11-23T19:25:52Z
by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos