0% found this document useful (0 votes)
16 views78 pages

Mod 1 Phy F24

Uploaded by

woshijuruo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views78 pages

Mod 1 Phy F24

Uploaded by

woshijuruo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 78

04834480/04802056

Computer Networks (Honor Track)

Module 1
PHY Concepts & Wireless Fundamentals

Chenren Xu(许辰人)
Fall 2024

 Includes material from lectures by David Wetherall (UW), Peter Steenkiste (CMU), Kate Lin (NCTU)
and Kyle Jamieson (Princeton); Jointly prepared with Kenuo Xu 1
Overview
• Beginning to work our way up starting • Concerns how signals are used to transfer
with the physical layer message bits over a link
- Wire etc. carry analog signals
Application
- We want to send digital bits
Transport
Network 10110… …10110
Link
Physical
Signal

• Goals: A Computer Science View of Communication Engineering


- Not to turn you into electrical engineers, but appreciate the substrate foundation
- But why we still care about?
▪ Generalist and hacker’s playground: 5/6G, IoT, …
- Understand how (state-of-art) communication technology is conceptually done
- Understand the tradeoffs involved in speeding up the transmission
2
Topics
• Properties of media Signal

10110… …10110
- Wires, fiber optics, wireless
• Wireless communication
- Signals processing and radio propagation
• Digital Communication
- Representing and communicating bits
• Multiplexing
- (O)FDM, MIMO, spread spectrum, CDMA

3
Simple Link Model
• Abstraction of a physical channel
- Rate in bits/second
▪ Or bandwidth (in CS), capacity, speed
- Delay in seconds, related to length

Message

Delay D, Rate R

• Use powers of 10 for rates, 2 for storage


- 1 Mbps = 1,000,000 bps, 1 KB = 1024 bytes
• The amount of data in flight is the bandwidth-delay (BD) product
- Measure in bits

4
Message Latency
• Latency: the delay to send a message over a link
- Transmission delay: time to put M-bit message “on the wire”
▪ T-delay = M (bits) / Rate (bits/sec) = M/R seconds
- Propagation delay: time for bits to propagate across the wire
▪ P-delay = Length / speed of signals = 3L/2c = D seconds
➢ Limited by the refractive properties of the glass fiber
- Combining the two terms we have: Latency = M/R + D
- Another two considerable components:
▪ Processing delay: time take to process the packet header
▪ Queuing delay: time the packet spends in queuing buffer
• Examples:
- “Dialup” with a telephone modem: - Broadband cross-country link:
▪ D = 5 ms, R = 56 Kbps, M = 1250 bytes; ▪ D = 50 ms, R = 10 Mbps, M = 1250 bytes
▪ L = 5 ms + (1250 × 8)/(56 × 103) sec = 184 ms! ▪ L = 50 ms + (1250 × 8) / (10 × 106) sec = 51 ms

A long link or a slow rate means high latency! 5


Media propagates signals that carry bits of information
• Wireline – Twisted pair • Fiber Optic
- Commonly used in LANs and telephone lines - Long, thin, pure strands of glass
▪ Twists reduce radiated signal ▪ Enormous bandwidth over long distances
Optical fiber

Light source Light trapped by Photo-


(LED, laser) total internal reflection detector

• Wireline – Coaxial Cable - Two varieties: multi-mode (shorter links, cheaper)


- Better shielding for better performance and single-mode (up to ~100 km)

One fiber Fiber bundle in a cable

6
Media propagates signals that carry bits of information
• Wireless
- Sender radiates signal over a region
▪ In many directions, unlike a wire, to potentially many receivers
▪ Nearby signal (with spectral overlap) interfere at a receiver, when without centralized coordination
- In radio communication systems
▪ EM energy is coupled to the propagation medium by an antenna
➢ Antenna must be longer than 1/10 of λ
➢ E.g., a AM radio station with 1 MHz required an antenna of 30+ m

Radio Visible Light


Ultrasonic
Frequency and Infrared

7
Use Frequency Wavelength Frequency band

Ultraviolet
1015 Hz
Experimental 10-6 m Visible light

1014 Hz Infrared

Experimental
Navigation 100 GHz
Millimeter waves
Satellite to satellite 1 cm
Microwave Microwave relay Super High Frequency
radio 10 GHz (SHF)
Earth-satellite
10 cm
Radar
Ultra High Frequency
1 GHz (UHF)
UHF TV
1m
Mobile, aeronautical
Shortwave VHF TV and FM Broadcast Very High Frequency
100 MHz
radio Mobile radio 10 m
(VHF)
Business High Frequency
Amateur radio 10 MHz
(HF)
International radio 100 m
Citizen’s band Medium Frequency
1 MHz (MF)
AM broadcast 1 km
Longwave Low Frequency
radio Aeronautical
100 KHz (LF)
Navigation
10 km
Radio teletype
Very Low Frequency
10 KHz (VLF)
100 km
Audio band
1 KHz

8
Spectrum Regulation
• Microwave, e.g., 4G, and unlicensed (ISM)
frequencies, e.g., WiFi, are widely used for
802.11b/g/n 802.11a/n/ac
computer networking

9
Topics
• Properties of media
- Wires, fiber optics, wireless
• Wireless communication
- Signals processing and radio propagation
• Digital Communication
- Representing and communicating bits
• Multiplexing
- (O)FDM, MIMO, spread spectrum, CDMA

10
Signal fundamentals
• Data: entities that convey meaning or information
- Analog: continuous values in some interval, e.g., temperature, and pressure
- Digital: discrete integers, e.g., text, integers, character strings
• Signals: electric or electromagnetic representations of data
- Analog: a continuously varying electromagnetic wave that may be propagated over a variety of media,
e.g., wire, fiber optic cable, atmosphere or space
- Digital: a sequence of voltage pulses that may be transmitted over a wire medium
▪ Less susceptible to noise interference, but suffer more from attenuation
• Transmission: communication of data by the propagation and processing of signals
- Analog: transmitting analog signals without regard to their content
▪ Cascaded amplifiers boost signal’s energy for longer distances but cause distortion and amplifies the noise, can’t recover
➢ E.g., telephone and recorder
- Digital: assumes a binary content to the signal
▪ Can recover from noise and distortions: regenerate signal along the path by demodulating and remodulating

