User's Manual
PMAC2 User Manual
Setting Up PMAC2 for Direct PWM Control 31
Establishing Basic Current Loop Operation
Once the proper operation of the PMAC2 PWM output circuits have been established, the PMAC2 ADC
input circuits, and all of the drive and motor circuitry between them, close the current loop.
The PMAC Executive Program V3.2 and newer have both autotuning and interactive tuning procedures
for the digital current loop. Most people will use one or both of these procedures to tune the current loop.
These procedures can also confirm the proper polarity of the current loop readings. However, the
commands can be issued manually as explained in this section.
Purpose
The purpose of these next tests is to set the current loop gains for quick but stable current response. This
is done by giving the motor a current command and observing the current response.
The key to testing the current loop is the use of PMAC2’s O commands, which close the current loops,
while leaving open the position and velocity loops. The magnitude of the O-command value is that of the
torque-producing quadrature current command, expressed as a percentage of Ix69; Ix77 controls the
magnitude of the direct current command.
It is safest not to create any movement while testing the current loop; this can be done by commanding
only direct current, accomplished by setting Ix77, then issuing an O0 command.
Digital Current Loop Gains
Ix61, Ix62, and Ix76 are the gains of the PI (proportional-integral) current loop. They are used for both
phases of a multi-phase motor. Ix61 is the integral gain term. There are two proportional gain terms:
Ix62 is the forward-path proportional gain, and Ix76 is the back-path proportional gain. Ix62 is multiplied
by the current error (commanded minus actual) and the result is added into the output command. Ix76 is
multiplied by the actual current value and subtracted from the output command. All three gain terms have
a range of 0.0 to 1.0, with 23-bit resolution.
Usually only one of Ix62 or Ix76 is used on a given motor; the other gain is set to 0.0. It is more common
to use Ix61, the forward-path gain, because it provides greater responsiveness and bandwidth. If Ix76 is
used instead of Ix62, only the Ix61 integral gain term directly connects the current command to the
output, and its integration effect filters the command, reducing responsiveness. However, if the command
from the position/velocity servo loop is noisy, as can be the case with a low-resolution position sensor,
this filtering effect can be desirable, and Ix76 can provide better performance than Ix62.
Current
Command
Voltage
Command
Forward Path
Proportional
Gain
(I or I )
dq
(I or I )
dq
Prescaled to range
-1.0 < I < 1.0
Prescaled to range
-1.0 < I < 1.0
U
-1.0 < U < 1.0
K
pf
K
pb
K
1-z
i
-1
Ix66
Integral
Gain
(V or V )
dq
Back Path
Proportional
Gain
PWM
Scale
Factor
Actual
Current
K = Ix76 4
K = Ix62 4
K = Ix61
pb
pf
i
(0.0 < Ix76 < 2.0)
(0.0 < Ix62 < 2.0)
(0.0 < Ix61 < 1.0)
''
+
+
-
+
+
+
+
Figure 11 PMAC2 Digital Current Loop