Tuning PID loops for level control

One-in-four control loops are regulating level, but techniques for tuning PID controllers in these integrating processes are not widely understood.

10/30/2014


Figure 1: A typical level control loop. Here the level measurement is sent to the controller, which regulates a valve on the tank’s outlet. Courtesy: DataforthSince the first two PID controller tuning methods were published in 1942 by J. G. Ziegler and N. B. Nichols, more than 100 additional tuning rules have been developed for self-regulating control loops (e.g., flow, temperature, pressure). In contrast, fewer than 10 tuning methods have been developed for integrating (e.g., level) process types, though roughly one-in-four industrial PID loops controls liquid level.

The original Ziegler-Nichols tuning methods aimed for a super-fast response capability, which was achieved at the expense of control loop stability. However, a slight modification of these tuning rules improves loop stability while still maintaining a fast response to setpoint changes and disturbances. As most process experts will agree, stability is generally more important than speed.

Applicable process types

This modified Ziegler-Nichols tuning method is intended for use with integrating processes, and level control loops (Figure 1) are the most common example.

Figure 2: An integrating process is stable only when the controller is at the specific equilibrium point. In this case, the controller output needs to be 40%. Courtesy: DataforthUnlike a self-regulating process, an integrating process will stabilize at only one controller output, which has to be at the point of equilibrium. If the controller output is set to a different value, the process will increase or decrease indefinitely at a steady slope (Figure 2).

Note: This tuning method provides a fast response to disturbances in level and is therefore not suitable for tuning surge tank level control loops.

The modified Ziegler-Nichols tuning rules presented here are designed for use on a non-interactive controller algorithm with its integral time set in minutes. Dataforth's MAQ20 industrial data acquisition and control system uses this approach as do other controllers from a variety of manufacturers.

Procedure

To apply these tuning rules to an integrating process, follow these steps. The process variable and controller output must be time-trended so that measurements can be taken from them, as illustrated in Figure 3.

Step 1. Do a step test

a) Make sure, as far as possible, that the uncontrolled flow in and out of the vessel is as constant as possible.

b) Put the controller in manual control mode.

c) Wait for a steady slope in the level. If the level is very volatile, wait long enough to be able to confidently draw a straight line though the general slope of the level.

d) Make a step change in the controller output. Try to make the step change 5% to 10% in size, if the process can tolerate it.

e) Wait for the level to change its slope into a new direction. If the level is volatile, wait long enough to be able to confidently draw a straight line though the general slope of the level.

f) Restore the level to an acceptable operating point and place the controller back into automatic control mode.

Step 2. Determine process characteristics

Figure 3: Measurements used for tuning a level control loop. These are what you’ll need to do the calculations. Courtesy: DataforthBased on the example shown in Figure 3:

a) Draw a line (Slope 1) through the initial slope, and extend it to the right as shown in Figure 3.

b) Draw a line (Slope 2) through the final slope, and extend it to the left to intersect Slope 1.

c) Measure the time between the beginning of the change in controller output and the intersection between Slope 1 and Slope 2. This is the process dead time (td), the first parameter required for tuning the controller.

d) If td was measured in seconds, divide it by 60 to convert it to minutes. As mentioned earlier, the calculations here are based on the integral time in minutes, so all time measurements should be in minutes.

e) Pick any two points (PV1 and PV2) on Slope 1, located conveniently far from each other to make accurate measurements.

f) Pick any two points (PV3 and PV4) on Slope 2, located conveniently far from each other to make accurate measurements.

g) Calculate the difference in the two slopes (DS) as follows:

DS = (PV4 - PV3) / T2 - (PV2 - PV1) / T1

Note: If T1 and T2 measurements were made in seconds, divide them by 60 to convert them to minutes.

h) If the PV is not ranged 0%-100%, convert DS to a percentage of the range as follows:

DS% = 100 × DS / (PV range max - PV range min)

i) Calculate the process integration rate (ri), which is the second parameter needed for tuning the controller:

ri = DS [in %] / dCO [in %]

Step 3. Repeat

Perform steps 1 and 2 at least three more times to obtain good average values for the process characteristics td and ri.

Step 4. Calculate tuning constants

Using the equations below, calculate your tuning constants. Both PI and PID calculations are provided since some users will select the former based on the slow-moving nature of many level applications. 

For PI Control                       

Controller Gain, Kc =  0.45 / (ri × td)             

Integral Time, Ti =     6.67 × td                     

Derivative Time, Td = 0                                 

For PID Control

Controller Gain, Kc = 0.75 / (ri × td)

Integral Time, Ti =     5 × td 

Derivative Time, Td = 0.4 × td

Note that these tuning equations look different from the commonly published Ziegler-Nichols equations. The first reason is that Kc has been reduced and Ti increased by a factor of two, to make the loop more stable and less oscillatory. The second reason is that the Ziegler-Nichols equations for PID control target an interactive controller algorithm, while this approach is designed for a non-interactive algorithm such as is used in the Dataforth MAQ20 and others. (If you are using a different controller, make sure you find out which approach it uses.) The PID equations above have been adjusted to compensate for the difference.

Step 5. Enter the values

Figure 4: Here is the desired result—a level control loop, tuned using this modified Ziegler-Nichols method, responding to a setpoint change. Courtesy: DataforthKey your calculated values into the controller, making sure the algorithm is set to non-interactive, and put the controller back into automatic mode.

Step 6. Test and tune your work

Change the setpoint to test the new values and see how it responds. It might still need some additional fine-tuning to look like Figure 4. For integrating processes, Kc and Ti need to be adjusted simultaneously and in opposite directions. For example, to slow down the control loop, use Kc / 2 and Ti × 2.

