Lecture 13: WSN MAC Protocols

  • Videos
  • May 7, 2021
  • 0
Talha Ibn Aziz – Lecturer at Department of CSE, IUT

Assalamualaikum everyone so this is the 13th lecture ofthe course and we’re going to start with uh wireless sensor network medium access control protocols today okay so there are actually many uh mac protocols in wsn because uh wireless sensor networks has many applications and many environments in which they are deployed and depending on those environments the mac protocols change a lot so there are a huge number of mac protocols so wireless sensor network mac protocols or medium access in wireless sensor networks is difficult because of various reasons some of them are it’s impossible to send and receive at the same time because there’s only a transceiver in a wireless sensor network if you remember we read the different components of a wireless sensor network and there were four necessary components one of which was a transceiver and transceiver means it can receive and transmit using the same antenna and the other problem regarding wireless sensor networks or nodes of wireless sensor networks is you cannot you know create multiple antenna because it would be very costly as wireless sensor nodes have to be created with the least cost possible or in the least expensive manner as a result you cannot create more than one antenna and so one transceiver is used for both receiving and transmitting as a result it is impossible to do both at the same time so due to this uh collision detection is not possible so the other reason is another reason is interference situation at receiver is what counts for transmission success but can be different from what the sender can observe so this is quite simple right if a message is sent from the sender to the receiver collision actually happens at the point of the receiver so even if there is a collision at the point of the sender there might not be a collision at the end of the receiver similarly if there is no collision at the end of the sender there might still be a collision at the end of the receiver so the most important thing to detect a collision is to understand the situation of the receiver but it is difficult to do that in case of wireless scenarios because the signal range decreases at as it uh goes to a specific distance okay so this is another problem why uh collision cannot be detected and interference situation at the receiver cannot be understood as well and another problem is there are very high error rates in wireless communication because there might be multiple uh kinds of interference and let’s say natural reasons for the data packets to be dropped and errors or corruption to you know affect the packets okay so the requirements for ws and mac protocols uh are some are similar to normal wireless networks which are let’s say we need high throughput and we need low overhead we need low error rates and so on right but there are some extra constraints when we are talking about wireless sensor networks which are energy efficiency and also the handling of devices okay so the handling of devices means you have to handle both the turned on devices and turned off devices okay so that means that nodes can turn off in case of wireless sensor networks to preserve their energy so you have to schedule when the nodes will be turned on and when it will be turned off okay so the one thing that’s most important here is in case of wireless sensor network the strictest constraint is related to energy efficiency because you cannot you know replace the batteries in most of the cases for wireless sensor networks and you cannot you know fix the networks as well so the wireless sensor networks and the nodes of wireless sensor networks have to be self organizing and their battery life needs to be conserved in the strictest way possible so energy efficiency can be considered the most important constraint when we are talking about wireless wireless sensor networks okay because the nodes are usually disposable so as a result a large number of nodes needs to be created and as the number of nodes is huge it’s even more impossible to you know replace those batteries okay and the other thing is the different layers which you know work with everything for example the application layer uh the network layer uh the data link layer and so on so these layers actually define the protocols right and as energy efficiency is determined by the medium access control why is that because receiving and transmitting is the most expensive uh work you can do with consideration or with respect to energy okay because that is the most energy consuming uh application of wireless sensor networks okay so as a result the medium access is very important to ensure that there is energy efficiency which is why uh mac protocols have to be very uh conservative when we’re talking about energy so the requirements for energy efficiency are as i’ve already said the transmissions are very costly and receiving is also costly uh compared to transmitting okay so the both of them are very costly as a result both receiving and transmitting must be avoided as much as possible and idling can be cheaper idling means you’re not receiving but you’re not also transmitting idling can be cheaper but even that is expensive so you can clearly understand the importance of energy in wireless sensor networks okay so some problems are listed here which says that which sort of actions actually cost us energy and which actions we should avoid so the first one is coalitions okay so collisions are very wasteful why because not only did the packet that you sent using a lot of energy is wasted because there’s a collision but you have to again send those packets okay so waste this is a wasted effort when packets collide the second problem is overhearing okay so what does overhearing mean overhearing means let’s say you are listening in on a packet which is not intended for you so let’s say uh one station is communicating with another station but you are in between and you’re not sure whether that packet is intended for you or not and you are listening in on that packet but after you receive it you understood that it’s not for you so the time and energy you wasted here cannot be got back right so this is called overhearing and in short it can be said the waste effort in receiving unintended packet uh another reason is idle listening so idle listening means ideally trying to receive when nobody is sending so the difference between overhearing and ideal listening is in overhearing someone else is actually sending a packet and we are listening to that and idle listening means you’re listening but no one is sending the packet okay so this is less costly than overhearing but it’s still very costly as i’ve already said that idling can be cheaper but it is still expensive so we even have to avoid idle listening and next is protocol overhead so protocol overhead means the time or resources spent to you know control the medium access okay so any sort of medium access protocol or medium access control mechanism that you provide for the wireless sensor networks even that protocol has to be simple so that the wireless sensor networks do not you know waste enough resources to access the medium or to you know implement the protocol okay so there are many constraints here as you can clearly understand and a low complexity solution will always be nice to solve all these problems but that is very difficult to come by so this is the classification of medium access control for wireless sensor networks although uh this is a basic classification that i have tried to build you can find various kinds of classification because as i’ve already said there are many kinds of medium access control protocols and many of them do not even fall under one category they might be you know a mixture of multiple categories okay so what’s important is to try to understand each type okay so instead of you know understanding which is divided into what you need to understand each specific type so i’m going to go through all of them in short so wireless medium access can be divided into two categories centralized and distributed so you already know what centralized and distributed mean right centralized means someone is there to control the mechanism or medium access and distributed means the control is given to everyone so these two can be actually divided into two ways both of them one is schedule based and one is contention based so schedule based means uh the schedule is given that means there is a fixed slot for someone to access the channel and contention based means uh they have to content for the channel okay and fixed assignment and demand assignment means uh for fixed assignment uh the schedule based application is used here so that means whenever you want to set a schedule you only set a schedule when you need to so that is called demand assignment and when the schedule is already fixed from before this is called a fixed assignment okay and in case of contention based there are two types synchronous and asynchronous so synchronous means before transmitting the nodes need to synchronize with each other then to synchronize the time periods of waking up and sleeping okay so what is working working on waking up and sleeping we’re going to see that later on and asynchronous means you do not have to sync with the other stations okay so i’ve explained all of these in short but don’t worry i’m going to go a little bit in details so centralized medium access a central station controls when a node may access the channel okay so this means as i’ve already told you there has to be a station who controls the medium access now the problem here is in case of wireless sensor nodes as all of the nodes have to be what disposable right so i cannot actually create a sensor node which will be very costly like an access pointer which has more power so what happens in most of the cases is the sensor nodes take the control of the scenario in shifts for example when one sensor node is acting as the central station it is using a lot of you know power and a lot of energy and as a result it might finish its battery life before everyone else so after a specific amount of time the duty is again shifted to another station or wireless sensor node okay so in this way actually a sensor a central station can control okay so examples can be you know polling then centralized computation of tdma schedules so tdma means time division multiple access that means the computation of time slots for each of the stations that can be done by the central station okay and polling is simple you know just spoiling each of the stations to know who has the data to send you have already seen examples of that so features of this protocol is it’s very simple because it’s controlled right and it’s quite efficient because there is no collision because instead of contending now the central station determines who will access the channel so there is very less collision but the problem is it burdens the central station more as i’ve already said the central station has to use a lot of energy so this is not directly feasible for non-trivial uh wireless network sizes okay so non-trivial means when the wireless network is large in size that means there is a huge number of nodes even when we are comparing with other wireless sensor networks so why is it not directly feasible at that time because the more number of stations there are the more burden it is for the central station so the central station will burn out its battery life very quickly as a result it is not possible to use a centralized medium access when there are many sensor nodes it can only be possible to use this protocol when the number of sensor nodes is fewer in comparison okay okay so uh it can be quite useful when the network is divided into clusters okay so if there are smaller networks if i can divide the large network into some smaller sub networks or clusters and let’s say assign a central station for each of those clusters then maybe the central station can handle the load okay so uh it can also be compared with piconets right if you if you remember piconets of bluetooth networks so there are about eight stations in a piconet right so that sort of small network with only eight stations uh can be used to uh apply the centralized medium access okay so each cluster has centrally controlled medium access as i’ve already told you so each separate cluster will have their own medium uh access control mechanism okay so they’ll be following a different schedule maybe each of those or maybe following a different slot and the mechanisms of one cluster will not affect the other cluster so it will be easier to manage them as well so the next type was schedule based medium access control so in this scenario obviously a schedule exists which regulates which participant may use which resource at which time okay so this is uh simply you can compare to time division multiple uh multiple access okay you have already started it right before tdma cdma okay you might have must have studied it before so the typical resource can be you know as as it can also be a time that means the time slots will be divided or it can also be that the frequencies can be uh divided in a physical space for example uh fdm right so fdma can also be used it can be any kind of schedule not only time based okay so again uh for with a given code it can also be code division multiple access so all these kinds of division mechanisms which divide the virtual space or physical space among the different nodes can be considered as schedule based mechan medium access controls okay so the schedule can be fixed or computed on demand as i’ve already said the shield can be fixed from the beginning or when the when the stations want to access the channel only then it can be computed on demand okay so usually collisions overhearing and idle listening these are the problems that we mentioned earlier right so usually these problems are solved when you’re talking about schedule based mechanisms okay but the requirement here is there needs to be a time synchronization okay because all the nodes need to know uh when they can access the channel they need to know their time slots as a result they need to synchronize their time or maybe synchronize their frequency okay so next is contention based medium access control so in case of contention based medium access control as you can understand there is no central station so the risk of colliding packets is deliberately taken okay because in case of contention-based mechanism there is always the possibility that many stations will try to access the channel the same time and there will be a collision but why are we doing this we are hoping that the coordination overhead there has to be a coordination overhead when we are working with a central station because that has to coordinate with with the other stations and let them know when you can send okay so this control overhead or coordination overhead if this is too much then uh the centralized medium access can be actually more harmful than beneficial so our hope in contention-based mechanism is it can be better than centralized access if the coordination overhead can be saved okay so resulting in overall improved efficiency so if let’s say the coordination over overhead is not much then the colliding packets which is the risk of colliding packets okay so this will actually be more harmful compared to centralized uh medium access okay so you can clearly understand basing on the environment and the requirement the medium access controls have to be decided okay so in case of contention based medium access control there are mechanisms to handle or reduce the probability of collisions okay so obviously without those mechanisms there will be a lot of collisions so we have to you know reduce those with the protocol usually randomization is used somehow you already have an example in wlan in wlan some sort of randomization is also used to select the contention window so similar protocols are used in case of contention based mac for s wsn okay so ws in max can also be a combination of strategies so it is difficult to categorize uh a protocol into a specific category as i’ve already said okay so next we’re going to uh see uh uh already well-known protocol which is a sensor mac okay so remember we’re going to study a few protocols in this lecture and also in the next lecture as well so most of these lectures or protocols are actually very old they might be from the range you know maybe 2002 to 2004 okay and many other protocols have actually replaced them or improved them okay but they’re the foundation of wireless sensor networks and the citation for each of these papers have exceeded about 7000 citations okay which clearly explains how important these protocols are okay so if you want to study new protocols for example tmac came after smac it’s up to you to study those okay and they can even help you if you want to do research on wireless sensor networks but i’m not going to explain the new protocols i’m only going to explain the most basic and well-known protocols okay so let’s move on sensor mac or s mac so this protocol is a synchronous type mac protocol that means it synchronizes with the other stations okay so there is a duty cycle which is why it’s also called duty cycle based mac so what does the duty cycle mean a duty cycle means it uh a sensor node does not stay awake for the entire period no it only stays awake for a very small amount of time and the rest of the time it sleeps okay or it you know goes into a low power mode so you can see the figure here so let me just turn on the uh laser where is the laser okay this one i guess found it okay so as you can see here this is the timeline right and this small part is actually the time during which the station will stay awake and this time in between the wake up time is the sleep period so during this time the station will be sleeping or it will not be awake okay so this small time is actually only the active period so you can clearly understand a lot of energy is saved as a result so this entire period is called the wake up period so remember wake up period is not active period wake up here is the summation of shift period and active period so wake up period is the amount of time during which if another station is listening then it can clearly understand when that station is active okay so this is required to understand which stations are active okay so let’s go through the idea one by one so the idea is the switch uh we have to switch nodes off to ensure that the neighboring nodes uh turn on simultaneously to allow packet exchange okay so let me clear this up this means that the switches will always be turned off but we have to only turn on the switches when the neighboring nodes are also turned on that means we have all the nodes have to be turned on at the same time so that they can sync their active period so so they can also sleep for a longer period of time okay they also need to uh exchange wake up schedule between the neighbors okay that means they have to be a communication between the station so that they know when the other station will be awake okay and only in this active periods packet changes will occur during the sleep period there will not be any packet changes because the station will be sleeping so it’s simple there will be no packet changes during the sleep year there will only be packet changes during the active period okay so when the stations are awake they’re essentially performed rts or city rts and cts okay so after artists and cts then they start their communication so at first what do they do they use a sync packet to synchronize their time okay and after the sync packet they send an rts and then a cts and which is the handshaking protocol and after artisan cts then they start communicating okay so so the notes try to pick up serial synchronization from neighboring nodes so in order to understand the schedule of the other nodes or to you know wake up at the same time as they wake up you have to understand their schedule so you have to synchronize your schedule with the shield of the other neighboring nodes so if no neighbor node is found then you can actually pick any random schedule to start with so if any additional nodes join they will join your schedule okay so some node might learn about two different shields from different nodes so at that time what will happen synchronized islands will be formed because they have to synchronize with multiple loads okay so what the synchronized islands mean we’ll see that later on so to bridge this gap it has to follow both the schemes of both the neighboring nodes okay so in this scenario actually that node has to use more energy compared to the other nodes so the following demonstration shows the process okay so let’s see uh at first let’s say one station a has suddenly woken up and as i’ve already said if there is no other uh station near nearby then it will randomly select its own shield okay so as there is no station nearby it will select its own time period so as you can see these are the wake up time sorry the active periods of station a and the other times it will be sleeping now another station c has woken up but it is far away from station a that means it will not receive anything from station a so we can also consider that in this scenario c will select a random time for itself but it will not match with the station a so their their uh time periods will not be synchronized but they both will select a random time so let’s see also selects random time and this is the time schedule for c uh the active periods is the blue marked one and the white uh timeline is actually the uh let’s say uh wake uh sorry the sleeping period okay so next station b has woken up and now station b is near to a so as a result b has to synchronize its time with station a so this is what happens when it synchronizes its time so b will only be awake when a is awake okay so if you remember the uh the wake up period so during the wake up period that means the addition of the sleep period and also the active period so during the whole wake up period when station b will be awake so during this entire period you will be trying to listen to a and whenever a sends the synchronization packet if you remember s y n c h right whenever s s sends the synchronization packet only then we will understand that okay so this is the time period of a and the information of the time period is given in a synchronization packet and when b gets the synchronization packet then it will fix its own time schedule to match with a okay so this is what happens the serial of b now matches with a fine another station b has woken up the same thing happens like b and it matches its schedule with c okay so now the problem is the problem of synchronized islands so now the problem happens when let’s say another station e has woken up but now it is in between b and c so it can actually receive from both b and c otherwise there will be no communication with b and c right so there has to be a node in between b and c so when a node arrives or wakes up in between b and c now the problem arises what will it do will it match with the time of b or will it match with the time of c so in this scenario it has to match with actually both of them so this is what happens sorry so this is what happens when you try to when station e tries to synchronize with both the station it has to stay awake for a longer period of time compared to the other nodes okay so this is called a synchronized island why is it called a synchronized island because this part this part is synchronized by themselves but it is not synchronized with the other part which is why they can be called an island but a synchronized island because an island is not connected with any other land it is surrounded by water right so that’s basically where the definition comes from similarly this is also a synchronized island so synchronized islands are connected with a node which actually uses much more energy compared to the other nodes because they have to wake up for a longer period of time okay so this is a problem of synchronized islands okay fine so that was about smack so next we’re going to learn a little bit about uh another protocol uh we can actually call it a technique more than a protocol but it’s also used as an entire protocol com when preamble is also used with it okay so this technique is called lpl or low power listening so this is the polling type mac so what does lpl mean lpl mean uh that means the nodes will be in a low power mode so that it cannot you know receive packets it cannot send packets but it can only detect whether there is an energy level uh in the channel that means it can only detect with the channel is busy or not it can only detect when someone else is you know sending packets or not so the goal here is to minimize the listening cost so if you do not have to you know wait to receive the packets or if you do not have to be ready to receive the package you can only check for the energy level of the channel so as a result the listen cost is minimized so the principles of this technique or protocol is the note periodically wakes up then turns the radio on and checks the channel okay so the wake up time is fixed so how is the wake up time decided that is the depending on the uh received signal strength okay so rssi means the received signal strength that means uh the node tries to understand which signal power is the strongest okay so this is this is similar to you know if you remember in wide area networks when a mobile tries to get inside let’s say a cell it tries to understand which bts tower has the strongest signal and by understanding that it tries to you know access the channel of that bts tower so that is called rssi sampling okay to sample the signal strengths and to choose the signal strength which is the strongest okay so what happens in low power listening is whenever it’s waking up instead of you know trying to receive a packet it only tries to assess the signal strength in the channel okay so this is actually the check time variable so that means this is the amount of time when the node will be trying to assess the signal strength of the channel okay so if an energy is detected then the node powers up that means now it will be ready to receive the packet otherwise it will be in a low power mode okay so this is uh in simplicity what is the low power listening so the note goes back to sleep if a packet is received once the packet is received you do not have to wake up anymore because your work is done or if uh you you are waiting for a long amount of time with low power listening mode but no packet is received even though the channel is busy you are not receiving any packet so it will stop listening after a timeout amount of time okay so if the preamble length matches the channel checking period then you will understand that someone is sending a packet to you so why does this come because if you remember uh you have to you can only check whether the channel is busy or not but you do not know whether any packet is intended for you or not so in this scenario the preamble is used to understand whether any packet is intended for you or not and the preamble is also used to you know synchronize okay so whenever you uh receive a preamble that means preamble is actually a series of zeros and ones and you you should have learned this in the previous courses as well so whenever you receive a series of zeros and ones that means that you have to wake up and someone might be sending a packet to you okay and if that preamble length matches the channel checking period then you do not need any synchronization that means you are already synchronized with that preamble okay so the lpl mode with preamble now if there is preamble along with lpl mode then it becomes a protocol okay so with these two things a new protocol can be formed so in this protocol the scenario is i will explain from the beginning at first a preamble is given and whenever a node listens to that pml it understands that okay someone might be sending a message and it wakes up from its low power listening mode and after it wakes up now it is ready to receive any packet so if if it receives a packet and if it understands that this packet is intended for this receiver then after receiving the packet it will go back to sleep otherwise it will keep waiting and if no packet is intended for the receiver after a time or period it will again go back to sleeping or go back to low power listening in this case okay so this is the low power listening uh with preamble in short so that was the end of the slide uh if you have any question then please feel free to ask and in the next lecture we’ll also be learning a few more protocols of wireless sensor network um a medium access control okay so if you if you have any question regarding everything that i’ve said today uh you can ask okay so this i’m going to end the lecture for today assalamu alaikum everyone 


Lecture 12: IEEE 802.11 Variations

Lecture 14: WSN MAC Part 2 (Continued)

Leave a Reply

%d bloggers like this: