# The basics of control system design: Part 2 – Tuning a Proportional Controller

Tuning a proportionalcontroller is straightforward: Raise the gainuntil instability appears. The flowchart in Figure 6-2 below shows just that.Raise the gain until the system begins to overshoot.

The loss of stability is a consequence of phase loss in the loop,and the proportional gain will rise to press that limit. Be aware,however, that other factors, primarily noise, often ultimately limitthe proportional gain below what the stability criterion demands.

Figure6-2. Tuning a P controller. |

Noise in a control systemmay come from many sources. In analog controllers, it is often from electromagnetic interference (EMI),such as radio frequency interference(RFI) and ground loops , which affects signals being connected from one device to another.

Noise is common in digital systems in the form of limitedresolution, which acts like random noise with an amplitude of theresolution of the sensor. Independent of its source, noise will beamplified by the high-frequency gains in the controller, such as theproportional gain.

Noise is a nonlinear effect and one that is generally difficult tocharacterize mathematically. Usually, the person tuning the system mustrely on experience to know how much noise can be tolerated.

Noise at some level is acceptable in every control system. Highergain amplifies noise, so setting the gain low will relieve the noiseproblem but at the expense of degrading the control system performance.

In cases of substantial noise, setting the proportional gainrequires balancing the need for performance and the elimination ofnoise. Things are simpler for tuning the examples in this chapter;these systems deal only with the small numerical noise in the model.

Figure 6-1 earlier in Part 1 shows the step response of the Pcontroller tuned according to the procedure of Figure 6-2 above . The result was Kp= 1.2. The step response has almost no overshoot. Using the illustratedExperiment 6A,the closed- and open-loop responses can be measured.

Figure6-3. Closed-loop Bode plot for proportional system (186 Hz bandwidth, 0dB peaking) |

As shown in Figure 6-3 abov e,the closed-loop response has a comparatively high bandwidth (186 Hz)without peaking. The open-loop plot in Figure6-4 below shows 65° Phase Margin (PM) and 12 dB GainMargin(GM).

Figure6-4. Open-loop Bode plot of proportional system (65° PM, 12.1 dB GM) |

Using the Integral Gain

The primary shortcoming of the P controller, tolerance of DC error, isreadily corrected by adding an integral gain to the control law.Because the integral will grow ever larger with even small DC error,any integral gain (other than zero) will eliminate DC droop. Thissingle advantage is why PI is so often preferred over P control.

Integral gain provides DC and low-frequency stiffness. When a DCerror occurs, the integral gain will move to correct it. The higher thegain, the faster the correction. Fast correction implies a “stiffer”system.

In other words, higher integral gain translates to higher DCstiffness. Don't confuse DC stiffness with dynamic stiffness. A systemcan be at once quite stiff at DC and not stiff at all at highfrequencies. Be aware that higher integral gains will provide higher DCstiffness but will not substantially improve stiffness near or abovethe system bandwidth.

Integral gain does bring a certain amount of baggage. PI controllersare more complicated to implement; the addition of a second gain ispart of the reason. Also, saturation becomes more complicated.

In analog controllers, clamping diodes must be added; in digitalcontrollers, saturation algorithms must be coded. The reason is thatthe integral must be clamped during saturation to avoid the problem of”windup.”

Integral gain also causes instability. In the open loop, theintegral, with its 90° phase lag, reduces phase margin. In the timedomain, the common result of adding integral gain is overshoot andringing.

PI Control

With PI control, the P gain provides similar operation to that in the Pcontroller, and the I gain provides DC stiffness. Larger I gainprovides more stiffness and, unfortunately, more overshoot. Thecontroller is shown in Figure 6-5below. Note that the KI is in series with Kp; this is common,although it's also common to place the two gains in parallel.

Figure6-5. Experiment 6B, a PI Controller. |

It should be noted that the implementation of is for illustrative purposes.The PI controller lacks a windup function to control the integral valueduring saturation. The standard control laws supported by Visual ModelQprovide windup controland so would normally be preferred. (Inaddition, they take less spaceon the screen. )

However, Experiment 6B and other experiments illustrated here breakout the control law gains to make clear their functions. Because thepurpose of the series to this point is to compare similar control laws,the clarity provided by explicitly constructed control laws outweighsthe need for wind-up control or compact representation.

Editor's Note: Experiments 6A-6F

All the examples in this series ofarticles were run on Visual Mode1Q. Each of the sixexperiments, 6A-6F,models one of the six methods, P, PI, PI+, PID, PID+, and PD,respectively.

These are models of digital systems,with sample frequency defaulting to 2 kHz. If you prefer experimentingwith an analog controller, set the sample time to 0.0001 second, whichis so much faster than the power converter that the power converterdominates the system, causing it to behave like an analog controller.

The default gains reproduce the resultsshown in this series, but you can go further. Change the powerconverter bandwidth and investigate the effect on the differentcontrollers.

Assume noise is a problem, reducethe low-pass filter on the D gain (fD), and observe how this reducesthe benefit available from the derivative-based controllers (PID, PID+,and PD). Adjust the power converter bandwidth and the sample time, andobserve the results.

Next in Part 3: How to Tune a PIController

To read Part 1, go to “Moving beyond PID“

Thisseries of articles was excerpted from ControlSystem Design Guide by George Ellis with the permission of thepublisher – Elsevier/Academic Books – and can be purchased online whichretains all copyrights.

George Ellis is senior scientistat Danaher Motion. He hasdesigned and applied motion control systems for over 20 years and haswritten for Machine Control Magazine, Control Engineering, MotionSystems Design, Power Control and Intelligent Motion, EDN Magazine. Inaddition to Control System Design Guide, he is also the author ofObservers in Control Systems (Academic Press).

its not good

explanation good but

content bad