Digital Signal Processing Moslem Amiri, Václav Přenosil Masaryk University Understanding Digital Signal Processing, Third Edition, Richard Lyons (0-13-261480-4) © Pearson Education, 2011. Decibels (dB and dBm) 2 Using Logarithms to Determine Relative Signal Power  Decibels evolution  When comparing analog signal levels, early specialists found it useful to define a measure of difference in powers of two signals  If that difference was treated as logarithm of a ratio of powers, it could be used as a simple additive measure to determine overall gain or loss of cascaded electronic circuits  Positive logarithms associated with system components having gain could be added to negative logarithms of those components having loss quickly to determine overall gain or loss of system 3 Using Logarithms to Determine Relative Signal Power  Difference between two signal power levels  Measured power differences smaller than one bel were so common that it led to the use of decibel (bel/10) belslogdifferencePower 2 1 10       = P P dBlog10differencePower 2 1 10       ⋅= P P 4 Using Logarithms to Determine Relative Signal Power 5 Using Logarithms to Determine Relative Signal Power  Fig. E-1  Plot of logarithmic function 10·log10(P1/P2)  Large change in function’s value when power ratio (P1/P2) is small, and gradual change when ratio is large  Effect of this nonlinearity is to provide greater resolution when ratio P1/P2 is small, giving us a good way to recognize very small differences in power levels of signal spectra, digital filter responses, and window function frequency responses 6 Using Logarithms to Determine Relative Signal Power  For any frequency-domain sequence X(m)  These expressions are used to convert a linear magnitude axis to a logarithmic magnitudesquared, or power, axis measured in dB  Without the need for squaring operation, we calculate XdB(m) power spectrum sequence from X(m) sequence dBmXmXmX mXmX dB |))((|log20)|)((|log10)( |)(|)(ofspectrumpowerdiscrete 10 2 10 2 ⋅=⋅= = 7 Using Logarithms to Determine Relative Signal Power  Normalized log magnitude spectral plots  Division by |X(0)|2 or |X(0)| value forces the first value in normalized log magnitude sequence XdB(m) equal to 0 dB  This makes it easy to compare multiple log magnitude spectral plots dB X mX X mX mXdB ) |)0(| |)(| (log20) |)0(| |)(| (log10)(normalized 102 2 10 ⋅=⋅= 8 Using Logarithms to Determine Relative Signal Power 9 Using Logarithms to Determine Relative Signal Power  Fig. E-2(c)  Normalization  We can clearly see the difference in magnitudesquared window functions in (c) as compared to linear plots in (b) dB X mX W mW mW Hanning Hanning Hanning Hanning H ) |)0(| |)(| (log20) |)0(| |)(| (log10)( 102 2 10 ⋅=⋅= 10 Using Logarithms to Determine Relative Signal Power 11 Using Logarithms to Determine Relative Signal Power  Fig. E-3  We’re designing an 11-tap highpass FIR filter whose coefficients are shown in (a)  If center coefficient h(5) is –0.48, filter’s frequency magnitude response |H–0.48(m)| can be plotted as white dots on linear scale in (b)  h(5): –0.48  –0.5, new frequency magnitude response |H–0.5(m)| are black dots in (b)  Difficult to see much difference on a linear scale  Calculating two normalized log magnitude sequences, filter sidelobe effects of changing h(5) are now easy to see, as shown in (c) 12 Some Useful Decibel Numbers  A few constants to memorize  A power difference of 3 dB corresponds to a power factor of two  That is, if magnitude-squared ratio of two different frequency components is 2, then  If magnitude-squared ratio of two different frequency components is 1/2 dB33.01(2)log10 1 2 log10differencepower 1010 ≈=⋅=      ⋅= dB33.01(0.5)log10 2 1 log10differencepower 1010 −≈−=⋅=      ⋅= 13 Some Useful Decibel Numbers Magnitude ratio Magnitude-squared power (P1/P2) ratio Relative dB (approximate) 10-1/2 10-1 -10 P1 is one-tenth P2 2-1 2-2 = 1/4 -6 P1 is one-fourth P2 2-1/2 2-1 = 1/2 -3 P1 is one-half P2 20 20 = 1 0 P1 is equal to P2 21/2 21 = 2 3 P1 is twice P2 21 22 = 4 6 P1 is four times P2 101/2 101 = 10 10 P1 is ten times P2 101 102 = 100 20 P1 is one hundred times P2 103/2 103 = 1000 30 P1 is one thousands times P2 14 Absolute Power Using Decibels  Another use of decibels  To measure signal-power levels referenced to a specific absolute power level  In this way, we can speak of absolute power levels in watts while taking advantage of convenience of decibels  The most common absolute power reference level used is milliwatt  dBm = dB relative to a milliwatt dBm milliwatt1 in watts log10log10ofpowerabsolute 1 10 2 1 101       ⋅=      ⋅= P P P P