LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Leq averaging by third octave band

Hey all,

 

We're taking in some sound levels with the sound and vibration toolkit. We're a little stuck and could use some help!

 

We want to get a 3rd octave (third, 1/3, 1/n < search terms for other people) Leq output from a microphone. The toolkit allows us to easily take an octave breakdown of a signal, and it also allows us to get an Leq of the whole broadband signal, but there seems to be no way to get and Leq of specific bands. 

 

Can anyone point me in the right direction? It should surely be possible, it's one pf the most basig functions of a sound level meter! I've looked through all the examples and found nothing so far...

 

Many thanks,

 

Lee

0 Kudos
Message 1 of 6
(3,841 Views)

HI Lee,

 

Since Leq is generally performed on data in time domain data, we do not have any native VIs that will provide you with the ability to perform Leq on frequency domain data.
In order to perform Leq on a particular 1/3 octave band of interest, you'll need to either implement you're own filter (as you've done in the screenshot provided) or find a way to perform Leq on frequency domain data. You can open the SVL Sound Level.vi and see how the Leq is acquired from time domain data as a starting point if you want to go this route.

 

A way to implement this is also showed at the bottom of the following KB:
http://digital.ni.com/public.nsf/allkb/FCE0EC0A6B193A028625722E006DE298?OpenDocument

Good Luck with your project!!

 

Luigi

NINL

 

0 Kudos
Message 2 of 6
(3,783 Views)

Hi Luigi,

 

I can get a minimum working example to work, where I have a single band that is shown as Leq. If I were to want all bands to show, and be plotted would I have to literally use nearly 30 of the same boxes to get there, or is there some simpler way you could recommend? I'll upload an example if get time today...

0 Kudos
Message 3 of 6
(3,745 Views)

Hi Lee,

 

you can repeat the same VI 30 times, or build a for loop where each frequency is analyzed, that depends on your design and specifications.

If you post your code I'll be able to help you further.

 

 

Regards,

 

Luigi

NINL

0 Kudos
Message 4 of 6
(3,715 Views)

Hi Luigi,

 

It's a hrad thing to explain, so I have made a Vi that indicates what I need. Essentailly, this is a subvi that will take all the cluster of instantaneous band powers, and get the Leq of them, and then reapply this to the cluster they came from. I don't tknow if this is the best way to go about it, but it's the only way I can work out.

 

From the example here, you can see why this is a problem. I have 27 bands I need to take into account, and I would like to make it expansible too, for 1/6th and 1/12th octave if needed later. At the moment I have one band connected to show what I think I need to do.

 

The vi needs to:

 

1) Break the cluster into band power and frequency labels

2) Break the band power array down into individual elements

3) Create ongoing arrays for each of these elements, so the LEQ block has a time-history, not just an individual measurmement

4) Get an Leq value for each band

5) Rebuild the original band power array with the new, band power Leq values

6) Re-bundle this into the cluster for output

 

If I do this in a for loop, it makes it easy, as I can index the band power array from the iteration of the loop, and output, however I will only output the last value, and I can't find a way to populate arrays from this. I also can't see a way around having more than one Leq block, as feeding more than one band into a single block will yield the wrong results. I had thought of indexing the array in a for loop, and then using a case structure to choose Leq blocks to feed the new data into... but I can't find a way to auto-populate a case structure with possible outcomes, which means that it's not expandable.

 

I don't know if I'm making any sense. Sorry for the essay! Any thoughts on this?

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

Hi Lee,

 

I have implemented your VI using a for loop for indexing. I have "recycled" your labels to explain the process.  If I understand you correctly this should be the solution for your issue, please let me know if this is the case Smiley Happy

 

regards,

 

Luigi

NINL

0 Kudos
Message 6 of 6
(3,638 Views)