This paper proposes a generalized formulation for selective harmonic elimination pulse-width modulation (SHE-PWM) control suitable for high-voltage high-power cascaded multilevel voltage source converters (VSC) with both equal and nonequal dc sources used in constant frequency utility applications. This formulation offers more degrees of freedom for specifying the cost function without any physical changes to the converter circuit, as compared to conventional stepped waveform technique, and hence the performance of the converter is greatly enhanced. The paper utilizes the merits of the hybrid real coded genetic algorithm (HRCGA) in finding the optimal solution to the nonlinear equation system with fast and guaranteed convergence. It is confirmed that multiple independent sets of solutions exist. Different operating points for both five- and seven-level converters including single- and three-phase patterns are documented. Selected experimental results are reported to verify and validate the theoretical and simulation findings.