Delta Tau GEO BRICK LV User Manual

Page of 440
Turbo PMAC User Manual 
Setting Up the Servo Loop 
193 
Torque Compensation Tables 
Turbo PMAC provides the capability to create a table of corrections as a function of motor position to the 
output of the servo loop.  Typically, this feature will be used with the servo loop in torque mode (whether 
or not Turbo PMAC is also performing motor commutation), so this function is called torque 
compensation table. 
The torque compensation tables are entered and operated much like the leadscrew compensation tables, 
which provide a position correction.  However, there are no cross-axis or multi-axis torque compensation 
tables.  The table belonging to a motor provides a torque correction to that motor as a function of that 
motor’s position. 
If the motor’s servo loop is outputting a velocity command, the corrections from the torque compensation 
tables would actually be velocity corrections. 
Entering Tables 
The torque compensation table for a motor is declared with the on-line command DEFINE 
TCOMP{entries},{count length}
 for the addressed motor.  {entries} defines the number of 
points in the table, and {count length} defines the span of the table in counts of the motor.  The 
spacing between entries in the table is therefore {count length} / {entries}.   
The first entry in the table defines the correction at one spacing from the zero position of the motor, the 
second entry at two spacings, and so on.  If I30 is set to 1 to enable automatic table rollover (highly 
recommended), the last entry in the table provides for both the correction at {count length} and at 
zero position.  Otherwise, the last entry in the table must be 0 if a continuous correction at the rollover 
point is desired. 
The correction is defined directly for the range of motor positions 0 to {count length}.  For motor 
positions outside this range, the position is “rolled over” to within this range before the correction is 
applied.  In this way, cyclic disturbances such as motor cogging torque can be compensated for.  The 
correction at the end of the table is equivalent to the correction at zero position; if you want this 
correction to be non-zero, you must have I30 set to 1 when you enter the table, so Turbo PMAC forces the 
correction at zero to this value. 
If you enter the table with I30 set to 0, the last entry in the table must be set to 0 for continuity of 
correction through table rollover.  Because the desired torque correction at the motor’s zero position is 
generally not zero, in this case, the entries in the table should contain the difference between the desired 
torque correction at that point and the desired torque correction at position zero.  The resulting table will 
yield a constant torque offset; the integral gain term in the servo loop will then compensate for this offset. 
After the table definition command, the next {entries} constants sent to PMAC are put into the table 
as table entries.  The units of the entries in the table are signed 24-bit values, with a full range of –
8,388,608 to +8,388,607.  These values are 256 times larger than the signed 16-bit values of the I-
variables affecting the output, such as Ixx69, Ixx57, Ixx29, and Ixx79, which imply a range of –32,768 to 
+32,767.  Corrections at points in between entries of the table are linearly interpolated from the adjacent 
values in the table. 
If the following table were entered: 
#1 DEFINE TCOMP 8, 2000 ; Table of 8 entries over 2000 counts for Motor 1 
32000  
; Corr at 2000/8=250 cts is 32000/256=125 16-bit DAC bits 
-12800 
; Corr at 500 cts is –12800/256=-50 16-bit DAC bits 
21248  
; Corr at 750 cts is 21248/256=83 16-bit DAC bits 
-24832 
; Corr at 1000 cts is –24832/256=-97 16-bit DAC bits 
15360  
; Corr at 1250 cts is 15360/256=60 16-bit DAC bits 
-11008 
; Corr at 1500 cts is –11008/256=-43 16-bit DAC bits 
33024  
; Corr at 1750 cts is 33024/256=129 16-bit DAC bits 
-25600 
; Corr at 2000 cts (& 0) is –25600/256=-100 16-bit DAC bits