From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

STFT of 1-minute signal (@ 100 kS/s)

Dear,

 

For a project it will be nice to display an STFT-plot of the measured signal.

I'm using labview NXG 2.0 and the files are *.tdms, recorded with an DAQ9171 (9215).
The data-length is 1 minute with a sample rate of 100 kS/s, max frequency to observe is 10 kHz.

I have allready created some code, but the actual result is far away from the desired result.

Can anybody help me out?

 

Thx

 

Kind regards,

Dries Dendas

 

code:

codespectogram.jpg

Result for the moment:

badresultspectogram.jpg

Desired result (but frequency 10 kHz):

resultspectogram.jpg

0 Kudos
Message 1 of 4
(1,088 Views)

There's definitely something wrong with your code -- too bad it is in NXG, as my expertise is in LabVIEW Classic (for want of a better term).

 

A colleague sent me a .wav file of a primate "scream" and wanted to see its Spectrum.  I wrote a little VI that read the file, passed it through an FFT Power Spectrum VI to get the overall Power Spectrum (the sound lasts about a quarter of a second), then sent it through a Time-Frequency Spectrograph VI that produced the following:Time-Frequency Spectrograph.png Note that the Frequency scale is Linear, where as in your Post, it is logarithmic.  

 

It doesn't look like you attached all of your code (not that it doesn't matter to me, as I can't look at the NXG functions to see if you are using them correctly, but someone who understands NXG and has it installed might be able to spot an error if you included all of your code).  If it helps you, I used 25 Time Steps and 2048 Frequency Bins to create these Spectra.

 

Bob Schor 

0 Kudos
Message 2 of 4
(1,050 Views)

NXG2 is quite old. Can you upgrade?

What are the settings for all your inputs to SFTP?

How is the Z-scale setup. Maybe your data is in a completely different range.

0 Kudos
Message 3 of 4
(1,047 Views)

Hi,

 

Thanks for the replys. In attachement you can find my complete code and layout.

I'm stuck with NXG2.0 cause i've a firm licence.

 

Kind regards,

 

Dries

0 Kudos
Message 4 of 4
(1,023 Views)