11
Signal fundamentals – Analog/Digital Comparison

12
Signal fundamentals – Sine Wave
• Frequency, amplitude and phase Phase = 45°
- Asin(2πft+θ) Amplitude
▪ θ = Phase
▪ Period T = 1/f
λ Distance
▪ A = Amplitude
▪ Frequency is measured in cycles/sec or Hertz

• Wavelength = λ
- Distance occupied by one cycle
- Distance between two points of
corresponding phase in two consecutive
cycles
- Assuming signal velocity v
- λ = vT, or λf = v
13
Signal fundamentals – Fourier Analysis
• A signal over time can be represented by its frequency components.
• Fourier series:

=
EE: Bandwidth = width of frequency band, measured in Hz
CS : Bandwidth = information carrying capacity, in bits/sec
Signal over time Weights of harmonic
frequencies We use Data Rate from now on for CS’s bandwidth

如果看了此文你还不懂傅里叶变换,那就过来掐死我吧
https://zhuanlan.zhihu.com/p/19763358

https://en.wikipedia.org/wiki/Fourier_transform#/media/File:Fo
14
urier_transform_time_and_frequency_domains_(small).gif
Signal fundamentals – Bandwidth-limited Signals
• Less bandwidth degrades signal (less rapid transitions)

Lost!

Lost!

Lost!

A binary signal and its root-mean-square Fourier amplitudes.


This is followed by successive approximations to the original signal.

15
Signals over Wire
• What happens to a signal as it passes over a wire?
- The signal is delayed (propagates at ⅔c) Sent signal:

- The signal is attenuated (goes for m to km) Attenuation:

- Frequencies above a cutoff are highly attenuated Bandwidth:

- Noise is added to the signal (later, causes errors) Noise:

16
Signals over Fiber
• Light propagates with very low loss in three very wide frequency bands
- Use a carrier to send information

A ratio between signal powers is


expressed in decibels:
Attenuation

decibels (db) = 10log10(P1 / P2)


(dB/km)

Power ratio 1000 100 10 4 2 1.26 1


dB 30 20 10 6 3 1 0

Wavelength
(μm)

17
Signals over Wireless
• Signals transmitted on a carrier frequency
• Spread out and attenuate faster than 1/d 2
• Propagation model is complex, depends on environment
• Why use wireless
- Supports mobile users: move around, remote control
• No need to install and maintain wires
- Reduces cost and simplifies deployment

18
But what is hard/different about wireless?
• Shared medium
- Uncoordinated for concurrent user access and
contention

strength
Signal
• Unguided propagation and path loss
- Energy is distributed in many directions in space
• Interference TxA RxD RxC TxB Distance

- Intra/inter technology
- Hint: throughput does not scale as more Tx-Rx pairs
• Shadowing and multipath fading
- Indoor complexities
- Client/environment mobility
▪ Doppler shift and temporary fading

19
Wireless Signal Propagation
• What do we use to send and receive signal (data) in wireless media?
- Antenna in radio channel
- LED-Photodetector in optical channel
- Speaker-Microphone in sound channel
• We have to consider many things about wireless channel:
- Path Loss
- Delay distortion
- Interference
- Multipath
- Noise
- ……
We primarily focus on radio-based wireless communication
20
Radio Propagation Basics
• A wave of energy
- Think of it as energy that radiates from an antenna and is picked up by another antenna
▪ Helps explain properties such as attenuation
▪ Density of the energy reduces over time and with distance
▪ Receiving antennas catch less energy with distance
• Rays of energy
- Can also view it as a “ray” that propagates between two points
- Rays can be reflected
▪ We can have connectivity without line of sight
- A channel can also include multiple “rays” that take different paths, i.e., “multi-path”
▪ Helps explain properties such as signal distortion, fast fading, …
• Electromagnetic signal
- Propagating signal has an amplitude and phase – complex number representation
- … and that changes over time with a certain frequency

21
Antenna Concepts
• An electrical conductor which radiate or collect electromagnetic energy
- Transmitter converts electrical energy to electromagnetic waves
▪ Conductor that carries an electrical signal and radiates an RF signal
▪ The RF signal “is a copy of” the electrical signal in the conductor
- Receiver converts electromagnetic waves to electrical energy
▪ RF signals are “captured” by the antenna and create an electrical signal in the conductor

• Efficiency of the antenna depends on its size, relative to the signal wavelength
- E.g., quarter of a wavelength (𝛌/4) for max efficiency

Omnidirectional radiation pattern Directional radiation pattern


(e.g., WiFi) (Pre-5G Cellular)
22
Antenna Concepts
• Antenna could be time-multiplexed for transmission and reception
- Usually work in half-duplex
▪ Full-duplex is possible, but hard though

• Antenna Gain (dBi) = Power at particular point / Power with Isotropic


- Not refer to obtaining more output power than input power but rather to directionality

Parabolic antenna (70 dBi) Horn antenna (30 dBi)

23
Impacts of Obstacles
• Reflection: surface large relative to wavelength of radio wave
- May has amplitude attenuation and phase shift from original
▪ Depends on intrinsic impedance, incident angle, and electric field polarization
- May cancel out original or increase it
• Diffraction: edge of impenetrable body that is large relative to 𝝀
- Radio wave bends or deviates in the edge of a large object
- May receive signal even if no line of sight to transmitter
• Scattering: signal radiation by an obstacle that is small relative to 𝝀
- E.g., furniture, lamp posts, street signs, foliage, etc.
• Refraction: deflection in passing through the medium of varying density
- Speed of EM signals depends on the density of the material (captured by
refractive index)
▪ Vacuum: 3 × 108 m/sec; Denser → slower
denser
- Explains “bending” of signals in some environments
▪ E.g. sky wave propagation: signal “bounces” off the ionosphere back to earth
• See “3D Printing Your Wireless Coverage” for detail of Ray Tracing
24
Fresnel Zones Line of Sight Reflected signal

