Multilevel converters for UPS applications: comparison and implementation