Appendix C: Tuning Your System
83
Appendix C: Tuning Your System
C.1 General Description
The DSPpro controls servo motors by comparing the desired (command) and actual positions.
The difference between the command and actual positions is defined as the position error. As the
position error increases the motor control signals (analog output or step pulse rate) are increased
to counteract the error. The computation of the value of the control output for a given position
error is determined by the digital filter coefficients.
The process of adjusting these coefficients to provide the best control for a particular system of
motors and loads is called “tuning.” This section describes each digital filter coefficient and
gives guidelines for system tuning.
There are generally two methods used for tuning closed loop digital control systems: calculation
and trial and error. Calculation involves rather complex mathematics and precise knowledge of
all of the system parameters such as motor and amplifier response, load inertia and friction.
Texts on control systems provide methods for calculation of the tuning parameters for a large
variety of applications (See references).
The trial and error method has the advantage that no knowledge of the control system parameters
is necessary and no calculations are needed. A large number of trial parameters may be needed
however to tune a system and some combinations of parameters may produce an unstable or
runaway system.
An organized approach to searching for the best combination of tuning parameters helps shorten
the tuning time while avoiding an unstable combination which may damage the system.
The methods of tuning described in this section rely upon the SETUP program, described in
detail in chapter 5, “MEI Software.” Please be sure to review this section before tuning your
system.
C.1.1 The Digital Filter
The DSP calculates an axis’ output (analog voltage or pulse rate) based on a PID servo control
algorithm. The input to the PID algorithm is the current position error. The current position error
equals the difference between the command position and the actual position. The actual position
is controlled by the feedback device, and command position is controlled by the trajectory
calculator. The PID algorithm is based on the following formula:
On = KR ( Kp*En + Kd*(En - En-1) + Ki*Sn + Kv*Vn + 64*Ka*An + Kf * Mn) + Ko
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com