Abstract
The growth of Device-to-Device (D2D) communications and the extensive use of Wireless Sensor Networks (WSNs) bring new problems such as spectral coexistence and spectrum saturation. Cognitive Radio (CR) appears as a paradigm to solve these problems. The introduction of CR into WSNs as a solution to the spectrum utilization problem could be used not only to increase the reliability of communications, but also to optimize energy consumption. The contribution of this paper is a cognitive lightweight strategy based on game theory and collaboration proposed to save energy consumption in Cognitive Wireless Sensor Networks (CWSNs). The proposed strategy takes advantage of the two main capabilities of CWSNs, the ability to adapt communication parameters, specifically channel allocation, and collaboration among devices. The decision making is modeled through a light noncooperative game designed for low resources networks. Despite the fact that the game used is a noncooperative game, the decision process takes advantage of the collaboration among CWSN nodes in a distributed way. Simulations over Castalia Simulator have been carried out in order to validate the strategy in different scenarios with different interference schemes showing increases in energy savings around 50% depending on the scenario.
1. Introduction
The increased use of smart Device-to-Device (D2D) communications and the introduction of the Internet of Things (IoT) give Wireless Sensor Networks (WSNs) a great influence on the new communication paradigm. Assuring the reliability and energy survivability of the wireless networks is a main cornerstone for the introduction and the extensive use of WSNs into our daily lives. Energy consumption in WSNs is a known historical problem that has been addressed from different areas and on many levels [1]. But this problem should not only be approached from the point of view of their own efficiency for survival. A major portion of communication traffic has migrated to mobile networks and systems. Thus, optimizing the energy consumption of wireless networks could reduce their environmental impact considerably.
In recent years, another problem has been added to the equation: spectrum saturation. Wireless Sensor Networks usually operate in unlicensed spectrum bands such as Industrial, Scientific, and Medical (ISM) bands shared with other networks (mainly Wi-Fi (IEEE 802.11) and Bluetooth (IEEE 802.15.1)). One of the main causes of the spectrum saturation that affects WSNs is the spectacular growth related to mobile-connected laptops, tablets, and smartphones that use, among others, also these bands for routing their traffic. By 2019, aggregate smartphone traffic will be 10.5 times greater than it is today according to CISCO report [2]. Also, WSNs nodes coupled with the appearance of IoT paradigm are expected to grow from 2 billion in 2014 to 8 billion in 2020 connected devices. With this scenario, the unlicensed spectrum bands are becoming overcrowded. As a result, coexistence issues in unlicensed bands have been subject of extensive research [3]. In particular, it has been shown that IEEE 802.11 networks can significantly degrade the performance of IEEE 802.15.4 networks when operating in overlapping frequency bands [4].
To address this challenge, Cognitive Radio (CR) [5] has emerged as the key technology enabling opportunistic access to the spectrum. This new paradigm has appeared in order to solve the general spectrum saturation problem, and it is not specifically related to ISM bands. The concept of a cognitive network (CN) was proposed as a wireless network in which each node can adapt its transmission and reception parameters according to its operating radio environment via spectrum sensing [6]. Cognitive networks are based on three main technical components: (a) the cognitive capabilities of devices, (b) collaboration among terminals, and (c) learning about the history.
Therefore, the introduction of cognitive capabilities into D2D communications and specially for WSNs in order to optimize their spectral occupation seems to be a good option. Cognitive Wireless Sensor Networks (CWSNs) could not only increase the reliability of communications, but also have a positive impact on parameters such as Quality of Service (QoS), network security, or energy consumption [7] in D2D communication networks. This way, the introduction of CR capabilities in WSNs provides a new paradigm for energy consumption reduction. It offers new opportunities to improve it but also creates some challenges to face. Specifically, the sensing of the radio spectrum, collaboration among devices, which requires extra communication, and changes in the transmission parameters all increase the total energy consumption of the network. In this way, all steps must be taken into account for the optimization design.
Since the field of energy conservation in WSNs is widely explored as one of their intrinsic problems, the new strategies should emerge from the new opportunities presented by cognitive networks. Thus, information sharing, the history and network operation, and the ability to change the transmission parameters should serve as tools to design cognitive strategies to reduce energy consumption in CWSNs. Taking advantage of the new cognitive capabilities of a CWSN (such as channel selection) can have a great impact on energy consumption. However, the introduction of CR capabilities also has to deal with some WSN intrinsic constraints in terms of size, cost, energy consumption, memory, and computational capabilities. When designing CWSN optimization strategies, the fact that WSN nodes are very limited in terms of memory, computational power, and energy consumption is not insignificant. Thus, light strategies that require a low computing capacity must be found. The implementation of complex algorithms that would help us optimize energy consumption is not a valid approach due to the low processing capabilities of the nodes.
The strategy for energy consumption reduction in CWSNs presented in this work is supported by three main pillars. The first is that the cognitive capabilities added to the WSN provide the ability to know the state of the spectrum and change the transmission parameters. The second pillar is the ability to collaborate, as a basic characteristic of CWSNs. Finally, the third pillar or important aspect to consider is that CWSN nodes have constrained resources. The proposed strategies should have characteristics of lightness and simplicity that make them valid for operating in these networks. For that reason, a decision algorithm based on game theory, which has been widely used in WSNs due to its characteristics, is proposed for this work.
The main contributions of the work can be divided into the following: Designing a game using cognitive capabilities for WSNs which can be implemented in low resources nodes. Proposing a new energy consumption optimization strategy for CWSNs based on the suggested game and collaboration among nodes in a distributed way. Implementing and testing the proposed strategy through simulations in order to evaluate its validness and performance under different scenarios.
Thus, this paper presents a game theory-based strategy using cognitive capabilities and collaboration among nodes allowing a significant reduction in the energy consumption of the network. Among the cognitive capabilities available in CWSN channel allocation is chosen due to its potential to reduce interference and hence retransmissions leading to an energy consumption reduction. Even more, channel selection is a parameter accessible in almost every node in WSNs.
The rest of the paper is organized as follows: In Section 2 the state of the art in the area of energy optimization for CWSNs is presented. Section 3 presents the assumptions and the network scenario. The optimization strategy is proposed in Section 4. Section 5 presents and discusses the results. Finally in Section 6 some conclusions are provided.
2. Related Work
CWSNs are still a developing field that has begun with research aimed at increasing the QoS in WSNs. The first works have appeared around 2008 introducing the idea of applying cognitive techniques into WSN and promoting the research on this topic [8]. Focusing on reducing energy consumption in CWSNs, authors notice in this work that CR could be able to adapt to varying channel conditions, which would increase transmission efficiency, and hence help reduce power used for transmission and reception. Also, along the same line, some advices are given too in [9] related to the reduction of the number of sensing nodes to achieve more efficient energy sensing.
Methods based on the possibility of adapting transmission parameters for achieving a better spectrum utilization and hence energy efficiency use the most significant parameters such as emitted power, packet size, modulation schemes, or communication channel for achieving energy efficiency. Chai et al. studied maximization of energy efficiency through power allocation in CWSNs where WSN nodes opportunistically use the spectrum originally owned by Primary Users (PUs) in [10]. The work is based on game theory where the utility function is defined as oriented to achieve energy efficiency. The same premise of maintaining PUs channel quality is followed in the work presented in [11]. The objective of this work is determining the packet size that optimizes energy efficiency while maintaining PUs channels under acceptable interference level. Another parameter that could be changed in order to adapt communication to the spectrum situation is signal modulation. The use of an adaptive modulation is proposed in [12] in order to increase lifetime of the CWSN. After sensing the entire spectrum and selecting the preferred channel, an adaptive modulation strategy which selects the optimal constellation size is used.
Several schemes have been proposed taking advantage of channel selection in CWSN first to increase spectral efficiency, but also to help in reducing energy consumed. One of the first works in this line is presented by Byun et al. in [13] where the network allocates the transmission channels in a centralized way improving energy efficiency and fairness in channel usage. The problem is formulated as a multiobjective problem solved by a cooperative game. Despite being part of the objectives of the work, no results concerning energy efficiency are presented. Although the proposed algorithm operates in a centralized manner, allocating spectrum in a distributed manner by a noncooperative game is presented as a future work with warning of implementing it as less computationally complex as possible because of constrained resources available. The priority of Primary Users (PUs) is a key aspect of the channel management scheme proposed in [14]. In this work, an operation mode selection scheme for improving energy efficiency in CWSNs is presented. According to the sensed information and the energy consumption associated with each stage, the network is able to adaptively select its operation mode among channel sensing, channel switching, or data transmission/reception. Along the same line of protecting PUs priority, the work presented in [15] is a channel assignment problem formulated for a cluster-based CWSN. For the formulation, channel conditions (Primary User behavior) and energy available in each node are taken into account. Also a scenario with PUs is presented in [16] where a dynamic spectrum allocation scheme is proposed to reduce collisions and increase efficiency. The presented scheme employs firstly a greedy algorithm to select a set of Secondary Users (SUs) according to the amount of data on a node, its residual energy, privacy, and preference. Then, a reverse auction bidding strategy based on noncooperative game is used to select the optimal SUs from the set. Authors present in [17] an optimization based on channel selection and power allocation that minimizes energy consumption per bit for a given required data rate and without introducing harmful interference to PUs. In each slot, users with traffic demand sense the entire spectrum and select the channel and the transmit power. Authors propose a cognitive access scheme for WSNs coexisting with WLANs [18] based on the knowledge of the WLAN idle time distribution functions in advance. Using this piece of information along with the sensed data, packet size and next hop distance are decided in order to optimize energy consumption.
Another group of CWSN energy optimizations is based on enhancing classical WSNs methods with spectrum information. In this line, an energy efficient spectrum aware approach is presented in [19] consisting of a MAC layer improved with spectrum information. Also in this line, an extension of the LEACH protocol that is able to take into account the spectrum holes is presented [20].
It is important to remark that our scenario (explained in detail in the next section) does not have PUs and SUs due to the fact that WSNs usually communicate in unlicensed ISM bands where there is no possibility of being the “owners” of the spectrum with higher priority.
Talking about game theory, two interesting surveys are presented in [21, 22]. Both related to game theory used as a tool for modeled decision making in CR and WSN, respectively. These surveys prove the viability of using game theory in our target network. It is interesting to notice how game theory fit well with the characteristics of cognitive networks on one hand and dealt perfectly with low resources in WSNs. Along the line of using game theory for modeling decision making examples as [23, 24] are presented. In the first one, an algorithm for fairly allocating spectrum in CR is presented. The proposed game is a bargaining game modeled only for two users and for a typical CR network without taking into account low resources. In the second one, not related with CR capabilities, an energy fairness problem is designed for heterogeneous WSNs. Each node models the transmission of information as a game and while each node tries to optimize its payoff, the global objective is achieved. Lin et al. introduce the use of punish mechanisms for selfish nodes in order to assure delivery rate and delay constraints too.
As a result of the process of reviewing previous works, some conclusions can be drawn. Even if introducing cognitive capabilities to WSNs is encouraged for solving energy problem, most of the works are related with sensing methods or enhancing routing methods with spectrum information. Moving to channel allocation strategies and taking into account that one of the main characteristics of our scenario is the exclusive use of unlicensed bands, most of the studies presented and analyzed do not fit these kinds of networks as they always model a scenario with PUs and SUs. In this proposed work, channel allocation among ISM bands is used without the limitation imposed by PUs and SUs. It is important to work on this research line of CWSNs for making WSNs energy efficient once cognitive capabilities for increasing their spectrum performance are introduced. Achieving viable-energy CWSNs is the next step to advance in the use of these networks.
3. Assumptions and CWSN Scenario
CWSNs are based on typical WSNs, improved with several features provided by cognitive networks. Thus, typical CWSNs are similar to WSNs in components, distribution, and behavior. A typical CWSN consists of a number of autonomous nodes, typically varying from tens to thousands, distributed in an environment in order to perform measurements. The obtained values could be processed locally and shared or transmitted directly to be processed together with aggregated data. In any case, data transmission is one of the main tasks in CWSNs. These communications are performed wirelessly. CWSNs allow multihop communication and networks topologies such as star, tree, or mesh.
These nodes are usually powered by batteries and can perform in transmission mode, reception mode, or stand-by mode. Usual values of batteries ranging from coin cell batteries of 300 mAh at 3.3 V to two typical AA batteries of 1700 mAh at 1.5 V are assumed. Those values result in a range of energy available between 3600 J and 18000 J. CWSNs usually communicate using the ISM bands, with low data rates. Theoretical data rates vary from 20 to 250 Kbits/s depending on the specification, but in general typical applications usually have lower data rates ranges from 10 to 1000 bits/s. As an example, a home-monitoring application sending typical environmental data such as temperature, humidity, light, or gases values does not need to employ bigger data rates. The transmission power is limited also by specification to 100 mW (20 dBm) but in a typical application, due to requirements of coverage and energy consumption, it is usually lower than 1 mW (0 dBm). Usual values of communication range could vary between few meters and 100 m.
The typical scenario assumed in this work corresponds to a CWSN communicating in a noisy environment. Because CWSN nodes transmit on unlicensed ISM bands coexisting with other CWSNs or even different radio technologies as Wi-Fi or Bluetooth (in the 2.4 GHz band), a scenario where multiple wireless technologies communicate simultaneously is considered. This scenario is very common due to the growth of consumer electronics (such as laptops, tablets, and smartphones) communicating over these technologies. Due to the Wi-Fi channels bandwidth and their transmission power, each Wi-Fi channel can mask up to four CWSNs channels when both technologies coexist in the 2.4 GHz band.
Even if one of the main characteristics of CR is the existence of PUs and SUs this distinction does not apply in CWSNs. The main reason is because of the use of unlicensed ISM bands. According to their definition, PUs are the “owners” of the spectrum band and have the right to communicate without restrictions, while SUs can use the spectrum if they do not disturb PUs. In this scenario, working in unlicensed bands, no distinction could be made.
4. Collaborative Game Theory-Based Strategy
As mentioned before, constrained resources are an intrinsic challenge when talking about CWSNs. The additional complexity added to the nodes to enable cognitive capabilities makes nodes have higher energy consumption. Moreover, processing capability of WSN nodes is limited, so the strategies implemented should have low complexity.
Among the different possibilities offered by applying Cognitive Radio to WSNs, in this work the selection of the transmission channel has been chosen. The choice of this parameter for reducing interference as proposed in [25] is simple and promising. An improper selection of the transmission channel produces an extra consumption due to the retransmission of packets and the loss of QoS due to delays, packet losses, and so forth. Thus, based on the ability to sense the spectrum and change the transmission parameters, a strategy for reducing energy consumption is presented. This strategy is also based on collaboration among nodes for information sharing and decision making.
As shown in Section 2, game theory is widely accepted for resource optimization in CWSNs. In addition, games can be simplified enough without losing functionality to make them suited to be run on WSN nodes, even if their processing capability is limited.
4.1. Game Model
In game theory, a game is defined by different characteristics: the resource modeled, the players taking actions, and their strategies. Based on these actors, the scenario and the feasible actions payoffs or associated costs can be defined.
In this approach, the modeled game is a finite resource game taking the energy available in the nodes as the resource to be modeled. The players are all of the individual CWSN nodes, and the strategies are related to the selection of the transmission channel. Specifically, the actions each player can take are either switching to a specific channel (among those available to him) or remaining in the same transmission channel. This action can arise from them or after a move, request, from another player. This decision will be taken depending on the player that makes the request, the state of the spectrum, and the history. Payoffs, in this model, costs, are the energy expenses incurred by each player based on their actions and those of the other players.
A summary of the notations used in the modeling of the game can be seen in Notations.
Although this game is collaborative, this collaboration is carried out during the game, but the decisions about the actions are taken by the nodes selfishly. That is, the nodes collaborate by sharing spectrum sensing information to try to improve their overall performance, but the decision of each node about the channel change depends only on its own costs. This is not a cooperative game. As the network is a distributed network and not centralized, the decision is taken by each node without a centralized supervision.
Following game theory terminology, this game can be described as a non-zero-sum game, since there is no correlation between a player's payoffs and the losses of the rest of the players. In fact, there may be actions that minimize the losses of every player. It is a sequential game in which actions are taken one after the other. When actions are taken, players know in which game round they are playing and some information about the decisions of other players. The game is asymmetrical because the costs are not the same for every player. Specifically, they depend on the location of the player (different influence of interference in different areas) and the data rate.
For the calculation of the payoff matrix of this game, the resulting payoffs come from the combination of the actions taken by the players (to change or not to change the transmission channel). As can be seen in Table 1 the feasible actions are not limited to change or not the communication channel. This strategy allows taking decision for every available channel. The number of possible actions depends then on the available CWSN channels.
Matrix representation of the game.
The payoff matrix for player
The values of these associated costs are variable over time due to the network context, so they must be calculated dynamically. The variation of these values makes the game evolve.
Once the costs associated with the communication between two nodes are calculated, it is necessary to weigh the costs associated with the number of messages exchanged between the different network nodes. This piece of information can be collected from the application directly or through history values. This way, a node should be more influenced by the nodes with which it communicates the most.
Due to its sequential nature and since this game is lightly more complex, a representation of the game in extensive form can be better suited. An extensive game is defined by
The extensive form representation of this collaborative game can be seen in Figure 1.

