Economic Optimization of Electricity Generation and Sales in Microgrid System Based on PSO

In this paper, particle swarm optimization (PSO) is introduced to carry out economic optimization under the microgrid system, and the optimization dispatching problem of the microgrid system [1] is studied. Utilize the role of battery charging and discharging and power exchange of large power grids, with the goal of minimizing the cost of load power supply, and establishing the constraints of distributed power sources [2]. A mathematical model is established for the optimal scheduling problem under the microgrid system composed of wind, solar and storage batteries, and the PSO algorithm is used to solve the model, and the optimized power supply composition and operating cost are obtained, and an optimized scheduling scheme is given.


Introduction
With the development of today's society, traditional power systems can no longer meet the needs of the times. A variety of energy sources are connected to the power system to form an energy interconnected smart energy system. The micro-grid system based on distributed clean energy has received widespread attention. With the introduction of the concept of sustainable development and the increasing demand for energy by human beings, as a complete power system, microgrid has entered a rapid development stage with its characteristics of self-control, protection and management ( [3], [4]), and it is also an important manifestation of smart grid deployment. The microgrid can freely switch to and from the large power grid, which improves the economy and flexibility of the power grid system [5]. Especially in the operation of the microgrid, due to the instability and uncontrollability of wind and light, the configuration of an energy storage unit of appropriate size and the microgrid system can effectively improve the safety, reliability and economy of the microgrid. Economic optimization dispatch is an effective method to solve the optimization of grid operation cost, and it is of great significance to realize the economic efficiency of distributed power operation cost under the microgrid system [6].

System Architecture
This paper uses the microgrid system model shown in the figure below [8]. The microgrid system includes photovoltaic (Photovoltaic Cell, PV), wind turbine (Wind Turbine, WT) and other clean and uncontrollable power generation units, storage battery (SB), and conventional loads.
Among them, WT F is the total cost of wind power generation, PV F is the total cost of photovoltaic power generation, PG F is the total cost of power purchase by the grid, SB F is the total cost of storage batteries, and SELL F is the cost of electricity sales. Decomposing the above formula, the objective function is obtained as: Among them, WT P is the wind turbine power generation power, PV P is the photovoltaic power generation power, PG P is the grid power, LOAD P is the load power, 1 p is the total cost of wind turbine power generation, 2 p is the total cost of photovoltaic power generation, 3 p is the total power purchase cost of the grid, and 4 p is the power grid purchase. The total cost of electricity, 5 p is the charge and discharge cost of the battery, t X and t Y respectively represent the charge and discharge state,

PSO Algorithm
About PSO, the solution of each optimization ([12], [13]) problem is regarded as a bird (particle) in the search space. All particles have a fitness value determined by the optimized function and a speed that determines the direction and speed of their flight. We follow the current optimal particle to search in the solution space. The algorithm first initializes a group of random particles, and iterates continuously to find the optimal solution in the group. During each iteration of the particle, the speed and position of the individual extreme value and the global extreme value are continuously replaced and updated. Suppose that in a D-dimensional target search space, the initial number of particle swarms is m, where the position of the ℎ particle in the ℎ dimension is , the flying speed is , The current optimal position searched by the particle is (PBest), and the current optimal position of the entire particle swarm is (PBest). The speed and position update formula are as follows [14]: In the formula, is the inertia weight factor, () is any random number of [0,1], and 1 and 2 are acceleration factors. The speed of particle movement is limited to min max ( , ) vv .

Find the Optimal Solution Based on PSO
Particle swarm algorithm is a heuristic random optimization algorithm. Each particle searches for its own optimal particle and global optimal position, and there are random factors when chasing. In this random search process of particle swarm algorithm, the particles will eventually converge to the optimal particle of the group [15]. The algorithm implementation steps are as follows: Step1: Bring in the initial data of the microgrid, battery SOC and the transmission power between the microgrid and the main grid to form a search matrix; Step2: Based on the generation power of each distributed power source in the microgrid and the charging and discharging strategy of the battery, multiple constraints such as power supply, battery, and power balance are adjusted; Step3: After adjusting the basic constraint conditions of power discharge, the fitness is calculated. The fitness function selected in this paper is the load power supply cost F; Step4: Update particle speed and position, and perform crossover and mutation operations; Step5: Repeat Step2, Step3, Step4 until the convergence condition or the preset number of iterations is reached; Step6: According to the above calculation, the optimal load power supply composition of one day's economy is obtained.

Result Analysis
Taking the microgrid system shown in Figure 1 as a model, it is assumed that the power supply meets the following conditions: As shown in the figure below: Figure 2 and Figure 3 are the optimized fitness iteration process and the optimized power supply configuration under constraints. It can be seen from the figure that the economic cost is significantly reduced after optimization.    On the premise of the objective function of the lowest operating cost, the power supply structure of the microgrid system is optimized to obtain the economically optimal system power supply plan. Through comparison, it can be found that optimizing load cost by using PSO algorithm can reduce the operating cost of microgrid and give full play to the economics of microgrid operation.

Conclusion
The economic optimization dispatch of microgrid is an important aspect in the development of microgrid, and the distributed power generation under the microgrid system also faces many non-linear problems. Using PSO algorithm to solve linear or non-linear optimization problems is an effective method. By establishing the objective function and using the PSO algorithm to find the optimal value of the function, the optimal economical scheme of load power supply under the microgrid system is realized. Through comparative analysis, the feasibility of the economic dispatch of the PSO algorithm is confirmed.

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