Like the P-Only controller, the Proportional-Integral (PI) algorithm computes and transmits a controller output (CO) signal every sample time, T, to the final control element (e.g., valve, variable speed pump). The computed CO from the PI algorithm is influenced by the controller tuning parameters and the controller error, e(t).
PI controllers have two tuning parameters to adjust. While this makes them more challenging to tune than a P-Only controller, they are not as complex as the three parameter PID controller.
Integral action enables PI controllers to eliminate offset, a major weakness of a P-only controller. Thus, PI controllers provide a balance of complexity and capability that makes them by far the most widely used algorithm in process control applications.
The PI Algorithm
While different vendors cast what is essentially the same algorithm in different forms, here we explore what is variously described as the dependent, ideal, continuous, position form:
Where:
CO = controller output signal (the wire out)
CObias = controller bias or null value; set by bumpless transfer as explained below
e(t) = current controller error, defined as SP - PV
SP = set point
PV = measured process variable (the wire in)
Kc = controller gain, a tuning parameter
Ti = reset time, a tuning parameter
The first two terms to the right of the equal sign are identical to the P-Only controller referenced at the top of this article.
The integral mode of the controller is the last term of the equation. Its function is to integrate or continually sum the controller error, e(t), over time.
Some things we should know about the reset time tuning parameter, Ti:
▪ It provides a separate weight to the integral term so the influence of integral action can be independently adjusted.
▪ It is in the denominator so smaller values provide a larger weight to (i.e. increase the influence of) the integral term.
▪ It has units of time so it is always positive.
Function of the Proportional Term
As with the P-Only controller, the proportional term of the PI controller, Kc·e(t), adds or subtracts from CObias based on the size of controller error e(t) at each time t.
As e(t) grows or shrinks, the amount added to CObias grows or shrinks immediately and proportionately. The past history and current trajectory of the controller error have no influence on the proportional term computation.
The plot below illustrates this idea for a set point response. The error used in the proportional calculation is shown on the plot:
▪ At time t = 25 min, e(25) = 60-56 = 4
▪ At time t = 40 min, e(40) = 60-62 = -2
Recalling that controller error e(t) = SP - PV, rather than viewing PV and SP as separate traces as we do above, we can compute and plot e(t) at each point in time t.
Below is the identical data to that above only it is recast as a plot of e(t) itself. Notice that in the plot above, PV = SP = 50 for the first 10 min, while in the error plot below, e(t) = 0 for the same time period.
This plot is useful as it helps us visualize how controller error continually changes size and sign as time passes.
Function of the Integral Term
While the proportional term considers the current size of e(t) only at the time of the controller calculation, the integral term considers the history of the error, or how long and how far the measured process variable has been from the set point over time.
Integration is a continual summing. Integration of error over time means that we sum up the complete controller error history up to the present time, starting from when the controller was first switched to automatic.
Controller error is e(t) = SP - PV. In the plot below, the integral sum of error is computed as the shaded areas between the SP and PV traces.
Each box in the plot has an integral sum of 20 (2 high by 10 wide). If we count the number of boxes (including fractions of boxes) contained in the shaded areas, we can compute the integral sum of error.
So when the PV first crosses the set point at around t = 32, the integral sum has grown to about 135. We write the integral term of the PI controller as:
Since it is controller error that drives the calculation, we get a direct view the situation from a controller error plot as shown below:
Note that the integral of each shaded portion has the same sign as the error. Since the integral sum starts accumulating when the controller is first put in automatic, the total integral sum grows as long as e(t) is positive and shrinks when it is negative.
At time t = 60 min on the plots, the integral sum is 135 - 34 = 101. The response is largely settled out at t = 90 min, and the integral sum is then 135 - 34 7 = 108.
Integral Action Eliminates Offset
The previous sentence makes a subtle yet very important observation. The response is largely complete at time t = 90 min, yet the integral sum of all error is not zero.
In this example, the integral sum has a final or residual value of 108. It is this residual value that enables integral action of the PI controller to eliminate offset.
As discussed in a previous article, most processes under P-only control experience offset during normal operation. Offset is a sustained value for controller error (i.e., PV does not equal SP at steady state).
We recognize from the P-Only controller:
that CO will always equal CObias unless we add or subtract something from it.
The only way we have something to add or subtract from CObias in the P-Only equation above is if e(t) is not zero. It e(t) is not steady at zero, then PV does not equal SP and we have offset.
However, with the PI controller:
we now know that the integral sum of error can have a final or residual value after a response is complete. This is important because it means that e(t) can be zero, yet we can still have something to add or subtract from CObias to form the final controller output, CO.
So as long as there is any error (as long as e(t) is not zero), the integral term will grow or shrink in size to impact CO. The changes in CO will only cease when PV equals SP (when e(t) = 0) for a sustained period of time.
At that point, the integral term can have a residual value as just discussed. This residual value from integration, when added to CObias, essentially creates a new overall bias value that corresponds to the new level of operation.
In effect, integral action continually resets the bias value to eliminate offset as operating level changes.
Challenges of PI Control
There are challenges in employing the PI algorithm:
▪ The two tuning parameters interact with each other and their influence must be balanced by the designer.
▪ The integral term tends to increase the oscillatory or rolling behavior of the process response.
Because the two tuning parameters interact with each other, it can be challenging to arrive at "best" tuning values. The value and importance of our design and tuning recipe increases as the controller becomes more complex.
Initializing the Controller for Bumpless Transfer
When we switch any controller from manual mode to automatic (from open loop to closed loop), we want the result to be uneventful. That is, we do not want the switchover to cause abrupt control actions that impact or disrupt our process
We achieve this desired outcome at switchover by initializing the controller integral sum of error to zero. Also, the set point and controller bias value are initialized by setting:
▪ SP equal to the current PV
▪ CObias equal to the current CO
With the integral sum of error set to zero, there is nothing to add or subtract from CObias that would cause a sudden change in the current controller output. With the set point equal to the measured process variable, there is no error to drive a change in our CO. And with the controller bias set to our current CO value, we are prepared by default to maintain current operation.
Thus, when we switch from manual mode to automatic, we have "bumpless transfer" with no surprises. This is a result everyone appreciates.
Reset Time Versus Reset Rate
Different vendors cast their control algorithms in slightly different forms. Some use proportional band rather than controller gain. Also, some use reset rate, Tr, instead of reset time. These are simply the inverse of each other:
Tr = 1/Ti
No matter how the tuning parameters are expressed, the PI algorithms are all equally capable.
But it is critical to know your manufacturer before you start tuning your controller because parameter values must be matched to your particular algorithm form. Commercial software for controller design and tuning will automatically address this problem for you.
Implementing a PI controller
We explore PI controller design, tuning and implementation on the heat exchanger in this article and the gravity drained tanks in this article.
Today I am going to dicuss a very importnat issue.
In fact two of my colleagues have experienced the thisissue & almost got embarrased in front of the client.
Whle implementing PID youn should be very careful to implement SCALLING & UNITS to tyhe controller. My colleague was there to implement as PH control loop. After setting all the parameters they were not getting the correct reading out of PH transmitter & in turn they can't use these values to implement the control loop for the industry. After a long struggle at site they have called e. My first question was about scaling & guess What! They forgot to implement scaling. This simple mistake cost them & cluient more than two hours.
So remember , Controller Gain Is Dimensionless in Commercial Systems.
IIn modern plants, process variable (PV) measurement signals are typically scaled to engineering units before they are displayed on the control room HMI computer screen or archived for storage by a process data historian. This is done for good reasons.
When operations staff walk through the plant, the assorted field gauges display the local measurements in engineering units to show that a vessel is operating, for example, at a pressure of 25 psig (1.7 barg) and a temperature of 140 oC (284 oF).
It makes sense, then, that the computer screens in the control room display the set point (SP) and PV values in these same familiar engineering units because:
• It helps the operations staff translate their knowledge and intuition from their field experience over to the abstract world of crowded HMI computer displays.
• Familiar units will facilitate the instinctive reactions and rapid decision making that prevents an unusual occurrence from escalating into a crisis situation.
• The process was originally designed in engineering units, so this is how the plant documentation will list the operating specifications.
Knowledge Base Articles Compute Kc With Units
Like a control room display, the Control Station Knowledge Base presents PV values in engineering units. In most articles, these PVs are used directly in tuning correlations to compute controller gains, Kc. As a result, the Kc values also carry engineering units.
The benefit of this approach is that controller gain maintains the intuitive familiarity that engineering units provide. The difficulty is that commercial controllers are normally configured to use a dimensionless Kc (or dimensionless proportional band, PB).
To address this issue, we explore below how to convert a Kc with engineering units into the standard dimensionless (%/%) form.
The conversion formula presented at the end of this article is reasonably straightforward to use. But it is derived from several subtle concepts that might benefit from explanation. Thus, we begin with a background discussion on units and scaling, and work our way toward our Kc conversion formula goal.
From Analog Sensor to Digital Signal
There are many ways to measure a process variable and move the signal into the digital world for use in a computer based control system. Below is a simplified sketch of one approach.

