• 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 #268 a333 2018-12-12 10:09
It has been the #1 most widely used product for home based business very good results.
This data was applied to rank web pages. My name was replaced with someone else's name and links
were removed.
Quote
 
 
0 #267 download 2018-12-12 03:33
Wonderful blog! I found it while surfing around on Yahoo News.

Do you have any suggestions on how to get
listed in Yahoo News? I've been trying for a while but I never seem to get there!

Appreciate it

Here is my homepage download: http://opencu.com/profiles/blogs/5441502:BlogPost:15282161
Quote
 
 
0 #266 Etsuko 2018-12-11 23:36
Passe pincel levemente sobre uma das cores.
Quote
 
 
0 #265 live poker finder 2018-12-11 22:22
Are they going to seem polite and trained? Most certainly, you would make your wife unhappy and your family life become disrupted.

This is high, then, are generally OK.
Quote
 
 
0 #264 scr888 2018-12-11 17:01
I have to thank you for the efforts you've put in penning this
website. I am hoping to see the same high-grade content from you later
on as well. In truth, your creative writing abilities has motivated me to get my own blog now ;
)
Quote
 
 
0 #263 sky777 download 2018-12-11 08:02
The good thing of this book tends to be that that slipping actually are effective.
It isn't so hard to earn money from give. The mistake wind up make is exchanging irrelevant links.
Quote
 
 
0 #262 live22 casino 2018-12-11 05:06
Article writing is also a fun, if you be familiar with after that you can write or
else it is complicated to write.
Quote
 
 
0 #261 Muscle Pills 2018-12-10 16:43
I am genuinely thankful to the owner of this web page who has shared this fantastic post at at this time.
Quote
 
 
0 #260 scr888 live 2018-12-10 11:16
Set goals for work and wise. This will ensure you attract property visitors towards
your web domain. It is not so tough to earn money from channel link pr.
Quote
 
 
0 #259 lpe888 ios 2018-12-10 03:47
All 9 of these articles were taken by 9 separate
entities. When my sweep was completed, Identified 9 of my articles being simply by someone altogether
different. You will have enter in each Url to know about its SEO statistics.
Quote
 
 
0 #258 Christel 2018-12-09 10:12
I used to be recommended this web site through my cousin. I am
no longer positive whether or not this put up is written by means of him as no one else realize such exact about my problem.
You're incredible! Thank you!
Quote
 
 
0 #257 ocean king nz 2018-12-08 12:48
It one more necessary you happen to be really accustomed to what
you're writing about. Do not post on forums which are
years old. Some people are excellent at writing content.
Quote
 
 
0 #256 lpe88 download 2018-12-08 12:03
Thanks for sharing your thoughts on nerezové stoly.

Regards
Quote
 
 
0 #255 918kiss joker 2018-12-08 06:01
Just keep specialized in the reason for your goal and keep
writing good informative blogposts. This list becomes your most treasured possession in internet
marketing. Keep track of your comments from customers.
Quote
 
 
0 #254 newtown ntc33 2018-12-07 20:16
I was recommended this blog via my cousin. I am no longer
certain whether this post is written by way of him as no one else recognise such
precise about my difficulty. You are amazing! Thank you!
Quote
 
 
0 #253 sky casino new york 2018-12-07 19:30
People who read content can click to your internet site if they wish.
That is when you build your reputation within the net.

Don't ramble and much more about you need to.
Quote
 
 
0 #252 lucky palace casino 2018-12-07 07:02
Hi there! I know this is kind of off topic but I was wondering
which blog platform are you using for this site?
I'm getting sick and tired of Wordpress because I've had issues with hackers and I'm looking at alternatives for another platform.
I would be fantastic if you could point me in the direction of a good platform.
Quote
 
 
0 #251 mega888 casino 2018-12-05 04:21
We absolutely love your blog and find most of your post's to be just what I'm
looking for. can you offer guest writers to write content in your case?
I wouldn't mind producing a post or elaborating on a lot of
the subjects you write in relation to here. Again, awesome website!
Quote
 

Add comment

No bad words.


Security code
Refresh


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