User Tools

Site Tools


bms:guides:pid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
bms:guides:pid [2022/02/15 19:47] – created mkbms:guides:pid [2022/08/06 07:57] (current) mk
Line 6: Line 6:
 I'll try a simple explanation first: I'll try a simple explanation first:
 If the temperature (Control variable) gets below setpoint, the regulator will increase the heating (Output variable) If the temperature (Control variable) gets below setpoint, the regulator will increase the heating (Output variable)
 +The bigger the difference, the faster the output will change.
  
-There's in a basic PID regulator, 3 variables, proportional gain (P or P-band), integral gain (I or I-time) and derivative gain (D)+In a basic PID regulator, there'3 variables, proportional gain (P or P-band), integral gain (I or I-time) and derivative gain (D)
  
 You can use 3 methods, P, PI or PID You can use 3 methods, P, PI or PID
  
-=== P-regulator ==+==== P-regulator ===
 A P-regulator, will measure the "error" from ( setpoint - control variable ), if setpoint is 23 and control variable is 20, the "error" will be 3. A P-regulator, will measure the "error" from ( setpoint - control variable ), if setpoint is 23 and control variable is 20, the "error" will be 3.
 It will then take the output variable and add the error. If the output was 0, after the calculation it will be 3. It will then take the output variable and add the error. If the output was 0, after the calculation it will be 3.
Line 19: Line 20:
  
  
-=== Pseudo code ===+==== Pseudo code ====
  
 On [[https://en.wikipedia.org/wiki/PID_controller|Wikipedia]] there's a lot of information about this regulator, but I will highlight one thing from there, a pseudo code examble. On [[https://en.wikipedia.org/wiki/PID_controller|Wikipedia]] there's a lot of information about this regulator, but I will highlight one thing from there, a pseudo code examble.
Line 42: Line 43:
  
  
-=== Proportional or P-band ===+==== Proportional or P-band ====
  
  
  
-=== Integral or I-time ===+==== Integral or I-time ====
  
-=== Derivative ===+I or Integral, will make the output go faster, the longer it takes for the control variable to reach the setpoint.
  
-=== Illustrative examble ===+=== Practically explained ===
  
-With a little help from [[http://grauonline.de/alexwww/ardumower/pid/pid.html|this guy]] I was able to put together 3 live test simulations of [[http://thesky.dk/pid/p.html|P]], [[http://thesky.dk/pid/pi.html|PI]] and [[http://thesky.dk/pid/pid.html|PID]] regulators.+Where P will @@@@@@@@@@@@@@ ADD MORE TEKST HERE IN THE FUTURE @@@@@@@@@@@@ 
 + 
 +==== Derivative ==== 
 + 
 +D or Derivative, is pretty much never used in in regulators used for BMS systems. 
 +(Heating, cooling and air handling) 
 + 
 +D will try to avoid an overshoot, by predicting where the output will be.  
 +If set too high, it will slow the output too much, and "never" hit the target, but if set too low, you might overshoot your setpoint. 
 + 
 +=== Practically explained === 
 +If you have control variable of 20 degrees but setpoint is 23 degrees, the regulator will raise the output, eg. from 0 towards 100%.  
 +If 50% is where the output needs to be for the control variable to stay at 23 degrees, and D is too low, the output will raise to 60% and control variable could reach 23,5, before it will lower the output and finally settle down. 
 +See green line in graph above. 
 +==== Illustrative examble ==== 
 + 
 +With a little help from [[http://grauonline.de/alexwww/ardumower/pid/p/pid.html|this guy]] I was able to put together 3 live test simulations of [[http://thesky.dk/pid/p/p.html|P]], [[http://thesky.dk/pid/p/pi.html|PI]] and [[http://thesky.dk/pid/p/pid.html|PID]] regulators.
 Theese simulations open out side this wiki, so you have to press back button to get back here. Theese simulations open out side this wiki, so you have to press back button to get back here.
 What you can do is change the control variable and adjust parameters accordingly.  What you can do is change the control variable and adjust parameters accordingly. 
 +
 **TIP: Change control variable slowly to simulate a change in temperature or pressure.** **TIP: Change control variable slowly to simulate a change in temperature or pressure.**
 +
 +
 +\\
 +\\
 +\\
 +\\
 +[[https://www.researchgate.net/profile/Mohamed_Mourad_Lafifi/post/What_is_the_best_method_can_we_used_to_tune_PID_controller/attachment/5f5775b1ecec86000108690f/AS%3A933466292113420%401599567115449/download/PID_Tuning_Guide_022810.pdf]]
 +
 +\\
 +
 +
 +
  
 ~~DISCUSSION~~ ~~DISCUSSION~~
bms/guides/pid.1644950876.txt.gz · Last modified: 2022/02/15 19:47 by mk