摘要 |
There is provided a controller for controlling an output current of a switched mode power supply, SMPS (100). The controller comprises a sampling module (140) arranged to sample a signal indicative of the output current of the SMPS at a frequency higher than a switching frequency of the SMPS, and a filter module (150) arranged to filter out a ripple component of the sampled signal. The filter module (150) comprises: a ripple component estimation module (152) arranged to estimate the ripple component by calculating, for each sample of a plurality of the samples of the signal, an average sample value using the sample value and sample values obtained at corresponding points in preceding switching periods of the SMPS, the sample at each of said corresponding points being separated from said sample of the plurality of samples by a respective integer number of switching periods of the SMPS; a moving average calculation module ( 154 ) arranged to calculate a moving average of the sampled signal by calculating, for each sample of the plurality of the samples of the signal, an average of a predetermined number of preceding sample values, - and a subtraction module (156) arranged to generate a filtered signal (SF) by subtracting the estimated ripple component from the sampled signal and the calculated moving average. The controller also has a switching control module (160) arranged to generate a control signal (SD) for controlling at least one of the switching frequency and a switching duty cycle of the SMPS based on the filtered signal (SF). |