Improvement of crankshaft MAC protocol for wireless sensor networks: a simulation study

ABSTRACT


INTRODUCTION
A wireless sensor network (WSN) is a wireless network consisting of spatially distributed autonomous devices using sensors to monitor physical or environmental conditions. A typical WSN system incorporates a gateway that provides wireless connectivity back to the wired world and distributed nodes [1]. Since the radio is the WSN component that most consumes energy and is used more frequently when higher data rates are to be monitored, this entails more power consumption. In the case of dense WSN, a very large number of sensor nodes communicate with each other and sense their environment wirelessly. The task of changing the battery powering this large number of nodes can therefore become cumbersome.
When in operation, nodes in WSN consume energy when the radio is switched on due to several reasons, the most important are Idle listening, Overhearing, and Protocol overhead [2]. To this extent, many efforts have been directed towards reducing energy consumption which resulted in the development of a wide range of energy efficient MAC protocols [3]- [12].
Crankshaft is considered to be one of the best energy-efficient MAC protocols for dense wireless sensor networks [13], [14]. Minimum latency and maximum energy efficiency are achieved with the use of two multiple access protocols, namely TDMA and CSMA. This protocols combination divides the time into frames where each frame contains slots and a number of slots are assigned to the broadcast traffics and the 1945 remaining ones to the unicast traffics. Although Crankshaft was shown to minimize the idle listening, hence energy consumption, it suffers however form energy consumption due to the sampling of the broadcast slots, in addition to the limited flexibility of the protocol due to the use of TDMA. In dense WSNs, each node can have a large number of neighbours that exceeds the 5-10 neighbors that are assumed in general purpose MAC protocols [15]. Problems can therefore often occur when using these general purpose protocols in dense WSNs, the most important of these problems are Overhearing, Communication grouping, Over-provisioning, and Neighbour state [16], [17]. Crankshaft addresses these problems by letting the nodes turn off their radios alternately rather than simultaneously with the aim to reduce the overhearing and communication grouping. Also, scheduling the receiving slots rather than keeping neighbor's state reduces the provisioning.
In the original implementation of Crankshaft [15], two traffic patterns, flooding and converge cast, were considered when evaluating the protocol performance. It was concluded that other protocols provide better delivery ratio than Crankshaft protocol, but at the expense of higher energy consumption when compared to Crankshaft. It was also demonstrated that Crankshaft could provide low delivery ratio at high and medium message rates and that its latency increased quickly when the load exceeded 0.15 message/node/sec. Therefore significant improvement in the crankshaft protocol performance can be obtained by: a. Improving the delivery ratio in broadcast flood pattern. b. Improving latency in convergecast pattern.

OBJECTIVES OF THE STUDY
For the improvement of WSN lifetime, the implemented protocols should therefore overcome the afore mentioned limitations. This paper presents a simulation study of Crankshaft protocol with the aim to improve its performance in terms of energy efficiency, latency and slot collisions. The effect of several other parameters affecting data rate and throughput, channel reliability and network topology is investigated. Changes in the number of broadcast slots, total number of slots, slot duration, mobility speed, mobility update interval and playground size, under broadcast and convergecast patterns, in addition to the number of nodes under the broadcast patterns are considered and their effect on protocol performance investigated. Although the radio communication is the highest energy consumption function of the sensor nodes, each of the above parameters also affect energy efficiency. The performance of the improved Crankshaft proptocol is compared to that of the original protocol implementation.

METHODOLOGY
In this study crankshaft protocol was implemented using MiXiM2.0/ OMNeT++4.1. As in the original study, and to allow for the comparison, the network was simulated using 96 nodes in 90×50 meters layout with radio range of 25 meters and nodes powered at 3V. The broadcast flood pattern with 5 different numbers of flood per second, and the convergecast pattern with 8 different numbers of (messages/node/sec) were used in the simulated WSN. To ensure a valid comparison, the simulation was carried out using the same general settings of the original implementation.
As mentioned above, the protocol consumes little energy but with a very low delivery ratio. The network was therefore simulated after changing the values of the affecting parameters. The following list represents the tested parameters under broadcast and convergecast patterns: a. Number of broadcast slots, (data transfer rate || throughput) b. Total number of slots, (data transfer rate || throughput) c. Slot duration, (data transfer rate || throughput) d. Mobility speed, (network topology) e. Mobility update interval (network topology) f. Playground size (network topology) In addition, the number of nodes (network topology), under broadcast pattern was also tested.

SIMULATION RESULTS AND ANALYSIS
The effects of the identified paparameters under both broadcast and converecast traffic were investigated and analysed in the following.

Effect of Duration and Number of Slots
To examine the impact of the reserved time for each node to send or receive packets, the number of slots in each frame and the duration of each slot were changed in turn.

Changing the total number of slots, with same number of broadcast slots
In order to examine the impact of reserved time for each node to send or receive packets on the throughput , the protocol was tested by changing the total number of slots in each frame under both broadcast and convergecast traffic and the delivery ratio and energy consumption were examined. The simulations were designed to investigate this effect by decreasing the total number of slots by 3 (7 slots, 2 broadcast and 5 unicast) and increasing the total number of slots by 3 also (13 slots, 2 broadcast and 11 unicast). Figure 1 and Figure 2 clearly indicate a higher delivery ratio for decreasing number of slots and a lower energy consumption for increasing number of slots under broadcast traffic. It can also be noticed that there is a saturation point in the graph at flood 2, for which the delivery ratio remains constant. Similarly, Figure 3 and Figure 4 show that under convergecast pattern, Crankshaft exhibits a higher delivery ratio for decreasing number of slots and an energy consumption that increases with a decrease in total number of slots. The latency is displayed in Figure 5 which indicates little effect of total number of slots expect at the middle loads where the packet exchange is more active and the chances for collisions and packet loss is more, resulting in an increase in latency .

Changing number of broadcast slots
In flooding traffic, broadcast slots are more active than the unicast ones. The next set of simulation demonstrates the effect of changing the number of broadcast slots from 1 to 3 on delivery ratio and energy consumption, under both broadcast and convergecast patterns. Figure 6 and Figure 7 clearly indicate that Crankshaft delivery ratio decreases with the number of broadcast slots due to the reduction of the effective use of the slots during the cycle. Accordingly, energy consumption increased with increasing delivery ratio and decreases when delivery ration decreases. These results are unexpected and are due to the packet loss problem that usually occurs in the convergecast process for wireless sensor networks originating from the congestion and collisions near the sink node [18]. Energy consumption and latency increase or decrease with increasing or decreasing delivery ratio respectively.  Figure 11 and Figure 12 display the delivery ratio and energy consumption for increasing slot duration under broadcast traffic. For lower loads the delivery ratio is lower, while for higher loads, the delivery ratio and consequently the energy consumption increase because increasing slot duration allows more time to the sending and receiving slots to send or receive packets. Under convergecast pattern and smaller slot durations, Crankshaft exhibits a higher delivery ratio until the radio packets start colliding and the sink no longer receives all data [19], but a higher energy consumption and less latency are expected. When increasing the slot duration however, the delivery ratio becomes lower until the rate of packets increases in the network and slot duration is efficiently used, then delivery ratio increases. This is confirmed bu the plots in Figure 13, Figure 14 and Figure 15.

Effect of degree of connectivity among the nodes (changing the playground size)
To test the effect of the connectivity of nodes on the delivery ratio of the network, the playground size, as one of the parameters which can affect the degree of connectivity, was changed in the simulation. Figure 16 and Figure 17 show that under broadcast pattern, by decreasing or increasing the playground size, that contains the nodes, the delivery ratio becomes less in the lower loads because each node will have less number of neighbors, hence the collisions will be less, so there is only a slight change in the protocol performance with no change in the energy consumption. A similar result is obtained when decreasing the playground size; the delivery ratio slightly increases without change in the energy consumption because each node will have more nieghbours, hence there will be more packet collisions so a slight change in the delivery ratio can be noticed. For the same reasons as in the broadcast pattern , modifying playground size in convergecast pattern has a slight effect on the protocol performance. In both cases performance improvement is negatively affected with little increase in delivery ratio ,which leads to worse latency and energy consumption. Figure 18, Figure 19, and Figure 20 show this behviour.

Effect of degree of connectivity among the nodes (changing the number of nodes)
Raising the number of nodes in broadcast flooding leads to increasing the number of neighbors close to each other, hence the packet loss will go down and consequently the delivery ratio goes up, also decreasing number of nodes decreases the chances for collisions and hence increases the delivery ratio as illustrated in Figure 21. While the energy consumption in both cases does not increase as shown in Figure 22, this means better performance for the protocol.

