PID Termination

How do I tell when a PID controlled robot is aligned and ready to execute the next maneuver? A timer seems to defeat the purpose of a loop and a set distance or degree goal dose not account for minor over shoots and oscillations.

my PID exit condition is marked by these three steps, first the program looks to see if the error is within an acceptable margin, then it looks to see if the change in error is within an acceptable margin, and then it has a brief pause to ensure the loop is properly settled before exiting.

6 Likes