A Cr Spectrum Allocation Algorithm in Smart Grid Wireless Sensor Network

Cognitive radio (CR) method was introduced in smart grid communication systems to resolve potential maladies such as the coexistence of heterogeneous networks, overloaded data flow, diversity in data structures, and unstable quality of service (QOS). In this paper, a cognitive spectrum allocation algorithm based on non-cooperative game theory is proposed. The CR spectrum allocation model was developed by modifying the traditional game model via the insertion of a time variable and a critical function. The computing simulation result shows that the improved spectrum allocation algorithm can achieve stable spectrum allocation strategies and avoid the appearance of multi-Nash equilibrium at the expense of certain sacrifices in the system utility. It is suitable for application in distributed cognitive networks in power grids, thus contributing to the improvement of the isomerism and data capacity of power communication systems.


Introduction
The next generation of electrical power grids is known as Smart Grid [1], which is characterized by high security, intellectuality, autonomy, and efficiency.To achieve intellectuality and autonomy in

OPEN ACCESS
Smart Grids, an integrated, high-speed communication system with a real time two-way transmission network is crucial [2].As shown in Figure 1, the communication system of the Smart Grid is a three-layer architecture, which includes home area network (HAN), neighborhood area network (NAN), and wide area network (WAN), respectively.At present, the wire transmission method remains widely used in NAN and WAN communication systems because of the method's wide transmission range and outstanding transmission reliability [3].However, with the increase in the demand for automatic distribution networks and smart work environments, the wireless sensor network would gain more attention depending on its speedy deployment, lower cost, and excellent expansibility in HAN.The IEEE 802.15.4g suggested that a home area network can utilize a 900 MHz frequency band as its wireless channel [4].However, with the growing number of existing wireless sensors, this working band will become increasingly crowded.Thus, cognitive radio (CR) has been regarded as an effective solution for extending the utilization of wireless spectrum resources [5].CR technology dynamically changes the transmission frequency of the transceivers by sensing the variations in the ambient environment.Therefore, a CR user can communicate with a gateway and other users through the free primary channel at a different frequency [6].
In CR technology, the allocation of licensed free channels to unlicensed users is a primary concern.Recently, a competitive method is proposed to solve this problem.That is, the users should contend for the limited free licensed transmission channels based on the needful target.This idea resembles game theory in mathematics [7].Hence, the application of game theory used in the spectrum allocation model is proposed.In [8], Lu et al. have introduced a CR spectrum allocation algorithm based on the potential game theory.In this algorithm, potential function is used to achieve the optimization of the spectrum allocation problem.In [9], a CR spectrum allocation model based on prisoner's dilemma has been proposed to analyze the spectrum sharing problem in competing channels.Additionally, the literature [10] has analyzed the performance of the CR spectrum allocation algorithm based on non-cooperative game theory.However, both these existing algorithms have calculated without the multi-Nash equilibrium, which may cause misconvergence in the CR network.In this article, a modified CR spectrum allocation algorithm based on Teng et al. non-cooperative game theory in Reference [10] will be proposed.Subsequently, a micro smart grid spectrum allocation model will be built.The computing simulation consequence by testing software is used to demonstrate that this modified algorithm can achieve stable spectrum allocation strategies and avoid the appearance of multi-Nash equilibrium at the expense of certain sacrifices in the system utility in the smart grid communication system.

CR Spectrum Allocation
In CR spectrum allocation, the gateway allocates free channels to secondary users by the allocation algorithm [11].At present, the patterns of CR spectrum allocation can be divided into three categories [12], as shown in Figure 2. Different patterns of CR spectrum allocation techniques may be incorporated in the same network in practical applications to make the data transmission more efficient and reliable.At present, two CR spectrum allocation models have been primarily used: the model based on graph theory [13] and the model based on auction theory [14].However, when CR is used in the smart grid, these two conventional models may not match because the smart grid communication system requires a high transmission rate and rapid time varying network environment to meet the huge amount of data that was generated during the power exchange and transmission.In this case, a new spectrum allocation model for use in a smart grid communication system is necessary [15].Thus, this paper introduced a new CR spectrum allocation model based on non-cooperative game theory.

Game Theory
In mathematics, game theory focuses on the interaction of the strategic decisions made by multiple participants.Given that a decision of one participant may affect others' decisions or be affected by others' decisions, game theory is thus used to determine a set of strategies that can maximize the total benefits of participants [16].This topic has been used in many different areas such as military, economics, and politics [17].From another angle, game theory can be seen as a tool in terms of transforming actual optimization problems into mathematical situation.

