Reactive power and harmonic distortion control in electric traction systems