Other operations in the pathway from sensor to control system not shown in the simplified sketch might include a transducer, an amplifier, a transmitter, a scaling element, a linearizing element, a signal filter, a multiplexer, and more.
The central issue for this discussion is that the PV signal arrives at the computers and controllers in a raw digital form. The continuous analog PV measurement has been quantized (broken into) a range of discrete increments or digital integer "counts" by an A/D (analog to digital) converter.
More counts dividing the span of a measurement signal increases the resolution of the measurement when expressed as a digital value. The ranges offered by most vendors result from the computer binary 2n form where n is the number of bits of resolution used by the A/D converter.
Example: a 12 bit A/D converter digitizes an analog signal into 212 = 4096 discrete increments normally expressed to range from 0 to 4095 counts.
A 13 bit A/D converter digitizes an analog signal into 213 = 8192 discrete increments normally expressed to range from 0 to 8191 counts.
A 14 bit A/D converter digitizes an analog signal into 214 = 16384 discrete increments normally expressed to range from 0 to 16383 counts.
Example: if a 4 to 20 mA (milliamp) analog signal range is digitized by a 12 bit A/D converter into 0 to 4095 counts, then the resolution is:
(20 - 4 mA) ÷ 4095 counts = 0.00391 mA/count
A signal of 7 mA from an analog range of 4 to 20 mA changes to digital counts from the 12 bit A/D converter as:
(7 - 4 mA) ÷ 0.00391 mA/count = 767 counts
A signal of 1250 counts from a 12 bit A/D converter corresponds to an input signal of 8.89 mA from an analog range of 4 to 20 mA as:
4 mA (1250 counts)∙(0.00391 mA/count) = 8.89 mA
Scaling the Digital PV Signal to Engineering Units for Display
During the configuration phase of a control project, the minimum and maximum (or zero and span) of the PV measurement must be entered. These values are used to scale the digital PV signal to engineering units for display and storage.
Example: if a temperature range of 100 oC to 500 oC is digitized into 0 to 8191 counts by a 13 bit A/D converter, the signal is scaled for display and storage by setting the minimum digital value of 0 counts = 100 oC, and maximum digital value of 8191 counts = 500 oC
Each digital count from the 13 bit A/D converter gives a resolution of:
(500 - 100 oC) ÷ 8191 counts = 0.0488 oC/count
A signal of 175 oC from an analog range of 100 oC to 500 oC changes to digital counts from the 13 bit A/D converter as:
(175 - 100 oC) ÷ 0.0488 oC/count = 1537 counts
A signal of 1250 counts from the 13 bit A/D converter corresponds to an input signal of 161 oC from an analog range of 100 oC to 500 oC as:
100 oC (1250 counts)∙(0.0488 oC/count) = 161 oC
As discussed at the top of this article, the intuition and field knowledge of the operations staff is maintained by using engineering units in control room displays and when storing data to a historian.
For this same reason, modern control software uses engineering units when passing variables between the function blocks used for calculations and decision-making. Calculation and decision functions are easier to understand, document and debug when the logic is written using floating point values in common engineering units.
Scaling the Digital PV Signal for Use by the PID Controller
Most commercial PID controllers use a controller gain, Kc (or proportional band, PB) that is expressed as a standard dimensionless %/%.
Note: Controller gain in commercial controllers is often said to be unitless or dimensionless, but Kc actually has units of (% of CO signal)/(% of PV signal). In a precise mathematical world, these units do not cancel, though there is little harm in speaking as though they do.
Prior to executing the PID controller calculation, the PV signal must be scaled to a standard 0% to 100% to match the "dimensionless" Kc. This happens every loop sample time, T, regardless of whether we are measuring temperature, pressure, flow, or any other process variable.
To perform this scaling, the minimum and maximum PV values in engineering units corresponding to the 0% to 100% standard PV range must be entered during setup and loop configuration.
Example: if a temperature range of 100 oC to 500 oC is digitized into 0 to 8191 counts by a 13 bit A/D converter, the signal is scaled for the PID control calculation by setting the minimum digital value of 0 counts = 0%, and the maximum digital value of 8191 counts = 100%.
Each digital count from the 13 bit A/D converter gives a resolution of:
(100 - 0%) ÷ 8191 counts = 0.0122%/count
A signal of 1537 counts (175 oC) from a 13 bit A/D converter would translate to a signal of 18.75% as:
0% (1537)∙(0.0122%/value) = 18.75%
A signal of 1250 counts (161 oC) from a 13 bit A/D converter would translate to a signal of 15.25% as:
0% (1250)∙(0.0122%/value) = 15.25%
Control Output is 0% to 100%
The controller output (CO) from commercial controllers normally default to a 0% to 100% digital signal as well. Digital to analog (D/A) converters begin the transition of moving the digital CO values into the appropriate electrical current and voltage required by the valve, pump or other final control element (FCE) in the loop.
Note: While CO commonly defaults to a 0% to 100% signal, this may not be appropriate when implementing the outer primary controller in a cascade. The outer primary CO1 becomes the set point of the inner secondary controller, and signal scaling must match. For example, if SP2 is in engineering units, the CO1 signal must be scaled accordingly.
Care Required When Using Engineering Units For Controller Tuning
It is quite common to analyze and design controllers using data retrieved from our process historian or captured from our computer display. Just as with the articles in this e-book, this means the computed Kc values will likely be scaled in engineering units.
The sketch below highlights (click for a large view) that scaling from engineering units to a standard 0% to 100% range used in commercial controllers requires careful attention to detail.

