Energy- and Cognitive-Radio-Aware Routing in Cognitive Radio Sensor Networks

Cognitive radio sensor networks (CRSNs) are the next generation wireless sensor networks (WSNs) that mitigate overcrowded unlicensed spectrum bands by opportunistically using temporally unoccupied unlicensed and licensed spectrum bands. In this paper, we propose a new energy- and cognitive-radio-aware routing (ECR) protocol that addresses the unique challenges in CRSNs, including dynamic spectrum access, single transceiver, and energy constraint. In particular, our proposed routing protocol performs joint node-channel assignment by taking energy into consideration, is aware of cognitive radio at the network layer, and can seize spectrum opportunity in other spectrum bands. We present a simple analytical model of the proposed ECR in the viewpoint of network-wide energy and compare it with that of the ad hoc on-demand distance vector (AODV) routing protocol. Furthermore, our simulation results show that, in relatively heavy traffic environment, ECR outperforms AODV in terms of network lifetime and packet delivery ratio. Nevertheless, scalability and communication complexity become the major issues of this protocol.


Introduction
Wireless sensor networks (WSNs) are a special case of ad hoc networks and have been widely used for monitoring physical phenomena, such as human activities and environment monitoring.Since it is intended to be easily embedded in the physical environment, WSNs are designed with minimum computational facilities and limited power resources.
In the future, however, ISM (Industrial, Scientific, and Medical) bands are projected to be congested and overloaded due to numerous wireless networks utilizing the same bands [1].The explosive implementation of wireless technologies such as 802.11b/g/n (WiFi), 802.15.1 (Bluetooth), and 802.15.4 (WSN) will largely occupy ISM bands and cause unavoidable interference not to mention electrical appliances such as cordless phones, microwaves, and so forth.
Meanwhile, cognitive radio ad hoc network (CRAHN) technology offers a good solution to increase spectrum utilization by making use of temporally unused spectrums in an opportunistic manner.By combining cognitive radio (CR) capability to WSNs, the spatially overlapping wireless networks may coexist in ISM bands with minimum interference, and spectrum utilization can be increased.Hence, cognitive radio sensor networks (CRSNs) [2,3] have become the subject of many studies in the research community.
Opportunistic usage of the lower frequency of the licensed bands offers a number of benefits to CRSNs.The main advantage is that lower frequency has better propagation characteristics than the unlicensed 2.4 GHz frequency, such as longer transmission range and better penetration to obstacles.In [4], simulation result shows that, using the same transmission power, the transmission range of 680 MHz UHF TV band frequency doubles that of 2.4 GHz.In other words, CRSNs can reduce the number of hops required to route packets; thus, saves more energy and prolong the network lifetime.
From the view point of network layer, CRSNs have two fundamental issues: joint node-channel assignment for enabling dynamic spectrum access (DSA) and energy consumption in hardware constrained networks.Nevertheless, the existing spectrum-aware techniques of CRAHNs and energy efficient techniques of WSNs cannot be directly applied to CRSNs.
There are studies aimed at addressing routing issues in CRAHNs as surveyed in [5].Each of those studies enables DSA, but does not take energy into account.In [6], the so-called energy efficient QoS routing (EQR) algorithm for CRAHNs was proposed.Targeting energy constrained networks consisting of portable devices, it considers both energy and QoS aspects into the routing algorithm.However, it does not consider channel heterogeneity and channel switching energy consumption, which are important in DSA-enabled networks.On the other hand, there have been many studies on WSNs to achieve energy efficiency.Specifically, ad hoc on-demand distance vector (AODV) protocol is one of the most popular routing algorithms in mobile ad hoc networks, which has also been used in WSNs, such as in ZigBee system [7].Furthermore, it has been adopted by many other routing algorithms.However, it does not satisfy the requirements of CRSNs because the implementation of AODV is limited to a single frequency environment only, and thus does not support the multi-frequency routing capability [3].Additionally, a routing protocol for CRSNs has been proposed recently [8], which is aimed at improving the throughput and end-to-end delay performance.However, the energy aspect is not considered at all in the work.
For those reasons, there is a need for research on achieving an applicable routing protocols for CRSNs that combines the joint node-channel assignment of CRAHNs and the energy efficient techniques of WSNs.In this paper, we propose a novel routing algorithm called energy-and cognitive radio-aware routing (ECR), which takes advantage of both CRAHNs and WSNs to satisfy the routing requirements of CRSNs.The contributions of this paper are twofold.First, we introduce a novel routing protocol that meets the unique requirements of CRSNs.Second, we consider the energy and cognitive radio awareness at the network layer in CRSNs.Our extensive simulation results show that, in a cognitive radioenabled networks with relatively heavy traffic, energy and cognitive radio awareness in our proposed ECR prolongs the network lifetime and improves packet delivery ratio.
The rest of this paper is organized as follows.In Section 2, we explain the system model and the underlying assumptions used in developing the proposed routing protocol.The detailed operations of the routing protocol are discussed in Section 3. In Section 4, we present the analytical model of the proposed protocol in comparison to AODV protocol.In Section 5, we evaluate the performance of the proposed protocol and validate the analytical model.Finally, we conclude this paper in Section 6.

