The present invention is directed to a digital controller for adjusting
the duty ratio a pulse width modulation control signal used to control a
power switch of a switch mode power converter. According to various
embodiments, the digital controller comprises a voltage compensator
module for generating a first signal (Dvoltage) representative of the
duty ratio of the control signal based on a difference between an output
voltage of the converter and a reference voltage. The controller also
includes a current compensator module for generating a second signal
(Dcorrection) representative of a modification to the duty ratio of the
control signal based on an output current of the converter. A subtraction
module subtracts the second signal (Dcorrection) from the first signal
(Dvoltage) to thereby generate a third signal (D), which is used by a
duty ratio PWM generator module to generate the pulse width modulation
control signal with the appropriate duty ratio.