SlideShare a Scribd company logo
1 of 57
Download to read offline
Medium Access Control in
Wireless IoT
Davide Quaglia, Damiano Carra
LIVELLO DATALINK
2
Goals
• Reliable and efficient communication
between two nodes on the same physical
medium
– Cable (Wired)
– Wireless
• Assumptions from the lower physical
layer:
– The concept of bit is defined
– Bits, if received, arrive in the same order in
which they have been transmitted
3
Functionality
• Framing = Bit grouping into layer-2 PDUs
• Error checking
• Ack and retransmission of corrupted/lost
PDUs (not in all protocols)
• Policy of use of the channel if more than 2
nodes share the same physical medium
– Node addressing
– Channel arbitration
4
Services provided to the upper
network layer
• Un-acknowledged connection-less service (e.g.
Ethernet/IEEE802.3)
• Acknowledged connection-less service (e.g.
WiFi/IEEE802.11, IEEE802.15.4)
• Connection-oriented service (e.g. IEEE802.16)
• REMARK: the connection-oriented service is
also acknowledged and furthermore it provides
flow control
5
Framing
• Improve channel utilisation in case of
more than two nodes sharing it
• Requested to check errors and recover
PDUs
– Error detection must be performed on blocks
of bits (e.g. CRC)
– The corrupted PDU can be retransmitted
• Issue: definition of start/end of frame
6
Framing
7
Start/end of frame
• We need to use symbols which are not used to send
data otherwise a sequence of data bits could be
considered erroneously a start/end of frame
– Physical signal configurations which are not used for data
bits
• Specific configuration choices can improve bit synchronization
between TX and RX
– Particular sequence of data bit values (FLAG)
• Bit stuffing/de-stuffing is needed to avoid FLAG simulation in the
PDU
– Inter-packet gap minimum between 2 consecutive frames
8
Bit stuffing/de-stuffing
• Example taken from HDLC protocol
• Byte 01111110 is used as FLAG at the
beginning/end of each frame
• The bits of the original frame are modified
through stuffing
– After five “1”s a “0” is automatically inserted
• At the receiver the Data Link layer
operates de-stuffing
9
Bit stuffing: example
a) Original data from upper layer
b) Data transmitted on the wire or over-the
-air
c) Data at the receiver after de-stuffing.
10
Error detection
• Some bits may have incorrect values at the RX
– Interference, low-level signal
– Often errors are not isolated but group into burst
• Hamming distance
• Redundant information must be added to the message to
check errors
– m bits of the original message
– r bits of the code for error detection
– n=m+r bits transmitted on the channel
– Code rate = m/n
• Examples
– Parity Bit
– Checksum
– Circular Redundancy Check (CRC)
11
Parity bit
• At the TX a bit is appended to the message
– “1” if the amount of “1” in the message is even
– “0” if the amount of “1” in the message is odd
• At the RX if the amount of “1” is even then at
least one bit flipped its values
– One bit or an odd number of bits (we cannot
distinguish)
– Errors affecting an even number of bits are not
detected
12
Check sum
• Extension of the concept of parity bit
• The message is decomposed into r bit words
• The words are summed and overflow is not
taken into account
• The sum (another r-bit word) is appended to
the message
• The sum is recomputed at the RX
• If it is different from the appended value an error
occurred
• Errors are not detected if they affect different
bits that do not change the sum
13
Circular Redundancy Check (CRC)
• The message is seen as the coefficients vector of a
polynomy M(x) having degree m-1
• Let R(x) be the remainder of the polinomial division
xr
M(x)/G(x) where G(x) is named generating polynomy
• By construction the polynomy xr
M(x)-R(x) is exactly
divided by G(x) and it is transmitted on the channel (m+r
bit)
• At RX if the received sequence of bits is exactly divided
by G(x) then it is considered correct
14
Channel access methods
Point-to-point (e.g.
serial cable)
Point-Point Protocol
Shared (bus, wireless)
Random access
CSMA/CD,
CSMA/CA
channel
Controlled access
Polling, token
Multiplexing
TDMA, FDMA,
WDMA, CDMA
15
Point-to-point channel access
• In a point-to-point channel the arbitration
is trivial since there are always two nodes
16
Limit of
the point-to-point architecture
• In case of N nodes the number of point-to-
point channels is N(N-1) with a quadratic
cost increase
• A shared channel is needed
17
Access in case of shared channel
• Random access: the node which wants to
transmit must wait for the channel to be
free (carrier sense)
• Controlled access:
– Polling: a master asks to each other node if it
has something to transmit
– Token: a token moves among the nodes; the
node with the token can transmit for a given
amount of time
18
Access in case of shared channel (2)
• Multiplexing: the physical channel is de-composed into
logical channels used by nodes pairs as they were point-
to-point channels
• De-composition methodology:
– Radio frequency for wireless (Frequency Division
Multiplexing o FDM) o light color for optical fibers
(Wavelength Division Multiplexing o WDM)
– Time interval (Time Division Multiplexing – TDM)
– Frequency+time (Code Division Multiplexing – CDM)
• 3G mobile and beyond
19
Problems in case of wireless
transmission
• Interference and path loss
– Non-negligible bit error rate
• Collision management more complex
– Hidden node
– Exposed Node
20
Interference and path loss
• More devices use the same frequency band (since it
is un-licensed)
– Other wireless nodes
– Remote controls
– Microwave owens
• The signal energy decreases as a function of the
distance between TX and RX
• Obstacles (e.g., walls)
• Multiple reflections of the signal cause signal
distorsion
21
Correct frame probability
• Probability to receive a correct bit
• Probability to receive a PDU of length N
– E.g., N = 1518 byte =12144 bit
• Caso Ethernet
• Caso WiFi
(1−Pbit
error
)
Pok
frame
=(1−Pbit
error
)
N
Pbit
errore
=10
−10
⇒Pok
frame
=0.9999988
Pbit
errore
=10
−4
⇒ Pok
frame
=0.2968700
22
Limits of carrier sense:
Hidden node and exposed node
a) Hidden node
b) Exposed node
23
Limit of collision detection
(CSMA/CD)
• Collision Detection phase of CSMA/CD is
not suitable
– A double radio interface (to send and sense
concurrently) is expensive…
– … and useless since most of the collisions
happen at the receiver
• --> Collision Avoidance
• --> Stop&Wait ack
24
CSMA/CA
25
• Carrier sense
• Collision avoidance via random back-off
• [optional] RTS/CTS
MEDIUM ACCESS CONTROL
FOR WSN
26
MAC Challenges
• Traditionally
– Fairness
– Latency
– Throughput
• For Sensor Networks
– Power efficiency
– Scalability
27
Power consumption of carrier sense
• Expected life time of many WSN applications:
Months or years
• Actual lifetime
– AA batteries: Max. 2000 mAh
– CC2430 radio: 26.7mA in RX mode
– 2000mAh / 26.7mA = 75 hours = 3 days
Keep radio asleep most of the time
Ideal duty cycle: 0.1% - 1%
28
Texas Instruments CC2430 architecture
29
Power modes in TI CC2430
30
Time-out
Interrupt
Time-out
Power modes in TI CC2430
31
Example of power-efficient MAC
• 1 s in sleep mode (power mode 2)  0.5 μA
• 0.005 s in RX mode for carrier sense  26.7
mA
• 0.005 s in TX mode to send packet  28.1
mA
• Weighted current consumption
– (0.0005*1000+26.7*5+28.1*5)/(1010) ~ 0.27 mA
• With AA batteries: 2000mAh / 0.27 mA ~
7359 hours ~ 307 days
32
Sources of energy waste
• Collision
– Retransmissions
• Idle listening
– Continuously sense the channel
• Overhearing
– Listen to packets addressed to other nodes
• Packet overhead
– Header
– Control packets (e.g., RTS/CTS)
33
Power Save Design Alternatives
• Wake-up radio
– A sleeping node can be woken at any time by
a secondary receiver (wake-up radio)
• Asymmetric polling
• Timer-Based
– When a node enters sleep mode, it sets a
timer to wakeup at a pre-determined time
• Hybrid
– Timer-Based plus Wake-up radio
34
Wake-up radio
• Add second, low-power receiver to
wakeup the main system on-demand
• Low-power could be achieved by:
– Simpler hardware with a lower bit-rate and/or
less decoding capability
– Periodic listening using a radio with identical
physical layer as data radio
35
Wake-up radio
36
Interrupt
Ultra low-power
sub-system
Asymmetric polling
• Implemented in IEEE802.15.4
• Rules depend on the direction of the transfer
37
Timer-based MAC
• Scheduled contention (slotted access): Nodes periodically
wake up together, contend for channel, then go back to sleep
– S-MAC
• Channel polling (random access): Nodes independently wake
up to sample channel
– B-MAC, X-MAC
• TDMA (Time Division Multiple Access): Nodes maintain a
schedule that dictates when to wake up and when they are
allowed to transmit
– DRAND
• Hybrid: SCP, Z-MAC, 802.15.4 (contention access period +
contention free period)
38
S-MAC (Sensor MAC)
• A node sleeps most of the time
• Periodically wake up for short intervals to
see if any node is transmitting a packet
• Accept latency to extend lifetime
39
S-MAC: SYNC interval
• Listen time consists of
two parts: SYNC and
RTS
• In the SYNC interval
some nodes
periodically send
SYNC packet to
synchronize clocks
• They use CSMA/CA
for channel contention C. Lu, Washington Univ. Saint Louis
40
Carrier
sense
Carrier
sense
Carrier
sense
SYNCCarrier
sense
Carrier
sense
S-MAC: RTS interval
• RTS/CTS is used to
transmit data
• CSMA/CA followed by
RTS/CTS
C. Lu, Washington Univ. Saint Louis
41
RTS
It lost contention
S-MAC: data transmission
• RTS/CTS contain the
expected data TX time
– Listeners not interested can
sleep to save energy
• Sender does one RTS/CTS
and then sends data for the
rest of the frame
– Prefer application
performance to node level
fairness
• ACK every data packet
– Packet fragmentation for
higher reliability
C. Lu, Washington Univ. Saint Louis
42
Pros and Cons of S-MAC
• More power conserving than standard CSMA/CA
• During the listening interval, everyone needs to stay
awake unless someone transmits
– Waste energy
• Time sync overhead
• RTS/CTS/ACK overhead
• Complex to be implemented
43
B-MAC (Berkeley MAC)
• Low Power Listening (LPL)
– Periodic preamble sampling  Preamble > Sleep
period
– No sync between nodes
• Hidden terminal avoidance and multi-packet
mechanisms not provided
44
Sleep
t
ReceiveReceiver
Sleep
t
PreambleSender Message
Sleep
Pros and Cons of B-MAC
• No need for everybody to stay awake when
there is no traffic
– Just wake up for preamble sampling and go back to
sleep
• Better power conservation, latency and
throughput than S-MAC
• Simpler to implement
• Low duty cycle  longer preamble
– Little cost to receiver yet higher cost to sender
– Longer delay
– More contention
45
X-MAC: Early ACK
46
• Include destination address in short preambles
• Non-receiver avoids overhearing
• Receiver acknowledges preamble  Sender stops
sending preamble
Thoughts on X-MAC
• Better than B-MAC in terms of latency,
throughput and power consumption
• Energy consumption due to overhearing reduced
• Simple to implement
• On average the preamble size is reduced by half
compared to B-MAC  Still considerable
overhead
47
SCP-MAC
48
• Scheduled Channel Polling by everybody
– Avoid long preambles in LPL (Low Power Listening)
supported by B-MAC
• Wake up tone
– Much shorter than preamble in LPL followed by data
• Assumption: the listening intervals must
be synchronized
SCP-MAC (2)
49
Time Division Multiple Access
(TDMA)
• Predictable delay, throughput and duty
cycle
• Little packet losses due to contention
• Scheduling and time sync are difficult
• Slots are wasted when a node has nothing
to send
50
TDMA
51
Superframe
Z-MAC (Zebra MAC)
• Runs on top of B-MAC
• Rely on CSMA under light load  Switch
to TDMA under high contention
52
Z-MAC (Zebra MAC)
53
CSMA
• Pros
– Simple
– Scalable
• Cons
– Collisions due to
hidden terminals
– RTS/CTS is overhead
TDMA
• Pros
– Naturally avoids
collisions
• Cons
– Complexity of
scheduling
– Synchronization
needed
Thoughts on Z-MAC
• Good idea to combine strengths of CSMA and
TDMA
• Complex
• Especially hard to implement TDMA part
– How to deal with topology changes?
54
IEEE 802.15.4 superframe
55
IEEE 802.15.4 superframe
• Beacon frame sent periodically by the coordinator
– It contains the superframe structure and the slot-
transmitter association map
• CAP: Contention Access Period
– CSMA/CA
– For new nodes to join & reserve slots and for delay-
insensitive flows
• CFP: Contention Free Period
– TDMA for delay-sensitive flows
– GTS: Guaranteed Time Slot
• Inactive period: also the coordinator can sleep
56
MAC protocols supported by
TinyOS
• CC1100: experimental B-MAC
• CC2420: X-MAC
57

