- Community Home
- :
- Discussion Forums
- :
- Most Active Software Boards
- :
- LabVIEW
- :
- Sound and Vibe - Third octave calculated via FFT Spectral lines

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

02-12-2018 12:47 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Labels:

Hey fancy folk,

I was wondering if anyone knew how the third octave data is calculated in the sound and vibe toolkit. From what I can tell, the octave analysis VI has a time averaging feature to give me the SPL of a specific band. I ask because I'm trying to do third octave analysis via summing the spectrum lines of the FFT.

I currently have a VI that will load a TDMS file and send to a queue which allows me to perform a 50% overlap on my data. Next, I window that data and send it to an FFT. After that, I search through the waveform's spectral lines and perform an RMS calculations on anything that is in the third octave bands. Finally this data is A-weighting. However, This method doesn't appear to give me the correct data, based on the data another coworker has gotten and what the third octave analysis VI has given me. I then tried using the power in band vi to calculate the band power for the third octave frequencies. From what I can tell, it is closer to what I'm expecting my data to look like. However, I am not sure how that VI calculates the band power either, so it feels like I'm chasing my tail on it.

Attached is a zip file with my code and the background noise to my chamber. The noise is 10 seconds long and IIRC, gives 71 FFT samples. The main code to execute is the "Forum-third-octave-FFT-based.vi". The "FFT spectrum info to octave info" is a VI that I made to attempt to transfer as much spectrum info from the FFT to octave VI's for the third octave calculations that I perform. Main reason is that after the calculations, I want to perform A-weighting on the third octave data that I have calculated via the RMS of the spectral lines. The TDMS file is the background noise to my chamber.

Currently, I dont think I'm doing the calculations for the higher frequencies correct. From what I can tell in documentation, the higher frequency data tends to be decimated and I am doing no decimation. I'm not sure if thats important or not, but I figured I'd throw that out there. The decimation may be for collecting data only, again, not too sure.

I am hoping someone can clear up how the third octave info is calculated via the third octave analysis VI's and/or take a look at my code to see if I'm doing anything wrong with calculating the third octave SPL via the FFT spectrum.

Thanks,

Matt

- Tags:
- FFT
- third octave

02-13-2018 01:37 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Hi Matt_AM,

The following document provides extensive information on how the third octave calculations are performed:

Third Octave Analysis Toolkit

http://www.ni.com/pdf/manuals/320952a.pdf

Additionally, the VI performs the third octave calculations in accordance with the IEC 1260:1995 and ANSI S1.11-2004 standards.

Alex G.

Applications Engineering

National Instruments

Applications Engineering

National Instruments

02-13-2018 01:42 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Fancy Folk,

Looks like I've been doing my calculations wrong. I dun goofed with the linear (Pa) vs exponential (dB) summation. In my original code, I had the "SVFA Power Spectrum" VI's signal "dB On" set to True, meaning any value coming out would be in the dB scale. I then performed an RMS calculation on the values that fell within the 3rd octave spectrum. So where I goofed was that I am adding exponential values (dB) together when I should be adding the linear values (Pa) together. I set dB On to False (meaning I'm in linear values) and then summed my the spectral lines that were in the third octave bandwidths and convert that value to dB. Hopefully that made sense.

Anyways, attached is screenshot with the modified code for the Forum-third-octave-FFT-based.vi. Again, hope this made sense.

02-14-2018 08:11 AM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Alex G,

Is the Third-Octave Analysis Toolkit that you have linked the same code that is used for the Sound and Vibe Toolkit's (SVT) third octave analysis? From what I can tell, the Third-Octave Analysis Toolkit describes the third octave analysis via the frequency domain. However, I think the SVT does analysis for third-octave info in the time domain due to the time constant you can set via the third octave VI's in the SVT.

Matt

02-14-2018 04:30 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

That appears correct, the link I listed was for an older archived toolkit and doesn't mention the time constant information.

Thank you for providing the in-depth explanation of the steps you took to resolve the issue.

Alex G.

Applications Engineering

National Instruments

Applications Engineering

National Instruments

02-14-2018 04:37 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Alex G,

I still may be wrong with my calculations though. I was looking at the Sound and Vibe user manual and the calculation for spectrum power ∑ Power Spectrum FFT/ENBW from start frequency to stop frequency. In other words, sum up all the spectral lines for the bandwidth you care about then divide by the ENBW (Equivalent Noise Band Width), which is a value based on the windowing function you use. The Power Spectrum FFT should be in linear units, not engineering units.

Side note, Power in Band VI can also do this. Just put in a 1D array of clusters through a for loop. The cluster is 2 elements long where the 1st element is the low cut off frequency and the 2nd element is the high cut off frequency. Use that to cycle through all the elements with your signal and spectrum info from the SVT FFT power function, and BAM, you got basically exactly what I was looking for with a whole lot less hassle.

Matt