View unanswered posts | View active topics It is currently Wed Sep 30, 2020 3:41 pm

Reply to topic  [ 3 posts ] 
PID Control for Line Following 
Author Message

Joined: Fri Jan 11, 2013 7:49 am
Posts: 3
Post PID Control for Line Following
We are a smaller team in Indianapolis and fairly new to competitive robotics. We are in our second year, and looking to expand some of our knowledge and branch out into new parts of programming.

Just so you have a bit of background knowledge: We have an upcoming competition in which we, using a completely autonomous robot, have to sort blocks of different color (black and white) into their respective bins. There are two lines on the field that guide us from the block dispenser to the bins.

Several of my students have noticed that other robots are running PID in their program to quickly and accurately follow lines and they are wondering how to create this kind of control in their program. We have two very dedicated programmers, but they are simply unsure how PID works and how to approach a task like this.

If someone could help point us in the right way, it would help enormously. Thank you in advance!

Fri Apr 18, 2014 5:00 pm
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: PID Control for Line Following
Hi there,

You can find some background info here:
Some ROBOTC code here: viewtopic.php?f=53&t=2980
Some more background info: ... t/html/350
Interesting study on sensor configurations:

= Xander

| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]

Sun Apr 20, 2014 2:29 am
Profile WWW

Joined: Mon Feb 20, 2012 2:46 pm
Posts: 5
Post Re: PID Control for Line Following
We've been doing some classes in our group to do some line following this spring. And I was wondering if you could expound a bit more...

We're using white tape on gray tiles like the Vex competition so we can get better for next year. SO that may be soem of the differences we see.

The values you get for a white line then a gray tile fall off like a cliff so you don't have much room to be proportional. Any suggestions?

The other thing is the samples of code had the threshold being 1/2 way in between the light and dark. However, you generally see well below that value on the line sensor when using white lines. So the error will be negative when it's below threshold. Could that cause you to go backwards? error = (current_reading - higher_thershold_number). Wouldn't that result in a negative number?

Lastly, we do ziegler nichols PID tuning on driving with encoders and arms where you oscillate back and forth. How does that work in line following. Is it oscillation of on/off overshoot? Or is a manual tuning the way to go?

Wed Apr 23, 2014 3:33 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.