Electronics > Projects, Designs, and Technical Stuff

Signal processing - getting exact frequency from short ADC sample

<< < (17/18) > >>

nctnico:

--- Quote from: Berni on December 20, 2019, 07:08:24 am ---For when computational power is not so much of a concern i do admit that FFT is probably the best choice since

--- End quote ---
No. Absolutely not. FFT (and also Goertzel) is utterly useless for detecting tones because in the frequency domain the bins are not shaped rectangular but parabolic. At the sides of the bin the signal strength will appear weaker.

@hamster_nz: if there is a bandpass filter in the analog domain with sufficient suppresion you can even undersample. I have used that trick in an ultrasonic distance meter in order to use a lower samplerate.

Berni:

--- Quote from: nctnico on December 20, 2019, 07:17:10 pm ---
--- Quote from: Berni on December 20, 2019, 07:08:24 am ---For when computational power is not so much of a concern i do admit that FFT is probably the best choice since

--- End quote ---
No. Absolutely not. FFT (and also Goertzel) is utterly useless for detecting tones because in the frequency domain the bins are not shaped rectangular but parabolic. At the sides of the bin the signal strength will appear weaker.

--- End quote ---

I meant FFT as a process to convert the real ADC samples into complex form so that you can find the phase of that tone. We don't care about what frequency each bin is, they are just used to tell apart the signal of interest from other crap like noise, tones, harmonics etc.. Sort of like a narrow bandpass filter that happens to also convert the signal from real to complex form.

Do this FFT twice on two different sections of the signal and you can get a phase difference between the two points to get the exact freqency. The wraparound integer phase can be gotten from zero crossing or calculating it from the FFT bin frequency if it has enough bins to be accurate within one whole wave.

iMo:
@daqq - could you post some data such the people may have something to play with?

nctnico:

--- Quote from: Berni on December 21, 2019, 06:13:58 pm ---
--- Quote from: nctnico on December 20, 2019, 07:17:10 pm ---
--- Quote from: Berni on December 20, 2019, 07:08:24 am ---For when computational power is not so much of a concern i do admit that FFT is probably the best choice since

--- End quote ---
No. Absolutely not. FFT (and also Goertzel) is utterly useless for detecting tones because in the frequency domain the bins are not shaped rectangular but parabolic. At the sides of the bin the signal strength will appear weaker.

--- End quote ---
I meant FFT as a process to convert the real ADC samples into complex form so that you can find the phase of that tone. We don't care about what frequency each bin is, they are just used to tell apart the signal of interest from other crap like noise, tones, harmonics etc.. Sort of like a narrow bandpass filter that happens to also convert the signal from real to complex form.

--- End quote ---
Nope. The result will still heavily rely on how well the actual frequency is aligned to the FFT bins. Besides that for FFT you'll need to use some kind of windowing to turn the burst signal from the OP into a seemingly continuous signal which esentially means not using all the incoming information.

Marco:
All in all, given the way DC makes things hard for the mixing/phasor approaches I think the FFT based method still is the easiest to implement.

Fast enough, close to optimal, doesn't care about DC. I don't really care about the way frequencies cover bins, he said he did the Monte Carlo simulations to test his formula and it performed near optimal. I'm not going to do them myself, but unless I see someone do it and contradict him I have no reason to distrust his results.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod