# Spectrum Sharing Based on a Bertrand Game in Cognitive Radio Sensor Networks

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- (1)
- In the first stage, designing a secondary user utility function reflecting the needs facing the secondary network spectrum.
- (2)
- A spectrum rental model facing these needs was designed based on Bertrand game theory, and a spectral demand adjustment algorithm of secondary base stations was also designed. This made the optimal spectrum rental quantities of secondary base stations just equal to the secondary network needs when the primary base station used Nash equilibrium pricing.
- (3)
- In the second stage, for the communication needs of secondary users, fairly and efficiently allotting secondary base station spectrum resources based on a Nash bargaining scheme considering frequency, power and time dimensions.

## 2. System Model and Assumptions

#### 2.1. Primary and Secondary Network Model

#### 2.2. Oligopoly Market and Bertrand Game

- (1)
- The player set $N=\left\{1,2,3,\dots ,n\right\}$, which consists of the secondary users or the primary users participating in spectrum sharing;
- (2)
- Strategy vector $\mathit{a}$, player i select a strategy ${a}_{i}$ from its own strategy set ${S}_{i}$ in each game, the strategy can be the number of purchased spectrum, or transmission power, strategy vector of all players $\mathit{a}=({a}_{1},{a}_{2},\dots ,{a}_{n}$);
- (3)
- Utility function ${u}_{i}\left({a}_{i},{\mathit{a}}_{-i}\right):\mathit{S}\to R$, which represents the degree of benefit or satisfaction that player i can obtain in strategy vector $\mathit{a}=\left({a}_{i},{\mathit{a}}_{-i}\right)$. Usually, ${\mathit{a}}_{-i}=\left\{{a}_{1},{a}_{2},\dots ,{a}_{i-1},{a}_{i+1},\dots ,{a}_{n}\right\}$ denotes the strategy vector of other players except i, and $\mathit{u}=\left\{{u}_{1},{u}_{2},\dots ,{u}_{n}\right\}$ is called the utility vector.

## 3. The First Stage: Pricing Model Based on a Bertrand Game

#### 3.1. The Utility Function and Demand Function of Secondary Base Stations

_{z}

^{2}·ln(5BER

_{ij})). By solving Equation (3), we can obtain the total available subcarriers that a secondary base station needs, indicated by Equation (4), where δ = p

^{TOTAL}·|h|

^{2}·η, W(·) is the Lambert-W function.

- (1)
- ${u}_{1}$ represents the utility that leased spectrum can provide. When the rented spectrum is just equal to the spectrum requirements, ${u}_{1}$ can obtain the maximum benefit. If the leased spectrum is less than the spectrum requirements, the quality that the communication of secondary networks needs can’t be guaranteed. If the leased spectrum is more than the spectrum requirements, this would result in excess spectrum and reduced resource utilization. The preference coefficient $\alpha $ reflects the desirability that a secondary base station meets its demand. In addition, to ensure that the utility value of this part is positive, setting $\mu (\mu >0)$ is the upper limit of its utility value.
- (2)
- ${u}_{2}$ describes the mutual substitutability of the spectrum sold by different primary base stations. The Bertrand game assumes the rental spectrum of different primary base stations can’t be completely replaced, therefore, a spectrum replacement rate v is introduced to consider the spectrum substitutability of different primary base stations. The meaning of replacement rate $v\in \left[-1.0,1.0\right]$, that is, when $v=0.0$, the secondary user can’t switch between different primary base station spectra; when $v=1.0$, the secondary user can switch between different spectra; when $v<0$, the user spectrum sharing needa to use complementary spectrum, that is, when a secondary user uses a spectrum of the primary base station, it needs to lease one or more other spectra of primary base stations together.
- (3)
- ${u}_{3}$ represents the cost that must be paid for the subcarriers $\{{q}_{1},{q}_{2},\dots ,{q}_{M}\}$ of the primary base station.

**Theorem**

**1.**

**Proof.**

#### 3.2. The Utility of the Primary Base Station and the Bertrand Game