System Model
In CR communication, transceivers can dynamically modify their transmission parameters to operate in a different frequency band [18].Thus, CR can improve the utilization of useless bands and facilitate the coexistence and cooperation among heterogeneous networks.
In a home area network, CR spectrum allocation will be activated when HAN authorization frequency bands are saturated.Thus, the gateway must detect the ambient environment to find other free bands to employ [18].Commonly, the free bands that are found are unauthorized channels for CR users.In this paper, the process that the secondary users of HAN employ in these free bands via competition can be abstracted into a mathematical model using game theory, in which participants are the CR users (such as meter, sensor) in HAN, the strategy is to compete for the free channel, and utility refers to maximizing the communication quality and reducing the interference.As such, the CR spectrum allocation problem can be expressed as follows: Where N is the set of participants, which in this model pertains to CR users; Si is the set of strategies of user i, and Ui is the set of utility functions.
In game theory, optimal solutions are commonly obtained by computing for the NASH equilibrium [19], which can be expressed as: When a participant's strategic set S = {S1, S2 ... SN}, satisfies the boundary condition Where Si′ is the strategy of the ith participant, S−i is the strategy of other participants.Then, S can be defined as a NASH equilibrium solution.
Assuming N CR users in a HAN, which has K available free unlicensed channels, where K < N. Then the ith user's utility function can be expressed as: Where Pi is the ith user's transmission power, Gij is the transmission loss between user i and j, and I(Si, Sj) is the interference function between user i and j, which is defined as follows: Equation ( 3) consists of two parts: the former part, expressed by U1, indicates the ith user's interference caused by other users in the corresponding channel; the latter part, expressed by U2, indicates the interference caused by the user i.Thus, Equation (3) can be simplified as where and , As the cognitive users select the spectrum strategies only to maximize their own utility, there is probability that multi-Nash equilibrium [20] exists, and the spectrum allocation algorithm cannot achieve the stable convergence.Considering the actual situation of HAN, in order to deal with the multi-Nash equilibrium problem of non-cooperative game based spectrum allocation in CR networks, the variation of utility of cognitive users is used to judge the stability after several iterations, and design an improved non-cooperative spectrum allocation algorithm.When the system achieves stable convergence, the gradient of the utility function should level off to 0. Thus, the modified utility function can be expressed as: Where tk refers to the kth timeslot.The above formula is composed of three parts: the former part, expressed by U1′, indicates the ith user's interference caused by other users in the corresponding channel in iteration time t; the middle part, expressed by U2′, indicates the interference caused by the user i in iteration time t; and the latter part indicates the average utility in a timeslot and expressed by U3′.Thus, Equation ( 8) can be simplified as By substituting Equation (4) into Equation ( 8), it can be found that the minimum value of Ui t (Si t , S t −i) is 0, and according to the theorems in [10], it is clear that: (1) The set of participants, which means the set of CR users, is a finite set; (2) The set of strategies of each user is a bounded set; So the existence of the Nash equilibrium is proven in this proposed model.Furthermore, in the proposed algorithm, when the strategic profile (Si, S-i) satisfies the boundary conditions: and   , 0 According to the theorem 2 in [21], for , , when the utility functions meet: It can be said that the utility function   , t t i i t i S S U  is strictly quasi-concave.Then, based on theorem 3 in [21], when the utility functions of players are strictly quasi-concave, the equilibrium of proper mixed strategies is stable.Afterwards, the system achieves stable convergence.
The training process of the proposed algorithm is shown in Figure 3.To minimize the system interference, signal to interference ratio is likewise necessary to measure the interference, which is expressed as:

