1 Introduction

Wireless sensor network (WSN) is applied widely in intelligent household, environmental monitoring and medical [1]. Due to the phenomenon that a number of different applications of WSN coexist in a geographic area [2], the communication interference [3] becomes a more serious problem in WSN. Further more, it will waste nodes energy excessively, because of the data retransmission caused by the interference. However, the traditional single channel of communication will not be able to deal with the sharp increase of interference. Thus, it becomes very attractive to use the available multiple channels to decrease communication interference in WSN. Therefore, it is necessary to reduce interference by using multi-channel resource reasonably and to avoid the extra energy consumption caused by interference for the energy-limited WSN.

At present, the multi-channel technology [4] is used widely to solve the problem of channel allocation. It is an effective method to reduce communication interference by making full use of channel resource. A static allocation algorithm [6] was proposed by Zhou et al. [5]. It makes channel get uniform distribution within the scope of two hops as far as possible. But the large-interference node also exists in the network. In order to effectively reduce the largest interference, Incel and Krishnamachari [7] presented the idea of making the large-interference node assigned a different channel from channel strategy space. However, the algorithm can’t achieve optimization solution for interference problem in the entire network. To solve this problem, Paschalidis et al. [8] described the channel allocation as an optimization problem of maximizing transmission efficiency. However, the above static channel allocation can’t significantly overcome interference when the state of interference in network changes. Thereby, Henriksson et al. [9] proposed dynamic channel allocation algorithm. The algorithm assigns channel for each node according to the state of communication load in network. As a result, it can dramatically eliminate the network interference, greatly improve the network’s capacity, and simplify the algorithm complexity. In reverse, it will decrease the applicability of the algorithm for ignoring the channel switching phase in the process of communication. For the sake of reducing interference effectively, a certain algorithm gets the time slot allocation and channel allocation together, regulates channel and coordination window that slot uses [10]. Whereas, the dynamic allocation algorithms often consume energy excessively, because it has to constantly transmit control information to make others aware of their channel changes. So, it is obvious that we should take into account the energy of the nodes for energy-limited WSN.

With the deepening of the research, the problem of channel allocation is solved according to different network characteristics. The algorithm in [11] assigns a required number of channels to each cell, and it can achieve both efficient frequency spectrum utilization and the minimization of interference effects. It can provide higher capacity, fidelity and quality of service. In some sense, the algorithm can not be widely used. In order to develop the algorithm’s practicability, Gao et al. [12] gave a discrete particle swarm optimization algorithm. This algorithm adjusts transmission power and introduces mutation simultaneously, which improves the ability of global search. But, the algorithm is complicated. In the channel allocation, nodes collaboratively determine their transmission channels to reduce the interference. While for selfish nodes, they always choose their own optimal channels, and the channel strategy also affects the choice of other nodes. Therefore, an interesting question might arise, and one may wonder how to make the utility among nodes. Game theory is a powerful tool to analyze the conflicting objectives of nodes seeking to reduce interference and achieve an energy efficient network in the presence of selfish nodes. In the existing study, the GBCA algorithm adopts non-cooperative game theory method to make full use of the network topology and routing information [13]. The paper analyses the sub-optimality of Nash equilibrium and the convergence of the Best Response dynamics. In conclusion, the algorithm significantly reduces the interference for network. Unfortunately, the algorithm does not accurately describe the interference, and it has ignored the influence of node energy for WSN.

The above algorithms have the disadvantages that the complexity of algorithm is higher, and the interference description is not accurate. What’s more, some of them ignore the effect of node energy. Therefore, based on non-cooperative game theory, we solve the network communication interference problem to avoid the extra energy waste caused by interference. At the same time, the characteristics of limited node energy and computing access should be considered in WSN. In addition, we propose channel allocation algorithm that considers the effect of node energy. In order to better describe the interference, the path gain is introduced. Due to the transmit power of node is limited in WSN, each node has limited signal coverage. Then, the closer the node apart each other is, the greater the perceived signal strength is. In the opposite, the farther the node apart each other is, the smaller the perceived signal strength is. And the path gain can directly relate to node distance. Thereby, it is reasonable to better describe the network interference by introducing path gain. In WSN, sensor nodes will excessively waste extra energy for retransmitting data caused by interference. In this way, the low energy node may exhaust energy more prematurely than high-energy nodes. At last, the network can not work normally. So, it is necessary to consider the influence of nodes energy in the process of allocating channel.

In conclusion, we add path gain and nodes energy to the function of non-cooperative game model. And then, the energy efficiency based multiple channel allocation algorithm (EBMCA) is designed. In the algorithm, channel dynamic adjustment is used to switch communication channel. Theoretical analysis proves that the channel allocation algorithm can make all the nodes reach the Nash equilibrium in the network. The simulation result shows that EBMCA can effectively reduce the interference. Another interesting feature is that it significantly decreases the interference of low energy nodes by considering the nodes’ energy, and accelerates the convergence speed.

2 Related Work

