---
title: MobNet
---
[toc]
# Chapter 2 - Basics of Wireless Communications
Part one:
Establish a fundamental understanding of the physical layer characteristics and limitations of wireless communication systems:
* Which frequencies to choose?
* How do signals propagate?
* Which antennas are appropriate?
Part two:
* Establish a fundamental understanding of the physical layer characteristics and limitations of wireless communication systems
* How to get bits in the air? How to get bits off the air?
* Introduce the principle multiplexing schemes for wireless communication
* What are pros and cons of space, time, code, and frequency multiplex?
* Selected issues in wireless communications
## Frequencies for wireless communications
| Frequency | Use case | Attributes |
| -------- | -------- | -------- |
| Ultrakurzwelle (VHF/UHF) | mobile radios, simple, small antennas for cars | good propagations characteristics, reliable connections |
| Super High Frequency (SHF) and higher | directed radio links, satellite communication | high bandwith available |
| between UHF and SHF | Wireless LAN, MAN (Medium Area Network) | Weather depending, signal loss due to rainfall |
## Radio propagation
### Signal propagation ranges

1. Transmission range
* Low error rate
* Communication possible
2. Detection range
* Detection of the communication possible
* No communication possible
4. INterference range
* signal may not be detected
* signal adds to the background noise
### Wave propagation modes
* Ground-wave propagation
* up to 2 MHz
* the lower the frequency, the less the attenuation
* sky-wave propagation
* 3-30MHz
* reflected or refracted by the ionosphere
* line-of-sight propagtion
* space-wave propagtion
* VHF & UHF band
* multipath propagation
* above 30MHz
* ground-, space- and sky-wave-propagation
### Electromagnetic spectrum
| Band | Frequency range | Free space wavelength range | Propagation chracteristics | typical use |
| -------- | -------- | -------- | -------- | -------- |
| ELF (extremly low frequency) | 30-300Hz | 10k-1k km | GW | Powerline frequencies |
| VF (voice frequency) | 300-3000Hz | 1000-100km | GW | telephonsystem for analog subscriber lines |
| VLF (Very low frequency) | 3-30 kHz | 100-10 km | GW | long-range navigation; submarine communication |
| LF (low frequency) | 20-200 kHZ | 10-1 km | GW; slightly less reliable than VLF | long-range navigation; marine communication radio beacons |
| MF (Medium frequency) | 300-3000 kHz | 1000-100 m | GW; night SW | Maritime radio; direction finding; AM broadcasting |
| HF (high frequency) | 3 to 30 MHz | 100-10 m | SW; quality depends on time of day, season and frequency | Amateur radio; international broadcasting; military communication; long-distance aircraft and ship communication |
| VHF | 30-300MHz | 10-1 m | LOS | VHF television; FM broadcast and twoway radio; AM aircraft communication |
| UHF | 300-3000 MHz | 100-10cm | LOS | UHF television; cellular telephone; radar; personal communications systems |
| SHF (super high frequency) | 3-30 GHz | 10-1cm | LOS | Satellite; wireless LAN |
| EHF (extremely high frequency) | 30-300 GHz | 10-1mm | LOS | Experimental |
| Infrared | 300GHz-400THz | 1mm-770nm770 | LOS | Infrared LANs; consumer electronic applications |
| Visual light | 400-900 THz | 770-300 nm | LOS | Optical communication |
### Line-Of-Sight Transmission
#### Attenuation
* Strength of signal falls off with distance over transmission medium
* Attenuation factors for unguided (wireless) media:
* Received signal must have sufficient strength so that circuitry in the receiver can interpret and decode signal
* Signal must maintain a level sufficiently higher than noise to be received without error
* Attenuation is greater at higher frequencies
* Path attenuation = Path loss
* the reduction of power density of an electromagnetic wave as it propagates through space
* path loss depends upon distance and frequency
#### Free space path loss (FSPL)

* Free space path loss, ideal isotropic antenna
* $FSPL = (\frac{4\pi d}{\lambda})^2 = (\frac{4\pi fd}{c})^2$

* Antenna gain
* Measure of the directionality of an antenna
* Power output, in a particular direction, compared to that produced in any direction by a perfect omnidirectional antenna (isotropic antenna)
* Effective area
* Related to physical size and shape of antenna

#### Noise
Amount of thermal noise to be found in a bandwith of 1Hz in any device or conductor is:
$$N_0 = k \cdot T\ [W/Hz]
$$
* $N_0$ noise power density in watts per 1 Hz of bandwidth
* $k$ Boltzmann's constant = $1.3803 \cdot 10^{-23}$
* $T$ temperature, in kelvins (absolute temperature)
Noise is assumed to be independent of frequency.
Noise depends on temperature and bandwidth of the system.
#### Shannon Theorem
* Signal-to-Noise Ratio (SNR)
* The ratio of the power in a signal to the power contained in the noise that is present at a particular point in the transmission
* $SNR_{dB}=10\log_{10}(\frac{\text{signal power}}{\text{noise power}}) = P_r(dBm)-N(dBm) = P_r(dBm)-k\cdot T\cdot B(dBm)$
* above formula expresses the amount in decibels that the intended signal exceeds the noise level
* A high SNR means a high-quality signal
* Shannon Capacity: Theoretical maximum that can be achieved:
$$C= B \cdot \log_2(1+SNR)
$$
### Multipath propagation
Receiving power is additionally influenced by
* Shadowing
* Reflection
* Scattering
* Diffraction at edges
* Penetration
* Refraction
If Line-Of-Sight, diffracted and scattered signals are not significant.
If No Line-Of-Sight diffraction and scattering are primary means of reception.
**Time dispersion**
Signal is dispersed over time. The signal reaches a receiver directly and phase shifted.
* ISI - Inter symbol interference: Interference with neighbor symbols
## Antennas
* Omni-directional antenna: Power radiated in all directions
* Directional antenna: Most power in the desired direction
* Isotropic antenna: Radiates in all directions equally
(Isotropic antenna is a hypothetical (not physically feasible) concept, it is only used as a useful reference to describe real antennas)
### Receiver Diversity
* Use multiple receive antennas
* Selection combining: Select antenna with highest SNR
* Treshold combining: Select the first antenna with SNR above threshold
* Maximal ratio combining: Phase is adjusted so that all signals have the same phase. Then weighted sum is used to maximize SNR.
### Transmitter Diversity
* Use multipe antennas to transmit the signal.
* If channel is known, phase each component and weight it before transmission so that they arrive in phase at the receiver and maximize SNR.
### Beamforming
* Allowing directional transmission and reception
* Achieved by combining elements on an antenna array so that the resultant signals at the receiver has high SNR or signal to interference and noise ratio (SINR)
### MIMO
* Multiple Input Multiple Output
* RF chain for each antenna
### Effects of Frequency
* Higher frequencies:
* have higher attenuation
* need smaller antennas (Antenna size > Wavelength/2)
* are more affected by weather
* more bandwidth and higher data rate
* allow more frequency reuse
* Lower frequencies:
* have longer reach
* require larger antenna and antenna spacing
* smaller channel width
* Mobility: Below 10Ghz
## Signal
* Electromagnetic waves are used as a means to transmit information
* Signal is a physical representation of data
### Transmit signal
Sine wave is special periodic signal for a carrier
$$s(t) = A \sin(2\pi ft + \phi)
$$
* Period: $T$
* frequency: $f = \frac{1}{T}$
* amplitude: $A$
* phase shift: $\phi$
**Wavelength**
* Distance occupied by one cycle
* Distance between two poits of corresponding phase in two consecutive cycles
* Wavelength: $\lambda$
* Assuming signal velocity $v$:
* $\lambda = v\cdot T$
* $\lambda \cdot f = v$
* $c = 3 \cdot 10^{8} \frac{m}{s}$ (speed of light in free space)
## Modulation
Modulation is a process of encoding information from a message source in a manner suitable for transmission.
**Major steps**
1. Digital modulation: Keying
* Digital data is translated into analog signal (baseband)
* **A**mplitude **S**hift **K**eying (ASK), Frequency SK (FSK), Phase SK (PSK)
* Differences in spectral efficiency, robustness
3. Upconversion
* Shifts center frequency of baseband signal up to the radio carrier
**Motivation**
* Smaller antennas (e.g., $\lambda/4$)
* Medium characteristics
* Frequency Division Multiplexing
**Basic schemes**
* Amplitude Modulation (AM)
* Fequency Modulation (FM)
* Phase Modulation (PM)
| Modulation | Application | Advantages | Disadvantages |
| ---------- | --------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| Amplitude | digital data over optical fiber | very simple + low bandwidth requirements | Very susceptible to noise interference |
| Frequency | high-frequency radio transmission | less susceptible to noise than ASK | needs larger bandwidth |
| Phase | WLAN: BPSK, QPSK | less susceptible to noise than ASK, but same bandwidth as ASK, <br> more bandwidth efficient than FSK | More complex signal detection than ASK and FSK |
### Advanced Digital Modulation
* BPSK (Binary Phase Shift Keying)
* bit value 0: sine wave
* bit value 1: inverted sine wave
* very simple PSK
* low spectral efficiency
* robust, used in satellite systems
* QPSK (Quadrature Phase Shift Keying)
* 2 bits coded as one symbol
* symbol determines shift of sinewave
* needs less bandwidth compared to BPSK
* more complex
* higher data rate than BPSK


* Quadrature AM (QAM)
* Combines ASK and PSK (2-dimensional signalling)
* It is possible to code n bits using one symbol
* $2^n$ discrete levels, $n=2$ identical to QPSK
* Bit error rate increases with n, but less errors compared to PSK schemes

