Go Down

Topic: PID line follower (Read 1 time) previous topic - next topic

RuH_iranga

anyone have an example PID algorithm code for line follower.
i want it to study.

please help me

AlphaBeta

Did you see this:
Code: [Select]
previous_error = 0
integral = 0
start:
 error = setpoint - actual_position
 integral = integral + (error*dt)
 derivative = (error - previous_error)/dt
 output = (Kp*error) + (Ki*integral) + (Kd*derivative)
 previous_error = error
 wait(dt)
 goto start

Pseudo code from: http://en.wikipedia.org/wiki/PID_controller


maxshelor

No PID algo was used in the document recommended by feiutm9898. However, in my opinion, we do not need PID controller for line follower... ON-OFF control or Bang-Bang control will do...
____________
Downloadvlcplayer.org


Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy