Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT parameters

Hi,

 

I'm using the PCI-5122 and NI-Scope functions to acquire a signal.

I use a bandpass IIR filter on this signal.

I then use the Express -> Spectral Analysis VI to plot an FFT.

The output of the FFT shows me all frequencies from 0 to the Nyquist frequency,

and not just the bandpass frequencies. Why is this happening?

 

Also, the FFT outputs df (the difference in frequency between two successive frequency points)

How do I change df ?

I'm assuming that if I change df, the FFT will average adjacent frequencies before outputting.

 

Thanks.

 

0 Kudos
Message 1 of 8
(4,387 Views)

This is normal behavior for an FFT to show all the frequencies from 0 to half the sampling rate (nyquist) when using this Express Filter.  If you want to increase the resolution of the FFT (lower the df) than you need to acquire for a long period of time.  The length of time (number of samples acquired) is directly related to the frequency step size of the FFT.  I would recommend to check out this post below that explains a little bit more about this.  Also, there are a couple of documents that discuss FFTs in more detail if you are interested.

 

http://forums.ni.com/ni/board/message?board.id=170&requireLogin=False&thread.id=99535

 

The Fundamentals of FFT-Based Signal Analysis and Measurement in LabVIEW and LabWindows/CVI

http://zone.ni.com/devzone/cda/tut/p/id/4278 

 

Analog Sampling Basics

http://zone.ni.com/devzone/cda/tut/p/id/3016

 

 

 

Regards,
Jordan F
National Instruments
Message 2 of 8
(4,368 Views)

 

I'm looking to detect a frequency that appears between 200Hz and 250Hz.

Right now I have a df = 1000Hz ie. 50 readings.

I then average these 50 readings and check if its crossed an amplitude threshold.

 

If I set df = 50000Hz, that will give me just 1 reading.

Will that be an average of all amplitudes of every frequency between 200 and 250Hz?

This will save me 'averaging time'.

 

Thanks.

 

0 Kudos
Message 3 of 8
(4,353 Views)

You can not just take one single reading and be able to detect frequency information from a signal.  You need to take enough samples to represent atleast one period of the signal being measured.  Since the number of samples is proportional to the resolution, you will get a finer resolution with more samples (smaller df). 

I am not positive but what I think you want is to use something similar to the Extract multiple tone information.vi (functions palette>>Programming>>Waveform>>Analog waveform>>Waveform Measurement).  This VI returns information on the frequency, amplitude and phase for each signal tone whose amplitude is above a specific threshold.

Regards,
Jordan F
National Instruments
Message 4 of 8
(4,339 Views)

I'm assuming that since I am going at the Nyquist sample rate (twice the freq), I need only one sample, because one sample will cover one cycle to the wave.

 

The frequency I'm expecting may occcur anywhere between 200 and 250 Hz. If I set df = 50,000 to cover this entire range, will that one reading be the average of all amplitudes in this freq range?

 

Thanks.

0 Kudos
Message 5 of 8
(4,337 Views)

Hi cosmund,

 

df depends on sample rate and the length of your FFT.  I want to get a better idea of your application.  Could please post more details about the big picture of your program?  Also do you mean 200 kHz to 250 kHz where you are expecting to find your frequency?

Regards,
Jim Schwartz
Message 6 of 8
(4,313 Views)

The big picture is I'm acquiring at about 1000kHz, and want to know the system time when a certain frequency appears in the 200 to 250kHz range.

The way I'm determining this is to average all readings in that bandwith range, and determine if the average exceeds a certain amplitude.

To avoid this averaging, I wondered if I could set df to 50Hz, so that I would only get 1 reading in this freq range. Will that one reading in the freq spectrum be the average of all amplitudes in that freq range?

How do I set the df ?

 

Thanks.

0 Kudos
Message 7 of 8
(4,310 Views)
If you look at the post here, under the section Adjusting the Frequency Resolution and Graphing the Spectrum, you will find a very detailed description of the components of df, how to calculate it and how to change your frequency resolution.
Regards,
Jim Schwartz
Message 8 of 8
(4,291 Views)