Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Time-Frequency & STFT

Hello,

 

I have been having trouble understanding the numeric output of the STFT vi (the STFT vi in the advanced sig processing toolkit yields same results). When the FFT of a plucked guitar string is graphed and compared to the STFT, the harmonics seem to be roughly similar, despite a significant difference in the amplitude.

 

Assuming this is normal, my concern is that when i try to look at a bin of the STFT, it doesn't remotely resemble the output of the STFT / FFT. Does anyone know why this might be happening? Is it with my STFT settings? 

 

I have read something referencing the STFT vi outputting coefficients, though i can't seem to make any sense of them.

 

Thanks! & see pics below for an pictures of what i'm talking about.

 

STFT Results

fft output.png

 

FFT Results

fft output.png

 

Indexed row array of STFT vi output (i expected this to resemble one of the two graphs above)

STFT_'freq'.png

 

The part of the VI that i'm indexing.

stft output.png

 

0 Kudos
Message 1 of 6
(5,521 Views)

By looking at your STFT, I would suggest following.

 

Please remove DC offset & Set "dB on" for STFT.

 

I could not try your VI because you have not attached the data file.

 

DBon.PNG

0 Kudos
Message 2 of 6
(5,502 Views)

Thanks for the response, Haristhota!

 

The NI forums won't allow me to attach a .wav file so I uploaded it to dropbox:

https://www.dropbox.com/s/deqixhjww5ymojy/PluckedString.wav?dl=0

 

 

0 Kudos
Message 3 of 6
(5,495 Views)

 I just quickly made it. It could be useful.Smiley Happy

 

Message 4 of 6
(5,492 Views)

This is interseting and will definitely prove to be useful. I like how you filtered the base frequency!

 

However, I'm still stuck. The indexed data from the output of the spectrogram still seems wrong and i'm unsure as to why.

3 graphs should resemble each other.PNG

 

These three graphs should resemble each other but they don't. The left two (STFT & FFT) are correct but they very right graph (Indexed STFT) doesn't resemble what the other two graphs. Any thoughts on why? and how i could manipulate the indexed data such that it reads correctly?

 

thanks again!

0 Kudos
Message 5 of 6
(5,488 Views)
"These three graphs should resemble each other but they don't"

I don't think so. even i am not very sure about that.

Since your getting half of the frequency bins in X axis of the indexed array component wich is plotted against "something" (Amplitude??)

STFTbin.PNGSTFTbin.PNG

0 Kudos
Message 6 of 6
(5,469 Views)