For N-cells cascaded H-bridge (CHB) inverters based on unipolar double frequency phase-shifted pulse-width modulation (PS-PWM), the harmonic spectrum of the output voltage is degraded and difficult to be suppressed with unbalanced conditions (different dc voltages and/or modulation indices). This article proposes a closed-loop harmonic suppression scheme based on the PS-PWM technique, and the scheme is implemented with the "dq frame" to adjust cleverly the displacement angles of the triangular carriers online. The proposed method can effectively restrain harmonic magnitudes without the limitation of cells number and does not require complicated trigonometric function calculations. This method is not only applicable for all the operational conditions, but also suitable for harmonic optimization of different demands. Moreover, the principle of the symmetrical sideband harmonic suppression is also revealed. The effectiveness of the proposed method is verified by a down-scale test platform of the single-phase CHB inverter. 1