1 Introduction

Among the most active research areas in communications are wireless cognitive sensor networks (WCSNs), which consist of several wireless cognitive sensors that are usually distributed randomly. An application of WCSN is a network of wireless frequency sensors that perform sensing some frequency channels to detect the spectrum activities of the channel users (Akan et al. 2009). Such the WCSN is subjected to some limitations (Joshi et al. 2013). A limitation of WCSNs is that a node cannot sense more than one channel in a sensing duration (Joshi et al. 2013). Therefore, a practical method for multi-channel sensing is monitoring the channels by different sensors (Quan et al. 2008). Another important limitation of WCSNs is the low battery power of sensors due to the limited weight and size of sensors. Therefore, in scenarios that the recharge of the sensors is difficult or impossible, reducing energy consumption is an important issue.

On the other hand, because of fading or shadowing effects, the cooperative spectrum sensing (CSS) is proposed to improve the performance of sensing significantly (Quan et al. 2008), in which the detection results from spatially distributed multiple sensors are combined to make the final decision (Quan et al. 2008). Therefore, the sensing quality of WCSN is noteworthy, meanwhile the energy efficiency.

In this paper, we are interested in the problem of centralized multi-channel CSS (MC-CSS) in a WCSN, in which there is a fusion center (FC) receiving the local sensing results from sensing nodes and makes the final decision about the status of the channels (Akyildiz et al. 2008). Such the WCSN can be particularly used in various application domains of smart grids such as industrial or army applications.

Motivated by the above discussion, in this paper for the assumed MC-CSS scheme, a game-theory-based algorithm is proposed for cooperative sensor allocation to different channels to reduce energy consumption, while some constraints on the channels sensing quality are satisfied. This paper considers the limited ability of sensors in multi-channel sensing, too. The reason behind selecting game theory (GT) for solving the problem is that it is a powerful method for modeling the interactions and cooperation between users, and several works have been done addressing its application for the problem of node selection (Prabakar and Saminadan 2020). This paper proposes a coalition formation game (CFG) for the energy minimization problem. Cooperation in the form of making coalitions has been a high-interest topic in spectrum sensing.

The rest of this paper is organized as follows. In Sect. 2, the related works are discussed. In Sect. 3, the system model is expressed. Section 4 describes the constrained energy conservation problem as a coalition game. In Sect. 5, a GT-based algorithm is proposed and the convergence of the game to the Nash stability is proved. The simulation results are presented in Sect. 6. Finally, the conclusions are presented in Sect. 7.

2 Related works

Although some excellent works have been done using game theory in CSS, most of them have focused on achieving a high data rate for sensing nodes networks while avoiding interference to users of primary networks. Consequently, many of these techniques significantly increase system overhead and energy consumption. However, rapidly rising energy costs and increasingly rigid environmental standards have led to an emerging trend of addressing the “energy efficiency” aspect of wireless communication technologies (Li et al. 2011). There are several energy-efficient techniques for MC-CSS. For instance, in Zhang et al. (2017), scheduling the sensing nodes into different groups to perform an energy-efficient MC-CSS was proposed, but in their method, the maximization of the achieved throughput for the sensing nodes was the main goal. They maximized the ratio of the achieved throughput to the energy consumption, and also, all the sensing nodes do sensing in a sensing period. Reducing the number of sensing nodes for CSS is an energy-efficient technique in WCSNs, which has been investigated in several works (Cichoń et al. 2016), through different schemes such as: censoring scheme in which the transmission energy of sensors is reduced (Maleki et al. 2015), "on/off" scheme in which randomly some sensors turn off their radio and do not perform sensing (Maleki et al. 2013), and sensor selection schemes (Deng et al. 2012; Najimi et al. 2013, 2015). When the information of channel characteristics, sensors positions, and their energy is known, the last scheme is more efficient. These schemes assign a subset of sensors for sensing a channel such that the energy consumption is minimized and the desired detection accuracy is guaranteed, while the other nodes enter a low power mode. However, these works assumed a WCSN which senses only one channel, and their solutions were proposed based on the convex optimization method. In multi-channel scenarios, if the convex method is used, the order of channels for assigning sensors to them should be determined (Avili and Andargoli 2015; Bagheri et al. 2017a, b).