Extensive form representation.
To carry out a formal analysis of the game, two important concepts in game theory are used: the Nash equilibrium and the Pareto optimality. Nash equilibrium is a strategy profile, where each player's action is the Best Possible Response taking into account the other players' actions at that moment. The Best Response (BR) can be defined as the action of a player that maximizes its utility taking into account the actions of the others.
In a formal definition, a pure-strategy Nash equilibrium of a noncooperative game
A strategy profile is a Nash equilibrium if no player has an incentive to unilaterally change its strategy while the rest of the players' strategies remain unchanged.
Carrying out a formal analysis of Nash equilibrium in the proposed game and taking into account that every cost is a negative value, it is possible to assure through the formal definition of costs that
Even more,
With this data, it is possible to eliminate the cells marked in bold font and italic font in Table 2 confirming along with Nash definition that the pairs of actions belonging to the Nash equilibrium correspond to those found on the diagonal, that is, the cases when both nodes take the same action. These cells are marked by underline in Table 2.
Formal game representation of the collaborative game with the optimal equilibrium marked.
Pareto optimality is a measure of efficiency. The outcome of a game is Pareto-optimal if there is no other outcome in which every player is at least as well-off and at least one player is strictly better-off. If a game has many Nash equilibria it is preferable to select that which corresponds to the Pareto-optimal outcome if it is possible (sometimes Nash equilibrium and Pareto-optimal outcome do not match).
A strategy profile
A strategy profile
Looking at the proposed game and the inequality deduced, Pareto-optimal outcomes match the Nash equilibrium pairs (those found on the table diagonal). Depending on the values of
Analyzing the Nash equilibrium and the Pareto optimality in this extensive form and taking into account that every cost is a negative value, it is possible to confirm that they are the same pairs as mentioned previously. In the notation of Figure 1, the Nash equilibrium corresponds to values u z1 , u z8 , u z2 , and u z4 . Pareto optimality is that for u z1 and u z2 .
4.2. Description of the Strategy
The collaborative strategy proposed in this paper is based on channel shifting to prevent unnecessary retransmissions. Thus, based on the ability to sense the spectrum and change the transmission parameters, a strategy for reducing energy consumption is presented. This collaborative strategy is composed of different parameters being the noncooperative game used to model the decision making of this strategy. When designing an energy optimization strategy, the first step is to decide when to trigger the optimization algorithm. It is possible to always run the maximization of the payoff in the background, but in terms of energy conservation and computing capabilities optimizing only when the transmission channel presents a certain amount of interference making the communications fail is more efficient. The optimization is triggered when Received Signal Strength Indicator (RSSI) level detected in the communication channel exceeds a configurable threshold. This measure is related to the presence of interference in the channel. Although this threshold has been chosen since it is associated with the channel saturation and easy to measure, the number of retransmissions could be also used without any change in the strategy.
The collaborative strategy is executed as follows: Each CWSN node When the RSSI values stored in The node The node The rest of the nodes If the evaluation results in a change of the communication channel, After receiving the Every node informs the rest of the CWSN nodes about the final decision taken for improving the overall network performance.
Although in this work every node can sense the spectrum, this approach can be adapted to any type of sensing strategy depending on the network features. To demonstrate the validity of this algorithm, every node in the CWSN senses the spectrum, which constitutes the worst case in terms of energy consumption. However, new collaborative techniques or distributed sensed information can be included taking into account the location of the nodes. A flow chart for the strategy is presented in Figure 2.

