In real life applications the various DC voltages existing in a multilevel inverter are affected by the loading conditions and the nature of the input supply. Thus, DC-link voltages may contain low frequency ripples, and their mean values might drift away from the nominal operating point. In such cases, unwanted low frequency harmonics are present on the load voltage waveform. In this work, the unified level shifted PWM (UniLS-SPWM) is introduced, tailored to eliminate the low frequency harmonics of the load voltage, considering DC-link offset and ripple. This is achieved by employing feedforward terms to the classic LS-PWM. To fully compensate the load current waveform, regarding the high frequency ripple, the variable frequency scheme is also adopted, as it is imposed by the thorough mathematical analysis. Detailed simulations in MATLAB validate the ability of the UniLS-SPWM to provide a pure sinusoidal load voltage waveform, even in heavy unbalanced operation, or in the special case of a hybrid topology. Finally, the experimental results impose a significant improvement of the load current THD in both steady state and transient operation, rendering the proposed modulation technique a viable solution for many applications.