Jump to content
Sign in to follow this  
galentheengineer

Performing Short-Time Fourier Transform and Spectral Analysis

Recommended Posts

I've been asked by my professor to create a VI that takes a .wav file and performs short-time Fourier transform on it.

Here is the link to the VI.

 

http://puu.sh/l8jLp/4cd3dcddb5.png

http://puu.sh/l8kc7/14634e764e.png

 

One issue is that I have two power spectrums because there is no power spectrum displayed from the Auto Power Spectrum VI (I do not know what went wrong there) so I created Power Spectrum 2, which did display the power spectrum.

 

The next task for me is to perform some spectral analysis using the power spectrum and the spectrogram. Since the power spectrum displays sharp amplitude peaks, the professor wants me to create a histogram with frequency bins to hopefully create a smoother curve to actually see at which frequencies those peaks occur (for example, he told me to sum up all the amplitudes for a range of let's say 0-10 Hz, and then for 10-20 Hz, etc). Would you have any suggestion on how I can sum up the amplitude values on LabVIEW for a certain range?

For the spectrogram, the professor mentioned that it is actually a 3D representation of the sound file, with color measuring the amplitude of the signal. However, the spectrogram on the front panel is only displayed in 2D with frequency and time as the axes. How can I extract let's say the amplitude values for a certain frequency in that spectrogram? Can LabVIEW do this?

 

Thanks all!


Here is an example of the .wav file. Notice that when it's run, nothing displays on the Power Spectrum even though the VI has no errors.

Normal vesicular.wav

Share this post


Link to post
Share on other sites

Since the power spectrum displays sharp amplitude peaks, the professor wants me to create a histogram with frequency bins to hopefully create a smoother curve to actually see at which frequencies those peaks occur.

FFT is the simplest method to get from time space into frequency space. If you are looking for better resolution, that can better detect frequency bins, peaks, harmonics etc, look into to following:

 

Non - parametric

Minimum variance method, it uses a bank of FIR filters, that have the sum of gain equal to 1, so you supply the frequencies you want to look at, the method will calculate the FIR parameters and run the signal through it. Product is much better than FFT

 

Parametric

Look for:

 

AR

MA

ARMA

 

These methods replace the original signal in time with a massive polynom that either has pole roots or zero roots all combination (ARMA) and once you have a polynom, you can get as many samples you need and then run standard FFT on it.

 

MUSIC

 

This method allows you to input noise as parameter, it uses autocorrelation matrix, looks at the eigenvalues and removes the smallest as noise (kinda like edit: PCA method does), than takes the rest to reconstruct the clean signal and run FFT on it.

 

If you have "Advanced signal processing toolkit" I think some of them are implemented there, so you should get nice frequency output with nice resolution in just one VI.

Edited by bublina

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.