Day 3 - Development of 3 PID controllers
To finish my practice, I have been developing the final touches.
First of all, I want to point out that now, in case the red line is not visible to the camera on board the F1, it will simply stop and start rotating until it finds it.
Also, in this case, to find the center point of the red line, 3 different rows (image height) will be used, and the weighted average will be done.
The ecuation for these PID controllers is:
\[u = -Kp*e - Kd * de/dt - \int e dt\]Last but not least, I managed to develop 3 PID controllers for different types of traces inside the circuit and recorded a video of the result. Getting to complete the lap in about 1’45”, a little slower than with the PD controllers.
Here is a video with the result.
With this implementation I believe I have achieved a fairly slight zig-zagging of the F1, as well as a more robust perception and better line tracking.