Designing a closed-loop control system can be a formidable task. The process typically includes scaling input and output variables using algebra, calculus, transforms, and transfer functions. If this is not bad enough, using the math to predict the response can be even tougher, and fine-tuning can be unpredictable. Trial-and-error techniques might take as little as a couple of hours or several days, depending on size and complexity.

But it need not be so difficult. Numerous techniques can be used to simplify fine-tuning. Some are analytical while others are empirical. Analytical methods might include calculating roots of the characteristic equation, plotting the root locus with Nyquist, Routh-Hurwitz criterion, or using state-space equations.

Empirical methods, on the other hand, are typically quicker, but system responses must be simulated on a computer or exercised on actual hardware — often on line. Step inputs are more convenient with outputs displayed on oscilloscopes to measure the response and determine stability. An oscilloscope is usually available, and the step response is easy to analyze. But Bode plots work as well, and provide more information about control system stability than a step response — all in one picture.

**Bode Plots**

Bode plots show the phase and gain of control systems from input to output over a wide range of frequencies. Phase and gain describe the response of a control system to a sine-wave input. For linear-control systems, sine waves are unique, that is, sine-wave inputs generate sine-wave outputs that are easy to measure and analyze. Phase describes the time shift between input and output, while gain describes amplitude variations.

Phase is usually measured in degrees where at any frequency, one cycle is defined as 360°. For example, 360° is equivalent to 10 msec for a 100-Hz sine wave. Moreover, if Td is the time shift observed between input and output and f = frequency, then phase = (Td)(f)(360). However, gain is measured on a logarithmic scale called decibels or dB. Decibels equal 20 times the 10-based logarithm of the ratio of output to input: dB = 20 log10(O/I). Frequency is plotted on a log scale and normally shown as in Bode plots for three systems.

Most information captured by a Bode plot is found in the gain where a smooth curve represents stability. The best curves in the above Bode plots (left) have flat gain, which is 0 dB (or unity) for low frequencies and falls as frequency increases. Peaking, where gain increases above 0 dB (center), usually indicates marginal stability. Such a system exhibits excessive overshoot and ringing.

Bode plots also indicate responsiveness. A system is more responsive when the gain falls off further to the right. The frequency range between the upper and lower bounds where gain drops to –3 dB is often called the bandwidth. Comparing this to the time domain, step response settling time is roughly 0.5/bandwidth. The Bode plot (right) shows a stable but sluggish system where the bandwidth is half that of the left plot.

**Transfer Functions**

Reasonably linear systems, such as most commercial motion-control systems, are diagrammed as a series of transfer functions. Transfer functions show the relationship between the input and output of a component such as a motor, feedback device, a PID controller, or a low-pass filter. Block diagrams show how these components connect to one another. For example, PI velocity controller shows a block diagram of a simple proportional-integral (PI) control system.

An important conceptual block diagram is the Simple feedback loop. This depicts functions of “s,” the Laplace operator often used in transfer functions. Control engineers rarely calculate the Laplace transforms. Normally, they use the s-domain only because s-based functions can be combined easily. For example, with a little algebra, the transfer function of this loop is G/(1+GH) as shown in the Single-block equivalent.

As simple as the loop appears, it provides insight into control system instability. The system goes unstable when the denominator in the Single block equivalent becomes zero, in other words, when G(s)H(s) = –1. Recalling that 0 dB is equivalent to unity, –1 can be written as 0 dB at –180°. G(s)H(s) is called the open-loop transfer function.

**The Open-Loop Method**

The open-loop method measures system stability by characterizing how close the open-loop transfer function, G(s)H(s), gets to 0 dB at 180° (or –1). In the Closed-loop Bode plot, gain (top) starts at 0 dB and rolls off near the bandwidth. But in the Open-loop Bode plot, gain (top) is higher at low frequencies and falls as frequency increases. This is typical, considering motor inertia requires little effort to move at low frequencies but requires more at high frequencies.

