Loop Tuning Fundamentals

A control loop is a feedback mechanism that attempts to correct discrepancies between a measured process variable and the desired setpoint. The controller applies the necessary corrective actions via an actuator that can drive the process variable up or down. A proportional-integral-derivative (PID) controller tracks the error between the process variable and the setpoint, the integral of ...




  • PID explained

  • Value selection tips

  • Open-and closed-loop tuning

  • Software product listing

Help is available

A control loop is a feedback mechanism that attempts to correct discrepancies between a measured process variable and the desired setpoint. The controller applies the necessary corrective actions via an actuator that can drive the process variable up or down.


A proportional-integral-derivative (PID) controller tracks the error between the process variable and the setpoint, the integral of recent errors, and the rate by which the error has been changing. It computes its next corrective action from a weighted sum of those three terms (or modes), then outputs the results to the process and awaits the next measurement.


PID basics

A PID controller using the ideal or ISA standard form of the PID algorithm computes its output CO(t) according to the formula shown in Figure 1. PV(t) is the process variable measured at time t and the error e(t) is the difference between the process variable and the setpoint. The PID formula weights the proportional term by a factor of P , the integral term by a factor of P/T I , and the derivative term by a factor of P . T D where P is the controller gain, T I is the integral time, and T D is the derivative time.


CO(t) is the controller's current output
e(t) = SP - PV (t) is the error between the set point (SP) and the process variable PV(t)
P is the controller gain
T 1
is the integral time T D is the derivative time

This terminology bears some explaining. Gain refers to the amount by which the error signal will gain or lose strength as it passes through the controller en route to becoming part of the controller's output. A PID controller with a high gain will tend to generate aggressive corrective actions to eliminate errors.


The integral time refers to a hypothetical sequence of events where the error starts at zero then abruptly jumps to a fixed value. Such an error would cause an instantaneous response from the controller's proportional term and a response from the integral term that starts at zero and increases steadily. The time required for the integral term to catch up to the unchanging proportional term is the integral time T I . A PID controller with a long integral time is more heavily weighted towards proportional action thanintegral action.


Similarly, the derivative time T D is a measure of the relative influence of the derivative term in the PID formula. If the error were to start at zero and begin increasing at a fixed rate, the proportional term would start at zero while the derivative term assumed a fixed value. The proportional term would then increase steadily until it caught up to the derivative term at the end of the derivative time. A PID controller with a long derivative time is more heavily weighted towards derivative action than proportional action.


Historical note

The very first feedback controllers included just the proportional term. For mathematical reasons that only became apparent later, a P -only controller tends to drive the error downward to a small but non-zero value and then quit. Operators observing this phenomenon would then manually increase the controller's output until the last vestiges of the error were eliminated. They called this operation resetting the controller.


An open-loop step test reveals the prcess' time constant T, deadtime d, and gain k.

When the integral term was introduced, operators observed that it tended to perform the reset operation automatically. That is, the controller would augment its proportional action just enough to eliminate the error entirely. Hence, integral action was originally called automatic reset and remains labeled that way on some PID controllers to this day. The derivative term was invented shortly thereafter and was described, accurately enough, as rate control.


Tricky business

Tuning is the art of selecting values for the tuning parameters P , T I , and T D so that the controller will be able to eliminate an error quickly without causing the process variable to fluctuate excessively. That's easier said than done.


Consider a car's cruise controller, for example. It can accelerate the car to a desired cruising speed, but not instantaneously. The car's inertia causes a delay between the time that the controller engages the accelerator and the time that the car's speed reaches the setpoint. How well a PID controller performs depends in large part on such lags.


Suppose an overloaded car with an undersized engine suddenly starts up a steep hill. The ensuing error between the car's actual and desired speeds would cause the controller's derivative and proportional actions to kick in immediately. The controller would begin to accelerate the car, but only as fast as the lag allows.


After a while, the integral action would also begin to contribute to the controller's output and eventually come to dominate it (since the error decreases so slowly when the lag time is long, and a sustained error is what drives the integral action). But exactly when that would happen and how dominant the integral action would become thereafter would depend on the severity of the lag and the relative sizes of the controller's integral and derivative times.


Forcing the closed-loop system into sustained oscillations with a proportional-only controller reveals the ultimate gain P u and the ultimate period T u ..

This simple example demonstrates a fundamental principle of PID tuning. The best choice for each of the tuning parameters P , T I , and T D depends on the values of the other two as well as the behavior of the controlled process. Furthermore, modifying the tuning of any one term affects the performance of the others since the modified controller affects the process and the process, in turn, affects the controller.


Ziegler-Nichols tuning

So how can a control engineer designing a PID loop determine the values for P , T I , and T D that will work best for a particular application? John G. Ziegler and Nathaniel B. Nichols of Taylor Instruments (now part of ABB Instrumentation in Rochester, NY) addressed that question in 1942 when they published two loop-tuning techniques that remain popular to this day.


Their open-loop technique is based on the results of a bump or step test for which the controller is taken off-line and manually forced to increase its output abruptly. A strip chart of the process variable's subsequent trajectory is known as the reaction curve (see Figure 2).


