How to Tune a PID Controller by RealPars

Video

#PLC #PID #Control_Theory

↩️ Go Back

Table of Contents:


A) Introduction - PID Controllers

PID is an acronym from "Proportional", "Integral", and "Derivative".

A PID Controller is a device that is used to control a process.

The controller can be a physical, stand-alone device or a control block found in a PLC function database.

The PID portion of the controller is a series of numbers that are used as adjustments in order to achieve your objective.

Some simple examples of controlled processes are:

Now let's discuss what the parameters of a PID controller are, and how they are used.

|350

In the most simplistic terms, the controller calculates the "P", "I", and "D" actions…

|350

...and multiplies each parameter by the error “E”, which is equal to,
"Set Point" - "Process Variable" in "Direct Acting”

Note: Direct Acting vs Reverse Acting

A Direct Acting Controller is one whose output tends to increase as the measurement signal increases.
|500
A Reverse Acting Controller is one whose output tends to decrease as the measurement signal increases.
|500


More examples:

Then, all parameter calculations are added up to produce the "Control Variable"

|350

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

A.1) 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 "Proportional Band" can also be written in terms of the "Proportional Gain",

Note:

This parameter can be called "KP", "Gain", Throttling Range (%TR), or others.

This is the parameter that determines how fast the system responds.

The name by which this parameter 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.

Conversly, on controllers with “Proportional Band" units, decreasing this turning parameters 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.

For more information visit:

http://h240.marcks.cc/downloads/06_pb_vs_gain.pdf
This text explains by which conditions the equation %PB = 100/P is true, and how to make the conversion between these parameters when the conditions are not met.

A.2) Integral Term

The Integral term or "I" constant, often called "Reset" can be in different measurements as well.

There are "repeats per second" (or "repeats per minute") and the parameter is known as Ki (or others).

There are "seconds per repeat" or "minutes per repeat" and the parameter is known as Ti (or others).

And these parameters are related by the following equation,

Essentially, regardless of the measurement type, the integral is the sum of all of the values reported from the PV signal, captured from when you started counting, to when you completed counting.

Or the area under a plotted curve.

The integral term determines how fast the steady state error is removed,

To adjust this parameter in "minutes per repeat" (Ti), we know that "smaller" values of Ti will create "larger" integral action.

|450

And "larger" values in "repeats per minute" measurements (Ki), will also create "larger" integral action.

|450

A.3) Derivative Term

Derivative or "D" constant units are typically “seconds" or "minutes".

The purpose of the "Derivative" constant is to predict change,

The derivative action acts on 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.

|300

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:

Note

For that reason, the Derivative terms are not often used in controls.


B) Algorithms and Parameters

The most commonly used controller is the PI.
Most processes can be well served with this type of control.

|350

P and PID controllers are occasionally used.

While PD controllers are rarely used.

|350

B.1) PID adjustable parameters

PID controllers also have many other adjustable parameters, and just to name a few we have:

B.2) PID algorithm types

PID controllers also implement different algorithm types,

For example:


C) PID tuning methods

There are many methods to tuning a PID loop, but the must widley tuning method is "trial and error",

C.1) Trial and Error

The goal is to control the process, when plotted in a trend, as a nice, even trend line with minimal oscillation.

C.2) Tune a PI Controller

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 PID terms, for this tutorial we are going to standardize on "gain" and "repeats per minute"

C.2.1) "Jump right in" approach

We have two cases depending on how the Process Variable responds,

Note: Adjust only one parameter at a time and observe the results

C.2.2) Measured approach

Start with a low proportional gain, and with integral and derivative disable,

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%

Then repeat the process with the integral term. 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, we are close to the SV and we can begin the fine-tuning process.

C.2.3) Extra: Heuristic Methods for PID tuning

For more information visit:

This video explains the 1st heuristic method for tuning a PID controller using a step response.
https://youtu.be/5WSq4Uv3JFI

For more information visit:

This video explains the 2nd heuristic method for tuning a PID controller using the period of oscillation of the closed loop system.
https://youtu.be/AAaWNNuqpuY