- (1)
- M represents the set of game players. This set is composed of primary base stations, such as {1, 2, …, M}.
- (2)
- ${\lambda}_{k}\in {S}_{k}$ represents a player’s strategy. The primary base station sets the renting price ${S}_{k}=\left\{{\lambda}_{k}|{\lambda}_{k}>{\beta}_{k},{\lambda}_{k}\in {\mathit{R}}^{+}\right\}$, k ∈ M of subcarriers of per unit.
- (3)
- ${\mu}_{k}\left({\lambda}_{k},{\lambda}_{-k}\right)$ represents a payoff function. The primary base station k determines the available utility that spectrum pricing ${\lambda}_{k}$ could acquire, calculated by the formula ${\mu}_{k}^{PBS}\left({\lambda}_{k},{\lambda}_{-k}\right)$.

**Definition**

**1**(Nash Equilibrium).

**Lemma**

**1.**

**Theorem**

**2.**

**Proof.**

#### 3.3. Dynamic Bertrand Game

- (1)
- The update strategy of pricing can use the following formula if the primary base station can obtain other players’ historical strategy during the last iteration:$${\lambda}_{k}[t+1]={\mathrm{B}}_{k}({\mathit{\lambda}}_{-k}[t])=\underset{{\lambda}_{k}\in {S}_{k}}{\mathrm{arg}\mathrm{max}}\text{}{u}_{k}^{PBS}({\lambda}_{k},{\mathit{\lambda}}_{-k}[t]),\forall k\in M$$
- (2)
- The following learning strategy will be used when the primary base station can only study local information, where ${\sigma}_{k}$ means the step size of each update:$${\lambda}_{k}[t+1]={\lambda}_{k}[t]+{\sigma}_{k}\cdot (\frac{\partial {u}_{k}^{PBS}}{\partial {\lambda}_{k}})$$

#### 3.4. Stability and Complexity Analysis of Dynamic Game

_{i}are located in the unit circle of a complex plane, that means |ξ

_{i}|<1. We define a Jacobian matrix shown in (19) in order to obtain the solution set of eigenvalues of the self-mapping function:

#### 3.5. Spectrum Requirement Adjustment and System Scheduling

## 4. The Second Stage: Cooperation Spectrum Sharing

#### 4.1. Spectrum Sharing Based on a Bargaining Game

**Definition**

**2**(Bargaining game and bargaining solution)

**.**

**U**is a closed convex subset of

**R**

^{N}, and there is at least one feasible payoff vector, for any I, ${u}_{i}\ge {u}_{i}^{0}$ that exists. A bargaining scheme is a function that maps the bargaining problem to the only feasible payoff vector: $f\left(\mathit{U},{\mathit{u}}^{0}\right):\mathit{U}\to {\mathit{u}}^{*}$.

- (1)
- The set of game players: secondary user set {1, 2,…, i,…, N};
- (2)
- Player strategy ${a}_{i}=\left(S{C}_{i},{\mathit{p}}_{i}\right)\in {S}_{i}$: the secondary user i asks the secondary base station for communication subcarrier set $S{C}_{i}$. The power transmission of every subcarrier is ${p}_{i}=\left\{{p}_{ij}\right\},(j\in S{C}_{i}$);
- (3)
- Payoff function ${u}_{k}\left({a}_{k},{a}_{-k}\right)$: The user i uses power ${p}_{ij}$ to transport information in the corresponding subcarrier of the subcarrier set $S{C}_{i}$. It can obtain channel capacity $\sum}_{j\in S{C}_{i}}w\xb7lo{g}_{2}\left(1+{p}_{ij}{\left|{h}_{ij}\right|}^{2}\xb7\eta \right)$.
- (4)
- Payoff vector is ${\mathit{u}}^{0}$ when it doesn’t reach a cooperation agreement: The demand of channel capacity of the secondary user is (R
_{1}, R_{2}, …, R_{N});

#### 4.2. The Optimal Allocation of Subcarriers, Power and Time

