13
Protocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart System Erwan Béguin PTP ISS 2019

erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

Protocols for the Connected Objects

Wireless Sensor NetworksMAC layers for wireless

communicationsErwan Beguin

INSA Toulouse – PTP Innovative Smart System

Erwan Béguin PTP ISS 2019

Page 2: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

Introduction..............................................................................................................................31. Packet mode Protocols.....................................................................................................4

1.1 The ALOHA protocol..................................................................................................41.2 Carrier Sense Multiple Access (CSMA)......................................................................41.3 Other Packet mode protocols...................................................................................7

2. Circuit mode and Channelization methods.......................................................................72.1 Frequency Division Multiple Access..........................................................................72.2 Time Division Multiple Access...................................................................................72.3 Code Division Multiple Access...................................................................................82.4 Space Division Multiple Access..................................................................................9

3. MAC Layers....................................................................................................................... 93.1 Zebra Media Access Control......................................................................................93.2 Berkeley Media Access Control.................................................................................93.3 Sensor Medium Access Control...............................................................................103.4 Timeout Medium Access Control............................................................................10

Conclusion...............................................................................................................................11References..............................................................................................................................12

Erwan Béguin PTP ISS 2019

Page 3: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

IntroductionThe MAC layer, ie Medium Access Control layer. Correspond in the OSI model to the

Data Link Layer, the second layer. On a network, it ensures the addressing between the Physical Layer (radio, Ethernet, etc) and the Network Layer.

Figure 1: OSI model representation [1]

With the growing number of IOT devices on the market, MAC addressing represent a very important challenge, as for medium access problems and security reasons.

In this document, we will discuss the various protocols for MAC layers and their consequences for wireless IOT communication.

We will first study the protocols for connected networks, then we will look at the MAC layers used in wireless communication.

Erwan Béguin PTP ISS 2019

Page 4: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

1. Packet mode Protocols 1.1 The ALOHA protocol

The ALOHA protocol was developed in 1970 and was the first protocol for single media access communication, usable for wired and radio communication between computers.

Figure 2: The ALOHA System illustrated [2]

The way it works is fairly simple. Each device can send its messages whenever it wants. When a message is not received (i.e. there was a collision for example and the receiver didn’t send the acknowledgment message), the sender sends again its message after waiting a randomly chosen amount of time.

This wait time must be contained in a certain interval. This aims to prevent other collision while not augmenting transmission time too much.

However, we can see that this method is not optimal for a large amount of devices because the collisions can overcome the benefits of the randomly waiting time.

To prevent this, the slotted-ALOHA protocol was invented. It differs from the regular protocol by restricting the transmission of messages by the connected devices to time slots.

It distributes the available time slots to all the devices, which have to wait for their time slots to be able the send their data.

This reduce the risks of collision by dividing the number of devices that send messages at the same time. However, this increases the transmission time and can also be overload by a lot of devices.

The ALOHA protocol was one of the first protocol to implement a random aspect to prevent collision and transmit data to a single medium from a lot of devices. This was the base for a lot of different protocols that we are going to see now.

1.2 Carrier Sense Multiple Access (CSMA)

Erwan Béguin PTP ISS 2019

Page 5: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

The Carrier Sense Multiple Access method differentiate itself from the ALOHA method with the notion of Sense. It means that the device will verify the absence of traffic before transmitting. There are three distinct types of CSMA:

CSMA with collision detection

Figure 3: illustration of the CSMA/CD method [3]

The CSMA/CD method works first by checking if traffic on the network. A message can only be send if the sender doesn’t detect any traffic.

After sending its message, the sender will check if the message is arrived (i.e. there were not any collision with the message or with the ACK packet). If a collision is detected, the sender will wait a random number of time unit (like in the ALOHA protocol) before trying again.

CSMA with collision avoidance

The CSMA/CA differs by user a master node where all the senders send a demand before sending a message. This master node checks if the medium is available before allowing senders to send messages.

