Economic Loss of Optimal Configuration of Smart Energy System under Attack

The data attack in smart grid may cause the control center to make a wrong judgment, and then interfere with the normal operation of the power grid. In the case of data attack, this paper studies the optimal allocation model of distributed energy in smart energy system. Taking the maximum net profit of microgrid system as the objective function, the constraint conditions are established by using battery charging and discharging and power exchange of large power grid to optimize the allocation of distributed energy in the system. According to the characteristics of its power load, the corresponding dispatching strategy is formulated, and the genetic algorithm is introduced to find the optimal solution of the model. The power supply composition and economic loss before and after the optimization and attack are obtained, which proves the importance of attack detection.


Introduction
In today's highly developed society and the popularization of high technology, the demand for electric energy is growing. The rapid development of energy system is facing new challenges [1]. A variety of energy sources are connected to the power system to form an energy interconnected intelligent energy system. The micro grid system based on distributed energy has been widely concerned [2]. As a complete power system, microgrid has entered a rapid development stage with its characteristics of automatic control, protection and management, and is also an important embodiment of smart grid deployment [3,4]. Microgrid can freely switch to and from large power grid, which improves the economy and flexibility of power grid system [5]. Smart energy will promote the deep fission of energy revolution. Distributed system is the main construction mode of smart energy. Distributed energy system is a new energy supply mode based on the user side, which can effectively realize the cascade utilization of energy and improve the efficiency of energy utilization. Economic optimal dispatch is an effective method to solve the optimization of grid operation cost, and it is of great significance to realize the economy of distributed power operation cost in microgrid system [6].
Smart grid is a new generation of distribution network [7], which can achieve high adaptability, scalability, security, economy, self-healing, robustness and protection in a highly dynamic system. The advantage of Internet-based smart grid lies in the comprehensive interconnection, interoperability and interoperability of equipment in the system to realize the comprehensive perception, data integration and intelligent application of distribution network [3]. Meet the outstanding needs of power system management, support the rapid development of energy Internet, and realize the intelligent allocation of power resources [9][10][11]. As the next generation power system, advanced digital information and communication technology is usually adopted to realize on-line monitoring and real-time information mastering of important operation parameters in all links of power grid. On this basis, Internet of things technology and big data analysis are integrated to realize more environmental protection, safety and efficient power management [12]. In the power generation side, due to the lack of large amount of energy storage, the control center needs to closely monitor the power grid operation parameters to control the balance between power generation and power consumption in the power grid. On the power grid side, the system also needs to estimate the operation state of the system, and formulate the generation scheme according to the algorithm to realize the optimal economic dispatch [13]. Therefore, a large number of information control equipment and communication sensor networks are needed to access the power grid, and the measured values of each node are sent to the control center in real time to ensure the efficient, economic and reliable operation of the power system Smart grid is faced with potential network attack risk [14]. By tampering with the measurement data, the state estimation of power system is inaccurate, which further interferes with the decision-making of the control center to disrupt the normal order of the power market, and there are significant economic and security risks [15].
In order to verify the importance of attack detection, this paper introduces data attack into smart energy system based on wind power and photovoltaic power generation units. Firstly, the optimal allocation model of distributed energy is proposed. The objective function is to maximize the total economic benefit of the system, and the balance of generation, storage, consumption and sale of electricity in the microgrid is taken as the constraint condition. Secondly, according to the load characteristics of power consumption, the corresponding price strategy and appropriate dispatching strategy are formulated, and the economic optimization is carried out by using genetic algorithm After the economic benefits, get the economic losses caused by the attack.

Model Structure
Previous studies mostly focus on independent microgrid, and lack of exploration on energy management of wind, photovoltaic and storage distributed generation system [16]. Therefore, as shown in Figure 1, based on the intelligent energy system including wind and photovoltaic power generation units, energy storage converters, load and Microgrid control center, this paper establishes a grid connected microgrid capacity optimization configuration model with data attack.

Objective Function
Based on the analysis of the optimal allocation model of energy storage, this paper establishes a function optimization model aiming at maximizing the total economic benefit, and compares it with the optimal economic benefit in the presence of attacks: In the above formula,