• Sequence of ellipsoids centered around the LoS path between


𝜋/4 (45°)
a transmitter and receiver
• The zones identify areas in which obstacles will have different
impact on the signal propagation 𝜋/2 (90°)
- Capture the constructive and destructive interference due to the
reflected signal caused by obstacles
▪ Can be potentially used for position tracking 𝜋 (180°)
• Zones create different phase differences between paths
- First zone: 0 – 𝝅/2
- Second zone: 𝝅/2 – 3𝝅/2 3𝜋/2 (270°)
- Third zone: 3𝝅/2 – 5𝝅/2,
- ...
7𝜋/4 (315°)
- Odd zones create constructive interference, even zones destructive
▪ Assuming there is no phase shift after reflection
25
In short, propagation degrades radio wave signals
• Attenuation in free space: signal gets weaker as it travels over longer distances
- Radio signal spreads out – free space loss
- Refraction and absorption in the atmosphere
- Delay distortion
▪ For a signal with a given bandwidth, the velocity tends to be highest near the center frequency of the band
• Obstacles: weaken signal through absorption or reflection
- Reflection redirects part of the signal
• Multi-path effects: multiple copies of the signal interfere with each other at the receiver
- Similar to an unplanned directional antenna
• Mobility: moving the radios or other objects changes how signal copies add up
- Node moves ½ wavelength → big change in signal strength
▪ Relative movement from the ambient reflector

26
Multipath Effect
• Receiver receives multiple (delayed) copies of the signal,
each following a different path +
• Copies can either strengthen or weaken each other
=
- Depends on whether they are in or out of phase
- Small adjustments in location or orientation of the wireless Frequency of
devices can result in big changes in signal strength 900 MHz or
wavelength of
▪ Changes of half a wavelength affect the outcome
about 33 cm
➢ E.g. 2.4 GHz → 12 cm
• Multipath Power Delay Profile
- Delay Spread 𝝉𝒎𝒂𝒙 = Maximum delay after which the
received signal becomes negligible, often in nanoseconds
▪ Long path from multiple reflections
• One symbol interferes with subsequent symbols
- When the delay spread is beyond its allotted time interval
- Larger difference in path length or higher bit rate causes
higher chance of inter-symbol interference (ISI)
27
Other Fading Factors
• Inter-symbol interference • Frequency-selective fading • Doppler Shift
- A form of distortion of a signal - As the nearby environment - If the transmitter or receiver or
in which one symbol interferes moves, the path changes are both are mobile, the frequency
with subsequent symbols relevant to wavelength, i.e., of received signal changes:
fading is frequency selective ▪ Moving towards each other →
- Much more of a concern for Frequency ↑
▪ Moving away from each other →
wide-band channels
Frequency ↓
Tx ▪ Frequency difference fD =
Time velocity/wavelength = vf/c
Rx

28
Large-scale Fading: path loss, shadowing
• Free-space path Loss Model
- 𝑃 𝑑 = 𝑃 (𝑑0)(𝑑0 /𝑑)𝑛
- Path loss distance component n depends on environments:
▪ 2 for free space, 3 for office, higher if more/thicker obstacles
• With shadow effect consideration in log scale
- 𝐿(𝑑)𝑑𝐵 = 𝐿0 + 10𝑛𝑙𝑜𝑔(𝑑0/𝑑) + 𝑋𝜎
▪ 𝑋𝜎 ~𝑁(0, 𝜎), 𝜎 ranges 4~13 dB, measured over a wide range of
locations and transmitter-receiver separation
▪ Widely used in indoor localization research …
• Other factors
- Objects absorb energy was the signal passes through them
▪ Degree of absorption depends strongly the material
- Absorption of energy in the atmosphere
▪ Very serious at specific frequencies, e.g., water vapor (22 GHz)
and oxygen (60 GHz)
▪ Obviously objects also absorb energy

29
Link Budget Analysis
• Accounting all losses and gains from the transmitter, the medium, to the receiver
• Key question: how to balance the communication range, transmission power and sensitivity (cost)

-74

30
Wireless Channel Model
1. Transmits signal x: 5. Doppler effects
modulated carrier at frequency distorts signal
f
T Radio R Radio

2. Signal is 3. Multi-path + 4. Noise is 6. Receives


attenuated mobility cause fading added distorted signal y

• Power profile of the received signal can be obtained by convolving the power of the transmitted
signal with the impulse response of the channel.
• Convolution in time = multiplication in frequency
• Signal x, after propagation through the channel H becomes y :
- 𝑦 𝑓 = 𝐻 𝑓 𝑥 𝑓 + 𝑛(𝑓) the noise

channel response/state, a (time-variant) complex number (matrix) that captures attenuation, multipath, … effects.

• Receiver needs a certain SNR to be able to decode the signal


