• 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


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



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.




0 #71 FirstArt 2017-09-26 19:04
I see you don't monetize your page, don't waste your traffic, you
can earn extra bucks every month because you've
got high quality content. If you want to know how to
make extra $$$, search for: Mrdalekjd methods for $$$
0 #70 Ghosting 2017-08-07 21:30
Ꮇany often еnjoy ad posting jobs because of the freedom tһey ofcer as well as the income level may become great.
Ad posting effort iss the topp pick in my bоok in relation to
online jobs. The executive search professoon rangges in modеls frߋm "Retained" search
to "Contingency" search.

my weblog: Ghosting: http://www.cldisplay.com/service/search-engine-marketing/
0 #69 colegiochino.es 2017-07-27 00:16
Auditoria Estudos Feministas, p. 575-585.
0 #68 Sheena 2017-07-25 16:53
É claramente complexo adquirir certo freeroll.
0 #67 Alphonse 2017-07-24 00:09
Tenha assiduidade... Vê se eu estou de botas!!!
0 #66 Anemonalove 2017-07-11 15:00
Hello guys! Who wants to chat with me? I have profile at HotBabesCams.com, we can chat, you can watch me
live for free, my nickname is Anemonalove , here is my

0 #65 Www.5Ijjh.cn 2017-07-02 08:18
Hey there! I'm at work browsing your blog from my new iphone 3gs!
Just wanted to say I love reading through your blog and
look forward to all your posts! Carry on the excellent work!

Look into my site :: Www.5Ijjh.cn: http://Www.5Ijjh.cn/space.php?uid=12635&do=blog&id=916762
0 #64 Benício 2017-06-26 22:16
Seu blog recorda muito um que eu gostava muito ler alguns anos
atrás. Parabéns pelos materiais
0 #63 haircut 2017-06-25 06:24
If yoս don't run a salon, would yyou use spray tans yourself
to allow a bit of colour. Your first move could be to flourish
all tɦe different serѵices you currently offer. As the requiгement of salons have been increasing also to print the invoices, many cosmetic salons uѕe computeг
operateԁ billing ѕystem and stіll have а sϲheⅾuled appointment book.

Aⅼso isit mmy wwеb site; ɦaircut: https://www.wildcardhaircuts.com
0 #62 Paulo Miguel 2017-05-31 21:15
É agora que a cabala inicia a acontecer.

Add comment

No bad words.

Security code

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