System Model
2.1.Network Topology.We consider a typical sensor network, which comprises reduced function devices (RFDs) and fullfunction devices (FFDs), as per device classification in the IEEE 802.15.4 standard.RFDs are sensor nodes that are intended to perform extremely simple tasks and do not have routing capability.On the other hand, FFDs are high capability nodes which can operate as either personal area network (PAN) coordinator nodes, coordinator nodes, or sensor nodes.They can perform complex tasks such as routing and data aggregation.When there is data to be sent over network, the coordinator nodes collect the data from their sensor PAN Coordinator node (FFD) Coordinator node (FFD) Sensor node (RFD) nodes and send the aggregated data to the PAN coordinator in multi-hop manner according to the routing protocol.From hardware's point of view, each nodes is equipped with single half-duplex transceiver.Also, each node is batterypowered, except the PAN coordinator node which is the only main-powered device in the network.
Figure 1 shows the network topology used in this paper.Since our focus is on the routing protocol, we assume that the network consists of a single PAN coordinator node and multiple coordinator nodes, where the sensor nodes communicate with their coordinator node, and the coordinator nodes send the aggregated data to the PAN coordinator node (which is the sink node of the network).Thus the network topology used in our work is a peer-to-peer network where any device can connect to other devices in an ad hoc manner as long as the transmission range permits.Also, the network behaves as a converge-cast network, where a number of coordinator nodes transmit their packets of sensed attributes toward the sink node or base station in a unicast mode.Although we do not assume clustering, however, the coordinator nodes can be regarded as the cluster heads if sensor nodes are clustered and the sensed data are aggregated within a cluster.

Operating Frequency.
Since conventional WSN has no capability to utilize unused spectrum in other channels, it operates statically on a particular channel of unlicensed spectrum band.On the other hand, the CRSN can operate dynamically on multiple channels of 2.4 GHz unlicensed ISM bands and 680 MHz UHF licensed TV bands.As CRSN is designed to coexist with the legacy networks, the user priority concept is applied, where primary users (PUs) has higher priority than the secondary users (SUs) to utilize the channel.In this paper, we define PUs as the devices of both conventional WSN in unlicensed spectrum band and any networks in licensed band, and SUs as the CR-enabled devices of CRSN.That being said, CRSN is expected to improve the system throughput while maintaining coexistence with the conventional networks.
In this paper, we take channel heterogeneity issue into account by considering 16 channels in unlicensed spectrum band and 1 channel in licensed spectrum band, each of which has 2 MHz bandwidth and supports data rate up to 250 kbps.In addition, we dedicate 1 channel out of 16 channels in unlicensed spectrum band as the common control channel of CRSN.

The Proposed Routing Protocol
In the following section, we explain the proposed energyand cognitive-radio-aware routing (ECR) protocol.In principle, it enhances the ad hoc on-demand distance vector (AODV) protocol [9] by adding energy-and cognitive-radioaware features.Namely, ECR collects the residual energy and channel availability information of intermediate nodes and passes them on using the piggybacking mechanism adopted from the dynamic source routing (DSR) protocol [10].Also, every intermediate nodes along the route maintains its own routing table as in the AODV protocol.
In general, the route discovery process of the proposed routing protocol is divided into four steps: route request, route selection, route reply, and route maintenance.The following subsections explain each of these steps.

