Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

How to adjust Kp and Kd values automatically?

#1

im using the QTR-8RC sensor for line follower.Is there anyway to calculate the Kp Kd values for the line follower automatically in the code without changing the values and burning the code again and again

#2

There are various automatic PID tuning algorithms (your favorite search engine will show them to you), but they would not be practical to implement in a line follower.

Many people write interactive code to modify the K values between runs, which avoids uploading new software. If you are using Arduino, the serial monitor can display current values, and the keyboard can be used to send commands and/or data back to the robot.

#3

why wont they be practical for line follower?

#4

If you look up how the automatic tuning algorithms work and at some example code, you will understand.

#5

but i found out there is a autotune pid lib file for arduino wont it be good?

#6

Try it and see!