Modeling and simulation of unified power flow controller based on modular multilevel converters