Optimization of a grid-tied inverter : an application-oriented for designing multilevel converters