Review Quantitative spects of Networking Decibels, ower, and Waves John Marsh
Outline Review of quantitative aspects of networking Metric system Numbers with Units Math review exponents and logs Decibel units Decibel units and log scale on a graph Loss in decibel units ower in decibel units Loss and attenuation Signal-to-noise ratio Waves and Signals Signals in Time Frequency Content mplitude, eriod and hase Waves in Space Traveling Waves EM Waves
Metric System Review Metric system of units Name refix Size Examples pico p 1E- 12 pm, ps nano n 1E- 09 nm, ns micro µ (or u) 1E- 06 um, us milli m 1E- 03 mm, ms kilo k 1E+03 khz mega M 1E+06 MHz giga G 1E+09 GHz tera T 1E+12 THz
Numbers with Units Converting among various units can be tricky but we often do it in our heads: You can easily see that 2 hours is 120 min. To do this carefully, showing all the steps, you write min 2 = hr = 2 hr 60 120 min hr where the units of hr cancel Here we used the conversion factor 60 min/hr
Numbers with Units Other common conversion factors 4 qt gal 1E3 mm m 1E 3 m mm 1E6 Hz MHz bit 8 = Byte 8 b B 1E6 bps Mbps 4 bit sym Case of 4 symbol alphabet
Math Review Basics of exponents and logarithms Recall rules of exponents + Q = Q Q Q = = The log and exponent are inverse operations Q log ( X ) = X log X = X Log of the exponent Exponent of the log So if then log C = = C In words: log (C) is the power you raise to to get C.
Math Review Basics of exponents and logarithms Let So and Then + Q = Q CD Then we take the log of both sides to get = C and log C = = ( ) ( + Q CD = log ) = + Q = log C log D log + Q = D log D = Q In words: The log of a product is the sum of the logs
Math Review We apply this rule multiple times log CD = log C + log D log C 2 = log log nd we get the general formula C k log C = + log k log C = C 3 = 3log C C 2log In words: With log of a power, bring the exponent out front C
Math Review Slightly different with negative exponents: Q Let = C and = D Then log C = and log D = Q Then Q = Then we can write log C D = log Q = Q C = D ( Q ) = Q = log C log D In words: The log of a quoeent is the difference of the logs
Topic 1 Outline Review of quantitative aspects of networking Metric system Numbers with Units Math review exponents and logs Decibel units Decibel units and log scale on a graph Loss in decibel units ower in decibel units Loss and attenuation Signal-to-noise ratio Waves and Signals Signals in Time Frequency Content mplitude, eriod and hase Waves in Space Traveling Waves EM Waves
Decibel Units Decibel units apply when quantities we want to measure vary over a wide range Examples include: Sound pressure level ower of a signal, measured in milliwatts [mw] Electrical signal launched into a wire Optical signal launched into an optical fiber or air Radio signal launched into air Loss ratio of a signal passing through a medium or component Loss ratio is the fraction of power that emerges from the medium or component pplies to electrical, optical, and radio components and media decibel scale is another way of presenting data on a logarithmic scale
Decibel Units and the Log Scale Consider the following experiment: You have 10 spools of Cu wire, each 500 m long You want to measure how well it transmits a 100 khz signal Measurements: ut 125 mw, 100 khz signal into 1 spool and measure signal strength at the output: measured value 33.38 mw Now add more spools and make more power measurements table of the raw data is shown Length of ower at wire output [m] [mw] 500 33.38 1000 12.79 1500 4.36 2000 1.05 2500 0.363 3000 0.141 3500 0.0342 4000 0.0114 4500 0.00362 5000 0.00135
Decibel Units and the Log Scale Now we graph this data It s hard to tell what s going on with those small numbers! ower Output [mw] 50.0000 40.0000 30.0000 20.0000 10.0000 0.0000 125 mw, 100 khz Signal in Cu Wire 0 1000 2000 3000 4000 5000 6000 Wire Length [m] Length of ower at wire output [m] [mw] 500 33.38 1000 12.79 1500 4.36 2000 1.05 2500 0.363 3000 0.141 3500 0.0342 4000 0.0114 4500 0.00362 5000 0.00135
Decibel Units and the Log Scale We can use a log scale on the graph This reveals much more information! ower Output [mw] 100.0000 10.0000 1.0000 0.1000 0.0100 0.0010 125 mw, 100 khz Signal in Cu Wire 0 1000 2000 3000 4000 5000 6000 Wire Length [m] Length of ower at wire output [m] [mw] 500 33.38 1000 12.79 1500 4.36 2000 1.05 2500 0.363 3000 0.141 3500 0.0342 4000 0.0114 4500 0.00362 5000 0.00135
Decibel Units and the Log Scale Note we can label these values as powers of 10 ower Output [mw] 100.0000 10.0000 1.0000 0.1000 0.0100 0.0010 125 mw, 100 khz Signal in Cu Wire 0 1000 2000 3000 4000 5000 6000 Wire Length [m] 10 +2 10 +1 10 +0 10-1 10-2 10-3 Length of ower at wire output [m] [mw] 500 33.38 1000 12.79 1500 4.36 2000 1.05 2500 0.363 3000 0.141 3500 0.0342 4000 0.0114 4500 0.00362 5000 0.00135
Decibel Units and the Log Scale Using a decibel scale gives the same picture as the log axis, and labels it with 10X the exponent ower Output [dbm] 20.0 10.0 0.0-10.0-20.0-30.0 125 mw, 100 khz Signal in Cu Wire 0 1000 2000 3000 4000 5000 6000 Wire Length [m] Length of ower at ower at wire output output [m] [mw] [dbm] 500 33.38 16.20 1000 12.79 11.15 1500 4.36 5.16 2000 1.05 1.31 2500 0.363-4.52 3000 0.141-9.22 3500 0.0342-13.61 4000 0.0114-19.55 4500 0.00362-24.66 5000 0.00135-29.33
Decibel Units and the Log Scale Taking the log gives us the exponent: ower Output [dbm] [ ] = 10log10 1mW dbm 125 mw, 100 khz Signal in Cu Wire 20.0 10.0 0.0-10.0-20.0-30.0 0 1000 2000 3000 4000 5000 6000 Wire Length [m] Length of ower at ower at fiber output output [m] [mw] [dbm] 500 33.37531 16.7385 1000 12.78708 10.8872 1500 4.360613 5.0379 2000 1.054817 0.2855 2500 0.363009-4.6164 3000 0.141381-9.5928 3500 0.034186-13.2910 4000 0.011437-19.3516 4500 0.003621-23.5089 5000 0.001351-29.9098
Decibel Units and the Log Scale Summary: Decibel units allow you to see the same picture as a log scale on a graph The decibel value is 10X the exponent used to give the value when we write it as 10 (power) Examples: Value = 10 = 10 1.0 à db value = +10 db Value = 1 = 10 0.0 à db value = 0.0 db Value = 0.001 = 10-3.0 à db value = -30 db
Decibel Units for Loss When losses occur, we usually have out in = constant = loss ratio Range of losses is often very large, so we use a decibel scale (a log scale) Define loss in decibel units L [db] as: L 10 ( ) [ db] = 10log out in in L out Note that L [db] is positive when out in <1
Decibel Units for Loss The loss ratio out / in is often expressed as a power of 10. For example, if out in L db = 0.001 = 10 3 then the loss in decibels is ( ) ( 3 0.001 = 10log 10 ) = ( 10)( 3) 30 db [ ] = 10log10 10 = The loss in decibels is -10 the exponent Recall L [db] > 0 in the normal case where out < in. This is the case where power is lost (actual loss, not gain).
Decibel Units for Loss Usually the numbers are not so easy Suppose out = 0.0234 in then we use a calculator to get L db ( 0.0234) 16.3 db [ ] = 10log10 = Note 16.3 is 10 the exponent, since 0.0234 = 10 1.63
Decibel Units for Loss If we have a value in decibel units, and we want to know the value in linear units (i.e., as a ratio), then we solve for the ratio: L 10 ( ) [ db] = 10log out in ( ) [ db] - 10 = log out in L 10 10 L That is [ db] 10 ( ) = 10 out in 10 log 10 = 10 out in ( 10) L[ db ] = out in
Decibel Units for ower ower is measured in milliwatts, or mw ower can be given in decibel units [dbm], as a ratio of power relative to 1 mw [ ] = 10log10 1mW dbm We say is given in linear units We say [dbm] is in decibel units
Decibel Units for ower ower may also be measured in watts, W Decibel unit power relative to a Watt is [dbw], as a ratio of power relative to 1 W [ ] = 10log10 1W dbw The dbw units are less common than dbm units
Decibel Units for ower [ ] = 10log10 1mW dbm We can solve for here as follows =10 dbm log 10 1mW ( ) [ ] ( ) [ ] 10 log 10 1mW dbm = 10 dbm = 10 = [ ] 10 log ( 1mW) 10 1mW = ( ) [ ] 1mW 10 dbm 10
Loss and ower in db Units Why bother with decibel units? à because when we put both loss and power into decibel units, loss budgeting calculations become simple addition: out = [ dbm] in [ dbm] [ db] instead of multiplication out ( ) ( ) out in in = loss in = ratio L
Loss and ower in db Units Summary: ower measured in linear units [mw] or log units [dbm] Loss occurs in any transmission medium out in = constant = loss ratio L in Range of losses is very large, so we use decibel units L[ db ] = 10log out 10 in ower can be given in decibel units [dbm], as a ratio of power to 1 mw [ dbm ] = 10log 10 1 mw = 1mW 10 Loss calculations using decibel units: out [ dbm] in [ dbm] [ db] out out = in 10 L [ db ]/10 [ ] ( ) dbm 10 = = loss ratio = L out ( out in ) in ( ) in
1 2 3 10 Derivation (Optional) LdB = 10log10 LdB 10 = log10 L 10 log10 ( ) out ( ) out ( ) in db out in = 10 = out = in L 10 db /10 4 ( ) ( ) LdB 10 out[ dbm] = 10log out = 10log in10 = 10log = 10log out in out in ( ) ( ) LdB 10 + 10log 10 in ( in ) LdB = in[ dbm] LdB = [ dbm] in [ dbm] [ db] Start with definieon of L db L Divide both sides by - 10 ower of 10 of both sides MulEply both sides by in Log of both sides
Loss budgeting in db Units Example using linear units: Suppose in Then out in =1 4000 = 0.00025 The same calculation in decibel units is easier out = 4 mw out ( ) = 0.00025 4 mw = 0.001mW = out in in [ dbm] = in[ dbm] L[ db] = 6 dbm 36 db = 30 dbm once we have all values in db units ( 1mW) = 10log (4) 6dBm in [ dbm] = 10log10 in 10 = ( ) = 10log (0.00025) 36 db L[ db] = 10log10 out in 10 =
ower in Decibel Units Be careful: decibel units are meant for situations where multiplication is the underlying operation (like loss budgeting). Don t add power levels in dbm units! Normal power addition: 1 mw + 2 mw = 3 mw In db units this looks crazy: 0 dbm + 3 dbm = 4.77 dbm à convert power to linear units before adding!
Rule of 10s, Rule of 3s Converting between decibel and linear units can be made using two simple rules Rule of 10s Works because: Rule of 3s Works because: i.e., 2 =10 0.301 ( 10) 10 10log10 = ( 2) = 3.01 3 10log10
Rule of 10s, Rule of 3s Rule of 10s dding 10dB in decibel units = multiplying by 10 in linear units Subtracting 10dB in decibel units = dividing by 10 in linear units Fractional change Change in db (or multiplier) +30 1000 +20 100 +10 10 0 1-10 0.1-20 0.01-30 0.001
Rule of 3s: Rule of 10s, Rule of 3s dding 3dB in decibel units = multiplying by 2 in linear units Subtracting 3dB in decibel units = dividing by 2 in linear units Change in db Fractional Change (or multiplier) +9 8 +6 4 +3 2 0 1-3 1/2-6 1/4-9 1/8
Rule of 10s, Rule of 3s These two rules can be combined: +13dB = 10 + 3 db 10 2 = 20 +16dB = 10 + 3 + 3 db 10 2 2 = 40 +27dB = 30 3 db 10 10 10 2 = 500 6dB = 3 3 db 2 2 = 4 14dB = 10 10 +3 +3 db 10 10 2 2 = 25 pplied to our previous example: in = 4 mw = 1mW 2 2 = 0 dbm + 3 dbm + 3 dbm out in in [ db] = 6 dbm ( 10 10 10 2 2) = 1 4000 = 0.00025 = 1 L db [ ] = 10 + 10 + 10 + 3+ 3 db = 36 db
Rule of 10s, Rule of 3s More examples: Can you see how all of these come from the 10s and 3s rules? mw dbm 100 mw +20 dbm 80 mw +19 dbm 50 mw +17 dbm 40 mw +16 dbm 25 mw +14 dbm 20 mw +13 dbm 10 mw +10 dbm 8 mw +9 dbm 5 mw +7 dbm 4 mw +6 dbm 2.5 mw +4 dbm 2 mw +3 dbm 1 mw 0 dbm mw dbm 1 mw 0 dbm 0.5 mw - 3 dbm 0.4 mw - 4 dbm 0.25 mw - 6 dbm 0.2 mw - 7 dbm 0.125 mw - 9 dbm 0.1 mw - 10 dbm 0.05 mw - 13 dbm 0.04 mw - 14 dbm 0.025 mw - 16 dbm 0.02 mw - 17 dbm 0.0125 mw - 19 dbm 0.01 mw - 20 dbm
Review - SNR SNR = Signal to Noise Ratio Defined as ratio of signal power to noise power Usually given in decibel units: e.g., SRN = 20 db means the noise power is 1% of signal strength Example: S = 1 mw, N = 0.1 mw Total power is S + N = 1 + 0.1 = 1.1 mw = 1.288 db SNR = 10 (as a ratio), yielding SNR = 10 db in db units SNR calculation in db units uses subtraction: SNR = S [db] N [db] = 0 dbm (-10 dbm) = 10 db Note: noise power occurs as white noise usually at all frequencies. Therefore noise power depends on the range of frequencies sent to the receiver. This is one reason filtering is so important.
dditional Topics Change of base formula for logarithms ttenuation in guided media ttenuation coefficient (graduate students only)
Change of Base Let X = = B Q then log B X = Q and log X = so we can write = Q log X = log B = Qlog B = ( log X )( log B) B and solving for log B X: log X = B log log X B This is the change- of- base formula, showing how to go from base B to base.
ttenuation For guided media such as wires and optical fiber loss in decibels L [db] is proportional to distance d traveled in the medium We define the attenuation as this proportionality constant L db = [ ] d where the units on are [db/km]
ttenuation The fact that decibel loss is proportional to the length of a wire makes sense Suppose an certain length of wire has a loss ratio of 10 Then the loss is 10 db in out = 0.1 in Now two lengths will have a loss ratio of 100, or 20 db 1 10 in 1 10 1 10 out = 0.01 in
ttenuation Losses in decibel units therefore add up in[db] 10 db out[db] = in[db] 10 db in 1 10 out = 0.1 in DD LOSSES IN DECIBELS in[db] 10 db 10 db out[db] = in[db] 20 db in 1 10 1 10 out = 0.01 in MULTILY LOSS RTIOS
ttenuation Case of 5 sections in a row, each with 10 db loss in[db] 10 db 10 db 10 db 10 db 10 db out[db] in 1 10 1 10 1 10 1 10 1 10 out out[db] = in[db] 50 db out = 0.00001 in
ttenuation vs attenuation coefficient Loss of signal power in guided media such as wires or optical fiber is exponential ( ) ( ) αx We may write E x = E0e sin kx ωt where E is the electric field strength, and x is the distance traveled in the medium The electric field strength depends exponentially on x The negative sign means E decreases with increasing distance
ttenuation vs attenuation coefficient Since power is proportional to E 2, the loss ratio is 2 out E 2αx L = = = e 2 E in 0 Here the oscillating part, sin(kx wt) has been dropped because it averages out
ttenuation vs attenuation coefficient Now we transform this into decibel units L db = 10log E E 0 2 = 10log ( 2αx e ) = 20α x log ( e) = 8.685α x So we have shown decibel loss is proportional to the distance traveled in the medium (e.g., the length of the wire)
ttenuation vs attenuation coefficient But this is the definition of attenuation = d = 8.685α d L db So we can write = 8.685α which relates the attenuation to the attenuation coefficient a
Loss, ower, and ttenuation Summary: ower measured in linear units [mw] or log units [dbm] Loss occurs in any transmission medium out in = constant = loss ratio L in Range of losses is very large, so we use decibel units L[ db ] = 10log out 10 in out = in 10 L [ db ]/10 ower can be given in decibel units [dbm], as a ratio of power to 1 mw [ dbm ] = 10log [ ] 10 1 mw = ( 1mW) 10 dbm 10 Loss calculations using decibel units: out[ ] dbm in [ ] L dbm [ db] out = out in in = loss ratio Transmission media have loss proportional to distance d, giving definition of attenuation [db/km]: L db = d out = ( ) ( ) in
Topic 1 Outline Review of quantitative aspects of networking Metric system Numbers with Units Decibel units Decibel units and log scale on a graph Loss in decibel units ower in decibel units Loss and attenuation Signal-to-noise ratio Waves and Signals Signals in Time Frequency Content mplitude, eriod and hase Waves in Space Traveling Waves EM Waves
Review of Waves Waves and Signals Frequency Spectrum mplitude, frequency, period, phase Moving Waves dding Waves: Superposition Modulating a Wave
Waves and Signals The signals we send in a communications system can be described as waves nalog data: udio (voice, music) Digital data: computer files, digitized images, video, or digitized sound 1000100110100111001111101001111010011000011101100
Waves and Signals The signal is usually processed as a voltage in electronic circuitry This signal is manipulated in the electronics and finally amplified and transmitted through a medium Copper wire the signal is represented directly as a voltage on the wire Optical fiber the signal is used to modulate a laser or LED light source The atmosphere (wireless) the signal modulates an RF carrier signal and is transmitted into the air using an antenna
Signals in Time Most signals of interest have complex variation in time s an example, consider the wave produced by your voice We write the signal as a function of time s(t) udio signal for This is a test T h i s i s a t e s t t http://audacity.sourceforge.net/
Waves and Signals Stereo This is a test http://audacity.sourceforge.net/ See www.falstad.com for some demos
Frequency Content ny signal can be considered to be made up of a superposition (or summation) of many sine waves of different frequencies This decomposition into individual sine wave components allows signals to be represented by their frequency content à s(f) n example is the familiar bars view in an mp3 music player
Frequency Content Music visualization in an mp3 music player t f The wave view shows s(t) The bars view shows s(f) s(t) is called the frequency spectrum of the signal
mplitude, eriod, hase fter decomposition, we consider just one frequency component at a time: single frequency wave is a sinusoid function (either a sine or cosine) ( ) = sin( 2π ft +ϕ) = sin 2π t s t T +ϕ where t = time, = amplitude, f = frequency, T = period, and φ = phase at time t = 0 Recall the sine function is periodic with period 2π
mplitude, eriod, hase Why the 2πft? Note the function sin(t) has period 2π So as t goes from 0 to 2π, the function goes through one period s t goes from 0 to T, 2πft increases by 2π, since T = 1/f t 2πft = 2π T s(t) 1.5 1 0.5 0-0.5-1 - 1.5 s(t) = sin(t) 0 2 4 6 8 ( t) = sin( π ft +φ) s 2 t
mplitude, eriod, hase Example of period T = 4 Then f = 0.25 ( ) t π ft = 2π 0.25 t = 2 So when t = 4, 2 π π( 0.25)( 4) π 2 πft = 2 = 2 s(t) 4 2 0-2 - 4 s(t) = sin(2πft) 0 2 4 6 8 t
mplitude, eriod, hase Example of period T = 4 Then f = 0.25 ( ) t π ft = 2π 0.25 t = 2 So when t = 4, 2 π π( 0.25)( 4) π 2 πft = 2 = 2 What is the amplitude of the wave shown? s(t) 4 2 0-2 - 4 s(t) = sin(2πft) 0 2 4 6 8 t
mplitude, eriod, hase Example of period T = 4 Then f = 1/T = 0.25 ( ) t π ft = 2π 0.25 t = 2 So when t = 4, 2 π ft π( 0.25)( 4) π nswer: = 3 The function can be written 2 π = 2 = 2 What is the amplitude of the wave shown? s(t) 4 2 0-2 - 4 s s(t) = sin(2πft) 0 2 4 6 8 ( t) = 3sin( 0.5π t) t
mplitude, eriod, hase What is the amplitude and period of the wave shown? nswer: = 2, T = 2 The function can be written s( t) = 3sin( π t) s(t) 2.5 2 1.5 1 0.5 0-0.5-1 - 1.5-2 - 2.5 s(t) = sin(2πft) 0 1 2 3 4 5 6 7 8 t
mplitude, eriod, hase What is the amplitude and period of the wave shown? nswer: = 2, T = 4/3, f = 0.75 The function can be written s(t) 3 2 1 0-1 - 2-3 s(t) = sin(2πft) 0 2 4 6 8 t s ( t) = 2 sin( 2π ( 0.75) t) = 2sin( 1. 5π t)
Waves in Space Consider a wire stretched along the x -axis with a signal on it: if you take a snapshot of the electrical wave at a fixed instant in time, you have a voltage that is a function of the length x along the wire. In other words, you have a wave in space rather than a wave in time. We can write this as 2πx s( x) = sin( kx + φ) = sin + φ λ 2π where k = and l is the wavelength λ This is very similar to the case of a wave in time, except we use the wavelength λ instead of the period T.
Traveling Waves Wave disturbance is a function of both space and time s ( x, t) = sin 2π = sin( kx ωt) where k x λ 2π = λ and Fundamental relationship: v = λf v = speed of the wave λ= wavelength [m] f = frequency [cycles/sec] = [Hz] t T 2 π ω = = 2πf T
Traveling Waves Fundamental relationship: v = λf v = speed of the wave λ = wavelength [m] f = frequency [cycles/sec] = [Hz] For the case of light waves in free space v = c = speed of light = 3E8 [m/s] Speed of light in the Earth s atmosphere is essentially equal to c For C current (i.e., communications signals on a copper wire), or light in glass (i.e., communications signals in optical fiber) v 2E8 [m/s]
Electromagnetic Waves Radio waves are traveling electromagnetic (EM) waves Weak electric E and magnetic H fields changing electric field creates a magnetic field, and vice versa back and forth at the speed of light!
Electromagnetic Spectrum Note the inverse relation between wavelength and frequency!
Moving Waves Wavelength and frequency calculations: Examples: 1. f = 100 MHz, c = 3E8 λ = c/f = 3E8/100E6 = 3E8/1E8 = 3 m 2. f = 2.4 GHz, c = 3E8 λ = c/f = 3E8/2.4E9 = 3E8/24E8 = 0.125 m = 12.5 cm 3. f = 1 MHz, c = 3E8 λ = c/f = 3E8/1.0E6 = 300E6/1E6 = 300 m You can almost do these in your head!
dding Waves: Superposition EM waves that arrive in the same location will add up (superimpose on one another): the electric and magnetic fields simply add up to a net field strength The fields may add up or may tend to cancel: Constructive interference Destructive interference We will see this is the origin of multipath interference EM waves are polarized think of two possible polarization directions: horizontal, and vertical