**Theorem**

**3.**

^{+}represents max{x,0}, and ${r}_{i}^{*}={{\displaystyle \sum}}_{j\in \mathrm{SC}}w\cdot lo{g}_{2}(1+{p}_{ij}^{*}\cdot {\left|{h}_{ij}\right|}^{2}\cdot \eta )$.

**Proof.**

## 5. Simulation

^{TOTAL}= 50 mW. The bandwidth of each subcarrier w = 25 kHz, thermal noise level δ

_{Z}

^{2}= 10

^{−11}W, desired BER = 10

^{−2}, and the simulation channel is modeled by Rayleigh fading and the loss factor is 3. Suppose that two secondary users are located at a distance of 200 m within the range of the base station in the secondary network, and their respective channel capacity requirements are R

_{1}= 2 Mb/s, R

_{2}= 3 Mb/s. Considering the path loss of the channel at the boundary (when the distance from the base station is 200 m), when the subcarrier demand is 144 by Equation (4) or enumeration, a channel capacity of 5.0 Mb/s can be provided.

#### 5.1. Spectrum Pricing and Allocation

#### 5.1.1. Preference Coefficient and Rate of Substitution

_{1}= 460, p

_{2}= 440, the effects of different preference coefficients α and substitution rates v on the rent number of subcarriers in the secondary networks are studied. As shown in Figure 6, the secondary base station rents the number of subcarriers whose price is significantly lower than the higher price. If the degree of preference of the secondary base station to satisfy the demand is greater, it will tend to hire more subcarriers to meet the needs of secondary networks. However, when the number of subcarriers meets the demand, the preference coefficient increase that influences the number of subcarriers rented becomes gradually smaller. In addition, Figure 6 shows that substitution rate is smaller, and the switching difficulty that secondary users in the spectrum of different primary base stations experience will be bigger, thus they have to rent more expensive subcarriers; when the substitution rate is higher, secondary users are more likely to rent relatively cheap subcarriers.

#### 5.1.2. The Influence of other Primary Base Stations on Spectrum Pricing

_{2}= 460, 480, 520, 550, and then we examine the relationship between the spectrum pricing and revenue of the primary base station 1. As shown in Figure 7, when the spectrum pricing of the primary base station 1 gradually increases in a certain range, because a high price can obtain more revenue, the income also increases; however, when the profit value exceeds a peak point, because the secondary network will choose a cheaper primary station to rent subcarriers, it resulting in a reduced subcarrier requirement for the primary base station 1, so the revenue of the primary base station 1 will be reduced. In addition, with the increase in the price of another primary base station 2, the demand of the secondary network for the base station 1 also increases, therefore, the primary base station 1 can set a higher price to get greater benefits.

#### 5.1.3. Optimal Response Function and Nash Equilibrium

_{1}= 0.4, v

_{2}= 0.6 and different primary base station loss coefficients β

_{1,2}= 420, β

_{1,2}= 400 (β

_{1,2}represents β

_{1}= β

_{2}), according to the optimal response function, that is ${\lambda}_{k}^{*}=\mathrm{arg}{\mathrm{max}}_{{\lambda}_{k}\in {S}_{k}}\text{}{u}_{k}^{PBS}({\lambda}_{k},{\mathit{\lambda}}_{-k}^{*}),(\forall k\in M)$, Figure 8 can be drawn. The Nash equilibrium is located at the junction of the optimal response function of the different primary base stations, namely, the equation set (12). The less the loss coefficient of a primary base station, the smaller the rental per unit bandwidth caused by loss, and the primary base station is more willing to lower the price of spectrum resources, therefore, the Nash equilibrium price is lower. In addition, the substitution rate also affects the location of the primary base station pricing and the Nash equilibrium. The greater the replacement rate, the more difficult it is for the secondary network to switch from the spectrum of different primary base stations, and secondary base stations are more inclined to lower the price of rental spectrum resources, therefore, the price of the primary base station is lower when a Nash equilibrium exists.

#### 5.1.4. Dynamic Game

