Exploring the Protocol Stack of Wireless Sensor Networks
Elizabeth J Goff
Introduction
A wireless sensor network is an ad-hoc arrangement of multifunctional sensor nodes in a sensor field, usually to gather information regarding some phenomenon. Sensor nodes can be densely distributed over a large, even remote, area and will continue to collaborate their efforts to the benefit of the network even if a number of nodes malfunction, the network will continue to function. There are two main layouts for wireless sensor networks. The first is a star layout where the nodes communicate, in a single hop, directly to the sink whenever possible and peer-to-peer communication is minimal. In the second, information is routed back to the sink via data passing between nodes. This multi-hop communication is expected to consume less power than single-hop communication because nodes in the sensor field are densely distributed and are relatively close to each other.
Wireless sensor networks differ from traditional ad-hoc networks in a few very significant ways. The first of these is power awareness. Because nodes are placed in remote, hard to reach places, it is not feasible to replace dead batteries. All protocols must be designed to minimize energy consumption and preserve the life of the network. The second difference is that sensor nodes lack global IDs, so that the networks lack the usual infrastructure. Attribute-based naming and clustering are used instead. Querying of wireless sensor networks is done by asking for information regarding a specific attribute of the phenomena or asking for statistics about a specific area of the sensor field. This requires a protocol that can handle requests for a specific type of information and data-centric routing and data aggregation. The last important characteristic of wireless sensor networks is that the position of the nodes may not be engineered or pre-determined, and therefore, must provide data routes that are self-organizing.
The sensor network protocol stack is much like the traditional protocol stack, with the following layers: Application, Transport, Network, Data Link, and Physical. The wireless sensor network must also be aware of the following management planes in order to function efficiently: Task, Mobility, and Power Management Planes. The Power Management Plane is responsible for minimizing power consumption and may turn off functionality to preserve energy. The Mobility Plane detects and registers movement of nodes so a data route to the sink is always maintained. The Task Plane balances and schedules the sensing tasks assigned to the sensor field so only the nodes necessary are assigned to sensing tasks and the rest can focus their energy on routing and data aggregation. These management planes monitor the power, movement, and task distribution among sensor nodes. They also help coordinate sensing tasks and routing in order to lower the overall power consumption. Protocols developed for wireless sensor networks must address all three of these planes. This paper will explore the different layers of the protocol stack and how each layer addresses the management planes. The focus of the paper is communication in a multi-hop network especially at the link and network layers.
Physical Layer
The responsibilities of the Physical Layer are frequency selection, carrier frequency generation, signal detection, modulation, and encryption. Its main priority is energy minimization and secondary concerns are the same as those of other wireless networks. The minimum output power required to transmit over a distance d is proportional to d to a power of n, where n varies from 2 to 4 and is closer to four when the antennae are near the ground as is typical in wireless sensor networks. This is due in part to ground-reflected rays, which causes partial signal cancellation. This problem is overcome by multi-hop communication and high node density.
Data Link Layer
The responsibilities of the Data Link Layer are the multiplexing of data streams, data frame detection, medium access and error control. A wireless sensor network must have a specialized MAC protocol to address the issues of power conservation and data-centric routing. The MAC protocol must meet two goals. The first is to create a network infrastructure, which includes establishing communication links between possibly thousands of nodes, and providing the network self-organizing capabilities. The second goal is to fairly and efficiently share communication resources between all the nodes. Existing MAC protocols fail to meet these two goals because power conservation is only a secondary concern in their development. Also, wireless sensor networks have no central controlling agent and a much larger number of nodes than traditional ad-hoc networks. Any MAC protocol for wireless sensor networks must also take into account the ever-changing topology of the sensor network due to node failure and redistribution. The MAC protocols presented here are sensor-MAC (SMAC), Etiquette Protocol, and CSMA for Sensor Networks.
SMAC
SMAC provides nodes a way to discover their neighbors and establish transmission/reception schedules. The main principles behind SMAC are a periodic listen and sleep schedule, collision and overhearing avoidance, and message passing. It works by multi-hop communication and self-configuration of nodes. The focus of SMAC is on system-wide performance and network lifetime. Therefore, applications will have long idle time and must tolerate some latency. The nodes are formed in a flat topology so that neighbors can always communicate with each other and changes are easy to accommodate.
All nodes in the network are set to have the same listen and sleep time period. During the listen period, the node waits for communication from its neighbors with its receiver on. During the sleep period, the node turns its receiver off to conserve energy. The nodes are free to choose their own schedule but to reduce overhead and latency, neighboring nodes are synchronized. The nodes then broadcast their schedules and cache the schedules of their neighbors. If two neighbors wish to communicate, one simply waits for the other to wake up. If two nodes wish to communicate to the same node, they send out a request to send (RTS) message. The first RTS received is the one honored and is responded to with a clear to send (CTS) message. All nodes will then resume their sleep cycle when the transmission is complete. The downside to this pattern is increased latency due to the periodic sleep schedule and the delay can accumulate on each hop. The latency requirement of a specific application places a fundamental limit on sleep time of nodes.
The nodes are free to choose their own listen and sleep schedules using the following rules:
Synchronization between neighbors must happen periodically to prevent long-term clock drift. The period between updates may be quite long (a magnitude of tens of seconds). Synchronization is done by sending a synchronization (SYNC) packet. The SYNC packet is a very short packet containing only the node ID and the time of its next sleep relative to the moment the sender finishes transmitting the SYNC packet. The receiver then adjusts its timer counters accordingly. Synchronizers also need to periodically synchronize all of its followers. The followers only need to update neighbors not on the same schedule. In order to accommodate receiving SYNC messages and DATA, SMAC divides the listen time into two parts, one to listen for SYNC and the second to listen for RTS.
Collision avoidance is accomplished through physical and virtual carrier sense. Physical carrier sense is carried out before a node initiates a unicast transmission. The node sends out an RTS message and then waits to receive a CTS message from the intended recipient. If the transmitting node does not receive the CTS, it sleeps until the receiver's next listen period. Each transmission packet contains a duration field indicating how long the remaining transmission will last. If a node intercepts a packet destined for another node, it stores this data in a variable called Network Allocation Vector (NAV). If NAV is not equal to zero, the node knows the transmission medium is busy and it can keep silent until all other transmissions are complete. This is called virtual carrier sense. If both physical and virtual carrier sense give the OK, the node is free to transmit.
In traditional MACs every node will continue to listen to all transmissions from all neighbors, but in the Wireless Sensor Network, this is far too expensive and a waste of the nodes' energy resources. SMACS allows interfering nodes to sleep after overhearing an RTS or CTS broadcast. This prevents neighbors from overhearing long DATA packets. In order to avoid all interference, all immediate neighbors of both the sender and receiver should sleep. The RTS and CTS also contain the duration of the transmission, so the overhearing nodes will know how long they should sleep.
Message passing is a primary function of networks. A message is defined as a collection of meaningful, interrelated units of data. A message may be divided into a series of short packets or may be transmitted as a single long packet. A long single packet has the disadvantage of a long retransmission time if only a few bits are errors. Smaller packets have the disadvantage of large control overhead and longer delay because the RTS/CTS ritual must be performed for every packet. The SMAC approach is to fragment a long message into small fragments and transmit them in bursts. The sender will use a single RTS for the burst and reserve the medium for enough time to transmit all the fragments. The sender then waits for an acknowledgement (ACK) after each fragment is transmitted. If it fails to receive the ACK, it extends the reservation time using the duration field in the next transmission and resends the lost packet. The other reason for using the ACK approach is that if a neighbor of the receiver wakes up or a new node joins the network in mid-transmission, it will not hear the DATA. If the receiver did not send ACK frequently, the new node may mistakenly infer from its carrier sense that the medium is clear. If it starts transmitting, it will interfere with the receiver of our original transmission. The ACK also carries the duration so the receiver's neighbors can sleep appropriately.
SMAC has been shown to effectively reduce energy consumption, but the system must be able to tolerate a high level of latency.
Etiquette Protocol
Etiquette Protocol is a power-conserving protocol designed to rest on top of an existing MAC protocol. The MAC still handles the micro-details of communications, such as channel contention. The main ideas behind Etiquette Protocol are:
Nodes start by scheduling 'office hours' at regular intervals. Neighbor nodes request 'appointments' for sending data during these office hours. The appointment packet specifies the duration of the appointment and the receiver either grants or denies the appointment. The grant packet will specify the time and duration of the appointment. Both nodes will sleep until the time of the appointment because all the nodes know the precise interval of communication.
Nodes are free to choose their own office hours independently of other nodes with the condition that the office hour period cannot exceed a specified time, namely Pmax. Pmax is set to create an upper bound on the latency of the network. A lower Pmax will create a more responsive network, but since holding office hours depletes the energy of a node, the cost will be higher power consumption. A Sensor Network in which latency is not a primary concern will have a higher Pmax, thus conserving more energy. This forcers a node to hold office hours at least once in Pmax units of time. At the start of its office hours, the node broadcasts an announcement containing the duration and period.
When a new node enters a network and is powered on, its first concern is to establish office hours so it may communicate with its neighbors. To do this, it scans the channel for a set amount of time and gathers the office hours of all its immediate neighbors. It then chooses its own office hours in such a way as to minimize overlap with the office hours of its neighbors.
To determine a neighbor's office hours, a node will turn its radio on and is guaranteed to hear an announcement within Pmax time. It caches all overheard office hour announcements for future reference. Once the announcement is heard, the node is then able to request an appointment. The appointment request contains four parameters: the appointment length, appointment type, desired time interval for appointment, and number of appointments needed. The appointment length specifies the size of the payload to be communicated. The type can be one-time or periodic. Periodic appointments are especially useful in data gathering applications where data must be sent on a regular basis. The use of periodic appointments avoids the need to request an appointment for each packet to be sent. The desired time interval may be requested by the sender to avoid conflicts with other appointments it may have already scheduled. The node may also need to request a number of appointments if the data is greater than the maximum packet size of the network and must be split into several smaller packets.
The receiver then looks for an appropriate slot when the channel is expected to be free. However, it only has locally available information: its own set of appointments, office hour schedule, and usually incomplete knowledge of appointments of its neighbors. It must select a time-slot that does not interfere or overlap any of these other obligations and meets all the constraints set forth in the request. If no suitable time-slot is available, the node may overlap the appointment with its office hours, effectively reducing the duration of its office hours. This may be more energy efficient for the node, but may prevent some neighbors from setting up appointments. If a suitable slot is found, the node sends a grant-appointment message containing the start time of the appointment. If not, it sends a deny-appointment message. If the node is granted an appointment, it records the appointment time, enters sleep mode, and waits for the appointment time.
If the requesting node does not receive a response, it waits for a request-timeout interval and resends the request. There is a retry-threshold and if the number of requests exceeds this threshold, it assumes the receiving node is no longer in the network and discards all messages intended for that destination.
When the appointment time is reached, both nodes turn on their radios. Because the appointment time is communicated as an offset of the time the grant-appointment message was sent, the appointment time recorded by the sender may be different than that of the receiver. In order to compensate for this difference, the nodes use a 'guard band' around the appointment slot and actually power their radios on at the beginning of the guard band. This prevents the loss of data due to one node preemptively transmitting.
Etiquette Protocol offers several options to help optimize performance. The first allows nodes to send small packets during the receiver's office hours without having to make an appointment. This is done when the packet being sent is smaller than the combined size of the appointment-request and grant-appointment messages. Etiquette Protocol also allows nodes to adapt their office hours according to the load on the node. If the node is idle for longer than a given threshold during their office hours, the node reduces the length. On the other hand, if the fraction of idle time drops below another threshold, the office hours have become too crowded and the node will increase the duration of its office hours. The choice of thresholds is dependent on the requirements of the application. When an event monitoring system causes bursts of communication data, a highly aggressive strategy should be used to change the office hours. Conversely, a more conservative approach will work for habitat monitoring systems that report consistently and periodically. If an inappropriate adaptive strategy chooses office hours that are too short, latency will increase. If the duration of office hours is too long, the node will be idle for a significant period of time, which is a waste of energy.
Network Layer
The network layer in a WSN must be designed with the following considerations in mind: power efficiency, WSNs are data-centric networks, and WSNs have attribute-based addressing and location awareness. The Link layer handles how two nodes talk to each other, the network layer is responsible for deciding which node to talk to.
The simplest design is flooding. When using flooding, each node receiving data repeats it by broadcasting the data to every neighbor unless the max hop lifetime of the data has been reached or the receiving node is the destination. The major support for flooding is the simplicity. It requires no costly topology maintenance or complex route discovery. The shortcomings, however, are substantial. The first problem is that of implosion. Implosion occurs when two nodes (A and B) share multiple (n) neighbors. Node A will broadcast data to all n of these neighbors. Node B will then receive a copy of the data from each of them. The second issue is that of overlap, when two nodes share the same sensing region. If a stimulus occurs within this overlap, both nodes will report it. The last and most crucial problem is resource blindness. Flooding does not take into account available energy resources. A step up from Flooding is gossiping. In gossiping, when a node receives data, it randomly chooses a neighbor and sends the data to it. Gossiping avoids the problem of implosion, but does not address the other two concerns and contributes to the latency of the network.
Ideal Dissemination
A step up from flooding and gossiping is ideal dissemination. In this algorithm, data is sent along a shortest-path route from the originating node. This approach guarantees every node will receive every piece of information exactly once. No energy is wasted in sending or receiving redundant data. However, the overhead involved in keeping track of the shortest paths is substantial. Also, ideal dissemination does not take into account that some node may not need a particular piece of information; nor does it allow for resource awareness.
SPIN
A little more sophisticated family of protocols is SPIN, Sensor Protocols for Information via Negotiation. SPIN addresses the deficiencies of classic flooding by the method of negotiation and resource adaptation.
Negotiation helps to overcome the problems of implosion and overlap and ensures only useful and desired information is disseminated. In order for negotiation to work, nodes must describe the data to be sent using meta-data. In order for SPIN to be efficient the meta-data must be significantly shorter than the data being described. Also, meta-data describing two distinguishable pieces of data must be different. Likewise, if two pieces of data are indistinguishable, they will share the same meta-data. The format of the meta-data is not specified by SPIN, but rather application specific.
SPIN uses three types of messages: ADV, REQ, and DATA. When a node has data to share, it first broadcasts an ADV message containing meta-data. A neighbor then responds with REQ if it is interested in the advertised data, and is sent DATA. The cycle then continues. Using this method of negotiation guarantees that only nodes that are interested in the data will receive it, and since ADV and REQ contain only meta-data, they are cheaper to send and receive.
Before data is transferred, nodes poll their resources to find out how much energy is available. Each node has a resource manager to keep track of resource consumption and calculate cost of performing computations and sending and receiving data. Using this information, nodes are able to use their resources effectively. Again, SPIN does not specify a particular energy management policy, but provides the application level with an interface to query the available resources.
One implementation of SPIN, SPIN-2, employs a Low-Energy Threshold. When energy is abundant, the node functions as normal. However, when the resource manager detects the nodes power supply is reaching the low-energy threshold, the node with decline to participate in any stage of the protocol if it believes it will not have enough power to complete the rest of the stages without going below the low-energy threshold. This prolongs the life of the node and allows it to perform only high priority functions.
SPIN is a more sophisticated and energy aware schema for data dissemination. It reduces the amount of energy expended, solves the problems of implosion, overlap, and resource blindness, and ensures that only interested nodes will expend energy to receive data.
Transport Layer
The transport layer comes into play when the system needs to communicate with the outside world. Communication from the sink to the user is a problem because the Wireless Sensor Network is not based on global addressing and attribute-based naming is used to indicate the destinations of DATA packets. Very little research has been done at the transport layer.
Application Layer
A Sensor Management Protocol, SMP, at the application layer is used to make the hardware and software of lower layers transparent to the Sensor Network Management Applications. The system administrators and programmers with interact with the Sensor Network using SMP. Again the lack of global identification and infrastructureless nature of sensor networks must be taken into consideration. SMP provides the rules for the following to enable interaction between applications and sensor networks:
Conclusion
Very different considerations must be taken when developing protocols for wireless sensor networks. Traditional thinking where the focus is on quality of service must be reversed. In wireless sensor networks quality of service must be diminished to conserve energy and preserve the life of the network. The thought process must focus on the functionality of the entire network rather than what is best for each individual node. Concern must be taken at every level of the protocol stack to conserve energy, allow nodes to reconfigure the network, and modify their set of tasks according to the resources available.