- Required SNR depends on coding and modulation schemes
31
Bandwidth, Data Rate and Channel Capacity
• Bandwidth (B): the bandwidth (Hertz) that can be transmitted is constrained by the transmission
system including transmitter, the nature of the transmission medium or channel, and receiver
- Signal Bandwidth: the bandwidth of the transmitted signal or the range of frequencies present in the signal,
as constrained by the transmitter
- Channel Bandwidth: the range of signal bandwidths allowed by a communication channel without significant
loss of energy (attenuation)
• Channel Capacity or Maximum Data rate: the maximum rate (in bps) at which data can be
transmitted over a given communication link, or channel
• The greater the (spectral) bandwidth, the greater cost, and carrying more capacity of the signal
- If a signal can change faster, it can be modulated in a more detailed way and can carry more data
- The narrower the bandwidth, the greater the distortion (errors)!
• Noise: average level of noise over the communications path
• Bit Error Rate: rate at which errors occur (%)
- Error = transmit 1 and receive 0; transmit 0 and receive 1
32
Noise
• Thermal/white noise: caused by thermal agitation of electrons, present in all
electronic devices and transmission media, and is a function of temperature
- Noise Power Spectral Density 𝑁0 = 𝑘𝐵 𝑇, where 𝑘𝐵 is Boltzman’s constant = 1.38 × 10−23 Joules
- For a band of width B: Noise Power = 𝑁0 𝐵 = −174 + 10𝑙𝑜𝑔10 (𝐵) dBm at 300K
- Can’t be eliminated, places an upper bound on communications system performance
• Receiver noise: amplifiers and mixers add noise.
- Noise generated before the amplifiers also gets amplified.
• Crosstalk: picking up signals from other source-destination pairs
• Impulse noise: irregular pulses of high amplitude and short duration
- Interference from various RF transmitters, lighting, etc.
- Should be dealt with at protocol level

33
Decibels and Signal-to-Noise Ratio
• A ratio between signal powers is expressed in • Ratio of the power in a signal to the power
decibels (db) = 10log10(P1 / P2) contained in the noise that is present at a
• Used in many contexts: particular point in the transmission
- The loss of a wireless channel - Typically measured at a receiver

- The gain of an amplifier • Signal-to-noise ratio (SNR, or S/N)


• Note that dB is a relative value. 𝑆𝑁𝑅 𝑑𝐵 =10𝑙𝑜𝑔10
𝑠𝑖𝑔𝑛𝑎𝑙 𝑝𝑜𝑤𝑒𝑟
𝑛𝑜𝑖𝑠𝑒 𝑝𝑜𝑤𝑒𝑟
Power ratio 1000 100 10 4 2 1.26 1
dB 30 20 10 6 3 1 0 • A high SNR means a high-quality signal
• Can be made absolute by picking a reference point • Low SNR means that it may be hard to
“extract” the signal from the noise
- Decibel-Watt (dBW) – power relative to 1 W
- Decibel-milliwatt (dBm) – power relative to 1 mW
• SNR sets upper bound on achievable
▪ Most commonly used in radio RSS measurement data rate

Signal strength (S) and noise strength (N) – limit how many signal levels we can distinguish

34
Nyquist Capacity
• A noiseless channel of bandwidth B can at most transmit a binary signal at a
capacity 2B
- Assumes binary amplitude encoding
- No consideration of interference and noise
• More aggressive encoding increases the actual channel bandwidth (data rate).
For M levels: C = 2B log2M
- M discrete signal levels
• Example: consider a voice channel being used, via modem, to transmit digital
data. For B = 3100 Hz:
- C = 2B = 6200 bps.
- For M = 8, C = 18,600 bps for a bandwidth of 3100 Hz
• Factors such as noise can reduce the capacity
35
Claude Shannon (1916-2001)
• Father of information theory
- “A Mathematical Theory of Communication”, 1948
▪ http://www.math.harvard.edu/~ctm/home/text/others/
shannon/entropy/entropy.pdf

• Fundamental contributions to digital


computers, security, and communications
- 香农的信息论究竟牛在哪里?
▪ https://www.zhihu.com/question/27068465/answer/9
6502561
- 他告诉我们:这个世界所有的信息都可以用0和1来
表示。
▪ http://www.sohu.com/a/116162366_468636

36
Shannon Capacity
• How many levels we can distinguish depends on S/N or SNR S+N
- Note noise is random, hence some errors
0
- Shorter bits are more likely affected by a given pattern noise N
• Shannon limit is for capacity (C), the maximum information carrying rate of the 1
channel with only white noise, not including impulse noise and various types of
distortion: 2
𝑃 𝑆
- 𝐶 = 𝐵𝑙𝑜𝑔2 1 + 𝑏𝑖𝑡𝑠/𝑠𝑒𝑐 = 𝐵𝑙𝑜𝑔2 1 + 𝑏𝑖𝑡𝑠/𝑠𝑒𝑐 3
𝐵𝑁0 𝑁
▪ P is the average transmitted power and 𝑁0 is the power-spectral density of the additive noise
▪ Don’t transmit faster than that!
• Represents error free capacity
- It is possible to design a suitable signal code that will achieve error free transmission
▪ You design the code (and there is also most nothing you can do today )
• Example: Phone wire with bandwidth = 3100 Hz, (S/N)dB = 30 dB
- 10log10(S/N) = 30 → S/N = 103 = 1000
- Capacity = 3100log2(1+1000) = 30984 bps
37
Wired/Wireless Perspective
• Wires (and Fiber) Engineer SNR for data rate
- Engineer link to have requisite SNR and B
- Can fix data rate
• Wireless Adapt data rate to SNR

- Given B, but SNR varies greatly, e.g., up to 60 dB!


- Can’t design for worst case, must adapt data rate

38
Topics
• Properties of media
- Wires, fiber optics, wireless
• Wireless communication
- Signals processing and radio propagation
• Digital Communication
- Representing and communicating bits
• Multiplexing
- (O)FDM, MIMO, spread spectrum, CDMA

39
From Signals to Packets
Sender Receiver • Communication is based on sender transmitting
Packet the carrier signal
Transmission
- A sine wave with an amplitude, phase, frequency
0100010101011100101010101011101110000 - A complex value at a certain point in space and time
Packets
Header/Body Header/Body Header/Body captures the amplitude and phase
• The sender sends an EM signal and changes its
Bit Stream 0 0 1 0 1 1 1 0 0 0 1 0 0 1 0 properties over time
- Changes (amplitude, phase, frequency, or a
combination) reflect a digital signal, e.g., binary or
Digital Signal multi-valued signal
• Receiver learns the digital signal by observing
how the received signal changes
Analog Signal
- Note that signal is no longer a simple sine wave or
even a periodic signal
40
Data Communication System (A Computer Scientist View )
Information Input Output
Transmitter Channel Receiver Destination
Source Transducer Transducer