Flow chart of the collaborative strategy.
In order to make the strategy light enough to be implemented in nodes with low resources, it is important to remark that sensing information and the collaborative process for negotiation to agree on the best channel to communicate are shared only with the nodes that are located one hop away in the communications network. Even if the amount of information to be exchanged grows with the number of network nodes, this extra communication that each node has to face is related with the number of nodes that each node communicates with (within one hop) and not with the network number of nodes.
As game theory is used in the design phase of the algorithms it is possible to ensure the optimal behavior in terms of energy consumption. Taking into account the design of the game, only the cost associated with
There exists the possibility of having an optimum equilibrium which changes depending on the context of the network or the different presence of interference. But the strategy will be able to adapt. Even more, the strategy could adapt to the presence of dynamic and also locally differently distributed interference. Some of the nodes can choose a communication channel different from the others forming clusters based on their profile communication, that is, the relation among nodes and the amount of data exchanged by them.
5. Results and Discussion
In this section results of different experiments are presented in order to validate the proposed strategy. First the simulation tool used to perform them is presented. The basic scenario used as a reference and the different parameters modifications are exposed. Finally the achieved results are presented and discussed.
5.1. Simulation Tools
In this work the architecture of the Cognitivity Brokerage framework [26] is used. The framework used in the simulation is composed of two fundamental elements: a CWSN simulator and low power Cognitive Radio real devices. This framework [27] has been tested and referenced in previous works.
The structure of the Castalia Simulator has been enhanced to provide cognitive features and a Virtual Control Channel (VCC) has been implemented for sharing sensed information with no extra overhead over regular communications.
Real nodes are used to, first, measure true values in real devices (as time occupied on spectrum sensing, energy consumed in sensing, reception and transmission mode, or communication range) and, after introducing these real data in the simulator, confirm these results for small-scale networks as an empirical test. Therefore, all the results presented in this paper are extracted from the simulator enriched with real devices data.
5.2. Cognitive Baseline Scenario
The simulated scenario is composed of 100 CWSN nodes deployed in a 60 × 60 m area simulating a monitoring application installed in a building in an urban area. These nodes communicate following the IEEE 802.15.4 standard. The 100 CWSN nodes include one network coordinator (for network management tasks), 4 routers, and 95 end devices (environment monitoring sensors). The total simulation area is divided into four equal regions. The coordinator and the routers positions are fixed, the coordinator in the center of the square and each router in the center of each region. The end devices are uniformly deployed in each region. Every node has the ability to communicate with the rest of the networks' node as a D2D communication network.
In these simulations two coexisting networks are communicating, a CWSN and a WiFi network. The baseline scenario has 4 WiFi access points and 100 Wi-Fi devices (such as handheld devices). Access points are located in the center of each region, like the CWSN routers, and Wi-Fi devices are randomly deployed following a uniform distribution.
For the baseline scenario typical WSN and Wi-Fi packets are chosen. As in the previous scenario, end devices transmit WSN packets of 50 bytes at −5 dBm to their region router. Routers send ACK messages after a sensor data reception and also notify the network coordinator when they collect 10 measurements from each sensor node. The Wi-Fi network transmits Wi-Fi packets of 200 to 2000 bytes at −3 dBm. Variability of interference quantity provoked by the Wi-Fi network over the CWSN has been introduced in this scenario by changing data rate of Wi-Fi devices. As in the previous scenario, both networks operate on the 2.4 GHz ISM band. A maximum number of 20 retransmissions are set for the CWSN and the Wi-Fi nodes in the baseline scenario.
CWSN nodes are modeled by a Texas Instrument CC2420 transceiver commonly used for WSNs. The values of energy consumption are extracted from its datasheet (for transmission, reception, idle modes, and energy costs of transitions between modes) and verified through experimental measurement. Typical current consumptions of CWSNs nodes are 20 mA in transmission or reception mode and below 1 mA in stand-by mode [28]. Moreover, the usually called sensing mode refers to a long-lasting reception mode. The sensing stage is modeled as a reception mode lasting for 200 ms (time required to sense the 14 channels in 2.4 GHz band tested trough experimental measurements in our laboratory).
For the collaboration/negotiation messages, we use the Virtual Control Channel (VCC) defined in the Cognitivity Brokerage Architecture [26]. This way, we have a channel reserved for cognitive management tasks and we can avoid the ping-pong problem. For the simulations performed for this work, this channel is a physical channel located in another ISM band.
For the baseline scenario, a RSSI threshold of −150 dBm averaging 5 samples is assumed.
In order to facilitate simulations of different configurations, simulation time is 100 s, and network rates of 1 packet per second on CWSNs and 2000 packets per second on Wi-Fi are chosen. In order to simulate new Wi-Fi configurations or the appearance of new Wi-Fi networks or nodes in the area, the simulated Wi-Fi nodes change their communication channel every 10 s. To validate this assumption, a long term simulation is performed (simulation time 1000 s, 0.1 packets per second for CWSNs and 200 packets per second for Wi-Fi communication) showing similar results to those presented in the paper even if the rates sound too high for the typical CWSN scenario.
In all the results presented, figures show the energy consumption in accumulated Joules over time. For a real reference, the typical 2AA batteries for CWSN nodes have a total energy of 18,000 J. The results show the energy consumption of both a router and an end device.
Different interference configurations have been implemented in order to validate the strategy under different scenarios. These configurations are named uniform, region, fixed, changing, and noNoise. The first two imply different spatial distributions of interference (uniform and different channels on each region) while fixed and changing ones denote temporal changes (no changes or channel switching during the simulation time, resp.). Scenarios marked as noNoise show configurations in absence of Wi-Fi interference.
5.3. Simulation Results
In this section the results of different simulations are discussed. Even if the simulations do not last as long as the battery life, an energy consumption reduction can be appreciated.
In order to test the performance of the proposed strategy, it is compared with a previous work presented in [29]. This previous strategy is also conceived to improve energy consumption and is also based on game theory. However, there is no collaboration among the nodes. Nodes base their decision of changing or not the communication channel in an independent way, without taking into account the response or the spectrum sensing information of the rest of the network nodes. This previous work will be marked as “P2P” in the graphs and the new strategy presented in Section 4 will be named collabGTh. It has been proven that the previous strategy does not depend on the threshold values for the RSSI or the number of samples taken into account.
The first simulation presented in Figure 3 compares the performance of these two strategies for end devices in the baseline scenario with a uniform interference scheme (every Wi-Fi device communicating in the same channel) with two different packet sizes for the Wi-Fi network (2000 bytes and 200 bytes).

