# PID Tuning | How to Tune a PID Controller

In our previous article, **What are PID Tuning Parameters?**, we supplied a couple of simple examples of controlled processes and began to explain the specific terms of a PID controller.

As stated previously, you can enable each parameter, those being the proportional, integral, and derivative terms.

Now let’s discuss what the parameters are and how they are used.

### PID controller

In the most simplistic terms, the controller calculates the P, I, and D actions and multiplies each parameter by the error or E, which is equal to SP-PV in direct acting, as discussed previously. Then, all parameter calculations are added up to produce the Control Variable.

Unfortunately, there is no industry standard on the parameter terms. Here are some of the uses found today:

### PID tuning Proportional term

The proportional term, often called **P** Constant, can be referred to as **Proportional Gain** or just Gain, which is not a unit but instead a ratio. This parameter can also be called **Proportional Band** and measured in the unit of percent.

The parameter can be called **K _{P}**, Gain, or others. This is the parameter that determines how fast the system responds. The name by which it is referred varies with the manufacturer.

– For controllers that use the term Gain, adjusting this tuning parameter higher may cause more sensitive, less stable loops.

– Conversely, on controllers with proportional band units, decreasing this tuning parameter affects the loop in the same manner.

Keeping this in mind, knowing the type of controller you have is essential to ensure that you are properly adjusting your parameters.

### PID tuning Integral term

The Integral term or **I** Constant often called **Reset** can be expressed differently as well such as:

– repeats per second,

– seconds per repeat,

– repeats per minute,

– minutes per repeat.

Regardless of the measurement type, the integral is the sum of all of the values reported from the signal, captured from when you started counting to when you completed counting or the area under a plotted curve. This parameter can be called **K _{i}**,

**T**, or others. This parameter determines how fast the steady-state error is removed.

_{i}Because of the different measurements, this parameter may not be as intuitive to adjust.

Briefly, smaller values in minutes per repeat measurements will create larger integral action where larger values in repeats per minute measurements, will create larger integral action.

### PID tuning **Derivative** term

Derivative or **D** Constant units are typically seconds or minutes.

The purpose of the Derivative constant is for predicting change. The Derivative action acts of the rate of change measured in the Process Variable.

The value of this parameter basically means how far in the future you want to predict the rate of change. This parameter can help to create a faster response in your loop and a better performing loop as well.

However, since the Derivative term is measuring the rate of change in the Process Variable, the Process Variable must be a very clean signal meaning no noise within the signal. For that reason, Derivative terms are not often used in controls.

### PID algorithms and parameters

The most commonly used controller is the PI. Most processes can be well served with this type of control. P and PID controllers are occasionally used while PD controllers are rarely used.

PID controllers are very sophisticated devices with likely many adjustable parameters. The process and algorithm types can also vary. Other parameters to research for PID controllers are

– Series algorithm,

– Ideal algorithms,

– Parallel algorithm,

– filtering,

– scan times,

– anti-windup,

– self-regulating versus integrating processes,

– reverse acting,

– dead time,

– lag,

– Derivative on E or Derivative on PV,

just to mention a few.

### PID tuning methods

Because of the inherent difficulty in tuning the most basic of PID loops, these parameters, which are more advanced than this basic tutorial, are better left for future lessons or self-exploration.

There is a science to tuning a PID loop but the most widely used tuning method is **trial and error**.

There are other methods that require a multistep process to determine where your numbers should be.

The goal of tuning is to ensure minimal process oscillation around the setpoint after a disturbance has occurred.

The first step in tuning your controller is to determine just how much adjustment you can make without serious implications to the process.

Talk to the plant personnel, if adjusting the parameters of the PID controller will not have an adverse reaction then you can begin your adjustments. If the effects will be detrimental, you must take a more **measured approach**.

Obviously, depending on whether this is a new installation or an existing plant, your approach will be different. In existing installations, you are just looking to tweak values and create a more stable process.

### How to tune a PI controller

**How to tune a PI controller if PV changes quickly**

Because the PI controller is the most widely used, we will only be adjusting those parameters. As we have discussed the differences in measurements in the PID terms, for this tutorial we are going to standardize on gain and repeats per minute.

To just jump right in, if your Process Variable changes quickly with changes to your Control Variable, you will start with a low gain, possibly as low as 0.1 while adjusting your Reset between 1 and 10 repeats per minute.

**How to tune a PI controller if PV changes slowly**

Conversely, if the Process Variable changes slowly, start with higher gains and lower resets, somewhere between 2 and 8, and 0.05 and 0.5 respectively.

Adjust only one parameter at a time and observe the results. Continue until you have achieved a stable process.

A more measured approach is to start with a low gain, with integral and derivative disabled.

Watch the process and begin incrementally adjusting the gain by doubling the value. When the process begins to oscillate, adjust the gain value down by 50%.

Employ a small integral value and watch the process. Double the value incrementally until oscillation occurs then cut the integral by 50%.

At this point, you should be somewhere in the neighborhood and can begin the fine-tuning process.

**Summary**

As you might have guessed by now, there is much more to learn on this subject. But to sum it up, you can probably get away with using a **PI** controller for most of your processes.

Make sure you know the measurement type of your selected controller and just incrementally adjust your P and I parameters until you achieve that nice stable process.

If you prefer the more scientific approach to adjustment, we may cover that in a future article, or feel free to search the equations and steps required for that approach.

If you have any questions about PID tuning or PID in general add them in the comments below. As you know, we read each and every comment and reply to it in less than 24 hours!

Got a friend, client, or colleague who could use some of this information? Please share this article.

**The RealPars Team**

## Join the Top 1% of Automation Engineers

Try for Free## Learn from

industry experts

with a

**free 7-day trial**, then $25/month