## Multiplexing
Multiplexing in 4 dimensions:
* Space ($s_i$)
* Time ($t$)
* Frequency ($f$)
* Code ($c$)
**Goal: multiple use of a shared medium**
**Important:** guard spaces needed!
* Frequency Division Multiplex (FDM)
* Seperation of the whole specturm into smaller frequency bands
* A channel gets a certain band of the spectrum for the whole time
* Advantages:
* No dynamic coordination necessary
* Works also for analog signals
* Disadvantages
* Waste of bandwidth if the traffic is distributed unevenly
* inflexible
* guard spaces
* Time Division Multiplex (TDM)
* A Channel gets the whole spectrum for a certain amount of time
* Advantages:
* Only one carrier in the medium at any time
* high utilization even for many users
* Disadvantages:
* Precise sychronization necessary
* Code Division Multiplex (CDM)
* Each transmitter has a unique code
* All channels use the same spectrum (communication channel) at the same time
* Advantages
* Bandwidth efficient
* no coordination necessary
* good protection against interference and tapping
* Disadvantages:
* More complex signal regeneration
* Implemented using spread specturm technology
* Time and Frequency Multiplex
* Combination of both methods
* A channel gets a certain frequency band for a certain amount of time
* Example: GSM
* Advantages:
* Higher multiplexing degree
* Better protection against tapping
* Protection against frequency selective interference
* but:
* precise coordination required
### OFDM
Orthogonal Frequency Division Multiplexing
* Ten 100 kHz channels are better than one 1 MHz Channel
* Frequency band is divided into 256 or more sub-bands
* orthogonal: peak of one at null of others
* Each carrier is modulated with a BPSK, QPSK, 16-QAM, 64-QAM etc. depending on the noise (Frequency selective fading)
* Used in 802.11a/g, 802.16, Digital Video Boradcast handheld (DVB-H)
Advantages of OFDM:
* Easy to implement using FFT/IFFT
* Computational comlexity = $O(B \cdot \log BT)$ compared to previous $O(B\cdot 2\cdot T)$ for Equalization. Here B is the bandwidth and T is the delay spread.
* Graceful degradation if excess delay
* Robustness against frequency selective burst errors
* Allows adaptive modulation and coding of subcarriers
* Robust against narrowband interference
* Allows pilot subcarriers for channel estimation
#### OFDMA
Orthogonal Freqency Division Multiple Access
* Each user has a subset of subcarriers of a few slots
* OFDM systems use TDMA
* OFDMA allows Time+Frq DMA: 2D scheduling
### Spread Spectrum

Two common types:
1. frequency-hop spread spectrum (FHSS)
2. direct-sequence spread spectrum (DSSS)
#### Frequency Hopping Spread Spectrum

* Pseudo-random frequency hopping
* Spreads the power over a wide spectrum
* developed initially for military
* patented by actress Hedy Lamarr
* Narrowband interference can't jam
#### Direct-Sequence Spread Spectrum

:::info
ist dsss also fm moduliert?
:::
* Spreading factor = Code bits/data bit, 10-100 commercial (Min 10 by FCC) 10 000 for military
* Signal bandwidth > 10 * data bandwidth
* Code sequence synchronization
* Correlation between codes $\Rightarrow$ Interference $\Rightarrow$ Orthogonal

### Doppler Shift
* If the transmitter or receiver or both are mobile, the frequency of received signal changes
* moving towards each other $\Rightarrow$ Frequency increases
* moving away from each other $\Rightarrow$ Frequency decreases
$$ Frequency\ dif\!ference = velocity/Wavelength = \frac{v\cdot f}{c}
$$
#### Doppler Spread and Coherence Time

* Two rays will be received
* $f - \frac{vf}{c}$ and $f + \frac{vf}{c}$
* **Doppler Spread** = $2\frac{vf}{c}$ = 2 * Doppler shift
* They will add or cancel out each other as the receiver moves
* Coherence time: Time during which the channel response is constant, $\tau_c = \frac{1}{Doppler\ spread}$
# Chapter 3 - Medium Access in the Wireless Domain
## Goals
> Motivate the special need for medium access control (MAC) protocols for wireless networks
> * Identify the constraints/problems of wireless communications with respect to medium access control
> * Discuss basic principles to share the wireless medium: coordinated schemes
## Motivation of MAC
**Motivation:** Wireless spectrum is a rare and expensive resource. Communication only works if access to the channel is managed.
**Purposes:**
* Initialization: Devices may enter state required for operation
* Fairness: Allocation of resources for transmission
* Priority: Priorization of certain packet types
* Packet management + packet recovery
* Compatibility (of stations from different vendors)
* Configurability: Adding and deleting of stations from network
## Contention-Free MAC
#### SDMA (Space Division Multiple Access)
Segment the space into sectors and use directed antennas to address individual devices all with the same frequency.
#### TDMA (Time Division Multiple Access)
Multiple devices use the same frequency band. Each device is allocated a time window (frame) for transmission. Each frame consists of transmission slots. Each slot contains synchronization bits to be exchanged because mobile stations may asynchronize over time.
#### FDMA (Frequency Division Multiple Access)
Frequency band is divided into several smaller bands. The transmission between two devices uses one small frequency band while all other devices use another band. No bandwidth is fully used if a station does not have continuous data to be transmitted.
#### CDMA (Code Division Multiple Access)
Simultaneous access of the wireless medium is supported using
different codes. If these codes are **orthogonal**, it is possible for multiple
communications to share the same frequency band. A code (chip sequence) exchange is neccessary beforehand as well as tight synchronization. In exchange all terminals can use the same frequency.
#### Round-robin techniques
Each station is given the chance to send or transmit by rotation. A station may or may not used the given turn depending on the availability of data to be sent. May be **centralized** (BS uses polling frames) or **distributed** (using a token that is beeing passed around).
#### Reservation-based protocols
Static time slots used to reserve future access to the medium. Often very complex. Need to ensure that other potentially conflicting nodes take note of such a reservation to avoid collisions.
## Contention-Based MAC
Dynamic channel allocation. Essential for bursty data transmission where round-robin techniques and fixed allocation are unsuitable. **No fixed controller** exists.
#### Pure ALOHA
Every device accesses the channel without slots or contention. An acknowledgement (ACK) confirms the success of a transmission. Expontential backoffs increase the likelihood of successful transmission.
#### Slotted-ALOHA
ALOHA where devices can only start a transmission at predefined points in time. Requires synchronization.
#### Reservation-ALOHA - Explicit Reservation
> DAMA (Demand Assigned Multiple Access) Concept:
> Sender reserves a future time slot. Sending within this reserved time slot is possible without collision.
Consists of two phases. It's important for every station to obtain the reservation list after phase 1, as well as be synchronized. Phases are:
1. Slotted ALOHA phase used for reservation (contention-based). Collisions are possible.
2. Reservation phase (contention-free)
#### Reservation-ALOHA Implicit Reservation
> PRMA (Packet Reservation Multiple Access) Concept
A certain number of slots form a frame. Frame containing reservation vector is repeated and broadcast to all stations. Stations compete for empty slots according to the slotted ALOHA principle. Once a station reserves a slot successfully (entry in the reservation vector), the slot
is assigned to the station until all its data is sent.
#### CSMA/CD (Carrier sense multiple access / collision detection)
Sender first senses the medium to determine whether it is idle or busy.
If it's busy, transmission is delayed until channel is no longer used. Even during transmission device keeps listening to detect collisions. If collision occured, transmission stops immediately. After collision wait random period of time and proceed with first step.

Length of the contention interval between $A$ and $B$ is $2 \cdot T_{propagation}$, so that both $A$ and $B$ are able to detect ($\neq$ avoid) a collision. Since no MAC-Layer protocol guarantees reliable delivery, even without collisions the other party may not have received a packet.
#### CSMA/CA (Carrier sense multiple access / collision avoidance)
CSMA/CA attempts to avoid collisions in the first place. Station senses the medium, but does not immediately access the channel when it is sensed idle. A station waits for a time period called DCF interframe space (DIFS)
plus a multiple time slots (remaining backoff-timer) before accessing the channel. In case multiple stations attempting to access the medium, the one
with the shorter back-off period will win. Backoff timer only counts down when no transmission is in progress on medium. ACKs after reception. _More details in Chapter 4._
**Trade-off** between choosing a small contention window for backoff-timer (thus having more collisions but less protocol overhead) vs big contention window (less collisions, more protocol overhead).
*[DIFS]: DCF interframe space
## Hidden- & Exposed-Terminal Problems
CSMA/CD and CSMA/CA fail under certain conditions.
#### Exposed terminal problem
$A, B, C, D$ exist. $B$ sends to $A$. $C$ receives this transmission, resulting in $C$ sensing a busy medium. If $C$ wants to send to some other terminal (e.g. $D$) this is a waste of resources.

#### Near and far terminal problem
Terminal $A$ and $B$ send, $C$ receives. Signal strength decreases proportionally to the square of the distance. The signal of $B$ therefore drowns out $A$’s signal $\Rightarrow$ Precise power control needed.