Route Request.
As in the standard AODV protocol, route request (RREQ) packet is used to find any possible routes from source to destination node.Namely, the source node appends node information, and broadcasts RREQ packets to the neighboring nodes.
Before rebroadcasting a RREQ packet to its neighboring nodes, the intermediate node should examine two requirements.Firstly, it checks its own residual energy status.If the remaining energy is below a certain threshold level, then the intermediate node should drop the RREQ packet.Secondly, the intermediate node checks whether or not it has any common channels with the previous node.If there is no common channel between them, then the intermediate node should also drop the RREQ packet.Note that dropping RREQ packet is the same as withdrawing from the route discovery process.The former is intended to save excessive energy consumption of the node and to ensure that the load of network will be distributed more evenly over the network, while the latter is to ensure that at least one feasible route can be established between source node and destination node.Intermediate nodes which is able to participate in the route discovery process piggyback their node information to the RREQ packet.Afterwards, they rebroadcast the RREQ packet to its neighboring nodes and setup reverse path in their routing table as in the AODV protocol.
This procedure is done in every intermediate node until the RREQ packet reaches the destination node.In other words, the length of RREQ packet would increase as the number of hops increases.The node information appended to a RREQ packet on each hop is explained as follows.(i) Node ID, which is used as a node identifier in the network.
(ii) Channel availability information, which consists of licensed channel (L) and unlicensed channels (UL).Each channel is represented by one bit information, whose availability and unavailability are encoded by bit "1" and "0", respectively.
(iii) Node energy, which represents the ratio of residual energy and full energy of the node.
The format of new RREQ packet is shown in Figure 2.

Route Selection.
Upon receiving the first RREQ packet, the destination node (i.e., the sink node) starts the timer and waits for another RREQ packets in order to collect more route candidates.After the timer has timed out or the minimum number of alternative routes has been collected, the destination node will populate as many joint node-channel combinations as possible from the information in each RREQ packet.Then, the destination node selects the best route by considering the following factors.
(i) Residual energy ratio.From the node information in RREQ packet, the destination node is able to determine the residual energy ratio of a route by summing up all nodes' residual energy and dividing it by the number of intermediate nodes along the route.That with the largest energy ratio is preferable.
(ii) Common channel.Channel switching between operating channels is one source of energy consumed by the node.Therefore, frequent channel switching may cause inefficient energy consumption, and thus should be avoided.When selecting the best route, the route with more common channels between the intermediate nodes is more preferable than that with less common channels to avoid unnecessary channel switching as much as possible.
(iii) Number of hops.From intermediate node's point of view, being involved in one route is an unavoidable overhead that consumes the node's energy.Thus,  the route with fewer numbers of intermediate nodes will consume less energy than that with more intermediate nodes, which in turn prolongs the network lifetime.
(iv) Availability of licensed channel.Utilizing licensed channel can save network energy by significantly reducing the number of hops in a route.This is because, given the same transmission power, a node operating in a licensed channel can reach farther nodes and bypass several nodes that would be required if an unlicensed channel was used.However, care should be taken to ensure the distance is long enough to compensate for the energy consumption caused by channel switching and spectrum sensing.
The above criteria are formulized in the following route cost function, which is mathematically stated as: where C i is the cost function of possible route i, and M 1 , M 2 , and M 3 are the number of channel switching, number of hops, and residual energy of route i, respectively.k 1 , k 2 , and k 3 are the weights of the corresponding factors.In this paper, each factor is treated with the same importance by setting the corresponding weights into one.Note also that a negative sign is given to M 3 , which means that the higher the residual energy ratio of a route, the less the route cost will be.