_{1}= 420, β

_{2}= 380. According to whether the primary base station can be observed in the history of the policy of other players, we study the process of the primary base station pricing through a dynamic game. For these two cases, the primary base station is respectively based on the optimal response strategy (Equation (13)) and learning strategy (Equation (14)) to dynamically update its spectrum pricing. Wherein, the sufficient conditions of a dynamic game for stability is $\mathsf{\sigma}\in (0,\frac{\left(1-v\right)\left(2M-2\right)}{2M-1})$, we select the learning strategy updating steps σ

_{1}= σ

_{2}= 0.25 and σ

_{1}= σ

_{2}= 0.35, we set the stability threshold τ = 0.01 and the initial pricing of the two primary base stations as λ

_{1}(0) = β

_{1}, λ

_{2}(0) = β

_{2}, then the dynamic game process is shown in Figure 9. As the primary base station is able to observe the historical policies of the other primary base station, a dynamic game can quickly converge to a Nash equilibrium based on an optimal response, but when a primary base station can only be based on the demand information fed back locally by secondary networks to update its pricing strategy, the rate of convergence of the dynamic game is largely dependent on the update step size, and as shown in Figure 10, when the replacement rate is lower, the dynamic game with larger update step has a faster convergence speed. When the replacement rate is higher, a smaller update step should be set to ensure the convergence rate. In addition, because of the high cost of the primary base loss coefficient of high rental per unit bandwidth, the optimal pricing of the equilibrium is higher than the primary base station of low loss coefficient.

#### 5.1.5. Loss Coefficient on Primary Base Station Revenue

_{2}gradually increases, the price of the primary base station 2 will be increased at a smaller rate than that of the β

_{2}, due to the fact the spectrum can be replaced between different base stations, so the corresponding spectrum rental also decreases, and the revenue of base stations is gradually reduced by u

_{2}

^{PBS}(

**λ**) = (λ

_{2}− β

_{2})· $\mathcal{D}$

_{2}(

**λ**). On the other hand, the increase of β

_{2}will increase the price of the base station 1, the rent amount is also increased, so the revenue increases. Not only that, but the replacement rate will also affect the primary base station revenue. For the same loss coefficient, increasing the replacement rate will decrease the optimal pricing of all primary base stations in the system, resulting in a decline in revenue.

#### 5.1.6. Spectrum Requirement Adjustment

_{1}= 420, β

_{2}= 380 and replacement rate v = 0.4, we search for a particular preference factor, the relationship of the real needs of the subcarriers of secondary base stations and the final amount of the rental spectrum. As shown in Figure 12, when the spectrum need is the same, as the preference coefficient increases, the degree of preference of the secondary base station for the need is greater, so they tend to hire more subcarriers, thus increasing the spectrum demand of the secondary network, so the amount of rent subcarriers increases, and linear fitting for $C$ with different requirements and its corresponding rental ${q}^{*}\left(C\right)$, so $\mathrm{C}$ and ${q}^{*}\left(C\right)$ show an approximately linear correlation.

#### 5.2. Cooperation Spectrum Sharing

#### 5.2.1. The Degree of Satisfaction for the Secondary Network Communication Demand

_{2}distance is more than 20 m, the total channel capacity is higher than the demand, when ${D}_{2}>180\mathrm{m}$, the path loss is increased, and the simulation channel can’t meet the increase of the number of ${{\displaystyle \sum}}_{i=1}^{N}\frac{{R}_{i}}{{r}_{i}^{*}}\le 1$.

#### 5.2.2. The Fairness of the Cooperative Spectrum Sharing Scheme Based on NBS

_{1}/r

_{2}, so the fairness of the three kinds of spectrum allocation scheme is obtained as shown in Figure 24 and Figure 25.

