Politecnico di Torino
Mechatronic engineering
01NWDQW – Mobile and sensor networks
Appunti, esercizi svolti, domande teoriche
Docente: Carla Fabiana Chiasserini
Anno accademico: 2020-2021
WiFi
Base concept: CDMA vs OFDM
CDMA (Code Division Multiple Access): leverages on spread spectrum. Spreading sequences can be orthogonal (OFDM, simultaneous transmissions from different users do not interfere) or not (simultaneous transmissions interfere proportionally to the number of transmitters).
- Multiple CDMA transmitters send signals simultaneously; signals sum up.
- Receiver can extract the information it needs from the resulting signal.
OFDM (Orthogonal Frequency Division Multiplexing): divides the available bandwidth into several narrowband channels, with orthogonal carriers (done to minimize fading).
- Several parallel transmissions not colliding: no need for guard bands.
- Continuous transmission at low bitrate allows a low transmit power level.
802.11
- BSS: basic service set, nodes use the same coordinating function to access the channel.
- ESS: extended service set, many BSS connected at MAC layer; usually they are connected through LAN, wired MAN or WLAN; stations can move from one BSS to another while staying in the same ESS; BSS transition requires the cooperation of access points (APs).
Procedure to join a BSS:
- SCANNING: device gets in contact with the AP:
- Passive scanning: scan for a beacon periodically sent from the AP.
- Active scanning: uses ProbeRequests and ProbeResponses.
- AUTHENTICATION:
- Open system: the device sends an authentication frame with its identity and the AP replies with an ACK or a NACK.
- Shared key: device and AP share a secret key known in advance; AP sends an encryption challenge to the device (challenge can be only solved if the key is known).
- ASSOCIATION: an information exchange about capabilities and roaming begins; after the association, a station can receive and send data frames.
Physical layer
- IR (infrared)
- FHSS (Frequency Hopping Sequence Spectrum): frequency band is divided into narrowband channels; signals are transmitted by hopping from one frequency to another in a pseudo-random sequence; transmitter and receiver share the seed, generator of random numbers and phase; copes well with interference and eavesdropping.
- DHSS (direct sequence spread spectrum): band of the transmitted signal is significantly larger than the band of the original signal (narrowband wideband); power doesn’t change power spectral density is lower. The signal is spread by multiplying each info bit by a code sequence composed by 2 or more chips (“+1” and “-1” sequence); the receiver is able to de-spread the info (it knows the transmitter’s spreading sequence); final result is a signal undistinguishable from noise, with low power spectrum-density, robust to jamming and fading.
- Only channels 1, 6, 11 are used (since they are non-overlapping) in order to reduce interference; no more than three adjacent BSS are allowed; channels are 20 MHz wide; in real applications there are many AP close one another high frequencies are used to avoid interferences (we operate in the order of GHz).
- Multi-rate: rate fades as we get further from the AP; still, having a slow connection is better than no connection at all; control packets are sent at basic rate.
- 802.11 modes are half-duplex: one transceiver a device either transmits or receives, it needs few microseconds to switch from receiver (RX) to transmitter (TX).
Mac layer
- Based on CSMA/CA, preforms resource allocation, preforms data fragmentation and reassembly, MPDU address, MPDU format, error control.
- There are different types of frames:
- Control: positive ACK, handshaking (RTS/CTS).
- Data transfer: info to be transmitted to channel; can be either asynchronous (DCF) or synchronous (PCF with station polling).
- Management: connection establishment/release, synchronization, authentication.
- Time slots are 20 µs long: 15 µs for power detection + 5 µs for turnaround (RX to TX or vice versa).
- Interframe spaces: SIFS < DIFS < EIFS.
DCF (Distributed Coordination Function) mandatory implementation
- Based on CSMA/CA (contention procedure to access the channel at every transmission).
- Transmissions take place only if the medium is idle; if there are no errors and the channel is idle transmission; if there are errors EIFS.
- Busy medium: need to wait and defer the transmission by means of the exponential backoff (BO); if the medium is idle for DIFS the channel used for the transmission sees DIFS DATA SIFS + ACK; the other channels set the NAV lasting till SIFS + ACK is over.
- NAV: network allocation vector, stores the duration of the transmission occupying the channel; when the NAV is set the channel is seen as busy.
Solves problem of hidden terminals
DCF with handshake
- If the medium is idle for DIFS the channel used for the transmission sees DIFS RTS SIFS CTS SIFS DATA SIFS ACK; the other channels set the NAV lasting till SIFS + ACK is over.
- RTS and CTS are short: collisions are less likely; similar to CD.
- If a collision occurs (only the CTS can collide): BO is performed and the NAV is set with the info contained in the RTS.
- Basic access mode carrier sensing: the transmitter has to listen to the channel to know if it is idle (uses power detection in physical carrier sensing, the header points out the duration of the MPDU in the MAC).
- If no CTS is sent back the channel is assumed busy and so the BO procedure starts.
- If only the CTS is sent back the channel sets the NAV.
- Unicast transmissions follow SENSING IDLE! DIFS MPDU SIFS + ACK; if the transmission fails or the channel has to retransmit re-contention via BO.
Backoff is needed when:
- The queue is empty, channel receives a frame from the upper layers but the channel is already busy.
- A transmission fails and the channel needs to recontend.
- A transmission is successful post BO.
How backoff work: after DIFS a random number from a determined interval of numbers (0 ≤ n ≤ CW) is picked; the picked number represents how many 20 µs time slots the channel has to wait before transmitting. The upper limit of the aforementioned number interval CW is called contention window and goes: CW = 2BE − 1, where BE is the backoff exponential and is usually known.
If the channel gets busy while the BO procedure is still on, the BO value freezes, the NAV is set and the BO resumes DIFS after the NAV has expired.
- BO desynchs contending stations; the bigger the CW, the less likely collisions become but latency increases.
- Post Bo must ALWAYS be performed after an ACK is received.
- MSDU fragmentation: if packets exceed a certain threshold they can be split into many MPDUs in this way if a failure occurs less bandwidth is wasted; all MPDUs have the size of the threshold (last one may be smaller); MPDUs sent every SIFS + ACK + SIFS; BO after every fragment; broadcast packets are never fragmented.
- EIFS: channel busy at physical layer but idle at MAC layer (no NAV set); waiting for EIFS avoids collisions due to the absence of NAV.
DCF can’t distinguish between voice, video and other types of services we use PCF as a MAC protocol to ensure a proper Quality of Service (QoS).
PCF (Point Coordination Function)
- Contention free channel access; needs a point coordinator (PC) that polls stations; stations under PCF are said contention-free (CF).
- PC builds a static polling list based on requests.
- Only one station/channel is PCF: there are CFP (contention-free period, managed by the polling mechanism) and CP (contention period, managed like in DCF).
- At the beginning of the CFP the AP checks if the channel is idle: if idle, PIFS BEACON.
- BEACON + PCF + DCF = SUPERFRAME
- After the beacon there are many scenarios:
- CF – poll;
- Data;
- Data + CF – poll;
- CF – ACK (end);
- Data + CF – ACK;
- Data + CF – ACK + CF – poll;
- Null
802.11 e – WME (Wireless Multimedia Extension)
- Enhances current 802.11 MAC to improve and manage QoS; efficiency enhancements in areas of DCF and PCF; different classes of services (four different AC, access categories: voice, video, best effort and background).
- HCF (Hybrid Coordination Function): multi-access protocol able to manage the AC division; works thanks to two different mechanisms:
- EDCA (Enhanced Distributed Channel Access): basic layer, operates only in CP. It is very similar to DCF and TXOP is allocated via contention; 4 access categories, each with a queue high priority means less time to wait.
- HCCA (HCF Controlled Channel Access): operates in CP and CFP; rules by controlling channels through HC; backward compatible with DCF/PCF; HC allocates TXOP by using QoS poll frames; in CP the interval in which TXOPs are polled is called Controlled Access Period (CAP); 8 traffic categories.
- EDCA BURSTING: once gained access, STA can transmit multiple frames without contending again; ACKs sent frame by frame (or BlockACK); waits for SIFS between packets.
- QBSS: BSS supporting QoS;
- QSTA: WSTA supporting QoS;
- HC (Hybrid Coordinator): similar to the PC, works as a coordinator for other STAs and resides either in the QTAs or in the AP.
- TXOP (Transmission Opportunity): time during which a QSTA can transmit; it has a starting time and a max duration; used in CP and CFP.
- AIFS (Arbitrary IFS): they have different durations according to priority short AIFS = high priority.
- If the BO of two channels reaches zero at the same time, the scheduler still grants TXOP to the channel with higher priority.
- QTAs can gain TXOP in CP if polled by a frame issued by the HC during CAP, otherwise they use EDCA; in CFP stations can’t access the channel on their own: they wait for a CF – poll frame from the HC.
- While polling a station, the AP knows the duration of transmission it can organize polling order and occurrence.
- Traffic: connectionless queue state indicator; TSPEC (traffic spec) between HC and QSTA.
- Polling: QSTAs send updates to HC regarding queue size and desired TXOP; QSTAs can add ADDTS (add traffic stream) requests to initiate traffic stream with the desired TSPEC; traffic scheduling not specified in standards.
- QoS in 802.11 is difficult because we have:
- Unpredictable beacon delays (WSTA timers stop at TBTT)
- Unknown transmission duration
- Unknown polling list order and entries
802.11 n
- Increased bandwidth: can use 20 or 40 MHz channels with 13 non-overlapping 5 GHz bands.
- Can use OFDM + MIMO + beamforming: it maximizes the energy of transmission directed towards the receiver to increase SNR.
- Explicit beamforming: very powerful, TX and RX must agree on channel characteristics and both must support it.
- Implicit beamforming: channel characteristics are inferred from lost frames.
- MAC enhancements: SDU and PDU aggregation, BlockACKs, reverse direction, reduced interframe space (RIFS), link adaptation.
- Need to reduce headers and preambles time aggregation of packets into A-MPDU and A-MSDU.
- A-MSDU addresses (destination DA and sender SA addresses) must match transmitter and receiver addresses (TA and RA) and all MSDUs must be received by a single receiver and sent by a single transmitter.
- There is a max of 64 MPDUs due to block ACK limit.
- Multicasting is not allowed but two level aggregation is possible.
- Reverse direction: bidirectional data transfer over TXOP; if the sender doesn’t fully use TXOP the receiver can exploit leftover time to transmit data to the sender frames are going in both directions during TXOP.
- RIFS: 2 µs long, shorter than SIFS; used instead of SIFS in MPDU bursting; A-MPDU is more efficient than MPDU bursting + RIFS.
- Link adaptation: the receiver provides feedback on the performance of modulation and coding chosen by the sender in the last frame; receiver can recommend modulation and coding based on channel estimates and receiver RIFS.
802.11 ac high data rates
- Adds 80 and 160 MHz channels, uses 5 GHz frequency band only and supports multi-user transmission.
- Multi-user MIMO with beamforming: multiple beams directed towards multiple users; can create directional beams.
- TX and RX exchange NDP (No Data Packets) in order to sense surrounding channels done periodically to update user's position and choose a preferable direction of transmission; needs multiple antennas to be enabled.
- MIMO increases throughput and improves reliability.
- PDU formats at physical layer: all the characteristics of previous 802.11 protocols + VHT (Very High Throughput) special signal for multi-users MIMO + common signal addressed to all users + dedicated signal indicates modulation for a specific user.
- MAC layer is essentially identical to CSMA/CA but the bandwidth can be selected on a per-frame basis; divides channels into primary (native bandwidth) and secondary (high bandwidth).
Wireless D2D networks
- Also known as “ad hoc”; networks form automatically when a bunch of nodes gather.
- Pure D2D: autonomous system of nodes connected by wireless links.
- Hybrid: connected to a fixed infrastructure.
- D2D networks are quick and easy to deploy while being low cost; they decrease the dependence on infrastructure and are independent from network operators: safe, private, fast.
- Transmissions coming from different TXs in the same area may interfere.
- Most devices are half duplex (as saw for APs in 802.11).
- Nodes within the network can have same capabilities and responsibilities (fully symmetric environment), asymmetric capabilities (range, battery, lifetime, processing capabilities).
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
Scarica il documento per vederlo tutto.
-
Mobile and satellite communications
-
Particella mobile
-
Relazione caso di studio "DIB Mobile"
-
Cloud e Mobile Computing - Appunti completi del corso