Smart UPS systems: the quest for unity power factor