From programs that rely entirely on proportional line following to those that use a PID-type program where "P" stands for the proportional line following component, proportional line following has proven to be a core mechanic in line following competitions.

To access the full video please subscribe to FLLCasts.com
- #2295
- 02 Aug 2024
In the first steps of learning the line following methods, we start with the wobble/ducky line following technique, followed by multistate line following. During this process, we learn that the more states a line-following program has, the more accurately it follows the line. However, a few questions arise.
How many states can there be?
The number of states is determined by the range of the color sensor. If we detect 1% reflected light on the black line and 99% on the white field, we can program 99 states. If the measure ranges from 10% on the black line to 80% on the white field, then we can program 70 states.
Won't programming so many states take too long?
Yes!That's why proportional line following was developed. Instead of programming each state individually, we can create a formula to calculate how every state should behave.
How will such a solution look?
First, we need to choose the percentage of reflected light at which the robot is perfectly aligned with the line. An easy solution is to take the maximum and minimum reflected light that the sensor can measure on the field. The midpoint between these numbers would be the Target Value.
Second, we need a formula that uses the Target Value and the sensor measurement to calculate the motor speed. The simplest and most common solution is to take the difference between the Target Value and the measured reflected light and multiply it by a factor representing how sharply we want the robot to turn. This factor depends on the robot, and we suggest testing to find the optimal value for your robot. It may take a few tries, but it is more efficient than manually programming every state.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons

Line Following
This is the Line Following course, where you’ll explore essential techniques to help your LEGO robot follow a line with accuracy and stability! We will begin by covering the fundamental concepts of line following, starting with basic wobble line following, which teaches how robots detect and respond to lines. Then, we'll progress to more advanced methods like proportional line following, allowing smoother tracking by adjusting speed based on error values. Finally, you'll dive into the widely-used PID line following technique, where you'll learn how to tune parameters for optimal robot performance. Whether you're a beginner or looking to enhance your robotics skills, this course will guide you through building, coding, and refining your robot's line-following capabilities.
- 15
- 0:00
- 42

Proportional Line Following
From programs that rely entirely on proportional line following to those that use a PID-type program where "P" stands for the proportional line following component, proportional line following has proven to be a core mechanic in line following competitions.
- 1
- 1
- 6
- 3d_rotation 1