More Related Content

What's hot

3.Medium Access Control
3.Medium Access Control3.Medium Access Control
3.Medium Access Control
Sonali Chauhan
 
The mac layer
The mac layerThe mac layer
The mac layer
aazamk
 
9 multiple access
9 multiple access9 multiple access
9 multiple access
ampas03
 

What's hot (20)

Multiple Access Methods
Multiple Access MethodsMultiple Access Methods
Multiple Access Methods
 
3.Medium Access Control
3.Medium Access Control3.Medium Access Control
3.Medium Access Control
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
 
Media Access Methods
Media Access MethodsMedia Access Methods
Media Access Methods
 
M.A.C (Medium Access Control)
M.A.C (Medium Access Control)M.A.C (Medium Access Control)
M.A.C (Medium Access Control)
 
Snooping TCP
Snooping TCPSnooping TCP
Snooping TCP
 
Mac
MacMac
Mac
 
clas 8
clas 8clas 8
clas 8
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Media Access Control
Media Access ControlMedia Access Control
Media Access Control
 
The mac layer
The mac layerThe mac layer
The mac layer
 
Multiple access protocols in data communication networks
Multiple access protocols in data communication networksMultiple access protocols in data communication networks
Multiple access protocols in data communication networks
 
MEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROLMEDIUM ACCESS CONTROL
MEDIUM ACCESS CONTROL
 
