5
$\begingroup$

Good Morning!

I am new in signal processing and I am trying to do a work in noise control of an electronic steering lock device (ESL). My aim is to calculate the loudness (Zwicker Method- ISO 532 B) of this device. To do so, first I need to obtain the 1/3 octave spectrum of a time signal that I measure with a microphone. The problem is I keep getting negative values in $\textrm{dB}$ for the 1/3 Octave bands after filtering the signal in the time domain to obtain the spectrum. I will explain here the procedure I have used and hope that anyone sees what I am doing wrong. Thanks in advance.

I have done the following procedure by now:

  1. Sampled the noise signal (impulsive noise) by using a microphone and a data logger (to record the data), which has a sample frequency of $50\textrm{ kHz}$. Then, after this step I have a Curve that it is Amplitude ($\textrm{dBA}$) vs. time ($\textrm{s}$), as shown below. Once the ($\textrm{dBA}$) value of a sound level meter is calculated by: $$10\log_{10}\left( \dfrac{p^2}{p_0^2} \right)$$ where $p_0$ is $2\cdot 10^{-6}\textrm{ Pa}$. I am able to evaluate the pressure variation ($\textrm{ Pa}$) vs. time and use it as INPUT of the 1/3 Octave filters.

    Amplitude (dBA) vs Time (s) of the impulsive noise generated by the device

  2. I get the vector INPUT (with $250000$ points of pressure ($\textrm{ Pa}$)-measurements of $5\textrm{ s}$) and use a function in MATLAB, in order to filter the signal in each each 1/3 octave band.

    1/3 Octave Bank Filter

  3. Then, the program calculates the RMS value of the OUTPUT (after filtering). And this is the value that represents each frequency band.

  4. Finally, I use the same expression used before to calculate the Magnitude in $\textrm{ dB}$ for each 1/3 Octave band. $10\log_{10}\left( \dfrac{p^2}{p_0^2} \right)$, where $p_0$ is $2\cdot 10^{-6}\textrm{ Pa}$.

    1/3 Octave Spectrum

The thing is the obtained 1/3 Octave is lower then $0\textrm{ dB}$ and this doesn't make sense once I can hear the noise when I run the device, moreover it doesn't make sense to calculate the loudness following the ISO 532 B if we have negative third octave bands. It seems like the pressure that I have in time domain that is higher then the reference pressure somehow is attenuated and gets lower than the reference pressure after filtering.

Does anybody know what I am doing wrong?

$\endgroup$
  • $\begingroup$ Looks like your filter outputs are in dBFS so the readings do make sense. I'm not familiar enough with the Zwicker process to say whether it's correct or not. $\endgroup$ – tobassist May 27 '14 at 10:03
  • 1
    $\begingroup$ Thanks man for replying. So, what should i do to get the output in dB? What you mean by dBFS? thanks again $\endgroup$ – Alisson Vieira May 27 '14 at 10:18
  • $\begingroup$ The most important thing is to have a proper scaling in dB scale. To what value in linear scale your $p_0$ corresponds to? System must be calibrated properly. Is it possible to include your dataset? $\endgroup$ – jojek May 27 '14 at 13:12
  • 1
    $\begingroup$ is your microphone and instrumentation mic? like from B&K? do you have transfer function data (including scaling) that converts sound pressure level (in Pa) to volts? then, do you know what the scaling is with the ADC and how this gets converted to MATLAB data? $\endgroup$ – robert bristow-johnson Dec 19 '15 at 5:43
  • 1
    $\begingroup$ Don't confuse "dB" (relative unit) with "dBSPL" (absolute unit of sound pressure) or "dBFS" (absolute unit of digital level). $\endgroup$ – endolith Jan 18 '16 at 15:17
0
$\begingroup$

My guess would be that $p_0$ is a constant pressure, you shouldn't assume that it's spread out across all bins of your DFT. In fact, it's only going to contribute to the 0 Hz frequency component. If you look at the spectrum of a signal which has nothing but constant pressure, this should give you a benchmark you're looking for.

Obviously, since this is the entire energy of your idle signal, the the sum of square magnitudes of your spectrum should add up to $p_0^2$, but not every bin individually. In other words, it looks like your comparing energy of each bin separately to the energy of the entire baseline noise signal, so I would indeed expect things to go below 0 most places.

$\endgroup$
  • $\begingroup$ thanks for replying . The problem is I don't get positive values in any frequency band. The whole spectrum is below 0 dB. Probably you are pretty busy but if you have some time could you take a quick look in the matlab code which I've used to get the 1/3 Octave Bands? could you give me your email or is there any other way for me to show you this file? It is really short it won't take long. thanks in advance $\endgroup$ – Alisson Vieira May 28 '14 at 17:04
  • 1
    $\begingroup$ @AlissonVieira Can you post a link to your code somewhere? And ideally, some data, too. $\endgroup$ – Phonon May 28 '14 at 17:43
  • $\begingroup$ Yep. Where do you want me to post? is it okay if i put in the dropbox and share the link here? the code isn't mine it is an open source that can be found in mathworks file exchange... I just did some modifications to fit with my data. @Phonon $\endgroup$ – Alisson Vieira May 28 '14 at 18:16
0
$\begingroup$

this is John BG

1.- Download Hastings' MATLAB app for ISO532

http://www.auditory.org/mhonarc/2000/msg00498.html

2.- update obsolete command wavread

in the file LoadSound.m replace

[y,fs,nbits]=wavread(fname)

with

[y,fs]=audioread(fname)

also, in same LoadSound.m add the following line

nbits=8

nbits use the value you find convenient.

3.- Replace input signal file

In Hastings' app there's an default audio file called sin1000.wav

Remove it, copy paste your input file and rename it to sin1000.wav

4.- Run CallSound.m

The app is going to ask you for a reference level, again, the reference level is P0, in dB, not Pa

Please let us know if this app solves your question.

I can send you copy I downloaded and modified, that runs without errors, by email, email address in profile tab.

$\endgroup$
  • $\begingroup$ if you send me the input audio you use by email, the one in the 1st graph of the question I will run Hastings app and come back to you with results. $\endgroup$ – John Bofarull Jul 15 '18 at 8:50
0
$\begingroup$

I am not an expert in signal processing either and I guess I arrive a bit late, but aren't you calculating the levels twice? I believe you should transform the pressure signal into levels (dB) either before obtaining 1/3 octave bands or either afterwards, but not twice.

What I'd do would be:

pressure signal --> calculate FFT --> Group into 1/3 Oct bands --> Calculate 1/3 Oct band levels [dB]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.