Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Evaluate multicore with Texas Instruments:
Low-cost evaluation module & free software development kit available NOW.

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

There are 20 messages in this thread.

You are currently looking at messages 0 to 10.


fft - JB - 2007-09-07 04:52:00

I have a signal that contains pulses of frequencies.  So for example,
between times 'a' and 'b' there are 5 cycles of 2kHz, between times
'c' and 'd' there are no cycles of any frequencies and between times
'e' and 'f' there are another 5 cycles of 2kHz.

By analysing the data in software I need to identify where these
frequencies occur, i.e. I need to know the times a,b and e,f.

Can someone tell me the best way to do this.  I am currently trying to
implement this by cross correlating the data with an ideal signal at
the required frequencies.

Would this be possible with an FFT, would an FFT tell me all the
locations of pulses?  The little experience I have with FFTs tells me
that I would just get one phase value from the FFT for each frequency
that would not facilititate even locating the first pulse?

Thanks,

Joseph

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - mnentwig - 2007-09-07 05:37:00



Hello,
yes, you can use FFT.

Here is an example:
http://www.elisanet.fi/mnentwig/webroot/SNR_FFT_correlation_example/index.html

 The crosscorrelation is calculated as ifft(fft(signal) .*
fft(original_pulse)), where the latter is the short original pulse, padded
to the same length as the total signal.

Needless to say, the method can be quite inefficient. But it's a good
choice if you have the computing power and plenty of other worries.

Cheers

Markus

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - John - 2007-09-07 06:08:00

On Sep 7, 4:52 am, JB <josephby...@yahoo.com> wrote:
> I have a signal that contains pulses of frequencies.  So for example,
> between times 'a' and 'b' there are 5 cycles of 2kHz, between times
> 'c' and 'd' there are no cycles of any frequencies and between times
> 'e' and 'f' there are another 5 cycles of 2kHz.
>
> By analysing the data in software I need to identify where these
> frequencies occur, i.e. I need to know the times a,b and e,f.
>
> Can someone tell me the best way to do this.  I am currently trying to
> implement this by cross correlating the data with an ideal signal at
> the required frequencies.
>
> Would this be possible with an FFT, would an FFT tell me all the
> locations of pulses?  The little experience I have with FFTs tells me
> that I would just get one phase value from the FFT for each frequency
> that would not facilititate even locating the first pulse?
>
> Thanks,
>
> Joseph

If the only frequency of interest is 2 kHz, why not use a bandpass
filter?
If the SNR is high, how about an envelope detector?

John

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - mnentwig - 2007-09-07 06:53:00

>> Can someone tell me the best way to do this

Or then if we are concerned about efficiency

- Downconvert to complex baseband by multiplication with
exp(-i*2*pi*t*2000), t in seconds
- Use appropriate lowpass filters on real/imaginary part, matched to the
pulse envelope (probably ideal lowpass if it's rectangular)
- Take I^2+Q^2 and compare to threshold

-mn
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - JB - 2007-09-07 07:10:00

Yes, efficiency is my concern here, so I worry about the FFT
Correlation.

I like the idea of using filters either the band pass or downconvert
with low pass filter.

Unfortunately I am not savvy anough to understand fully what you are
suggesting, I am probably a little out of my depth:

_what is an envelope detector, is there something I can read about for
this?

"Downconvert to complex baseband by multiplication with
exp(-i*2*pi*t*2000), t in seconds"

Are you saying multiply each data point by exp(...)?  How does this
give me real and imaginary parts?

- Use appropriate lowpass filters on real/imaginary part, matched to
the
pulse envelope (probably ideal lowpass if it's rectangular)

Anywhere I can read about this?

What are I^2 and Q^2, are these the real and imaginary parts?

Thanks again.



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - mnentwig - 2007-09-07 07:21:00

OK, forget about the FFT approach then.
Is this an actual engineering job, or a homework problem?

-mn
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - JB - 2007-09-07 07:25:00

This is an an actual engineering project, but for a personal project I
am working on.  I write software for a living C#, so if there were any
free C# modules out there you know of that would be useful?

Thanks.


On 7 Sep, 12:21, "mnentwig" <mnent...@elisanet.fi> wrote:
> OK, forget about the FFT approach then.
> Is this an actual engineering job, or a homework problem?
>
> -mn


______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - Jim Thomas - 2007-09-07 08:47:00

JB wrote:
> Yes, efficiency is my concern here, so I worry about the FFT
> Correlation.
> 
> I like the idea of using filters either the band pass or downconvert
> with low pass filter.
> 
> Unfortunately I am not savvy anough to understand fully what you are
> suggesting, I am probably a little out of my depth:
> 
> _what is an envelope detector, is there something I can read about for
> this?
> 
> "Downconvert to complex baseband by multiplication with
> exp(-i*2*pi*t*2000), t in seconds"
> 
> Are you saying multiply each data point by exp(...)?  How does this
> give me real and imaginary parts?

Euler's Formula:
e^(i*x) = cos(x) + i*sin(x)

Basically, to get the real part, you multiply your sequence by 
cos(2*pi*2000*t).  To get the imaginary part, you use sine instead of 
cosine.

> 
> - Use appropriate lowpass filters on real/imaginary part, matched to
> the
> pulse envelope (probably ideal lowpass if it's rectangular)
> 
> Anywhere I can read about this?

http://www.dspguide.com

> 
> What are I^2 and Q^2, are these the real and imaginary parts?

Yes.  In fact, this operation is very much the same as calculating a 
single component of a DFT (the 2000Hz component in your case).  In a 
DFT, the LP filter is a simple sum of the products obtained by 
multiplying the input signal by the two sinusoids.

-- 
Jim Thomas            Principal Applications Engineer  Bittware, Inc
j...@bittware.com  http://www.bittware.com    (603) 226-0404 x536
Any sufficiently advanced technology is indistinguishable from magic.
   - Arthur C. Clarke
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - mnentwig - 2007-09-07 09:35:00

Hello, again.

here is a simple solution, namely a matched filter receiver (or
correlation, it depends how you look at it).

The reversed pulse simply goes into the coefficients of a FIR filter.
Using it on the signal gives a peak at the filter output, when a pulse was
received.
It's the optimum _linear_ receiver.

There are a lot of other peaks, but that's a problem with the signal, not
the receiver. Maybe it's easier to use a different pulse shape, for
example chirp.

I put together a short matlab example here:
http://www.elisanet.fi/mnentwig/webroot/optimum_receiver/index.html
The "green" pulses are aligned with the end of the pulse.

The previous solution with exp(-i ...) can help to implement this scheme
more efficiently, but probably the above solution will work just fine for
a five-cycle pulse. 

Cheers

Markus
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: fft - JB - 2007-09-07 09:43:00

OK,

So let me see if I have got this right.  To search for pulses of a
particular frequency in a real array of data I do the following:

multiply each point in the array by real = cos(t*2*Pi*frequency)  and
imag = sin(t*2*Pi*frequency)

apply a low pass filter to each of the real and imag components
separately

examine real^2 + imag^2 for exceeding some threshold?

Is this correct?  You mention using a single component of a DFT as the
Low Pass filter in the second stage, is this also correct?

Thanks,

Joseph

______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

| 1 | 2 | next