Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Single frequency detection in DFT spectrum

Status
Not open for further replies.

kripacharya

Banned
Joined
Dec 28, 2012
Messages
1,204
Helped
182
Reputation
360
Reaction score
175
Trophy points
1,343
Location
New Delhi
Activity points
0
What (fuzzy ?) algorithm or criteria can be used to detects presence or absence of a single frequency in a DFT spectrum array (power bins), with a high degree of certainity ?

The presence of noise, either white or due to adjacent frequency signal or wideband energy due to an impulse input all have to be contended for.

It is possible for this analysis to acquire multiple samples in succession, but limited to not more than about 5-10 or so.

Actually there are TWO mutually exclusive frequencies, and the probability of either one being present is very high. But there is a small probability that neither is present. But which one, or neither, needs to be discovered.

So what criteria can I use ?
 

To detect a single freq I will try to do a correlation between the known freq qith the time domain signal. Each sample in the frequency domain is found by multiplying the time domain signal by the sine or cosine wave being looked for, and adding the resulting points.. But this will not be the fastest method.

Have a look at Goertzel Algorithm.
https://www.mstarlabs.com/dsp/goertzel/goertzel.html#Ref1
 
Last edited:

Everything starts with the definition of detection criteria, e.g. absolute signal level, SNR, accepted frequency range, minimal signal duration for detection.

You apparently altready decided to use DFT processing for detection, that should basically work, but the DFT window length should be selected according to detection criteria.
 

To detect a single freq I will try to do a correlation between the known freq qith the time domain signal. Each sample in the frequency domain is found by multiplying the time domain signal by the sine or cosine wave being looked for, and adding the resulting points.. But this will not be the fastest method.

Have a look at Goertzel Algorithm.
https://www.mstarlabs.com/dsp/goertzel/goertzel.html#Ref1

The goertzel is a special case of the DFT. It does not tell you anything about adjacent frequency energy, hence cannot be used in my case, which is a very noisy channel.

For example, suppose there is an impulse during the sampling period. Then the frequency bin power detected by the goertzel will be significant non-zero, and will result in possible false detection.

I have to avoid this situation & similar ones caused by just noise.

- - - Updated - - -

Everything starts with the definition of detection criteria, e.g. absolute signal level, SNR, accepted frequency range, minimal signal duration for detection.

You apparently altready decided to use DFT processing for detection, that should basically work, but the DFT window length should be selected according to detection criteria.

The detection criteria is : Frequency bin +/- half bin on either side. Which also decides the frequency range.

Regarding SNR: thats a tricky one, since there is of necessity an AGC in the input path, and noise will get magnified in the absence of a signal. In addition, even with the signal present, substantial noise & interfering signals can be also present in the spectrum.

I need an algorithm/ decision matrix which can help me decide.

My current actual parameters are as follows :
Fs = 250 Hz, 4mS
Sample length: 128
Hence Bin spacing: 1.9531.. Hz

F1 = 25 Hz --> bin #12.8 (#13)
F2 = 37.5Hz --> bin #19.2 (#19)

The input (F1 & F2) are essentially square waves, hence the 3rd harmonics will not interfere, nor do I think the aliased components be a problem.

Ideally one of these 2 freqs will ALWAYS be present. However low power w.r.t noise impulses or 'other' frequencies might & do cause trouble.

As of now I simply look for adequate power (above some arbitrary threshold) in the respective bins, and also check to see if these are local maxima. In addition I check to see whether this happens at least 4 times in a period of 8 samples.

However this is simplistic. Occasionally I get 'no signal'. Sometimes I get 'no signal' for longish periods. Otherwise it seems to work well.

I need something more robust, and which can handle different noise profiles reliably.

Regarding minimal signal duration: The signal is supposedly present at all times. However it could be buried in noise, or been destroyed at times for same reasons. But a signal pickup which lasts for 1/2 of the sampling period would be good enough.

QUESTION:
Would using multiple samples help in improving SNR ? Say by adding or averaging ?
 

Do you perform a windowing? If yes, than impulse of noise shouldn't be a problem.
Increase the size of DFT ( which of them you have : radix -2/../9 ?)
Basically, increasing the size of input data pull, is same like averaging, you getting better SNR due to the fact that noise level proportional to sqrt(N), but signal proportional to N.
 

Do you perform a windowing? If yes, than impulse of noise shouldn't be a problem.
Increase the size of DFT ( which of them you have : radix -2/../9 ?)
Basically, increasing the size of input data pull, is same like averaging, you getting better SNR due to the fact that noise level proportional to sqrt(N), but signal proportional to N.

Yes I am doing Hamming.

But I do not see how this will remove the frequency response of an impulse in the middle of the sample.

I cannot increase size of DFT (as of now) due to memory constraints.
Even if I could, it does NOT give me a criteria for decision.

thanks anyhow.
 

But I do not see how this will remove the frequency response of an impulse in the middle of the sample.
They doing windowing not to remove impulse ( I'm refering to DC implulse in this case), DCT is not susceptible to DC presents at all, as it has build-in high-pass. Butterfly "differential matrix" subtracts sample multiples with sin a cos, zeroing any DC in the input signal, so DC show up in bin=0 only.
If memory is an essence, than do IIR filtering on the input, easiest would be two Goetzel filters (as someone already pointed above), for each of the freq. of interest.
Re-reading you replay:
The goertzel is a special case of the DFT. It does not tell you anything about adjacent frequency energy, hence cannot be used in my case, which is a very noisy channel.
I didn't get why you need energy in adjacent channel
 

My solution for the problem would be probably two PLLs. A PLL can directly distinguish a stationary signal from noise in a frequency band.
 

My solution for the problem would be probably two PLLs. A PLL can directly distinguish a stationary signal from noise in a frequency band.

You mention "two PLL's". I suppose you mean one for each frequency ?

Actually my native signal is actually an FSK @ 200Khz, where the modulating data is either a freq of 25Hz or 37.5Hz, as already stated. I am using (amongst other methods) a PLL to resolve the 200KHz FSK.

My original idea was to impose a long unique word as the data, which could be detected by the receiver despite all the noise using some method. This idea mutated into having two digital/ binary signals with a different specific frequency (the 25Hz & 37.5Hz) modulating the FSK. I thought it would be easier to detect these using DFT methods, rather than doing complex pattern matching algorithms on unique word data.

So coming back to your suggestion... how would I implement a PLL to accurately work at ~ 25 - 100Hz range ? And to also output if neither frequency was present ?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top