With just a few modifications to the original Ziegler-Nichols tuning approach, these rules can be used to tune level control loops for both stability and fast response to setpoint changes and disturbances.

Lee Payne is CEO of Dataforth.

Additional reading: J.G. Ziegler and N.B. Nichols, Optimum settings for automatic controllers, Transactions of the ASME, 64, pp. 759-768, 1942.

ONLINE

To learn more about PID, look for additional application notes at Dataforth website: www.dataforth.com 

Read more about process control strategy with the related stories below.

Key concepts:

  • Modified Ziegler-Nichols tuning rules are effective for tuning level control loops.
  • They are designed for use with integrating processes and on non-interactive controller algorithms.
  • These rules provide loop stability as well as fast response to setpoint changes and disturbances.


Engineers' Choice Awards
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
System Integrator Giants
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
System Integrator of the Year
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
How to Maximize Factory Automation Efficiency with Low Cost Machine Vision
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Wireless Reliability in Harsh Environments
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
Human Factors and the Impact on Plant Safety
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
August 2018
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
July 2018
Ladder logic best practices and object-oriented programming, safety instrumented systems, enclosure design issues and challenges, process control advice
June 2018
Discrete and process sensor fundamentals, autotuning controls, system integrator roundtable
Edge Computing
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data Center Design
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
PLCs
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. Featured articles in this digital report compare PLCs and programmable automation controllers (PACs), industrial PCs, and robotic controllers.
SIDB

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

August 2018
SCADA standardization, capital expenditures, data-driven drilling and execution
June 2018
Machine learning, produced water benefits, progressive cavity pumps
April 2018
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
John O. Ayuk, PE, CFSE, PMP, CAP
Automation Engineer; Wood Group
Doug Baker
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
Data Centers: Impacts of Climate and Cooling Technology
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
Safety First: Arc Flash 101
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
Critical Power: Hospital Electrical Systems
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
Engineers' Choice Awards
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
System Integrator Giants
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
System Integrator of the Year
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
How to Maximize Factory Automation Efficiency with Low Cost Machine Vision
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Wireless Reliability in Harsh Environments
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
Human Factors and the Impact on Plant Safety
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
August 2018
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
July 2018
Ladder logic best practices and object-oriented programming, safety instrumented systems, enclosure design issues and challenges, process control advice
June 2018
Discrete and process sensor fundamentals, autotuning controls, system integrator roundtable
Edge Computing
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data Center Design
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
PLCs
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. Featured articles in this digital report compare PLCs and programmable automation controllers (PACs), industrial PCs, and robotic controllers.
SIDB

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

August 2018
SCADA standardization, capital expenditures, data-driven drilling and execution
June 2018
Machine learning, produced water benefits, progressive cavity pumps
April 2018
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
John O. Ayuk, PE, CFSE, PMP, CAP
Automation Engineer; Wood Group
Doug Baker
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
Data Centers: Impacts of Climate and Cooling Technology
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
Safety First: Arc Flash 101
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
Critical Power: Hospital Electrical Systems
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
Engineers' Choice Awards
The Engineers' Choice Awards highlight some of the best new control, instrumentation and automation products as chosen by Control Engineering subscribers.
System Integrator Giants
The System Integrator Giants program lists the top 100 system integrators among companies listed in CFE Media's Global System Integrator Database.
System Integrator of the Year
Each year, a panel of Control Engineering and Plant Engineering editors and industry expert judges select the System Integrator of the Year Award winners in three categories.
How to Maximize Factory Automation Efficiency with Low Cost Machine Vision
This eGuide illustrates solutions, applications and benefits of machine vision systems.
Wireless Reliability in Harsh Environments
Learn how to increase device reliability in harsh environments and decrease unplanned system downtime.
Human Factors and the Impact on Plant Safety
This eGuide contains a series of articles and videos that considers theoretical and practical; immediate needs and a look into the future.
August 2018
Augmented reality and virtual reality education, autotuning PID control, cybersecurity advice, educating engineers
July 2018
Ladder logic best practices and object-oriented programming, safety instrumented systems, enclosure design issues and challenges, process control advice
June 2018
Discrete and process sensor fundamentals, autotuning controls, system integrator roundtable
Edge Computing
This article collection contains several articles on how today's technologies heap benefits onto an edge-computing architecture such as faster computing, better networking, more memory, smarter analytics, cloud-based intelligence, and lower costs.
Data Center Design
Data centers, data closets, edge and cloud computing, co-location facilities, and similar topics are among the fastest-changing in the industry.
PLCs
Programmable logic controllers (PLCs) represent the logic (decision) part of the control loop of sense, decide, and actuate. Featured articles in this digital report compare PLCs and programmable automation controllers (PACs), industrial PCs, and robotic controllers.
SIDB

Find and connect with the most suitable service provider for your unique application. Start searching the Global System Integrator Database Now!

August 2018
SCADA standardization, capital expenditures, data-driven drilling and execution
June 2018
Machine learning, produced water benefits, progressive cavity pumps
April 2018
ROVs, rigs, and the real time; wellsite valve manifolds; AI on a chip; analytics use for pipelines
John O. Ayuk, PE, CFSE, PMP, CAP
Automation Engineer; Wood Group
Doug Baker
System Integrator; Cross Integrated Systems Group
Jose S. Vasquez, Jr.
Jose S. Vasquez, Jr.
Fire & Life Safety Engineer; Technip USA Inc.
Data Centers: Impacts of Climate and Cooling Technology
This course focuses on climate analysis, appropriateness of cooling system selection, and combining cooling systems.
Safety First: Arc Flash 101
This course will help identify and reveal electrical hazards and identify the solutions to implementing and maintaining a safe work environment.
Critical Power: Hospital Electrical Systems
This course explains how maintaining power and communication systems through emergency power-generation systems is critical.
click me