#### Hidden terminal problem
$A, B, C$ exist. $A$ sends to $B$. $C$ cannot receive $A$ and therefore senses a free medium. Results in more collisions.
#### MACA - Solution to hidden and exposed terminal problem
MACA (Multiple Access with Collision Avoidance) uses short signaling packets for collision avoidance: RTS and CTS. MACA is also known as CSMA/CA RTS/CTS. It avoids the hidden and exposed terminal problem. RTS or CTS packets are intended for only one recipient but received by more than the intended one in wireless medium. The waiting devices update their NAV with how long they have to wait (this is contained in RTS and CTS both).
# Chapter 4 & 5 - Wireless Local Area Networks
## Goals
>Be able to explain the basic principles underlying and motivating the IEEE 802.11 standard for Wireless Local Area Networks (WLAN)
> * Characteristics and predictions for wireless LANs
> * Discuss the standardization process of IEEE with respect to the 802.11 (and 802.x) family of standards
> * An overview of PHY characteristics in 802.11
> Introduce the core principles for wireless medium access control in the setting of IEEE 802.11
> * Be able to explain the basic principles behind the IEEE 802.11 MAC
> * Understand the characteristics, pros and cons of the distributed as well as centralized MAC in IEEE 802.11
> Motivate the advantages of communication at the 60 GHz frequency for WiFi
> * Identify the advantages, disadvantages and the challenges of using 60 GHz band for communication
> * Discuss the basic idea to share medium: CSMA/CA vs TDMA
## IEEE 802 Families
Wifi IEEE 802.11
* 802.11a
* 802.11h
* 802.11n (also derived from 802.11g)
* 802.11ac
* 802.11ad
* 802.11af
* 802.11b
* 802.11g
* 802.11i/e/.../w/a*
Wireless distribution networks:
WMAN 802.16 (Broadband Wireless Access)
WiMAX
* 802.20 (Mobile Broadband Wireless Access)
* 802.16e
Personal wireless netowrks
WPAN 802.15
* ZigBee
* 802.15.4
* 802.15.4a/b
* 802.15.5
* 802.15.3
* 802.15.3a/b
* 802.15.2
* Bluetooth
* 802.15.1
### IEEE 802.11 vs WiFi
* IEEE 802.11 is a standard
* WiFi focuses on the Wireless Fidelity
* Fidelity = Compatibility between wireless equipment from different manufacturers
* WiFi Alliance is a non-profit organization that does the compatiblity testing (wifi.org)
* 802.11 has many options and it is possible for two equipments based on 802.11 to be incompatible
* All equipment with WiFi logo have selected options such that they will interoperate
### IEEE 802.11 Basics
* Orignal IEEE 802.11-1997 was at 1 and 2 Mbps
* newer versions at 11Mbps or 6Gbps
* All versions use "License-exempt" spectrum
* Need ways to share spectrum among multiple users and multiple LANs $\Rightarrow$ Spread Spectrum (CDMA)
* Three PHYs:
* Direct Sequence Spread Spectrum (DSSS) using ISM band
* Frequency Hopping spread spectrum using ISM band
* Diffused Infrared (850-900nm) bands
* Supports multiple priorities
* Supports time-critical and data traffic
* Power management allows a node to doze off
* Low power consumption
#### IEEE 802.11 Physical Layers
* First version in 1997: IEEE 802.11
* Includes MAC Layer and three physical layer specifications
* Two in 2.4GHz band and one infrared
* All operating at 1 and 2 Mbps
* No longer used
* Two additional amendments in 1999
* IEEE 802.11a-1999: 5GHz band, 54Mbps/20 MHz
* OFDM
* IEEE 802.11b-1999: 2.4GHz, 11Mbps/ 22MHz
* Fourth amendment
* IEEE 802.11g-2003: 2.4GHz band, 54 Mbps/20 MHz, OFDM
#### History of the 802.11 MAC
* Derived from Ethernet (CSMA/CD) philosophy
* Developed into present from 1990-1994
* Required much modification to fit wireless medium
* CSMA/CA
* Widely regared at the time as a kludge(hack)
market decided that 802.11 was the winner, INTEROPERABILITY and WORKING SYSTEMS being one of the key factors
#### ISM Bands

### IEEE 802.11 Architecture

### Power Management
* Station tells the base station its mode: **Power saving (PS)** or **active**
* Mode changed by power management bit in the frame control header
* All packets destined to stations in PS mode are buffered
* AP broadcasts list of stations with buffered packets in its beacon frames: Traffic Indication Map (TIM)
* Subscriber Station (SS) sends a PS-Poll message to AP which sends one frame
* With 802.11e unscheduled Automatic Power Save Delivery (APSD): SS transmits all buffered frames for SS
* With Scheduled APSD mode: AP will transmit at prenegotiated time schedule. No need for polling
#### Automatic Power Save Delivery (APSD)
* Unscheduled APSD (U-APSD)
* AP announces waiting frames in the beacon
* When stations wake-up they listen to beacon
* Send a polling frame to AP
* AP sends frames
* Scheduled APSD (S-APSD):
* Station tells AP its wakeup schedule
* AP send frames on schedule *No need for polling*
* Hybrid APSD mode:
* PS-poll for some. Scheduled for other categories
## 802.11 MAC
### MAC Layer (Medium Access Control)
**Access methods**
* DCF - Distributed Coordination Function
* CSMA/CA (mandatory)
* collision avoidance via randomized "back-off" mechanism
* minimum distance between consecutive packets
* ACK packet for acknowledgements (not for broadcast)
* DCF w/ RTS/CTS (optional)
* reduces hidden terminal problem
* PCF - Point Coordination Function (optional)
* access point polls terminals accordings to a list
* HCF - Hybrid Coordination Function
* EDCA (optional) - Enhanced Distributed Channel Access
* CSMA/CA with priority levels
* CCA (optional) - Controlled Channel Access
* Improved polling
#### IFS (Inter frame spacing)
Is a time interval in which frames cannot be transmitted by stations within a BSS.
This ensures that the frames do not overlap with each other.
IFS types:
* SIFS (Short Inter Frame Spacing)
* highest priority, for ACK, CTS, polling response
* PIFS (PCF Inter Frame Spacing)
* medium priority, for time-bounded service using PCF
* DIFS (DCF Inter Frame Spacing)
* lowest priority, for asychronous data service
* EIFS (Extended Inter Frame Spacing)
* If a previously received frame contains an error then a station has to defer EIFS duration instead of DIFS before transmitting a frame

#### Timing Intervals
* Timing intervals are defined to control a station's access to the medium/channel
* A slot time (Slot Time)
* Specific value depends on Physical Medium Dependent (PMD) layer
* Derived from propagation delay, transmitter delay, etc. (20µs for DSSS and 50 µs for FHSS)
* Basic unit of time for MAC, e.g. backoff time is a multiple of slot time
* Short Inter-Frame Space (SIFS)
* Shortest interval: SIFS < Slot Time. 10µs for FHSS
* Used for highest priority access to the medium, e.g. for ACK and CTS
* Interval time between DATA-ACK and RTS-CTS
* PCF Inter-Frame Space (PIFS)
* PIFS = SIFS + Slot Time
* Used for Point Coordination Function (PCF) access to the medium
* Allows priority based access to the medium after ACK but before contention based access
* Distributed (DCF) Inter-Frame Space (DIFS)
* DIFS = SIFS + 2 * Slot Time
* Used for Distributed Control Function (DCF) access to the medium
* Results in lower priority access than using SIFS or PIFS
* Summary
* SIFS < PIFS < DIFS
### DCF
#### DCF CSMA/CA

Steps:
* Station ready to send starts sensing the medium (Carrier Sense based on CCA, Clear Channel Assessment)
* If the medium is free for the duration of an DCF Inter-Frame Space (DIFS), the station can start sending
* If the medium is busy, the station has to wait for a free IFS, then the station must additionally wait a random back-off time (collision avoidance, multiple of slot time)
* If another station occupies the medium during the back-off time of the station, the back-off timer stops (fairness)
#### Binary Exponential Backoff
* Station choose their backoff time randomly from contention window
* Ideal contention window size is trade-off between acceptable load and experienced delay
* Inital contention window size (CWmin) is 7 slots (backoff time between 0 and 7)
* After collision (no ACK), contention window is "doubled" until CWmax = 255 is reached:
* 7 $\rightarrow$ 15 $\rightarrow$ 31 $\rightarrow$ 63 $\rightarrow$ 127 $\rightarrow$ 255
* The backoff time is chosen randomly in [0, CW-1] as mentioned by Bianchi
##### Example Competing Stations

#### Sending unicast packets
* Station can send RTS with reservation parameter after waiting for DIFS
* Reservation determines amount of time the data packet needs the medium
* acknowledgement via CTS after SIFS by receiver (if ready to receive)
* sender can now send data at once, acknowledgement via ACK
* other stations store medium reservations distributed via RTS and CTS
#### Colliding RTS
When multiple RTS collides
* the transmitting node only realize upon failure in receiving the CTS frame, which is called CTS timeout time
* CTS timeout time is equivalent to 300µs according to Bianchis paper
### PCF
* In PCF the base-station polls the other stations, asking them if they have anything to send
* It sends a beacon frame once every 10 or 100 ms
* this frame carries informations on frequencies and such, and invites stations to sign up for transmission
* to save battery, a base station can also direct a mobile station to go into sleep state
* incoming message will be buffered until it wakes up
* when base station transmits, ideally there can be no hidden terminals
* PCF and DCF can coexist together
* it works by carefully defining the interframe time interval
* first the base station can poll the other stations
* if nobody replies, any station can acquire the channel
* Periodic "Super Frames"
* contention-free period (CFP) and contention period (CP)
1. Start of CFP
2. Point coordinatior (e.g. AP) sends beacon frame to all stations in basic service area after the channel is free for PIFS time
3. Point coordinator polls the first sation with
* DATA +CF-poll frame, or
* CF-poll frame only
4. After SIFS, a station replies with
* DATA + CF-ACK or
* After SIFS, AP relies with
* DATA + CF-ACK + CF-Poll frame
* CF-ACK + CF-Poll
* NULL (No Data) + CF-ACK
* Station has no data to send, AP proceed to poll another station after SIFS time
* The AP continues to poll each station until it reaches the maximum duration of the CFP **OR**
* The AP can terminate the CFP by sending a CF-End frame
* Large overhead if few stations have data to send

### Frame Types

| Field | Values |
| --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| Type | Controll, management, data |
| Sub-Type | Association, disassociation, re-association, probe, <br> authentication, deauthentication, CTS, RTS, ACK, ... |
| Retry/retransmission | 0/1 |
| Power management | 0/1 |
| More buffered data at AP | 0/1 |
| Wireless Equivalent Privacy (Security) info in this frame | 0/1 |
| Strict ordering | 0/1 |
| Duration/Connection ID | ID or duration channel will be used (including MAC) |
| Sequence Controll | 4bit fragment number subfield <br> 12 bit sequence number |
#### Frame Address Fields

#### Management Frames

#### Control Frames, Data Frames

##### ACK

##### Request to Send

##### Clear to Send

#### Beacon Management Frame
* beacon frames can be used by client stations seeking wireless network to join or these client stations may use other frames known as probe request and probe response frames
* **Active scanning** uses probe request and probe response frames instead of the beacon frame to find a WLAN to join
* Station finds out network rather than waiting for network to announce its availability to all the stations
* **Passive scanning**: the client station listens (receives) in order to find the access points. This is done by receiving beacon frames and using them to find the access point for the BSS to be joined

