LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying STFT

Hi Folks.

 

I am genarating a frequency sweep into my device which begins at 5Hz and ends at 200Hz. This looks like a chirp signal. The response from my oscilloscope is the plot on the left. I am using the STFT to get the frequency components from it which is the plot on the right. There seems to be a large dc component on this. Is it possible to remove this? Also the magnitude at 5Hz is about 0.3 but the STFT shows it as about 0.002, why is this?

 

I eventually would like to have all these points so I could plot a response like that drawn in red. The data from the STFT is huge and so is there a suitable way do display this?

 

STFT.jpg

 

Thanks,

 

Mark.

0 Kudos
Message 1 of 5
(3,407 Views)

Try the hilbert transformation to calculate the envelope

here is a quick try (I rebuild a trace like yours ...)

hilbert.png

hilbertbd.png

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(3,386 Views)

Mine seems to be quiet noisy. Is there a way to adjust it so it follows it more smoothly?

 

Envelope.jpg

0 Kudos
Message 3 of 5
(3,374 Views)

If you are interested in signals up to 200Hz filters are a common tool 😉

If you post a vi including the graph with data (Edit- make current values default) others are able to give it a try.....

 

And it is really helpful if you tell us more about your task! 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(3,366 Views)

I have included the VI with values set as default. I am measuring the frequency response of my device. The plot on the left is good but the envelope needs to be more accurate. It does seem to grab each peak which is good. the noise in between is not so good. If I could keep these peak values and use them to draw a curve. Is this possible. I did try peak detector before but did not work well.

Download All
0 Kudos
Message 5 of 5
(3,356 Views)