Route Reply.
After selecting the best route based on the cost function value, the destination node will assign the operating channel to each node involved in the corresponding route.Namely, the destination node unicasts the route reply (RREP) packet toward the source node, which contains joint node-channel assignment of every nodes involved in the route, including the source and destination node.The format of new RREP packet is shown in Figure 3.Note that the joint node-channel assignment information is appended to the AODV's RREP packet, where the channel number between two node IDs indicates the assigned communicating channel used by the node pair to transfer the MAC frame.Upon receiving an RREP message, the intermediate node will read the corresponding channel assignment and store it in its routing table.Afterwards, the RREP packet is forwarded to the next intermediate node until it reaches the source node.

Route Maintenance.
The local repair mechanism of AODV protocol is used as the route maintenance strategy.Namely, whenever a link breakage occurs due to intermediate node's failure or PU arrival, the intermediate node will first determine its position with respect to the source node and destination node.If it is closer to the destination node, then the intermediate node will broadcast local RREQ packets to search for local alternative path in order to bypass the failure node within a small number of hops.In the meantime, incoming data packets are buffered in the intermediate node during the local repair process.If the alternative path is found, then the original route can be used again.Otherwise, the intermediate node will broadcast the regular route error (RERR) packet to inform the source and destination node that the current route is broken and the source node should start a new route discovery process all over again.

Energy Consumption Model
In this section, we present a simple analytical model of AODV protocol and our proposed ECR protocol to calculate network-wide energy consumption metric.In general, our analysis is divided into two parts: route discovery and data transmission.Namely, we calculate the total energy consumed at the network for exchanging control packets to find the route, and for transmitting data packets once the route has been established, respectively.Since the names of the variables in the formulas may not be unique, we are going to explicitly mention which protocol they refer to while explaining the formulas.

AODV Protocol
4.1.1.Route Discovery.Suppose that there are N number of nodes arranged in a square grid, where the source node wants to send data to the destination node.Then, the energy consumption to send the RREQ packet from source node to destination node E RREQ is the total of energy consumption to broadcast RREQ packet over the network and that to receive the broadcasted packet, which can be stated mathematically as follows: where B RREQ , N nb , E tx , and E rx denote number of bits in RREQ packet, average number of one hope neighbor nodes, energy consumption to transmit 1 bit, and energy consumption to receive 1 bit, respectively.Particularly for grid topology, where each node cannot reach its diagonal node, the value of N nb equals to 4 × (N − √ N).Let H be the average number of hops in a route.Then, the energy consumption to send the RREP packet from destination node to source node E RREP is the total of energy consumption to unicast RREP packet and that to receive the unicasted packet, which is stated as follows: where B RREP denotes number of bits in RREP packet.
International Journal of Distributed Sensor Networks 5 We also consider the energy consumption to retransmit the control packets during the route discovery process E retx-rdis as follows: where P col denotes probability of collision while using the current channel.Thus, the energy consumption in route discovery process E rdis is the sum of energy consumption to broadcast RREQ packet, that to unicast RREP packet, and that to retransmit the packets in case of collision as shown below: (5)

Data Transmission.
Let one session of data transmission be defined as the flow of data from the source node to the destination node starting from the beginning of data transmission until it is over.Then, the energy consumption to send data in a session E data is derived as follows: where R p and B data denote the number of data packets in a session and the number of bits in a data packet, respectively.Here we also consider the energy consumed by the neighboring node to overhear the transmitted packet.Since data packets are transmitted in the same channel as the route discovery process, there is a chance that collision may happen in the data packets.Thus, using the same value of P col as in (4), the energy consumption to retransmit the data packet E retx-data is given as follows: Note that the value of P col in (4) is the same as that in (7) since both processes are done in the same channel.Thus, the energy consumption to send data in a session E rdata is the sum of energy to send data packets and energy to retransmit the data packets in case of collision as follows:

