On Mon, 2 Jun 2014 14:52:48 -0700 (PDT), Alisson Vieira
<alissonvieira01@gmail.com> wrote:
>On Saturday, May 31, 2014 2:29:51 PM UTC+2, Bob Masta wrote:
>> On Wed, 28 May 2014 08:58:41 -0700 (PDT), Alisson Vieira
>>
>> <alissonvieira01@gmail.com> wrote:
>>
>>
>>
>> >On Tuesday, May 27, 2014 11:33:45 AM UTC-3, Randy Yates wrote:
>>
>> >> Alisson Vieira <alissonvieira01@gmail.com> writes:
>>
>> >>=20
>>
>> >>=20
>>
>> >>=20
>>
>> >> > Hi dears,
>>
>> >>=20
>>
>> >> > Good Morning!
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > I am new in signal processing and I am trying to do a work in noise
>>
>> >>=20
>>
>> >> > control of an electronic steering lock device (ESL). My aim is to
>>
>> >>=20
>>
>> >> > calculate the loudness (Zwicker Method- ISO 532 B) of this device. To
>>
>> >>=20
>>
>> >> > do so, first I need to obtain the 1/3 octave spectrum of a time signal
>>
>> >>=20
>>
>> >> > that I measure with a microphone. The problem is I keep getting
>>
>> >>=20
>>
>> >> > negative values in dB for the 1/3 Octave bands after filtering the
>>
>> >>=20
>>
>> >> > signal in the time domain to obtain the spectrum. I will explain here
>>
>> >>=20
>>
>> >> > the procedure I have used and hope that anyone sees what I am doing
>>
>> >>=20
>>
>> >> > wrong. Thanks in advance.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > I have done the following procedure by now:
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > 1- Sampled the noise signal (impulsive noise) by using a microphone
>>
>> >>=20
>>
>> >> > and a data logger (to record the data), which has a sample frequency
>>
>> >>=20
>>
>> >> > of 50K Hz. Then, after this step I have a Curve that it is Amplitude
>>
>> >>=20
>>
>> >> > (dBA) vs time (s), as shown below. Once the (dBA) value of a sound
>>
>> >>=20
>>
>> >> > level meter is calculated by 10*log10(p^2/p0^2), where p0 is 20e-6 Pa.
>>
>> >>=20
>>
>> >> > I am able to evaluate the pressure variation (Pa) vs time and use it
>>
>> >>=20
>>
>> >> > as INPUT of the 1/3 Octave filters.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > 2- I get the vector INPUT (with 250000 points of pressure
>>
>> >>=20
>>
>> >> > (Pa)-measurements of 5s) and use a function in matlab, in order to
>>
>> >>=20
>>
>> >> > filter the signal in each each 1/3 octave band.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > 3- Then, the program calculates the rms value of the OUTPUT (after filt=
>>
>> >ering). And this is the value that represents each frequency band.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > 4- Finally, I use the same expression used before to calculate the Magn=
>>
>> >itude in dB for each 1/3 Octave band. 10*log10(p^2/p0^2), where p0 is 20e-6=
>>
>> > Pa.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > The thing is the obtained 1/3 Octave is lower than 0 dB and this
>>
>> >>=20
>>
>> >> > doesn't make sense once I can hear the noise when I run the device,
>>
>> >>=20
>>
>> >> > moreover it doesn't make sense to calculate the loudness following the
>>
>> >>=20
>>
>> >> > ISO 532 B if we have negative third octave bands.
>>
>> >>=20
>>
>> >> > It seems like the pressure that I have in time domain that is higher,
>>
>> >>=20
>>
>> >> > then the reference pressure somehow is attenuated and gets lower than
>>
>> >>=20
>>
>> >> > the reference pressure after filtering.
>>
>> >>=20
>>
>> >> >
>>
>> >>=20
>>
>> >> > Does anybody know what i am doing wrong?
>>
>> >>=20
>>
>> >>=20
>>
>> >>=20
>>
>> >> The only thing wrong is your interpretation of the results. While the
>>
>> >>=20
>>
>> >> sound pressure of the entire signal may be well above 20e-6 Pa (RMS),=20
>>
>> >>=20
>>
>> >> the sound pressure of a single band, especially in the lower frequency
>>
>> >>=20
>>
>> >> area, may not be. At 300 Hz, 1 octave is 300 Hz and 1/3 octave is 100
>>
>> >>=20
>>
>> >> Hz. If the noise was spread evenly in frequency, that would be=20
>>
>> >>=20
>>
>> >>=20
>>
>> >>=20
>>
>> >> 20*log10(100/20000) =3D -46 dB
>>
>> >>=20
>>
>> >>=20
>>
>> >>=20
>>
>> >> below the total power.=20
>>
>> >>=20
>>
>> >>=20
>>
>> >>=20
>>
>> >> Not only this, but your noise spectrum is probably far from white
>>
>> >>=20
>>
>> >> (flat). So most of the noise will be some frequency range, meaning other
>>
>> >>=20
>>
>> >> ranges will be below 20e-6 Pa.
>>
>> >>=20
>>
>> >> --=20
>>
>> >>=20
>>
>> >> Randy Yates
>>
>> >>=20
>>
>> >> Digital Signal Labs
>>
>> >>=20
>>
>> >> http://www.digitalsignallabs.com
>>
>> >
>>
>> > Thank you very much Randy Yates for replying.=20
>>
>> >The problem is that 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 a word file which I've prepared wi=
>>
>> >th pictures and results of the problem? could you give me your email or is =
>>
>> >there any other way for me to show you this results? thanks in advance
>>
>>
>>
>> What Randy is saying is that you shouldn't necessarily
>>
>> expect positive SPL in any *single* band... you have to
>>
>> combine all the bands (in RMS fashion) to get the overall
>>
>> SPL.
>>
>>
>>
>> Even if you have a priori knowledge that a certain band is
>>
>> well above 0 dB SPL, the individual spectral lines within
>>
>> that band will be less than the band total.
>>
>>
>>
>> As a simple example, consider the flat spectrum of a white
>>
>> noise: If you double the number of samples used to compute
>>
>> the spectrum, the individual spectrum lines will be 3 dB
>>
>> lower... but there will be twice as many of them, so you
>>
>> still get the same RMS overall.
>>
>>
>>
>> However, I must also ask if you are sure of your microphone
>>
>> and system calibration (since you say you are new to DSP).
>>
>> If a system doesn't have calibration data, it's common
>>
>> practice to make full-scale the 0 dB reference, so all your
>>
>> real-world data will of course be negative dB. That's not
>>
>> dB SPL, just relative dB.
>>
>>
>>
>> Best regards,
>>
>>
>>
>>
>>
>>
>>
>> Bob Masta
>>
>>
>>
>> DAQARTA v7.50
>>
>> Data AcQuisition And Real-Time Analysis
>>
>> www.daqarta.com
>>
>> Scope, Spectrum, Spectrogram, Sound Level Meter
>>
>> Frequency Counter, Pitch Track, Pitch-to-MIDI
>>
>> FREE Signal Generator, DaqMusiq generator
>>
>> Science with your sound card!
>
>Thanks Bob for replying. Yep. I am not sure about the calibration. I will check this out tomorrow. What do you advise me to do? I have done some tests and it seems that the problem is either calibration or the way i handle the data before filtering.