Baseline scenario in a uniform noisy scheme (end device).
Results presented in Figure 4 compare the performance of these two strategies also for end devices but with another interference scheme. In this case, the 4 Wi-Fi access points communicate in different channels. That means that there are 4 different channels occupied by Wi-Fi communications. In both cases the Wi-Fi channels change every 10 seconds.

Baseline scenario in a region noisy scheme (end device).
In both figures, the results are quite similar for each strategy, independently of the interference level. It is important to observe the improvement in the energy consumption of the nodes which use the new collaborative approach.
In the case of the uniform interference scheme, it is possible to see that the energy consumption of both algorithms is lower than the case with different regions. However, the adaptation of the new strategy to the presence of interference in different regions gives similar results to the case with the uniform distribution of the interference while the previous strategy performs worse. Therefore it is possible to say that the new collaborative strategy performs equally in more difficult scenarios where the previous strategy fails.
Another conclusion obtained through these simulations is that variation due to the interference level (between packets from 200 to 2000 bytes) does not have a big influence in the results.
Figure 5 presents the results obtained for the routers devices, but only for the case where the Wi-Fi nodes transmit packets of 200 bytes, while the variation caused by the level of interference is not very significant.

Baseline scenario in different noisy scheme (router).
In this case, routers implementing the noncollaborative approach are not able to adapt to the changing channel because finding a free channel to communicate without collaboration is quite improbable. The routers performance is much more damaged than those of end devices because their data rate is higher than that of the end devices (routers send acknowledgment messages to each end device after a received measurement). The router results confirm that both interference patterns have a similar effect in the case of the collaborative algorithm.
The new collaborative strategy provides energy consumption savings of around 50% compared to the P2P strategy in the worst case (with the region based interference scheme and for the routing devices). Summarizing the last results, energy consumed after 100 s of simulations under different interference schemes for routers and end devices is shown in Figure 6.