Total Energy Consumption.
Taking the worst case scenario when there is N − 1 sessions initiated in the network, the total network-wide energy consumption of AODV protocol E total is found by adding ( 5) and ( 8) together and multiplying it by the the number of sessions as follows: The total number of bits of the growing RREQ packet B t-RREQ is calculated by treating the first broadcasted RREQ packet as it is in AODV protocol and approaching the size of the growing piggybacking information as an arithmetic series starting from 1 to (N − 1) as follows: where B RREQ and B pg-q denote the number of bits in the original RREQ packet of AODV and the number of bits in the piggybacking information appended to the RREQ packet of ECR, respectively.Thus, for the same square grid topology, the energy consumption to send the RREQ packet from source node to destination node E RREQ is the sum of energy consumption to broadcast the growing RREQ packet over the network and that to receive the broadcasted RREQ packet: Assuming that each node which is involved in route discovery process has to sense the spectrum band once to get the current status of all channels before appending node information, the energy consumption for spectrum sensing E sense is expressed as follows: where E sp denotes the energy consumption to sense one channel.
Let H be the average number of hops in a route as that in (3).Let B pg-p (H) be the number of bits in the piggybacking information appended to the RREP packet in ECR, which is proportional to the value of H.Then, the total number of bits in RREP packet B t-RREP is calculated by: where B RREP denotes the number of bits the original RREP packet in AODV.Then, the energy consumption to send the RREP packet from destination node to source node E RREP is the sum of both the energy to unicast the RREP packet and the energy to receive the unicasted RREP packet along the H number of hops in a route: Therefore, the total energy consumption in route discovery process in ECR, E rdis is the sum of energy to broadcast the RREQ packet, energy to unicast the RREP packet, energy to retransmit the packets due to collision, and the energy to sense the spectrum: Note that the formulation of E retx-rdis in (15) is the same as that in the AODV protocol as in (4).

Data Transmission.
Since control packets and data packets in the ECR protocol may be sent in different channels, we define the energy consumption to send the data packets over the network in terms of probabilities.
Let P ulc and P lc be the probability that unlincensed channel and licensed channel are available, respectively.Then, having 15 unlicensed channels and 1 licensed channel for data transmission, the probability of using other channel than the common control channel for data transmission P oc is given by Suppose that the destination node decides to use other channels than the common control channel for data transmission, the ECR protocol prefers using the licensed channel to the unlicensed channels if possible.Then, this preference is mathematically expressed as follows: where P(ulc | oc) and P(lc | oc) denote the probability of using unlicensed channels and that of using licensed channel, respectively, given the condition that the data transmission uses channels other than common control channel.When data transmission is not using common control channel, there is energy consumption for switching from common control channel to the destined channel, and vise versa.Let H ulc and H lc be the average number of hops while using unlicensed channels and licensed channel, respectively.Then, as the transmission range of the licensed channel is roughly as twice as that of the unlicensed channel, the value of H lc approaches half of H ulc , given the same transmitting power.For simplicity, we assume that the destination node assigns either the unlicensed channels or a licensed channel to all nodes in a route.Then, the energy consumption of all nodes in a route to adjust the operating channel in a session E switch is given as follows: where E sw denotes the energy consumption to switch the operating channel.
Thus, the energy consumption to send data packets on other channels than common control channel E data-oc and energy consumption to send data packets on common control channel E data-cc are calculated as follows: Note that the parameter R p is the number of data packets in a session as it is in (6), and H ulc is the same as H in the AODV protocol as in (3).
For simplicity, we assume that data transmission in common control channel is subject to collision.On the other hand, there is no collision happened if data transmission is done on other channels than the common control channel, because the channels have been sensed by the nodes and we do not consider the channel obsolesence issue in this paper.Thus, the energy consumption to retransmit the data packet E retx-data-cc as follows: where P col denotes the probability of collision in common control channel as in ( 4) and (7).Thus, the energy consumption to send data in a session E rdata is the sum of energy consumption to send all the data packet and that to retransmit the data packets in case of collision as follows:

Total Energy Consumption.
Taking the worst case scenario when there is N − 1 sessions initiated in the network, the total network-wide energy consumption of the ECR protocol E total is found by adding E rdis and E rdata together and multiplying it by the number of sessions which is similar to the one shown in (9).

