Average-value modeling of high power ac-ac and ac-dc converters for power systems transient studies