It may sound counter-intuitive, but control loops must have negative feedback. Consider a PI controller connected through a current loop to a motor. Motor velocity is measured from a feedback device and connected through the summing junction to close the loop. If the sign of the feedback signal at the summing junction is reversed, the system will become unstable. But what factors or conditions can reverse a feedback signal’s sign, and how do you know when it happens? One way to invert the sign is to incorrectly wire the leads of a tachometer. Do that and the system will run away.

The problem with positive feedback is that it causes the error or correction signal from the loop to move in the wrong direction. If you command positive response, the response indeed is positive. However, the inverted feedback signal indicates the response is negative. Misreading this signal, the controller produces more positive command, which in turn produces more positive response, and the cycle continues with the motor running away at full speed.

Incorrect wiring isn’t the only way to produce a sign change in the loop, though. In the March column, we discussed how every block in a control loop has phase lag. Accumulating a sufficient amount of phase lag around the loop can also result in positive feedback. Unlike reversing feedback leads, however, this instability usually occurs at just one frequency. This is why unstable control systems oscillate rather than run away like they do when you reverse the feedback leads.

We usually don’t think of an instability at a particular frequency, especially a high frequency, as presenting a serious problem. Rather, we avoid exciting the control system at the oscillatory frequency. Unfortunately, all systems have noise and noise contains virtually all frequencies. If a system is unstable at any frequency, nature will find it, and usually within a few milliseconds.

Let’s look at a system model running with a sine wave command of 414 Hz, and account for all the phase lag around the loop. Typically, PI controllers generate very little phase lag at high frequencies. In this case, it’s 2°. The current loop, which always has some lag, generates 47°. For our purposes, the current loop can be regarded as a low-pass filter. The higher the frequency, however, the greater the phase lag.

The motor itself introduces a 90° lag. For our simple model, we can assume that the phase lag from the motor will always be 90°. That’s because we are thinking of the motor as an integrator, which has a fixed 90° lag, and ignoring friction which tends to reduce phase lag a little. The effects of friction are usually small enough to safely ignore.

For feedback, we can assume that we’re using a resolver and processing the signal with a resolver-to-digital converter. RDCs are selfcontained control systems themselves and generate phase lag similar to low-pass filters. The phase lag for the resolver feedback at 414 Hz is 41°. So at 414 Hz, the sum of the phase lag from the PI controller, the current loop, the motor, and feedback is 180°. This means that at 414 Hz, as the signal traverses the loop, its sign is “reversed,” generating positive feedback.

### A closer look at instability

To simulate instability, log on to ptdesign.com and download the ModelQ simulation package. Then, click “Run” and select the May model from the combo-box at top center of the screen. You can generate a Bode plot of the loop gain by pressing “Go” near the bottom.

Click “Open” to see the loop gain. In a few seconds a Bode plot of this gain and phase will appear on the dynamic signal analyzer (DSA). Note that this is a plot of the sum of all the blocks in the loop. Also notice that the phase (bottom plot) crosses 180° at about 414 Hz. (Turning on the cursors at the bottom of the screen simplifies reading these plots.)

At 414 Hz the loop gain is -15 dB. That’s good. We want it to be -15 dB or less at the frequency where the phase is 180°. Now, we can investigate instability by raising the loop gain until the system goes unstable.

Click on the “Constants” tab on the scope at left. Start raising Kvp. This adds gain to the loop without changing the phase. Increase Kvp in small steps, say 20%, and run a new Bode plot of the loop gain each time. You will notice that the gain keeps increasing, approaching 0 dB. The scope picture at left shows that the system is getting less and less stable as the loop gain approaches 0 dB (180°). When Kvp is about 4.2, the system will be unstable.

### Crank up the gain

Applications that demand the highest performance need the largest gain values possible. For example, pick-and-place machines for circuit-board assembly need to move from one point to another as rapidly as possible. This requires very high loop gains. The problem is that as you raise the gain, the system starts losing stability. What do you do when you need more gain, but the system is already marginally stable? Reduce phase lag.

Designers trying to maximize loop gains need to review their system to see if any unnecessary phase lag is added. Think about the system discussed earlier. One way to reduce phase lag is to increase the speed of the current loop. It contributed 47° of lag at 414 Hz. If we speed up the loop, we might be able to reduce that.

Additionally, we can use an encoder instead of a resolver. Because encoders are fast, they provide nearzero phase lag. If we were using a digital system, we could also increase the sample frequency; that reduces phase lag too. In fact, in digital controllers, the sample frequency is often a primary source of phase lag.

When we reduce the lag, it has the effect of increasing the frequency where the phase crosses through 180°. That in turn let’s us raise the gain without causing instability. And higher gain almost always yields faster response.