Space Vector Modulation Algorithm for Power Losses and THD Reduction in VSI Based Drives