Simulation
Based on the above CR spectrum allocation model of HAN, a corresponding simulation is implemented in this section.Furthermore, the commonly used spectrum allocation method in [10] is used as a comparison to provide a more intuitive explanation of the stable convergence.
As shown in Figure 4, assuming HAN has covered a rectangular region measuring 100 m × 100 m, the central red star represents the gateway of HAN, and 15 secondary users (CR terminal) are randomly distributed in the rectangular area.Each user employs self-adaption modulation to communicate, and one user can only use one channel for transmission at any given time.Four, six and eight free CR channels, respectively, that are licensed by 750 MHz TV band are available for gateway allocation, assuming that the ability for receiving signal is equal for all CR users.The following Table 1 shows the simulative parameters of the simulation: After initialization, the initial transmission efficiency of each user is calculated by: 2 log (1 ) Where i  is the SNR value of ith user and K is a constant given by In Equation (15), BERtar is the objective bit error rate, which can be expressed as In the proposed model, the threshold value of the target bit error rate was set at 10 −3 .Thus, the initial transmission efficiency of the 15 CR users is shown in Figure 5.
In Figure 5, the horizontal coordinates signifies the index of 15 CR users, whereas the vertical coordinates signifies the transmission efficiency.After obtaining the results of initial transmission efficiency, the CR users that were demonstrated to have higher transmission efficiency are chosen to allocate the free spectrum channel.Equation ( 3) is used to proceed with the first iteration.From the second iteration, the utility function is given by Equation (8) instead of (3).After several iterations, the NASH equilibrium points are determined.Finally, a unique NASH equilibrium point is obtained by judging the gradient of the utility function and time complexity.This spectrum allocation method successfully prevents the appearance of multi-NASH equilibrium and enormously improves system performance.The results of the simulation are shown below.Figure 6 shows the convergent results of the general spectrum allocation algorithm used in HAN without a critical function judging the convergence of utility function, the horizontal coordinates signifies the number of iterations, and the vertical coordinates signifies the index of the four free TV band channels.As the cognitive users accomplish the spectrum allocation by maximization of the private utility, there is probability of multi-Nash equilibrium.As a result, the spectrum allocation strategies are constantly switched.In the above figure, user 4 is unstable and divergent, continuously switching between channels 2 and 4 in the entire iteration process, which is a result of the existence of multi-NASH equilibrium.Figure 10 shows the variation of the total utility along with the iteration proceeding.Evidently, the proposed algorithm has a higher utilization rate and a better convergence property compared with the fair spectrum allocation algorithm.As shown in Figure 11, after the execution of the proposed CR spectrum allocation algorithm, the average signal to interference ratio (SIR) of HAN's users attained a higher level, which means that the interference condition had been optimized.Figure 12 shows the total utility variation while the iteration is in progress.With the iteration ongoing, the utility value showed an uptrend and became smooth and steady, which means that the CR system has become stably convergent.In summary, the simulation results demonstrated the efficiency of the proposed algorithm.

Conclusions
An integrated, high-speed communication system is essential in a smart grid, and improving its communication performance can aid in providing better services.In this paper, the game theory based on non-cooperative spectrum allocation algorithm used in a wireless communication system in a home area network of Smart Grid is analyzed.In order to solve the multi-Nash equilibrium that may exist in the spectrum allocation of cognitive radio networks, the non-cooperative spectrum allocation is divided into two stages, the utility variation is used to analyze the convergence.If the cognitive users have not achieved stable convergence, the utility of previous time slots is used to improve the utility function.The proposed modified CR spectrum allocation algorithm has higher utility performance, faster convergence speed, and lower error probability while competing for the unlicensed 750 MHz TV band.The simulation results have satisfied expectations.This phase of the work is helpful for further research, and has contributed to the improvement of isomerism and the data capacity of power communication systems.

Figure 1 .
Figure 1.Three-layer architecture of the Smart Grid communication system.

Figure 2 .
Figure 2. Three categories of cognitive radio (CR) spectrum allocation pattern.

Figure 5 .
Figure 5.The initial transmission efficiency of the 15 CR users.

Figure 6 .
Figure 6.The simulation result of general CR spectrum allocation algorithm with four channels.

Figures 7 -
show the convergent results of the proposed CR spectrum allocation algorithm used in HAN.The modified algorithm has made the system become stable and convergent, and the Figures likewise indicate that the new proposed model consumes less time compared with the conventional algorithm.So, it can be concluded from the above figures that the proposed improved spectrum allocation algorithm can achieve stable convergence within the limits of complexity requirements of power grid with only calculation of its private utility.

Figure 7 .
Figure 7.The simulation results of proposed CR spectrum allocation algorithm based on non-cooperative game theory with four channels.

Figure 8 .
Figure 8.The simulation results of proposed CR spectrum allocation algorithm based on non-cooperative game theory with six channels.

Figure 9 .
Figure 9.The simulation results of proposed CR spectrum allocation algorithm based on non-cooperative game theory with eight channels.

Figure 10 .
Figure 10.Utilization rate of free channels between two algorithms.

Figure 11 .
Figure 11.(a) The signal to interference ratio (SIR) value before algorithm execution; (b) The SIR value after algorithm execution.

Figure 12 .
Figure 12.The value of total utility (four channels).