Electronic – How to find a specific frequency after doing FFT

fftsampling

I have some samples from an SDR that I run through FFT and I want to detect the presence of a specific signal, exactly 148.369MHz.

The maximum sample rate of the device is 2Mhz, this is just something else that I don't understand, how can I detect 100Mhz+ signal if the maximum sample rate is 2Mhz ?

Anyway, if I understand correctly, the maximum frequency in FFT is 1Mhz, via nyquist, my question is, how can I find the bin that corresponds to the 148Mhz signal ? I can see a spike that corresponds to the signal but I want to be able to index into the bins and find it.

Thanks

Edit: This is a plot of the signal using GNU Radio's FFT block, I'm trying to achieve the same results with my code

enter image description here

Best Answer

The maximum sample rate of the device is 2Mhz, this is just something else that I don't understand, how can I detect 100Mhz+ signal if the maximum sample rate is 2Mhz ?

You can't, at least not unambiguously if there are other signals that are of a lower frequency in the input.

Anyway, if I understand correctly, the maximum frequency in FFT is 1Mhz, via nyquist, my question is, how can I find the bin that corresponds to the 148Mhz signal ? I can see a spike that corresponds to the signal but I want to be able to index into the bins and find it.

Probably reason why you see a spike that corresponds to the signal is because you're experiencing aliasing. There's no way to unambiguously detect the \$148.369\text{ MHz}\$ signal without a sufficiently high sample rate. It could actually be a much lower frequency signal.

For example, if I try to sample a \$2\text{ kHz}\$ sine wave signal with a sampling rate of \$1.5\text{ kHz}\$, the ADC reconstruction of the signal might end up actually being \$0.5\text{ kHz}\$, so there's no way to tell the difference between a \$2\text{ kHz}\$ or a \$0.5\text{ kHz}\$ signal using only the data acquired by an ADC. That's why ADCs are often used with an analog low-pass antialiasing filter to avoid the problem.

If you want to detect this \$148.369\text{ MHz}\$ signal, you need to either sample the signal at more than twice that frequency (the more, the better), or use an alternative strategy that does not involve directly looking for the \$148.369\text{ MHz}\$ signal.

For example, you can mix the signal with another (sine wave) signal generated by a local oscillator and look for the beat frequencies instead of the \$148.369\text{ MHz}\$ signals. You can then use an ADC and antialiasing filter filter to look for them. A proper choice of the local oscillator frequency would create beat frequencies much less than the sampling rate of the system.

This is actually the technique used in some (all?) radios to tune to a specific frequency, called heterodyning.