# Tuning PID controlling car's steering angle

We built a car model with Ackerman steering type for line following task. The distance between rear and front wheels' axes was about 42 cm. Then we tuned PID controller (really just PD: Kp = 0.9, Ki = 0.0 and Kd = 0.2). A deviation from line in pixels captured by forward looking camera is directly sent to the PID controller and the result is a steering angle.

But recently we had to shorten our car to allow it to pass rounded corners. We shortened the distance between wheels' axes by about 15 cm.

It took us so long to tune the PID controller the previous time so we just want to adjust the PID values according to some Ackerman kinematic model. Is there any way to do this?

• Yes, but it's complicated. The car will turn faster for a given steering angle, proportional to the change in wheelbase. But the position of the line in the camera's view is a function of both car position and steering angle, and I'm pretty sure that the effect it has will also be scaled by the change in wheelbase. Jun 4 '19 at 16:10
• How's your math? Can you work out the difference in what the line position in the camera does with the same incremental change in steering angle? I.e., for a straight line and a given car speed, calculate what the line seen by the camera does in response to a 1-degree steering angle change with the old wheelbase, and then again with the new. It'll be the mother of all story problems if you haven't done this sort of thing before, but there will be a solution. Jun 4 '19 at 16:12
• @TimWescott, thank you for your response. My math isn't very good since I'm still a school student. I wished someone just explained me the basics of Ackerman steering model because those researches and papers I found seems to be too complicated and precise which isn't really important for me. Can you give me some links to get familiar with this math easily without diving too deep? Jun 4 '19 at 16:43
• I can't. I actually suspect that if you just reduce your gains by a factor of $\frac{15\mathrm{cm}}{42\mathrm{cm}}$ (i.e., multiply everything by (42 - 15)/42) then you should be OK. If you made your controller robust enough, it may just work, with a bit of extra wiggling. Jun 4 '19 at 17:05
• @TimWescott, thanks. It may work. I'll try! Jun 4 '19 at 17:22