Thirty-Degree Timing

The thirty degree wait time is defined as the time between the commutation point and the next zero-cross point. In trapezoidal control, when the zero cross is found, the system must wait for a thirty-degree electrical angle for the commutation to occur.

Any alteration of this time is called advance or retard, when the commutation is done earlier or later than it is supposed to.

Advance is done to achieve a greater torque during acceleration and, similarly, the braking force is increased during the retard.

A fixed advance value is implemented by subtracting the value from the newly computed thirty-degree time to compensate for any pass-through delay and add an advance time to the commutation point.

This is done using the following line of code: tempValue = timerValue - MOTOR_ADVANCE_TIME;