![Trinamic TMCM-160 Скачать руководство пользователя страница 11](http://html1.mh-extra.com/html/trinamic/tmcm-160/tmcm-160_manual_1163048011.webp)
TMCM-160 Manual (V1.11 / August 8th, 2007)
11
Copyright © 2006, TRINAMIC Motion Control GmbH & Co. KG
5.8 Parameterizing the PID velocity regulator
The motion control commands (TMCL_ROL, TMCM_ROR, TMCL_MVP) use a PID regulator for velocity
control. The PID regulator has to be parameterized with respect to a given motor in a given
application. The default parameter set of the PID regulator covers a range of motors suitable for the
TMCM-160 module, and typically works stable up to 15000 rpm maximum motor velocity. However, for
slower motors, the response time with this parameter set may become quite slow.
The PID regulator uses four basic parameters: The P, I and D values, as well as a timing control value.
The timing control value (PID regulation loop delay) determines, how often the PID regulator is
evoked. It is given in multiple of 10ms:
t
PIDDELAY
= x
PIDRLD
* 10ms
x
PIDRLD
is the PID regulation loop delay parameter, t
PIDDELAY
is the resulting delay between two PID
calculations
The PID parameters are divisors, e.g. use a higher value, to get less influence from the parameter. To
parameterize for a given motor, first modify the P parameter, starting from a high value and going to
a lower value, until fastest response with minimum oscillation is given.
After that, do the same for the I parameter. Now, modify the D parameter in the same way. It will
damp part of the oscillations of the other parameters, too.
As a thumb-rule, you can set the P-parameter to a starting value, such that:
P-param = (Maximum actual RPM of the motor at 100% PWM) * 0.15
The module uses the internally calculated velocity value (1/4 of electrical RPM value) as input into the
PID regulator (see schematic).
actual RPM
(1/4 electrical
RPM)
target RPM
(1/4 electrical
RPM)
Clip
4095
32 / P-param
sum
Clip
32767
32 / I-param
last
32 / D-param
actual PWM
0-1023
new PWM
CLK: 100Hz /
PIDloopdelay
CLK: 100Hz /
PIDloopdelay
Figure 5.1: PID velocity regulator parameters
Default values:
P-param = 2400
I-Param = 150
D-Param = 600
x
PIDRLD
= 2