## Bianchi - 802.11's primary MAC: The DCF
### Access mechanisms
A combination of both access mechanisms that depends on the packet length is possible but not further described in the paper.
#### Basic access mechanism
- Two-way handshaking technique
- Destination sends ACK directly after packet reception to confirm successful transmission
- Performance strongly depends on the system parameters (minimum contention window, number of stations)
#### RTS/CTS
- Four way handshake
- Collisions can only occur on short RTS frame
- Combats problem of hidden terminals (when pairs of terminals are unable to hear each other):
RTS and CTS both contain length of packet to be transmitted i.e. terminals always overhear for how long to back off and are able to update their NAV.
- is proven to be superior in most cases
- should be used in the majority of the practical cases
### CSMA/CA
Combined with one of the access mechanisms.
1. Wait for channel to be idle for DIFS time.
2. If still idle, start transmission of packet or RTS.
3. If no ACK or CTS is received after the transmission, a collision took place. Wait according to exponential backoff scheme.
*Exponential backoff scheme:*
After collision took place, update backoff timer to take a random value $\in [0,w]$ with $w$ beeing called contention window. $w$ is doubled after each unsuccessfull transmission until it reaches a max value. The timer is only decremented when channel is sensed idle.
### Performance evaluation
Provided model allows to compute the saturation throughput performance of DCF. The key assumption is: Constant and independent collision probability of a packet transmitted by each station, regardless of the number of retransmissions already suffered.
*Saturation throughput:*
Maximum (asymptotic) load that the system can carry in stable conditions. Difference to "maximum throughput" is: More system load cannot decrease the saturation throughput since it is defined as asymptotic throughput.

*[DCF]: Distributed Coordination Function
*[NAV]: Network Allocation Vector
*[RTS]: Request-to-Send
*[CTS]: Clear-to-Send
*[CSMA]: carrier sense multiple access
*[CSMA/CA]: carrier sense multiple access with collision avoidance
## Introduction to 60 GHz communication
* Millimeter-Wave: ~ 30-300GHz
* Recent release of unlicensed mm-Wave spectrum
* Frequency: 57-66 GHz (4.7 to 5.3mm wavelength)
* Bandwidth: 7-9 GHz depending on region
* 4 Channels or ~ 2GHz
* current Wi-Fi Frequencies 2.4GHz (100MHz Spectrum) and 5 GHz(555 MHz Spectrum)

* Equivalent Isotropically Radiated Power (EIRP):
* Power that an isotropic antenna would have to emit to match the directional reception
| Region | GHz | Transmit dBm | EIRP dBm | Antenna Gain dBi |
| --------- | --- | ------------ | -------- | -------------------- |
| US/Canada | 7 | 27 | 43 | 33 if 10dBm Transmit |
| Japan | 7 | 10 | 58 | 47 |
| Korea | 7 | 10 | 27 | 17 |
| Australia | 3.5 | 10 | 51.7 | 41.8 |
| Europe | 9 | 13 | 57 | 30 |
* Atmosperic absortion at very high frequencies
is very high at ~60GHz $\rightarrow$ desirable.
### Characteristics of 60 GHz communication
* Large spectrum: 7GHz
* 7Gbps requires only 1b/Hz (BPSK good enough)
* Complex 256-QAM is not needed
* IEEE 802.11ad defines multiple data rates between 385Mbps and 6.76Gbps for 60 GHz transmission
* Small antenna footprint
* 5mm wavelength, Antenna separation: 5mm/4 = 1.25mm
* 100-element 60GHz array easily fits in no more than a square inch
* Easy beamforming
* Antenna arrays on a chip
* Low interference
* Does not penetrate through walls. good for urban neighbors
* Directional antenna
* High spatial reuse
* Overcome limited range
* Inherent security
* difficult to intercept
#### Disadvantages
* High attenuation: Refer Friis formula
* Strong absorption by oxygen
* need higher transmit power: 10W is allowed in 60GHz
* Requires high antenna gain -> directional antennas
* short distance ~10m
* Deafness problem
* due to directional communication
* Neighboring nodes that are not within the transmit beam will be deaf toward the communication
* RTS/CTS is sub optimal
* Multicasting is difficult
* Susceptible to blockage
* Low penetration power
* High reflection
**mm-waves have a quasi-optical behaviour**
#### Antennas

High directionality with low beam widths overcomes the drawback of high attenuation. IEEE 802.11ad specifies beam width as narrow as 3 degree!
#### Directional Communication
* Directional communication scheme takes advantage of beamforming antenna gain to cope with increased attenuation in the 60 GHz bands
* Directional communication is needed due to the **quasi-optical propagation behaviour** of omni-directional transmission
* low reflectivity
* high attenuation
* introduces virtual antenna sectors
* each sector has a certain coverage
### IEEE 802.11ad Standard
#### IEEE 802.11ad Beacon
* Beacon transmissions are omni-directional
* one beacon is transmitted through every antenna configuration
#### IEEE 802.11ad Beam training
* Each station finds the optimal antenna configuration with its recipient using a two stage search
* Sector level sweep (SLS): First it sends in all sectors and finds the optimal sector
* Beam Refinement Procedure (BRP): It searches through the optimal sector to find the optimal parameters in that sector
* Stations can reserve a "Service Period" for this

#### Antenna Alignment
**Beam Search**
Binary search through sectors using beam steering
**Beam Tracking**
Some bits are appended to each frame to ensure the beams are still aligned

### IEEE 802.11ad MAC
* Personal Basic Service Set (PBSS)
* Group of stations that communicate
* PBSS Control Point (PCP):
* Provides scheduling and timing using beacons
* Beacon Interval
* A super-frame that is divided into:
* A Beacon Transmission Interval (BTI)
* Association Beamforming Training (A-BFT)
* Announcement Transmission Interval(ATI)
* Data Transmission Interval (DTI)
#### IEEE 802.11ad MAC: CSMA/CA
Carrier Sense Muliple Access / Collision Avoidance
* Well known, no need to set up schedule, low overhead
* Happens in contention based access period (CBAP)
* Does not require a centralized scheduler to manages medium access
* All stations using CSMA/CA access the channel with equal probability
* Limitation: Due to the use of directional antennas, the carrier sense (CS) function may not be able to perceive a busy situation correctly
* In the backoff procedure, PIFS is used instead of DIFS
#### IEEE 802.11ad MAC: SP
Service Period
* Similar to Time Division Multiple Access (TDMA)
* Designed for a **reserved time allocation for communication between a pair of stations**
* very efficient for stable traffic demands or strict QoS requirements
* requires to find and maintain a **schedule**
* improves energy saving since stations can go into sleep mode whenever they are not scheduled for transmission
* transmitting STA steers its antenna beam towards the designated receiver
* Configuration via RTS/DMG CTS handshake for interference elimination of nested SPs in PBSS enviroment
* Before SP start, STA listen for aMinListeningTime
* STA C/D can request SP reallocation by sending interference report
#### IEEE 802.11ab MAC: Dynamic Channel Access
* Based on polling access scheme which is a master-slave protocol
* *The AP (the master) polls each station (slave) periodically for transmit requests*
* centralized approach
* beam direction is known
* this avoids using the quasi-omni patterns
* Polling Period (PP)
* PCP/AP polls only those STAs that have inidicated their intention to participate in the PP, and the polled device sends an SP request in ATI
* Grant Period (GP)
* One or more Grant frames with the same resource allocation information are transmitted
**PCP Clustering**
One _Synchronization PCP_ is elected per cluster. He handles synchronization with S-PCPs/APs from other clustsers to prevent interference.
#### Spatial Frequency Sharing (SFS)
* _Multiple transmissions may be scheduled on the same frequency at the same time if they dont interfere_
* Commonly termed as "Concurrent transmission" in mmWave communication
* the potential of concurrent transmission in SP is identified through the values reported in each measurement unit
* Operating characteristics of SFS
* the PCP/AP shall transmit a Directional Channel Quality Request, with the measurement method set to RSNI, to each spatial sharing capable STA involved in a Time-Overlapped and existing SP
* the PCP/AP should stop the spatial sharing of two or more SPs if it determines that the link quality of any of the links involved in the spatial sharing has dropped below acceptable levels
#### IEEE 802.11ad Relays
* mmWave links are susceptible to blockage and relay helps to route the transmitted information to the designated receiver
* to improve link resilience against sudden interruptions, IEEE 802.11ad introduces the following relays techniques
* **Link Switch Relays**
* MAC relays like a switch. Receive complete frames from the source and send to destination
* **Link Cooperation Relays**
* PHY relays like a hub
* Amplify and forward (AF) or decode and forward (DF)
* Destination may receive direct signal and relayed signal
* Spatial diversity
# Chapter 6 - Low Power Wireless Communications
## Goals
> Introduce bluetooth, a successful low-power wireless standard for WPAN (wireless personal area network) communication.
> * Obtain an overview of the PHY and MAC layers of bluetooth.
> * Understand the differences in the PHY and MAC layers between bluetooth classic and bluetooth low-energy.
> * Understand how BLE design its protocols for the goal of low-energy.
> * Understand the basics about bluetooth mesh.
> First introduce 802.15.4, a successful WPAN standard that covers the PHY and MAC layers. Then introduce Zigbee standard, which is based on 802.15.4 and provides the NET and upper layer functionalities.
> * Understand the basics of IEEE 802.15.4.
> * Understand the NET layer of Zigbee.
> * Commonality and difference between Bluetooth and Zigbee.
## Bluetooth Introduction
Low power, short range wireless technology for WPAN. Bluetooth classic (basic data rate BR / enhanced data rate EDR) for continuous communication while bluetooth low energy (LE) for bursty communication. Three application areas exist: Real time voice and data transmissions, cable replacement, ad hoc and mesh networking.
*[RF]: Radio Frequency
*[FHSS]: Frequency Hopping Spread Spectrum
### Bluetooth Classic
Located on RF band 2.4GHz with 79 RF channels, each taking 1 MHz. FHSS used is used because of noisy RF band. Devices are divided into **three classes** according to their TX-Power with class 1 having max 20 dBm and typical LOS range of 100m, and class 3 devices a max of 0dBm output power and a LOS range of 1m.
The **modulation** results in 1 Msps in both BR and EDR. However BR uses GFSK (Gaussian FSK) while EDR uses DQPSK (Differential quaternary PSK).
#### MAC Layer
A **piconet** is the basic unit of networking. It consists of one **master** and one to 7 **slaves**. The communication is **bi-directional**. The master determines the **communication scheduling**, i.e. the frequency hopping sequence (FHS) and clock. Communication uses a **TDMA scheme** where slaves are **polled** by the master. Each active slave has an 8-bit **logical transport address (LT_ADDR)**.