Effect of degree of mobility (changing mobility speed)
The mobility speed parameter is one of the network topology factors. Under broadcast traffic, increasing or decreasing the mobility speed of the nodes will affect the nodes connectivity either by increasing or decreasing the distance between the nodes, thus increasing or decreasing the chances of packet collisions, and hence an increase or a decrease in the delivery ratio or energy consumption. The results of simulation shown in Figure 23 and Figure 24, indicate a slight improvement in the protocol performance when mobility speed of the nodes is varied, while the energy consumption remains relatively unchanged, which leads to a better performance for the protocol. Under convergecast traffic, the mobility speed parameter has the same effect as the playground size. Because the mobility speed of the node will affect the number of neighbors; decreasing mobility speed will have negative effect on delivery ratio, whereas increasing mobility speed will increase the probability of collisions that have also negative effect on the delivery ratio. Hence little effect is seen on latency and energy consumption when the mobility speed is decreased or increased. This is illustrated in Figure 25, Figure 26 and Figure 27.

Effect of degree of mobility (changing mobility update interval)
Under broadcast traffic and in high loads, the routers need to be updated very often to improve the performance [20], so Crankshaft shows higher delivery ratio in the higher loads by shortening the mobility update interval. While in low loads the delivery ratio decreases, because the protocol overhead will increase by increasing number of updating times with small number of packets in the network, as illustrated in Figure 28. On the other hand increasing mobility interval time raises the delivery ratio, because the protocol overhead will be decreased. The energy consumption will not change in both cases as indicated in Figure 29. Varying mobility update interval in convergecast pattern has an effect similar to that of broadcast flooding pattern on the protocol performance. Changing mobility update interval decreases the delivery ratio in the low loads. In contrast, in high loads varying mobility update interval increased the delivery ratio, because in higher loads the routers need to be updated very often to improve the performance. From Figure 30, Figure 31 and Figure 32, it is observed that there is no change in energy consumption and no significant change in the protocol latency.

Effect of degree of mobility (simulation with mobile sink)
In wireless ad hoc networks, the main interactions between nodes are the interactions between the sink node and other nodes in the network. In usual WSN scenarios, the sink node is placed in the corner of the network. Therefore using mobile sink node instead of fixed one, means changing the mobility of the sink node and will have the same impact as changing the mobility of other sensor nodes. In this study, the stable sink is replaced with a mobile sink. A mobile sink has an effect on the connectivity between the sink and the other nodes, and hence replacing the stable sink with mobile one can affect the delivery ratio. Figure 33 to Figure 37 show that by replacing the stable sink with a mobile one in both broadcast and convergecast patterns, there is indeed a noticeable improvement in the delivery ration with no significant impact on energy consumption and latency.

Sending data packets without preambles
In the design of Crankshaft protocol, the step of sending the preamble packet before the data packet was removed to improve the delivery ratio of the protocol. The result was a slight increase in the delivery ratio with slight decrease in energy consumption as shown in Figure 38 and Figure 39.

CONCLUSION
This study showed, through simulation, that substantial improvements can obtained with the Crankshaft protocol by judiciously varying the relevant parpameters. The original protocol with the default setting used by Crankshaft authors in their simulation using MiXiM framework with OMNET++ simulator was designed and implemented. The protocol focuses on dense deployments where many nodes are deployed in a small area; the network 96 nodes including the sink node on a field of approximately 90x50 meters.
The main two factors that control the protocols performance of WSN and studied in this work are energy consumption and link quality that control the network throughput and dynamics of network topology. Therefore the effect of the related parameters was investigated through analysis of the simulation results. Throughout this study, we can conclude the following: 1. Varying the throughput parameters is a practical and efficient way to improve the protocol performance: a. Cutting down the total number of slots in each frame increases the delivery ratio of the protocol in both flooding and convergecast patterns with insignificant increase energy consumption and latency. b. Raising the number of broadcast slots without changing the total number of slots raises the delivery ratio in the two patterns with insignificant increase in energy consumption and latency. c. Lengthening the time of the slot duration increases the delivery ratio in flooding and convergecast patterns and decreases the energy consumption in the convergecast pattern, while it has have insignificant effect in flooding pattern. 2. Studying the effect of dynamics of network topology parameters has shown improvements on the protocol performance in two cases: a. Varying the playground size, mobility speed, mobility update interval and number of nodes in the network in both broadcast flooding and convergecast has an oscillating effect on the delivery ratio and accordingly on the energy consumption and latency. b. By replacing the constant sink node with mobile one, the protocol performance becomes better. 3. Implementing the protocol without preambles for broadcast flood pattern improves the protocol performance.
Results of the comparison of the improved Crankshaft prototcol with its original version have clearly demonstrated that Crankshaft' performance can effectively be improved through adjustmenrt of relevant protocol parameters.