Tuning a control system is a lot like balancing a budget. The laws of physics, like those of economics, often require you to give up one thing to get something else.

If you want your controller to respond quickly, for example, you might have to put up with some overshoot. If the application doesn't tolerate overshoot, however, you may have to settle for a less responsive system. For each application, there's an optimum balance between system response and stability, and that's what control-loop tuning is all about.

One way to gauge loop performance is to look at the time-based response to a step command. Overshoot (the ratio of the peak to the final value) is a measure of stability, while settling time (the time it takes the signal to settle within, say, 3% of its final value) tells you how responsive the system will be.

Similar information can also be found in a frequency-response, or Bode, plot. Given a sinusoidal input, any linear system will produce a sinusoidal output of the same frequency. In fact, if you were to go around all the nodes in the network with an oscilloscope, you'd find that every signal has the same frequency as the input. The only differences would be the amplitude and phase.

A Bode plot is simply a diagram that expresses the relationship between input and output signals. It consists of two parts: a gain curve and a phase curve. The gain curve is the amplitude ratio expressed in decibels:

G = 20 log(Xo/Xi) dB

where Xo = output amplitude and Xi = input amplitude.

The phase curve is the time delay td expressed in degrees:

Φ = tdfin 360 deg where fin = input frequency (Hz).

Gain curves tend to be the easiest to interpret if you're trying to get a handle on stability and response. For the latter, your best bet is to look at bandwidth, the frequency where the gain falls to -3 dB. In general, the higher the bandwidth, the more responsive the system.

If you're concerned with stability, you can get a pretty good idea from the amount of "peaking" in the curve. A peak of more than 1 or 2 dB, before the gain plot starts to fall, is usually considered excessive.

Bode plots for motion systems share many similarities. Typically, they have a gain of 0 dB at low frequencies, which declines as frequency increases. This is to be expected. At low frequencies, the output of a motion system should be able to precisely follow the input. But at higher frequencies, the motion system cannot keep up, hence the fall off in gain.

Bode plots can be simulated or measured directly. Simulated plots are adequate for teaching and for providing feedback in the preliminary stages of design. However, if you're working on an actual prototype or a machine in the field -- say, trying to pinpoint sources of mechanical resonance -- you'll probably want to use a dynamic signal analyzer (DSA) to obtain Bode plots from direct measurements. DSAs are available from several sources, including Hewlett-Packard, Schlumberger, and DSP Technologies.