• 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 #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/
Quote
 
 
0 #69 colegiochino.es 2017-07-27 00:16
Auditoria Estudos Feministas, p. 575-585.
Quote
 
 
0 #68 Sheena 2017-07-25 16:53
É claramente complexo adquirir certo freeroll.
Quote
 
 
0 #67 Alphonse 2017-07-24 00:09
Tenha assiduidade... Vê se eu estou de botas!!!
Quote
 
 
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
photo:

https://3.bp.blogspot.com/-u5pGYuGNsSo/WVixiO8RBUI/AAAAAAAAAFA/JWa2LHHFI2AkHParQa3fwwHhVijolmq8QCLcBGAs/s1600/hottest%2Bwebcam%2Bgirl%2B-%2BAnemonalove.jpg
Quote
 
 
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
Quote
 
 
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
Quote
 
 
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
Quote
 
 
0 #62 Paulo Miguel 2017-05-31 21:15
É agora que a cabala inicia a acontecer.
Quote
 
 
0 #61 Pope francis 2017-05-12 01:42
I read this post completely about the resemblance of newest and earlier
technologies, it's awesome article.

Also visit my homepage ... Pope
francis: http://adventmessenger.org/category/terrorism/
Quote
 

Add comment

No bad words.


Security code
Refresh


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