1 Wireless Sensor Networks Link Layer Protocols Mario Čagalj FESB University of Split 2013. Based on “Protocols and Architectures.

Slides:



Advertisements
Similar presentations
Primitives for Achieving Reliability 3035/GZ01 Networked Systems Kyle Jamieson Department of Computer Science University College London.
Advertisements

Mohmmad Khalily Dermany Islamic Azad University. Goals – Link layer tasks in general Framing – group bit sequence into frames Important: format, size.
Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.
Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.
1 Wireless Sensor Networks Akyildiz/Vuran Administration Issues  Take home Mid-term Exam  Assign April 2, Due April 7  Individual work is required 
8-Reliability and Channel Coding Dr. John P. Abraham Professor UTPA.
Chapter 6 Errors, Error Detection, and Error Control.
Coding and Error Control
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Lecture 9-10: Error Detection and Correction Anders Västberg Slides are a selection from the slides from chapter 8 from:
1 K. Salah Module 4.0: Data Link Layer The Logical Link Control (LLC) sublayer –Framing –Flow Control –Error Control The Media Access Control (MAC) sublayer.
Chapter 6: Errors, Error Detection, and Error Control
William Stallings Data and Computer Communications 7 th Edition (Selected slides used for lectures at Bina Nusantara University) Error Control.
Chapter 6 Errors, Error Detection, and Error Control
Digital Data Communications Techniques Updated: 2/9/2009.
1/26 Chapter 6 Digital Data Communication Techniques.
1 Wireless Sensor Networks Akyildiz/Vuran Chapter 6: Error Control.
Coding and Error Control
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 11 Data Link Control Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction.
Data and Computer Communications. The Data Link Layer.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 16.
Lecture 10: Error Control Coding I Chapter 8 – Coding and Error Control From: Wireless Communications and Networks by William Stallings, Prentice Hall,
TOBB ETÜ ELE46/ELE563 Communications Networks Lecture 01 May 6, 2014 Fall 2011 Tuesday 10:30 – 12:20 (310) Thursday 15:30 – 17:20 (372) İsrafil Bahçeci.
1 Data Link Layer Lecture 20 Imran Ahmed University of Management & Technology.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. 1 Communication Reliability Asst. Prof. Chaiporn Jaikaeo, Ph.D.
Chi-Cheng Lin, Winona State University CS 313 Introduction to Computer Networking & Telecommunication Data Link Layer Part I – Designing Issues and Elementary.
ECS 152A 4. Communications Techniques. Asynchronous and Synchronous Transmission Timing problems require a mechanism to synchronize the transmitter and.
Part 2: Packet Transmission Packets, frames Local area networks (LANs) Wide area networks (LANs) Hardware addresses Bridges and switches Routing and protocols.
ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 14.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer PART I: Peer-to-Peer Protocols ARQ Protocols and Reliable Data Transfer Flow Control.
Data and Computer Communications Chapter 6 – Digital Data Communications Techniques.
Data and Computer Communications by William Stallings Eighth Edition Digital Data Communications Techniques Digital Data Communications Techniques Click.
Lecture 3-2: Coding and Error Control (Cont.) ECE
1 Chapter 8. Coding and Error Control Wen-Shyang Hwang KUAS EE.
CS3505: DATA LINK LAYER. data link layer  phys. layer subject to errors; not reliable; and only moves information as bits, which alone are not meaningful.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Data Link Layer PART III.
1 Chapter Six - Errors, Error Detection, and Error Control Chapter Six.
Data Communications & Computer Networks, Second Edition1 Chapter 6 Errors, Error Detection, and Error Control.
Chapter 6: Errors, Error Detection, and Error Control Data Communications and Computer Networks: A Business User’s Approach Third Edition.
Coding Theory. 2 Communication System Channel encoder Source encoder Modulator Demodulator Channel Voice Image Data CRC encoder Interleaver Deinterleaver.
TI Cellular Mobile Communication Systems Lecture 4 Engr. Shahryar Saleem Assistant Professor Department of Telecom Engineering University of Engineering.
Error/Flow Control Modeling (ARQ Modeling). © Tallal Elshabrawy 2 Data Link Layer  Data Link Layer provides a service for Network Layer (transfer of.
TCP-Cognizant Adaptive Forward Error Correction in Wireless Networks
Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.
Tufts University. EE194-WIR Wireless Sensor Networks. February 17, 2005 Increased QoS through a Degraded Channel using a Cross-Layered HARQ Protocol Elliot.
1/30/ :20 PM1 Chapter 6 ─ Digital Data Communication Techniques CSE 3213 Fall 2011.
Coding and Error Control
Wireless and Mobile Networks (ELEC6219) Session 4: Efficiency of a link. Data Link Protocols. Adriana Wilde and Jeff Reeve 22 January 2015.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Principles of reliable data transfer 0.
Data and Computer Communications Eighth & Ninth Edition by William Stallings Chapter 6 – Digital Data Communications Techniques.
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif Department of Computer Science York University Section M Topics: 1.Flow Control and ARQ Protocols.
Computer Networks Group Universität Paderborn Ad hoc and Sensor Networks Chapter 6: Link layer protocols Holger Karl.
Data Link Layer.
Data and Computer Communications Digital Data Communications Techniques + Error Control+ Digital Data Communications Techniques + Error Control+Multiplexing.
Powerpoint Templates Data Communication Muhammad Waseem Iqbal Lec # 15.
1 Wireless Networks Lecture 5 Error Detecting and Correcting Techniques (Part II) Dr. Ghalib A. Shah.
Coding and Error Control
Computer Communication & Networks
Reliable Transmission
Data Link Layer Flow Control.
Data Link Layer.
CMPT 371 Data Communications and Networking
Data Link Layer What does it do?
TCP - Part II Relates to Lab 5. This is an extended module that covers TCP flow control, congestion control, and error control in TCP.
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Coding and Error Control
The Transport Layer Reliability
Chapter 5 Peer-to-Peer Protocols and Data Link Layer
Lecture 4 Peer-to-Peer Protocols and Data Link Layer
Data Link Layer. Position of the data-link layer.
Presentation transcript:

1 Wireless Sensor Networks Link Layer Protocols Mario Čagalj FESB University of Split Based on “Protocols and Architectures for Wireless Sensor Networks”, Holger Karl, 2005.

2 Data Link Layer services (source: Wiki) oEncapsulation of network layer data packets into frames oFrame synchronization oLogical link control (LLC) sublayer: >Error control (automatic repeat request,ARQ), in addition to ARQ provided by some Transport layer protocols, to forward error correction (FEC) techniques provided on the Physical Layer, and to error-detection and packet canceling provided at all layers, including the network layer. Data link layer error control (i.e. retransmission of erroneous packets) is provided in wireless networks, error detection and canceling of erroneous packets are provided. >Flow control, in addition to one provided on the Transport layer. Data link layer error control is not used in LAN protocols such as Ethernet, but in modems and wireless networks. oMedia access control (MAC) sublayer: >Multiple access protocols for channel-access control, for example CSMA/CD protocols for collision detection and retransmission in Ethernet bus networks and hub networks, or the CSMA/CA protocol for collision avoidance in wireless networks. >Physical addressing (MAC addressing)

3 Link layer tasks in general oFraming – group bit sequence into packets/frames >Important: format, size (impact on energy-consumtion and throughput) oError control – make sure that the sent bits arrive and no other >Forward and backward error control oFlow control – ensure that a fast sender does not overrun its slow(er) receiver oLink management – discovery and manage links to neighbors >Do not use a neighbor at any cost, only if link is good enough Understand the issues involved in turning the radio communication between two neighboring nodes into a somewhat reliable link

4 Error control oError control has to ensure that data transport is >Error-free – deliver exactly the sent bits/packets >In-sequence – deliver them in the original order >Duplicate-free – and at most once >Loss-free – and at least once oError sources: fading, interference, loss of bit synchronization, … >Results in bit errors, “bursty” (they tend to occur in clusters with error-free periods) >In wireless, sometimes quite high average bit error rates – … possible!

5 Characteristics of transmission errors oIEEE physical layer frame >MPDU – MAC Protocol Data Unit >Preamble – constant bit pattern for bit and frame synchronization of the receiver >The PHY header describes the lenght and the modulation used in the data part (MPDU) oThe distortion of waveforms translates into bit errors and packet losses oPacket losses (the MAC protocol does not see any data at all) >The receiver fails to acquire bit/frame synchronization >The SFD is wrong, the PHY header has an incorrect checksum oBit errors >Synch and PHY header ok, but some bits in MPDU not the same as their transmitted counterpart

6 Basic approaches to error control oBackward error control >Automatic Repeat Request (ARQ) oForward error control >Forward Error Correction oDifferent combinations

7 Backward error control – ARQ oBasic procedure >Put header information around the payload >Compute a checksum and add it to the packet Typically: Cyclic redundancy check (CRC), quick, low overhead, low residual error rate >Provide feedback from receiver to sender Send positive (pkt received) or negative acknowledgement (pkt lost) >Sender uses timer to detect that acknowledgements have not arrived Assumes packet has not arrived Optimal timer setting? >If sender infers that a packet has not been received correctly, sender can retransmit it What is maximum number of retransmission attempts?

8 Standard ARQ protocols oAlternating bit (or Send-and-Wait) >Transmitter (XMTR) buffers one packet, sends it and sets a timer >RECV receives the packet -> positive ACK -> XMTR frees the buffer and transmits the next packet >RECV receives nothing -> negative ACK or being quite -> XMTR retransmits the packet >XMTR marks each new packet with sequence numbers alternating between 0 and 1 >Retransmitted packets are coplies of the original packets Have the same sequence number >The sequence numbers allow the RECV to detect duplicates Occurs when positive ACK is lost

9 Standard ARQ protocols oGoback N >Send up to N packets, if a packet has not been acknowledged when timer goes off, retransmit all unacknowledged packets >Goback N allows the XMTR to have multiple unacknowledged packets >XMTR keeps a buffer for up to N packets (a window) >Each packet has its own timer, started upon the packet’s transmission >RECV accepts packets only in sequence and drops packets received out of sequence (some previous packet had been lost) For this RECV needs only buffer space for one packet >Usually RECV acknowledges the last packet arrieved in sequence >If at the XMTR the timer for the oldest packet expires before receiving the corresponding ACK, this packet and all other packets in the window are retransmitted

10 Standard ARQ protocols oSelective Repeat >Similar to Goback N, however here the RECV has N buffers and uses them to buffer frames arriving out of sequence >RECV sends either positive or negative ACKs >XMTR retransmits only those packet for which no ACK has been received withing the timeout period (more energy-efficient) oAlternating bit and Selective Repeat retransmit only erroneous packets (while Goback N potentially retransmits correctly received packets) oThe number of retransmissions allowed per packet must be bounded (to avoid spending too much energy) >A loss-free service therefore cannot be guaranteed (semireliable protocols) oExample (Energy consumption of alternating bit)

11 Digital channel model oHow to stochastically capture the behavior of a wireless channel oDirectly model the resulting bit error behavior >Each bit is erroneous with constant probability p, independent of the other bits -> binary symmetric channel (BSC)

12 Example: Energy consumption of alternating bit

13 How to use acknowledgements oBe careful about ACKs from different layers >A MAC ACK (e.g., S-MAC) does not necessarily imply buffer space in the link layer >On the other hand, having both MAC and link layer ACKs is a waste oDo not (necessarily) acknowledge every packet – use cumulative ACKs >Tradeoff against buffer space >Tradeoff against number of negative ACKs to send

14 When to retransmit oAssuming sender has decided to retransmit a packet – when to do so? >In a BSC channel, any time is as good as any >In fading channels, try to avoid bad channel states – postpone transmissions Retransmissions may be unecessarily lost >Instead (e.g.): send a packet to another node (if in queue and if it has better channel) -> exploit multi-user diversity oHow long to wait? >Example solution: Probing protocol >Idea: reflect channel state by two protocol modes, “normal” and “probing” >When error occurs, go from normal to probing mode >In probing mode, periodically send short packets (acknowledged by receiver) – when successful, go to normal mode

15 Basic approaches to error control oBackward error control >Automatic Repeat Request (ARQ) oForward error control >Forward Error Correction oDifferent combinations

16 Forward error control oIdea: Endow symbols in a packet with additional redundancy to withstand a limited amount of random permutations >Additionally: interleaving – change order of symbols to withstand burst errors (clustered errors)

17 Forward error control oCan be used as an open loop technique >No feedback from the receiver >Possibly more energy-efficient as no ACK packets are sent >Moreover, the transmitter does not have to switch from the transmitting to receiving states in order to be able to receive ACKs oIn practice FEC is used thogether with acknowlegments (backward error control) for more robust/reliable communicaiton

18 Block-coded FEC oLevel of redundancy: blocks of symbols >Block: k p-ary source symbols (not necessarily just bits) >Encoded into n q-ary channel symbols >Mostly, we have p = q = 2, n ≥ k, and the symbols correspond to bits oInjective mapping of p k source symbols -> q n channel symbols >This mapping is called a code oCode rate: (k ld p) / (n ld q) >When p=q=2: k/n is code rate oFor p=q=2: Hamming bound – code can correct up to t bit errors only if >Codes for (n,k,t) do not always exist!

19 Hamming distance oAn important metric for a block code oThe Hamming distance of two valid channel words w 1 and w 2 is defined as the number of bits in which they differ >E.g., 1001 and > Hamming distance = 1 oThe Hamming distance d min of the whole code is defined as the minimum Hamming distance of all pairs of valid channel words oAny code with a Hamming distance d min can reliably detect up to and including d min − 1 bit errors and can reliably correct up to and including (d min −1)/2 bit errors

20 Popular block codes oPopular examples >Reed-Solomon codes (RS) >Bose-Chaudhuri-Hocquenghem codes (BCH) oEnergy consumption >E.g., BCH encoding: negligible overhead (linear-feedback shift register) >BCH decoding: depends on block length (n) and Hamming distance (that is the number of correctable bits t) E add and E mult are the energy needed to carry out addition and multiplication >Similar for RS codes

21 Convolutional codes oHere also k bits of user data are mapped to n channel symbols; the coding of two successive k-bit blocks is not independent oCode rate: ratio of k user bits mapped onto n coded bits oConstraint length K determines coding gain (by increasing K we can reduce the transmit power required to achieve fixed BER) oEnergy >Encoding: cheap >Decoding: Viterbi algorithm, energy & memory depends exponentially (!) on constraint length (K)

22 Energy consumption of convolutional codes oTradeoff between coding energy and reduced transmission power (coding gain) oOverall: block codes tend to be more energy- efficient

23 Interleaving oBursy error characteristics affect performances of codes oSolution: Bit interleaving >An interleaver at the XMTR takes the packet (of multiple blocks) generated by the FEC encoder >The bits in this packet are permuted before transmitting >The deinterleaver at the RECV inverts the permutation before the packet is handed to the FES decoder oThe error burst are spread over multiple coding blocks instead of being concatrated to one or a few blocks >Increases the chance that each block can be successfully decoded

24 Hybrid schemes: FEC and ARQ oNo single fixed error-control strategy will give optimum energy efficiency at all times oFEC >Constant overhead for each packet >Not (easily) possible to adapt to changing channel characteristics oARQ >Overhead only when errors occurred (expect for ACK, always needed) oBoth schemes have their uses ->hybrid schemes BCH + unlimited number of retransmissions Relative energy consumption t: error correction capacity

25 Power control on a link level oFurther controllable parameter: transmission power >Higher power, lower error rates – less FEC/ARQ necessary >Lower power, higher error rates – higher FEC necessary oTradeoff oHowever, by increasing the power of a single XMTR, the interference on other (neigboring) XMTRs increases -> i.e., the BER increases as well >Tradeoffs of this nature are very complex in multihop networks

26 Link layer tasks in general oFraming – group bit sequence into packets/frames >Important: format, size (impact on energy-consumtion and throughput) oError control – make sure that the sent bits arrive and no other >Forward and backward error control oFlow control – ensure that a fast sender does not overrun its slow(er) receiver oLink management – discovery and manage links to neighbors >Do not use a neighbor at any cost, only if link is good enough

27 Framing oWe discuss two aspects of framing >Choice of packet size >Intemediate checksum schemes oThe goal is to try to reduce the amount of information that has to be retransmitted in case of errors while maintaining minimal overhead

28 Frame, packet size oSmall packets: low packet error rate, high packetization overhead oLarge packets: high packet error rate, low overhead oDepends on bit error rate, energy consumption per transmitted bit oNotation: h(overhead, payload size, BER)

29 Dynamically adapt frame/packet length oFor known bit error rate (BER), optimal frame length is easy to determine oProblem: how to estimate BER? >Collect channel state information at the receiver (RSSI, FEC decoder information, …) >Example: Use number of attempts T required to transmit the last M packets as an estimator of the packet error rate (assuming a BSC) oSecond problem: how long are observations valid/how should they be aged? >Only recent past is – if anything at all – somewhat credible

30 Intermediate checksum schemes oWith traditional framing the whole packet has to be retransmitted oIn interdediate checksum schemes >The user’s data are partitioned into a number L of chunks, each having c bits to which a checksum of h bits is appended >The chunks are appended to the original frame header of size m bits >The overall frame has size m+L(c+h) bits oRECV behaves as follows >Error in the header -> discard the whole packet >Check each chunk separatly and buffer the correct ones >If all correct RECV sends final ACK to XMTR >The faulty chunks indicated with and incomplete ACK -> XMTR retransmits only the faulty packets oHigh overhead in low BER scenarios oOptimal chunk size exists for fixed BER

31 Putting it together: ARQ, FEC, packet length optimization oApplying ARQ, FEC (both block and convolutional codes), frame length optimization to a Rayleigh fading channel >Rayleigh fading models assume that the magnitude of a signal that has passed through such a transmission medium (also called a communications channel) will vary randomly, or fade, according to a Rayleigh distribution the radial component of the sum of two uncorrelated Gaussian random variables.

32 Link layer tasks in general oFraming – group bit sequence into packets/frames >Important: format, size (impact on energy-consumtion and throughput) oError control – make sure that the sent bits arrive and no other >Forward and backward error control oFlow control – ensure that a fast sender does not overrun its slow(er) receiver oLink management – discovery and manage links to neighbors >Do not use a neighbor at any cost, only if link is good enough

33 Link management oGoal: decide to which neighbors that are more or less reachable a link should be established >Problem: communication quality fluctuates, far away neighbors can be costly to talk to, error-prone, quality can only be estimated oEstablish a neighborhood table for each node >Partially automatically constructed by MAC protocols

34 Link quality characteristics oExpected: simple, circular shape of “region of communication” – not realistic oInstead: >Correlation between distance and loss rate is weak; iso-loss- lines are not circular but irregular (see figures) >Asymmetric links are relatively frequent (up to 15%) >Significant short-term Packet Eerror Rates (PER) variations even for stationary nodes Power 1 Power 2 < Power 1

35 Three regions of communication oEffective region: PER consistently < 10% oTransitional region: anything in between, with large variation for nodes at same distance oPoor region: PER well beyond 90%

36 Link quality estimation oHow to estimate, on-line, in the field, the actual link quality? oRequirements >Precision – estimator should give the statistically correct result >Agility – estimator should react quickly to changes >Stability – estimator should not be influenced by short aberrations >Efficiency – Active or passive estimator oExample: EWMA only estimates at fixed intervals EWMA exponentially weighted moving average

37 Conclusion oLink layer combines traditional mechanisms >Framing, packet synchronization, flow control with relatively specific issues >Careful choice of error control mechanisms – tradeoffs between FEC & ARQ & transmission power & packet size … >Link estimation and characterization