• 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 #112 kinghungip.net 2018-07-09 14:04
A solução é suplemento organico Turbo Maca Peruvian.
Quote
 
 
0 #111 Adrienne 2018-06-28 12:56
14, § 3.º). 432p. A abrigo Constitucional do Transexual.
Quote
 
 
0 #110 fieldwork brewery 2018-06-11 04:15
Hi there! I'm just curious to know at what time do you start your OT fieldwork
on a daily basis and is your fieldwork integrated with classes during the day or on separate days?
Quote
 
 
0 #109 Tyrell 2018-04-30 06:49
acontecido posterior foi a avaliação das entrevistas.
Quote
 
 
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
 

Add comment

No bad words.


Security code
Refresh


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