"jungledmnc" <jungledmnc@[EMAIL PROTECTED]
> writes:
> Hi,
> this question might be very trivial, but I haven't found good
explanation
> anywhere else.
>
> I have an audio signal - some sine. Use a wavelabl to look at the
> waveform, and its maximum is at about 0.6. When I change the display
into
> dB it shows about -5dB at that level.
> But this does not make sense - the formula is 10*log10(amplitude).
No. The formula is
dB = 10 * log10(P / P_ref) [1]
> So it should be -2.5dB.
No, 0.6 V peak should be about -4.44 dB.
> I have found, that this is because we use squares for comparison : 10
> * log10(amp1^2 / amp2^2) = 20 * log10(amp1 / amp2)
Right equation, wrong reason. We use squares for voltages (or
amplitudes, as you call them) because the decibel formula ALWAYS relates
two powers (see equation [1]), and power is related to the square of
voltage.
Since P = V^2 / R, then if the two powers (P and P_ref) both have the
same resistance R, then we can also compare voltages using dB.
> They say it is often used in electronics to compare voltages, but why is
> it used in digital audio? Yeah I know that the digital values are
> equivalent to resulting electrical power, but we are not comparing
anything
> to anything.
You are, by definition, comparing one power level to a reference power
level. That is the DEFINITION of dB (see equation [1]).
> So why should we square?
Because we're always comparing powers (see equation [1]).
> And if so, then when should we NOT square?
As you already know, one property of logarithms is that log(x^y) = y *
log(x). Since P = V^2 / R, then if P and P_ref in equation [1] are
both at the same resistance R, then
dB = 10 * log10( (V^2 / R) / (V_ref^2 / R) )
= 10 * log10( V^2 / V_ref^2 )
= 10 * log10( (V / V_ref)^2 )
= 20 * log10( V / V_ref ). [2]
So, even though you're computing the ratio of two powers, you can
equivalently use equation [2] when the impedance of the two powers
are the same.
Now to get to your root question, in digital audio we're often concerned
about how close a signal is to full-scale. So when we compute a decibel
value for a digital audio signal, we commonly make the following
assumptions:
1. The range of digital amplitudes are between +1 and -1. That is, any
sample x[n] is in the range -1 <= x[n] <= +1.
2. The amplitude represents voltage (or current).
3. Even though this is a digital signal and has nothing to do with a
physical quantity, we assume there is a resistance involved and,
further, that the resistance is the same as the reference resistance.
4. The reference power is assumed to be the RMS power of a full-scale
sine wave. Thus, V_ref = sqrt(2) / 2 VRMS, or simply 1 Vpeak.
Thus your 0.6 Vpeak signal is 20 * log10(0.6 / 1) ~= -4.44 dBFS, which
means it is 4.44 dB below full-scale.
--
% Randy Yates % "My Shangri-la has gone away, fading
like
%% Fuquay-Varina, NC % the Beatles on 'Hey Jude'"
%%% 919-577-9882 %
%%%% <yates@[EMAIL PROTECTED]
> % 'Shangri-La', *A New World Record*, ELO
http://www.digitalsignallabs.com


|