A DC—DC converter with an inductor (L) and a switch (S1, S2)
comprises an averaging circuit (2) which generates an average correction
signal (ACS) representative for the difference of the peak current (IPEAK) and
the actual average current (IAVE) through the inductor (L). A controller (2,
3, 4) controls the output voltage (VOUT) of the DC—DC converter based
on regulating the duty-cycle of the switch (S1, S2) dependent on
a sense signal (SES) passing a reference current level (RPCS), as in prior art
peak current or valley current controlled DC—DC converters, but now using
a reference current level (RPCS) that is also based on the average correction signal
(ACS) and not only on the output voltage (VOUT). This enables the converter to
control the output voltage (VOUT) more precisely.