View Single Post
  #1   Spotlight this post!  
Unread 09-11-2006, 02:44
CircularLogic CircularLogic is offline
Registered User
FRC #1546 (Chaos Inc)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baldwin
Posts: 38
CircularLogic will become famous soon enoughCircularLogic will become famous soon enough
Line Following with PID

Has anyone ever tried writing line following code using a PID style control system.

Right now I am using Lego Mindstorms, programming it with NQC (basically C for mindstorms with a few built in functions), and I am only allowed to use two light sensors.

Right now I am sucessfully able to drive my motors by having one function that rapidly turns them on and off for a certain period of time, which is passed to the function (in 10's of milliseconds). I take the threshold value of the black material and from it I subtract the current sensor value. I multiply that value by a gain and voila. That works well.

But then I tried to implement a Derivative control and everything went beserk.

Anyone ever do this or have any type of experience with it?
__________________
Team 1546 Chaos Incorporated
2005- SBPLI Rookie All Stars
2006- SBPLI Sportsmanship award.

Gotta hand it to the straight line autonomous mode, the most effective defense out there.

Proud beyond belief of the accomplishments of the second year, 20th ranked, 6 wins and 6 losses Chaos Incorporated.