Sound, picture, Information in Information in


data, etc. electrical form Noise original form

• Information source produces required message which has to be transmitted


• Transducer converts one form of energy into another form (typically time-varying electrical signal)
• Transmitter amplifies and modulates the electrical signal in appropriate frequency range if necessary
• Channel provides a physical connection between the transmitter and receiver
• Receiver detects and demodulates the signal to reproduce the message signal in electrical form
from the distorted received signal
• Destination converts an electrical message signal into its original form

41
Digital Communication System (An Electrical Engineer’s View)

Information Source Source Channel Digital Digital Channel Source Output Output
Channel
and Input Transducer encoder encoder modulator demodulator decoder decoder Transducer signal
Transmitter Receiver

• Source encoder converts the output of either an analog or a digital source into a sequence of binary digits
• Channel encoder introduces in a controlled manner some redundancy in the binary information sequence to
increases the reliability of the received data and improve the fidelity of the received signal
• Digital modulator maps the binary information sequence into signal waveforms
• Digital demodulator processes the channel-corrupted transmitted waveform and reduces each waveform to a
single number that represents an estimate of the transmitted data symbol (binary or M-ary)
• Channel decoder attempts to reconstruct the original information sequence from knowledge of the code used by
the channel encoder and the redundancy contained in the received data
• Source decoder accepts the output sequence from the channel decoder and attempts to reconstruct the original
signal from the source

42
Coding for Digital Communication
• Source coding or data compression is concerned with the problem that given a source of information
how should messages from this source be represented such that on average the information is
conveyed using the minimum number of bits
- E.g., ASCII
• Channel or error control coding introduces extra bits into the transmitted signal to provide carefully
structured redundancy, in order to detect or correct the presence of errors in the received pattern.
- E.g., parity, CRC, Hamming codes, LDPC codes, etc.
• Line/transmission coding encodes digital data into electrical pulses for transmitting digital signals
down a transmission line, or digital baseband modulation; can be used before digital passband
modulation
- Symbol: a pulse in digital baseband transmission or a tone in passband transmission using modems
▪ Theoretical definition: a waveform, a state or a significant condition of a communication channel that persist T B
- Symbol/Modulation/Baud rate RB (baud): 1/TB
- Data rate Rb (bps): RBL = RB log2M
▪ L = # of bits per symbol
▪ M = # of different signal elements = 2 L
43
Line/Transmission Coding (Baseband Modulation)
• Let a high voltage (+V) represent a 1, and low voltage (-V) represent a 0
- NRZ (Non-Return to Zero): has additional rest state other than conditions for ones and zeros
Bits 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0

NRZ

• Can use more signal levels, e.g., 4 levels is 2 bits per symbol
11
10
01
00

• Practical schemes are driven by engineering considerations


- E.g., clock recovery

44
Clock Recovery
• Um, how many zeros was that?
- Receiver needs frequent signal transitions to decode bits
1 0 0 0 0 0 0 0 … 0
• Several possible designs
- Manchester coding, also known as phase encoding
▪ Encode data bit either low then high, or high then low, of equal time
▪ Self-clocking
➢ Signals can be decoded without the need for a separate clock signal or
other source synchronization
▪ A special case of binary phase-shift keying (BPSK)
- 4B/5B – Map every 4 data bits into 5 code bits without long
runs of zeros 1

▪ 0000 → 11110, 0001 → 01001, … 1110 → 11100, 1111 → 11101 0


1
▪ Has at most 3 zeros in a row
0
- Miller coding – at most consecutive two ones or four zeros
45
(Passband/Carrier) Modulation
• What we have seen so far is baseband modulation for wires, or baseband digital
transmission
- Signal is sent directly on a wire
• These signals do not propagate well on fiber/wireless
- Need to send at higher frequencies
• Passband/Carrier modulation carries a signal by modulating a carrier
- The process of encoding source data onto a carrier signal with frequency fc
- Carrier is simply a signal oscillating at a desired frequency compatible with the transmission
medium:

46
Digital Modulation
• Digital modulation modulates an analog carrier signal by a discrete signal
• We can modulate it by changing amplitude, frequency, or phase

NRZ signal
of bits

Amplitude
shift keying

Frequency
shift keying

Phase
shift keying

47
Amplitude-Shift Keying (ASK)
• One binary digit represented by presence of carrier, at constant amplitude

cos(2𝜋fct) binary 1
• Other binary digit represented by absence of carrier s(t) = ቊ
0 binary 0
where the carrier signal is Acos(2πfct)
TX RX
bit stream
1 0 1 1 0 1 0 1 1 0
b(t)

modulation demodulation

signal
s(t)

48
M-ASK

𝐴𝑖 cos(2𝜋fct) , 𝑖𝑓 0 ≤ 𝑡 ≤ 𝑇
• s(t) = ቊ ,
Binary
sequence
0 0 0 1 1 0 1 1
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1
where 𝑖 = 1, 2, … , 𝑀, 𝐴𝑖 is the amplitude Time
0
corresponding to bit pattern 𝑖 m (t )
(a)

• Example: 4-ASK 3
Time
4-ary 1
• High error probability signal 0
-1
- Hard to pick a right threshold -3
(b)
s (t )
3A
A
4-ASK Time
signal -A 0

-3 A T T

49
Frequency-Shift Keying (FSK)
• A bit stream is encoded in the frequency of the transmitted signal
- Two binary digits represented by two different frequencies near the carrier frequency
cos(2𝜋f1t) binary 1
s(t) = ቊ
cos(2𝜋f2t) binary 0