The phase in the Closed-loop Bode plot (bottom) at low frequencies is near zero. This means the closed loop follows the command with little time delay at low frequencies. At higher frequencies, the closed-loop phase rolls off. This is because motors follow high frequency commands with more phase delay. In the Open-loop Bode plot, phase (bottom) is different. It starts at –180°, rises a little, then falls again. This is typical for proportional-integral (PI) control systems.

The open-loop method estimates two measures of stability or margins. The first is phase margin or PM. Find PM by locating the frequency where the loop gain is 0 dB. In the Open-loop Bode plot, this frequency is about 60 Hz. The system is unstable when the phase is –180°, so PM is the difference between the actual phase and –180°. At 60 Hz, the open-loop phase is about –120°, so the PM is 180°, –120°, or 60°. The PM can be seen graphically as the distance from the open-loop phase to –180°, the bottom of the graph.

Gain margin or GM is similar. Find the frequency where the open-loop phase is –180° and measure the gain. Because the system is unstable at 0 dB and –180°, the GM is 0 dB minus the gain. In the Open-loop Bode plot, the phase is –180° at about 365 Hz and the gain at that frequency is about –17 dB; thus, the GM is 17 dB. Gain and phase margin vary by application, but most machines require a 10 to 20-dB GM and 50 to 75° PM.

**A PI Velocity Controller**

Consider the PI velocity controller diagram to demonstrate the open-loop method. This form of PI control has two gains: KVI for the integral of velocity error and KVP, the loop-gain constant. The open and closed-loop Bode plots show their respective gains. In the Open-loop Bode plot, the gains are chosen to maximize the PM. The open-loop gain crosses through 0 dB at 60 Hz, the frequency where the open-loop phase is largest.

When the loop gain (KVP) is too high or too low, the system rings excessively. PM is selected to be maximized at 60 Hz, the frequency where the gain is 0 dB in the properly tuned system of Bode plots of PI controller (right). This occurs when KVP = 0.72. To observe the effect of changing KVP, raise it to 3.0. This moves the entire gain plot up and moves the frequency of 0-dB gain too far right, reducing PM. Lowering KVP to 0.1 moves the 0-dB point of too far left which also reduces PM. Bode plots of PI controller (left) shows the closed-loop gain of three systems. Low phase margin in the open loop (right) correlates to closed-loop peaking (left).

The oscilloscope graphs of the Bode plots illustrate how peaking in the closed-loop gain correlates to excessive overshoot. The left diagram (KVP = 0.72) shows little overshoot, but the high KVP (middle) and the low KVP (right) show excessive ringing, although at different frequencies. This confirms the principle that states low phase margin causes peaking in the closed loop and shows up as excessive overshoot and ringing in the ‘scope plots.

**Resonance**

Fine-tuning a system is particularly critical in combating resonance problems in motion-control systems. Resonance most often develops where there is compliance between the load and motor. Resonance is a primary limitation in many high-speed, high-accuracy applications. Typically, controls engineers tune a system by increasing gains to the threshold of instability, then backing down to ensure stability.

One of several techniques can be used to reduce resonance. For example, after the machine is built, the most common remedies include installing low-pass and notch filters, often provided by drive manufacturers. Low-pass filters generate phase lag, which reduces the phase margin. When the filter frequency is too low, system response is compromised. Notch filters provide filtering over a narrow band of frequencies configured to attenuate the resonance. Notch filters have little effect on phase margin, and they don’t work well when the resonant frequency varies during machine operation.

Although control-system electronics can be used to patch resonance problems, the best place to correct resonance is at the beginning of the design. Frequently the machine needs to be stiffer. For example, use stronger shaft couplings, shorter shafts, idlers on long belt spans, and stronger frames. This is the reason that higher quality servomotors have large diameter shafts. Making the machine stiffer has the effect of increasing the system spring constant, which raises the resonant frequency. In the best case, stiffening the machine corrects the problem entirely; at the very least it provides a better starting point for using filters. Treating resonance as a mechanical problem rather than correcting it with filters usually provides superior results.