# Explore the 3 PID tuning methods

**Choose the right PID tuning methods to run a stable production process**

How to tune a PID controller quickly and effectively? And what PID tuning method to I need to use? It’s a question that keeps many engineers wondering.

Even though the concept of PID tuning is simple, the mathematics underpinning PID control is complex. Once you have chosen the optimal controller configuration for your problem, the parameters must be tuned. Achieving optimal performance entails selecting the ideal set of numerical values for P, I and D.

In broad terms, there are three PID tuning methods for determining the optimal combination of these settings: heuristic tuning, rule-based tuning, and model-based tuning. Each method has its pros and cons. Although many might believe that heuristic and rule-based PID tuning methods easy are free, they often turn out to be extremely time consuming and expensive. An overview of PID tuning methods is given below.

## What is heuristic tuning?

A heuristic tuning method is one where general rules are followed to obtain approximate or qualitative results. The majority of PID loops in the world are tuned with such methods, for better or for worse. The trial-and-error method is an example of heuristic tuning.

**Trial and error PID tuning method**

The trial-and-error method is a relatively easy method, once you get a clear understanding of PID parameters. It steps through the parameters from proportional to integral to derivative. Usually you start from an existing set of parameters from which you perform small tweaks to improve the response. For new PID loops you start with a rough and safe initial guess.

Basically, one considers:

- The P-action is introduced to increase the speed of the response. Exaggerated P-action results in oscillation.
- The I-action is introduced to obtain a desired steady-state response. The disadvantage is a higher oscillating response over a longer period.
- The D-action is introduced for damping purposes. The disadvantage is the fact that oscillation on a high frequency is more probable, plus the sensitivity to the noise.

How to apply the method depends on tuning a new or existing closed loop. We dive into that in this blog.

**Trial-and-error: the pros and cons**

- Pro: It’s a quick and easy way to obtain a reasonable result.
- Pro: It has an intuitive approach, i.e. no (explicit) assumptions are made about the process.
- Pro: Little process knowledge is required.
- Con: It’s time-consuming. It takes a long time to achieve good performance.
- Con: It doesn’t guarantee reaching a robust and stable solution. This can represent a risk for the entire plant.

## What is rule-based tuning?

Rule-based PID tuning methods assume a certain process response to obtain easy mathematical formulas that enable the tuning of a PID controller. The process characteristics can be derived from simple experiments and are used to calculate the PID parameters.

Note that such tuning methods are sensitive to discrepancies with respect to the assumed process response (e.g. first order linear model with delay). Particularly, a big deviation from the assumed process time delay will greatly degrade the actual PID performance. Also, the possibility to define your own control objectives is extremely limited or inexistent.

The PID parameters are presented as the parameters of the general PID control algorithm or the ISA algorithm:

Rule-based tuning applies to Commonly known rule-based tuning methods are : Ziegler-Nichols, Chien, Hrones and Reswick, Cohen-Coon, Kappa-tau, and Lambda.

## Ziegler-Nichols tuning method

In the industry, Ziegler-Nichols rules are often applied. Typically, these rules result in aggressive control performance. The design criterion for the Ziegler-Nichols tuning rules is a maximal step overshoot of 25%.

The Ziegler-Nichols tuning method provides two different methods: the step response method and the frequency response method.

**Ziegler-Nichols step response PID tuning method**

This method can only be used on stable processes. Open loop tests are required to estimate process characteristics.

**Ziegler-Nichols frequency response PID tuning method**

This method can only be used with a closed loop PID controller. The aim is to push the controller to its stability limits in order to obtain estimated process characteristics.

Basically, Ziegler-Nichols works well enough when the dead time is small compared to the time constant of the process. However, small discrepancies between estimated and actual process characteristics (gain or process delay) can result in an extremely oscillatory or even unstable control loop.

**Ziegler-Nichols method: the pros and cons**

Using Ziegler-Nichols to tune PID loops has its advantages and disadvantages.

