how is RMS sound level calculated
December 10, 2008 10:55 PM Subscribe
how is the calculation of RMS noise level done, from a data set of noise level vs frequency? i thought it could be done by working back to the set of pressure data, but now i think that is wrong.
sorry it's not an exciting question:
the data set contains SPL vs frequency.
if i have a data set of n samples between 20 Hz to 20kHz,
how can i approximate the overall SPL (dB).
i have software that is automatically generating values,
and at the moment i cannot dig into the software deep enough to calibrate the accuracy of these outputs.
i have found a method to do it for octave spaced data (7 samples),
which is based on a natural log ratio.
hoewver my application typically has evenly spaced data at 50 or 25Hz bandwidth.
i wish my maths was stronger to work it out from first principles!
sorry it's not an exciting question:
the data set contains SPL vs frequency.
if i have a data set of n samples between 20 Hz to 20kHz,
how can i approximate the overall SPL (dB).
i have software that is automatically generating values,
and at the moment i cannot dig into the software deep enough to calibrate the accuracy of these outputs.
i have found a method to do it for octave spaced data (7 samples),
which is based on a natural log ratio.
hoewver my application typically has evenly spaced data at 50 or 25Hz bandwidth.
i wish my maths was stronger to work it out from first principles!
So you can't just, like, resize the window for your octave method so that, instead of exponential numbers of two, you go by harmonic intervals such as evenly spaced data at 50 or 25 Hz?
posted by Monstrous Moonshine at 3:34 AM on December 11, 2008
posted by Monstrous Moonshine at 3:34 AM on December 11, 2008
Last night I went and downloaded Pure Data. They have ready-made objects for this...for instance, the env~ object gives you an RMS in decibel form. Demo shows the sine wave turns out with 3 dB less than the ceiling, which translates back into RMS as 0.707 (1/√2). They've also got a 'dbtorms' object, so if you have SPL values, you could average ur multiple RMS valuez. Go from dB to RMS, average, then back to dB. I don't think frequency is going to change your math situation.
posted by Monstrous Moonshine at 12:24 PM on December 11, 2008 [1 favorite]
posted by Monstrous Moonshine at 12:24 PM on December 11, 2008 [1 favorite]
Response by poster: i think that is close.
but i think you add logarithmically, and dont average.
also i think there is another constatn term in there,
but i am not sure why.
i think u can put it back to pressure by 10-9 e^(P/sqrt2),
and then sum all the pressures, then back calc the dB as you say.
posted by edtut at 8:52 PM on December 11, 2008
but i think you add logarithmically, and dont average.
also i think there is another constatn term in there,
but i am not sure why.
i think u can put it back to pressure by 10-9 e^(P/sqrt2),
and then sum all the pressures, then back calc the dB as you say.
posted by edtut at 8:52 PM on December 11, 2008
Sorry for coming late. There is one trap here, namely that linear RMS pressures don't sum linearly. Think of it like this: You have two pure tones but at different frequencies. Each has an RMS pressure amplitude if 1, but if you superimpose the two waves, they sometimes add up and sometimes cancel out. If you just sum the RMS amplitudes, you're not taking into account the cancellation.
On the other hand, the power of each tone is not going to change because you sound more tones at the same time. Mathematically, it just comes from the pressure having an alternating sign and the power always being positive.
What you do then is to convert your pressure dB values to RMS pressure, square them all, sum the squares, take the square root of the sum. That's your total RMS pressure which you can then convert back to pressure in dB. The conversion between linear (RMS) units and dB is:
Pres_RMS = 10^(Pres_dB/20)
Pres_dB = 20*log10(Pres_RMS)
Using the properties of logarthms, the whole conversion can be expressed as
Pres_db_sum = 10*log10( Sum(10^Pres_dB_for_each_frequency_range/10) )
You don't have to include any prefactors since they cancel out anyways (power = K * pressure^2, but you don't have to bother about the constant K). This should work given that your measurements cover the whole frequency range you want to sum over without overlapping.
posted by springload at 6:56 PM on December 16, 2008
On the other hand, the power of each tone is not going to change because you sound more tones at the same time. Mathematically, it just comes from the pressure having an alternating sign and the power always being positive.
What you do then is to convert your pressure dB values to RMS pressure, square them all, sum the squares, take the square root of the sum. That's your total RMS pressure which you can then convert back to pressure in dB. The conversion between linear (RMS) units and dB is:
Pres_RMS = 10^(Pres_dB/20)
Pres_dB = 20*log10(Pres_RMS)
Using the properties of logarthms, the whole conversion can be expressed as
Pres_db_sum = 10*log10( Sum(10^Pres_dB_for_each_frequency_range/10) )
You don't have to include any prefactors since they cancel out anyways (power = K * pressure^2, but you don't have to bother about the constant K). This should work given that your measurements cover the whole frequency range you want to sum over without overlapping.
posted by springload at 6:56 PM on December 16, 2008
Response by poster: thanks very much. i got the maths of it in the end, but your explanation showed me well why the squared term is applied first.
i found a method called "octave band method", which is similar in principle, and basically gives the same result.
however it is generated by natural log relationship.
i havent worked out a way to relate the two with maths yet, silly but interesting.
posted by edtut at 10:52 PM on December 22, 2008
i found a method called "octave band method", which is similar in principle, and basically gives the same result.
however it is generated by natural log relationship.
i havent worked out a way to relate the two with maths yet, silly but interesting.
posted by edtut at 10:52 PM on December 22, 2008
This thread is closed to new comments.
posted by Monstrous Moonshine at 1:40 AM on December 11, 2008