Demand Response Management Research Based on Cognitive Radio for Smart Grid

Cognitive radio is introduced into the demand response management (DRM) of smart grid with the hope of alleviating the shortage of spectrum resources and improving communication quality. In this paper, we adopt an energy detection algorithm based on generalized stochastic resonance (GSRED) to improve the spectrum sensing accuracy under the circumstances of low signal-tonoise ratio without increasing system overhead. Specifically, a DRM scheme based on real-time pricing is investigated, and the social welfare is taken as the main index to measure system control performance. Furthermore, considering the adverse effects incurred by incorrect spectrum sensing, we incorporate the probability of the DRM system causing interference to primary user and spectrum loss rate into the evaluation index of the system control performance and give the final expression of the global optimization problem. The influence of sensing time on system communication outage probability and spectrum loss rate is elaborated in detail through theoretical derivation and simulation analysis. Simulation results show that the GSRED algorithm has higher detection probability under the same conditions compared with the traditional energy detection algorithm, thus guaranteeing lower communication outage probability and spectrum loss rate.


Introduction
With the rapid growth in various electrical equipment, electric power plays an increasingly important role in social life and has become an indispensable necessity in human society. However, the dramatic increase of power demand has brought about the increase of the complexity of the power grid and the rapid growth of load, which makes the issue of safe and stable operation of the power grid attract widespread attention [1][2][3]. The smart grid, which is the intellectualization of the power grid, is considered to be the next generation of power grid in which the security and stability can be improved. The smart grid is an integrated network based on high-speed bidirectional communication and physical grid, which enables it to operate safely and steadily under the increasingly severe demand for electricity. It is actually a new type of power grid formed by the advanced sensor measurement technique, communication technology, infor-mation technology, computer technology, control technology, and physical power grid [4,5]. The rapid development of the smart grid and the wide application of smart meters require more frequency bands to achieve the transmission of power data, which makes the shortage of spectrum resources in wireless communication more prominent.
Cognitive radio (CR) is applied to the smart grid, which realizes efficient usage of the wireless spectrum with the opportunistic spectrum access [6][7][8]. Spectrum sensing in CR can monitor the occupied state of the spectrum in realtime. When the available idle spectrum is detected, cognitive user can complete the data transmission on the idle channel through channel switching to realize the sharing of spectrum resources [9,10]. The commonly used spectrum sensing technologies include matched filter detection, cyclostationary feature detection, and energy detection (ED) [11][12][13]. Matched filter detection is optimum when prior information is known. However, it is not easy to obtain prior information in practice, which is also the reason why the matched filter is not widely used. Cyclostationary feature detection has high detection accuracy and can also identify the types of signals, but the computational complexity is high. ED is widely used in practical engineering because of its low computational complexity and no prior information required.
On the other hand, as a key technology to realize intelligent operation and maintenance of power system, demand response management (DRM) in the smart grid has attracted the attention of various institutions and scholars around the world [14,15]. DRM is aimed at improving the interactivity of the power system, thereby stabilizing the power market and optimizing power resource allocation [16,17]. The core of DRM is to control the electricity consumption on the demand side according to the different demand response patterns of consumers when the price of the power supply market is high and the reliability of the power system is low. In the smart grid, it can be divided into price-based and incentive-based DRM [18]. Direct load control and interruptible load control are the main modes of DRM based on incentive, while the DRM based on price mainly includes time-of-use price, real-time pricing (RTP), and critical peak pricing [19][20][21][22]. RTP is regarded as a crucial method to realize instantaneous power supply and demand balance and improve power utilization.
There are large bodies of research regarding DRM based on RTP, with the attempt to reduce and shift the peak-hour load [23][24][25][26][27]. The authors in [23] proposed a new pricing scheme to minimize the peak-to-average ratio in aggregate load demand with the uncertainty about the impact of power price on consumers' load profiles. However, the impact of communication unreliability on the control performance of DRM has not been considered [23]. An improved RTP approach to address the problems of bad convergence and applicable conditions of this existing optimal RTP model based on utility maximization has been proposed in [24]. This algorithm can obtain the optimal price to maximize the total utility of all consumers and power suppliers. The authors of [25] introduced CR into the smart grid to improve the communication quality between power suppliers and consumers. Besides, they formulated a sensing-performance tradeoff problem between better control performance and lower system overhead. A wideband hybrid access strategy based on the two-stage power pricing model has been proposed and analyzed in [26] which is aimed at minimizing the system power price by jointly optimizing the sensing time and transmission time. In [27], a multiobjective scheme for spectrum sensing control in a CR-based smart grid has been investigated. An aggregator that serves power suppliers and power consumers has two objectives: maximizing the aggably under tregated benefit of power suppliers and consumers and minimizing the CR system overhead. However, the sensing performance tradeoff problem at low signal-to-noise ratio (SNR) is not revealed in these literatures. In addition, these literatures do not fully consider that CR brings some negative impact while improving communication performance, such as interference to primary user (PU) communication caused by unreliable detection and loss of spectrum resources caused by false alarm detection.
In this paper, we study the DRM control problem in CR enabled smart grid. We focus on improving the control performance of DRM while considering the effect of spectrum sensing time and spectrum sensing accuracy. The main contributions of this paper are as follows.
(i) To improve spectrum utilization and communication reliability, we introduce spectrum sensing and channel switching techniques of CR into the smart grid (ii) We adopt an energy detection algorithm based on generalized stochastic resonance (GSRED) to complete the reliable spectrum sensing at low SNR (iii) We consider the impact of communication performance on power system and assess the impact of communication outage probability on the control performance of DRM (iv) We incorporate the interference of inaccurate spectrum sensing to PU into the system performance evaluation index and consider the influence of spectrum loss caused by false alarm probability (v) We propose a DRM algorithm based on RTP to maximize social welfare and present the global optimal problem of the DRM system with considering the negative impact incurred by unreliable spectrum sensing. In addition, we provide both theoretical analysis and simulation to verify the effectiveness of the proposed algorithm The rest of the paper is organized as follows. The system model is described in Section 2. In Section 3, we briefly review the traditional ED algorithm and analyze how GSRED ensures the spectrum detection accuracy under low SNR. Besides, it is also devoted to detailing how CR improves the communication quality and how to realize DRM based on RTP. In addition, we also derive the expressions of communication outage probability and social welfare in DRM. The corresponding simulation results are given in Section 4, while the conclusions follow in Section 5.
For the sake of convenience, we present a list of the major symbols of this paper in Table 1 with their definitions.