Performance Evaluation
In this section, we compare the performance of the proposed ECR protocol with that of AODV protocol in terms of energy consumption metric.The simulation was done on both Matlab and ns-2 network simulator version 2.31 with cognitive radio cognitive network (CRCN) patch [11].The former is intended to analyze the trends of some performance metrics using our analytical model of energy consumption, while the latter is to evaluate the performance of our proposed ECR protocol in a more accurate way.The simulation parameters and their default values are presented in Tables 1 and 2. We consider a CRSN network which consists of 25 nodes which are arranged in a 1, 000 × 1, 000 m 2 grid topology.It is assumed that the network utilizes an unlicensed channel which is shared with other legacy networks.This condition causes network interference, which is represented by the parameter P col (i.e., PU channel occupancy).On the other hand, there are another 15 unlicensed channels and 1 licensed channel available spatially, which can be exploited opportunistically by CRSN.We compare the performance of the CRSN network when it uses ECR protocol and AODV protocol.Note that since AODV protocol cannot utilize the cognitive radio feature of the CRSN nodes, CRSN with AODV protocol behaves as a conventional WSN with AODV protocol.In this simulation, we used the IEEE 802.11 standard as the MAC layer protocol.

Network Overhead and Scalability.
We are interested in observing the effect of data size and the number of nodes to the network-wide energy consumption by means of the analytical model of energy consumption.Figure 4 shows the network-wide energy consumption of each protocol as we vary the data size in a session.Generally, the network-wide energy consumption of both AODV and ECR increases as the data size increases.However, while energy consumption of AODV and ECR protocol is considered at the same level for small data size, ECR consumes less energy than AODV for big data size.Namely, the energy consumption of ECR is 40% less than that of AODV at data size of 250 kbits/session.In other words, the ECR protocol is more energy efficient than the AODV protocol when transmitting bigger data size given the same traffic environment and the same number of nodes in a network.
Figure 5 shows the network-wide energy consumption of each protocol as we vary the number of nodes in a network.It is obvious that the ECR protocol has scalability issue as a consequence of using piggybacking mechanism in the route discovery process, where the energy consumption soars exponentially as the number of nodes increases.In contrast, the energy consumption of the AODV protocol increases moderately, which highlights the scalability feature.Therefore, the ECR protocol is well-suited for application in a small-to medium-size network.

Network Lifetime.
Network lifetime is an important performance metric in sensor networks.We are interested in observing the network lifetime as we vary the PU channel occupancy level in the default operating channel by means of ns-2 simulation.We assume that around 70% of other unlicensed and licensed channels are statically available.
First we set the energy of each node in CRSN (except the sink node) to 5 Joule, and we measure the lifetime of the network by counting the number of alive nodes remaining over the simulation time.We observe the network lifetime under various numbers of data transmission sessions (10,20, and 30 sessions) on the network while maintaining the packet rate and PU channel occupancy level at the default values.From all three cases shown by Figure 6, we can see that, in  general, the ECR protocol outperforms the AODV protocol.As the number of sessions increases, the network lifetime becomes shorter.It is worth noting that in the early stage of simulation, the AODV protocol suffers from high energy consumption that leads to the death of a large number of nodes before the first 200 seconds of simulation time.On the other hand, using ECR protocol, the network has slower rate of death nodes since the beginning of simulation, because the nodes consider their residual energy before deciding to participate in the route discovery process.When the nodes realize that their energy is below a certain threshold, they will drop the RREQ message and will not participate in the particular data flow.This mechanism balances the traffic load across the network and achieves better network lifetime.

Packet Delivery Ratio.
We plotted the number of cumulative packets received by the sink node and the packet delivery ratio (PDR) in Figures 7 and 8, respectively.The packet delivery ratio is the ratio between the number of received packets to the number of sent packets in the network.The higher value of PDR means the network has a better packet delivery efficiency.Although at the beginning of the simulation the AODV protocol achieves a much better packet delivery ratio (i.e., almost 80%), the value then drops drastically below 10%.On the other hand, the ECR protocol still achieves roughly twice as much PDR value than that of the AODV protocol during simulation time.

