Loading AI tools
From Wikipedia, the free encyclopedia
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
|
|
With all due respect, we have a reason to question this PID definition, because it perpetuates a mistake in PID control, especially with respect to the Integral term. The mistake can be Illustrated as follows:
1) Even though there is zero error, the Integral term will cause an output action. (Not desired)
With due respect, if the integral term is producing an output... the result is that there is NO zero error, so the integral will have a value to continue until zero error is reached. cuye.
2) The Integral is based upon previous errors which are no longer relevant. (Not desired)
Proportional control can produce zero error if the controller is comparing the input to the output and through negative feedback and driving the Error to zero.
Not really. Proportional control needs an error signal because if the error is zero, the output is zero. The real situation is that if -for example- the controlled motor load changes, we need a different error to ensure that the control power changes.
The correct PID term:
D term: Add changes (differentiation) to the steady-state INPUT to be combined in the summing Junction.
I term: Add changes (differentiation) to the negative (negative feedback) of the steady-state OUTPUT to be combined in the summing Junction.
Integration is differentiation when combined across (around) negative feedback. The output is connected to the zeroed-offset summing Junction with a very high gain and negative polarity (inverting).
Contribution:
P term: is the desired OUTPUT divided by the desired INPUT OR the ratio of the signal fed the summing Junction by the OUTPUT divided by the signal fed the summing Junction by the INPUT. When the negative OUTPUT of the parameter to control is summed with the INPUT (setpoint) The OUTPUT will satisfy the desired setpoint. {gain and offset errors are mostly insignificant in todays designs, otherwise can be handled separately, certainly do not want output based on previous, unrelated errors as described below}
I term: Integration slows down the output response as it approaches the correct/desired value. Useful to dissipate stored energy that would produce an overshoot.
D term, Differentiation speeds up the output response to an input so the output approaches the correct value sooner. — Preceding unsigned comment added by 80.192.162.104 (talk) 03:19, 25 December 2016 (UTC)
The term "process gain" is used in the "Droop" section ("... droop is proportional to process gain ..."). Process gain is not defined anywhere in the article, and the term is not used anywhere else in the article. It's difficult or impossible to determine precisely what it means. — Preceding unsigned comment added by 174.31.179.148 (talk) 13:28, 21 October 2013 (UTC)
No mention of Kessler's tuning method of using two zeros of a PID controller to cancel out the dominant poles in a n-th order PT1 system? no absolutely wrong
Shouldn't the sign on the d/dt PV terms be negative for these alternative forms? If error is SV-PV, then when switching to d PV based derivitive term changes sign. When using the Ti, Td form, these variables are positive, so shouldn't the sign on the PV based derivitive term be negative? --CaveMole (talk) 10:40, 10 January 2012 (UTC)
Forgive my very low level comment after your constructive sections, but the black & white picture of the guy in shorts steering a boat is very inelegant with respect to the topic. Is it really necessary? It doesn't really make a difference and it doesn't even carry the message quoted: "PID theory developed by observing the action of helmsmen". — Preceding unsigned comment added by Raggot (talk • contribs) 16:09, 7 February 2012 (UTC)
- I thought the picture and accompanying text expliaining it was the most accessible part of the entire article. The rest reads like a math textbook. 198.58.148.127 (talk) 08:01, 19 January 2016 (UTC)
I came to Wikipedia to confirm my understanding of PID controllers, and now a bit later I've come to understand that the main article is wrong.
www.cds.caltech.edu/~murray/courses/cds101/fa02/caltech/astrom-ch6.pdf
The article HERE says that for the "P" the CHANGE in output is proportional to the error. If integrate on both sides, the output is proportional to the integral of the error. This is what the I term is supposed to do.
A property of a P control system (Or a PID where the I and D constants are set to zero) is that when there is a disturbance, there will be a constant error. The way things are described here the error would always be regulated towards zero.
To create a final error that is zero the "evolution" of controllers added the "I" term to PD controllers to have the error converge on zero..... Rewolff (talk) 11:11, 23 March 2012 (UTC)
I am totally baffled as to what this tau thing is. I thought the integral term summed the error over a duration, in which case it would be e(t), right? -Keith (Hypergeek14)Talk 15:41, 9 May 2012 (UTC)
I am also confused. It appears to me that there should be a "t" where the tau is. I don't want to make the change myself, because I'm not absolutely sure I'm right. It would be nice if someone more knowledgeable either changed the equation or add some explanation of the term tau. My thanks to the kind soul who makes the changes. --User:rben13 —Preceding undated comment added 11:46, 24 July 2012 (UTC)
Is it worthwhile putting up pseudocode for the velocity form (that can avoid integral windup)? Is this correct? I believe it's in a style consistent with the existing pseudocode. It's based on the formulae at http://controlstation.brightegg.com/page/150-integral-reset-windup-jacketing-logic-and-the-velocity-pi-form and http://lorien.ncl.ac.uk/ming/digicont/digimath/dpid1.htm
previous_error = setpoint - process_feedback previous_derivative = 0 previous_output = 0 start: wait(dt) error = setpoint - process_feedback derivative = (error - previous_error)/dt second_derivative = (derivative - previous_derivative)/dt output = previous_output + (Kp*derivative*dt) + (Ki*error*dt) + (Kd*second_derivative*dt) previous_error = error previous_derivative = derivative previous_output = output goto start
D.keenan (talk) 15:33, 20 October 2012 (UTC)
The code in the aritcle is wrong. Here the error is "implicitly" summed is the output. So Kp becomes a kind of integral gain. For instance, if you choose Kp=0.5, Ki=0 and Kd=0, you see that the output will converge to the setpoint with a null error which is possible only if Ki is non null. — Preceding unsigned comment added by Jlpons (talk • contribs) 06:09, 30 October 2021 (UTC)
Old discussions not active in months or years have been archived; reviewing the archive may be of interst in explaining how the article got to where it is now. --Wtshymanski (talk) 20:47, 9 May 2012 (UTC)
I have reset the pseudocode example to a combination of an old version from January 2010, combined with a version that I found in a CodeProject example, itself lifted from this article in 2009. I know that the use of a reference that itself references this article is normally very dubious, but in my defence I would say that the benefit of the CodeProject source is that it has been thoroughly tested in the actual code that follows, as well as by various commentators. I know that that is not much, but I also couldn't easily find a better online source of PID pseudocode.
The changes that this edit have effectively made are as follows.
I removed the bullet point about "Limiting the time period over which the integral error is calculated" in the Integral windup section. There was a discussion on this point some months back. My reasons are the same now: Taking this action replaces the integrator with a low-pass filter; the benefit of infinite gain at zero frequency is lost. It's possible that this limitation is implemented by some engineers, but it sounds like a sloppy solution, and the references don't back it up. Spiel496 (talk) 22:11, 6 November 2012 (UTC)
See Talk:PID_controller/Archive_1#Limiting_the_integral_history. Spiel496 (talk) 22:15, 6 November 2012 (UTC)
This section is entirely unreferenced. I have marked it as such. It doesn't appear to be essential. An editor has recently called into question its accuracy. Unless a reference is provided, I propose to delete the whole section. -—Kvng 16:15, 8 December 2012 (UTC)
I suggest Astrom' PID Controllers Theory, Design and Tunning (1995, not sure if there is a newer edition) and, **much** more relevant and concise about this particular topic is O'Dwyer's Handbook of PI and PID Controller 3rd edition (2009).
In fact, O'Dwyer's chapter 2 is entirely about different forms for PID controllers. Even the same form receives different nomenclatures, depending who you cite, the best example is the Ideal or Standard form. Signed: Dr.AnonymousCoward 189.101.208.60 (talk) 18:55, 20 February 2014 (UTC)
As noted by User:Ywaz here, the section about the "model based part" is somewhat cryptic. I can't really follow it either, but it sounds like it might be valuable information. Anybody want to take a crack at it? Spiel496 (talk) 21:35, 19 March 2013 (UTC)
Last paragraph about "variable voltages" seems totally unrelated. Can somebody please check? Thanks!
Itto Ogami (talk) 05:49, 2 June 2013 (UTC)
The image in the Proportional term section is incorrect. The image shows the Kp = 0.5 having a shorter rise time compared to Kp = 1 and Kp = 2. It also incorrectly implies that a larger proportional gain will result in a longer settling time. Simple simulations in Simulink show that this is not the case. — Preceding unsigned comment added by Cypus28 (talk • contribs) 23:45, 26 December 2013 (UTC)
The PID controller article is mentioned here. -- Jreferee (talk) 00:52, 20 January 2014 (UTC)
We need a better description of derivative control in the water faucet example. The purpose of derivative control is to moderate the controller and prevent it from overshooting the target. ~KvnG 15:03, 23 January 2014 (UTC)
Done. I have finally got around to rewriting the PID controller#Control loop basics section. I have based it on the control of a robot arm. I hope people approve. --Nigelj (talk) 20:53, 18 November 2015 (UTC)
In the list of methods to deal with Integral windup, can anyone explain the meaning of the statement "Adjusting the integral accumulator to produce meaningful process outputs"? If so, then we can expand the sentence so that it says something informative. As it stands, it hinges on the word "meaningful" which could be interpreted a lot of ways. Spiel496 (talk) 19:15, 21 February 2014 (UTC)
I would like to have a link in this article to the gradient controller, because the gradient controller comes without the typical disadvantages of the PI controller. Any suggestion where and how to do that? A comparison between PI controller and gradient controller (both in time discrete version) can be found on the page http://i-r-p.de/gradient.htm — Preceding unsigned comment added by 85.212.89.129 (talk) 18:03, 11 August 2014 (UTC)
According to the equation for u(t), if the controller is actually working and the process is stable, and the error e(t) is zero, then u(t) will become zero. This is clearly not very sensible. If the cruise control is working properly, it doesn't mean that the throttle position is zero. If the central heating is working properly, it doesn't mean that the gas is off.Lathamibird (talk) 08:34, 8 September 2014 (UTC)
Would it be fair to say that this equation (discrete time implementation) is only valid if the I gain constant is non-zero? I was surprised to notice that testing the "P only" behavior of this implementation led to u[k] = u[k-1] + Kp(error[k] - error[k-1]), which results in a constant (not proportional) output when the error does not change. This is not at all what I needed or expected. Was there a statement in that section that should have alerted me to this strange behavior?
Jrquant (talk) 17:48, 9 August 2023 (UTC)
Optimotowiki deleted the section describing droop. The edit comment says "Droop in control theory means something entirely different than what was originally written. This section should be deleted for clarity." I am not clear what was wrong with deleted droop description and am inclined to restore it. Kvng (talk) 14:42, 1 April 2015 (UTC)
it was insufficient for dealing with a steady disturbance, notably a stiff gale (due to droop), which required adding the integral term
Hello fellow Wikipedians,
I have just added archive links to 2 external links on PID controller. Please take a moment to review my edit. If necessary, add {{cbignore}}
after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}}
to keep me off the page altogether. I made the following changes:
When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}
).
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
Cheers.—cyberbot IITalk to my owner:Online 17:30, 22 March 2016 (UTC)
It really saddens me that this article begins by launching directly into complex maths.
To this retired Electrons Engineer, it indicates that the authors don't understand their subject and are too keen on showing off.
As Einstein said "If you can't explain it to a six year old, you don't understand it yourself".
I really wish that Wikipedia has a "No Maths until page two" policy.
It would greatly assist in making Wikipedia more accessible, as well as eliminating many of the pompous academics who infest this place Gutta Percha (talk)
^^^^^^
Agree that the maths section up front is unwieldy and detracts from the overall article. The definitions of Kp/i/d aren't well explained and the section itself is a dupe of the Controller Theory section below. Not sure how someone coming here to understand more about PID control (read: most readers) would find this part very useful.
As an example, a simpler and more concise explanation of PID theory than any section of this wiki page is found here: https://www.ni.com/en-us/innovations/white-papers/06/pid-theory-explained.html. But from a pragmatic standpoint, I'll be the first to admit that for an article that's 20 years old and has close to 1,000 edits, the idea of making this simpler and not more complex is probably a non-starter.
Dmccarty2 (talk) 17:40, 3 January 2022 (UTC)
With all due respect, this PID definition is wrong, it perpetuates a very common mistake in PID control, especially with respect to the Integral term. The mistake can be Illustrated as follows:
1) Even though there is zero error, the Integral term will cause an output action. (Not desired)
2) The Integral is based upon previous errors, which are no longer relevant. (Not desired)
The correct PID solution is Proportional control can produce zero error ... if the controller is comparing the input to the output and through negative feedback and driving the Error to zero.
The correct PID term:
D term: Add changes (differentiation) to the steady-state INPUT to be combined in the summing Junction.
I term: Add changes (differentiation) to the negative (negative feedback) of the steady-state OUTPUT to be combined in the summing Junction. Integration is differentiation when combined across (around) negative feedback The output is connected to the zeroed-offset summing Junction with a very high gain and negative polarity (inverting).
Contribution:
P term: is the desired OUTPUT divided by the desired INPUT OR the ratio of the signal fed the summing Junction by the OUTPUT divided by the signal fed the summing Junction by the INPUT. When the negative OUTPUT of the parameter to control is summed with the INPUT (setpoint) The OUTPUT will satisfy the desired setpoint. {gain and offset errors are mostly insignificant in todays designs, otherwise can be handled separately, certainly do not want output based on previous, unrelated errors as described below}
I term: Integration slows down the output response as it approaches the correct/desired value. Useful to dissipate stored energy that would produce an overshoot.
D term, Differentiation speeds up the output response to an input so the output approaches the correct value sooner. Thank You -
If you disagree, that's ok, but this needs to be resolved, it has created a lot of pain for many people who blindly followed this teachings.
Thank You — Preceding unsigned comment added by 100.47.124.115 (talk • contribs) 00:49, 26 December 2016 (UTC)
Totally agree with above, one of the problems is references are too highly regarded by Wiki. The vast majority of the PID references are by people who never had to create an actual controller ... Like the person who said "it is all about the equations", thus having no insite. We have designed over 150 products, that used PID, more than 45,000 major controllers in common use. Here is what PID is:
PID are the elements needed to control real world processes.
P is chosen to scale the process sensor to the processor actuator to reach the desired result. It also overcome gain reducing physical drag (friction) or electrical resistance.
"I" is chosen to absorb (dampen) the system's stored energy like from physical momentum or electrical capacitor/inductor . Therefore "I" prevents overshooting the desired output.
D is used to overcome energy robbing components like physical absorbing mass or electrical inductor/capacitors. Therefore D improves (speeds up) the system response time to achieve the desired output.
All theses OTHER interpretations are just wordsmith, twilding equations and expressions in to nonsense. They the keep quoting and referencing each other for years now. This has caused countless engineers and technicians to produce designs that kinda work, but require patches to get by. Please set Wiki, right! — Preceding unsigned comment added by 64.134.217.6 (talk) 15:24, 26 December 2016 (UTC)
Turns out majority of everything Googled Supports everything currently described by Wiki on this topic. But a quick check of my fellow Engineers verify that my 50 years of PID engineering follows what I wrote above.
The Wiki described PID is problematic, tremendously error-prone and difficult procedure that is adopted by the academians, and engineer so unfortunate to have been influenced by them.
So to your good question, what makes me a "reliable" source?
Maybe my 75 + US patents - (hundreds worldwide, my four industry awards for a commercially successful products, or the fact that you can walk through hundreds of manufacturing plants in the US and see my products everywhere ... would suggest I'm worth talking to if not maybe a little "reliable". What do you think? — Preceding unsigned comment added by 64.134.217.6 (talk) 18:45, 26 December 2016 (UTC)
I know you've tweaked the Pseudocode a number of times (and it's only a Pseudocode). However, I believe there is problem with using the wait(dt) command. wait, pause, delay, all mean the same thing depending the language structure used your actual code - it to stop the code running for a period of time. Therefore, the current code will wait for a period of dt (to which has not been declared anywhere in the current code).
I believe you are using dt (delta time) as the length of time taken between each loop cycle - dt = start loop - end of code loop - then rest time count for next loop. In theory, what you have currently got (if you say that 'dt' is how long it takes between readings) is doubling the length of time between loop by adding delta_time to wait(dt) - wait for as long as it took to do the loop in the first place. very counter productive. A better suggestion (similarly suggested over on Ardunio and in the 'PID Ardunio Library' creators blog by Brett:- http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/) is to do this...
previous_error = 0 integral = 0 loop_time = 0 loop: begin_time = now error = setpoint - measured_value integral = integral + error*dt derivative = (error - previous_error)/dt output = Kp*error + Ki*integral + Kd*derivative previous_error = error loop_time = now dt = loop_time - begin_time goto loop
Again this pseudocode nothing complicated and doesn't lean towards anyone structural format. So what does this do (besides what you are trying to achieve. begin_time = now means set the time to now (you can define this in your actual code to be in seconds, milliseconds or whatever time factor). loop_time checks the time again once the loop has completed its operation, then the loop goes back to the start as per usual. dt now becomes the time difference in the cycle and can be used back within the PID algorithm. what do you think? -- BrBarry (talk) 03:45, 11 April 2017 (UTC)
This in the lead....
For discrete-time systems, the term PSD (proportional–summation–difference) is often used.[1]
Is confusing. Is it saying that PSD is not always called this, and what is PSD anyway, and how does it relate to this topic, and if it does relate then it should be in the main text and the lead should summarize if PSD is so well known that this is necessary. Suggest removal. Dougsim (talk) 14:21, 4 August 2017 (UTC)
Yes, thanks for the note, I was going to post here. There was no objection, so I went ahead. It should be noted that this article is getting a lot of hits, so it is important. I am just going to do some more work tidying up the historical narrative, which is a bit cryptic, as I think that is very pertinent to the subject, rather than of academic interest. There has been a lot of good stuff added by contributors recently at the end of article, so we have to make the first part attractive. Dougsim (talk) 15:40, 7 August 2017 (UTC)
At the end of the second paragraph, the word "increasing" in the text "...increasing the power output of the engine" should be changed to "modulating". It's not just strictly increasing the power; that would be too easy. If that were the case, the cruise control would just floor it when the car came to a hill. 162.207.203.26 (talk) 01:28, 1 November 2020 (UTC)
You are right. Excessive flooring is inhibited by virtue of the three PID terms, which prevent excessive power application, but applies that power which is necessary to optimise the power correction. So it is modulating, but in the lead where some readers are new to control concepts, for this example increasing is clearer. Dougsim (talk)
Near end of article, what does "s.t." mean in "s.t. Ti+Kp/Ki,Td=Kd/Kp"? I looked "s.t." up. Apparently all that is Google doesn't know what it means either... 162.207.203.26 (talk) 04:23, 1 November 2020 (UTC)
We needs some help reviewing a disputed line in this code:
or
With the former, an editor has observed
The latter seems to work but it doesn't look right to other editors. ~Kvng (talk) 13:26, 3 April 2021 (UTC)
I changed the pseudo code to be in coherence with the discrete implementation above (commonly used). This code (using =0) is equivalent to a basic one witch evaluates the PID equation using BD and summation except if you want to change Kp,Ki or Kd dynamically. Note that Kp Ki and Kd are supposed to be constant independent of time. Changing gain dynamically makes them function of time and change the behavior of a standard PID.
(The last person didn't sign, I'm someone else)
I think it's reasonable for the layman (as referenced in the sentence preceding the pseudocode) to assume that the algorithm would react naturally to small timesteps. It took me 3 days of troubleshooting before I stumbled across this talk page and figured out what was wrong. That being said, it would be strange for the code to assume something like that about its implementation. As a half measure, I added a note to the top of the Pseudocode section that alerts the reader of this edge case and lists a few potential solutions/workarounds. This leaves the pseudocode unaltered, doesn't add much bloat to the page (if any), and still alerts readers to the potential shortcomings of the pseudocode. That being said, wouldn't this mismatch also affect the integral component? Jmortiger (talk) 20:12, 19 December 2022 (UTC)
On top of this issue, I was confused about the first presented pseudocode. As mentioned above, they list the derivative as :derivative := (error − previous_error) / dt . However, looking at both the following pseudocode and the preceding discrete formula, this appears to be incorrect. If I'm not mistaken (which I very well may be), the pseudocode would need to store not just the prior error, but the one before that, and the derivative would look more like this derivative := (error - 2 * previous_error + error_before_last) / dt I haven't done any rigorous testing for this myself (yet), but am I right here? The following pseudocode defines the 3 terms as
(Kp + Ki*dt + Kd/dt) * error[0]
(-Kp - 2*Kd/dt) * error[1]
(Kd/dt) * error[2]
This directly shows that the derivative is related to the error before last, but the first pseudocode doesn't even store it. Plus, the (-Kp - 2*Kd/dt) * error[1] matches with the assumed - 2 * previous_error. The discrete formula also seems to corroborate this. Am I missing something? (Sorry for any mistakes, first time) Jmortiger (talk) 20:12, 19 December 2022 (UTC)
"Using proportional control alone will result in an error between the setpoint and the actual process value because it requires an error to generate the proportional response. If there is no error, there is no corrective response" - this is almost back-to-front causality. If there is no error, you don't NEED a corrective response.
In this article, the integral term is calculated using a definite integral between 0 and t, and uses the letter tau in place of t. It doesn't seem to follow any common uses of tau (as denoted on its Wikipedia article).
From Controller theory, Integral term: "The integral in a PID controller is the sum of the instantaneous error over time and gives the accumulated offset that should have been corrected previously." The definite integral between the beginning of measurement (0) and current time t of e(t), read as a function e that equals the value of error at time t, should calculate to the area between curve e(t) and axis t, which is equal to the sum of all error values, if my understand of definite integrals is correct. If it is, then why does the notation use tau instead of t? If I'm incorrect, then the use of tau needs elaboration, both for understanding the fundamental operation and to make the function practically applicable.
It'd also be nice to have some elaboration on exactly what '0' is supposed to mean. 2A02:AA7:460A:9E83:F435:2745:26C4:3A80 (talk) 12:19, 7 September 2022 (UTC)
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.