A **scatternet** consists of two or more connected piconets. A **bridging node** joins two piconets for that to happen (can be master in one piconet and slave in other).
#### Frequency Hopping
Deterministic algorithm depending on master's clock and master's 48-bit bluetooth address (BD_ADDR) decides about **hopping sequence** of the piconet. Therefore one device cannot be master of two piconets ($\rightarrow$ identical hopping sequences).
Communication in **TDMA polling scheme** where master only starts transmission in **even** slots, and slave only starts transmission in **odd** slots. Packets are 1,3 or 5 slots long and hopping stops during one transmission. Different piconets use different hopping schemes (FHMA), while within one piconet transmission occurs in different time slots (TDMA). **Advantage of FH** is resistance to narrow band interference and co-existence with WiFi on the same band.
#### Adaptive Frequency Hopping
Adaptive frequency hopping introduced to avoid static interference. Each channel determined by the master as good or bad. Hopping only occurs on good channels (min 20 out of 79), with half the frequency of non-adaptive hopping, i.e. min 2 consecutive time slots are used per channel.

#### Logical Links
Three types of logical links exist:
1. _Synchronous Connection Oriented (SCO):_ Two consecutive slots are reserved at a fixed interval. No retransmissions allowed.
2. _Extended SCO (eSCO):_ Extends SCO and allows asymmetric transport and retransmissions. Adds a retransmission window after each two SCO slots.
3. _Asynchronous Connection-Less (ACL):_ No slot reservation possible and cannot transmit in slots taken by SCO and eSCO. Only one ACL link exists in one piconet. Unicast packets should be acked.
SCO and eSCO are used for data that requires a fixed delay and can tolerate packet loss (e.g. real-time audio-streaming). ACL is used when data requires guaranteed reliability but can tolerate delay (file transfer).
#### Link Layer state machine

Devices in **Standby** can **inquire** to join or be invited to join (**Page**) responding with its access code. In **sniff** mode a slave listens after fixed sniff intervals at reduced rate, while in **hold** state a slave gives up its ACL transport, but retains its SCO and eSCO transport. A node in hold can do scanning, inquiring, paging or **joing another piconet** (as bridge node e.g.)
### Bluetooth Low Energy
Emerged because of the need for very low energy communication. Bluetooth classic and BLE don't talk to each other. RF band 2.4 GHz, 40 RF channels, two neighboring channels separated by 2 MHz. Modulation is GFSK.
#### Frequency Hopping
**Piconets** exist as known from Bluetooth classic, but with no limit on the number of slaves. Out of the 40 RF channels, 3 are for advertising and strategically chosen to avoid interference with WiFi and 37 for data packets. Frequency hopping algorithm is **different for each master-slave pair** and happens only on every connection event (a packet exchange after a sleep period):
$$
\underset{\text{next channel id}}{f(n+1)} = [\underset{\text{current channel id}}{f(n)} + hop] \mod 37 \\
hop: \text{Value between 5 and 16, randomly chosen by the master}
$$
#### Adaptive Frequency Hopping
AFH exists as in Bluetooth classic, however AFH may use at least 2 channels instead of 20. Remapping works as following:
Let $Map$ be the channel map of good and bad channels, and $Good$ an array containing the good channels with w.l.o.g. $|Good|=9$. If the channel hopping formula leads to $f(n+1)=14$ and 14 is a bad channel, then it is remapped to $Good[14 \mod 9] = Good[5]$ i.e. the 5th element of $Good$.
#### Link Layer State Machine

