Cookies on the OMEGA websites
We use cookies on this website, these cookies are essential for the website to work correctly.If you continue without changing your settings, we'll assume that you are happy to receive all cookies on this website.To find out more information about these cookies please click here.
CLOSE
Basket  |  Contact  |  Help  | 
Free Phone 0800 488 488
International+44(0) 161 777 6611

How to tune a PID controller?

PID Controller Heat treatment processes exemplify the need for PID control. To ensure consistent product quality the temperature inside an oven or furnace must be kept within narrow limits. Any disturbance, such as when a product is added or withdrawn or a ramp function is applied, must be handled appropriately. Although simple in concept, the mathematics underpinning PID control is complex and achieving optimal performance entails selecting process-specific values for a range of interacting parameters.

The process of finding these values is referred to as “tuning.” When a PID controller is tuned optimally, the device minimizes deviation from the set point, and responds to disturbances or set point changes quickly but with minimal overshoot.

This White Paper from OMEGA Engineering discusses how to tune a PID controller. Even though many controllers provide auto tune capabilities, an understanding of PID tuning methods will help in achieving optimal performance. Individual sections address:
  • Basics of PID Control
  • PID Tuning Methods
    ○ Manual Tuning
    ○ Tuning Heuristics
    ○ Auto Tune
  • Common Applications of PID Controllers

What is PID Control?

Temperature and Process Controllers
Temperature and Process Controllers
PID control is based on feedback. The output of a device or process, such as a heater, is measured and compared with the target or set point. If a difference is detected a correction is calculated and applied. The output is measured again and any required correction recalculated.

PID stands for proportional-integral-derivative. Not every controller uses all three of these mathematical functions. Many processes can be handled to an acceptable level with just the proportional-integral terms. However, fine control, and especially overshoot avoidance, requires the addition of derivative control.

In proportional control the correction factor is determined by the size of the difference between set point and the measured value. The problem with this is that as the difference approaches zero, so too does the correction, with the result that the error never goes to zero.

The integral function addresses this by considering the cumulative value of the error. The longer the set point-to-actual value difference persists the greater the size of correction factor calculated. However, when there is a delay in response to the correction this leads to an overshoot and possibly oscillation about the set point. Avoiding this is the purpose of the derivative function. This looks at the rate of change being achieved, progressively modifying the correction factor to lessen its effect as the set point is approached.

Setting PID tuning parameters

Every process has unique characteristics, even when the equipment is essentially identical. Airflow around ovens will vary, ambient temperatures will alter fluid density and viscosity, and barometric pressure will change from hour to hour. The PID settings (principally the gain applied to the correction factor along with the time used in the integral and derivative calculations, termed “reset” and “rate”) must be selected to suit these local differences.

In broad terms, there are three approaches to determining the optimal combination of these settings: manual tuning, tuning heuristics, and automated methods.

This PDF provides a deeper understanding of the different methods to tune a PID controller.

Manual tuning of pid controller

With enough information about the process being controlled, it may be possible to calculate optimal values of gain, reset and rate for the PID controller. Often the process is too complex, but with some knowledge, particularly about the speed with which it responds to error corrections, it is possible to achieve a rudimentary level of tuning.

Manual PID tuning is done by setting the reset time to its maximum value and the rate to zero and increasing the gain until the loop oscillates at a constant amplitude. (When the response to an error correction occurs quickly a larger gain can be used. If response is slow a relatively small gain is desirable). Then set the gain of the PID controller to half of that value and adjust the reset time so it corrects for any offset within an acceptable period. Finally, increase the rate of the PID loop until overshoot is minimized.

Tuning Heuristics

Many rules have evolved over the years to address the question of how to tune a PID loop. Probably the first, and certainly the best known are the Zeigler-Nichols (ZN) rules.

First published in 1942, Zeigler and Nichols described two methods of tuning a PID controller. These work by applying a step change to the system and observing the resulting response. The first method entails measuring the lag or delay in response and then the time is taken to reach the new output value. The second depends on establishing the period of a steady-state oscillation. In both methods, these values are then entered into a table to derive the values for gain, reset time and rate for the control system.

ZN is not without issues. In some applications it produces a response considered too aggressive in terms of overshoot and oscillation. Another drawback is that it can be time-consuming in processes that react only slowly. For these reasons, some control practitioners prefer other rules such as Tyreus-Luyben or Rivera, Morari and Skogestad.

Auto Tune

Most process controllers sold today incorporate auto-tuning functions. Operating details vary between manufacturers but all follow rules similar to those described above. Essentially, the PID controller “learns” how the process responds to a disturbance or change in set point, and calculates appropriate PID settings. In the case of a temperature controller like OMEGA’s Platinum series, when “Auto Tune” is selected the controller activates an output. By observing both the delay and rate with which the change is made it calculates optimal P, I and D settings, which can then be fine-tuned manually if needed. (Note that this controller requires the set point to be at least 10°C above the current process value for auto tuning to be performed).

Newer and more sophisticated PID controllers, such as OMEGA’s Platinum series of temperature and process controllers, incorporate fuzzy logic with their auto tune capabilities. This provides a way of dealing with imprecision and nonlinearity in complex control situations, such as are often encountered in manufacturing and process industries, and helps with tuning optimization.

Common Applications of PID Control

PID Control Simulator
PID Control Simulator
Ovens and furnaces used in industrial heat treatment are required to achieve consistent results regardless of how the mass and humidity of material being heated may vary. This makes such equipment ideal for PID temperature control. Pumps used for moving fluids are a similar application, where variation in media properties could change system outputs unless an effective feedback loop is implemented.

Motion control systems also use a form of PID control. However, as the response is orders of magnitude faster than the systems described above these require a different form of controller to that discussed here.

Why a PID controller is advantageous?

As correction factors are calculated by comparing the output value to the set point and applying gains that minimize overshoot and oscillation while effecting the change as quickly as possible, PID controllers are used to manage many processes.

a PID tuning method entails establishing appropriate gain values for the process being controlled. While this can be done manually or by means of control heuristics, most modern controllers provide auto tune capabilities. However, it remains important for control professionals to understand what happens after the button is pressed.

WHITE PAPER
Download our white paper on
PID Controller
PID Controller | Tech Reference
PID tuning - How to tune a PID controller manually? Fuzzy Logic Controller | What is a Fuzzy Logic controller? RFIC Finds Winning IoT Solution in Automation Food Safety Industry 4.0: The Next Industrial Revolution
We noticed you are from the US. Visit your local site for regional offers and live support.