A generalized formulation of SHM-PAM for cascaded H-bridge inverters with non-equal DC sources