System Model
As shown in Figure 1, we consider a smart grid consisting of a power supplier and power market, K power consumers, and one control unit. All power consumers are assumed to be equipped with smart meters which can transmit power demand d k (where k = 1, 2, ⋯, K) to and receive pricing information from the control unit. Similar to [25], for the same power supplier, we assume power price p is the same for all power consumers. The power supplier adjusts the power supply s according to the pricing information provided by the control unit to achieve the optimal distribution of power resources. Without loss of generality, the cost function of the power supplier indicating the expense of supplying power s by the supplier is denoted by CðsÞ, and let 2 Wireless Communications and Mobile Computing G k ðd k Þ denote the utility function of power consumer k representing the obtained satisfaction with power demand d k . In fact, CðsÞ is increasing and convex, and G k ðd k Þ is nondecreasing and concave [28], and where a, b, and c are constants, w is a system parameter related to power consumer's behavior, and α is a default parameter which is related to the quantity of power demand to reach the saturation point. For the power supplier, under power price p, the profit function is defined as ϕðsÞ = ps − CðsÞ. Obviously, its goal is to regulate the power supply to maximize its own profit. For each power consumer k, the benefit function can be expressed as φ k ðd k Þ = G k ðd k Þ − pd k . Similarly, the aim of power consumers is to maximize their own benefits by adjusting power demand. Considering the level of society, the basic purpose of the proposed scheme is to maximize the benefits of consumers while minimizing the cost of power suppliers. Therefore, the social welfare can be defined as [25]. Under the constraint that the power supply should meet the total power demand, the social welfare is taken as the evaluation index of DRM control performance, and the global optimization problem can be formulated as In real application, both the cost function of power supplier and the utility function of power consumers are private [29]. Therefore, we adopt a distributed and iterative approach to obtain the optimal solution of (3). The detailed steps can be given as follows (i) The initial power price p 1 ≥ 0 is broadcasted to the power supplier and each power consumer by the control unit (ii) The power supplier updates the power supply s * m according to the power price p m (m ∈ ℕ + denotes the number of iterations) in order to maximize its own profit ϕðsÞ. At the same time, each power consumer updates its power demand d * k,m to maximize its own benefit φ k ðd k Þ (iii) The control unit collects local power supply and power demand information and adopts a gradient approach to obtain the next iteration power price p m+1 , i.e., where θ > 0 is the step size which adjusts the convergence rate, and ½x + Δ = max f0, xg.
(i) Repeat the second and third steps until the power price converges In fact, the above process is based on ideal and perfect two-way communication, that is, communication outage is Usually, the control unit is installed on the power supplier side, and we suppose that reliable communication between the control unit and the power supplier can be guaranteed. However, the control unit is far away from the power consumers, and when wireless communication technology is used to transmit power data, packet loss and delay will inevitably occur. We introduce the average communication outage probability ζ to describe the communication performance between the power consumer and the control unit, and ζ is considered to be the same for all power consumers. With considering the impact of communication outage, the next iteration power price can be modified as follows

DRM Based on Cognitive Radio Enabled Smart Grid
In this section, CR is applied to the smart grid to cope with the shortage of spectrum resources and improve communication performance. The spectrum sensing of CR is used to detect the idle channel, and the channel switching is to select the appropriate channel to transfer information. An algorithm is proposed to maximize social welfare under the constraint of spectrum sensing performance. The interference of inaccurate spectrum sensing to PU and the spectrum loss caused by false alarm probability are incorporated into the system performance evaluation index. Besides, the detailed theoretical analysis and formula derivation of our proposed algorithm are presented.

Spectrum Sensing in DRM.
Among all the spectrum sensing algorithms, ED is a blind detection algorithm, which is widely used in spectrum sensing due to its low computational complexity and easy implementation. The principle of energy detector is actually to measure the energy of the received signals and to draw a conclusion by comparing it with a preset decision threshold [30]. However, the traditional ED algorithm is particularly sensitive to noise, and it is difficult to ensure the reliability and stability of spectrum sensing at low SNR. Thus, we adopt the GSRED algorithm to improve the detection performance and detection efficiency at low SNR [31].
In this paper, we assume that the data of smart meter can be transmitted through two different channels: one is from the unlicensed spectrum, noted as the original channel Ch1; the other one belongs to the licensed spectrum, denoted as the cognitive channel Ch2, which is randomly occupied by the PU. This means that the smart meters can opportunistically access the licensed channel which is not occupied by PU. Let H 0 indicate the absence of PU (Ch2 is idle), and H 1 denote the presence of PU (Ch2 is busy), respectively. Let P 0 denote the probability of H 0 , and P 1 be that of H 1 , where P 0 + P 1 = 1.
The GSRED algorithm is to add a certain intensity of DC noise to the received signal to make the noise, useful signal, and interference resonate in the nonlinear system and then use the traditional energy detection algorithm to complete the spectrum sensing, so as to improve the SNR and the detection performance [31]. The implementation block diagram of the GSRED algorithm is shown in Figure 2. It can be seen from Figure 2 that compared with the traditional energy detection algorithm, the GSRED algorithm only adds one processing, that is, adding DC noise to the received With the generalized stochastic resonance energy detector, by integrating the output signal (bandwidth is W) of the stochastic resonance module over sensing time τ, the smart meter compares the detection statistic with a decision threshold λ to determine whether Ch2 is occupied by PU. The detection probability P d indicates that the PU exists and the spectrum detection result is H 1 , while the false alarm probability P f indicates that the spectrum is idle but the detection result is H 0 . The detection accuracy is usually described by P f and P d , then according to [31], we have where QðxÞ = 1/ ffiffiffiffiffi ffi 2π p Ð ∞ x e −t 2 /2 dt, σ 2 n is the variance of additive white Gaussian noise (AWGN), and d is the intensity of the stochastic resonance DC noise. It is assumed that the mean of PU's transmission signal is μ, and the variance is σ 2 s . Spectrum sensing always expects to improve the detection probability and reduce the false alarm probability as much as possible, even at the cost of system overhead, such as increasing sampling points and sensing time to improve the detection accuracy [32].

