PID Control
PID Control
PID Control
Operating.
PID Control.
PID Control is used all over the World in the manufacturing and production of goods in all industries.
Some examples are:
• Petrochemical.
• Food industry.
• Entertainment Industry.
• Car Manufacturing.
PID control is used to automatically maintain an optimum process state for the manufacture of a
product. It sounds straight forward, but it can sometimes be quite complex.
The types of control mentioned in this lesson are the 3 most widely used.
They are:
• PID control.
• Cascade control.
• Ratio control.
Shown below, is a typical Process Control Loop, where there is a Process Variable(PV),
Setpoint(SP) and an Output(OP) or Controlled Variable(CV). Here we see just one variable being
controlled, the simplest form of PID control.
SP
Final
PV CV
Controller Control
Element.
With Cascade Control, two process variables are being controlled using one final element, the
secondary controller being used to control the Primary controller.. Both need to maintain steady control
conditions. There is a certain method to be used to achieve this. If not done in the correct sequence,
confusion will arise.
PV PV
SP SP CV Final
Primary OP Secondary OP
Control
Controller Controller Element.
Here we see Ratio Control. A typical use of this is if you are making a product which must be mixed
from 2 products. You may want to add 100 litres of one item mixed with 50 litres of another. You will
use the PV of one controller as the Setpoint of the second controller multiplied by the Ratio. In this
example that will be 100*0.5 becoming the setpoint of controller 2.
SP
Final
PV
Controller Control
Element.
SP = PV*Ratio
Final
PV
=
Controller Control
Element.
The PID control will be configured in the control system to:
1. Calculate the difference between the measured water level
and a pre-defined water level setpoint.
2. Calculate and send changes to the valve to achieve or
maintain the specified water level.
Water Inlet.
SP
Water Tank.
LIC
Level Tx.
Water level.
Control Valve.
Water Outlet.
Loop Tuning.
Tuning of the loop is paramount to obtain optimum control. The most popular is Trial and Error. Not
the best but probably the most convenient. You can manipulate the constants until you achieve control.
Important. Do not try tuning unless you are sure that the Measuring Element and the Final Element
are in perfect working order. A sticking control valve will make tuning impossible. The best tuning
methods will be discussed.
There are 3 things which must be set to enable steady and effective control. They are.
• Proportional(P), This is used to correct the error between SP and PV and the amount is decided
by the P setting. If it is too sensitive, instability will be the result. If it is correctly set, the control will
be steady, but you may have an offset between the SP and PV. If this is not really an issue, you
can use P on its own.
• Integral(I), The integral term looks at the error and the previous error and the time between
measurements. This then is added to the proportional action and has the effect of eliminating the
Offset caused by P only.
• Derivative(D). This considers the Rate of Change of the error. It has the effect of acting before the
event. Generally not used for normal response control loops, but typically for loops where the PV is
very slow acting such as temperature control. If this was just left to PI, you would get consistent
overshoot as the change is requested too late.
• PI is the most used combination and works perfectly for most control loops. Using D on these
normal loops will create severe instability.
The following terms are used when discussing closed-loop applications and PID instructions:
• Process Variable: The variable in the system you are trying to control. For example, you may
want to control the temperature of a furnace or the fluid level in a tank.
• Setpoint: The value at which you would like the process variable to stay. For example, you
may want to keep the temperature of the furnace at 900 degrees Celsius or keep the fluid level
of the tank at 70%.
• Error: The difference between the process variable and the set point.
• Control Variable: The variable containing calculated information designed to ultimately adjust the process
variable:
• For example, when controlling the water level in a tank, the control variable might contain instructions
that control the tank’s outlet valve.
• Bias: A variable used to compensate for a steady-state loss of energy from the controlled process:
• For example, when controlling the water level in a tank, if there is a continual loss of water due to
evaporation the bias variable can be used to account for this loss). This value should be added to the
PID equation as needed.
PID and PIDE Calculations.
The PID algorithm regulates the control variable in order to maintain the process variable at the
setpoint. All equations have the following basic format:
CalculatedCV = CVn-1 + PTerm + ITerm + DTerm
PID Terminology.
Proportional Term or Gain.
• If the Gain is set too high, the system can become unstable. If it is Proportional set too high, it will
be dead.
• When set correctly, it will allow a certain level of error to remain.
Example:
If the water level in a tank is monitored and the measured error in one scan is +20 gallons, the
proportional term subtracts some proportion of the 20 gallons from the tank. This proportion is
determined by Constant 1 (its gain):
• If Constant 1 has a value of 1, then the proportional term subtracts 20 gallons, thus removing all
the error.
• If Constant 1 has a value of 0.5, then the proportional term says to subtract 10 gallons, thus
removing half of the error.
The following graphic shows an example of the effect a PID instruction has on the process variable
using just the proportional term following some disturbance of the process variable:
Set Point
Error
PV
P
Time
The Integral term causes the control variable to change as a function of the error and time.
Specifically, the integral term considers the current error value, the previous error value, and the time
between measurements.
The integral term is commonly used with the proportional term, because together they can minimize the
error in the system and the Offset.
Example.
If the water level in a tank is monitored and a measured error in one scan is +20 gallons and the
previous error was +15 gallons, the integral term will not just react to the +20 gallon reading like the
proportional term would.
Rather, the integral term considers both the +20 and the +15 readings, as well as the length of time
between readings.
The following graphic shows an example of the effect a PID instruction has on the process variable using
both the proportional and integral term following some disturbance of the process variable:
Set Point
Error
P
PV
PI
Time
Shown below is a configured PID loop. The input may typically be a flow value coming from the field and
the CV value may be going to a control valve. The difference between the CV value and the CVEU value is
that the CV value is 0 – 100. The CVEU value can be scaled as required.
Ziegler-Nichols Tuning Methods.
When a PID loop is implemented, it must control the process. This is done by Tuning the Loop.
Ziegler-Nichols developed two methods; both are popular. The methods developed are.
d T Time(Seconds)
P = 0.6Pu
Ti = 0.5Tu
Td = 0.125Tu
Where P= Proportional, Pu =
Ultimate Gain
Ti = Integral
Td = Derivative
T = Process variation Time. Tu =
Ultimate Time.