EasyManua.ls Logo

Standa 8SMC5-USB - Page 55

Standa 8SMC5-USB
345 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4.2.8. PID-algorithm for DC engine control
Algorithm description
DC engine is controlled by the PID regulator, with the coordinate as the controlled parameter. The controlled coordinate changes
according to motion settings and incoming commands to provide motion capability. We will call controller coordinate the running
position. DC engine winding PWM signal fill factor is the control signal of the regulator.
The control action is calculated according to the following formula:
, where:
- is the control action
- is difference between the running coordinate and the current motor coordinate
- are proportional, integral and differential coefficients of the regulator. Regulator coefficients are set on PID settings
page of the XILab program or programmatically by calling set_pid_settings() function of the libximc library (see Programming guide).
The resulting value is normalized according to the following formula to make PID regulator action independent of motor type, feedback
sensor and working voltage:
, where:
- is the PWM fill factor
- is the nominal (maximum) motor voltage, (see Motor limiters).
- is the current supply voltage
- is the feedback encoder resolution in counts per revolution
This approach allows to change motor type, feedback sensor and voltage supply unit without reconfiguring PID regulator.
Warning. Do not forget to change PID regulator coefficents accoring to abovementioned formula if you are going to
change maximum motor voltage.
Particular properties of the algorithm
PID regulator coefficients
User set values are normalized to keep optimal PID regulator coefficients in [0..65535] range.
Let's consider the effects different components have for better understanding.
We will assume the supply voltage is constant and equal to the motor nominal voltage . With this assumption PWM fill
factor will be equal to 1 in the following cases:
1. - if target position is ahead of real position by 256 motor shaft revolutions
2. - if integral in the formula above is equal to 52.5 revolutions second
3. - if real motor speed is higher than the required speed by 96000 rpm.
Reaching target position
Target position is considered to be reached when motor shaft reaches the target position. Some oscillations around target position are
possible. Motor will need some time to stop and return to correct position if smooth deceleration is not used and an immediate stop
command is received or an emergency stop by limit switch has happened.
Warning. Long time oscillations around the target position while the motion is considered finished are possible if the
PID regulator is set up incorrectly.
PID regulator tuning recommendations
There are three quality criterions used when tuning PID regulator:
Speed maintenance accuracy, defined as a mean deviation of current speed from desired speed. Speed maintenance is
considered to work optimally if the speed takes no more than three distinct values when moving. It is impossible to achieve
greater accuracy because speed values are quantized.
Position reach quality, defined by the following criterions:
Page 55 / 345
Page 55 / 345