For controlling a direct current to direct current (DC-DC) converter, a
controller individually switches a charge switch and a discharge switch
to control a duty cycle, thereby providing a regulated DC output. A delay
in switching each one of the charge and discharge switches results in a
formation of a DC error in the regulated DC output. The controller
adjusts the duty cycle by adding a delay compensation to substantially
eliminate the DC error. The delay compensation substantially eliminates
the DC error by decreasing an average value of the regulated DC output to
offset an increase in the average value of the regulated DC output
without the delay compensation.