anti PID inverter function