• 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 #108 game bai poker 2018-04-23 23:18
I tһink other website proprietors should take thіs web site
аs ɑn model, very clean and magnificent ᥙser genial style
and design, let aⅼone the content. Yⲟu are an expert іn thiѕ topic!
Quote
 
 
0 #107 shitzombiessay.net 2018-04-21 08:09
A insuficiência lascivo sem hesitação é único deles.
Quote
 
 
0 #106 bspseine.tk 2018-03-30 05:29
Met een de Vogue Transportfiets zit je sowieso goed.
Quote
 
 
0 #105 EttaChief 2018-03-27 18:49
I have checked your blog 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 articles, search for; boorfe's tips unlimited content
Quote
 
 
0 #104 MuhammadChief 2018-03-25 18:56
I have checked your site 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 articles, search for; boorfe's tips unlimited content
Quote
 
 
0 #103 neuk het buurmeisje 2018-03-22 23:01
Ze heeft het gevoel dat ze deze niet kan laten gaan”.
Quote
 
 
0 #102 ValentinaChief 2018-03-21 16:27
I have checked your site and i have 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 #101 OscarChief 2018-03-20 21:25
I have checked your website and i have found some duplicate content,
that's why you don't rank high in google's search results,
but there is a tool that can help you to create 100% unique articles, search for; boorfe's tips unlimited content
Quote
 
 
0 #100 northwest pharmacy 2018-03-15 23:28
I think this is one of the most significant information for me.
And i am glad reading your article. But should remark on some
general things, The site style is ideal, the articles is really excellent :
D. Good job, cheers
Quote
 
 
0 #99 EarleneChief 2018-03-10 10:03
I have checked your blog and i have 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 articles, search for:
Best article rewritwer Ercannou's essential tools
Quote
 

Add comment

No bad words.


Security code
Refresh


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