How to Choose a Sensor Sample Rate

The sample rate is chosen after the filter sets the bandwidth. The Nyquist condition does not apply directly to an unfiltered sensor signal.

How to Choose a Sensor Sample Rate

Picking a sample rate by saying "this many samples per second is enough" skips the quantity being measured. The rate depends on the highest frequency in the signal and on the filter that cuts what sits above it. Without that filter, the number alone guarantees nothing.

Nyquist wrote the conditions for sampling in telegraph transmission in 1928. Shannon showed in 1949 that a band-limited signal can be reconstructed when the sample rate exceeds twice the highest frequency. A sensor output is not band-limited by itself. Mechanical vibration, mains hum and switching noise carry energy above the band you care about. If that energy is not removed before sampling, it appears as a lower frequency. That is aliasing.

The order is fixed. First write down the band in which the decision is made. Then choose the corner of the analogue filter that cuts above that band. Keep the sample rate comfortably above that corner. The filter's transition is not infinitely sharp, so "exactly twice" needs margin in practice. The margin is calculated from the filter slope; one universal factor does not fit every board.

The second limit is where the data goes. Every sample costs radio time, memory and battery. If the decision is a local threshold, not every raw sample has to travel to a server. If the waveform will be inspected centrally, the rate cannot be cut. The record should keep a raw sample and a derived value in different fields.

At FenergyTech a monitoring job starts with the band and the filter; the rate is fixed after that. A slow swing in a field log can then be told apart from aliasing.

A numerical case makes the job clear. If the band of interest is 50 Hz, the low-pass corner is at 200 Hz and the slope is 24 dB per octave, a component at 200 Hz only falls far enough several octaves later. Set the sample rate at 400 Hz and the energy the filter still passes folds under 200 Hz. Shannon's condition is written for the band the filter has cut. Not for the band the filter still passes. The gap between the corner and the sample rate is calculated from the slope. "Make it ten times" does not fit every board.

There is also the window. The rate is raised so a fast event is not missed, and the record is then reduced to a one-minute average. The average erases the impact. If the impact is what you want, a peak is kept apart from the average. The two numbers are not written into the same field.

The clock drifts too. Samples are assumed to be equally spaced. If the crystal walks with temperature, the spacing changes and the frequency sum shifts. The spacing stays next to the record as a timestamp. Without the stamp, a spectrum made later does not agree with the one on the bench.

Sources: H. Nyquist, "Certain Topics in Telegraph Transmission Theory", Transactions of the AIEE, vol. 47, no. 2, pp. 617–644, 1928. C. E. Shannon, "Communication in the Presence of Noise", Proceedings of the IRE, vol. 37, no. 1, pp. 10–21, 1949.

Share:

Planning a similar project?

We can talk through how the topic in this article applies to your product.

More articles

Browse our other technical articles