There have been many channel allocation algorithms (e.g. [14, 15]) proposed for wireless networks. The key goal of channel allocation is to minimize the network interference. Among the existing approaches of channel allocation, the static allocation algorithms assign channel on the basis of a given topology. Such as the greedy solution algorithm TMCP in [16], it partitions the whole network into multiple sub-trees, and allocates different channels to each sub-tree. It can significantly improve network throughput and reduce packet losses. But, the interference caused by using the same channel for each sub-tree has not been considered. To better eliminate interference and make full use of multi-channel resources, MC-DCF algorithm in [1] coordinates multi-channel by using retreat mechanism. It achieves satisfactory network performance in terms of throughput, packet delivery ratio and so on. However, static allocation algorithms can’t availably use the information of network state. So it will not dramatically reduce network interference. By comparison, dynamic allocation algorithms can promise the high efficiency of anti-jamming by collecting large global information. In order to choose the optional channels for links, the R-CA in [17] calculates channel interference according to the path loss, energy consumption coefficient of receiving channel, and the channel spacing. Afterwards, it dynamically assigns channel according to the state of adjacent links. R-CA significantly increases the packet transmission rate and throughput. But it is more complex for frequently getting a lot of management information. And the energy consumption of R-CA is too large for energy-limited network. In order to effectively reduce the extra energy consumption, a regret matching based channel assignment (RMCA) is proposed [18]. In RMCA, each sensor node updates its channel strategy according to the historical record of those channels’ performance to reduce interference. It uses the effective receiving rate and the effective average packet delay to measure the interference value. But, the selection of the two parameters is relational to experiment result. It is difficult to choose a proper value of the parameter in practical application.

The above algorithms only solve the problem of channel allocation, while more and more joint algorithms combine channel allocation and other network performance. Such as the joint algorithm proposed by Qu et al. [19], it joints channel allocation and traffic. It also considers the different constraints of individual demand based on non-cooperative game with charging scheme. To some extent, the adoption of charging scheme alleviates the unfairness problem. Moreover, the PJCAPA in [20] combines channel allocation with power allocation. It adjusts the channel and power of link through power and interference prices to achieve the network utility maximization. However, it is just simple superposition of power allocation and channel allocation, which ignores the interaction of them. These joint algorithms usually ask for close connection among the network performances that we expect to promote. Only in this way can we truly achieve the ascension of network comprehensive performance. In general, different networks need to find different ways to achieve the purpose of improving network performance jointly. In addition, the joint algorithms will have higher complexity as it needs more information to achieve better performance. The network will waste more energy at the same time.

In recent years, game theory is widely used as a kind of effective tool in wireless network (e.g. [2123]), such as by the use of non-cooperative game. The existing approach GBCA in [13] minimizes the interference based on multi-channel network game model. It achieves satisfactory network ability of eliminating interference. Furthermore, the algorithm measures the efficiency of the game using the Price of Anarchy. However, it only uses the static routing information, so it can’t accurately obtain the state of the network. In order to solve this problem, the improved algorithm was proposed by Barriquello et al. [24]. The GBCA-G makes the topology structure combined with the routing which based on geographical location information. In some sense, the performance of packets reception is increased effectively. The above two channel allocation algorithms can achieve better performance in network. But, the calculation accuracy is lower, because they only calculate interference values by using the number of neighbor nodes. Moreover, the approaches have slow convergence speed and high complexity, and don’t take into account the influence of node energy.

Owing to the limitation of network energy, it is important to consider the impact of energy should be considered when optimizing the network performance. In order to reduce the energy consumption of the target node, the carrier listening media access protocol readjusts network for reducing the cycle time at run time and the idle listening [25]. The MAC protocol based on competition can effectively avoid collision and achieve efficient channel utilization. It is suitable to solve a variety of interference problems by adjusting the duty cycle flexibility. But, the contention-based MAC protocol sacrifices energy during the contention period. There is a channel allocation algorithm [26] used in WSN, the network is divided into grid according to the location information of nodes. And then, the algorithm assigns available channel for network. Furthermore, it compares interference node numbers between networks with different grid size by simulation experiments. Ultimately, it considers the characteristic of energy limited for sensor nodes to determine the optimal grid size. However, the algorithm can not fundamentally solve the problem of network energy consumption without the actual combination with nodes’ energy.

Our algorithm is different from above mentioned strategies in the following unique features:

  1. 1.

    EBMCA has low complexity for just allocating receiving channel to sensor nodes. And the nodes only use the receiving channel information for channel allocation. What’s more, we can effectively reduce interference by allocating different channels for adjacent nodes. Because the path gain is introduced to accurately describe the interference. Consequently, the network anti-jamming performance is improved greatly.

  2. 2.

    In the algorithm, we consider the influence of node energy when allocating channel, and the extra energy consumption caused by interference is effectively avoided. In this way, each node will select the different channel with the lower energy nodes’ channel strategy. So the energy is available saved and the energy efficiency performance is improved.

  3. 3.

    In EBMCA, the dynamic channel switching is proposed to promise the effectiveness of allocating receiving channel. And only the sending nodes need to adjust communication channel to pursue the normal date transmission. As a result, the time of channel switching is greatly decreased in the process of adjusting channel.

3 Multi-channel Allocation Game Model

In this section, we first formulate the channel allocation as an optimization problem, then model it as a channel allocation game, and finally give the theoretic analysis of channel allocation game.

3.1 Analyses on Multi-channel Allocation Problem

