Proportional Line Following Pro Preview

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.

content picture

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #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

Image for Line Following
  • 15
  • 0:00
  • 42
Image for Proportional Line Following
  • 1
  • 1
  • 6
  • 3d_rotation 1