A device, comprising: a pulse-width modulator configured to receive a first input voltage directly from a switching unit and to convey a modulated output voltage; the switching unit configured to receive the modulated output voltage; and a filtering unit configured to receive the modulated output voltage, to generate at least one of an error correction signal (V e) and a compensation signal (V c), and to convey a second input voltage (V adj) to the pulse-width modulator based on at least one of the error correction signal (V e) and a compensation signal (V c), wherein the filtering unit comprises at least one filter comprising a first filter configured to receive the modulated output voltage and to convey the error correction signal (V e) to a first comparator; a second filter configured to receive the modulated output voltage and to convey the compensation signal (V c) to the first comparator; and the first comparator configured to convey the second input voltage (V adj) to the pulse-width modulator; wherein the pulse-width modulator comprises a first summer configured to receive a reference voltage (V ref) and the second input voltage (V adj) and to convey a modified reference voltage (V ref_mod); a second summer configured to receive a scaled ramp voltage (1/2*V ramp) and the modified reference voltage (V ref_mod) and to convey a scaled, modified reference voltage (V ref_mod_scaled); a comparator configured to receive the first input voltage and the scaled, modified reference voltage (V ref_mod_scaled) and to convey a modulated voltage (V mod); and a divider configured to receive the modulated voltage (V mod) and to convey the modulated output voltage a pulse-width modulator configured to receive a first input voltage directly from a switching unit and to convey a modulated output voltage; the switching unit configured to receive the modulated output voltage; and a filtering unit configured to receive the modulated output voltage, to generate at least one of an error correction signal (V e) and a compensation signal (V c), and to convey a second input voltage (V adj) to the pulse-width modulator based on at least one of the error correction signal (V e) and a compensation signal (V c), wherein the filtering unit comprises at least one filter comprising a first filter configured to receive the modulated output voltage and to convey the error correction signal (V e) to a first comparator; a second filter configured to receive the modulated output voltage and to convey the compensation signal (V c) to the first comparator; and the first comparator configured to convey the second a first filter configured to receive the modulated output voltage and to convey the error correction signal (V e) to a first comparator; a second filter configured to receive the modulated output voltage and to convey the compensation signal (V c) to the first comparator; and the first comparator configured to convey the second input voltage (V adj) to the pulse-width modulator; wherein the pulse-width modulator comprises a first summer configured to receive a reference voltage (V ref) and the second input voltage (V adj) and to convey a modified reference voltage (V ref_mod); a second summer configured to receive a scaled ramp voltage (1/2*V ramp) and the modified reference voltage (V ref_mod) and to convey a scaled, modified reference voltage (V ref_mod_scaled); a comparator configured to receive the first input voltage and the scaled, modified reference voltage (V ref_mod_scaled) and to convey a modulated voltage (V mod); and a divider configured to receive the modulated voltage (V mod) and to convey the modulated output voltage a first summer configured to receive a reference voltage (V ref) and the second input voltage (V adj) and to convey a modified reference voltage (V ref_mod); a second summer configured to receive a scaled ramp voltage (1/2*V ramp) and the modified reference voltage (V ref_mod) and to convey a scaled, modified reference voltage (V ref_mod_scaled); a comparator configured to receive the first input voltage and the scaled, modified reference voltage (V ref_mod_scaled) and to convey a modulated voltage (V mod); and a divider configured to receive the modulated voltage (V mod) and to convey the modulated output voltage