09-10-2015 10:44 AM
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
09-14-2015 04:00 AM
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
09-18-2015 03:41 AM
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...
09-21-2015 07:17 AM
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
09-25-2015 06:15 AM
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?
09-28-2015 05:24 AM
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
regards,
Luigi
NINL