Control of H-bridge based multilevel converters