A current averaging circuit for averaging a piecewise linear switching
current waveform of a PWM power converter including first, second and
third sample and hold circuits and a sample averaging circuit. The first
sample and hold circuit samples a short duration of the current waveform
for each PWM cycle and provides corresponding short samples. The second
sample and hold circuit samples a long duration of each PWM cycle and
provides corresponding long samples. The sample averaging circuit is
coupled to the first and second sample and hold circuits, averages
corresponding ones of the short and long samples and provides
corresponding average values. The third sample and hold circuit samples
each average value and provides a current average signal. The waveform
may include ramp-on-a-step voltage pulses representing switching current.
The current average signal is updated after each current pulse.