Optimal power flow calculation method for regional integrated energy system based on double-layer optimization

In this paper, a two-layer optimization calculation method is proposed to improve the practical application efficiency of the integrated energy system and to improve the different problems of power flow calculation. Firstly, the power flow model is constructed and the optimization function is established based on indicators such as economy and environmental protection. The two-layer optimization method is proposed by combining the quadratic programming method and the particle swarm algorithm. Then, the obtained operating conditions of each energy equipment are used as the input of the power flow. The processing of each device and the energy flow of the power flow network are calculated and the effectiveness of the algorithm is verified by MATLAB power analysis.


Introduction
The development of technologies has deepened the coupling between various energy sources.Moreover, the efficient and practical analysis has very important practical significance for the planning and comprehensive evaluation of the system [1].
At present, the research on optimal scheduling of multi-energy systems mostly focuses on electricthermal or electric-gas coupled systems.The factors considered are not comprehensive.In [2], the cost of equipment depreciation, electricity sales and cooling/heating benefits are considered.In [3], an electrothermal IES operation optimization model is built for the radial structure heat network.In [4], a refined steady-state energy flow calculation model is built for the heat network.Both papers use the interior point method to optimize the electro-thermal coupled IES.The energy flow model is solved.In [5], a regional electric heating system model is established under the quantity regulation mode and transformed the joint optimal power flow optimization model with concave-convex programming form into a second-order cone programming problem for sequential solution.In [6], a preliminary study is made on the coordinated operation.Based on solving the IES of the district electric heating gas, the economical optimal goal is set with reasonable operating constraints.The energy flow of the established model is optimized.A unified solution model of an integrated energy system is established.The static of the entire system is considered for the thermal/electrical coupled system, as well as the economy and photovoltaic capacity.The greedy mutation strategy is used to improve and optimize the SQP algorithm to carry out comprehensive energy economic dispatch, which can ensure convergence.However, the algorithm is relatively complex, which is not conducive to engineering practice.

Integrated Energy System Model
The integrated energy system includes a power system, a thermal system and coupling elements.As shown in Figure 1, wind power, photovoltaics and gas turbines are connected to the electric grid and connected to the large grid.Gas turbines and electric boilers are connected to the heat source as heat sources.The gas source is connected to the gas grid.The coupling elements include electric boilers, gas turbines and gas boilers.

The establishment of the objective function
When the system is running normally, the electricity-gas-heat combined power supply system and the operating cost include the large electric grid.The cost of purchasing gas from the gas network is: Environmental benefits mainly refer to carbon emissions, including carbon emissions from gas turbines and carbon emissions converted from power grid purchases.The total carbon emissions of the system in a certain period is: 2 () where E W is the carbon emissions per unit and grid W is the carbon emissions converted from the grid power purchase unit power.

Restrictions
(1) Power Balance Constraint Gas turbine, wind turbine, photovoltaic and grid-injected power equal to the electrical power consumed by the load.
() E is the total power consumption of the user, H is the network loss.(2) Photovoltaic and fan operation constraints Fans are output at constant power and photovoltaic units are output at maximum power.
where DNI is the direct radiation intensity of sunlight, A is the area of the collector, L is the number of collectors, g  is the scene distribution efficiency and opt  is the photovoltaic efficiency of the collector, which is taken as 0.9.

Two-tier optimization algorithm
The objective function and constraint conditions calculation have many variables, if the overall optimization is directly carried out.Therefore, the idea of hierarchical optimization is selected.SQP and PSO methods are used for optimization.PSO has strong global search ability, but the local search near the extreme point is slow and it cannot converge to the optimal power in the global scope.SQP has higher reliability, fast convergence speed and high convergence accuracy.The iterative result of PSO is used as the initial value of SQP to optimize, which greatly reduces the search complexity.
PSO is a random optimization algorithm with strong random searchability.It consists of m particles.Each particle can be used as the current solution.In the D-dimensional space, before each particle moves, the previous optimal position is compared, taking the judgment of the direction.After knowing that all particles are located at the same point, the optimal solution is obtained currently.is the global learning factor, and gd p is the optimal position of all particles so far.

Optimal power flow algorithm
The optimal power rests with the operating conditions of each energy equipment obtained by the doublelayer optimization algorithm.The power flow calculation is performed by the Newton-Raphson method.Specific steps are as follows: Step 1: All random variables are initialized.Parameters such as inertia weight, population size, selflearning factor, particle dimension, etc. in the PSO algorithm are set.
Step 2: The optimal position, current position and velocity of all particles are calculated to obtain the optimal population fitness.
Step 3: The optimal position obtained in the previous step is the most input quantity and is brought into the SQP algorithm to run the SQP algorithm.
Step 4: Whether it converges the upper limit is determined.If so, the calculation ends, otherwise, return to step 2.
Step 5: Taking the result obtained in the previous step as a known quantity, the Newton-Raphson algorithm is used to calculate.
The data of a traditional regional integrated energy system is an example where the power of the individual energy equipment is shown in Taking the 24-hour load of the comprehensive energy system in this region as an example, the simulation calculation is carried out.The cooling, heating and electric load curves of one working day are shown in Figure 2, ignoring the sale of electricity to the grid.The initial value of the PSO is set to 3.5.The maximum number of iterations is 100.The particle population is set to 50.The inertia weight decreases linearly to 1 with the number of iterations.According to the built model, the particle dimension is taken as 16 according to 16 random variables except the network loss.Figure 3 shows the equipment on this working day.Fans and photovoltaics are in full power on this working day, which can best reflect the characteristics of high-efficiency, low-carbon and clean energy.

Conclusion
This paper focuses on the optimal power of double-layer optimization.The advantage of using the double-layer optimization structure is that it can reduce the constraints of unopened equipment during actual calculation, reduce the calculation amount of a single network power flow calculation and speed up the calculation of the overall convergence rate of the coupled network.The method has strong operability and practical application value.

Figure 1 .
Figure 1.Schematic diagram of integrated energy system.

V
amount of active and reactive power of the i P and i Q are the active and reactive components of node i , are the voltage amplitudes of node i and node j , ij G and ij B are the conductance and susceptance of the branch, ij  is the voltage phase angle difference.

C
are the electricity purchase price and the gas price at the gas source k , e P is the purchase of electricity, gk G is the gas supply at the gas source k and gs N is the collection of gas source points.

Figure 2 .
Figure 2. Electricity, gas and heat load curves of a certain day.

Figure 3 .
Figure 3.The output power of the power generation equipment on a certain day. ) id vt are the current position and speed of the particle,  is the inertia weight, 2 c