3 practical PID tuning examples

Comparing different methods: a PID tuning example.

Discover the limitations and benefits of heuristic, rule-based, and model-based PID tuning

DCS screen. PID Tuning example

The different tuning methods

Quickly reacting to process oscillations is very important for a DCS engineer. It’s crucial to choose the right PID tuning approach and solve the problem. On this page, you will learn how to use three different approaches in practice:

  • Heuristic tuning: Learn about the trial and error method and why it often fails to deliver satisfactory results.

  • Rule-based tuning: Learn about the most widely used method: Ziegler-Nichols. This method gives good results in some cases, but unfortunately also poor results in other cases.

  • Model-based tuning: Discover the model-based approach by using PID tuning software. This approach closes the gap between your control needs and the set of values.

DCS screen. PID Tuning example
Image caption

Example heuristic tuning

As a DCS engineer, you’ve probably dealt with critical PID controllers that cause unwanted process oscillations and frequent alarms. Consider the following PID tuning example: The flow in a pipe is controlled by adjusting the opening of a valve. Operators requested a fast response controller with no overshoot in the flow.

With little time at hand, you decided to use the trial-and-error approach. This is an iterative method for tuning PIDs by which, the three parameters are obtained from a series of steps on the controller setpoint while assessing the controller performance. Simple, right?

After checking the controller equation in the DCS (a generic non interacting PID equation in seconds), you need to perform the following steps:

  • Step the setpoint a couple of times with the loop in auto mode and only a small proportional action (Kp) that is doubled with every consecutive step until the oscillation is just acceptable for the final closed loop.
  • Double the derivative action (Td) with every new step to add damping. Increase Kp and Td until the performance presents faster oscillations.
  • Finally, halve the integral action (Ti) in every successive step. When the response becomes too oscillatory, decrease Kp to remove the oscillations.

The figure at the right shows the controller performance after each point. In the end, you achieve the requested control objectives. As you can imagine, the panel operator wasn’t thrilled about the oscillations created in the tuning process. The iterations were also very time consuming!

PID Tuning example with different tuning results

Rule-based tuning method

Ziegler-Nichols (ZN) is one of the most widely used ruled-based PID tuning methods. However, it can result in poor controller performance when misused. Reckoning its limits and possibilities can be very useful for a DCS engineer like you!

ZN rules were designed for fast rejection of disturbances with a “quarter amplitude damping” control objective. In other words, the PID tuning tries to reduce to a quarter the amplitude of the error between setpoint and measurement with each successive cycle. Additionally, the ZN rule also assumes a PID interacting algorithm (or a PI non interacting) and a first order model of the process with a small time delay.

Let’s take again the PID tuning example of a flow controller. With the loop in manual, a step change in the valve opening provided the response characteristics shown in the figure to the right. Once approximated the response to a first order model with delay, the controller parameters were calculated using the following ZN tuning rules:

  • P controller: Kp = 1/a
  • PI controller: Kp = 0.9/a, Ti = 3L
  • PID controller: Kp = 1.2/a, Ti = 2L, Td = 0.5*L

where a = K*L/T with K the process gain, L the dead time and T the time constant.

Figure to the right shows the resulting PI controller (Kp = 3.75, Ti = 9s) tracking a setpoint change. Panel operators don’t want any overshoot, but you cannot translate that into the parameters with the ZN rules! Controller performance is typically oscillatory and presents very narrow robustness margins. Specifically, it is sensitive to larger gains or larger process time delays (process time delay is greater than half the process time constant). This is the main reason why the resulting tuning is not likely to withstand in an industrial environment.

Other tuning rules have been developed to overcome some of the limitations of ZN such as Cohen-Coon (larger process delays) or Lambda tuning (very stable and robust performance). However, recent model-based PID tuning software allows for a faster and robust tuning based on your control needs!

PID Tuning example using the ZN method
ZN step response method is based on the response characteristics to a step change

Model-based tuning

What you want, as a DCS engineer, is to quickly transfer your control needs (desired performance) into a set of values in the PID controller. While this task is limited and cumbersome with other tuning methods, model-based PID tuning excels at closing that gap.

In a systematic approach, a model of the process is identified from open loop data to be subsequently used for simulation and optimization of the controller performance subject to equipment/process constraints. Let’s consider again the previous PID tuning example of a critical flow controller.

The first step is to place the loop in manual mode and perform a few step changes in the valve opening to collect the flow rate response. Then you use PID tuning software to identify a model of the process (case and model matrix). The picture below shows the typical workflow in model-based tuning and the estimated high order model with the same process gain foundas the one estimated in the Ziegler-Nichols rule section (K = 0.65 t/h/%).

Next, you need to create a loop tuning case containing all the relevant characteristics of the loop described in the previous sections. For instance, the process dynamics (process model), the DCS algorithm (generic non-interacting PID equation in seconds), flow and valve ranges, control objectives (setpoint tracking at maximum speed with no overshoot), and robustness (gain and deadtime margins). Then, you need to run the optimization and check the simulated results.

Figure to the right shows the setpoint tracking performance of the optimal PI controller (Kp = 1, Ti = 5s) compared with the trial-and-error method and the Ziegler-Nichols step response method. Clearly, it’s the only controller without overshoot and the one that created the least repercussions on the running process.

All in all, panel operators will be delighted with the new tuning and the loop runs efficiently. Model-based PID tuning with the help of PID tuning software might be the best solution to run a smoothly operating plant.

PID Tuning example using the AptiTune
PID Tuning example using the AptiTune  and other methods

Discover if you’re a true PID tuning Master or if you’re still exploring the best PID tune practices.

Take the QUIZ

We’re happy to help you with your PID tuning challenges.

Walking through the steps of tuning a PID controller with a particular approach can offer you perspective. Receive advice on which approach suits you best and optimize you plant operations.

Get in touch with one of our PID tuning experts today.