You should be doing equation (1) before you do the log conversion. The
order should be 1) normalize signal, 2) take RMS, 3) convert to dB.
CoolEdit's RMS numbers are in dB relative to full scale, calibrated for a
sinusoidal input. If you create a full-scale sine wave, you will see an RMS
value of 0dB (or very nearly so). If you create a full scale square wave,
you will see a +3dBFS RMS. Because of this, you will need to add a
correction factor based on the RMS value of a sine wave to match CoolEdit.
I think just adding 3dB to your final result is all that is required.
"Martin" <
[email protected]> wrote in message
news:OZ8%b.33204$
[email protected]..
> Hi to all, I would like to compute the so called RMS Power but it's not
> simple
> how seems to be.
> RMS= square root ( sum of square (signal[k])/N) (1)
> First thing is :some programs like Cool Edit calculate the RMS with a
> negative number ( or zero) and since the square root (and the square)
are
> always greater or equal to zero
> I think I must change something here.
> The " unit " for RMS is decibel FS (the maximum value possible for RMS is
0
> dB FS).
> My signal is a sine wave in the range -32767,32767 with theoric RMS equal
> to zero
> ( min,max and average RMS are zero,too).
> Cool Edit analysis obtains exactly these values for this signal.
> To compute the RMS by myself,I transform the signal
> normalizing it,that is for each sample k compute
> signal[k]=signal[k]/32767
> and then taking the logarithm of the absolute values :
> signal[k] =20*log10(abs(signal[k]))-0.7458 (the last one is a
reference
> costant).
> Now I apply the equation (1) but I'm not able to find what to subctrat to
> the calculate RMS to match Cool Edit's results .
> Someone know where I'm wrong?
>
>
>