• 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 #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/
0 #60 Alyssa 2017-05-10 02:21
Its like you read my mind! You appear to know a lot about this, like you wrote the
book in it or something. I think that you could do with some pics to drive the message home a
bit, but other than that, this is fantastic blog. A
great read. I'll definitely be back.

Feel free to visit my web blog: Alyssa: http://connect.lulu.com/t5/user/viewprofilepage/user-id/2253467
0 #59 manicure 2017-05-06 15:01
Does your website have a contact page? I'm having a tough time locating it but, I'd
like to send you an email. I've got some suggestions for your
blog you might be interested in hearing. Either way, great blog and I look forward
to seeing it grow over time.
0 #58 locksmith service 2017-05-04 10:00
What's up friends, good article and good urging commented at this place,
I am truly enjoying by these.

Feel free to surf to my web-site: locksmith service: https://www.planning.dot.gov/PageRedirect.asp?RedirectedURL=http://www.locksmithservice.us.com/
0 #57 Irish 2017-04-30 22:18
Does your blog have a contact page? I'm having problems locating it but, I'd
like to shoot you an email. I've got some ideas for your blog
you might be interested in hearing. Either way, great website and I look forward to seeing it develop over time.
0 #56 continuing education 2017-04-25 23:42
I am really impressed with your writing skills as
well as with the layout on your blog. Is this a paid theme or did you customize
it yourself? Either way keep up the nice quality writing,
it's rare to see a nice blog like this one nowadays.
0 #55 Makayla 2017-04-25 22:54
Pretty nice post. I just stumbled upon your weblog and wished
to say that I have truly enjoyed browsing your blog posts.
In any case I will be subscribing to your rss feed and I
hope you write again soon!
0 #54 Wedding images 2017-04-25 00:30
Hi i am kavin, its my first time to commenting anywhere, when i read this post i
thought i could also make comment due to this brilliant paragraph.
0 #53 BHW 2017-04-18 16:44
Great post. I used to be checking continuously
this blog and I am impressed! Extremely helpful
information specially the ultimate part :) I maintain such info a lot.
I was looking for this particular information for a long time.

Thanks and good luck.
0 #52 BHW 2017-04-16 03:08
Hello would you mind letting me know which webhost you're working with?
I've loaded your blog in 3 different internet browsers and I must say
this blog loads a lot faster then most. Can you suggest a
good hosting provider at a honest price? Cheers, I appreciate it!

Add comment

No bad words.

Security code

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