poctave() return value for acoustics analysis
조회 수: 38 (최근 30일)
이전 댓글 표시
Hi all,
I need some assistance understanding the "units" of the data that is returned when calling the MATLAB function [p,cf] = poctave();
I am analysing an audio signal that has been recorded with a microphone. The data is imported into the MATLAB workspace and converted to a calibrated pressure value with units of Pascals (Pa). So the units of the data that I pass to poctave() are Pascals (Pa). The following code snippet shows how I'm using poctave().
flims = [20 Fs/2]; % set the frequency limits of my analysis
bpo = 3; % Third-Octave analysis required
opts = {'FrequencyLimits',flims,'BandsPerOctave',bpo}; % prepare these options for passing to poctave()
% apply the 3rd-Octave filter-bank to my data
[p, cf] = poctave(pressureData,Fs,opts{:});
(Where "pressureData" is my audio data to be filtered, and "Fs" is the sampling frequency of the data.)
My first question is:
1) What are the units of the octave spectrum data returned unto variable 'p'?
I need to know this for my conversion of the data into a dB value using 10*log10(p/pref).
I understand that if I use poctave() as follows:
poctave(pressureData,Fs,opts{:})
then by default it assigns "pref" a value of 1 and the results are as in the following image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/196221/image.png)
Without units though, the result seems meaningless...
My second question is:
2) what is pref in the previous equation to ensure correct dB values that correlate with a sound pressure level? do I use:
pref = 0.00002; % 20 micro Pascals reference sound pressure level
or:
pref = 0.00002^2; % 20 micro Pascals (squared); i.e. is p returned from poctave() a pressure squared value or a power value??
I want to create a resulting 3rd-Octave spectrum whos dB values match those as though it was being displayed on a Sound Level Meter. I will then correlate these values with those on our Sound Level Meter to validate the data to be processed within MATLAB.
Thanks so much for any assistance you can offer!!
댓글 수: 2
Mickey Yoseph
2020년 3월 25일
편집: Mickey Yoseph
2020년 3월 25일
Hello mate - did you get an answer to this in the end? In the exact same boat as you for both questions.
Require dB SPL but clearly poctave returns negative dB values which aren't helpful so need 'pref' to be 0.0002.
Any help?
zein
2020년 6월 25일
i think that the output in the graph is 10log(p) where p is the spectrum in 1/3 octave and to calculate the SPL-1/3 OCTAVE
SPL-1/3octave=10log(p/pref.^2)
채택된 답변
추가 답변 (3개)
andytodd.msp
2023년 12월 27일
Hi All, I'm just curious as to the solution to this - as we are in a similar position (using calibrated input data and trying to have results displayed in typical dB SPL values).
I've tryed using the methods above, but I'm not sure if I'm missing something - as we do not seem to get reasonable answers using this method.
For example, the output of poctave at 1kHz is -14.7dB (Average Power). We know the SPL at 1kHz is actually 79.4dB (SPL). I'm struggling to find the link between these two values so that we can convert between the two.
Any help is much appreciated!
Andy
댓글 수: 3
andytodd.msp
2024년 1월 8일
Hi Mark,
No - the data we are importing is already in Pascal units. Its coming from a calibrated measurement system.
What I'm trying to do, is have poctave display the octave values as dB re 20 micropascals - rather than the default 'dB Average Power'.
Does that make sense?
Aitor
2024년 5월 17일
Thank you @Mark Thompson. Now the calibrated values are stored in source.ThirdOctdB. But how do you plot them?Bar plot?
Thanks in advance
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Measurements and Spatial Audio에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!