9 multiple access
9 multiple access9 multiple access
9 multiple access
 
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTANMedium Access PROTOCOL b yENGR.  FAWAD KHAN UET BANNU KP PAKISTAN
Medium Access PROTOCOL b yENGR. FAWAD KHAN UET BANNU KP PAKISTAN
 
819 Static Channel Allocation
819 Static Channel Allocation819 Static Channel Allocation
819 Static Channel Allocation
 
MAC
MACMAC
MAC
 
Bandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum SpreadingBandwidth Utilization Multiplexing and Spectrum Spreading
Bandwidth Utilization Multiplexing and Spectrum Spreading
 
Computer network switching
Computer network switchingComputer network switching
Computer network switching
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 

Similar to Mediumaccesscontrol (20)

Lecture set 2
Lecture set 2Lecture set 2
Lecture set 2
 
datalink.ppt
datalink.pptdatalink.ppt
datalink.ppt
 
Adhoc
AdhocAdhoc
Adhoc
 
NETWORK DESIGN.ppt
NETWORK DESIGN.pptNETWORK DESIGN.ppt
NETWORK DESIGN.ppt
 
Bdc6e chapter17
Bdc6e chapter17Bdc6e chapter17
Bdc6e chapter17
 
MACPresentation based on medium access control mechanism
MACPresentation based on medium access control mechanismMACPresentation based on medium access control mechanism
MACPresentation based on medium access control mechanism
 
