Author Topic: PID Line following !  (Read 9214 times)

0 Members and 1 Guest are viewing this topic.

Offline andreahmedTopic starter

  • Jr. Member
  • **
  • Posts: 37
  • Helpful? 0
PID Line following !
« on: March 20, 2008, 03:38:15 PM »
Hi, I used only P control to make a line follower robot , which is like if (000001) do pwm on the faster wheel .. i think that's only P control , at fast speed i found my robot overshoots and crawls over the line , and after searching i found that i need to add the D term to compensate for that shoots .. how do i implement the idea in C code ? i already read the tutorial here about pid but its only for motors ...

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: PID Line following !
« Reply #1 on: March 21, 2008, 04:03:17 AM »
Derivative is implemented into microcontrollers by finding the difference between consecutive input values, multiplying them by a suitable derivative constant, and adding it to the output.

To learn why PID works see this link - http://www.embedded.com/2000/0010/0010feat3.htm

And to find out how calculate the most efficient constants, search google - http://www.google.co.uk/search?q=pid+tuning&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

Harry
Imperial College Robotics Society
www.icrobotics.co.uk

 


Get Your Ad Here