## 6. Conclusions

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Estrin, D.; Govindan, R.; Heidemann, J.S.; Kumar, S. Next Century Challenges: Scalable Coordination in Sensor Networks. In Proceedings of the 5th ACM/IEEE International Conference on Mobile Computing and Networking, Seattle, WA, USA, 15–19 August 1999; pp. 263–270.
- Bonnet, P.; Gehrke, J.; Seshadri, P. Querying the Physical World. IEEE Pers. Commun.
**2007**, 7, 10–15. [Google Scholar] [CrossRef] - Callaway, E.J. Wirelsess Sensor NetWorks: Architechures and Protocols; CRS Press LLC: Boca Raton, FL, USA, 2003; pp. 1–17. [Google Scholar]
- Dong, M.; Ota, K.; Liu, A.; Guo, M. Joint Optimization of Lifetime and Transport Delay under Reliability Constraint Wireless Sensor Networks. IEEE Trans. Parallel Distrib. Syst.
**2016**, 27, 225–236. [Google Scholar] [CrossRef] - Liu, A.; Liu, X.; Li, H.; Long, J. MDMA: A multi-data and multi-ACK verified Selective Forwarding Attack Detection Scheme in WSNs. IEICE Trans. Inf. Syst.
**2016**, E99-D, 2010–2018. [Google Scholar] [CrossRef] - Liu, A.; Liu, X.; Long, J. A trust-based Adaptive Probability Marking and Storage Traceback Scheme for WSNs. Sensors
**2016**, 16, 451. [Google Scholar] [CrossRef] [PubMed] - Mitola, J.; Maguire, G.Q. Cognitive radio: Making software radios more personal. IEEE Pers. Commun.
**1999**, 6, 13–18. [Google Scholar] [CrossRef] - Mitola, J. Cognitive Radio: An Integrated Agent Archi- Tecture for Software Defined Radio; KTH Royal Institute of Technology: Stockholm, Sweden, 2000. [Google Scholar]
- Akan, O.B.; Karli, O.B.; Ergul, O. Cognitive radio sensor networks. IEEE Netw.
**2009**, 23, 34–40. [Google Scholar] [CrossRef] - Yau, K.L.A.; Komisarczuk, P.; Teal, P.D. Cognitive radio-based wireless sensor networks: Conceptual design and open issues. In Proceedings of the IEEE 34th Conference on Local Computer Networks (LCN 2009), Zurich, Switzerland, 20–23 October 2009; pp. 955–962.
- Huang, J.; Berry, R.A.; Honig, M.L. Spectrum sharing with distributed interference compensation. In Proceedings of the 2005 First IEEE International Symposium on New Frontiers in Dynamic Spectrum Access Networks, DySPAN 2005, Baltimore, MD, USA, 8–11 November 2005; pp. 88–93.
- Zheng, H.; Cao, L. Device-centric spectrum management. In Proceedings of the 2005 First IEEE International Symposium on New Frontiers in Dynamic Spectrum Access Networks, DySPAN 2005, Baltimore, MD, USA, 8–11 November 2005; pp. 56–65.
- Zhao, J.; Zheng, H.; Yang, G.H. Distributed coordination in dynamic spectrum allocation networks. In Proceedings of the 2005 First IEEE International Symposium on New Frontiers in Dynamic Spectrum Access Networks, DySPAN 2005, Baltimore, MD, USA, 8–11 November 2005; pp. 259–268.
- Haykin, S. Cognitive radio: Brain-empowered wireless communications. IEEE J. Sel. Areas Commun.
**2005**, 23, 201–220. [Google Scholar] [CrossRef] - Yu, H.; Gao, L.; Li, Z.; Wang, X.; Hossain, E. Pricing for uplink power control in cognitive radio networks. IEEE Trans. Veh. Technol.
**2010**, 59, 1769–1778. [Google Scholar] [CrossRef] - Wang, Z.; Jiang, L.; He, C. A Novel Price-Based Power Control Algorithm in Cognitive Radio Networks. IEEE Commun. Lett.
**2013**, 17, 43–46. [Google Scholar] [CrossRef] - Niyato, D.; Hossain, E. Competitive pricing for spectrum sharing in cognitive radio networks: Dynamic game, inefficiency of nash equilibrium, and collusion. IEEE J. Sel. Areas Commun.
**2008**, 26, 192–202. [Google Scholar] [CrossRef] - Niyato, D.; Hossain, E. Competitive spectrum sharing in cognitive radio networks: A dynamic game approach. IEEE Trans. Wirel. Commun.
**2008**, 7, 2651–2660. [Google Scholar] [CrossRef] - Wang, W.; Kang, G.S.; Wang, W. Joint spectrum allocation and power control for multihop cognitive radio networks. IEEE Trans. Mob. Comput.
**2011**, 10, 1042–1055. [Google Scholar] [CrossRef] - Mwangoka, J.W.; Letaief, K.B.; Cao, Z. Joint power control and spectrum allocation for cognitive radio networks via pricing. Phys. Commun.
**2009**, 2, 103–115. [Google Scholar] [CrossRef] - Tran, N.H.; Hong, C.S.; Lee, S.; Han, Z. Optimal pricing effect on equilibrium behaviors of delay-sensitive users in cognitive radio networks. IEEE J. Sel. Areas Commun.
**2013**, 31, 2566–2579. [Google Scholar] [CrossRef] - Lee, K.D.; Leung, V.C.M. Fair allocation of subcarrier and power in an OFDMA wireless mesh network. IEEE J. Sel. Areas Commun.
**2006**, 24, 2051–2060. [Google Scholar] [CrossRef] - Zhao, Z.; Peng, Z.; Zhao, Z.; Zheng, S. Joint power control and spectrum allocation for cognitive radio with QoS constraint. Commun. Netw.
**2010**, 2, 38–43. [Google Scholar] [CrossRef] - Ni, Q.; Zarakovitis, C.C. Nash bargaining game theoretic scheduling for joint channel and power allocation in cognitive radio systems. IEEE J. Sel. Areas Commun.
**2012**, 30, 70–81. [Google Scholar] [CrossRef] - Osborne, M.J.; Rubinstein, A. A Course in Game Theory; MIT Press: Cambridge, MA, USA, 1994. [Google Scholar]
- Kim, K.; Kim, H.; Han, Y. Subcarrier and power allocation in OFDMA systems. In Proceedings of the 2004 IEEE 60th Vehicular Technology Conference, Los Angeles, CA, USA, 26–29 September 2004; Volume 2, pp. 1058–1062.
- Tassiulas, L.; Sarkar, S. Maxmin fair scheduling in wireless networks. In Proceedings of the Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies, New York, NY, USA, 23–27 June 2002; Volume 2, pp. 763–772.
- Liu, Y.X.; Dong, M.X.; Ota, K.; Liu, A.F. ActiveTrust: Secure and Trustable Routing in Wireless Sensor Networks. IEEE Trans. Inf. Forensics Secur.
**2016**, 11, 2013–2027. [Google Scholar] [CrossRef] - Liu, A.; Dong, M.; Ota, K.; Long, J. PHACK: An Efficient Scheme for Selective Forwarding Attack Detecting in WSNs. Sensors
**2015**, 15, 30942–30963. [Google Scholar] [CrossRef] [PubMed]

© 2017 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Zeng, B.; Zhang, C.; Hu, P.; Wang, S.
Spectrum Sharing Based on a Bertrand Game in Cognitive Radio Sensor Networks. *Sensors* **2017**, *17*, 101.
https://doi.org/10.3390/s17010101

**AMA Style**

Zeng B, Zhang C, Hu P, Wang S.
Spectrum Sharing Based on a Bertrand Game in Cognitive Radio Sensor Networks. *Sensors*. 2017; 17(1):101.
https://doi.org/10.3390/s17010101

**Chicago/Turabian Style**

Zeng, Biqing, Chi Zhang, Pianpian Hu, and Shengyu Wang.
2017. "Spectrum Sharing Based on a Bertrand Game in Cognitive Radio Sensor Networks" *Sensors* 17, no. 1: 101.
https://doi.org/10.3390/s17010101