Cognitive Radio Improves Communication Quality.
Before each smart meter transmits power data, it is necessary to select the transmission channel. In the CR framework of bidirectional communication, spectrum sensing is used to determine whether Ch2 is occupied. If the result of spectrum sensing shows that Ch2 is idle, that is, it is not occupied by the PU, the system uses channel switching technology to switch the transmission channel to Ch2. Otherwise, the transmission of power information is still completed on Ch1. In fact, spectrum perception also has unreliability, which will directly affect the choice of the transmission channel. For example, when the channel is not occupied but the spectrum perception results in busy channel, the system will not switch to Ch2. Similarly, when the channel is occupied but the result of spectrum perception is that the channel is free, the system will choose Ch2 as the transmission channel. Thus, the global channel switching probability can be expressed as Let ζ 1 and ζ 2 denote the communication outage probability of Ch1 and Ch2 (ζ 1 > ζ 2 ), respectively. And the average outage probability of DRM system is where ζ − ζ 1 = ð1 − P sw Þζ 1 + P sw ζ 2 − ζ 1 = P sw ðζ 2 − ζ 1 Þ, and P sw ≥ 0, obviously we have ζ ≤ ζ 1 . This proves that the application of CR technology can effectively reduce the communication outage probability of the DRM system and improve the communication reliability and stability.

DRM Based on Spectrum Sensing and Channel Switching.
Introducing CR technology into the smart grid can realize spectrum-sharing and dynamic spectrum access. Generally, the detection probability of spectrum sensing should not be lower than a certain preset value to restrict the interference to the PU. The false alarm probability should be lower enough to reduce the spectrum sensing and improve the utilization of spectrum resources. In practical application, a minimum detection probabilityP d is preset, and it can be known from (7) that the decision threshold satisfies [33].
where A = ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ðσ 2 n + σ 2 s Þ 2 + 2ðσ 2 n + σ 2 s Þðμ + dÞ 2 q . Substituting (10) into (6), we have When the Ch2 is occupied while the spectrum decision result is H 0 , the access to Ch2 will bring interference to the PU, thus the probability of the DRM system causing interference to PU is

Wireless Communications and Mobile Computing
When the Ch2 is idle while the spectrum decision result is H 1 , the smart meters mistakenly consider that the Ch2 is busy and still transmit data on Ch1 resulting in the idle of Ch2. Hence, the spectrum loss rate is calculated by From (12) and (13), it is not hard to conclude that increasing the sensing time can reduce the interference to PU and reduce the spectrum loss, but also increase the system overhead and delay. Therefore, setting reasonable sensing time to avoid excessive system cost is the main issue of DRM under the condition of meeting the system performance requirements.
Considering that the power supply cannot meet the demand of all power consumers in the smart grid, i.e., s < ∑ K k=1 d k , so it is necessary to purchase part of the electricity in the power market. We assume that the electricity cost function in the power market is C m ðsÞ, and C m ðsÞ = ρ CðsÞ. Then the original optimization problem (3) can be modified to where β = ∑ K k=1 d k − s. Obviously, the goal of the DRM system is to maximize the social welfare of the smart grid while minimizing the interference to PU and spectrum loss rate. In order to evaluate the overall performance of the DRM system more comprehensively, the interference and spectrum loss rate to the primary user are included in the system performance evaluation index. The system  Wireless Communications and Mobile Computing utility related to the overall performance of DRM can be defined as where ε 1 and ε 2 are system parameters to measure the adverse effects of inaccurate spectrum sensing.

