Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Proportional–integral–derivative controller
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Loop tuning== ''Tuning'' a control loop is the adjustment of its control parameters (proportional band/gain, integral gain/reset, derivative gain/rate) to the optimum values for the desired control response. Stability (no unbounded oscillation) is a basic requirement, but beyond that, different systems have different behavior, different applications have different requirements, and requirements may conflict with one another. Even though there are only three parameters and it is simple to describe in principle, PID tuning is a difficult problem because it must satisfy complex criteria within the [[#Limitations|limitations of PID control]]. Accordingly, there are various methods for loop tuning, and more sophisticated techniques are the subject of patents; this section describes some traditional, manual methods for loop tuning. Designing and tuning a PID controller appears to be conceptually intuitive, but can be hard in practice, if multiple (and often conflicting) objectives, such as short transient and high stability, are to be achieved. PID controllers often provide acceptable control using default tunings, but performance can generally be improved by careful tuning, and performance may be unacceptable with poor tuning. Usually, initial designs need to be adjusted repeatedly through computer simulations until the closed-loop system performs or compromises as desired. Some processes have a degree of [[nonlinearity]], so parameters that work well at full-load conditions do not work when the process is starting up from no load. This can be corrected by [[gain scheduling]] (using different parameters in different operating regions). ===Stability=== If the PID controller parameters (the gains of the proportional, integral and derivative terms) are chosen incorrectly, the controlled process input can be unstable; i.e., its output [[divergence (computer science)|diverges]], with or without [[oscillation]], and is limited only by saturation or mechanical breakage. Instability is caused by ''excess'' gain, particularly in the presence of significant lag. Generally, stabilization of response is required and the process must not oscillate for any combination of process conditions and setpoints, though sometimes [[marginal stability]] (bounded oscillation) is acceptable or desired.{{Citation needed|date=March 2011}} Mathematically, the origins of instability can be seen in the [[Laplace domain]].<ref name=Bechhoefer>{{cite journal | last = Bechhoefer | first = John | title = Feedback for Physicists: A Tutorial Essay On Control | journal = Reviews of Modern Physics | volume = 77 | issue = 3 | pages = 783–835 | doi=10.1103/revmodphys.77.783| citeseerx = 10.1.1.124.7043 | year = 2005 | bibcode = 2005RvMP...77..783B }}</ref> The closed-loop transfer function is : <math>H(s) = \frac{K(s)G(s)}{1 + K(s)G(s)},</math> where <math>K(s)</math> is the PID transfer function, and <math>G(s)</math> is the plant transfer function. A system is ''unstable'' where the closed-loop transfer function diverges for some <math>s</math>.<ref name="Bechhoefer"/> This happens in situations where <math>K(s)G(s) = -1</math>. In other words, this happens when <math>|K(s)G(s)| = 1</math> with a 180° phase shift. Stability is guaranteed when <math>K(s)G(s) < 1</math> for frequencies that suffer high phase shifts. A more general formalism of this effect is known as the [[Nyquist stability criterion]]. ===Optimal behavior=== The optimal behavior on a process change or setpoint change varies depending on the application. Two basic requirements are ''regulation'' (disturbance rejection – staying at a given setpoint) and ''command tracking'' (implementing setpoint changes). These terms refer to how well the controlled variable tracks the desired value. Specific criteria for command tracking include [[rise time]] and [[settling time]]. Some processes must not allow an overshoot of the process variable beyond the setpoint if, for example, this would be unsafe. Other processes must minimize the energy expended in reaching a new setpoint. ===Overview of tuning methods=== There are several methods for tuning a PID loop. The most effective methods generally involve developing some form of process model and then choosing P, I, and D based on the dynamic model parameters. Manual tuning methods can be relatively time-consuming, particularly for systems with long loop times. The choice of method depends largely on whether the loop can be taken offline for tuning, and on the response time of the system. If the system can be taken offline, the best tuning method often involves subjecting the system to a step change in input, measuring the output as a function of time, and using this response to determine the control parameters.{{Citation needed|date=May 2013}} {| class="wikitable" |+ Choosing a tuning method ! Method ! Advantages ! Disadvantages |- ! [[#Manual tuning|Manual tuning]] | No mathematics required; online. | This is an iterative, experience-based, trial-and-error procedure that can be relatively time consuming. Operators may find "bad" parameters without proper training.<ref name ="simc">{{cite web |last=Skogestad|first=Sigurd |date=2003 |title=Simple analytic rules for model reduction and PID controller tuning |url=https://folk.ntnu.no/skoge/publications/2003/tuningPID/finalpaper.pdf/C18/E6-43-03-03.pdf}}</ref> |- ! [[#Ziegler–Nichols method|Ziegler–Nichols]] | Online tuning, with no tuning parameter therefore easy to deploy. | Process upsets may occur in the tuning, can yield very aggressive parameters. Does not work well with time-delay processes. {{Citation needed|date=May 2013}} |- ! Tyreus Luyben | Online tuning, an extension of the Ziegler–Nichols method, that is generally less aggressive. | Process upsets may occur in the tuning; operator needs to select a parameter for the method which requires insight. |- ! [[#Tuning software|Software tools]] | Consistent tuning; online or offline – can employ computer-automated control system design (''[[CAutoD]]'') techniques; may include valve and sensor analysis; allows simulation before downloading; can support non-steady-state (NSS) tuning. | "Black box tuning" that requires specification of an objective describing the optimal behaviour. |- ! [[#Cohen–Coon parameters|Cohen–Coon]] | Good process models{{Citation needed|date=May 2013}}. | Offline; only good for first-order processes.{{Citation needed|date=May 2013}} |- ![[#Relay (Åström–Hägglund) method|Åström-Hägglund]] | Unlike the Ziegler–Nichols method this will not introduce a risk of loop instability. Little prior process knowledge required.<ref name="warwick.ac.uk">{{cite web | url=https://warwick.ac.uk/fac/cross_fac/iatl/reinvention/archive/volume5issue2/hornsey/ | title=A Review of Relay Auto-tuning Methods for the Tuning of PID-type Controllers }}</ref> | May give excessive derivative action and sluggish response. Later extensions resolve these issues, but require a more complex tuning procedure.<ref name="warwick.ac.uk"/> |- ! Simple control rule (SIMC) | Analytically derived, works on time delayed processes, has an additional tuning parameter that allows additional flexibility. Tuning can be performed with step-response model.<ref name="simc" /> | Offline method; cannot be applied to oscillatory processes. Operator must choose the additional tuning parameter.<ref name="simc" /> |} ===Manual tuning=== If the system must remain online, one tuning method is to first set <math>K_i</math> and <math>K_d</math> values to zero. Increase the <math>K_p</math> until the output of the loop oscillates; then set <math>K_p</math> to approximately half that value for a "quarter amplitude decay"-type response. Then increase <math>K_i</math> until any offset is corrected in sufficient time for the process, but not until too great a value causes instability. Finally, increase <math>K_d</math>, if required, until the loop is acceptably quick to reach its reference after a load disturbance. Too much <math>K_p</math> causes excessive response and overshoot. A fast PID loop tuning usually overshoots slightly to reach the setpoint more quickly; however, some systems cannot accept overshoot, in which case an [[overdamped]] closed-loop system is required, which in turn requires a <math>K_p</math> setting significantly less than half that of the <math>K_p</math> setting that was causing oscillation.{{Citation needed|date=June 2012}} [[File:PID Compensation Animated.gif|right|thumb|400px|Effects of varying PID parameters (K<sub>p</sub>,K<sub>i</sub>,K<sub>d</sub>) on the step response of a system]] {| class="wikitable" |+ Effects of ''increasing'' a parameter independently<ref>{{Cite journal |doi = 10.1109/TCST.2005.847331|title = PID control system analysis, design, and technology|journal = IEEE Transactions on Control Systems Technology|volume = 13|issue = 4|pages = 559–576|year = 2005|last1 = Kiam Heong Ang|last2 = Chong|first2 = G.|last3 = Yun Li|s2cid = 921620|url = http://eprints.gla.ac.uk/3817/1/IEEE3.pdf}}</ref><ref>{{cite journal |url=http://saba.kntu.ac.ir/eecd/pcl/download/PIDtutorial.pdf |title=PID Controller Tuning: A Short Tutorial |author=Jinghua Zhong |date=Spring 2006 |access-date=2011-04-04 |archive-url=https://web.archive.org/web/20150421081758/http://saba.kntu.ac.ir/eecd/pcl/download/PIDtutorial.pdf |archive-date=2015-04-21 |url-status=dead }}</ref> ! Parameter ! Rise time ! Overshoot ! Settling time ! Steady-state error ! Stability |- style="text-align:center;" ! <math>K_p</math> | Decrease | Increase | Small change | Decrease | Degrade |- style="text-align:center;" ! <math>K_i</math> | Decrease | Increase | Increase | Eliminate | Degrade |- style="text-align:center;" ! <math>K_d</math> | Minor change | Decrease | Decrease | No effect in theory | Improve if <math>K_d</math> small |} ===Ziegler–Nichols method=== {{Further|Ziegler–Nichols method}} Another heuristic tuning method is known as the [[Ziegler–Nichols method]], introduced by [[John G. Ziegler]] and [[Nathaniel B. Nichols]] in the 1940s. As in the method above, the <math>K_i</math> and <math>K_d</math> gains are first set to zero. The proportional gain is increased until it reaches the ultimate gain <math>K_u</math> at which the output of the loop starts to oscillate constantly. <math>K_u</math> and the oscillation period <math>T_u</math> are used to set the gains as follows: {| class="wikitable" style="text-align:center;" |+ Ziegler–Nichols method |- ! Control type ! <math>K_p</math> ! <math>K_i</math> ! <math>K_d</math> |- ! ''P'' | <math>0.50{K_u}</math> | — | — |- ! ''PI'' | <math>0.45{K_u}</math> | <math>0.54{K_u}/T_u</math> | — |- style="text-align:right;" ! ''PID'' | <math>0.60{K_u}</math> | <math>1.2{K_u}/T_u</math> | <math>3{K_u}{T_u}/40</math> |} The oscillation frequency is often measured instead, and the reciprocals of each multiplication yields the same result. These gains apply to the ideal, parallel form of the PID controller. When applied to the standard PID form, only the integral and derivative gains <math>K_i</math> and <math>K_d</math> are dependent on the oscillation period <math>T_u</math>. ===Cohen–Coon parameters=== This method was developed in 1953 and is based on a first-order + time delay model. Similar to the [[Ziegler–Nichols method]], a set of tuning parameters were developed to yield a closed-loop response with a decay ratio of <math>\tfrac{1}{4}</math>. Arguably the biggest problem with these parameters is that a small change in the process parameters could potentially cause a closed-loop system to become unstable. ===Relay (Åström–Hägglund) method=== Published in 1984 by [[Karl Johan Åström]] and Tore Hägglund,<ref>{{cite journal |last1=Åström |first1=K.J. |last2=Hägglund |first2=T. |title=Automatic Tuning of Simple Regulators |journal=IFAC Proceedings Volumes |date=July 1984 |volume=17 |issue=2 |pages=1867–1872 |doi=10.1016/S1474-6670(17)61248-5 |url=https://lup.lub.lu.se/record/8601786 |doi-access=free }}</ref> the relay method temporarily operates the process using [[bang-bang control]] and measures the resultant oscillations. The output is switched (as if by a [[relay]], hence the name) between two values of the control variable. The values must be chosen so the process will cross the setpoint, but they need not be 0% and 100%; by choosing suitable values, dangerous oscillations can be avoided. As long as the process variable is below the setpoint, the control output is set to the higher value. As soon as it rises above the setpoint, the control output is set to the lower value. Ideally, the output waveform is nearly square, spending equal time above and below the setpoint. The period and amplitude of the resultant oscillations are measured, and used to compute the ultimate gain and period, which are then fed into the Ziegler–Nichols method. Specifically, the ultimate period <math>T_u</math> is assumed to be equal to the observed period, and the ultimate gain is computed as <math>K_u = 4b/\pi a,</math> where {{mvar|a}} is the amplitude of the process variable oscillation, and {{mvar|b}} is the amplitude of the control output change which caused it. There are numerous variants on the relay method.<ref>{{cite journal |title=A Review of Relay Auto-tuning Methods for the Tuning of PID-type Controllers |first=Stephen |last=Hornsey |journal=Reinvention |volume=5 |issue=2 |date=29 October 2012 |url=http://www2.warwick.ac.uk/fac/cross_fac/iatl/reinvention/issues/volume5issue2/hornsey}}</ref> === First-order model with dead time === The transfer function for a first-order process with dead time is : <math>y(s) = \frac{k_\text{p} e^{-\theta s}}{\tau_\text{p} s + 1} u(s),</math> where ''k''<sub>p</sub> is the process gain, ''τ''<sub>p</sub> is the time constant, ''θ'' is the dead time, and ''u''(''s'') is a step change input. Converting this transfer function to the time domain results in : <math>y(t) = k_\text{p} \Delta u \left(1 - e^{\frac{-t - \theta}{\tau_\text{p}}}\right),</math> using the same parameters found above. It is important when using this method to apply a large enough step-change input that the output can be measured; however, too large of a step change can affect the process stability. Additionally, a larger step change ensures that the output does not change due to a disturbance (for best results, try to minimize disturbances when performing the step test). One way to determine the parameters for the first-order process is using the 63.2% method. In this method, the process gain (''k''<sub>p</sub>) is equal to the change in output divided by the change in input. The dead time ''θ'' is the amount of time between when the step change occurred and when the output first changed. The time constant (''τ''<sub>p</sub>) is the amount of time it takes for the output to reach 63.2% of the new steady-state value after the step change. One downside to using this method is that it can take a while to reach a new steady-state value if the process has large time constants.<ref>{{Cite book |title=Process Control: Modeling, Design, and Simulation |last=Bequette |first=B. Wayne |publisher=Prentice Hall |year=2003 |isbn=978-0-13-353640-9 |location=Upper Saddle River, New Jersey |pages=129}}</ref> ===Tuning software=== Most modern industrial facilities no longer tune loops using the manual calculation methods shown above. Instead, PID tuning and loop optimization software are used to ensure consistent results. These software packages gather data, develop process models, and suggest optimal tuning. Some software packages can even develop tuning by gathering data from reference changes. Mathematical PID loop tuning induces an impulse in the system and then uses the controlled system's frequency response to design the PID loop values. In loops with response times of several minutes, mathematical loop tuning is recommended, because trial and error can take days just to find a stable set of loop values. Optimal values are harder to find. Some digital loop controllers offer a self-tuning feature in which very small setpoint changes are sent to the process, allowing the controller itself to calculate optimal tuning values. Another approach calculates initial values via the Ziegler–Nichols method, and uses a numerical optimization technique to find better PID coefficients.<ref name=Hein>{{cite book |last1=Heinänen |first1=Eero |title=A Method for automatic tuning of PID controller following Luus-Jaakola optimization |date=October 2018 |publisher=Tampere University of Technology |location=Tampere, Finland |edition=Master's Thesis |url=https://ahelp.com/wp-content/uploads/2025/02/Heinanen.pdf |access-date=Feb 1, 2019 |ref=Hein}}</ref> Other formulas are available to tune the loop according to different performance criteria. Many patented formulas are now embedded within PID tuning software and hardware modules.<ref>{{cite journal |first1=Yun |last1=Li |first2=Kiam Heong |last2=Ang |first3=Gregory C.Y. |last3=Chong |title=Patents, software, and hardware for PID control: An overview and analysis of the current art |journal=IEEE Control Systems Magazine |volume=26 |issue=1 |pages=42–54 |date=February 2006 |url=http://eprints.gla.ac.uk/3816/1/IEEE2pdf.pdf |doi=10.1109/MCS.2006.1580153|s2cid=18461921 }}</ref> Advances in automated PID loop tuning software also deliver algorithms for tuning PID Loops in a dynamic or non-steady state (NSS) scenario. The software models the dynamics of a process, through a disturbance, and calculate PID control parameters in response.<ref>{{cite thesis |title=On Automation of the PID Tuning Procedure |first=Kristian |last=Soltesz |publisher=[[Lund university]] |date=January 2012 |type=[[Licentiate (degree)|Licentiate]] theis |url=https://www.researchgate.net/publication/319183200 |id=[http://lup.lub.lu.se/record/2293573 847ca38e-93e8-4188-b3d5-8ec6c23f2132]}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)