A sloped line drawn tangent to the reaction curve at its steepest point shows how fast the process reacted to the step change in the controller's output. The inverse of this line's slope is the process time constant T which measures the severity of the lag.


The reaction curve also shows how long it took for the process to demonstrate its initial reaction to the step (the dead time d ) and how much the process variable increased relative to the size of the step (the process gain K ). By trial-and-error, Ziegler and Nichols determined that the best settings for the tuning parameters P , T I , and T D could be computed from T , d , and K as follows:


equation #2.jpg


Once these parameter settings have been loaded into the PID formula and the controller returned to automatic mode, the controller should be able to eliminate future errors without causing the process variable to fluctuate excessively.


Ziegler and Nichols also described a closed loop-tuning technique that is conducted with the controller in automatic mode, but with the integral and derivative actions shut off. The controller gain is increased until even the slightest error causes a sustained oscillation in the process variable (see Figure 3).


The smallest controller gain that can cause such an oscillation is called the ultimate gain P u . The period of those oscillations is called the ultimate period T u . The appropriate tuning parameters can be computed from these two values according to the following rules:



equation #3.jpg


Unfortunately, PID loop tuning isn't really that simple. Different PID controllers use different versions of the PID formula, and each must be tuned according to the appropriate set of rules. The rules also change when:


  • The derivative and/or the integral action are disabled.

  • The process itself is inherently oscillatory.

  • The process behaves as if it contains its own integral term (as is the case with level control).

  • The deadtime d is very small or significantly larger than the time constant T .

Furthermore, Ziegler and Nichols had a particular closed-loop performance objective in mind when they settled on their particular tuning rules. They chose to allow some fluctuations in the process variable so long as each successive peak was no more than one-fourth the size of its predecessor (so-called quarter wave decay). For applications that require even less fluctuation, additional tweaking of the tuning parameters is required.


This is where loop tuning becomes an art. It takes more than a little experience and sometimes a lot of luck to come up with just the right combination of P , T I , and T D .


Help is available

Fortunately, there are commercial software products available that know all the tuning rules, all the different PID formulas, and all the latest tuning procedures. Exactly how each works is beyond the scope of this article and in many cases, proprietary. For more information, contact:


*These software packages are also available from several controller manufacturers as private-labeled products

No comments
The Top Plant program honors outstanding manufacturing facilities in North America. View the 2013 Top Plant.
The Product of the Year program recognizes products newly released in the manufacturing industries.
The Engineering Leaders Under 40 program identifies and gives recognition to young engineers who...
The true cost of lubrication: Three keys to consider when evaluating oils; Plant Engineering Lubrication Guide; 11 ways to protect bearing assets; Is lubrication part of your KPIs?
Contract maintenance: 5 ways to keep things humming while keeping an eye on costs; Pneumatic systems; Energy monitoring; The sixth 'S' is safety
Transport your data: Supply chain information critical to operational excellence; High-voltage faults; Portable cooling; Safety automation isn't automatic
Case Study Database

Case Study Database

Get more exposure for your case study by uploading it to the Plant Engineering case study database, where end-users can identify relevant solutions and explore what the experts are doing to effectively implement a variety of technology and productivity related projects.

These case studies provide examples of how knowledgeable solution providers have used technology, processes and people to create effective and successful implementations in real-world situations. Case studies can be completed by filling out a simple online form where you can outline the project title, abstract, and full story in 1500 words or less; upload photos, videos and a logo.

Click here to visit the Case Study Database and upload your case study.

Maintaining low data center PUE; Using eco mode in UPS systems; Commissioning electrical and power systems; Exploring dc power distribution alternatives
Synchronizing industrial Ethernet networks; Selecting protocol conversion gateways; Integrating HMIs with PLCs and PACs
Why manufacturers need to see energy in a different light: Current approaches to energy management yield quick savings, but leave plant managers searching for ways of improving on those early gains.

Annual Salary Survey

Participate in the 2013 Salary Survey

In a year when manufacturing continued to lead the economic rebound, it makes sense that plant manager bonuses rebounded. Plant Engineering’s annual Salary Survey shows both wages and bonuses rose in 2012 after a retreat the year before.

Average salary across all job titles for plant floor management rose 3.5% to $95,446, and bonus compensation jumped to $15,162, a 4.2% increase from the 2010 level and double the 2011 total, which showed a sharp drop in bonus.

2012 Salary Survey Analysis

2012 Salary Survey Results

Maintenance and reliability tips and best practices from the maintenance and reliability coaches at Allied Reliability Group.
The One Voice for Manufacturing blog reports on federal public policy issues impacting the manufacturing sector. One Voice is a joint effort by the National Tooling and Machining...
The Society for Maintenance and Reliability Professionals an organization devoted...
Join this ongoing discussion of machine guarding topics, including solutions assessments, regulatory compliance, gap analysis...
IMS Research, recently acquired by IHS Inc., is a leading independent supplier of market research and consultancy to the global electronics industry.
Maintenance is not optional in manufacturing. It’s a profit center, driving productivity and uptime while reducing overall repair costs.
The Lachance on CMMS blog is about current maintenance topics. Blogger Paul Lachance is president and chief technology officer for Smartware Group.