You mentioned that you used a microphone and a data logger
to collect data. You'll need calibration data for the mic,
either as a list of frequencies vs dB, or as a .FRD file
that the logger can read.
I don't necessarily expect that the logger can incorporate
frequency response calibration data... you'll have to check
your logger docs. Assuming it doesn't, you may be able to
do it yourself by subtracting the relevant dB value at each
frequency of the spectrum. Or you may be able to skip all
that and just deal with the raw sensitivity, if the mic is
flat enough in the region of interest.
The calibration data is typically given as a base
sensitivity, such as SPL required to get 1 VRMS from the
mic, or dB relative to 1 V/Pa, etc. Then there should be
a list of dB deviations from that versus frequency.
If you have a lab-type condenser mic (such as those made by
B&K, ACO, etc) you may be able to get by without the
frequency response data because the response is very flat up
to some limit frequency. (Smaller mics handle higher
frequencies, but are less sensitive.) You'll need a special
preamp/power supply to go with such a mic. As long as the
frequency range of interest is well below the roll-off, you
can use the sensitivity spec alone.
Some suppliers offer calibrated electret mics which don't
need the fancy preamp. They also supply the calibration
data, so you can check if the mic response is flat in the
region of interest.
I should offer a caveat here that calibration can be really
confusing, so it's a good idea to have some sort of reality
check. Even a cheapie Radio Shack sound level meter can
help confirm that your overall calibration is correct for
some band that the meter can handle.
It sounds like you have some prior knowledge of how loud the
test unit should be (since you state that you are not seeing
that SPL). What form is that data? If it's a simple
A-weighted SPL at a specified distance, then of course the
original issue applies: The *overall* SPL is the RMS sum of
all the individual spectral lines, so any individual line
will of course be less... maybe much less, depending on how
many lines are used.
Best regards,
Bob Masta
DAQARTA v7.50
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
Frequency Counter, Pitch Track, Pitch-to-MIDI
FREE Signal Generator, DaqMusiq generator
Science with your sound card!