Energy consumption after 100 s for different configuration.
To verify the uniform performance of the strategy with different interference patterns, the results shown in Figure 7 (end devices) and Figure 8 (router devices) compare scenarios where the Wi-Fi communication stays in the same channel for the whole simulation with dynamic scenarios.

Collaborative strategy performance under different interference schemes (end device).

Collaborative strategy performance under different interference schemes (router).
In both cases the difference found in energy consumption between the different scenarios is barely noticeable, so it is possible to ensure that the proposed collaborative strategy can perform stabilized with different interference patterns.
Finally, to evaluate the energy cost of performing this strategy even in a scenario without interference, the same CWSN is deployed without introducing the Wi-Fi nodes. The results are shown in Figure 9.

Comparison in interference-free environment.
As shown in Figure 9, the energy cost of performing this strategy is even lower. This is because CWSN nodes can interfere with the communications in their own network. The new collaborative strategy is able to adapt its transmission channel to decrease the interference level perceived by the other nodes of the network with which it does not communicate. This is possible thanks to the weighing done in the utility function calculation, which takes into account the messages exchanged between nodes.
In order to complete a general depiction and to test if the developed strategies have some negative aspects related to the network packet rate or the achieved data latency some tests are performed. The first one, related to achievable network packet rate, aims to verify that the introduction of the GTh strategies does not degrade this network parameter. Figure 10 depicts the achieved data rates for the two energy efficient developed strategies and a classical WSN without cognitive capabilities under the five interference schemes presented before.

