A buck-boost switching regulator which includes a first switch, a first
diode, an inductor, a second switch, a second diode, and a controller for
controlling the first switch and the second switch, the controller being
configured to receive a current signal indicative of a inductor current
flowing in the inductor, and generating a signal indicative of an average
current flowing in the inductor, the average current being utilized to
control the first switch and the second switch, wherein the controller
includes a first compensator circuit for outputting a voltage error
signal, a second compensator circuit for outputting a current error
signal and a modulator circuit to output a first control signal to
control the first switch and a second control switch to control the
second switch.