Analytical Investigation Into Magnet Eddy Current Losses in Interior Permanent Magnet Motor Using Modified Winding Function Theory Accounting for Pulsewidth Modulation Harmonics