Erwan Béguin PTP ISS 2019

Page 6: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

Figure 4: illustration of the CSMA/CA method [4]

Once a demand is emitted to the master node, it checks if the medium is accessible by sending a Ready To Send packet. If the master confirms the idle state of the medium, it sends a Clear To Send frame to the sender. It can then begin the transmission. If the master has no response from the medium, it waits a random back off time.

With this system, no collision is possible. However, it can be very time consuming.

CSMA with collision resolution

The CSMA/CR method is a variation of the CSMA/CD protocol except several senders can access the same medium.

The way it works is by stopping the transmission of a device only if a collision is detected on another device.

To detect such collisions, a master proceeds to make a logical AND over all the message sent. If the result is 0, it means that a frame lost a bit and that the devices which their current state is 1 must be interrupted.

Erwan Béguin PTP ISS 2019

Page 7: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

1.3 Other Packet mode protocols

Figure 5: illustration of a token ring [5]

Several other methods exist for the MAC layer to prevent frame collision on a network.

For example, the token ring is pretty straight forward and present itself like a conveyor belt at a sushi restaurant. Every frame is going the same way into the loop and everybody “read” the messages and receive them only if they are the destination.

Several other variations of the token ring exist with a few differences.We can finally cite Resource Scheduling methods, where the frame is only sent at a

certain date, or the polling methods, based on synchronous Input/Output concepts.

Here were the main methods for MAC Layer focus on packet management.

2. Circuit mode and Channelization methods2.1 Frequency Division Multiple Access

The FDMA method differs from the previous methods by shifting the packet collision problem toward a channelization method. More specifically, each device can send their frames to the medium on a unique frequency.

It poses a constraint to the medium as it has to listen to potentially a large number of frequencies to receive all the messages. The more the devices connected, the more the medium has to be capable of large computation capabilities.

Sigfox uses a variation of this to maintain its large array of devices.2.2 Time Division Multiple Access

In a similar fashion to the slotted-ALOHA protocol, the TDMA method allocate to every device a time slots for it to send its message.

Erwan Béguin PTP ISS 2019

Page 8: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

Figure 6: TDMA illustration [6]

This, way, several devices can communicate to the same medium using the same frequency. It differs from the slotted-ALOHA method by allocating the time slots to a unique device.

The constraint of this is, of course, the number of devices and the frame length.

2.3 Code Division Multiple Access

The CDMA is quite different from the last methods. Each device of the network is assigned a pseudorandom code. By calculating a XOR between this code and the data signal to transmit, the device obtains a new signal, with a higher frequency, that it will transmit to the medium.

Figure 7: example of CDMA modulation

Erwan Béguin PTP ISS 2019

Page 9: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

The medium, knowing all the codes under its network, decodes the frame after reception while identifying the device that sent it.

Used a lot in telecommunication, this method demands a large computational power but can very efficient to manage a large amount of devices.

2.4 Space Division Multiple Access

This last method uses space to create channelization. With the use of directional antennas, we create communications channel within the space plan.

The constraint is that the devices are space dependents, and bad placement can result in perturbation with other channels.

It is useful in device to device communication, where all the positions are known and fixed. You can then create communication pairs, in a way that no channels comes in the way of another.

3. MAC Layers3.1 Zebra Media Access Control

The Z-MAC protocol combines both CSMA and TDMA methods. It aims to be able to adapt to a variable number of devices connected to the medium. To count how many devices are connected, the medium sends every 30 seconds Pings frame.

Situation 1: A moderate amount of devices is on the network

In this situation, CSMA/CA is more adequate and manage very efficiently a low amount of frames on the network. It is also good to save energy, as TDMA demands more resources.

Situation 2: more devices arrive on the network

With the help of the pings, the medium detects the arrival of a large amount of new devices. Then, it sends unique time slots to each and every one of them to transfer to a TDMA method.

