The Switched Modular Multilevel Converter: A Compact VSC for High and Medium Voltage Applications