Game theory based solution has been demonstrated as a proper solution for multichannel scenarios. For example, in Devapriya and Kannan (2020), Stackelberg game was used to improve the spectrum and energy effectiveness in a multichannel cognitive radio network. Seeking a proper game method for solving the cooperative sensor selection problem in the MC-CSS scenario, this paper uses CFG. Several works use the CFG for CSS scenarios. For instance, in Saad et al. (2011) and Wang et al. (2014), CFG was used for clustering sensing nodes in different clusters, such that sensors in every cluster share their sensing results between themselves in a distributed CSS scheme, such that the error of CSS in every coalition minimized. In Dai et al. (2016), for energy efficiency, a constraint on the transmission power of sensing nodes was assumed, all the sensors do sensing of the only channel which is not energy efficient. The works assumed a distributed CSS scheme for sensing of only one channel which are completely different from our assumed model. In MC-CSS scenarios, the CFGs were used for sensor selection, too. For instance, in Umar and Mesbah (2016), CFG was used to solve the problem of throughput maximization by making overlapping coalitions of the sensing nodes. In this scheme, it was assumed that every sensing node has multiple EDs and can sense more than one channel, simultaneously, which is costly and impossible for some limited applications. In this scheme, it was assumed that the sensing nodes that don’t have data for transmission don’t sense channels; however other nodes should sense all the channels simultaneously, which is not energy efficient. Another scheme for MC-CSS, using CFG, was proposed in Hao et al. (2011) investigating the problem of throughput maximization of spectrum access to the sensing nodes, such that sensing nodes make coalitions and every coalition cooperatively senses a part of the spectrum; if it was detected idle, randomly one of the nodes in the coalition would be allowed to send data on it. Although this scheme assumed the limitation of nodes in sensing more than one channel and used the CFG for making disjoint coalitions, the energy of nodes was not considered and all the sensors perform sensing in each of the network lifetime durations. In Xu et al. (2012), using CFG, a distributed cooperative spectrum sensing and accessing scheme was proposed which takes into account both the sensing accuracy and energy efficiency in the utility of coalitions. The scheme needs selecting a decision node for every coalition and sharing the received SNR of the nodes in each coalition. However, the utility of each coalition was defined as the ratio of the opportunistic usage of the channel to the energy consumption for sensing the channel. In fact, in their proposed scheme, sensing nodes are partitioned into groups that provide the higher throughput for them, and also all the nodes do sensing simultaneously, which in some applications is not necessary.

Because of the efficient results of using CFGs in node selection for MC-CSS scenarios, in this paper, the method is investigated. The purpose of this paper is completely different from the existing works using CFG. There are mainly the following differences between this paper and the existing works using CFG or other methods for node selection.

  • First, this paper proposes a centralized algorithm for sensor assignment for MC-CSS to reduce energy consumption, while some constraints on the channels sensing quality are satisfied, while Saad et al. (2011), Wang et al. (2014), and Dai et al. (2016) have proposed an energy-efficient sensor assignment for MC-CSS in a distributed manner.

  • Second, this paper assumes that sensors have only one ED which makes the results more applicable. The proposed solution does not require all sensors perform sensing in each iteration of the network lifetime, while Umar and Mesbah (2016) has proposed a scheme for MC-CSS in which every node has multiple ED, and Hao et al. (2011) and Xu et al. (2012) have proposed sensor assignment schemes for MC-CSS which all the nodes do sensing simultaneously.

  • Third, this paper uses a CFG for solving the problem of energy consumption minimization for MC-CSS, while Avili and Andargoli (2015) and Bagheri et al. (2017a, b) have used convex optimization method for energy consumption minimization and lifetime maximization, respectively, but the problems are non-convex meanwhile the convex method needs determining the priority of channels for assigning cooperative sensors to, which makes the solution much complex. On the other hand, Umar and Mesbah (2016), Hao et al. (2011), and Xu et al. (2012) have used the CFG for sensor assignment for MC-CSS but their goal was not the energy consumption minimization.

In the proposed algorithm, the sensors play a coalition game and calculate the reward of joining each of the coalitions for sensing the channels. A proper utility function for every coalition is designed such that only sufficient nodes with low energy consumption sense the channels; other nodes turn off their sensing module. It is proved that this algorithm converges to a Nash-stable coalition with less energy consumption, an adequate detection probability, and a low false alarm.

3 System model

We consider a WCSN composed of N sensors distributed uniformly over a region and an FC. The under monitor frequency spectrum is composed of M channels with the same bandwidth, which are used by M primary users (PUs). It is assumed that every PU can use only one of the channels. A sample WCSN is depicted in Fig. 1. Because of the limited hardware of sensors, it is assumed that each sensor cannot sense more than one channel at the same time, but a sensor can sense different channels in different sensing times. In this scheme, every sensor is equipped with a receiver circuit which composed of a synthesizer, a narrowband filter, and an energy detector. The simple and low-cost receiver circuit is plotted in Fig. 2. In this receiver, the synthesizer tunes frequency based on the decision of the sensor to the center frequency of the selected channel (for instance the m-th channel is selected for sensing by sensor n), such that a sensor senses only one channel in every sensing period. If a sensor selects none of the channels for sensing, it turns off its sensing module at the sensing period. Therefore, for MC-CSS, a scheme is proposed in which the WCSN can simultaneously sense more than one channel by cooperation between sensors. It means that after the sensors, which decided to sense channels, do sensing, the FC receives the sensing results about all the channels at the same time.

