AC motor direct torque program