Hello,
I have a 3pi robot that i’m controlling from a laptop with serial-wireless and a pair of wixel (again thanks to Geoff).
I’m following table on this page for the serial commands:
My question is about the line following/PID parameters, referred to on this page as “a, b, c, and d”:
while i’ve come across a number of pages describing the details of the line following algorithm, i’m not able to find a clear and succinct explanation of what a, b, c, and d are, what ranges of numbers the expect, and how they related to the line-following behavior. would someone kindly refer me to such a document?
The term a/b forms what is called the proportional gain; this is the parameter that directly adjusts the strength of the 3pi’s steering so that it will follow the line. The higher the proportional gain, the faster the 3pi will steer towards the line. Too weak of a proportional gain, and the 3pi will steer too slowly, while too high of a proportional gain will result in the 3pi oscillating/swerving around the line. A proportional gain of 0.08 is a good start. This means you would need a = 2 and b = 25.
The term c/d forms the derivative gain; this is the parameter that adjusts how smoothly the 3pi steers towards the line. Essentially, it dampens the proportional response so that the 3pi doesn’t swerve back and forth around the line, but rather steers smoothly towards it, and settles on it. Too weak of a derivative gain, and the 3pi may oscillate or move jerkily. Too strong of a derivative gain, and the 3pi may not turn fast enough. A derivative gain of 1.6 is a good start. This means you would need c = 8 and d = 5.
The gain values I’ve provided are the same ones I use in Project Tabletop for the line-following mode.