Fig. 1
figure 1

A sample of system model

Fig. 2
figure 2

The receiver circuit of every cognitive sensor

Because the tiny sensors have low complexity circuits, an energy detector is proposed for sensing a channel. The signal energy in the m-th channel is measured by the n-th sensor as: \(T_{m,n} = \frac{1}{K}\mathop \sum \limits_{k = 1}^{K} \left| {x_{m,n} \left( k \right)} \right|^{2}\), in which \(x_{m,n} \left( k \right)\) denotes the k-th sample of the received signal from the m-th channel that is observed by the n-th node, and K is the number of samples which is calculated as \(f_{s}\), in which \(f_{s}\) is the Nyquist sampling rate of the energy detector according to the under-monitor channel bandwidth, and \(\delta\) is the sensing time.

Then, the signal energy is compared with a threshold to generate a one-bit decision. This bit shows the detected status of the selected channel by the n-th sensor, as follows:

$$\left\{ {\begin{array}{*{20}c} {if T_{m,n} \ge \gamma ; D_{m,n} = 1 } \\ {if T_{m,n} \le \gamma ; D_{m,n} = 0 } \\ \end{array} } \right.$$
(1)

When this decision bit is one, it states that the channel is busy, and when the decision bit is zero, it means that the channel is idle. Two hypotheses for the real state of every channel are defined. The first, i.e. \(H_{0,m}\), says that the m-th PU is not transmitting, and the second, i.e. \(H_{1,m}\), says that the PU is transmitting on the m-th channel. So under these hypotheses, the \(x_{m,n} \left( k \right)\) is written as:

$$\left\{ {\begin{array}{*{20}c} {H_{1,m} ; x_{m,n} \left( k \right) = g_{m,n} .s_{m} \left( k \right) + v_{m,n} \left( k \right) } \\ { H_{0,m} ; x_{m,n} \left( k \right) = v_{m,n} \left( k \right) } \\ \end{array} } \right.$$
(2)

The k-th sample of primary transmitting signal on the m-th channel is denoted by \({\text{s}}_{{\text{m}}} \left( {\text{k}} \right)\), that is assumed to be an i.i.d random Gaussian process with zero mean and variance \({\upsigma }_{{\text{S}}}^{2}\). The additive white Gaussian noise with zero-mean and variance \({\upsigma }_{0}^{2}\) is denoted by \(v_{m,n}\). It is assumed that \(s_{m}\) and \(v_{m,n}\) are independent. The channel gain between the m-th PU and the n-th sensor is denoted by a random variable \(g_{m,n}\). We consider path loss, Rayleigh fading, and shadowing effects to model the PU-sensor channels. Hence, the channels gain is written (Sklar 1997):

$$g_{m,n} = 9^{{\frac{{20\log \left( {\frac{\lambda }{{4\pi d_{m,n} }}} \right) + z_{m,n} }}{20}}} \widetilde{{g_{m,n} }}$$
(3)

which \(\widetilde{{g_{m,n} }}\) is a standard complex Gaussian random process (Rayleigh fading), and \(z_{m,n}\) is a Gaussian random variable (in dB) with zero mean and variance \(\sigma_{z}^{2}\) (lognormal shadowing). The expression \(log\left( {\frac{\lambda }{{4\pi d_{m,n} }}} \right)^{2}\) models free-space line-of-sight path-loss (in dB), when \(\lambda\) is the wavelength and \(d_{m,n}\) is the distance between the PU that uses the m-th channel and the n-th sensor. Under the described channel model, if the n-th sensor senses the channel m, the sensor received signals to noise ratio (SNR) from the m-th PU, i.e. \(SNR_{m,n}\), is obtained as Najimi et al. (2013):

$${SNR}_{m,n}=\frac{{p}_{t} {\left|{g}_{m,n}\right|}^{2}{\sigma }_{m}^{2}}{{\sigma }_{0}^{2}}$$
(4)

It is assumed that every sensor knows the instantaneous received SNR from all the channels. There are studies on the SNR estimation in cognitive radio networks, but it is not the goal of this paper. Although this assumption seems unrealistic for some scenarios, it does not affect the proposed sensor assignment algorithm, and it can be done based on the average SNR, similarly (Bagheri et al. 2017a, b).

There are two important metrics for the spectrum sensing quality of a sensor which are called false alarm probability (FP) and detection probability (DP). The DP states the probability that a sensor detects a PU signal if the PU is transmitting actually. The FP states the probability that a sensor decides a channel is busy when the channel is empty. Therefore, the local FP and DP are calculated, respectively as Najimi et al. (2013):

$$P_{{f_{m,n} }} = P\left( {D_{m,n} = 1 {|}H_{0,m} } \right) = Q\left( {\left( {\frac{\gamma }{{\sigma_{0}^{2} }} - 1} \right)\sqrt {f_{s} } } \right){ }$$
(5)
$$\begin{aligned} P_{{d_{{m,n}} }} & = P\left( {D_{{m,n}} = 1{\text{|}}H_{{1,m}} } \right) \\ & = Q\left( {\left( {\frac{\gamma }{{\sigma _{0}^{2} }} - SNR_{{m,n}} - 1} \right)\sqrt {\frac{{f_{s} }}{{2SNR_{{m,n}} + 1}}} } \right) \\ \end{aligned}$$
(6)

Here \(Q\left( . \right)\) denotes the complementary distribution function.

The energy consumption of a sensor in a WCSN mainly depends on two factors: the sensing energy, and the transmission energy. Therefore, the energy consumption of the n-th sensor is calculated as (Najimi, et al. 2013):

$$EC_{n} = E_{s} + E_{{tn}} {\text{~}}$$
(7)

The sensing energy, i.e. \(E_{{\text{s}}}\), is the amount of energy that a sensor consumes during the sensing time to sense the spectrum and to make its decision about the presence or absence of the PU. It is assumed that \(E_{s}\) is constant, and it is the same for all sensors (It is assumed that all sensors, which decides to participate in CSS, pick samples with a similar sampling rate in a fixed sensing duration, although the results can be extended to the different assumption such as different sensing times or different bandwidth for different channels). The \(E_{{tn}}\) denotes transmission energy which is the energy to send the decision bit to the FC reliably, and it is calculated as Najimi et al. (2013):

$$E_{tn} = E_{t - elec} + e_{amp} . d_{0,n}^{2}$$
(8)

, in which \(E_{t - elec}\) is the energy used for the electronic circuits of the transmitter, \(e_{amp}\) is the amplifying coefficient, and \(d_{0,n}\) is the distance between the n-th sensor and the FC.

As mentioned, due to fading or shadowing effects and also limited sensing range of sensors, a single sensor may fail to detect a PU signal correctly. Cooperation between sensors is proposed to increase the sensing performance (Quan et al. 2008). The studies on comparison of the CSS methods revealed that distributed method generally follows the centralized solutions, but at the cost of message exchanges between nodes (Akyildiz et al. 2008). Since the purpose of this paper is energy conservation, the centralized method is used for CSS. Also, it is assumed that the FC uses the logic OR rule to fuse the decisions of sensors (Maleki et al. 2015). According to the logic OR fusion rule, if at least one sensor detects a PU signal on a channel, the final decision shows that the PU is transmitting. Generally, if all the nodes decide to sense a channel, the global detection probability (GDP) and the global false alarm probability (GFP) about the status of the channel are obtained as Najimi et al. (2013):

$$P_{{d_{m} }} = 1 - \mathop \prod \limits_{n \in N}^{{}} \left( {1 - P_{{d_{m,n} }} } \right)$$
(9)
$$P_{{f_{m} }} = 1 - \mathop \prod \limits_{ n \in N}^{{}} \left( {1 - P_{{f_{m,n} }} } \right)$$
(10)

The higher GDP and the lower GFP lead to more reliable detection of channels. Because of the energy limitation of sensors, it is not optimum that all the sensors participate in the sensing process. Also, if all sensors participate in sensing, it leads to high energy consumption and more GFP about the channels without increasing significant GDP (Ghasemi and Sousa 2008). In this paper, the cooperative sensors for sensing the m-th channel are inserted in a set \({\text{J}}_{{\text{m}}}\). After sensing duration, the cooperative sensors send decision bits to the FC. The FC combines the received bits to make the final decision on the status of every channel. If the OR fusion rule is used (Maleki et al. 2013), the GDP (\(P_{{d_{m} }}\)) and GFP (\(P_{{f_{m} }}\)) for the m-th channel are calculated as:

$$P_{{d_{m} }} \left( {J_{m} } \right) = 1 - \mathop \prod \limits_{{n \in J_{m} }}^{{}} \left( {1 - P_{{d_{m,n} }} } \right)$$
(11)
$$P_{{f_{m} }} \left( {J_{m} } \right) = 1 - \mathop \prod \limits_{{ n \in J_{m} }}^{{}} \left( {1 - P_{{f_{m,n} }} } \right)$$
(12)

In the next section, an energy-efficient MC-CSS problem based on the above GDP and GFP constraints is formulated and the novel method is described for solving the problem.

4 The GT-based problem

In this paper, an energy-efficient MC-CSS scheme is proposed which reduces energy consumption. This scheme selects sensors for sensing different, under some constraints on detection performance. The reason behind such constraints is that in the WCSN, the aim is to accurately detect spectrum activities of PUs. Therefore, the GDP and GFP are limiting the sensor selection problem. In an ideal CSS, it should be GDP = 1 and GFP = 0 for every channel, but such perfect CSS is impossible in the actual system. Therefore, we define upper-bounds for GFP and lower-bounds for GDP denoted by \(\alpha\) and \(\beta\), respectively. The optimization problem is presented as follows:

problem 1

$$\mathop {\min }\limits_{{J_{m} }} \mathop \sum \limits_{m = 1}^{M} \mathop \sum \limits_{{n \in J_{m} }}^{{}} EC_{n}$$

subject to;

$$1.\;P_{{f_{m} }} \le {\upalpha } \forall m \in \left\{ {1, \ldots ,M} \right\} { }$$
(13-2)
$$2.\;P_{{d_{m} }} \ge \beta \forall m \in \left\{ {1, \ldots ,M} \right\}$$
(13-3)
$$3.\;J_{m} \mathop \cap \nolimits J_{{m^{\prime}}} = \emptyset \forall m,m^{\prime} \in \left\{ {1, \ldots ,M} \right\} , m \ne m^{\prime}$$
(13-4)

The third constraint is concluded from the limitation of nodes in MC-CSS, which states that a sensor cannot sense more than one channel in each of sensing durations. However, finding the optimal solution is very complex and needs an exhaustive search algorithm with a high number of computations \(\left( {\left( {M + 1} \right)^{N} } \right)\). We seek an algorithm that will enable the energy-efficient sensor assignment problem with low computational complexity. Because of the efficient results of using CFG in node/channel selection problems, especially in MC-CSS problems, the method is investigated in this paper. In this method, sensors play the game and based on their reward decide to join a coalition to cooperatively sense a channel or do not participate in the MC-CSS. The proposed game is denoted as:

$${\mathcal{g}} = \left\{ {{\mathcal{N}},\left\{ {{\mathcal{A}}_{n} } \right\}_{{n \in {\mathcal{N}}}} ,\left\{ {u\left( {J_{m} } \right)} \right\}_{{J_{m} \subset {\mathcal{N}}}} } \right\}$$
(14)

in which \({\mathcal{N}} = \left\{ {1, \ldots ,N} \right\}\) denotes the players of the game which are the sensors. \({\mathcal{A}}_{n} = \left\{ {a_{n0} { },a_{n1} , \ldots ,a_{nM} { }} \right\} = \left\{ {0, \ldots ,M} \right\}\) is the set of available actions of player n (\(a_{n0} = 0\) means sensing no channel and selecting the action \(a_{nm} = m\) means participating in CSS of the m-th channel). An action profile (\(a_{1} , \ldots ,a_{N}\)) shows the selected actions by the N players, when \(a_{n} \in {\mathcal{A}}_{n}\). In every CFG, there is a utility function that describes the value of every possible coalition. The value of a coalition \(J_{m}\) in sensing the channel m is denoted by \(u\left( {J_{m} } \right)\). In the assumed problem, the number of coalitions is fixed and equal to M + 1, and the coalitions are mutually disjoint (from constraint (13–4)). The value of a coalition must capture the tradeoff between the GDP, the GFP, and energy consumption. In this paper, \(u\left( {J_{m} } \right)\) must be an increasing function of GDP within the coalition \(J_{m}\) and a decreasing function of the GFP and the energy consumption of sensors in the coalition. If a sensor decided to sense no channels its utility would be zero. Because the sensors that select actions \(a_{n0}\) (we name it as coalition zero), receive no gain meanwhile spend no cost. The reason behind the zero coalition is that all sensors don’t perform sensing if it is not necessary. We propose the following utility function for the CFG solving the problem 1 (See Appendix 1):

$$u\left( {J_{m} } \right) = \left\{ {\begin{array}{*{20}c} {P_{{d_{m} }} \left( {J_{m} } \right) \ge \beta , P_{{f_{m} }} \left( {J_{m} } \right) \le \alpha : \frac{{\max \left( E \right) - E\left( {J_{m} } \right)}}{\max \left( E \right) - \min \left( E \right)} } \\ {P_{{d_{m} }} \left( {J_{m} } \right)\left\langle {\beta / P_{{f_{m} }} \left( {J_{m} } \right)} \right\rangle \alpha : \frac{{ - E\left( {J_{m} } \right)}}{\max \left( E \right) - \min \left( E \right)} } \\ \end{array} } \right.$$
(15)

in which, \(E\left( {J_{m} } \right)\) denotes the sum of energy consumption of sensors in the coalition \(J_{m}\), \({\text{min}}\left( E \right)\) denotes the minimum energy consumption for sensing the channel m which is equal to the energy consumption of only one node with the lowest energy consumption. The maximum energy consumption is for the case that all the sensors sense the channel m, and it is denoted by \(\max \left( E \right)\).

In this paper, it is assumed that each sensor n can select between two possible kinds of strategies: The first is adding to a coalition when other nodes in the coalition remain. The second is adding to a coalition when a node \(n_{0}\) in the coalition removes, it means that the \(n_{0}\) is replaced by the sensor n, when the removed sensor goes to the coalition zero. In both types, the player n receives a reward or penalty for selecting a coalition \(J_{m}\). We determine the reward based on the shapely value (Shapely 1953). This reward value determines how much benefit results in a coalition value if the player adds to the coalition. For the first kind of strategies, the reward is calculated as:

$$Re_{n} \left( {J_{m} } \right) = u\left( {J_{m} + \left\{ n \right\}} \right) - u\left( {J_{m} } \right)$$
(16)

in which \(u\left( {J_{m} } \right)\) is the utility of the coalition \(J_{m}\) before the n-th sensor is added to, and \(u\left( {J_{m} + \left\{ n \right\}} \right)\) denotes the utility of the coalition after the n-th sensor is added to. For the second kind of strategies, the reward is calculated, as:

$$Re_{n} \left( {J_{m} } \right) = u\left( {J_{m} + \left\{ n \right\} - \left\{ {n_{0} } \right\}} \right) - u\left( {J_{m} } \right)$$
(17)

when \(u\left( {J_{m} + \left\{ n \right\} - \left\{ {n_{0} } \right\}} \right)\) denotes the utility value of the coalition when a sensor \(n_{0}\) in the coalition is replaced by the sensor n. If the sensor decision increases the coalition value, it gains a positive reward. If the sensor decision decreases the coalition value, it gains a negative reward which means penalty.

5 The GT-based sensor assignment algorithm

In this section, a centralized coalition formation algorithm is proposed for sensor assignment for MC-CSS in a WCSN. The main properties of the algorithm are discussed.

  1. A.

    The coalition formation algorithm

First sensors randomly select a coalition (a channel for sensing or take action \(a_{n0}\)). Then, sensors start to play the game such that: a player is selected randomly. The selected node calculates its reward from joining in any of the coalitions and also it calculates its reward from replacing each other node in the coalitions. If there is a coalition that makes greater reward than the current coalition the sensor changes its decision. Playing the game continues until reaching a stable state. In this state, no sensor changes its decision. Table 1 presents a pseudo code for the GT-based algorithm.

Table 1 The GT-Based Algorithm

In section B, it is proved that the sequences of the proposed algorithm steps do not run into cycles, but reach Nash equilibrium (NE) after a finite number of steps. The NE is defined as an action profile (\(a_{1} , \ldots ,a_{N}\)) if and only if no player can improve its utility by deviating unilaterally (Xu et al. 2012).

  1. B.

    Proof of converging toward NE

Here, we use a potential approach for analyzing the game. To this end, a potential function for the game is defined and the properties of the potential game are used (Lã et al. 2016). First, the definition of a special type of potential game: ordinal potential game (OPG), is given. Then, it is proved that the game is an OPG. Finally, we prove the proposed game converges to an NE.

Definition 1

(Ordinal Potential Game) (Ordinal Potential Game) A game \({\mathcal{g}} = \left\{ {{\mathcal{N}},\left\{ {{\mathcal{A}}_{n} } \right\}_{{n \in {\mathcal{N}}}} ,\left\{ {u\left( {J_{m} } \right)} \right\}_{{J_{m} \subset {\mathcal{N}}}} } \right\}\) is an OPG if there is a function \({\Phi }\) such that every move of the players to increase their selfish benefit increases the potential function, too Mardan et al. (2009).

Theorem 1

The proposed CFG is an OPG.

Proof

See Appendix 2.\(\square\)

Theorem 2

The proposed CFG has at least one NE and the algorithm converges to a NE.

Proof

To prove the theorem we use the following properties of OPGs: (1) At each step of the players' dynamics the potential of OPGs strictly increases; (2) OPGs do not take a repeating circle, and stop at one point, certainly; (3) If the potential function of OPGs has a limited upper bound, these games converge to a NE in a finite number of steps. The proof of the mentioned properties of OPGs was exhaustively presented in (Lã et al. 2016) and (Monderer and Shapely 1996). To this end, in Appendix 2, in (21), we define the potential function of the proposed game as the sum of the utilities of all the coalitions. Since the utility function, defined in (15), has a finite upper bound (the limited measure of the utility function is discussed in Appendix 1), the defined potential function has a limited upper bound. Therefore, according to the above-mentioned properties, the CFG proposed in the paper has at least one NE, also, it is concluded that the proposed game converges to a NE in a finite number of steps. In our model, Nash equilibria are the fixed points of the dynamics defined by improvement steps of sensors. \(\square\)

6 Simulation results

In this section, the proposed GT-based algorithm is numerically evaluated through computer simulations using MATLAB. Monte-Carlo method is used with 1000 number of iterations, in order to calculate average results. A square region with a length of 200 m is assumed in which an FC located in the center, N sensors and M PUs are distributed identically. The IEEE 802.15.4/Zigbee is used for the cognitive sensors (Han and Lim 2010). The sampling frequency of energy detectors is equal to the Nyquist frequency, and the threshold level of the detectors is assumed as a coefficient of the noise power. The simulation parameters are presented in Table 2.

Table 2 The values of simulation parameters

The performance of the proposed GT-based algorithm is compared with the following algorithms in a comparable condition:

  1. 1.

    Exhaustive search In this algorithm, all the possible solutions are checked, and if there is an optimal solution, the algorithm finds it. But, this algorithm is very complex which needs long processing time. However, in a small number of nodes and a few number of channels, this algorithm has been compared to demonstrate the effectiveness of the GT-based algorithm in terms of processing time and energy conservation.

  2. 2.

    Random algorithm This algorithm randomly selects sensors for sensing the channels. The sensor selection is done until the GDP constraint is met or the GFP constraint is violated. Because this algorithm has the least complexity, it is compared with the GT-based algorithm.

Since the aim of WCSN is opportunistic usage of frequency, so the proper algorithm reduces energy consumption while the answer leads to a low probability of interference and the high probability of correct detection. Therefore, a metric is defined which shows the rate of finding solutions that satisfy all the problem constraints. This success rate is calculated as the ratio number of iterations that an algorithm finds an acceptable answer to the total number of iterations. Figure 3 presents the success rate of the algorithms at the different number of sensors. If the total number of sensors is high, the processing time of the exhaustive search is too long. Therefore, only a small range of variation of sensors number is simulated for the exhaustive search. Increasing the total number of sensors improves the success rate of all the algorithms that is because of increasing the number of sensors with higher DP for being selected. The exact search has the highest success rate because this algorithm finds the optimal answer if it exists. It is noted that in some cases there is no answer satisfying all the constraints. The GT-based algorithm finds answers with the second-highest success rate, which is very close to the optimal answer. It means that the proposed GT-based algorithm finds the optimal answers with probability more than 96% (it would be explained in Table 3). The random sensor selection algorithm has the lowest success rate, because of paying no attention to the sensors DP and energy.

Fig.3
figure 3

The success rate at different sensor numbers (\({\text{ M}} = 2\))

Table 3 The Success Rate of The GT-based Algorithm Versus Optimal Search

In Fig. 4, the total energy consumption for the MC-CSS is compared at the different number of sensors. This plot shows that the difference in energy consumption between the proposed GT-based algorithm and the exhaustive search is lower than 3%. This means that this algorithm efficiently provides sensors decisions for cooperating in the MC-CSS. The random algorithm does not select appropriate sensors, so more sensors are selected for satisfying the detection constraints. Besides, the selected sensors may also consume a lot of energy. As the total number of sensors increases, the number of sensors with higher DP increases, consequently. Therefore, the average total energy consumption of all algorithms decreases except for random. Because, in GT-based and exhaustive algorithms the sensors are selected deliberately, however, in the random algorithm, more sensors can be selected when the total number of sensors increases.

Fig. 4
figure 4

The consumption energy at different number of sensors (\(M = 2\))

In Fig. 5, the total energy consumption for a network with a fixed number of sensors is compared for sensing the different number of channels. Increasing the number of under sensing channels needs more energy, because of using more number of sensors. Since the exhaustive algorithm for the higher number of channels needs a long time and much memory, we just assumed eight sensors. However, the simulation of exhaustive search is compared only for one, two, and three channels, because in a higher number of channels it takes a long time, even in the low number of sensors. This plot shows that there is no difference in energy consumption between the proposed GT-based algorithm and the exhaustive search, when number of channels is small. This means that this algorithm efficiently provides sensors decisions for cooperating in the MC-CSS, while it needs shorter time. The random algorithm selects sensors such that it consumes the highest measure of energy, because it does not select appropriate sensors, so more sensors are selected for satisfying the constraints on GDP.

Fig. 5
figure 5

The consumption energy for sensing different number of channels (\(N = 8\))

In Fig. 6, the success rate of algorithms at different power of PU signals is plotted, when a WCSN composed of eight sensors is used for sensing two channels. This plot shows when the \({\text{p}}_{{\text{t}}}\) is low, i.e. when the DP of sensors is low, the proposed GT-based algorithm finds the optimum answer, as in the best condition, in terms of detection quality of sensors. Also, it is seen that when the \({\text{p}}_{{\text{t}}}\) increases, the success rate of the random algorithm is closer to the success rate of the optimal exhaustive search because in this case the number of sensors with adequate DP increases.

Fig. 6
figure 6

The success rate at different power of primary signals (\(M = 2, N = 8\))

In Fig. 7, the convergence of the GT-based algorithm is plotted. The first plot shows the changes in the energy consumption of sensors for the MC-CSS at different iterations of the game. The next four plots show the changes in the GDP of coalitionist sensors for CSS of different channels at different iterations of the game. It shows that the energy consumption of cooperative sensors during the game is a descending curve. Also, the GDP of all the channels are ascending curves with a final measure higher than \(\beta\).

Fig. 7
figure 7

The potential function, the total energy consumption and the GDPs of channels versus iterations (\(M = 4, N = 40\))

The simulations present the efficiency of the game theory in selecting appropriate sensors in a WCSN, such that the total energy consumption is minimized. Now, the algorithms are compared in Table 3, respect with the processing time of finding a solution. It is noted that the optimal exhaustive search finds optimal sensors with the complexity order of O(N!) which takes a long time for a higher number of nodes. The random algorithm has the lowest complexity order, which needs the shortest time. But, the random algorithm consumes more energy, meanwhile, it does not find an efficient solution. Although, the GT-based algorithm needs more time for finding a solution than the random algorithm, its solutions are more efficient. Also, the complexity order of the GT-based algorithms is much less than the exhaustive search, from the complexity order of O(N!), meanwhile, it finds the optimal answers with probability more than 96%.

In Table 4, the GT-based algorithm is compared with the random algorithm to evaluate the energy efficiency of the proposed method. This table indicates that although the random algorithm has the lowest complexity, which needs the shortest time, it consumes more energy. On the other hand, the GT-based algorithm needs more time for finding a solution than the random algorithm, but its solutions are more efficient. The results demonstrate that the proposed algorithm finds the answers with more than %139.1 in a WCSN composed of at least 6 sensors performing CSS in 2 channels. Also, when the number of sensors increases, the efficiency of the proposed algorithm has higher enhancement. The reasons for this increase in efficiency of the GT-based algorithm compared to the random algorithm are: (i) the number of sensors with higher DP increases if the total number of sensors increases. (ii) The random algorithm does not select appropriate sensors, so more sensors are selected for satisfying the detection constraints. Besides, the selected sensors may also consume a lot of energy. (iii) The GT-based algorithm selects sensors with higher DP and lower energy consumption. Therefore, the average energy consumption for the GT-based algorithm decreases but it increases for the random algorithm.

Table 4 The energy consumption efficiency of the gt-based algorithm versus random algorithm (M = 2)

7 Conclusion

In this paper, an algorithm for coalition formation in a WCSN was proposed, to select nodes to perform MC-CSS, that it reduces consumption energy, for scenarios that the recharge of sensors is difficult or impossible. Also, it was assumed that the sensors cannot sense more than one channel in a sensing duration. This problem was modeled as a coalition game in which sensors act as game players and decide to make coalitions to sense the channels or not while guaranteeing that the necessary detection probability and false alarm probability thresholds are satisfied. Then an efficient algorithm to reach a Nash-stable coalition structure was concluded. Due simulations, it was demonstrated that the proposed algorithm reduces the energy consumption while provides sufficient detection quality, which leads to extending the network lifetime. Also, it was demonstrated that the proposed GT-based algorithm finds the optimal answer with a probability higher than 96%, meanwhile, the complexity order of the proposed algorithm is very lower than the exhaustive search.