Continue to Site

# What sampling frequency to choose?

Status
Not open for further replies.

#### Coper

##### Member level 4
ADC 12bit sampling AC 230V 50Hz. In order to find out if a 216 or 1060Hz communication signal is present.
For 216Hz I use Fs=1000Hz and time slot 120ms. In 120 samples, I am looking for a frequency of 216Hz using the Discrete Fourier transform with second-order Goertzel algorithm.
The minimum sample rate is twice the frequency we are interested in, As the sampling frequency increases, the quantization error will probably decrease, but the number of multiplications and additions in the DFT also increases. Is there any ideal sample rate for this case?

Hi,

The minimum sample rate is twice the frequency we are interested
Not exactly. It needs to be more than twice. Twice does not work.
If you are 1Hz higher you need to average/sample for 1 second.
If you are 10 Hz higher you need to average/sample for 100ms.
If you are 1000Hz higher you need to average/sample 1ms..

***
Best sampling frequency for both 216Hz and 1060Hz.
Mathematically it´s the "least common multiple". using prime factorisation its:
2^3 x 3^3 x 5 x 53 = 57240Hz. And you need to sample exactly for 250ms (14310 sample values) to get perfect results.

But to be honest - for my taste this is a bit too much effort.

Choose a lower sampling frequency...
So you need to live with imperfection. .. and care for it. Like using a windowing function before performing the FFT. (1)

For sure you may optimize on the one or the other signal frequency.

(1) But - if possible - I´d still go with a 250ms window. Maybe interleavd as sliding window with multiple calculations within 250ms.

Klaus

Status
Not open for further replies.