Scheduling Strategy
Through the operation mode and output of the energy supply equipment in the dispatching area, the daily operation cost of the system can be reduced and the optimal emissions in the region can be maintained. This paper adopts day ahead economic dispatch optimization.
At time t , () Pt  is the unbalanced power of the system when the energy storage battery is not put into operation and does not interact with the large power grid. When ( ) 0 Pt  , it indicates that the capacity of microgrid system can meet its own demand, and the consumers will sell the remaining energy to other energy deficient subjects as much as possible. When ( ) 0 Pt  , it indicates that the capacity of microgrid system can not meet its own internal energy consumption, and the producer and consumer do not have the energy supply capacity, so they purchase the required energy from other subjects as consumers.

Algorithm Flow
Traditional application algorithms may lead to the lack of global convergence and optimization ability in microgrid energy management applications. With the rapid development of machine learning technology and deep learning technology, a large number of machine learning technology and deep learning technology have been applied to power system, and achieved good results [17][18][19].
Genetic algorithm simplifies the complex genetic process and abstracts a set of mathematical model. It uses a relatively simple coding method to express the complex phenomenon, and realizes the heuristic search of the complex search space through the simplified genetic process. Finally, it can find the global optimal solution under a large probability.
The steps of using GA algorithm to find the optimal solution are as follows: (1) The initial data of each distributed unit in the microgrid is put into different individuals to form the population chromosome matrix, (2) Based on the objective function and charge discharge strategy, the power balance of each distributed generation is adjusted; (3) The fitness of population was calculated and evaluated, chromosome coding was set, the number of individuals and iteration times were updated, the population was selected, recombined and mutated, and the optimal individual was retained to generate a new generation of population; (4) Repeat the last step until the convergence condition or the preset iteration is reached; (5) Finally, through the above calculation, the optimal economic benefits of each time of a day can be obtained. In this paper, the power generation situation on June 4, 2020 is selected as an example, and the maximum total economic benefit of the system operation is taken as the objective function. Combined with the parameters provided in Table 1, the genetic algorithm is introduced to obtain the optimal solution. In the genetic algorithm, the population number is set as 100, the maximum genetic algebra is 500, and the random sampling is adopted. The crossover probability is 0.7 and the mutation probability is 1. The optimal economic benefit is obtained.

Example Analysis
When the traditional dispatching strategy is adopted, the economic situation of power generation is the first column chart as shown in Figure 2. The capacity configuration of the new grid connected microgrid is calculated by using genetic algorithm and operation strategy, and the result is the third column chart.
When there is data attack, the second and fourth column graphs show the economic benefits of traditional scheduling strategy and GA optimization respectively. It can be seen from the figure that the economic benefits after optimization have been significantly improved, but the data of the first column and the second column, and the third and fourth column are close, so the economic difference before and after the attack is not obvious. Therefore, the economic benefits of no attack and data attack before and after optimization of the algorithm are compared respectively, and     Figure 4. Economic difference after algorithm optimization and attack.
According to figures 3 and 4, it can be found that the economic benefits of the system are in a loss state compared with before the attack when 4-13 attacks occur. If GA algorithm is introduced to improve the economic benefits of the system, although the economic benefits are greatly improved compared with those before optimization, the economic benefits of the system after optimization are more than those without attack, and they are always in a loss state, causing significant losses to the power system Lost. The experimental results show that the existence of the attack misleads the control center, affects the important decision-making of the power grid, and causes serious economic losses to the power grid.

Conclusions
In order to verify the importance of attack detection and study the harm of attack to power grid, this paper introduces attack into the optimal configuration of distributed energy in smart energy system, establishes a friendly grid connected wind solar storage optimal configuration model, and puts forward corresponding control strategy aiming at the total economic benefit of the system. Considering the operation constraints in the microgrid, the GA algorithm is used to realize the optimization. The optimal economic benefits under various conditions are obtained by configuration solution, and the economic comparison is made. The experimental results show that the existence of attacks will bring economic losses to the power grid. After optimization of the algorithm, the economic impact on the microgrid is greater and the loss is more. Therefore, attack detection is very important for smart grid.

Acknowledgments
This work is supported by the National major R & D program (No. 2018YFB0904900, 2018YFB0904905).