TX RX
bit stream 1 0 1 1 0 1 0 1 1 0

modulation demodulation

signal
s(t)

50
M-FSK

𝐴𝑖 cos(2𝜋fc,it) , 𝑖𝑓 0 ≤ 𝑡 ≤ 𝑇
s(t) = ቊ , where 𝑖 = 1, 2, … , 𝑀, 𝑓𝑐,𝑖 is the amplitude
0 , 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
corresponding to bit pattern 𝑖
• FSK requires higher bandwidth
- Minimum bandwidth requirement = Nb + Nb
- 𝑓1 − 𝑓0 should be wider than Nb to avoid interference
- M-FSK is (a little) more bandwidth efficient

51
Phase-Shift Keying (PSK)
• A bit stream is encoded in the phase of the transmitted signal
- Two binary digits represented by two different frequencies near the carrier frequency (BPSK)

cos(2𝜋fct) binary 1
s(t) = ቊ
cos(2𝜋fct + 𝜋) = – cos(2𝜋fct) binary 0

TX RX
bit stream
1 0 1 1 0 1 0 1 1 0
b(t)

modulation demodulation

signal
s(t)

52
Constellation Points for BPSK

‘1’: 𝜙=0
cos(2πfct+0) = cos(0)cos(2πfct) - sin(0)sin(2πfct) = sIcos(2πfct) – sQsin(2πfct)

‘0’: 𝜙=π
cos(2πfct+π) = cos(π)cos(2πfct) - sin(π)sin(2πfct) = sIcos(2πfct) – sQsin(2πfct)

Q Q

I I

(sI,sQ) = (1, 0) (sI,sQ) = (-1, 0)


‘1’: 1+0i ‘0’: -1+0i
53
Quadrature PSK (QPSK)
• Use four phase rotations 1/4π, 3/4π, 5/4π, 7/4π to represent ‘00’, ‘01’, ‘11’, 10’.
- Use 2 degrees of freedom in I-Q plane.
- Represent two bits as a constellation point.
- Rotate the constellations by π/2.
• Higher error probability with lower SNR

Q
‘01’ ‘00’

I
‘11’ ‘10’

54
Quadrature Amplitude Modulation (QAM)
• Change both amplitude and phase
- Ik modulates in-phase cos(2πfct)
- Qk modulates quadrature phase sin(2πfct)
- Transmit sum of in-phase & quadrature phase components

Q
‘0000’ ‘0100’ ‘1100’ ‘1000’ Bits Symbols
‘1000’ s1=3a+3ai
‘0001’ ‘0101’ ‘1101’ ‘1001’
’1001’ s2=3a+ai
a 3a
I
‘1100’ s3=a+3ai
‘0011’ ‘0111’ ‘1111’ ‘1011’
‘1101’ s4=a+ai
‘0010’ ‘0110’ ‘1110’ ‘1010’
2
Expected power: 𝐸 𝑠𝑖 =1
16-QAM

55
QAM with Distortion
• How does distortion impact a constellation diagram?
- Changes in amplitude, phase or frequency move the points in the diagram
- Large shifts can create uncertainty on what symbol was transmitted
• Channel condition changes over time as a result of slow and fast fading
- Fixed coding/modulation scheme will often be inefficient
- Adjust coding/modulation based on channel conditions – “rate” adaptation

56
Topics
• Properties of media
- Wires, fiber optics, wireless
• Wireless communication
- Signals processing and radio propagation
• Digital Communication
- Representing and communicating bits
• Multiplexing
- (O)FDM, MIMO, spread spectrum, CDMA

57
Scheduled Multiplexing
• Capacity of the transmission medium usually exceeds the capacity required for a single signal
• Multiplexing – carrying multiple signals on a single medium, the network works for the resource
sharing
- Individual need of bit rate is relatively low
▪ More efficient use of transmission medium
• A must for wireless – spectrum is huge!
- Signals must differ in frequency, time, or space
• MUX: n low-rate links → 1 high-rate link
• DEMUX: 1 to n, send each data to the corresponding output link

f3
f2
f1
f1
Time

58
Diversity Techniques – Distribute data over multiple “channels”
• The quality of the channel depends on time, space, and frequency
• Space diversity: use multiple nearby antennas and combine signals
- Receiver diversity
▪ Maximal ratio/weight combining – the signals from each channel are added together
➢ The gain of each channel is made inversely proportional to the mean square noise level in that channel
➢ Phase alignment is needed to amplify each other
- Transmitter diversity
▪ Ample space, power, and processing capacity (at the transmitter)
➢ If the channel is known, pre-align each component and weight it before transmission so that they arrive in phase at the receiver
➢ If the channel is not known, use space time block codes or learn from receiver or receiving packets based on channel reciprocity

• Time diversity: spread data out over time


- Useful for avoiding burst errors, i.e., errors are clustered in time
▪ If the number of errors within a code word exceeds the error-correcting code’s capability, it fails to recover the original
• Frequency diversity: spread signal over multiple frequencies
- Fight with frequency selective fading, e.g., spread spectrum, OFDM

59
Synchronous Time Division Multiplexing (TDM)
• Multiple signals can be carried on a single Tx path by interleaving portions of each signal in time
- Interleaving can be at the bit level or in blocks of bytes or even larger
Each frame contains a cycle of time slots
One or more slots are dedicated to one source

• Channel: the sequence of slots dedicated to one source, from frame to frame
• Synchronous: time slots are pre-assigned to source and are fixed
- The time slots for each source are transmitted whether or not the source has data to send
• Alternative: statistical TDM
- The multiplexer scan the input buffers and send the frame only if it is filled

