next up previous contents index
Next: 8.1 Ray's Experience Up: II. Part 2 - Previous: 7.5 stgdiag   Contents   Index

8. PID Axis Tuning

Axis tuning is a critical part of most emc setups. Until recently we have been able to ignore tuning by using steppers and steppermod.o. You can still do this but the newer motion files, freqmod and smdromod allow stepper users much smoother and better control of axis motion. Smdromod.o even allows stepper users to feed back actual position using a home built feedback board. (no more lost steps) But the consequence of these newer motion systems is that users must now learn some of the basics of axis tuning.

The description of PID tuning that follows is not intended to be exhaustive or rigorous but should get the beginning emc user started with these newer motion files and at least able to keep their axis from tripping out on overtravel. This page assumes that the reader is acquainted with the emc.ini file where tuning values are stored for each axis.

There are a number of excellent internet resources that will extend this description. A few links are listed at the end of this page. There are several auto tuning and computational tuning procedures but these have not been tested with EMC.

P - proportional, I - integral, and D - derivative are three common mathematical techniques that are applied to the task of getting a working process to follow a setpoint. In the case of EMC the process we want to control is actual axis position and the setpoint is the commanded axis position. PID is NIST's chosen way to connect these two things.

A mechanical system, something like a pantograph, will serve to illustrate the control problem. With a pantograph you can trace the stylus around a pattern and the pen or pencil will produce the result. The stylus is the commanded position, the pen the actual. The pattern need not be the same size as the resulting drawing. That relationship depends upon the linkage.

With a pantograph, we can consider the question, "How good is the drawing?" The answer depends upon several factors, speed of movement, detail in the pattern, sharpness of the stylus and pencil, size of stylus and pencil, differences in size between the two, etc.

When we get to electrical or electronic systems like EMC, instead of a hard linkage between the pattern and the product, we have signals created by reading nc program code, reading jog commands, or reading position from a digital image or drawing. These signals are sent to an amplifier and its output is sent to a motor. Most often the mechanical system driven by the motor has a feedback device that returns actual position to EMC.

EMC, or any computer controlled machine. should be thought of as a pantograph made with rubber bands in place of some of the rods and squishy bearings for some of the joints. PID tuning allows the integrator to control the stiffness of the rubber bands and the squashiness of the joints. With a mechanical pantograph the forces are all controlled by the fingers on the stylus. If the fingers are capable of 0.0001 offsets in motion then the results will be that fine. Starting, stopping, and changing the direction of the pen's inertia is also totally dependent upon the fingers of the operator. But with an electrical system, all of these things must be accounted for in the signals that produce the motion.

In any system that reproduces motion, one of the major "goodness" factors is what we call following error. Following error is a way of quantifying how close the actual position is to the commanded position while the tool follows the range of movements that can be commanded.

next up previous contents index
Next: 8.1 Ray's Experience Up: II. Part 2 - Previous: 7.5 stgdiag   Contents   Index
root 2003-05-26