Comp [34]49 Week 3, LT 412 * bandwidth note * Antenna losses * noise * multipath * Ch 6: digital modulation of an analog carrier ====================================================================== Whatever encryption you can install to ensure authentication and message integrity, you can NOT ensure wireless network availability. It is trivial to "jam" a wireless zone by injecting collisions. ====================================================================== Bandwidth note: Another way to explain why an information-carrying signal needs bandwidth: 1. All signals are a combination of sine waves at different frequencies. 2. If there is only one frequency, your signal is a perfect sine wave, which cannot carry any data. 3. Therefore, if you do carry data, you have to have a RANGE of frequencies. ====================================================================== Look at ifconfig iwconfig iwlist scan Connection means to set the ESSID or AP. ESSID: allow host to connect to AP with best signal. ====================================================================== Antenna gain is generally a measure of non-isotropicness. Antenna losses, continued ====================================================================== Antenna calculations Pt = transmitted power Pr = received power all antennas are perfect isotropic d = distance away Pr/Pt = L^2 / (4pi*d)^2 (done week 2; inverted from book) or Pr/Pt = (L/d)^2 / (4pi)^2 = 1/(4pi*D)^2, where D =d/L is distance in wavelengths Consequence: (week 2) Loss is inverse-square Loss is much faster (by a constant) for higher wavelengths Ratio applies when d is big enough; when 4pi*d = L (d = L/4*pi) then formula says no loss. This is too close to be meaningful, though. Decibel loss example: ==================== Loss of 2.4 GHz (L=12.5 cm) for (actually for D=7.96 & multiples; this makes 4piD = 100) d D Pr/Pt dB 1 m 8 1/10,0000 -40 2 m 16 -46 5 m 40 -54 10 m 80 1/10^6 -60 20 m 160 -66 50 m 400 -74 100m 800 1/10^8 -80 ======== At first glance, the formula loss ratio Pr/Pt = const * L^2 / d^2 makes it look like the loss ratio gets smaller as L gets smaller; ie higher frequencies are less efficient. But this is only because the antenna itself is getting smaller. When we take into account receiver/transmitter antenna gains, Gr & Gt, we get Pr/Pt = Gr*Gt*L^2 / (4pi*d)^2 This works out to the following, where Ar and At are the effective areas: Pr/Pt = Ar*At / (L^2 d^2) For the same effective areas (which means keeping antenna size in rough proporition to wavelength), doubling the wavelength (halving the freq) now means a fourfold LOSS in power ratio. Higher frequency is better! =========================================================================== =========================================================================== Absorbtion: Water: peak absorbtion at 22 GHz; not significant below 15GHz Oxygen: peak at 60 GHz; not significant below 30 GHz Rain fade: scattering due to rain or fog *droplets* This is often very significant. =============== Noise: THERMAL NOISE Thermal noise is spread throughout the spectrum. We measure thermal noise in watts per Hz of bandwidth. N0 watts/Hz = kT T = temp in Kelvins, K k = Boltzmann's constant: 1.38 E-23 Joules/K Particularly an issue for satellites. INTERMODULATION NOISE comes when two signals mix in a NONLINEAR fashion. linear: sin(2pi*f1*t) + sin(2pi*f2*t) Here we get exact separation. But if there are nonlinear parts, we get noise, especially at frequencies f1+f2 and f1-f2. Nonlinear mixing is most common in amplifiers/repeaters. CROSSTALK: when wires are close. Signal interference is universal in w-fi ISM band, though the term "crosstalk" is not always used. IMPULSE NOISE The microwave ========================================================= Eb/N0: Energy/bit divided by noise/Hz Eb = power rate in watts * time for one bit units: joules Higher power => faster transmission rate, but Eb is independent of that! In general, the bit error rate (BER) decreases with increasing Eb. In fact, BER decreases with increasing Eb/N0 (increasing Eb, or decreasing N0) Note Fig 5.9 has no units, and no description of what encoding technique is used. Another issue is distance. In the usual Eb/N0 formulation, increasing distance doesn't change the radiated power, but it greatly decreases the *received* Eb energy. Noise typically is fixed. ===================== Multipath propagation: section 5.4 Fig 5.11: reflection, scattering, diffraction around a corner. Fast and Slow fading Fast fading: on the order of 1/2 L. Slow fading: due to multipath propagation, generally. Figure 5.12 on what multipath propagation does to the received signal pulses; this is "intersymbol interference". Figure 5.13: fast and slow fading. Slow fading can also be FLAT or SELECTIVE, referring to the frequency spectrum. Three fading models: 1. AWGN: simple noise, not really fading. 2. Rayleigh: no distinct dominant path (eg Line of Sight, or LOS). Difficult to deal with. 3. Rician, or Rice, fading K = dominant-path power / scattered-path power K = 0: Rayleigh case K = infinity: AWGN case Fig 5.14: Eb/N0 curves for fading: AWGN, Rician (K=4,16), Rayleigh ========== How to cope 1. Forward Error Correction. We will get to these later. Simple example: 2-D parity note that the ratio of FEC bits / data bits here is << 1. Often it is ~2-3! 2. Adaptive equalization: keep running sum of SE = C(-2)S(t-2dt) + C(-1)S(t-dt) + C0 S(t) + C1 S(t+dt) + C2 S(t+2dt) can assume C(-2) + C(-1) + C(0) + C(1) + C(2) = 1.0 See circuit block diagram in Fig 5.15 Coefficients are set using a "training sequence"; these may be sent rather frequently. 3. Diversity: space, frequency, time. Space: multiple antennas. Not so practical. Frequency: spread spectrum; to be addressed later Time: goal is to spread blocks so one burst affects more blocks, but fewer bits/block. Then the FEC on each block can recover! Fig 5.16a: TDM spreads errors over multiple channels Fig 5.16b: block interleaving. Blocks are A2-A5, A6-A9, ...A[N]-A[N+3]... We interleave so any one block has at worst 1/4 (one sub-block) in any one burst. =========================================================================== =========================================================================== Chapter 6: symbols v bits: one SYMBOL can encode several bits. bps: bit rate baud: symbol rate 56K modem example: 7 bits at a time, sent at rate of 8,000 baud The more bandwidth, the better the data rate. The carrier CAN be at a frequency comparable to the bit rate, but typically bandwidth = O(bitrate), and for legal reasons bandwidth needs to be relatively small in proportion to the carrier frequency. Hence typically carrier_freq >> bit_rate 6.3: sending analog data on a carrier: AM: note DC component fig 6.11 bandwidth diagram FM & PM: fig 6.13 FM: low points in data signal are low-freq places PM: lowest-freq places are those where data signal is decreasing fastest. ==================================================== 6.2: sending digital data on a carrier ASK, BFSK, BPSK: quick overview MFSK: use more frequencies in FSK. Selecting one of four frequencies sends 2 bits. p 133: note that the frequencies are actually spaced at difference 2fd. fc = carrier frequency fi = ith frequency = fc + (2i - 1 - M)*fd , i = 1..M L: bits/symbol M = 2^L = # of different frequencies T = time for one bit Ts = L*T = time for one symbol = time to hold one frequency Stallings has the actual frequencies arranged symmetrically around fc, the carrier. eg fc - 3fd, fc - fd, fc + fd, fc + 3fd. How close can two frequencies f1, f2 be? You need a period Ts long enough so that f1 and f2 differ by at least one full cycle by the end of Ts. Number of cycles of f1 in interval Ts: Ts*f1 Difference: Ts(f1-f2). Need this at least 1, or (f1-f2) = 1/Ts. Min separation between frequencies is 2fd, so this means 2fd = 1/Ts. Example 6.1. Note that fc = 250kHz, and data rate = 150 Kbps, and nominal bandwidth = 150 kHz. Fig 6.4 ===================================== BPSK: changing phase by pi is the same as multiplying signal by -1. Changing by pi/2 is the same as replacing sin with cos, and vice-versa. Decoding BPSK: subtract local oscillator, A cos 2pi*fc*t Get zero or doubled signal. Differential PSK: QPSK: use 4 phase angles: 00 -3/4 pi 01 3/4 pi 10 -1/4 pi 11 1/4 pi fig 6.7 stuff: QPSK can be seen as alternating In-phase (I) / Quadrature (Q) bits Note that fig 6.7 in the book (at least my printing) is WRONG: Explain why OQPSK is a good thing: each individual phase change is by at most pi/2 but rate of phase changes is twice as fast. =========== Note on modulation: it can be hard to tweak microwaves that fast! =========== MPSK: old 9600-bps modems used 12 phases. four phases had two possible amplitudes. so there were 16 possible symbols. symbol rate (baud rate) was 2400 baud =================================================== Performance: bandwidth, Eb/N0 R = signal bit rate ASK bandwidth is (1+r)R, 0