• Increase font size
  • Default font size
  • Decrease font size

PID regulator

A proportional-integral-derivative controller (PID controller) is a loop feedback controller (mechanism).

 

There are a few types of feedback controllers. The most simple is a thermostat. That is the controller that just turns the heat on if the temperature falls below a certain value and off it exceeds a certain value (on-off controller).

Another type of controller is a proportional controller. With this type of controller, the output of the controller (control action) is proportional to the error in the measured variable.

In feedback control, it is standard to define the error as the difference between the desired value (refference) and the current value (measured). If the error is large, then the control action is large.

u(t) = (K * e(t)) + u_0
 
u(t)  - control action at the time 't' = output from the controller
K     - gain. Sign may be positive or negative, depending on type of the system - reverse acting vs. direct acting.
e(t)  - error at the time 't' = difference between measured and wanted value
u_0   - bias = action that is done when e(t) = 0

A typical example of a reverse-acting system is control of temperature by an electrical current. In this case the process gain is positive, so if the temperature increases, the current must be decreased to maintain the desired temperature. Conversely, a typical example of a direct-acting system is control of temperature using cooling water. In this case the process gain is negative, so if the temperature increases, the cooling water flow must be increased to maintain the desired temperature.

Alternates to proportional control are proportional-integral (PI) control and proportional-integral-derivative (PID) control.

A PID controller calculates an "error" value as the difference between a measured (current) value and a reference (desired) value. The controller attempts to minimize the error by adjusting the process control inputs. By tuning the three parameters in the PID controller algorithm, the controller can provide control action designed for specific process requirements. The three parameters are hidden in the name of the controller:

- P (proportional) parameter - depends on the present error

- I (integral) parameter - accumulates past error. It is useful when error value is small but still non-zero.

- D (derivation) parameter - predicts future errors, based on current rate of change of the error

PID controller diagram

Pseudocode

previous_error = 0
integral = 0
start:
 error = setpoint - measured_value
 integral = integral + error*dt
 derivative = (error - previous_error)/dt
 output = Kp*error + Ki*integral + Kd*derivative
 previous_error = error
 wait(dt)
goto start

 

Demo

The demo below demonstrates difference between on-off controller (a ball overshoots the desired position) and PID controller. Please notice how I component of the PID regulator 'pushes' the ball to the desired position.

 

 

Comments  

 
0 #83 Julio 2018-01-17 18:07
La nymphomanie n'est pas que le fait des femmes.
Quote
 
 
0 #82 NeilSmall 2018-01-17 18:06
I have checked your page and i've found some duplicate content, that's why you don't rank high in google, but there is a tool that can help you to create 100% unique content,
search for: Boorfe's tips unlimited content
Quote
 
 
0 #81 網站行銷 2018-01-12 19:13
I do not know whether it's just me or if everybody else encountering issues with your website.
It appears as if some of the written text on your content are running
off the screen. Can somebody else please provide feedback and let me
know if this is happening to them as well?
This might be a issue with my web browser because I've had this happen previously.

Thanks
Quote
 
 
0 #80 Shelia 2018-01-11 05:21
Que você faz para aforrar energia elétrica?
Quote
 
 
0 #79 onlinesexvoksen.Tk 2017-12-16 23:13
Christiane Schaumburg-Müller om mænd når de får børn.
Quote
 
 
0 #78 Buddy 2017-12-07 00:12
Baixou curso Fórmula Negócio Online para R$ 347,00!
Quote
 
 
0 #77 John 2017-12-06 05:29
You suggested this effectively!

my website; John: https://bucketlist.org/idea/6LiG/ideas-to-assist-properly-deal-with-nervousness/
Quote
 
 
0 #76 yupifeed.us 2017-12-05 21:33
Ali, são praticados parapente e também asa delta.
Quote
 
 
0 #75 Michael 2017-12-02 06:23
Many thanks, Quite a lot of material!

Feel free to surf to my site: Michael: https://bucketlist.org/idea/6LiG/ideas-to-assist-properly-deal-with-nervousness/
Quote
 
 
0 #74 Michael 2017-11-23 12:48
Thank you. A good amount of tips.

My homepage; Michael: https://bucketlist.org/idea/6LiG/ideas-to-assist-properly-deal-with-nervousness/
Quote
 

Add comment

No bad words.


Security code
Refresh


Design by i-cons.ch / etosha-namibia.ch