You are on page 1of 3

https://bricks.stackexchange.

com/questions/4382/code-for-pid-for-ev3-g
PID SACADO DE VIDEO

https://www.youtube.com/watch?v=AMBWV_HGYj4&t=604s

target= (ligth value) = 35%


kp=1 ; ki=1; kd=1
value= Ligth_Sensor_value
error = target – value
integral = integral + error
derivative = error – lest_error

Correction = (Error * kp) + (integral * ki) + (Derivative* kd)

Proportional:

turn = (target – value) * kp


Measures deviation from de target path (error) using light sensor
Kp is an arbitrary value

Integral:

The sum of de all “error” values.


integral = integral + error
Ki is an arbitrary value

Derivative:

Uses past and current error values to anticipate the next error
derivative = error + last_error
Kd is an arbitrary value

http://mimindstorms.blogspot.com/p/proyectos.html
valores de pid

You might also like