System Throughput.
We try to figure out the system throughput of ECR protocol.We vary the PU channel occupancy level from 0 to 90%.As shown in Figure 9, in general, the ECR protocol has better system throughput than the standard AODV protocol.The ECR protocol uses channels other than the default channel to send the data over, while the standard AODV protocol uses the same channel to send both control and data packets.Therefore, the AODV protocol suffers from higher collision rate between data packets.On the other hand, the ECR protocol is able to mitigate the traffic congestion by means of the usage of channels other than the default channel, therefore, with less collision rate, it achieves a better system throughput.
As the PU channel occupancy level increases, both protocols suffer from performance degradation in terms of system throughput.Nevertheless, from 80% traffic load level and above, in our simulation AODV was not able to deliver any packets across the channel due to the collision of both control and data packets in the default operating channel.On the other hand, ECR was still able to deliver data packets by opportunistically exchanging them in the other channels.Therefore, the system throughput of the ECR protocol outperforms that of the standard AODV protocol by at least 25% in every level of PU channel occupancy.

Time and Communication Complexity.
Complexity of an algorithm is informally defined as how much resource it needs to accomplish its goals.In this subsection, we compare the time and communication complexity of AODV and ECR to perform route discovery and postfailure procedure.
Let n be the diameter of the network in terms of the number of hops.Time complexity for route discovery is the time needed for a routing protocol to establish a route from source to destination, and that for postfailure is the time needed for a routing protocol to reestablish the route if the route fails.In the AODV protocol, using the worst case complexity approach, the time complexity for route discovery is O(n) and that for postfailure is O(n) as well [12].In the ECR protocol, as it uses the same basic procedures as AODV, the time complexity for route discovery is O(n), and so is that for postfailure.Thus, there is no difference between AODV and ECR in terms of time complexity.
Communication complexity for route discovery is the communication overhead needed to establish a route from source to destination, and that for postfailure is the communication overhead to reestablish the route if the route fails.In the AODV protocol, the RREQ packet is straightforward and its packet size is fixed.Thus, the communication complexity of AODV for route discovery is O(n).The same situation occurs in postfailure, where a RRER packet will be sent to the source node whenever a node or a link fails in a particular route, and the source node will again broadcast a RREQ message in order to establish a new route.Because the size of the control packets are fixed, the communication complexity of AODV for postfailure is also O(n) [12].However, a different case occurs for the ECR protocol.Namely, the RREQ packet size grows due to the piggybacking mechanism adopted from the DSR protocol as it travels from source to destination.This makes the communication complexity of ECR reaches O(n 2 ) for both route discovery and postfailure, which are higher than those of AODV.This is what the ECR protocol experiences in order to be able to cope with cognitive radio environment while maintaining the energy efficiency.

Conclusion
In this paper, we have proposed an energy-and cognitiveradio-aware routing protocol called ECR to address the unique challenges of CRSN, namely dynamic spectrum access, single transceiver, and energy constraint.To the best of our knowledge, there is currently no specific DSA-enabled routing protocol designed for low-rate wireless sensor networks (WSNs).In addition, in designing the proposed routing protocol for CRSNs, we take the energy and International Journal of Distributed Sensor Networks cognitive radio awareness into consideration at the network layer.
We compare the performance of our proposed ECR protocol with the industry standard AODV protocol.Our analytical model of energy consumption shows that the ECR protocol has better energy efficiency while transmitting larger data.Also, the ns-2 simulation results show that the ECR protocol achieves better performance in terms of network lifetime, packet delivery ratio, and system throughput in relatively high traffic network environment.Nevertheless, the ECR protocol has drawbacks in that it is not designed for scalability and it has high communication complexity.
The ECR features can also be implemented as an extension to the AODV protocol, which can be enabled or disabled network-wide according to the network traffic level.In this case, the design of cognitive engine would be of great importance to sense the network traffic changes and decide when to enable the ECR features.Hence, the focus of our future works will be on the integration of ECR features to the AODV protocol and the development of cognitive engine to sense the network traffic changes.Another future work is that the route cost can be developed more to adjust to the network condition.As for example, the weight of the metrics can be adjusted for the purpose of traffic engineering.

Figure 4 :Figure 5 :
Figure 4: Network-wide energy consumption in various data size.

Figure 6 :
Figure 6: The number of alive nodes for the different number of sessions.

4 Figure 7 :Figure 8 :
Figure 7: The total number of packets received by the sink node.

Table 1 :
Default parameters for Matlab simulation.