THD and Power Losses Optimization by Means of Variable Frequency Space Vector Modulation