**Advertising** state is for devices that want to be discovered, connected to or want to broadcast data. In **Scanning** the master scans for devices that are in Advertising mode. **Connected** state can be entered by slaves only from advertising and by master only from **Initiating** (where master waits for device to connect).
Only **2 types of packets** exist: Data packets and advertising packets. Both are much shorter than in Bluetooth classic.
**Low power optimizations** in BLE are:
- Short packets $\rightarrow$ will not heat up the silicon
- Low overhead in packets
- Channel hopping adapted to stay longer on good channels
- Slave can ignore pollings to save energy.
### Bluetooth Mesh
Enables **many-to-many** communication and is based on BLE. Advantages are **multihop communication** and resilience in communication (no single point of failure). Application scenarios lie in the IoT domain. It uses **managed flooding** to relay its information.
**Publish and Subscribe** system used to publish or subscribe to **virtual adresses**. E.g. A light switch can publish to two virtual adresses, _Kitchen_ and _Garden_. Light bulbs that subscribe to those adresses will turn on when the adresses are published to.
Four optional **features** for a node are possible:
1. _Relay:_ Capable of retransmitting packets.
2. _Proxy:_ Can act as proxy for BLE device not capable of BT Mesh.
3. _Friend:_ Can buffer messages for energy constrained device and only deliver them when polled.
4. _Low Power:_ Counterpart to friend.
## IEEE 802.15.4
### IEEE 802.15.4 PHY
Lies in 2.4GHz band, 16 channels (#11-#26, 1-10 are rarely used and have different characteristics). 4 data bits grouped into a symbol ($\rightarrow$ 16 symbols), one symbol mapped to 32 chip sequence (DSSS), the chips are OQPSK (Offset QPSK) modulated.

#### DSSS
DSSS maps a message symbol into a PN (pseudo noise) chip sequence. **Advantages** are mainly the robustness against time-domain interference as well as frequency-domain interference. An obvious **disadvantage** is the low data rate in terms of the used bandwidth.
### IEEE 802.15.4 MAC
#### Device classes
Each PAN has exactly one PAN Coordinator and zero or more other coordinators. The devices are addressed by a 16-bit **short address** assigned by a coordinator, can however also be communicated to by using the 64-bit **Extended Universal Identifier (EUI-64)** set by the manufacturer. The different classes are:
- _PAN Coordinator:_ Principle controller of a PAN
- _Coordinator:_ Provides coordination and other services to the network
- _Full Function Device (FFD):_ A device that is capable of serving as a coordinator
- _Reduced Function Device (RFD):_ A device that is not capapble of serving as a coordinator. Can only talk to FFDs.
#### Topologies
Two topologies are possible:
- _Star topolgy:_ Communication happens only between PAN Coordinator and a node.
- _Peer-to-Peer (Mesh) topology:_ Communication between any two nodes that are not RFDs possible.
- _Cluster Tree:_ A special case of P2P topology. A PAN Coordinator instructs an FFD to become the PAN Coordinator of a new cluster (PAN) adjacent to it. Each PAN gets a unique PAN ID.

#### MAC Frames
4 types of MAC frames exist: Data frames, beacon frames, acknowledgement frames, MAC command frames.
The MAC layer supports two modes. **Beacon-enabled** mode and **Non-beacon enabled mode**.
In **Beacon-enabled mode** PAN coordinators send beacons periodically to synchronize nodes, identify the PAN and describe the structure of the superframes. **Slotted CSMA/CA** is used to access the channel in **CAP (contention access period)**, while the channel can be accessed without CSMA in **CFP (contention free period)**, where GTS (guaranteed time slots) are distributed. In the inactive portion nodes may sleep.

The coordinators form a tree structure where the superframe is received, processed and then another superframe transmitted to its children. The superframes may not overlap.
The other mode is the **Non-beacon enabled mode**. Beacons are not used here, and **Unslotted CSMA/CA** is used to access the channel. This mode is used by Zigbee.
#### Starting a PAN
To start a new PAN the PAN Coordinator first measures the peak energy in each channel to find a clear one (called **ED channel scan**). Afterwards follows an **active channel scan** that consists of sending beacons on all channels to find all coordinators transmitting beacons within its communication range. Now the PAN Coordinator knows the IDs of co-located PANs.
The process of a device joining a PAN is called **Association**. It is initiated by the device to the coordinator that again has to communicate with its coordinator to be able to give a response. **Deassociation** can be initiated by both parties.
### ZigBee
Low-power, short-range wireless technology for WPAN (competitor to BLE). It supports multi-hop communication (as Bluetooth Mesh) and uses the Non-beacon enabled mode specified by 802.15.4 adding upper layer functionality.
Zigbee has **3 device classes**:
- _Zigbee Coordinator (ZC):_ Nodes that can form networks
- _Zigbee Router (ZR):_ Nodes that can route packets and understand mesh networking
- _Zigbee End-Device (ZED):_ Nodes that can sleep to extend their battery life
#### Address assignment
Is possible via **cskip** or stochastic. Cskip guarantees conflict-free assignment and a node can tell its predecessor only by address. However it only supports trees up to a depth of 5 (16 bit address space). cskip has three parameters: **MaxDepth, MaxChildren, MaxRouters**. Using these cskip can be computed recursively from low level to high level using the formula:
$$ cskip(n-1) = cskip(n) * MaxRouter + MaxChildren\ –\ MaxRouter + 1 \\
cskip(MaxDepth) = 0 \\
cskip(MaxDepth - 1) = 1
$$
After having computed the cskip-values for all depths, addresses can be assigned. Two different formulas apply for router children and for end-device children.
$$ Addr(Y) = Addr(X) + (i - 1) * cskip(level(X)) + 1 \\
Addr(Z) = Addr(X) + MaxRouter * cskip(level(X)) + j
$$
$Y:$ The $i$-th router child of $X$
$Z:$ The $j$-th end-device child of $X$
**Example**

#### Routing
Zigbee supports 4 different types of routing. The link cost in Zigbee can be found on the formula sheet. It is
$$C(l)=\begin{cases}
7,\ \text{irrespective of link quality}\\
\min\left(7,round\left(\frac{1}{p_l^4}\right)\right), \text{based on link quality}
\end{cases}
$$
$p_l$: probability of packet delivery on link $l$
$\frac{1}{p_l}$: **ETX**, the expected tx times to send a packet on link $l$ successfully
Link cost is a integer in ${1,2,...,7}$
##### Broadcast
One-to-many communication. Initiator sets **destination address** and **radius**. Upon reception, a receiver acks the reception to the sender, decrements radius and forwards the packet. Every packet is only forwarded once by every node.
In the **Multicast** variant nodes that are not in the same broadcast-group (same 16-bit address) can help to bridge the distance to other devices from the broadcast group. A **non-member radius** is additionally defined and works similar to the radius property.
##### Mesh Routing
Exactly the same as [AODV](#Ad-Hoc-On-Demand-Distance-Vector-Routing-AODV) from Ch. 8. A ZED only communicates with its parent.
##### Tree Routing
Assumes cskip-addressing. Since a node knows the address range of its descendants, routing is possible without problems.
##### Source Routing
Exactly the same as [DSR](#Dynamic-Source-Routing-DSR) from Ch. 8. Especially useful for cases where AODV routing table does not fit into memory.
# Chapter 7 - Wireless Sensor Networks
## Goals
Low-latency and reliable communication in WSNs:
> Understand the importance of the physical layer for improving communication performance in wireless sensor networks.
> Build knowledge on different approaches towards high performance communication.
High performance protocols in WSNs:
> Understand the working of the consistency protocol Trickle and how it achieves fast yet low cost information propagation in the network.
> Understand the working of the collection protocol CTP, the interaction between control plane and data plane, specifically, datapath validation and adaptive beaconing.
## Motivation on low-latency and reliable communication in WSNs
Sensor nodes are small, cheap, can run with battery and have lots of sensors.
Example application: Monitoring biological habitat, creating large spatial and temporal dataset
- high efficiency
- low throughput
- low reliability
- loose latency requirement
In **industrial environments** low-latency and reliable communication however is a must!
## The Glossy protocol
One-to-all communication. All nodes in the network wake up simultaneously and periodically for communication. Multiple nodes broadcast same packet concurrently in a wave-like manner.

- Network wide flooding based on constructive interference (CI)
- Free time synchronization (more accurate when node is closer to initiator)
- High reliability (increases with max. # of transmissions per node)
- Low latency (decreases with additional signal strength)

Downsides:
- Can be unreliable (< 75%) in very dense networks
- CI is not always achievable
**Constructive Interference (CI):**
Contrary to common wisdom, concurrent transmission does not nessarily lead to packet corruption. It may even improve signal strength.
If maximum time displacement among concurrent transmissions $\Delta \le 0.5 \mu s \Rightarrow$ Constructive Interference.
## The Chaos protocol
All-to-all communication. All nodes transmit concurrently and slotted as in Glossy. Collisions do not occur because of the capture effect.
- Amount of nodes has to be known in advance
- High reliability
- Low latency
*Capture effect:*
Adjacent nodes use a significantly different transmit power. The packet which has a greater SNR dominates the weaker packets.
*[SNR]: Signal to Noise Ratio

**How it works**
Every packet contains the payload and the flags. After $B$ receives a packet from $A$, $B$ does an $\texttt{or}$ operation on the flags and merges the payload (e.g. by $max$ operator). If $A$ had more/less or diffrent flags set, B will transmit its packet in next round to share the new information (either with $A$ or other nodes).

## The Sparkle protocol
Routing free nature of Glossy. However used for multi-loop periodic control systems.
**WSNShape** is the name of the Routing system. It is a similar idea to source routing, combined with glossy-like flooding. Each node is only allowed to broadcast once while the packets contain a route from the source. The capture effect produces a route at the destination. High success rate although not always (~99.5%).
**PRRTrack** is another feature of Sparkle. It adaptively minimizes latency and energy consumption to meet a reliability requirement. 4 Modes exist. Rule:
If current mode is reliable $\rightarrow$ find a more energy-efficient one.
If current mode is unreliable $\rightarrow$ find a more reliable one.
## The Ripple protocol
An extension to Glossy that aims to improve throughput and energy efficiency by **pipeline flooding** as well as reliability by **error correcting codes**. Throughput is up to 3x higher than Glossy, energy efficiency up to 3x as well. Balance between high reliability and high throughput can be tuned by _transmission interval_.
## The Trickle protocol
* Achieve **consistency** for all nodes in a network
* code update. each node gets the most up-to-date code
* routing. each node gets a correct estimate of the routing metric
* seems that a simple network flooding will work
* But it is not true, especially when nodes are unsynchronized, as the overhead of unsychronized flooding is high
* periodic update initiated by a fixed node can be done by glossy
### Broadcast Storm Problem
Lots of broadcasts at the same time
$\rightarrow$ Saturate the network and cause lots of collisions and energy wasting.
### Ideal Consistency Protocol
* react to a change rapidly
* propagate a change rapidly
* minimum communication cost for propagation
* when there is no change, no (little) communication
* applicable to all network topologies
* any node density
* any quality
### Trickle Overview
* State-of-the-art consistency protocol (algorithm) used by many other protocols and applications
* operates over time intervals
* no synchronization needed between nodes
* _in each interval, node optionally transmits for once_
* polite gossip: transmits if it hasnt heard enough transmissions that are consisten with its own
* dynamically change interval lengths to have fast updates when inconsistent and low cost when consistent
#### Suppression of transmissions
Motivation: dont transmit if many nodes agree on transmission
For given interval length $\tau$ and redundancy constant k
* Node picks a random time t in the interval
* At beginning of interval, set counter c = 0
* On hearing consistent transmission, c= c+1
* At t, transmit if c < k (practically k = 1 or 2)

When unsychronized, the interval of a node may start after a neighbor has broadcasted. This leads to unnecessary transmissions.
#### Listen-only period
t is selected randomly in the second half of a period $(\frac{\tau}{2}, \tau]$.
The first half is only for listening.
This is to solve the problem of unnecessary transmissions in an unsychronized network.
#### Adapt Intervals
**Goal:** fast and low cost update
* Select min and max intervals such that $\tau_l << \tau_h$
* Adapt the interval $\tau$
* at the end of interval, double $\tau$ up to $\tau_h$
* on hearing new code summary (version number), a node resets $\tau$ to $\tau_l$ and starts a new interval immediately
* On installing new code, the initiator resets $\tau$ to $\tau_l$ and starts a new interval immediately
* on hearing old code summary, a node sends the new code update
* consisten network has large interval $\tau_h$
* after getting new information, quickly propagate
### Trickle Conclusions
* Trickle is flexible, any node can start update at any time
* Trickle achieves fast and low-cost update
* Trickle has low overhead and is easy to implement
* adapt to topologies with optimal logarithmic transmissions in terms of node density
* Trickle is useful for many protocols, such as CTP, RPL, etc
## The CTP protocol
* data collection protocol
### Architecture
**Architecture of Traditional Routing Protocols**

**Architecture of CTP**

#### Routing Metric
* each node maintains its route cost to the sink
* Link ETX (expected transmission times) = 1/p (p is the link reliability). ETX is a very good routing metric
* The route cost (path ETX) is sum-up of link ETX
* Sink has path ETX of 0
* next hop is the next node on the path with the **lowest ETX**
* **ETX is estimated with both beacon and data packets**
### Two novel principles of CTP
#### Datapath Validation
* Use data packets to validate the topology
* receiver checks for consistency on each hop
* same time-scale as data packets
* validate only when necessary

* inconsistency:
* Receivers route cost is larger than in the packet
* on inconsistency
* dont drop the packet, buffer it for a while
* signal the control plane to set beacon interval to minimun
#### Adaptive Beaconing (build on Trickle)
Problems of periodic beaconing:
* Effiency: Send too fast: waste energy, network congestion
* Agility: send to slow: cant react fast enough to topology change
Solution:
* routing as a consistency problem
* use trickle algorithm
##### Algorithm
* start with a minimum time interval
* Double the time interval up to some maximum value
* reset time interval to the minimum when:
* forward a packet from a node whose route cost is not higher than its own **routing inconsistency**
* its route cost decreases significantly (practically, path ETX changes more than 1.5) **May provide better routing for neighbors**
* Receive a packet with "P" bit set. (A neighbor is pulling route costs)

### CTP Conclusion
* Wireless routing benefits from data and control plane interaction
* The ideas of datapath validation and adaptive beaconing can be applied to distance vector routing
# Chapter 8 - Ad hoc networks
## Goals
Introduction:
> Identify and highlight application requirements for Mobile Ad Hoc Networks (MANET)
> Understand the MANET ecosystem : mobility, user density, etc.
> Derive requirements for MANET routing
Selected Routing Protocols:
> Discuss working of selected MANET routing protocols/paradigms
> Explain the detailed working of the discussed routing protocols
> Understand trade-offs in choosing appropriate routing protocols
Dependability:
>Discuss research in the area of MANETs
> Identify appropriate models to describe MANETs
> Highlight open research questions in the MANET domain
## Introduction and motivation
#### Terminology, basics and applications
MANET: Mobile Ad Hoc Communication Networks
- **Self-organizing**, mobile and wireless nodes
- **Multi-hop routing** neccessary, absence of infrastructure
- Systems are **terminals** and **routers**
- **Constraints** (dynamics, energy, bandwidth, link asymmetry)
Application scenarios:
+ Military: Battlefield communication, smart dust to detect chemical or biological threats
+ Civilian: Entertainment, Filesharing, Car-to-x, smart dust for home applications, ...
+ Freifunk
*[link asymmetry]: Device A may be able to send data to device B, but not the other way round.
*[smart dust]: Sensor networks.
#### Ad Hoc vs the Internet Model
Ad Hoc networks are similar to P2P networks. Important difference: P2P is on application layer, Ad Hoc builds focuses on network level and below. Coexistence is possible / synergetic.
## Understanding Ad Hoc Routing
One may try to move from mobile to stationary, mesh-like multihop scenarios. E.g.: Street lamps as foundation for Ad Hoc network. BUT: Never really worked out until now.
### Characteristics of Ad Hoc Communications
Characteristics ($\rightarrow$ challenges) are dominated by heterogenity and variability.
- *Mobility:* Speed, predictability, uniformity, ...
- *Wireless:* Broadcast nature, limited range, packet losses, ...
- *Application characteristics and patterns:* P2P, realtime, unicast, multicast, ...
- *System characteristics:* Distribution, absence of infrastructure, ...
Inherent heterogenity:
Nodes have different capabilities, responsibilities and constraints. Some nodes may route packets, others may act as leader, battery life may differ, transmission ranges as well.
#### Mobility models
Hard to guess how many nodes are needed and where to put them (e.g. Darmstadt Stadtmitte: Buildings? Parks? Streets?) $\rightarrow$ mobility models help.
- Synthetic mobility model: Easy to use, but unrealistic for large scenarios. Each node selects a random path and walks in that direction
- Empirical workload / mobility models: Data hard to obtain, generalization not easy because bound to specific past scenario
- Hybrid workload / mobility model: flexible while realistic, traffic and mobility separated, but data still hard to obtain, lots of parameters
$\rightarrow$ trade-off
#### Ad hoc routing
Requirements for *routing protocol*:
- Needs to converge fast
- Minimize signaling overhead
*Routing strategy* may have different focus:
Shortest distance, minimum delay, hop count, minimum interference, ...
Standard internet routing is not enough.
### Ad Hoc Routing paradigms
Flooding of data packets
- Simple but extremely high overhead
- Often used for flooding of control messages for route discovery
- Overhead is amortized by more efficient data packets
Uniform protocols: All nodes behave equally
- topology-based vs destination-based
- proactive vs reactive
Non-uniform protocols
- Can be categorized in topology-based, destination-based, proactive, reactive as well
- Hierarchical, geographic, flat protocols, ...
*[topology-based]: A node builds a map of the network and can use it for routing
*[destination-based]: Node only remembers: What is the next node that I have to forward a package to
*[proactive]: Routing information is continously spread through the network to have it when it is needed
*[reactive]: Routes are constructed just when they are needed
#### Routing algorithm performance
Effectiveness: Ability to find a route to a destination
Efficiency: Ratio between route usefulness and overhead
Different performance, cost-metrics possible: Distance, latency, ...
## Selected Routing protocols
### Ad Hoc On-Demand Distance Vector Routing (AODV)
- uniform
- destination-based
- reactive routing
#### Route discovery
- Route request (RREQ) is flooded to all nodes
- RREQ is forwarded (broadcast) only once at max
- Nodes set up a reverse path towards source $S$
- Destination node $D$ unicasts a route reply RREP to the source
- Nodes set up a forward path pointing to $D$
#### Route maintenance
- Timers to keep route alive. After timeout-interval route entry is deleted (even if route may still be good)
- For every reverse path entry
- For every forward path entry
- Destination sequence numbers to determine fresh routes
- To avoid using old/broken routes
- To prevent formation of loops
#### Route Error
- Route error (RERR) generated when forwarding is not possible from node $X$ to $Y$
- $X$ increments destination sequence number for $D$. Sequence number is included in RERR
- RERR is sent back to $S$.
- After $S$ gets RERR, it initiates a new route discovery for $D$
#### Summary
Target networks: Where routing churn is high enough that proactively maintaining routes in unproductive.
#### AODV Optimizations
##### Gossiping
Flooding is very inefficient. We can use probabilistic techniques to improve performance.
Gossiping: Person $A$ is told a rumor. It shares this rumor with probability $p$ to a fixed number of people. Probability for keeping it a secret: $1-p$. Variations exist.
##### AODVM - Multipath extension
$\neq$ Multicast. Multipath variant for AODV. Instead of dropping duplicate RREQ packets, AODVM uses an RREQ table to store the redundant RREQ information.
| Source | Neighbor | Distance |
| -------- | -------- | -------- |
| S | J | 4 |
| S | M | 4 |
* $D$ initiates RREP for each RREQ received
* Nodes overhear RREP packets and delete their neighbors from table if they are already in a route
### Dynamic Source Routing (DSR)
- uniform
- topology-based
- reactive
#### Route discovery
Similar to AODV. RREQ is also flooded. Difference is:
- Each node appends its own identifier when forwarding RREQ
- No routing tables are kept
Potential for collisions!
*Collisions:* Two nodes who do not know each other send packets to a third node $C$. Possibly $C$ cannot decide which one to take or decode any because of PHY-layer interference.
RREP is sent by $D$ along the route contained in RREQ. RREP also contains route from $S$ to $D$. $S$ chaches the route received in RREP.
*We are assuming symmetric links, otherwise another RREQ is needed for an answer.*
#### Data delivery
Data header contains whole route from $S$ to $D$ ($\rightarrow$ packt size grows with route length). The nodes forward according to the contained path.
### Location Aided Routing (LAR)
- non-uniform
- location-based
- geographical protocol
*[location-based]:Limits number of nodes involved by estimating location
*[geographical protocol]:Uses geographical information (usually GPS-information)
Expected zone for destination $D$ is estimated using: *Last known position, speed, direction*. Route requests are only forwarded into/within the Request Zone (explicitly specified in RREQ).
Request Zone $=$ Expected zone $+$ location of $S$.
Geographical position estimation only works well under certain conditions! If RREQ within Request Zone fails, another RREQ is started with bigger Request Zone (e.g. entire network).
#### Variation: Adaptive Request Zone
$S$ specifies Request Zone in RREQ, but each node may modify it because it has more recent information.
#### Variation: Implicit Request Zone
A RREQ is is only forwarded from $A$ to $B$ if $B$ is thought to be closer to the destination $D$.
#### Variation: Query Localization
Limits RREQ propagation by not using physical location but *closeness* to previously known route.
Heuristic for closeness:
- New path is tried that contains at most $k$ new nodes (that were not present in old path)
- Old path is piggybacked in RREQ limiting the propagation
#### Summary
Advantages: Reduces scope of flooding and overhead of route discovery.
Disadvantages: Nodes need to know their physical location. Obstructions for radio transmissions are not taken into account.
### Optimized Link-State Routing (OLSR)
- non-uniform (MPR selection)
- flat (non hierarchical)
- proactive
- topology-based
> **Reminder: Link state routing**
> The nodes ...
> * periodically flood the status of their links
> * re-broadcast their neighbors' status
> * keep track of link state information.
**O**ptimization of LSR: Only selected nodes (MPR: multipoint relays) rebroadcast while flooding. Local optimization $\rightarrow$ global benefits.
#### MPRs
Any 2-hop neighbor must be covered by at least one mulitpoint relay. Number of MPRs should be minimized (per node).
Heuristic for computing MPRs:
1. Start with empty set.
2. Add each neighbor that is the only one covering some 2-hop neighbor
2-hop neighbors are discovered by overhearing HELLO-messages from neighbors that are broadcast.

#### Target networks
- large, dense networks
- with not much mobility
- low routing latency
## Dependable Ad Hoc Routing
#### Nodes misbehavior
Two possible ways of node misbehavior in routing system: Selfish nodes and malicious nodes.
*Selfish nodes:* Optimize their own gain, neglecting welfare of others (by dropping packets).
*Malicious nodes:* Inject false information and remove packets from the network (black holes).
#### Metrics for dependability
- Sent packets [bytes], goodput [bytes], lost packets [bytes]
- Mean/max end-to-end delay [ms]
- Mean/max path length [hops]
- Total # of routing messages [#]
*[goodput]: Application level throughput
#### Selfish nodes
Have a big (linear) impact on packet loss and have an impact on routing overhead as well.
Gossiping can help to reduce the number of control messages in comparison to normal AODV with lots of selfish nodes.
#### Black holes
Successful communication only in close proximity possible. Packet loss is (1) extremely high even for few black holes (2) increases with mobility.
#### Summary
Protocols and QoS-strategies assume only well-behaving nodes which is unrealistic!
## Efficient Network Flooding
Efficient flooding possible by forwarding a message directly after receiving it omitting the MAC-Layer $\rightarrow$ Many nodes transmit concurrently.
- Works for 802.15.4 Glossy with DSSS
- Unexplored for 802.11
#### Basic scenario: Two concurrent transmissions
802.11 DSSS typically achieves high frame reception rates while 802.11g (OFDM) suffers many frame reception errors. Application is challenging but possible. There is room for improvement because we have lots of white space (even for OFDM). This is current research.
*CFO: Carrier frequency offset*
*TO: Timing offset*
## Challenges
Challenges on every OSI-Layer. Examples follow.
#### Smart / directional antennas
MIMO: Spatial multiplexing. Every antenna gets its spatial stream with own channel.
Problems:
- MAC and routing for ad hoc networks with such antennas?
- How to deal with ad hoc network with different antennas?
#### Autorate fallback MAC protocols
TX rates are adapted to connection status. If $n$ ACKs fail, the rate drops. Other possibility: Receiver suggests a rate when sending CTS in RTS/CTS
#### More challenges
* Layer 2 scheduling: When multiple packets are pending, what to do next?
* Routing issues: How to design adaptive protocols since there is no "one size fits all"
* Security issues: New attacks possible in MANETs
# Chapter 9 - Cellular Network
## Goals
> Understanding the key idea and importance of frequency reuse in cellular network
> Discuss the need for evolution in cellular network
> Identify how mobility is handled in cellular network: handoff
## Introduction to Cellular Network
Designed to reuse frequency. A base station (BS) transmits to and receives from mobile stations. Network is organized in cells. The cell size depends on the use case (Macro, Mikro, Pico, Femto). In villages you might use a macrocell, in busier areas smaller cells.
### Cell structure
Space division multiplexing. Mobile stations communicate only over BS. Cell size ranges from 35km (rural areas) to ~100m in cities. The Base Station transmission areas overlap to ensure full coverage. Characteristics:
- More efficient (higher capacity, more users, less TX-power needed)
- Handover neccessary
- Interference with other cells possible
Different models of **Frequency Allocation** possible:
- _Fixed frequency allocation (FCA)_
Fixed assignment of frequencies to cell. Problem: Could be more efficient because of different traffic load in different cells.
- _Dynamic frequency allocation (DCA)_
Base station chooses frequencies depending on the frequencies already used in neighbor cells. More capacity in cells with more traffic. Problem: Allocation scheme is more complex.
### Capacity enhancement
A cell can be divided into a smaller coverage area to accomodate a very high density of mobile subscribers. By planting (temporal) additional base stations you increase the number of available frequency bands per area as well as the SNR at the mobile stations (because BS is closer). Number of handovers increases as well.
To further reduce inter-cluster interference, cell is sectorized. Usually 3 or 6 directional antennas are used for that. A layered cell structure is used as well with big "umbrella" cells allowing low-speed traffic, and small cells within them permitting high-speed traffic.
When $ClusterSize=N$, there are $N$ cells within this cluster. All cells that use the same frequency are in the same **frequency group**.
### Frequency reuse
Notation:
$N \times S \times K$ frequency reuse pattern
$N:$ Number of cells per cluster
$S:$ Number of sectors in a cell
$K:$ Number of frequency allocations per cell

Given the total Bandwidth $B$, how much each user requires $W$, the ClusterSize $N$ and the cell amount $C$, the number of supported users $n$ can be computed by:
$$ n = \frac{B}{W} \times \frac{c}{N}
$$
| Types of interference | Meaning |
| :----------------------------- | :----------------------------------------------------------------------------------------------- |
| Co-channel interference | Use of same frequencies in different clusters |
| Adjacent channel interference | Usage of adjacent frequencies within a cluster |
| Fractional frequency reuse | Users close to BS use all subchannels, while users at boundary of cell receive only a fraction. |
## Evolution of Cellular Network
Not relevant for exam.
## Mobility management
When do you switch between cells (i.e. do the handoff / handover)?
Handover reasons:
- Unser is moving between cells while communicating
- Current channel has bad conditions
- Balance load between cells
- Minimize power consumption and global interference
| Type of handover algorithm | Description |
| :--------------------------------- | :------------------------------------------------------------------------------------------------------------------------- |
| Network controlled handoff (NCHO) | Link quality only controlled by BS. Centralized decisions. |
| Mobile assisted handoff (MAHO) | Mobile and BS both measure link quality, neighboring BS's link is only measured by mobile and reported to BS. BS decides. |
| Mobile controlled handoff (MCHO) | As MAHO, but in the end mobile decides about handoff. |
**Handover phases:**
1. Monitoring and link measurement (Performed continously)
2. Target cell determination and handover triggering (Trigger when $RSS_B > RSS_A + margin_{AB}$)
3. Handover execution
**Handover execution procedures:**
* _Hard handover_
Radio link to existing base station is released **before** radio link to new base station is established. Interruption of data flow but only support for 1 radio channel needed.
* _Seamless handover_
Radio link to existing base station is released **after** radio link to new base station is established. For short time 2 links are available
* _Soft handover_
2 (or more) radio links are available and active for a relatively long period of time. Improved QoS.
Handover is possible *intra-cell* (same BS), *inter-cell* (other BS), *inter-system* (another technology, e.g. 3G $\rightarrow$ LTE).
**Handoff failures** are possible due to various reasons:
- No channel is available on the selected BS
- Handoff is denied because of lack of resources
- Network takes too long to perform handoff
## Towards LTE
**L**ong **T**erm **E**volution of **UMTS** (**U**niversal **M**obile **T**elecommunications **S**ystem) was defined in 2004 as part of 3.9G Standard.
**UMTS aka 3G**
Uses DSSS. HSPA is a part of the 3G Standard.
- HSPA: High-Speed Down-/Uplink Packet Access
- Adaptive modulation and coding: Modulation can change upon worsening of user reception (e.g. user moves into bad reception area)
- Channel dependent scheduling (depends on traffic on other channels)
- High-order modulation (Up to 64-QAM)
- HSPA+: Evolution of HSPA with more Up- and Downlink speed
**EPS: Evolved Packet System**
First purely IP-based standard as base for LTE. Part of 3.9G Standard. UMTS was part of the 3G/3.5G standard which was still based on GSM. Uses flat architecture and EPC that is described later on.
## LTE Key features
Many different bands and flexible bandwidth. Uses Frequency division duplexing (**FDD**) and Time division duplexing (**TDD**). Beamforming is possible in the downlink. Supports up to 4x4 MIMO. The Modulation used is **OFDM** with up to 64 QAM.
Supports Hybrid ARQ Transmission, Short frame sizes, IP based flat network architecture to be described in the following.
**IP based flat network architecture:** All communication goes through flat, less hierarchical, IP-based architecture. Only some non-IP protocols are supported for backwards compatibility.
#### Hybrid ARQ
Normal ARQ (Automatic Repeat Request) retransmits a packet if it is received in error and previous (bad) bits are discarded.
In **Hybrid ARQ** PHY and MAC Layer work together in hybrid mode. There are two types:
* Type 1: Resend packet entirely. Afterwards combine good bits of multiple transmissions.
* Type 2: Resend parts of the previously errorous data until the data can be completely decoded.
#### Evolved packet core (EPC)
Four new elements in EPC:
1. _The Serving Gateway (S-GW):_ A mobility anchor when terminals move (base stations basically).
2. _Packet Data Network Gateway (P-GW):_ Gateway for all kinds of data-services, deep packet inspection, policy enforcement.
3. _Mobility Management Entity (MME):_ Location tracking, roaming, handovers, paging (using last known location to pinpoint current location).
4. _Policy and Charging Rules Function (PCRF):_ Policy enforcement (Such that you get the plan you actually paid for).
#### LTE frame structure
**Superframes** (10ms) that consist of **subframes**(1ms). Each subframe has 2 **slots**, one for DL, one for UL. Each slot consists of 6 or 7 **symbols**.

To reduce the Inter Symbol Interference (ISI) a **cyclic prefix** is introduced. After every symbol the first part of the symbol is repeated again. This increases the total symbol length but also lessens the symbol error rate.
In urban areas with a lot of multipath propagation effects, a short prefix can be used because signals that took different paths may have different parts that suffered from interference, making a recombination between them possible. In rural areas therefore the cyclic prefix is longer (called **extended cyclic prefix**).
#### LTE Resource Allocation
The resource allocation is handled by the **eNode-B**. It works on Physical Resource Blocks (PRBs), that consists of 12 subcarriers (we recall that OFDM is used) over 1 time slot. The minimum allocation per subframe are 2 PRBs. The eNode-B allocates the bandwith to devices and plans the traffic. The symbol length depends on the modulation coding scheme (MCS) used (e.g. $\text{64-QAM} \Rightarrow 2^6=64 \Rightarrow$ 6 Bits per symbol)
## LTE-A Techniques & Features
LTE-A has three key factors:
- Bandwidth of 100MHz using carrier aggregation
- Increased spectral efficiency due to higher order MIMO
- Increased cell sizes due to relays and Home eNBs
#### Carrier aggregation
Multiple bands (component carriers) can be combined to increase the bandwidth. This leads to more control overhead (unwanted for operator). Component carriers may even have _different serving cells_!

#### LTE MIMO
Up to 8x8 MIMO in DL and 4x4 in UL supported. It is only used when SINR is high. When SINR is low other spectral efficiency techniques are used, e.g. beamforming.
#### LTE Coordinated Multipoint Operation (CoMP)
CoMP is a range of techniques. It has two categories:
- _Coordinated scheduling or beamforming:_ While still only one eNB sends data to the device, scheduling decisions and details of beams are coordinated between multiple entities (so beams do not cross e.g.).
- _Joint processing:_ Data is transmitted to the UE simultaneously from several different eNBs while cancelling interference from other transmissions that are intended for this UE.
#### LTE Relay nodes
Difference between **Donor enB (DeNB)** and relay nodes. Relaying means receiving, demodulating, decoding, error-correcting and retransmitting, not only amplifying. Relay nodes and DeNB may operate on the same carrier frequency (Inband) or on different ones (Outband). Also there is a difference in how much delay is accounted for (Half-duplex $\Rightarrow$ sequential relaying, full-duplex $\Rightarrow$ real-time relaying with small delay)
#### LTE D2D
LTE D2D (device2device) is a peer to peer link that enables communication between two devices in proximity. It enables high data rate transmissions because the devices are so close, reduces interference and transmission power needed.
#### HetNet
HetNet envisions the interoperability of different radio access technologies (HSPA, UMTS, EDGE, GPRS, WiFi). Home eNBs (HeNBs) possible for indoor coverage (Femtocells).
##### Cell Range Extension (CRE) within HetNet
Scenario: Small cell within macro cell. Now: Allow small cell to serve more users by requiring UE to join small cell even if the power is slightly below the macro cell. Meanwhile the interference from macro cell is mitigated by coordination.
# Exercise 2: 802.11 Fairness
At each transmission attempt, a frame is successfully transmitted with probability $(1-p)$.
## Frame length influence
The achieved throughput depends on the frame length. In a collision: The longest colliding frame determines the collision time.
$\Rightarrow$ With basic access, the overall network throughput suffers from collisions with large frames! With RTS/CTS, there is a tradeoff between additional handshaking overhead and performance gain due to short collision times!
## Fairness
Bianchis key assumption (that each packet collides with constant and independent probability $p$) gives directly the fairness criterion.
$\Rightarrow$ Each station has an equal chance to successfully access the medium on a transmission attempt.
This means that if two devices transmit with different frame lengths, the device with longer frame length will get more bandwidth (since their chance of accessing the medium is the same).
## UDP and TCP
Can coexist in a network. However UDP has less overhead. Therefore in a saturated network with 50% UDP and 50% TCP traffic, the UDP thoughput will be higher.
# Exercise 3
- RDC (Radio Duty Cycle) Protocols are in charge of energy saving in WSN. They decide on which percentage of the time the radio is turned on.
- Chaos protocol to be implemented, however based on CSMA, not concurrent transmissions. Each node maintains a bit map and a value. Communication relies on packet broadcast. A packet contains a bit map and a value.
- Two bonus tasks:
1. Fighting the premature termination: If a node has not completed and hasn’t heard valid packets for a random time t, then it proactively sends a packet.
2. Aggressively sharing upon completion: If a node is complete, it proactively broadcasts its data for 3 times.
###### tags: `2018` `recap` `TU Darmstadt` `wireless` `mobile networks` `overview` `networking`
_Proud authors of this recap: B.M. and N.S._