I’ve build a balancing robot with stepper motors (PID controller). It works quite well and can recover from any push I give it. Now I want the robot to stay stationary (stay on the same spot for ever). What is the best way to approach this? I’ve tried with another PID loop based on the motor position and as output the goal angle of the robot. However, I can’t get this to work well. It always overshoots after I’ve given the robot a push. Basically I need the robot to drive back to its position quickly, but then actively brake before it overshoots. Everything I tried with the PID doesn’t brake quickly enough.