A dynamoelectric machine, for example, a brushless permanent magnet motor (M) has a plurality of stator windings (S) and a rotor (T) which rotates with respect to the windings. Apparatus (10) is provided for controlling winding commutation with respect to the rotor. A DC bus (14) supplies current to the windings. The current waveshape has characteristics which are a function of the commutation angle with respect to the windings. Current magnitude and waveshape are sensed by a sensing unit (22) and the sensed waveshape is sampled to obtain commutation information. An inverter (20) successively energizes and de-energizes the respective stator windings. A controller (26) obtains samples of the waveshape, and processes the information obtained by the sampling to control winding commutation. The controller controls the inverter operation to provide a commutation angle which optimizes motor performance and efficiency for a particular set of motor operating conditions. To do this, the processor evaluates slope and amplitude information from the sampled DC bus current waveshape, determines if the waveshape corresponds to a desired waveshape representing a desired commutation angle, and adjusts the commutation frequency produced by the inverter, if necessary, to obtain the desired waveshape.