60
Multiple-input-multiple-output (MIMO) Antenna Architecture
• N × M subchannels that can be used for simultaneous
reception or transmission of multiple streams
- Coordinate the processing at the transmitter and receiver
to overcome channel impairments
▪ Boost capacity, range and reliability, and reduce interference
• Fading on channels is largely independent
- Assuming antennas are separate ½ wavelength or more
• Combines ideas from spatial and time diversity
Method Capacity
- E.g. 1 × N and N × 1
• Very effective if there is no direct line of sight SISO B log2(1 + r)
- Subchannels become more independent 1×N or N×1 B log2(1 + rN)
B log2(1 + rN2)
• MIMO is used in 802.11n/ac N×N
Multiplexing NB log2(1 + r)
- See “802.11 with Multiple Antennas for Dummies”
r: SNR
for detail.
61
Two types of MIMO Transmission Schemes
• Spatial diversity: same data is coded and transmitted through multiple antennas
- Higher SNR: increases the power in the channel proportional to the number of transmitting antennas
- More robust: diverse multipath fading offers multiple “views” of the transmitted data at the receiver
- It is possible to leverage all receive antennas by adding the signals
Puncturedwith
bits properly-selected weights

(0) Data Bits (1) 1/2-Coded (2) 3/4-Coded (3) Interleaved (4)
h1 Q
Rx 1
x Select stronger
h2 Radio
Rx 2
(5) QPSK Modulated
f
(6) Mapped onto Subcarriers as OFDM Sy

F i gur e 1: A gr ap hi cal v i ew of t he O F D M en codi n g pr ocess for t he 18 M bp s r


