Sampling at ten times the switching frequency that misses the pulses
Symptom
Section titled “Symptom”The average of ADC samples of a pulsed current, such as a switch’s current or an inductor’s current in DCM, jumps or drifts when the switching frequency or the sampling rate changes slightly, sits far from a DMM’s reading, or reads zero at light load, although the ADC samples at ten times the switching frequency.
A sampled signal represents only the band from dc to half the sampling rate (Nyquist frequency); any component above it aliases back into that band [Kester, What the Nyquist Criterion Means to Your Sampled Data System Design]. A pulse train has harmonics at every multiple of the switching frequency, and they fall only in inverse proportion to their order (pulse-train harmonics): the narrower the pulses, the more of them stay large. Sampling at ten times the switching frequency puts the Nyquist frequency at five times it: every harmonic above the fifth aliases. The tenth, the twentieth and every harmonic at a multiple of the sampling rate fold onto dc, the average itself, and a harmonic near such a multiple folds to a slow beat: the average drifts.
Seen in time: when the samples lie further apart than a pulse is wide, a sample falls inside a pulse only by chance. With the sampling rate an exact multiple of the switching frequency, the samples fall at the same points of every period, and read the pulse either every time or never.
How to confirm
Section titled “How to confirm”Change the sampling rate by a small fraction and watch the average: a reading that moves is aliasing. Compare it with an average taken before the sampling, such as a DMM across the shunt (a current reading below the meter).
Filter before the ADC: an anti-aliasing filter attenuates the components above the Nyquist frequency [Kester, What the Nyquist Criterion Means to Your Sampled Data System Design], and for the average current its corner belongs well below the switching frequency. The sense chain tool checks the corner against the Nyquist frequency and gives the filter’s gain at the switching frequency. Alternatively, sample at a rate away from any multiple of the switching frequency and average over many periods of the beat it makes, or take many samples inside the narrowest pulse: at a rate locked to the switching frequency, n samples per pulse still misread its area by up to one n-th.
References
Section titled “References”- [Kester, What the Nyquist Criterion Means to Your Sampled Data System Design]: the Nyquist bandwidth, aliasing, and the anti-aliasing filter.
- [Alexander & Sadiku 2017, Ch. 17 (The Fourier Series)]: the harmonics of a pulse train.
- Sense chain: the filter against the sampling rate.
The numbers in the examples, presets and exercises on this site are synthetic: round teaching values, not data from any real design.