- Pro: It’s simple, intuitive and you get a reasonable performance for simple loops.
- Pro: Little process knowledge is required.

- Con: Originally designed for fast disturbance rejection and not for setpoint tracking.
- Con: Results in an oscillatory closed loop response (max overshoot at 25%).
- Con: Only suitable for small dead time processes (dead time is smaller than the process time constant)
- Con: High proportional gains (due to the 25% overshoot design specification), low integral action with too low damping of the closed loop system and too low robustness against changes in the process dynamics, including non-linearities.
- Con: It can’t define control objectives or closed loop performance requirements.

## Cohen-Coon tuning method

The Cohen-Coon tuning method is based on the Ziegler-Nichols method, but uses more information from your system in the process. The process is defined by three parameters: the steady state gain a, the time delay L, and the time constant T. This method has significantly better control performance due to the use of more process information.

Using Cohen-Coon for tuning PID loops has its advantages and disadvantages.

- Pro: Same advantages as Ziegler-Nichols.
- Pro: Additionally, works well specifically for systems with a larger time delay.

- Con: Same disadvantages as Ziegler-Nichols

## Kappa-Tau tuning method

The Kappa-tau tuning method is an evolution of the Ziegler-Nichols method. This method is designed to overcome the shortcomings of Ziegler-Nichols, such as high proportional gains and the rules providing poor results for systems with long normalized dead time.

Using Kappa-tau to tune PID loops has its advantages and disadvantages.

- Pro: Less oscillatory response.
- Pro: Originally designed for load disturbance response. It can also deal with setpoint tracking by using setpoint weighting.
- Pro: Results in optimal disturbance rejection with no overshoot.
- Pro: The tuning parameter for the design is the sensitivity of the controller towards process disturbances. Allows choosing between faster or slower response.
- Con: It can’t define control objectives or closed loop performance requirements.

## Lambda tuning method

The Lambda tuning method owes its name to the Greek letter lambda (λ). The parameter λ represents the time constant of the closed-loop response which determines how fast the controller reacts. The response is assumed to follow a first order with delay and features λ as a tuning parameter.

Using Lambda for tuning PID loops has its advantages and disadvantages.

- Pro: Enables choosing a desired closed-loop time constant, i.e. how fast the controller responds.
- Pro: Works well specifically for systems with a large time delay (dead time is close to the process time constant).
- Pro: Results in high robustness against changes in the process dynamics, including non-linearities.
- Pro: Results in a response with no overshoot.

- Con: Results in a slow rejection of disturbances, especially for slow systems.
- Con: It can’t define control objectives and is limited in closed loop performance requirements.
- Con: Only suited for PI controller tuning. The parameter derivative cannot be taken into consideration.

## Model-based tuning

Model-based tuning or optimization-based PID tuning allows you to obtain your P, I, and D parameters optimally. Your control objectives (disturbance rejection and set point tracking) together with a model of your system and the engineering specifications of the closed loop behavior determine the final set of tuning parameters.

Model-based tuning is the PID tuning method which allows you to work according to a structured tuning process that considers both your process behavior and your control needs. Heuristic and rule-based tuning require an iterative process. Methods such as the Ziegler-Nichols give reasonable results in many (simple) cases, but aren’t able to provide the same structured process and production results as model-based PID tuning method.

The model-based PID tuning method may seem more time-consuming, but once you have set the right parameters for your PID loops you’ll see immediately the benefits and these benefits will remain for a long time. After setting your PID controller right the first time, you don’t need to look at it again unless something changes in the process.

Using the model-based method for tuning PID loops has its advantages and disadvantages.

- Pro: Allows a structured tuning method that considers both your process behavior and your control needs.
- Pro: Enables a balance between the engineering objectives’ performance and robustness.
- Pro: It’s a flexible method. It will search for the optimal solution close to your requirements. You can compare and test scenarios.
- Con: You need to follow a strict workflow. The method requires making explicit how you want the process to behave in closed loop.
- Con: Requires you to identify a sufficiently accurate model, otherwise you will never get the right loop tuning.