Wireless sensor network
Wireless sensor networkWireless sensor network
Wireless sensor network
 
3_pstn2.ppt
3_pstn2.ppt3_pstn2.ppt
3_pstn2.ppt
 
MACPresentation.ppt
MACPresentation.pptMACPresentation.ppt
MACPresentation.ppt
 
8. TDM Mux_Demux.pdf
8. TDM Mux_Demux.pdf8. TDM Mux_Demux.pdf
8. TDM Mux_Demux.pdf
 
Mac protocols of adhoc network
Mac protocols of adhoc networkMac protocols of adhoc network
Mac protocols of adhoc network
 
Manet
ManetManet
Manet
 
Manet
ManetManet
Manet
 
Manet
ManetManet
Manet
 
manet.ppt
manet.pptmanet.ppt
manet.ppt
 
Cdma system
Cdma systemCdma system
Cdma system
 
Mac protocol for wmn
Mac protocol for wmnMac protocol for wmn
Mac protocol for wmn
 
Chapter10 switching
Chapter10 switchingChapter10 switching
Chapter10 switching
 
Chap 03
Chap 03Chap 03
Chap 03
 
Chap 03
Chap 03Chap 03
Chap 03
 

Recently uploaded

AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
ellan12
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
Diya Sharma
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Call Girls In Delhi Whatsup 9873940964 Enjoy Unlimited Pleasure
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
soniya singh
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls DubaiDubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
Dubai=Desi Dubai Call Girls O525547819 Outdoor Call Girls Dubai
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 