Simulation Results and Analysis
To evaluate the distributed and iterative approach of DRM, a simple one-supplier and one-consumer system is considered. In fact, the simulation results can be extended to onesupplier and multiple-consumers scenarios. We use MATLAB® to realize the simulation, and the system parameters are summarized in Table 2 [6,25].
To demonstrate the efficiency of the distributed and iterative algorithm for realizing the tradeoff between power supply and demand, the control performance of DRM under ideal communication is simulated, i.e., ζ = 0. In Figure 3, we set the initial price p 1 = 0 and p 1 = 3, respectively. The results show that even under different initial power price, the power price will converge to a certain value with the increase of iteration times, and the DRM system can achieve the balance of supply and demand. In addition, as the number of iterations increases, the social welfare will gradually increase until it reaches a maximum, at which time the profit of the power supplier and the consumers' benefits do not change.
In order to demonstrate the superiority of the GSRED algorithm at low SNR, we chose the ED algorithm as the comparison algorithm to complete the simulation [34]. In Figure 4, it is evident that the GSRED algorithm has a higher detection probability than the ED under the same conditions, that is, the GSRED algorithm is significantly better than the ED algorithm. In addition, the lower the SNR is, the greater the performance difference between the two. As the SNR increases, the difference in performance between the two will gradually decrease. When the SNR is greater than -8 dB, there is no difference between these two. Figure 5 plots the communication outage probability of these two schemes when the sensing time increases. It is evident that as the sensing time increases, the system outage probability of the two declines continuously. In contrast, the outage probability of the proposed scheme drops rapidly at first and then becomes relatively stable. This observation shows that the GSRED algorithm has lower outage probability than the traditional ED algorithm and can effectively guarantee better communication performance. Figure 6 demonstrates the spectrum loss rate when the sensing time increases. According to the result described by    Wireless Communications and Mobile Computing Figure 6, we can find that the GSRED algorithm can obtain a lower spectrum loss rate and outperforms the ED. When the sensing time is larger than 4 ms, the spectrum loss rate of the GSRED algorithm becomes zero. It is evident that the shortage of spectrum resources problem is reduced effectively by the GSRED algorithm through reducing the spectrum loss rate. Figure 7 shows the relationship between the control performance of DRM and different outage probability. The simulation shows that when the probability of system communication outage is zero, the power supply and demand are balanced and the social welfare is the largest. That is to say, under the ideal communication condition, DRM can realize the balance of power supply and demand and optimize the allocation of power resources. With the increase of outage probability, the gap between power demand and power supply becomes wider, and the relationship between power supply and demand becomes more unbalanced. The increase of outage probability leads to the decline of profit and social welfare of the power supplier and also reduces the welfare of power users. The communication outage probability directly affects the control performance of DRM. Therefore, on the premise of guaranteeing system overhead and delay, it is a core issue to improve communication    Wireless Communications and Mobile Computing performance and optimize power resource allocation as much as possible. Figure 8 shows the variation of DRM control performance with sensing time using the GSRED algorithm. With the increase of sensing time, the price of electricity continues to rise, and the gap between supply and demand is shrinking, which can alleviate the imbalance of power supply and demand. At the same time, as the sensing time increases, the social welfare increases to a specific value, which means that the performance of DRM is improved. However, when the sensing time increases from 6 ms to 8 ms, the gain of the performance of the algorithm is not obvious, which means that the sensing time is no longer the main factor limiting the performance improvement of DRM. Therefore, the sensing time is not always as long as possible. Reasonable setting of sensing time can reduce system delay while avoiding the loss of performance. Figure 9 illustrates the curve of the social welfare and system utility versus sensing time. Obviously, as the sensing time increases, the social welfare and system utility are generally on the rise. When the sensing time is less than 2 ms, the social welfare and system utility grow rapidly with the increase of the sensing time. Conversely, when the sensing time is greater than 2 ms, the growth rate of social welfare and system utility slows down until it reaches a maximum value. Besides, a reasonable set of sensing time can minimize system overhead and delay while ensuring maximum social welfare and system utility.

Conclusion
DRM in the smart grid can promote the balance of power supply and demand and optimize the allocation of power resources. In DRM, a large number of power data transmission requirements lead to a sharp increase in the demand for spectrum resources, while communication quality will affect the system control performance. Therefore, CR is introduced into DRM, and the GSRED algorithm is used to realize spectrum sensing under low SNR to improve communication performance. The influence of sensing time on communication outage probability and the influence of sensing time and outage probability on DRM control performance are analyzed analytically and numerically. Considering the interference to PU and spectrum loss caused by unreliable spectrum sensing, the system utility is used as the final index to measure the system performance. The simulation results show that compared with the ED algorithm, the GSRED algorithm can guarantee lower communication outage probability and spectrum loss rate under the same conditions and can guarantee better system performance of DRM.

Data Availability
The data used to support the findings of this study are included within the article.

Disclosure
This work was presented in part at the 2019 IEEE International Conference on Communication Technology Workshops (ICCT Workshops).

Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.