Most of the existing approaches allocate different channels for network nodes. And they make the adjacent nodes apply different channels to avoid communication interference. In some sense, the network interference has been effectively reduced. However, the node energy is ignored, and the network interference causes the failure of data transmission. Thus, node needs to retransmit data to ensure the success of transmission, which will severely consume node energy. It is obvious that some nodes with low energy may fail prematurely, leading to network anomaly. As shown in Fig. 1a, the node with the lowest energy 12 may prematurely fail owing to the energy consumption. So it is important for energy limited network to consider node energy when assigning channel. To solve this problem, it is necessary to reduce the interference of low energy node. So we prefer to make low energy node choose channel firstly, and give full consideration to the node energy in channel allocation. Or other, node selects a channel different from the low energy nodes’ within its interference scope. In this way, the node with the lowest energy 12 will get less interference in channel allocation (as shown in Fig. 1b). Thus, we can effectively prevent extra energy waste caused by the communication interference. What’s more, we can ensure the normal operation of the entire network by avoiding node premature failure. In a word, it is useful to consider the effect of node energy in channel allocation. So the problem of decreasing the interference of low energy node when assigning channel is to be solved.

Fig. 1
figure 1

The impact of nodes energy on channel allocation. a Channel allocated network A, b channel allocated network B

3.2 Multi-channel Allocation Game Model (MCAG)

Game comes from the interest conflicts, concerning the behavior of interactive decision markers who can perceive action of each other. And the multiple channel allocation is modeled as the multi-channel allocation game model (MCAG). In MCAG, each node decides its own channel among players based on the collected information set. Therefore, combining the game theory and the problem of channel allocation with decreasing the interference of low energy node, we construct the game model next. And any node i’s game G = {I, S, u} is composed of the following three factors.

  1. 1.

    Player set I Players are all the nodes in the WSN, and the player set is denoted by \( I = \{ 1,2, \ldots ,N\} , \) where N represents the number of sensor nodes.

  2. 2.

    Action space S The action space contains all the actions of players, and it is denoted by \( S = \{ s_{1} , s_{2} , \ldots , s_{l} \} . \) The action of any node i(i \( \in \) I) is denoted by s i , the action is the available channels that player chooses. At the same time, the action of any node but i is denoted by s i . If the number of orthogonal channels is c in the network, the channel set is denoted by \( C = \{ 1, 2, \ldots , c\} . \)

  3. 3.

    Utility function u For every node i, the utility function is denoted as u i (s). And the utility of player i is denoted by u i (s i , s i )when it chooses the combination strategy (s i , s i ).

We design the utility function u i (s) in two parts as follows:

$$ u_{i} (s) = - \left[{ \mathop{\sum}\limits_{{\left\{{s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(j,i)}{{E_{r} (j)}} \cdot g_{ij} } + \mathop{\sum}\limits_{{\left\{{s_{i} = s_{j} \atop i \in D(j)} \right.}} {\frac{f(i,j)}{{E_{r} (i)}}} \cdot g_{ij} }\right] = u_{i} \left( {s_{1} } \right) + u_{i} \left( {s_{2} }\right) $$
(1)

where f(i, j) denotes node is interference generated by node j. The distance between node i and j is d(i, j), and the path gain between them is \( g_{ij} = \frac{1}{{d_{(i,j)}^{2} }} \). D(i) is the interference range of i, and the energy of node i is denoted as E r (i).

To achieve high energy efficiency, we consider the effect of sensor nodes’ energy. From the benefit function we can find that the interference effect from low energy nodes on any node is larger within interference range. So the node avoids selecting the same channel with those low energy nodes when selecting available channel to reduce its interference. In conclusion, it is worthy to consider the energy efficiency when eliminating interference.

3.3 Analysis on MCAG

The channel allocation game is designed to be a repeated game, and players negotiate the channel usage according to the best response strategy. Specifically, in each round of the game, each player chooses a channel to maximize its utility based on the channel allocation in the last round. And the channel is preferred if it maximizes the utility among those channels. However, the game is not always with the optimal social utility. Hence, we study the convergence characteristic of our channel allocation game in the following. For the sake of simplicity, we give the following definitions for the game G = {I, S, u}.

Definition 1 (Nash Equilibrium, NE) [13]

In a game, a strategy profile s* is called NE if and only if, for each player i and an arbitrary strategy s i in its strategy space, the following inequality is always satisfied \( u_{i} (s_{i}^{*} , s_{ - i}^{*} ) \ge u_{i} (s_{i} , s_{ - i}^{*} ). \)

Nash equilibrium reaches a state that any participant can’t increase its interest by simply changing its strategy.

Definition 2 (Potential Game and Potential Function) [13]

A game is a potential game, if there exists a function \( \phi \) which satisfies

$$ \begin{aligned} & \forall i \in N,\quad \forall s_{ - i} \in S_{1} \times \cdots S_{i - 1} \times S_{i + 1} \times \cdots S_{n} , \\ & \quad u_{i} \left( {s_{i1} ,s_{ - i} } \right) - u_{i} \left( {s_{i2} ,s_{ - i} } \right) > 0\quad {\text{if}}\quad \varphi \left( {s_{i1} ,s_{ - i} } \right) - \varphi \left( {s_{i2} ,s_{ - i} } \right) > 0 \\ \end{aligned} $$

Definition 3 (The Best Response Strategy) [13]

In any round of the game k, once a player is allowed to update its strategy, it would choose the following strategy \( s_{i}^{k} = \arg \,{ \hbox{max} }\,u_{{is_{i} \in S_{i} }} (s_{i} ,s_{ - i}^{k - 1} ). \) That is to say, once a player is allowed to update its strategy, it will choose the strategy which can maximize its utility according to the strategy of all the players in the former round.

To demonstrate the convergence of multi-channel allocation game model, we have the following theorem.

Theorem 3.1

The multiple channel allocation game MCAG is a potential game.

Proof

We construct the potential function as follows:

$$ \varphi (s) \equiv \frac{1}{2}\sum\limits_{i \in N} {u_{i} (s)} $$
(2)

Now, we consider that player i unilaterally changes its strategy from \( s_{i}^{1} \) to \( s_{i}^{2} , \) then the variation of the function \( \phi (s) \) can be divided into three parts: (1) the first part is the utility variation of the nodes that using channel \( s_{i}^{2} \) within the interference range of node i; (2) the second part is the utility variation of nodes using channel \( s_{i}^{1} \) within the interference range of node i; (3) the last part is the utility variation of node i. So we have

$$ \begin{aligned} & \varphi \left( {s_{i}^{2} ,s_{ - i} } \right) - \varphi \left( {s_{i}^{1} ,s_{ - i} } \right) \\ & \quad = \frac{1}{2}\sum\limits_{j \in D\left( i \right)} {\left[ {u_{j} \left( {s_{i}^{2} ,s_{ - i} } \right) - u_{j} \left( {s_{i}^{1} ,s_{ - i} } \right)} \right]} = \frac{1}{2}\left\{ {\mathop{\sum}\limits_{{\left\{{j \in D\left( i \right) \atop s_{j} = s_{i}^{2}} \right.}} {\left[ {u_{j} \left( {s_{i}^{2} ,s_{ - i} } \right) - u_{j} \left( {s_{i}^{1} ,s_{ - i} } \right)} \right]} } \right\} \\ & \quad \quad - \frac{1}{2}\left\{ {\mathop{\sum}\limits_{{\left\{{ j \in D\left( i \right) \atop s_{j} = s} \right.}} {\left[ {u_{j} \left( {s_{i}^{1} ,s_{ - i} } \right) - u_{j} \left( {s_{i}^{2} ,s_{ - i} } \right)} \right]} } \right\} + \frac{1}{2}u_{i} \left( {s_{i}^{2} ,s_{ - i} } \right) - \frac{1}{2}u_{i} \left( {s_{i}^{1} ,s_{ - i} } \right) \\ \end{aligned} $$
(3)

In the first part of variation, for those nodes that originally use the channel s 2 i in the interference range of node i, their interference will increase apparently. This is because node i begins to use the channel \( s_{i}^{2} . \) At the same time, node i suffers interference from those nodes as well. In a word, the utility values of those nodes that using the channel \( s_{i}^{2} \) will be reduced. The benefit function \( u_{i} (s_{i}^{2} ,s_{ - i} ) \) of node i can be described as follows: within the interference range of node i, (1) the ratio of the interference generated by node i’s effect on other nodes to node i’s energy, (2) the ratio of the interference that node i suffers from other nodes to other nodes’ energy. Thus, the sum of the benefit function change of these nodes within the interference range of node i equals the benefit function \( u_{i} (s_{i}^{2} ,s_{ - i} ) \) of node i. The progress of a node’s replacing channel is particularly described in Fig. 2, node i switches channel from channel 1 (as shown in Fig. 2a) to the channel 3 (as shown in Fig. 2b).

Fig. 2
figure 2

The change of node channel. a Node i using the channel 1. b Node i using the channel 3

The utility value of node i when using the channel 3 is \( u = - \left\{ {\left. {\frac{1}{{d_{{(i,v_{4} )}}^{2} }} \cdot \frac{1}{{E_{r} (v_{4} )}} + \frac{1}{{d_{{(i,v_{4} )}}^{2} }} \cdot \frac{1}{{E_{r} (i)}}} \right\}} \right.. \) The node v 4 who originally uses channel 3 suffers the new interference \( - \frac{1}{{d_{{(i,v_{4} )}}^{2} }} \cdot \frac{1}{{E_{r} (i)}}, \) and the new interference caused by node v 4 is \( - \frac{1}{{d_{{(i,v_{4} )}}^{2} }} \cdot \frac{1}{{E{}_{r}(v_{4} )}}. \) In other word, the utility value changes of both node i and node v 4 are just equal.

In conclusion, we can have

$$ \begin{aligned} & \mathop{\sum}\limits_{{\left\{{ j \in D(i) \atop s_{i} = s_{i}^{2}} \right.}} {\left[ {u_{j} \left( {s_{i}^{2} ,s_{ - i} } \right) - u_{j} \left( {s_{i}^{1} ,s_{ - i} } \right)} \right]} \\ & \quad = - \mathop{\sum}\limits_{{}} {\left\{ {\mathop{\sum}\limits_{{ j \in D(i) \atop s_{i} = s_{i}^{2}}} {\frac{f(j,i)}{{E_{r} (j)}} + \mathop{\sum}\limits_{{ j \in D(i) \atop s_{i} = s_{i}^{2}} } {\frac{f(i,j)}{{E_{r} (i)}}} } } \right\}} \\ & \quad = - \mathop{\sum}\limits_{{ j \in D(i) \atop s_{i} = s_{i}^{2}} } {\frac{f(j,i)}{{E_{r} (j)}} - \mathop{\sum}\limits_{{ j \in D(i) \atop s_{i} = s_{i}^{2}} } {\frac{f(i,j)}{{E_{r} (i)}} = u_{i} \left( {s_{i}^{2} ,s_{ - i} } \right)} } \\ \end{aligned} $$
(4)

Similarly, the second sum in (3) is equal to \( - u_{i} (s_{i}^{1} , s_{ - i} ). \) Hence, (3) becomes

$$ \varphi \left( {s_{i}^{2} ,s_{ - i} } \right) - \varphi \left( {s_{i}^{1} ,s_{ - i} } \right) = u_{i} \left( {s_{i}^{2} ,s_{ - i} } \right) - u_{i} \left( {s_{i}^{1} ,s_{ - i} } \right) $$
(5)

Accordingly, we prove that the multi-channel allocation game is a potential game and one of its potential functions is \( \phi (s). \)

Corollary 1

The existence of NE in the multi-channel allocation game for WSN is guaranteed, and the channel allocation maximizing \( \phi (s) \) must be an NE.

Since MCAG is a potential game, and the potential function \( \phi (s) \) is bounded, formula (5) indicates that \( \phi (s) \) will continue increasing in the best response strategy until it reaches a local maximum point. Hence, the convergence round is finite. Because any potential game will converge to a Nash equilibrium under the condition that the potential function is bounded by using the best response strategy, then the existence of Nash equilibrium in the model is guaranteed. So we can get the Corollary 1.

4 Energy Efficiency Based Multi-channel Assignment Algorithm

In general, the payoff of a player depends upon the channels chosen by its interfering players. Thus, players need to exchange information with their interfering players to implement the best response strategy. We propose a channel allocation algorithm for WSN with selfish nodes, named energy efficiency based multi-channel allocation algorithm (EBMCA). And some reasonable assumptions are given as follows: (1) each node knows its id and knows the nodes which have interfering links towards it; (2) each node keeps list(i) which is used to record information about itself and its interference neighbors. EBMCA consists of three phases: initialization phase, game phase, channel dynamic adjustment phase. The details of EBMCA are stated as follows.

We suppose that each node knows its id and the nodes which have interfering links towards it. And each node keeps list(i) which is used to record information about itself and its interference neighbors.

4.1 Initialization Phase

Each node i initializes its receiving channel which is set to rc i in network. Then each node discovers its neighbor by broadcasting a message (containing its id, receiving channel rc i and energy e i ) and collecting the responses provided by the receivers. After any node j receives node i’s message, it measures the distance between i and j, and transmits the message (containing d ij , j’s id, receiving channel rc j and energy e j ) to node i. Upon successful reception of the information from each responding neighbor j, nodeiadds the information of j into its information list. All the information can be used to calculate payoff in the next phase. Pseudo code is given below as shown in Fig. 3.

Fig. 3
figure 3

Pseudo code of initialization phase

The data structure of node is shown in Table 1. Here, any nodevhas a unique network identity id(v), and a receiving channel rc v . The energy value e v is from 10 to 50. We use cnl(v) to record the id of node v’s neighbors, and use cnm(v) to record the number of neighbor nodes in interference range of node v.

Table 1 The node information list

4.2 Game Phase

In the process of game, each node chooses channel strategy, and then calculates the benefit values of different channel strategies according to their respective information list. In addition, node uses the best response strategy to select the optimal channel strategy.

For the sake of simplicity, we present the priority of node according to their energy. Firstly, we put the nodes into the matrix xl in ascending order according to their own energy. Secondly, the node with low energy preferentially selects channel, which can accelerate convergence speed of algorithm.

The nodes execute the game in turn, according to the order of the nodes in matrix xl. And we choose the node i to show the calculation process of player’s achieving the maximum benefit.

  1. At first, node i chooses strategy s i from the available channel set c, and searches node j who is using the same channel as i in the interference range of i. When node i selects channel s i , we can calculate the first part of the benefit according to the formula (6):

    $$ u_{i} \left( {s_{1} } \right) = - \mathop{\sum}\limits_{{\left\{ { s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(j,i)}{{e_{j} }} \cdot g_{ij} } $$
    (6)
  2. And then, we search node k who uses the same channel as node i. At the same time, node i requires the demand that it is in the interference range of node k. Afterwards, we can calculate the second part of the benefit value for node i’s selecting channel s i according to the following formula (7):

    $$ u_{i} \left( {s_{2} } \right) = - \mathop{\sum}\limits_{{\left\{{ s_{i} = s_{k} \atop i \in D(k)} \right.}} {\frac{f(i,k)}{{e_{i} }}} \cdot g_{ik} $$
    (7)
  3. At last, we calculate the total benefits values u i (s) for node is selecting channel s i by adding the two parts of benefits together.

In the game, we compute benefit values that corresponds to all optional strategies of nodes, and put them in the matrix u i . In addition, we can get the optimal strategy by using the best response strategy. Afterwards, nodes put the new channel strategy to strategy set s i , and update their receiving channel information at the same time. In conclusion, we can get a channel allocation \( (S = (s_{1} ,s_{2} , \ldots ,s_{n} )) \) when all the game players have completed the update of channel strategy. If the k + 1 round channel allocation (a new round of strategy) and the k round channel allocation (the previous round of strategy choice) achieve the same allocation result, we think that the channel allocation has achieved the Nash equilibrium. And then the game is finished. Otherwise, the game begins to the next round to reach the Nash equilibrium for completing the channel allocation. Pseudo code is shown in Fig. 4.

Fig. 4
figure 4

Pseudo code of game phase

4.3 Channel Dynamic Adjustment Phase

Every node in the network is assigned its own receiving channel after game phase. While, sending and receiving nodes must keep on the same channel in the process of communication. So we design the channel dynamic adjustment stage in order to guarantee the normal communication in the network. Description is shown in Fig. 5.

Fig. 5
figure 5

The dynamic adjustment of channel

After the above two phases, a fixed receiving channel is allocated to each node. And then, the network starts to communicate for the further data transmissions based on the channel allocation. (1) Any node i in network, broadcasts the REQ(i) message when it has data to transmit within the communication range; (2) the receiving node who has received the REQ(i) message sends the reply information PER(j) to node i. The reply information contains node receiving channel. At the same time, the receiving node fully prepares to receive data. In Fig. 5, the receiving channel of node j is channel 4; (3) at last, node i updates its sending channel information which is consistent with the node j’s receiving channel after receiving the reply information PER(j). It means that the node i adjusts its sending channel to channel 4. Thus, the node i can send data to the node j when the channel dynamic adjustment is completed. The pseudo code is shown in Fig. 6.

Fig. 6
figure 6

Pseudo code of channel dynamic adjustment phase

5 Game-Theoretic Analyses and Performance Evaluation

In this section, we give the analysis on EBMCA based on game theoretic. The algorithm convergence and the game efficient are analyzed. Further more, the performance of EBMCA is evaluated through simulation experiments.

5.1 EBMCA Algorithm Performance Analysis

Nash equilibrium can be considered to be an absorbing stage of a game. Potential games are a special class of games and it guarantees to converge to a Nash Equilibrium, because the improvement paths are finite. We begin by showing the convergence of the algorithm.

Theorem 5.1

In the channel allocation game, EBMCA algorithm can always converge to Nash equilibrium.

Proof

We can have formula (8) according to the constructed potential function.

$$ \varphi \left( s \right) = \frac{1}{2}\sum\limits_{i \in N} {\left\{ {\left. { - \mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop j \in D(i) } \right.}} {\frac{f(j,i)}{{E_{r} (j)}} \cdot g_{ij} } - \mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(i,j)}{{E_{r} (i)}}} \cdot g_{ij} } \right\}} \right.} $$
(8)

The interference state of each player is decided by the number of nodes that using the same channel, the energy of relevant nodes and the path gain within the interference range. All the energy of nodes we imagined are fixed and equal in the network, and it is smaller than node energy in the actual network. At the same time, we assume that the distance between nodes is equal, and less than the maximum distance between nodes in the actual network. The interfering node number of each node is less than the total number of nodes in network. Thus, the formula (8) can be converted to the following form:

$$ \begin{aligned} \varphi (s) & = \frac{g}{2 \times E}\sum\limits_{i \in N} {\left\{ {\left. { - \mathop{\sum}\limits_{{\left\{{ C_{i} = C_{j} \atop j \in D(i)} \right.}} {f(i,j) - \mathop{\sum}\limits_{{\left\{{ C_{i} = C_{j} \atop j \in D(i)} \right.}} {f(j,i)} } } \right\}} \right.} \\ & = \frac{g}{E}\sum\limits_{i \in N} {\left\{ {\left. { - \mathop{\sum}\limits_{{\left\{{ C_{i} = C_{j} \atop j \in D(i)} \right.}} {f(j,i)} } \right\}} \right.} \\ \end{aligned} $$
(9)
$$ \varphi (s) \ge - \frac{g}{E}\mathop{\sum}\limits_{{\left\{{ C_{i} = C_{j} \atop j \in D(i)} \right.}} {f\left( {j,i} \right)} \ge - \frac{g}{E}N^{2} $$
(10)

That is to say, the potential function is limited, we can have \( 0 \ge \varphi (s) \ge - \frac{g}{E}N^{2} . \)

According to the best response strategy, each player tries to choose the channel that maximizes its own utility in each round game. Thus, in each iteration game, the situation is always one of the following two cases:

Case 1

None of the players change channel. In other words, for each player i and an arbitrary strategy s i , we have \( u_{i} (s^{k} ) \ge u_{i} (s_{i} , s_{ - i}^{k} ). \) According to the definition of NE, s i is an NE.

Case 2

At least one player changes channel. All the nodes which need to change channel are denoted as a set Q(k), so we can have the equation \( \varphi (s^{k} ) - \varphi (s^{k - 1} ) = \sum _{i \in Q(k)} [u_{i} (s^{k} ) - u_{i} (s^{k - 1} )]. \) The utility of a node will increase when it has changed channel. The algorithm will take a limited iteration to converge to an NE according to the Best Responds Strategy for the potential function is limited. So we can conclude that EBMCA algorithm can always converge to Nash equilibrium.

For a given network and a channel allocation, the interference in the network is a constant (we set it as B). We divide the interference into two parts. One is the interference (defined by B 1) that can be eliminated through channel allocation, and the other is the interference (defined by B 2) that can’t be eliminated. We can have the formula \( \sum\nolimits_{i \in V} {I(i,f) = {\text{B}} - {\text{B}}_{2} } . \) \( \sum\nolimits_{i \in V} {I(i,f)} \) is the sum of the interference for all the nodes in network. The problem of minimizing the total interference of network is NP-hard. We choose to maximize the total removed interference B 1, and it is also NP-hard. So it is difficult to find a solution with both polynomial execution time and optimal result. Instead, we use the game model (MCAG) to solve the channel assignment problem. At the same time, we give the efficiency of the game by using the Price of Anarchy.

Theorem 5.2 (The Price of Anarchy)

Let s 0 be the optimal solution of channel allocation problem and s* be an arbitrary NE, then we have \( \left( {\frac{{c \cdot E_{0} - g_{0} }}{{c \cdot E_{0} }} \le \frac{{U(s^{ * } )}}{{U(s^{0} )}} \le 1} \right). \)

Proof

According to the definition of NE, under channel allocation s*, the payoff of any player in the chosen channel is no less than the potential payoffs in the other channels in c, and obviously no less than the average potential payoff over all the channels in c. Thus, we have the following inequality:

$$ \begin{aligned} u_{i} \left( {s^{ * } } \right) & = - \left\{ {\mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(j,i)}{{E_{r} (j)}} \cdot g_{ij} } + \mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop i \in D(j)} \right.}} {\frac{f(i,j)}{{E_{r} (i)}}} \cdot g_{ij} } \right\} \\ & \ge - \frac{1}{c}\left\{ {\mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(j,i)}{{E_{r} (j)}} \cdot g_{ij} } + \mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop i \in D(j)} \right.}} {\frac{f(i,j)}{{E_{r} (i)}}} \cdot g_{ij} } \right\} \\ \end{aligned} $$
(11)