Mediumaccesscontrol

  • 1. Medium Access Control in Wireless IoT Davide Quaglia, Damiano Carra
  • 3. Goals • Reliable and efficient communication between two nodes on the same physical medium – Cable (Wired) – Wireless • Assumptions from the lower physical layer: – The concept of bit is defined – Bits, if received, arrive in the same order in which they have been transmitted 3
  • 4. Functionality • Framing = Bit grouping into layer-2 PDUs • Error checking • Ack and retransmission of corrupted/lost PDUs (not in all protocols) • Policy of use of the channel if more than 2 nodes share the same physical medium – Node addressing – Channel arbitration 4
  • 5. Services provided to the upper network layer • Un-acknowledged connection-less service (e.g. Ethernet/IEEE802.3) • Acknowledged connection-less service (e.g. WiFi/IEEE802.11, IEEE802.15.4) • Connection-oriented service (e.g. IEEE802.16) • REMARK: the connection-oriented service is also acknowledged and furthermore it provides flow control 5
  • 6. Framing • Improve channel utilisation in case of more than two nodes sharing it • Requested to check errors and recover PDUs – Error detection must be performed on blocks of bits (e.g. CRC) – The corrupted PDU can be retransmitted • Issue: definition of start/end of frame 6
  • 8. Start/end of frame • We need to use symbols which are not used to send data otherwise a sequence of data bits could be considered erroneously a start/end of frame – Physical signal configurations which are not used for data bits • Specific configuration choices can improve bit synchronization between TX and RX – Particular sequence of data bit values (FLAG) • Bit stuffing/de-stuffing is needed to avoid FLAG simulation in the PDU – Inter-packet gap minimum between 2 consecutive frames 8
  • 9. Bit stuffing/de-stuffing • Example taken from HDLC protocol • Byte 01111110 is used as FLAG at the beginning/end of each frame • The bits of the original frame are modified through stuffing – After five “1”s a “0” is automatically inserted • At the receiver the Data Link layer operates de-stuffing 9
  • 10. Bit stuffing: example a) Original data from upper layer b) Data transmitted on the wire or over-the -air c) Data at the receiver after de-stuffing. 10
  • 11. Error detection • Some bits may have incorrect values at the RX – Interference, low-level signal – Often errors are not isolated but group into burst • Hamming distance • Redundant information must be added to the message to check errors – m bits of the original message – r bits of the code for error detection – n=m+r bits transmitted on the channel – Code rate = m/n • Examples – Parity Bit – Checksum – Circular Redundancy Check (CRC) 11
  • 12. Parity bit • At the TX a bit is appended to the message – “1” if the amount of “1” in the message is even – “0” if the amount of “1” in the message is odd • At the RX if the amount of “1” is even then at least one bit flipped its values – One bit or an odd number of bits (we cannot distinguish) – Errors affecting an even number of bits are not detected 12
  • 13. Check sum • Extension of the concept of parity bit • The message is decomposed into r bit words • The words are summed and overflow is not taken into account • The sum (another r-bit word) is appended to the message • The sum is recomputed at the RX • If it is different from the appended value an error occurred • Errors are not detected if they affect different bits that do not change the sum 13
  • 14. Circular Redundancy Check (CRC) • The message is seen as the coefficients vector of a polynomy M(x) having degree m-1 • Let R(x) be the remainder of the polinomial division xr M(x)/G(x) where G(x) is named generating polynomy • By construction the polynomy xr M(x)-R(x) is exactly divided by G(x) and it is transmitted on the channel (m+r bit) • At RX if the received sequence of bits is exactly divided by G(x) then it is considered correct 14
  • 15. Channel access methods Point-to-point (e.g. serial cable) Point-Point Protocol Shared (bus, wireless) Random access CSMA/CD, CSMA/CA channel Controlled access Polling, token Multiplexing TDMA, FDMA, WDMA, CDMA 15
  • 16. Point-to-point channel access • In a point-to-point channel the arbitration is trivial since there are always two nodes 16
  • 17. Limit of the point-to-point architecture • In case of N nodes the number of point-to- point channels is N(N-1) with a quadratic cost increase • A shared channel is needed 17
  • 18. Access in case of shared channel • Random access: the node which wants to transmit must wait for the channel to be free (carrier sense) • Controlled access: – Polling: a master asks to each other node if it has something to transmit – Token: a token moves among the nodes; the node with the token can transmit for a given amount of time 18
  • 19. Access in case of shared channel (2) • Multiplexing: the physical channel is de-composed into logical channels used by nodes pairs as they were point- to-point channels • De-composition methodology: – Radio frequency for wireless (Frequency Division Multiplexing o FDM) o light color for optical fibers (Wavelength Division Multiplexing o WDM) – Time interval (Time Division Multiplexing – TDM) – Frequency+time (Code Division Multiplexing – CDM) • 3G mobile and beyond 19
  • 20. Problems in case of wireless transmission • Interference and path loss – Non-negligible bit error rate • Collision management more complex – Hidden node – Exposed Node 20
  • 21. Interference and path loss • More devices use the same frequency band (since it is un-licensed) – Other wireless nodes – Remote controls – Microwave owens • The signal energy decreases as a function of the distance between TX and RX • Obstacles (e.g., walls) • Multiple reflections of the signal cause signal distorsion 21
  • 22. Correct frame probability • Probability to receive a correct bit • Probability to receive a PDU of length N – E.g., N = 1518 byte =12144 bit • Caso Ethernet • Caso WiFi (1−Pbit error ) Pok frame =(1−Pbit error ) N Pbit errore =10 −10 ⇒Pok frame =0.9999988 Pbit errore =10 −4 ⇒ Pok frame =0.2968700 22
  • 23. Limits of carrier sense: Hidden node and exposed node a) Hidden node b) Exposed node 23
  • 24. Limit of collision detection (CSMA/CD) • Collision Detection phase of CSMA/CD is not suitable – A double radio interface (to send and sense concurrently) is expensive… – … and useless since most of the collisions happen at the receiver • --> Collision Avoidance • --> Stop&Wait ack 24
  • 25. CSMA/CA 25 • Carrier sense • Collision avoidance via random back-off • [optional] RTS/CTS
  • 27. MAC Challenges • Traditionally – Fairness – Latency – Throughput • For Sensor Networks – Power efficiency – Scalability 27
  • 28. Power consumption of carrier sense • Expected life time of many WSN applications: Months or years • Actual lifetime – AA batteries: Max. 2000 mAh – CC2430 radio: 26.7mA in RX mode – 2000mAh / 26.7mA = 75 hours = 3 days Keep radio asleep most of the time Ideal duty cycle: 0.1% - 1% 28
  • 29. Texas Instruments CC2430 architecture 29
  • 30. Power modes in TI CC2430 30 Time-out Interrupt Time-out
  • 31. Power modes in TI CC2430 31
  • 32. Example of power-efficient MAC • 1 s in sleep mode (power mode 2)  0.5 μA • 0.005 s in RX mode for carrier sense  26.7 mA • 0.005 s in TX mode to send packet  28.1 mA • Weighted current consumption – (0.0005*1000+26.7*5+28.1*5)/(1010) ~ 0.27 mA • With AA batteries: 2000mAh / 0.27 mA ~ 7359 hours ~ 307 days 32
  • 33. Sources of energy waste • Collision – Retransmissions • Idle listening – Continuously sense the channel • Overhearing – Listen to packets addressed to other nodes • Packet overhead – Header – Control packets (e.g., RTS/CTS) 33
  • 34. Power Save Design Alternatives • Wake-up radio – A sleeping node can be woken at any time by a secondary receiver (wake-up radio) • Asymmetric polling • Timer-Based – When a node enters sleep mode, it sets a timer to wakeup at a pre-determined time • Hybrid – Timer-Based plus Wake-up radio 34
  • 35. Wake-up radio • Add second, low-power receiver to wakeup the main system on-demand • Low-power could be achieved by: – Simpler hardware with a lower bit-rate and/or less decoding capability – Periodic listening using a radio with identical physical layer as data radio 35
  • 37. Asymmetric polling • Implemented in IEEE802.15.4 • Rules depend on the direction of the transfer 37
  • 38. Timer-based MAC • Scheduled contention (slotted access): Nodes periodically wake up together, contend for channel, then go back to sleep – S-MAC • Channel polling (random access): Nodes independently wake up to sample channel – B-MAC, X-MAC • TDMA (Time Division Multiple Access): Nodes maintain a schedule that dictates when to wake up and when they are allowed to transmit – DRAND • Hybrid: SCP, Z-MAC, 802.15.4 (contention access period + contention free period) 38
  • 39. S-MAC (Sensor MAC) • A node sleeps most of the time • Periodically wake up for short intervals to see if any node is transmitting a packet • Accept latency to extend lifetime 39
  • 40. S-MAC: SYNC interval • Listen time consists of two parts: SYNC and RTS • In the SYNC interval some nodes periodically send SYNC packet to synchronize clocks • They use CSMA/CA for channel contention C. Lu, Washington Univ. Saint Louis 40 Carrier sense Carrier sense Carrier sense SYNCCarrier sense Carrier sense
  • 41. S-MAC: RTS interval • RTS/CTS is used to transmit data • CSMA/CA followed by RTS/CTS C. Lu, Washington Univ. Saint Louis 41 RTS It lost contention
  • 42. S-MAC: data transmission • RTS/CTS contain the expected data TX time – Listeners not interested can sleep to save energy • Sender does one RTS/CTS and then sends data for the rest of the frame – Prefer application performance to node level fairness • ACK every data packet – Packet fragmentation for higher reliability C. Lu, Washington Univ. Saint Louis 42
  • 43. Pros and Cons of S-MAC • More power conserving than standard CSMA/CA • During the listening interval, everyone needs to stay awake unless someone transmits – Waste energy • Time sync overhead • RTS/CTS/ACK overhead • Complex to be implemented 43
  • 44. B-MAC (Berkeley MAC) • Low Power Listening (LPL) – Periodic preamble sampling  Preamble > Sleep period – No sync between nodes • Hidden terminal avoidance and multi-packet mechanisms not provided 44 Sleep t ReceiveReceiver Sleep t PreambleSender Message Sleep
  • 45. Pros and Cons of B-MAC • No need for everybody to stay awake when there is no traffic – Just wake up for preamble sampling and go back to sleep • Better power conservation, latency and throughput than S-MAC • Simpler to implement • Low duty cycle  longer preamble – Little cost to receiver yet higher cost to sender – Longer delay – More contention 45
  • 46. X-MAC: Early ACK 46 • Include destination address in short preambles • Non-receiver avoids overhearing • Receiver acknowledges preamble  Sender stops sending preamble
  • 47. Thoughts on X-MAC • Better than B-MAC in terms of latency, throughput and power consumption • Energy consumption due to overhearing reduced • Simple to implement • On average the preamble size is reduced by half compared to B-MAC  Still considerable overhead 47
  • 48. SCP-MAC 48 • Scheduled Channel Polling by everybody – Avoid long preambles in LPL (Low Power Listening) supported by B-MAC • Wake up tone – Much shorter than preamble in LPL followed by data • Assumption: the listening intervals must be synchronized
  • 50. Time Division Multiple Access (TDMA) • Predictable delay, throughput and duty cycle • Little packet losses due to contention • Scheduling and time sync are difficult • Slots are wasted when a node has nothing to send 50
  • 52. Z-MAC (Zebra MAC) • Runs on top of B-MAC • Rely on CSMA under light load  Switch to TDMA under high contention 52
  • 53. Z-MAC (Zebra MAC) 53 CSMA • Pros – Simple – Scalable • Cons – Collisions due to hidden terminals – RTS/CTS is overhead TDMA • Pros – Naturally avoids collisions • Cons – Complexity of scheduling – Synchronization needed
  • 54. Thoughts on Z-MAC • Good idea to combine strengths of CSMA and TDMA • Complex • Especially hard to implement TDMA part – How to deal with topology changes? 54
  • 56. IEEE 802.15.4 superframe • Beacon frame sent periodically by the coordinator – It contains the superframe structure and the slot- transmitter association map • CAP: Contention Access Period – CSMA/CA – For new nodes to join & reserve slots and for delay- insensitive flows • CFP: Contention Free Period – TDMA for delay-sensitive flows – GTS: Guaranteed Time Slot • Inactive period: also the coordinator can sleep 56
  • 57. MAC protocols supported by TinyOS • CC1100: experimental B-MAC • CC2420: X-MAC 57