TDMA is more suited for a large amount of devices, while maintaining good performance of the network. However, it demands a lot of resources for the medium.

3.2 Berkeley Media Access Control

The B-MAC protocol is specialized in low-energy devices. These devices don’t communicate often and their frame are light. For this reason, it is the protocol chosen by Sigfox for its low energy devices. It is a combination of CSMA/CA and TDMA.

The devices are mostly in a sleep mode, but checks periodically the availability of the medium using Low-Power Listening. When it wants to send data, it begins by waiting a

Erwan Béguin PTP ISS 2019

Page 10: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

certain back off time, followed by a LPL frame. Following a CSMA/CA method, it will emit its data only if the medium is idle, and wait a random amount of time if its busy.

During the emitting phase, TDMA protocol is used to increase the number of devices that can communicate of the medium.

This protocol is very effective to manage a large number of low-power, light framed devices.

3.3 Sensor Medium Access Control

The S-MAC protocol is based once again on the CSMA/CA protocol and on a synchronisation of the communicating devices.

It is specially adapted for devices that do not communicate a lot, or that need to communicate at a certain date.

On this protocol, the devices sleep most of the time, and wake up periodically to check the state of the medium. If a device wants to communicate, it has to synchronise its sleep time with the target. When both devices are awake and ready to communicate, the sender sends its message without interruption to the target.

As we can see, the S-MAC protocol is mostly for communication between two devices.

3.4 Timeout Medium Access Control

The T-MAC protocol is mostly based on the S-MAC protocol.Similarly, it will use sleep and wake up time, synchronized by CSMA/CA protocol.

However, the data frames are sent in burst, corresponding to the waking time of the device. This time is defined by an active period called Tact, which correspond to the minimum waking time of a device within a certain time period

`Figure 8: illustration of the T-MAC protocol

It is more efficient than the S-MAC protocol, as the medium is not monopolized a long time to send a frame. It also allow more than two devices to communicate with the right synchronization of the Tact.

Erwan Béguin PTP ISS 2019

Page 11: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

ConclusionIn this document, we saw that researchers found a lot of different way to manage

access to a medium in a network.They first began to think packet-wise, by introducing random back off time and then

collision detection and resolution.When the number of devices increased, they had to find new way for everybody to

communicate. They chose to channelize the communication, using several methods, from time channelization to frequency channelization. It removes the risks of collisions and was possible by the increase of computer capabilities, making possible the management of a large number of devices.

Finally, to answer different use cases, we created hybrid protocols that can adapt to a lot of different situations, while staying secured.

Erwan Béguin PTP ISS 2019

Page 12: erwanbeguin.com · Web viewProtocols for the Connected Objects Wireless Sensor Networks MAC layers for wireless communications Erwan Beguin INSA Toulouse – PTP Innovative Smart

References[1] “An overview of telecom wireless protocol stack layers”, Nutaq, https://www.nutaq.com/blog/overview-telecom-wireless-protocol-stack-layers[2] “The ALOHA system, another alternative for computer communications”, Norman Abramson, 1970[3] https://en.wikipedia.org/wiki/Carrier-sense_multiple_access_with_collision_detection[4] https://en.wikipedia.org/wiki/Carrier-sense_multiple_access_with_collision_avoidance#/media/File:Csma_ca.svg[5] https://fr.wikipedia.org/wiki/Token_ring#/media/File:Tokenring.png[6] https://en.wikipedia.org/wiki/Time-division_multiple_access#/media/File:Tdma-frame-structure.png[7] https://en.wikipedia.org/wiki/Code-division_multiple_access#/media/File:Generation_of_CDMA.svg[8]”MAC Layer protocols for sensor networks”, PAU UPPA, http://cpham.perso.univ-pau.fr/ENSEIGNEMENT/PAU-UPPA/INGRES-M1/07-wsn-mac.pdf

Erwan Béguin PTP ISS 2019