III. Tuning the PID Filter
(Continued)
The system sample period sets the time interval between
updates of position error. The derivative sampling interval is
an integer multiple of the system sample period. See
. It sets the time interval between successive position error
samples used in the derivative term, and, therefore, directly
affects system damping. The derivative sampling interval
should be five to ten times smaller than the system mechani-
cal time constant — this means many systems will require
low d
s
. In general, however, k
d
and d
s
should be set to give
the largest k
d
x d
s
product that maintains acceptably low
motor vibrations.
Note:
Starting k
d
at two and doubling it is a good method of increasing k
d
.
Manually turning the shaft reveals that with each increase of k
d
, the
resistance of the shaft to turning increases. The shaft feels increas-
ingly sluggish and, because k
d
provides a force proportional to the rate
of change of position error, the faster the shaft is turned the more
sluggish it feels. For the reference system, the final values of k
d
and d
s
are 4000 and 4 respectively.
TABLE 11. Initialization Section — Filter Tuning Program
Port
Bytes
Command
Comments
c
00
RESET
See Initialization Module Text
wait
The maximum time to complete RESET tasks is 1.5 ms.
c
06
PORT12
The RESET default size of the DAC port is eight bits. This command initializes the DAC
port for a 12-bit DAC. It should not be issued in systems with an 8-bit DAC.
Busy-bit Check Module
c
1D
RSTI
This command resets
only
the interrupts indicated by zeros in bits one through six of
the next data word. It also resets bit fifteen of the Signals Register and the host
interrupt pin (pin 17).
Busy-bit Check Module
d
xx
HB
don’t care
d
00
LB
Zeros in bits one through six indicate
all
interrupts will be reset.
Busy-bit Check Module
c
1C
MSKI
This command masks the interrupts indicated by zeros in bits one through six of the
next data word.
Busy-bit Check Module
d
xx
HB
don’t care
Proportional Term
01086019
Integral Term
01086020
Derivative Term
01086021
FIGURE 18. Proportional, Integral, and Derivative (PID)
Force Components
AN-693
www.national.com
19