The conversion of PV in engineering units to a standard 0% to 100% range requires knowledge of the maximum and minimum PV values in engineering units. These are the same values that are entered into our PID controller software function block during setup and loop configuration. The general conversion formula is:

where:
PVmax = maximum PV value in engineering units
PVmin = minimum PV value in engineering units
PV = current PV value in engineering units
Example: a temperature signal ranges from 100 oC to 500 oC and we seek to scale it to a range of 0% to 100% for use in a PID controller. We set:
PVmin = 100 oC and PVmax = 500 oC
A temperature of 175 oC converts to a standard 0% to 100% range as:
[(175 - 100 oC) ÷ (500 - 100 oC)]∙(100 - 0%) = 18.75%
A temperature of 161 oC converts to a standard 0% to 100% range as:
[(161 - 100 oC) ÷ (500 - 100 oC)]∙(100 - 0%) = 15.25%
Applying Conversion to Controller Gain, Kc
The discussion to this point provides the basis for the formula used to convert Kc from engineering units into dimensionless (%/%):
Example: the moderate Kc value in our P-Only control of the heat exchanger study is Kc = - 0.7 %/ oC. For this process, PVmax = 250 oC and PVmin = 0 oC
Kc = (- 0.7 %/ oC)∙[(250 - 0 oC) ÷ (100 - 0%)]
= - 1.75 %/%
Example: the moderate value for Kc in our P-Only control of the gravity drained tanks study is Kc = 8 %/ oC For this process, PVmax = 10 m and PVmin = 0 m
Kc = (8 %/ m)∙[(10 - 0 m) ÷ (100 - 0%)]
= 0.8 %/%
Final Thoughts
Textbooks are full of rule-of-thumb guidelines for estimating initial Kc values for a controller depending on whether, for example, it is a flow loop, a temperature loop or a liquid level loop. While we have great reservations with such a "guess and test" approach to tuning, it is important to recognize that such rules are based on a Kc that is expressed in a dimensionless (%/%) form.
Followers
About Me
About This Blog
categories
- action (6)
- basics (9)
- behavious (6)
- componenst (8)
- Control (11)
- control loop (10)
- Controllers (11)
- Courses (5)
- DESIGN (3)
- Drives (5)
- dynamic (4)
- Heat Exchanger (2)
- integral (5)
- linear (5)
- loop (8)
- motors (5)
- non-linear (6)
- pid (10)
- proportional (9)
- Safety (6)
- Scalling (2)
- tuning (4)
- unit (1)
- variability (4)
Blog Archive
-
▼
2011
(30)
-
▼
March
(30)
- Integral (Reset) Windup, Jacketing Logic and the V...
- PI Disturbance Rejection in the Jacketed Stirred R...
- Interacting Tuning Parameters
- PI Disturbance Rejection Of The Gravity Drained ...
- PI Control of the Heat Exchanger
- Integral Action and PI Control
- Controller Gain Is Dimensionless in Commercial Sys...
- P-Only Disturbance Rejection of the Gravity Draine...
- The P-Only Control Algorithm The simplest algo...
- Proportional Control - The Simplest PID Controller
- Controller process architecture
- Nonlinear Process Behavior & DEEISGN OF CONTROL.
- Sample Time Impacts Controller Performance
- Process Data, Dynamic Modeling and a Recipe for P...
- Control Loop Basics.
- Motivation and Terminology of Automatic Process Co...
- AC/DC motor details.
- A very nice basic tutorial for motors.
- Overview of Motor Types Tutorial
- Coolmagnetman. Motor experiment
- PACONTROL TUTORIAL
- Adjustable speed drive
- A very good tutorial for motor is given below.
- Power Distribution Courses
- Useful material for Motors
- Motor Glossary
- Motor Selecttion
- Drives
- Basics of Motors and Drives
- mk
-
▼
March
(30)