T h e dat a bi t s ( 0) ar e encoded by a r at e-1/ 2 convol ut i onal code ( 1) an d t h en op t i o
cer t ai n bi t s for h i gher codi ng r at es ( her e, 3/ 4) t hat send few er r edu nd ant bi t s ( 2
t er l eaved ( 3) t o spr ead t h e r ed undan cy acr oss su b car r i er s an d p r ot ect agai nst
62 fr e
Two types of MIMO Transmission Schemes
• Spatial multiplexing: a source data stream is divided among the transmitting antennas
- Need favorable channel conditions and short link
- Receiver perform considerable signal processing
- Channel response: y = Hc + n
▪ hij are complex numbers x + jz that represent both amplitude attenuation (x) over the channel and path dependent
phase shift (z)
▪ The receiver measures the channel gains based on training fields containing known patterns in the packet preamble
and can estimate the transmitted signal

See “Diversity-Multiplexing Tradeoff in MIMO Channels” for detail. 63


MIMO Discussion
• Need channel matrix H: use training with known signal
• MIMO is used in 802.11n/ac
- Can use multiple adjacent non-overlapping “WiFi channels”
- Supported in both the 2.4 and 5 GHz bands
▪ Typical indoor rates of hundreds of Mbps
- Preamble that includes high throughput training field
• Tutorial
- http://complextoreal.com/wp-content/uploads/2013/01/mimo.pdf
• Full duplex MIMO
- See “Experiment-Driven Characterization of Full-duplex Wireless Systems”

64
MIMO Discussion
• Phased-arrays and beamforming
- A programmable array of antennas which creates a beam of radio waves which can be electronically
steered to point in different directions, without (mechanically) movement
- By phase-shifting various received signals and then summing → Focus on a narrow directional beam
𝟐 𝟑𝟔𝟎
▪ Beam width = 𝒓𝒂𝒅 = 𝐝𝐞𝐠
𝒏 𝒏𝝅

- Digital Signal Processing (DSP) is used for signal processing → Self-aligning

65
Massive MIMO
• Use very large number of antennas (e.g., tens or hundreds)
• Focus transmission and reception of signal energy into ever-smaller regions of space with extra
antennas
• Brings huge improvements in throughput and energy efficiency
• Tutorial
- http://www.analog.com/cn/analog-dialogue/articles/massive-mimo-and-beamforming-the-signal-processing-
behind-the-5g-buzzwords.html
• Platform
- http://argos.rice.edu/

66
Frequency Division Multiplexing (FDM)
• FDM is possible when the useful bandwidth of the transmission medium exceeds the required
bandwidth of signals to be transmitted
• Each user can send all the time at reduced rate

• Hardware is slightly more expensive and is less efficient use of spectrum


67
Orthogonal Frequency Division Multiplexing (OFDM)
• Distribute bits over N subcarriers that use different frequencies in the band
- Combines modulation and multiplexing techniques to improve spectral efficiency
• Hypothesis: Ten 100-kHZ channel is better than one 1 MHz Channel, why?
- Lower data rate reduces inter-symbol interference
▪ Higher bit rate means smaller distance between bits or symbols
➢ Delay spread remain the same for each symbol
▪ NTs >> root-mean-square of delay spread of the channel
➢ Ts: symbol period
- Better treatment for frequency selective fading
▪ Adaptive modulation on each subcarrier

68
Importance of Orthogonality
• Simple FDM:
- Leakage interference from adjacent sub-channels, or
- Need guard bands between adjacent frequency bands → extra overhead and lower utilization

Individual sub-channel

f
Guard band

Do not need guard bands


f
69
OFDM Discussion
• OFDM is very effective in fighting frequency • Orthogonal Frequency Division Multiple Access
selective fading - Subcarriers are divided into groups – subchannels
- Each user has a set of subcarriers for a few slots
• Not free lunch – you introduce some overhead
▪ More flexibilities for power management
- Frequency: you need space between the subcarriers - Time + frequency DMA → 2D scheduling
- Time: you need to insert prefixes
• You also add complexity
- How to (optionally) create many, closely spaced
subcarriers?
- The OFDM signal is fairly flat in the frequency
domain, so it is very variable in the time domain
▪ High peak-to-average power ratio (PAPR)
➢ A multicarrier signal is the sum of many narrowband signals
➢ Can be a problem for simple, mobile devices, and weak signal

• Tutorial
- http://complextoreal.com/wp-content/uploads/2013/01/ofdm2.pdf
70
Spread Spectrum
• How about spreading transmission over a wider bandwidth?
- Broad spectrum has better anti-interference ability and higher data rate
- Different sets of codes can be used at the same frequency to make the channel more efficient
• Good for military: jamming and interception becomes harder
• Also useful to minimize impact of a “bad” frequency in regular environments
• What can be gained from this apparent waste of spectrum?
- Immunity from various kinds of noise and multipath distortion
- Can be used for hiding and encrypting signals
- Several users can independently use the same higher bandwidth with very little interference
• How to do?
- Frequency Hopping Spread Spectrum (FHSS)
- Direct Sequence Spread Spectrum (DSSS)
• Tutorial
- http://sss-mag.com/ss.html
 Optional material 71
Frequency Hopping Spread Spectrum (FHSS)
• Have the transmitter hop between a seemingly random sequence of frequencies
- Each frequency has the bandwidth of the original signal
• Spreading code determines the hopping sequence
- Must be shared by sender and receiver (e.g. standardized)

• Example: Original 802.11 Standard (FH) • Example: Bluetooth


- Used frequency hopping: 96 channels of 1 MHz - Uses frequency hopping spread spectrum in the
▪ Each channel carries only ~1% of the bandwidth 2.4 GHz ISM band
▪ Uses 2 GFSK or 4 GFSK for modulation (1 or 2 Mbps) - Uses 79 frequencies with a spacing of 1 MHz
- The dwell time was configurable ▪ Other countries use different numbers of frequencies
▪ FCC set an upper bound of 400 ms - Frequency hopping rate is 1600 hops/s
▪ Transmitter/receiver must be synchronized
- Signal uses GFSK
- Transmitter used a beacon on fixed frequency to ▪ Minimum deviation is 115 KHz
inform the receiver of its hop sequence - Maximum data rate is 1 MHz

 Optional material 72
Direct Sequence Spread Spectrum (DSSS)
• Each bit in original signal is represented by multiple bits
(chips or Pseudo Noise code) in the transmitted signal
- A form of binary modulation with spreading sequence
Original Signal 1 1 0
- The chips consist of pulses of a much shorter duration (larger
Spreading Code 0 0 1 0 1 0 0 1 1
bandwidth) than the pulse duration of the message signal
XOR
• The resulting bit stream is used for further analog modulation Transmitted Chips 1 1 0 1 0 1 0 1 1

• Properties Modulated Signal

- You need more bps and bandwidth to send the signal


▪ Number of chips per bit is called the spreading ratio/factor
- Advantage is that the transmission is more resilient
▪ Effective against noise and multi-path
▪ DSSS signal will look like noise in a narrow band
▪ Can lose some chips in a word and recover easily

 Optional material 73
Code Division Multiple Access (CDMA)
• Users share spectrum, use it at the same time, with different codes to spread their data over the freq.
- DSSS where users use (near) orthogonal spreading sequences
- Frequency hopping with different hop sequences
• Users rarely overlap and the inherent robustness of DSSS will allow users to recover if there is a
conflict
- Overlap: use the same frequency at the same time
- Goal: the signal of other users will appear as noise
• Encoding: inner product: (original data) X (chipping sequence)
• Decoding: summed inner-product: (encoded data) X (chipping sequence)

 Optional material 74
CDMA encode/decode
channel output Zi,m
Zi,m= di.cm
data d0 = 1
1 1 1 1 1 1 1 1
d1 = -1
bits -1 -1 -1 -1 -1 -1 -1 -1

sender 1 1 1 1 1 1 1 1 slot 1 slot 0


code channel channel
-1 -1 -1 -1 -1 -1 -1 -1
output output
slot 1 slot 0

M
Di =  Zi,m.cm
m=1
M
receiver received 1 1 1 1 1 1 1 1
d0 = 1
-1 -1 -1 -1 -1 -1
input -1 -1
d1 = -1

1 1 1 1 1 1 1 1 slot 1 slot 0
code channel channel
-1 -1 -1 -1 -1 -1 -1 -1
output output
slot 1 slot 0

… but this isn’t really useful yet!


 Optional material 75
CDMA: two-sender interference

channel sums together


transmissions by sender 1
Sender 1 and 2

Sender 2

using same code as sender 1,


receiver recovers sender 1’s
original data from summed
channel data!
… now that’s useful!
 Optional material 76
CDMA Discussion
• CDMA does not assign a fixed bandwidth but a user’s data rate depends on the traffic load
- More users results in more “noise” and less data rate for each user, e.g. more information lost due to errors
- How graceful the degradation is depends on how orthogonal the codes are
- TDMA and FDMA have a fixed channel capacity
• Weaker signals may be lost in the clutter
- This will systematically put the same node pairs at a disadvantage – not acceptable
- The solution is to add power control, i.e., nearby nodes use a lower transmission power than remote nodes
• Why CDMA failed to be continued?

 Optional material 77
Homework – Link Tech and (W)LAN
• MOOC
- Link Layer
▪ http://media.pearsoncmg.com/ph/streaming/esm/tanenbaum5e_videonotes/tanenbaum_videoNotes.html
- Link Layer and Wireless and Mobile Networks
▪ https://gaia.cs.umass.edu/kurose_ross/videos/6 | https://gaia.cs.umass.edu/kurose_ross/videos/7
➢ 6.1 – 6.7, 7.1 – 7.3

• Supplemental material
- 802.11 with Multiple Antennas for Dummies, SIGCOMM CCR, 2010 [Optional]
▪ https://dhalperi.github.io/linux-80211n-csitool/
- Eliminating the Barriers: Demystifying Wi-Fi Baseband Design and Introducing the PicoScenes Wi-Fi
Sensing Platform, IoTJ’21 [Optional]
▪ https://ps.zpj.io/
- SWAN: Stitched Wi-Fi Antennas, MobiCom’18 [Optional]
▪ http://wands.sg/AtherosCSI/

78

You might also like