Optimal error governor for PID controllers