Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a21e91984ffa5c4f

Jump to content

Talk:PID controller

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 2 months ago by Bobby Cohn in topic Requested move 29 April 2026

s.t. Ti+Kp/Ki,Td=Kd/Kp?

[edit]

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)Reply

"s.t." means "such that". It is often denoted as a : or | instead.
https://mathworld.wolfram.com/SuchThat.html
https://math.stackexchange.com/questions/934108/what-does-s-t-mean Jrquant (talk) 17:11, 9 August 2023 (UTC)Reply

Pseudocode

[edit]

We needs some help reviewing a disputed line in this code:

derivative := (error − previous_error) / dt

or

derivative := (error − previous_error) × dt

With the former, an editor has observed

(dt) appears to need to be equal to, or greater than one. I don't think it is in proper SI "seconds". It is probably an integer, like "samples" or "milliseconds". Assuming dt is in seconds and using dt=1.0/1000.0 gives extremely large derivative values which are many orders of magnitude larger than "proportional" or "integral".

The latter seems to work but it doesn't look right to other editors. ~Kvng (talk) 13:26, 3 April 2021 (UTC)Reply

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)Reply

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)Reply

Poor wording

[edit]

"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.

I changed the last sentence to The controller cannot adjust the system unless there is an error present. Does that help? ~Kvng (talk) 14:50, 22 February 2022 (UTC)Reply

Mathematical explanation of integral term is insufficient.

[edit]

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)Reply

Delta dtk4848v01

[edit]

Alexander Davronov added a lead image with this controller. It is a PID controller but by my reading of the manual, PID mode uses a 4-20ma current loop output and not the logic output shown driving a relay in this picture. It's conceptually a good example worthy as a lead image but not quite correct. ~Kvng (talk) 02:51, 2 March 2025 (UTC)Reply

@Kvng: You have to distinguish CONTROL MODE and OUTPUT MODE. The output mode differs depending on a device that controller is going to drive and just selects different terminals: either it's a SSR/SCR, a contactor or a current loop network. The PID control mode is applicable as long as controller was configured to run in mode that invokes PID function.
The controller is question (per manufacturer's datasheet) may control output voltage/current either by banging it ON/OFF on run PID function. Delta has a datasheet on their PID algorithm applied by their microcontrollers in these temp. controllers: The PID function, Delta, rev 0, (26 pp.). I think the image serves good example of a device supporting PID function, though, it doesn't demonstrate how it runs it. AXONOV (talk) 18:48, 10 March 2025 (UTC)Reply
@Alexander Davronov, a PID controller driving a contactor does not strike me as a common implementation of PID loop control. Am I wrong? ~Kvng (talk) 13:56, 17 March 2025 (UTC)Reply
Loop involves two components: RTD and device driving heating element. Controller senses temperature value and drives contactor to correct temperature. PID function calculates how much long voltage needs to be applied to achieve set temperature. AXONOV (talk) 07:53, 18 March 2025 (UTC)Reply
In contactor output mode, the applied voltage is either on or off, there is no half on for a contactor. Maybe there's a PWM element in the controller that more intelligently controls the contactor based on what would be the output control voltage but this is not a typical implementation/application that we would use in the lead. ~Kvng (talk) 14:26, 18 March 2025 (UTC)Reply
That's what PID does in these controllers. It's "smarter" than just banging on/off until set temperature is met. It constantly gets feedback from RTD and supplies needed power via pulsed voltage. That's typical PID implementation that is common in industry where heaters are found. AXONOV (talk) 17:54, 18 March 2025 (UTC)Reply
Ok but I don't think it is good to have to explain this feature to readers at the outset. Again, I think it is not the most common or simplest way PID controllers operate and not something we want to hit readers with in the lead. ~Kvng (talk) 18:19, 18 March 2025 (UTC)Reply
PID are not simple and I think that image serves perfect example of such device. AXONOV (talk) 20:01, 18 March 2025 (UTC)Reply
We're not going to be able to resolve this with only the two of us in the discussion. Anyone else want to comment? ~Kvng (talk) 14:40, 24 March 2025 (UTC)Reply
I suggest we put the image in question to the /* Industrial control */ subsection. The subject of the article is indeed more about concept per se than about specific implementations. Feel free to move. Best. AXONOV (talk) 17:21, 24 March 2025 (UTC)Reply

Requested move 29 April 2026

[edit]
The following is a closed discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. Editors desiring to contest the closing decision should consider a move review after discussing it on the closer's talk page. No further edits should be made to this discussion.

The result of the move request was: moved. (closed by non-admin page mover) Bobby Cohn 🍁 (talk) 19:41, 6 May 2026 (UTC)Reply


Proportional–integral–derivative controllerPID controller – Per MOS:ACROTITLE and WP:COMMONNAME. PhotographyEdits (talk) 21:12, 29 April 2026 (UTC)Reply

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.