Extensive testing leads to many problems that are not revealed initially, during the time I spent tinkering and tweaking the PID code I was confronted with some problems that had to be addressed in…