Packet rate under the 5 interference schemes.
As shown in Figure 10, the packet rate is acceptable (considering a MAC layer not optimized for the network) and similar for the three strategies in absence of interference. The collaborative strategy provides better packet rates than noCR and P2P strategy that are similar among them. This fact can be explained due to the topologies used in the scenarios. As noCR and P2P use a star topology where every node sends its data to a coordinator, this node is more saturated than in the cluster-tree topology used in the collaborative simulation. Nevertheless, as the interference scheme becomes more complex (from left to right), the noCR and the P2P strategy turn into useless configurations as they provide data rates below 10%. That is the case for any interference configuration for noCR networks and for the region distribution of interference for the P2P optimization strategy.
Next verification is related to data latency, for measuring the delay introduced by the energy efficient strategies developed. Results are shown in Figure 11, but only for packet rates above 10%, as below this threshold data is not significant.

Latency comparison for the 5 interference schemes.
Figure 11 represents the average latency for an end device in bars and the standard deviation marked also over the bars.
Even if the network topology and the scenarios definition have some impact in the latency comparison because of spatial nodes distribution and the use of routers in the collaborative strategy (where latency has been measured as routers keep the data packet until they collect 10 measures), it is possible to extract some conclusions. The complexity of the interference scheme does not affect the latency for the different strategies, keeping almost constant for the different scenarios, which denote the adaptation of the algorithm to different interference contexts. On the other hand, it is possible to compare the noCR latency results in absence of interference with the P2P strategy and notice that the differences are not pronounced, which implies that the strategy overload is not harmful. In the same way, with the noNoise scenario the data latency is similar to not executing any CR strategy as the nodes do not enter into the game theory evaluation. With this premise, the noNoise scenario for the collaborative strategy is compared with the rest of interference configuration. This comparison shows also no remarkable differences among them, denoting the fast convergence for the collaborative strategy.
Finally, in order to complete the general depicting of side effects of this strategy, the overhead is analyzed. It is important to remark at this point that the main overhead introduced by this strategy suffered by the nodes is due to the reception of negotiation/collaboration messages. According to the strategy description, these messages are received when a situation of change of the communication channel occurs. If there is common channel agreement (first interaction), this overhead is the reception of an ACK message (one byte) for each node with which the node has direct communication (one hop). If the nodes have different maps of interference and there is no agreement at the first proposal, the nodes which disagree with the proposal have to send their sensing information. This message is 2 bytes ∗ n available channels (ID of the channel and the RSSI associated). Therefore, each node will receive a message of this length for each node that does not agree with the original channel and have direct communication (one hop) with it. While it is true that the number of messages received grows by increasing the number of nodes with which each node communicates directly, we have also taken into account that the distribution of interference in the scenario is similar for the one-hop network nodes as they are spatially distributed. Therefore, these messages increased when interference is very aggressive (spatially and temporally variant). That is the reason why the biggest overheads incurred by the network are linked to different interference areas that vary both spatially and temporally. As it can be seen in Figures 7 and 8, the introduction of extremely aggressive scenarios does not have a remarkable effect in the nodes.
Related with the overhead related with the computing required, beyond the reception of messages, the weight method is simple and light enough (explained in Section 4) to be implemented in a low resource node, as it can be drawn from the results.
6. Conclusion
In this paper, a strategy based on game theory and collaboration for reducing energy consumption in CWSNs has been presented in order to improve the Device-to-Device communication performance in WSNs. This new strategy takes advantage of the new cognitive capacities added to the network for energy reduction purpose. This fact opens a novel research area when cognitive capabilities could be used to increase features of the network beside the spectral occupancy. This is a light optimization algorithm that can be implemented in CWSNs although the computing resources of their nodes are limited. The optimization of this strategy relies on the modeled utility function. A formal analysis of the game has been conducted obtaining a convergence to a pair of values coincident with the Nash equilibrium and the Pareto optimality.
The developed algorithm has been tested and compared with a previous work in the area on a Castalia-based framework adapted to incorporate cognitive capabilities. As seen in the results section, the algorithm shows improvement rates over 50% compared to the previous noncollaborative game theory algorithm.
It can also be seen that the algorithm behaves similarly even with significant variations in the level of interference. Likewise, the results of every node in the network independently of their role (both routers and end devices) are improved.
The strategy has been proved useful both for scenarios in which the interference stays in the same channel and for those in which the interference patterns change. Moreover, the spatial distribution of interference has also changed from a uniform channel in the whole area to multiple interference zones in different channels. Also in the simulations performed in the absence of interference, the strategy presented has shown better results than the previous one. Results about packet rates and latency show that the strategy behaves at least equally for the simple interference configuration and better for the complex ones than the previous P2P strategy improving the network performance. These results allow stating that the introduction of these strategies does not degrade the performance of the network.
Another important claim related to both strategies is that they could be applicable in conjunction with other energy consumption optimizations. In this way, the results can be improved further by incorporating proved efficient routing protocols or MAC implementations for low power consumption.
Footnotes
Notations Used in the Model
Competing Interests
The authors declare that they have no competing interests.
Acknowledgments
This work was partially funded by the Spanish Ministry of Economy and Competitiveness, under RETOS COLABORACION program (Reference Grants S4BIM: RTC-2014-2040-7, SONRISAS: RTC-2015-3601-3, and EASYSAFE RTC-2015-3893-4) and the Spanish Ministry of Industry, Energy, and Tourism through the Strategic Action on Economy and Digital Society (AEESD) under DEPERITA: TSI-100503-2015-39 Project.
