Maximum efficiency current waveforms for a PMSM including iron losses and armature reaction