Therefore, the potential function can be bounded as

$$ \begin{aligned} \varphi \left( {s^{ * } } \right) & \ge - \frac{1}{2c}\left\{ {\sum\limits_{i \in N} {u_{i} \left( {s^{ * } } \right)} } \right\} \\ & = - \frac{1}{2c}\left\{ {\sum\limits_{i \in N} {\mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(j,i)}{{E_{r} (j)}} \cdot g_{ij} } } + \sum\limits_{i \in N} {\mathop{\sum}\limits_{{\left\{{ s_{i} = s_{j} \atop i \in D(j)} \right.}} {\frac{f(i,j)}{{E_{r} (i)}}} \cdot g_{ij} } } \right\} \\ \end{aligned} $$
(12)

At this point, we choose the least energy value of nodes in network, and select the path gain that corresponds to the maximum distance between any two nodes in network. Then we can have

$$ \varphi \left( {s^{ * } } \right) \ge - \frac{{g_{0} }}{{c \cdot E_{0} }} \times 2\sum\limits_{i \in N} {\mathop{\sum}\limits_{{\left\{{s_{i} = s_{j} \atop j \in D(i)} \right.}} {\frac{f(i,j)}{{E_{r} (j)}}} \cdot g_{ij} = - \frac{{g_{0} }}{{c \cdot E_{0} }} \times B} $$
(13)

Thus, according to the above, we have

$$ \begin{aligned} U\left( {s^{ * } } \right) & = B - B_{1} = B + \varphi \left( {s^{ * } } \right) \ge B - \frac{{g_{0} }}{{c \cdot E_{0} }} \times B \\ & \ge \frac{{c \cdot E_{0} - g_{0} }}{{c \cdot E_{0} }}U\left( {s^{0} } \right) \\ \end{aligned} $$
(14)

Apparently, U(s*) ≤ U(s 0), and thus \( \frac{{c \cdot E_{0} - g_{0} }}{{c \cdot E_{0} }} \le \frac{{U(s^{ * } )}}{{U(s^{0} )}} \le 1. \) Theorem 5.2 can be concluded.

5.2 Simulation Results

In this section, we evaluate the performance of EBMCA via extensive simulations, and compare it with the game basic algorithm GBCA. Simulations have been conducted by using MATLAB. We set the field to 500 m × 500 m, and set communication radius to 90 m. The number of non-overlapping channels is 4–8 and the number of nodes is 50–500. The nodes are randomly distributed, and they form a forest. In GBCA the network routing is with forest structure, children nodes always deliver their messages to their parents, and only the parent nodes are the players in game. So the following comparison among various performances is related to the parent nodes in GBCA.

In the first simulation, let the number of non-overlapping channels be 5 and the interference radius is double the communication radius, and set the total number of nodes is 50. The result of channel allocation in the network is shown in Figs. 7 and 8. The channel allocation generated by GBCA (as shown in Fig. 8) appears that there are adjacent nodes using the same channel. Consequently, communication with the same channel will cause the network interference. Compared with GBCA, the channel allocation derived under EBMCA (as shown in Fig. 7) effectively prevents adjacent nodes from using the same channel. Thereby, EBMCA has better performance to eliminate interference.

Fig. 7
figure 7

The channel allocation derived by EBMCA

Fig. 8
figure 8

The channel allocation derived by GBCA

In the second simulation, we vary the number of nodes in the range from 80 to 110, and vary the available channel from 4 to 8. Resulting values are obtained by averaging over 5 times of simulations. The residual interference ratio with different channel numbers generated by EBMCA and GBCA is shown in Fig. 9.

Fig. 9
figure 9

The residual interference of node

Residual interference ratio is defined as the ratio of the number of interference nodes that can not be eliminated to the number of all the nodes with potential interference. That is the ratio of all interference that still exists in the network after channel allocation to the possible interference in the network at initialization time. It can intuitively measure the ability of eliminating interference for algorithm.

From Fig. 9, it can be observed that the residual interference ratio of the nodes in network decreases as the available channel number increases after performing both EBMCA and GBCA. And EBMCA has slightly lower residual interference ratio than GBCA. This is because EBMCA rationally combines the path gain with the limited available channels to reduce interference in the network. In some sense, the residual interference ratio can reflect the anti-interference ability of algorithm. Thus, our algorithm EBMCA has better anti-interference ability.

The average interference value of nodes rises (as shown in Fig. 10) as the number of nodes in network increases, which means the more network nodes the more competition on channel. Just as shown in Fig. 10, the interference exchange of network in EBMCA decreases quickly as the available channel increases while it changes slightly in GBCA. Obviously, there is less interference in EBMCA. Too much interference will incur high transmission collision, which seriously consumes node energy. Thereby, EBMCA is more suitable for the energy-limited WSN network than GBCA, because EBMCA reduces much more extra energy consumption caused by interference.

Fig. 10
figure 10

Average interference of node

In the third simulation, the resulting values are also obtained by averaging over 5 times of simulations. We let the number of available channels be 6, and vary the number of nodes from 90 to 110. As we all know, the number of nodes in various channels can better show the fairness of using channel. From Fig. 11, we can find that the number of nodes in various channels does not differ much in EBMCA, while there is a larger difference in GBCA. In some sense, variance between the numbers of nodes in each channel can also show the fairness of using channel. Just as shown in Fig. 12, the variance change of node numbers between channels derived under GBCA increases quickly as the number of nodes increases while it changes slightly in EBMCA. Obviously, the situation of using channel is stabile in EBMCA. This characteristic makes EBMCA more practical than GBCA, as the available channels are still limited in practice.

Fig. 11
figure 11

The ratio of the number of nodes in different channel to the total number of nodes

Fig. 12
figure 12

Variance between the numbers of nodes in each channel

In the last simulation, we let the number of available channels be 6, and vary the number of nodes from 200 to 500. There are 100 nodes in network. We sort them in descending order according to node energy. And then we divide them into five stages to calculate the sum of node interference in each energy stage. The simulation results are shown in Fig. 13, where each point is the average result of five independent simulations. It is obvious that the interference value change in EBMCA rises quickly as the node energy decreases. However, the channel allocation generated by GBCA does not take into account the energy of nodes. Consequently, some nodes with little energy may keep their high energy consumption caused by interference all the time until they die from energy exhaustion, which will affect the normal performance of network. Therefore, we propose the EBMCA algorithm. It can effectively achieve the purpose to reduce the interference of low energy node, decrease the energy consumption of those nodes. In other word, it avoids the situation that network can not perform because of node failure.

Fig. 13
figure 13

The interference of nodes with different energy

Just as shown in Fig. 14, the convergence round number of GBCA rises quickly as the node density increases. While, we can find that the convergence round number of EBMCA does not differ much as the node density increases. EBMCA can converge to Nash equilibrium only using about five rounds, because it only uses the information of receiving channel to distribute receiving channel for nodes within node interference range. And it adds node energy priorities when applying the best response strategy to choose the optimal channel, which effectively decreases the number of convergence round. We can conclude that EBMCA is easy to implement and has fast convergence rate. Whereas, GBCA algorithm limits the related non-leaf nodes’ channel change at the same time, which is more complex. Obviously, it is significantly less than EBMCA in terms of convergence speed.

Fig. 14
figure 14

The algorithm convergence round number

6 Conclusions

In this paper, we have studied channel allocation issue in WSN to reduce interference and avoid the extra energy consumption in the data retransmission. In order to solve the problem effectively, we establish game model MCAG. Then we analyze the influence from node energy on channel allocation, prove that MCAG model is a potential field and it has the Nash equilibrium solution. On the basis of MCAG, channel allocation algorithm EBMCA is presented. Different from previous allocations, EBMCA takes into account both path gain and node energy effect to allocate channel for WSN. Each node performs game independently to achieve its receiving channel with the local information, and the channel allocation can be finished quickly. Furthermore, we design a channel dynamic switching strategy to ensure the normal performance of communication.

The simulation results show that EBMCA algorithm can effectively reduce the interference of low-energy nodes and improve the network performance of anti-jamming. In addition, EBMCA algorithm ensures that each node can converge to the Nash equilibrium in a relatively short time. And it can greatly reduce the extra energy consumption in network communication. With the development of wireless technology, the multi-channel technology is an effective way to alleviate the interference among nodes by utilizing the spectrum resource reasonably. At the same time, the topology control could effectively save energy by reasonably dispatching the transmission power. And the routing protocol is an important tool to balance the node energy consumption and prolong the network life time. Hence, we will study the topology and route control to reduce the interference and to better promote the comprehensive performance of the network.