# Optimal Power Flow Algorithm Based on Second-Order Cone Relaxation Method for Electricity-Gas Integrated Energy Microgrid

Authors: Fan Zhang; Zhuzheng Shen; Wen Xu; Guofeng Wang; Biyi Yi
Journal: Complexity
 (2021)

---

## Abstract

Due to the existence of nonlinear constraints, it is difficult to solve the power flow directly. This paper proposes a microgrid optimal scheduling strategy using second-order cone relaxation method to realize linear transformation, so as to minimize the total cost of the microgrid. Firstly, a microgrid system model of electricity-gas integrated energy is established, and the nonlinear constraints of branch power flow are transformed by the second-order cone relaxation method. Then, based on the microgrid model, the application conditions of the second-order cone relaxation transformation method are studied, and the optimal scheduling strategy with the total cost of microgrid as the objective function is proposed. In addition, in the case that the microgrid system does not meet the application conditions of second-order cone programming, the optimization problem is solved by increasing the line loss. Finally, an example is given to verify the effectiveness of the proposed method.


---

## Body

## 1. Introduction

In recent years, with the rapid development of the global economy, the energy demand has become larger, which leads to the rapid depletion of fossil fuels and the increasing global environmental pollution [1, 2]. As a small system including distributed energy, energy storage system, thermal and electrical load, protection, and monitoring devices, microgrid will play an important role in the future energy network. It can give full play to the economic and environmental benefits of distributed generation and has great social and economic significance. At the same time, it is also of great significance for maintaining system stability, improving the efficiency of energy management and environmental protection [3, 4], so the research on microgrid system is increasingly important.Nowadays, most of the researches focus on the structure and algorithm of microgrid. In the aspect of microgrid structure, it mainly involves the types and coupling relationships of various energy sources in microgrid. Related researches include the establishment of combined cooling heating and power (CCHP) system model based on electricity cooling heating structure [5]. Considering the coupling relationship between wind turbine and photovoltaic, an integrated energy microgrid optimization model is established [6]. In addition, energy storage system plays an important role in energy storage optimization because of its advantages of flexible regulation, so the research on microgrid including energy storage system is also very extensive. In reference [7], an analogue energy storage model is proposed to represent the time-dependency characteristics of energy transfer processes. In reference [8], the microgrid consists a rooftop photovoltaic (PV) system, a battery energy storage system (BESS), an ice-thermal energy storage system (ice-TESS), and loads. On the basis of the above, hydrogen energy, as a clean energy, is more and more widely used in microgrid systems. The integrated energy system dominated by hydrogen energy provides the direction for the future development of integrated energy system [9]. There are some researches on the optimization algorithm of micro network. The common methods are to minimize the total cost of the system and to solve the problem by using mixed-integer programming method [10]. In order to meet the needs of new energy sources, an approximate dynamic programming algorithm is proposed to better meet the daily scheduling demand of the independent microgrid with the new power generation as the main power source [11]. For specific micro networks, particle swarm optimization and artificial swarm optimization are introduced to solve the problem of optimal scheduling of micro networks [12–14]. Nowadays, stochastic optimization technology [15] and bilevel optimization technology [16, 17] are more and more common in the selection of optimization algorithm because of their practicability. In addition, the traditional centralized optimization scheduling method is difficult to fully reflect the interest demands of different agents in the integrated energy microgrid, and the application of artificial intelligence technology in integrated energy scheduling needs to be further explored. Artificial intelligence algorithm is becoming a new research direction [18, 19]. In the related research, adaptive neural network is introduced in reference [20]. The main contribution of this paper is the design and the validation of an innovative online-trained artificial neural network-based control system for a hybrid microgrid.When modeling microgrid system, because of the existence of nonlinear constrains of microgrid power flow, linear transformation is needed. In the past, the linearization method has been widely used in solving nonlinear optimal scheduling problems due to its advantages of simplicity [21–23]. However, these methods still have obvious shortcomings in solving nonlinear models, such as slow solving speed, easy to fall into local optimum, and being unable to guarantee global optimum. These problems urge researchers to explore more effective solving algorithms to meet the requirements of global optimum and fast solving speed. The second-order cone relaxation method is proposed due to its advantages of high efficiency and comprehensive solution. The second-order cone relaxation method is mostly applied to the linear transformation of power flow constraints in distribution networks [24–26]. In order to solve the problem of integrated energy system, an improved second-order cone relaxation method was proposed in reference [27]. A second-order cone programming (SOCP) method is utilized to solve the optimization problem, which is actually a mixed-integer nonconvex and nonlinear programming issue. Reference [28] presents an alternative mixed-integer nonlinear programming formulation of the reactive optimal power flow (ROPF) problem and utilizes a mixed-integer second-order cone programming (MISOCP) based approach to find global optimal solutions of the proposed ROPF problem formulation.The internal grid structure of microgrid is very close to the distribution network in the actual power system, and in the steady-state operation, they are mostly radial network operation [29], so the research results of the second-order cone relaxation method in the distribution network are also applicable to the microgrid system with similar structure. In this paper, the nonlinear power flow constraints in microgrid model are linearly transformed by using the second-order cone relaxation method, and the second-order cone program (SOCP) is obtained. Based on the microgrid model, the application conditions of the second-order cone relaxation method are discussed; at the same time, the problem solving of microgrid model without meeting the application conditions of SOCP is studied, and the method to solve the problem by increasing the line loss is proposed; finally, an example is given to verify the effectiveness and accuracy of the proposed method.


## 2. Scheduling Model of Integrated Energy Microgrid

The microgrid model established in this paper is an electricity-gas integrated energy microgrid system considering hydrogen energy, natural gas, and hybrid energy storage, and its structure diagram is shown in Figure1.Figure 1
Structure of electricity-gas integrated energy microgrid.


### 2.1. Objective Function

In this paper, the optimization objective of microgrid system operation is the lowest comprehensive operation cost, which includes system operation cost and environmental cost. From the point of view of the whole microgrid system, hydrogen energy is consumed inside the microgrid system and is not exchanged with the outside. Only electricity and natural gas are exchanged with the outside. Therefore, the operation cost of the whole microgrid system consists of electricity exchange cost between the microgrid and the main network and energy exchange cost with natural gas. At the same time, we also hope that the energy loss of the system during energy conversion is as small as possible, so the energy loss penalty cost should be added to the system operation cost to control the energy loss. The time step is set toΔt. The scheduling time is T.


#### 2.1.1. System Operation Cost

(1)f1=f11+f12+f13.(1)
Cost and benefit of energy exchange between microgrid and main grid.In (1), f11 is the cost and benefit of energy exchange between microgrid system and main network, expressed as(2)f11=∑t=1TΔtCe1PinE−Ce2PoutE,whereCe1 is the time of use price of microgrid purchasing electricity through the main grid, while Ce2 is the time of use price of electricity from microgrid to main grid, PinE is the active power of microgrid purchasing power through main grid in t period, and PoutE is the active power of the microgrid selling electricity to the main grid in t period.(2)
Energy exchange cost and benefit of microgrid and natural gas network.In (1), f12 is the cost and benefit of purchasing and selling natural gas from the microgrid to the natural gas network, expressed as(3)f12=∑t=1TCg1PinG−Cg2PoutGΔtH,whereCg1 is the purchase price of natural gas, Cg2 is the selling price of natural gas, PinG represents the CH4 power purchased by the microgrid from the gas network in t period, PoutG represents the CH4 power sold by the microgrid in t period, and H is the high calorific value of natural gas.(3)
Penalty cost of energy loss in system operation.In (1), f13 is the penalty cost of energy loss in microgrid system operation, expressed as(4)f13=KLossfLossEL+fLossFC+fLossH2G+fLossMT,whereKLoss is the weight coefficient, which indicates the importance of the system for energy loss 0≤KLoss≤1; fLossEL, fLossFC, fLossH2G, and fLossMT represent the energy loss of electrolyzer, fuel cell, hydrogen to gas device, and micro gas turbine (MT) in energy conversion.


#### 2.1.2. Environmental Cost

In order to simplify the treatment, the conversion of various forms of energy in this microgrid system is considered not to produce harmful gases, so the environmental cost is mainly composed of CO2 emissions. The expression of environmental cost is as follows:(5)f2=ρCO2GPtG+ρCO2MT∑t=1T∑i=1NMTPi,tMT−ρCO2CH4∑t=1T∑i=1NH2GPi,tH2G,where ρCO2G is the average CO2 emission coefficient per unit power supply of the regional power grid, ρCO2MT is the CO2 emission coefficient of MT power generation, and ρCO2CH4 is the CO2 capture coefficient of CH4.


#### 2.1.3. Comprehensive Operation Cost

Combined with the above mathematical expressions, the objective function of comprehensive operation cost considering economy and environmental protection is as follows:(6)f=ω1f1f1max+ω2f2f2max,ω1+ω2=1,0≤ω1,ω2≤1,where f1max and f2max are the maximum operating cost and the maximum environmental cost of the micro network system and ω1 and ω2 are the respective weight coefficients of the system operation cost and environmental cost. In this paper, the multiobjective optimization problem is transformed into a single-objective optimization problem by giving different weight coefficients to the system operation cost and environmental cost according to the degree of attention.


### 2.2. Power Flow Constraints of Microgrid

Because this paper focuses on the application of second-order cone relaxation method in solving microgrid power flow, only the microgrid power flow constraints are listed here, and the constraints in other microgrid systems, such as gas grid power flow constraints, output constraints of various energy conversion devices, and energy storage device constraints, are not discussed here. The basic model of microgrid power flow is as follows:(7)pj=∑k∈δjPjk−∑i∈πjPij−Iij2rij+gjVj2,∀j∈B,qj=∑k∈δjQjk−∑i∈πjQij−Iij2xij+bjVj2,∀j∈B,(8)Vj2=Vi2−2Pijrij+Qijxij+Iij2rij2+xij2,∀ij∈E,(9)Iij2=Pij2+Qij2Vi2,∀ij∈E,(10)I¯ij≤Iij≤I¯ij,∀ij∈E,(11)V¯j≤Vj≤V¯j,∀j∈B+,(12)pj∈Rjpqj∈Rjq,∀j∈B.In (7)–(12), branch impedance rij, xij, node admittance gj, and bj are constant. Because the internal voltage level of microgrid system is 400 V (as shown in Figure 2), the influence of admittance gj and bj on microgrid power flow is very small. For simple calculation, gjVj2 and bjVj2 in (7) can be ignored. Node voltage V, branch current I, branch power flow P-Q, and node injection power p-q are optimization variables, which are obviously nonlinear. This nonlinear constraint condition will be transformed by the second-order cone relaxation method in Section 3. Equations (7)–(11) are the common constraint equation of general power flow; equation (12) is the unique constraint condition of each microgrid system, which is determined by its own power load, micro source, and other internal structures of the microgrid.Figure 2
Structure diagram of microgrid system.


## 2.1. Objective Function

In this paper, the optimization objective of microgrid system operation is the lowest comprehensive operation cost, which includes system operation cost and environmental cost. From the point of view of the whole microgrid system, hydrogen energy is consumed inside the microgrid system and is not exchanged with the outside. Only electricity and natural gas are exchanged with the outside. Therefore, the operation cost of the whole microgrid system consists of electricity exchange cost between the microgrid and the main network and energy exchange cost with natural gas. At the same time, we also hope that the energy loss of the system during energy conversion is as small as possible, so the energy loss penalty cost should be added to the system operation cost to control the energy loss. The time step is set toΔt. The scheduling time is T.


### 2.1.1. System Operation Cost

(1)f1=f11+f12+f13.(1)
Cost and benefit of energy exchange between microgrid and main grid.In (1), f11 is the cost and benefit of energy exchange between microgrid system and main network, expressed as(2)f11=∑t=1TΔtCe1PinE−Ce2PoutE,whereCe1 is the time of use price of microgrid purchasing electricity through the main grid, while Ce2 is the time of use price of electricity from microgrid to main grid, PinE is the active power of microgrid purchasing power through main grid in t period, and PoutE is the active power of the microgrid selling electricity to the main grid in t period.(2)
Energy exchange cost and benefit of microgrid and natural gas network.In (1), f12 is the cost and benefit of purchasing and selling natural gas from the microgrid to the natural gas network, expressed as(3)f12=∑t=1TCg1PinG−Cg2PoutGΔtH,whereCg1 is the purchase price of natural gas, Cg2 is the selling price of natural gas, PinG represents the CH4 power purchased by the microgrid from the gas network in t period, PoutG represents the CH4 power sold by the microgrid in t period, and H is the high calorific value of natural gas.(3)
Penalty cost of energy loss in system operation.In (1), f13 is the penalty cost of energy loss in microgrid system operation, expressed as(4)f13=KLossfLossEL+fLossFC+fLossH2G+fLossMT,whereKLoss is the weight coefficient, which indicates the importance of the system for energy loss 0≤KLoss≤1; fLossEL, fLossFC, fLossH2G, and fLossMT represent the energy loss of electrolyzer, fuel cell, hydrogen to gas device, and micro gas turbine (MT) in energy conversion.


### 2.1.2. Environmental Cost

In order to simplify the treatment, the conversion of various forms of energy in this microgrid system is considered not to produce harmful gases, so the environmental cost is mainly composed of CO2 emissions. The expression of environmental cost is as follows:(5)f2=ρCO2GPtG+ρCO2MT∑t=1T∑i=1NMTPi,tMT−ρCO2CH4∑t=1T∑i=1NH2GPi,tH2G,where ρCO2G is the average CO2 emission coefficient per unit power supply of the regional power grid, ρCO2MT is the CO2 emission coefficient of MT power generation, and ρCO2CH4 is the CO2 capture coefficient of CH4.


### 2.1.3. Comprehensive Operation Cost

Combined with the above mathematical expressions, the objective function of comprehensive operation cost considering economy and environmental protection is as follows:(6)f=ω1f1f1max+ω2f2f2max,ω1+ω2=1,0≤ω1,ω2≤1,where f1max and f2max are the maximum operating cost and the maximum environmental cost of the micro network system and ω1 and ω2 are the respective weight coefficients of the system operation cost and environmental cost. In this paper, the multiobjective optimization problem is transformed into a single-objective optimization problem by giving different weight coefficients to the system operation cost and environmental cost according to the degree of attention.


## 2.1.1. System Operation Cost

(1)f1=f11+f12+f13.(1)
Cost and benefit of energy exchange between microgrid and main grid.In (1), f11 is the cost and benefit of energy exchange between microgrid system and main network, expressed as(2)f11=∑t=1TΔtCe1PinE−Ce2PoutE,whereCe1 is the time of use price of microgrid purchasing electricity through the main grid, while Ce2 is the time of use price of electricity from microgrid to main grid, PinE is the active power of microgrid purchasing power through main grid in t period, and PoutE is the active power of the microgrid selling electricity to the main grid in t period.(2)
Energy exchange cost and benefit of microgrid and natural gas network.In (1), f12 is the cost and benefit of purchasing and selling natural gas from the microgrid to the natural gas network, expressed as(3)f12=∑t=1TCg1PinG−Cg2PoutGΔtH,whereCg1 is the purchase price of natural gas, Cg2 is the selling price of natural gas, PinG represents the CH4 power purchased by the microgrid from the gas network in t period, PoutG represents the CH4 power sold by the microgrid in t period, and H is the high calorific value of natural gas.(3)
Penalty cost of energy loss in system operation.In (1), f13 is the penalty cost of energy loss in microgrid system operation, expressed as(4)f13=KLossfLossEL+fLossFC+fLossH2G+fLossMT,whereKLoss is the weight coefficient, which indicates the importance of the system for energy loss 0≤KLoss≤1; fLossEL, fLossFC, fLossH2G, and fLossMT represent the energy loss of electrolyzer, fuel cell, hydrogen to gas device, and micro gas turbine (MT) in energy conversion.


## 2.1.2. Environmental Cost

In order to simplify the treatment, the conversion of various forms of energy in this microgrid system is considered not to produce harmful gases, so the environmental cost is mainly composed of CO2 emissions. The expression of environmental cost is as follows:(5)f2=ρCO2GPtG+ρCO2MT∑t=1T∑i=1NMTPi,tMT−ρCO2CH4∑t=1T∑i=1NH2GPi,tH2G,where ρCO2G is the average CO2 emission coefficient per unit power supply of the regional power grid, ρCO2MT is the CO2 emission coefficient of MT power generation, and ρCO2CH4 is the CO2 capture coefficient of CH4.


## 2.1.3. Comprehensive Operation Cost

Combined with the above mathematical expressions, the objective function of comprehensive operation cost considering economy and environmental protection is as follows:(6)f=ω1f1f1max+ω2f2f2max,ω1+ω2=1,0≤ω1,ω2≤1,where f1max and f2max are the maximum operating cost and the maximum environmental cost of the micro network system and ω1 and ω2 are the respective weight coefficients of the system operation cost and environmental cost. In this paper, the multiobjective optimization problem is transformed into a single-objective optimization problem by giving different weight coefficients to the system operation cost and environmental cost according to the degree of attention.


## 2.2. Power Flow Constraints of Microgrid

Because this paper focuses on the application of second-order cone relaxation method in solving microgrid power flow, only the microgrid power flow constraints are listed here, and the constraints in other microgrid systems, such as gas grid power flow constraints, output constraints of various energy conversion devices, and energy storage device constraints, are not discussed here. The basic model of microgrid power flow is as follows:(7)pj=∑k∈δjPjk−∑i∈πjPij−Iij2rij+gjVj2,∀j∈B,qj=∑k∈δjQjk−∑i∈πjQij−Iij2xij+bjVj2,∀j∈B,(8)Vj2=Vi2−2Pijrij+Qijxij+Iij2rij2+xij2,∀ij∈E,(9)Iij2=Pij2+Qij2Vi2,∀ij∈E,(10)I¯ij≤Iij≤I¯ij,∀ij∈E,(11)V¯j≤Vj≤V¯j,∀j∈B+,(12)pj∈Rjpqj∈Rjq,∀j∈B.In (7)–(12), branch impedance rij, xij, node admittance gj, and bj are constant. Because the internal voltage level of microgrid system is 400 V (as shown in Figure 2), the influence of admittance gj and bj on microgrid power flow is very small. For simple calculation, gjVj2 and bjVj2 in (7) can be ignored. Node voltage V, branch current I, branch power flow P-Q, and node injection power p-q are optimization variables, which are obviously nonlinear. This nonlinear constraint condition will be transformed by the second-order cone relaxation method in Section 3. Equations (7)–(11) are the common constraint equation of general power flow; equation (12) is the unique constraint condition of each microgrid system, which is determined by its own power load, micro source, and other internal structures of the microgrid.Figure 2
Structure diagram of microgrid system.


## 3. Nonlinear Constraint Transformation of Microgrid Power Flow

### 3.1. Second-Order Cone Relaxation Transformation

In this paper, the nonlinear constraints in this model are linearized by the second-order cone relaxation method, and the nonlinear programming problem of the system is transformed into SOCP. For conversion of equation (9), first define I˜ij=Iij2, V˜j=Vj2, and then the second-order cone relaxation transformation is carried out to obtain(13)V˜jI˜ij≥Pij2+Qij2,∀ij∈E,and equation (13) can be equivalent to the standard form of second-order cone relaxation expressed by type 2 norm. Then, by substituting I˜ij=Iij2 and V˜j=Vj2 into equations (7)–(8), the optimal power flow constraint equation after second-order cone relaxation can be obtained:(14)pj=∑k∈δjPjk−∑i∈πjPij−I˜ijrij+gjV˜j,∀j∈B,(15)qj=∑k∈δjQjk−∑i∈πjQij−I˜ijxij+bjV˜,∀j∈B,(16)V˜j=V˜i−2Pijrij+Qijxij+I˜ijrij2+xij2,∀ij∈E,(17)2Pij2QijI˜ij−V˜j≤I˜ij+V˜j,∀ij∈E,(18)I¯ij2≤I˜ij≤I¯ij2,∀ij∈E,(19)V¯j2≤V˜j≤V¯j2,∀j∈B+.


### 3.2. Analysis of Second-Order Cone Relaxation Model

The nonconvex feasible regionCoriginal of the original problem is transformed into a convex feasible region CSOC by SOC relaxation. If the optimal solution S obtained by the second-order cone relaxation transformation model is still a point in Coriginal, then the second-order cone relaxation transformation is strictly effective; that is, the optimal solution S is also the optimal solution of the original problem. The second-order cone in this paper is actually a rotating second-order cone; the standard form is as follows:(20)K=xi∈Rn|2x1x2≥∑j=3nxj2,x1,x2≥0.BecauseI˜ij=Iij2, V˜j=Vj2, it is obvious that equation (13) satisfies the condition of x1,x2≥0 in equation (20), and the form is exactly the same. Figure 2 is the structure diagram of microgrid system, which is obviously a radial power network. For the radial power network, the second-order cone relaxation model established is strictly accurate; that is, the optimal solution calculated by the second-order cone relaxation model is also the optimal solution of the original problem. At the same time, if the optimal scheduling objective function of microgrid operation is convex and is a strictly increasing function of branch current, then the second-order cone relaxation transformed model is accurate convergence.For the microgrid system in this paper, the objective of system optimization cost is the strict increasing function of branch current. The analysis is as follows: under the condition of (13), the node voltage V˜j in microgrid is basically unchanged due to the constraints of upper and lower limits of voltage (voltage loss is ±5%). The branch current I˜ij (actually the square of the branch current) can have a wide range of values under the constraints of the upper and lower limits of the current. However, the greater the difference between I˜ij and the actual value of the branch current, the greater the loss I˜ijrij on the branch of the microgrid, so that the power supply needs to provide more active power to meet the active power balance constraints in (15), which leads to the increase of the system cost target. Therefore, the cost objective of microgrid system is a strictly increasing function of branch current I˜ij. In the process of seeking the lowest cost objective of the system, I˜ij converges to the equal sign of (13) and finally makes I˜ij equal to the actual value of branch current. Therefore, the system model obtained by second-order cone relaxation for power flow constraints is effective and accurate.


## 3.1. Second-Order Cone Relaxation Transformation

In this paper, the nonlinear constraints in this model are linearized by the second-order cone relaxation method, and the nonlinear programming problem of the system is transformed into SOCP. For conversion of equation (9), first define I˜ij=Iij2, V˜j=Vj2, and then the second-order cone relaxation transformation is carried out to obtain(13)V˜jI˜ij≥Pij2+Qij2,∀ij∈E,and equation (13) can be equivalent to the standard form of second-order cone relaxation expressed by type 2 norm. Then, by substituting I˜ij=Iij2 and V˜j=Vj2 into equations (7)–(8), the optimal power flow constraint equation after second-order cone relaxation can be obtained:(14)pj=∑k∈δjPjk−∑i∈πjPij−I˜ijrij+gjV˜j,∀j∈B,(15)qj=∑k∈δjQjk−∑i∈πjQij−I˜ijxij+bjV˜,∀j∈B,(16)V˜j=V˜i−2Pijrij+Qijxij+I˜ijrij2+xij2,∀ij∈E,(17)2Pij2QijI˜ij−V˜j≤I˜ij+V˜j,∀ij∈E,(18)I¯ij2≤I˜ij≤I¯ij2,∀ij∈E,(19)V¯j2≤V˜j≤V¯j2,∀j∈B+.


## 3.2. Analysis of Second-Order Cone Relaxation Model

The nonconvex feasible regionCoriginal of the original problem is transformed into a convex feasible region CSOC by SOC relaxation. If the optimal solution S obtained by the second-order cone relaxation transformation model is still a point in Coriginal, then the second-order cone relaxation transformation is strictly effective; that is, the optimal solution S is also the optimal solution of the original problem. The second-order cone in this paper is actually a rotating second-order cone; the standard form is as follows:(20)K=xi∈Rn|2x1x2≥∑j=3nxj2,x1,x2≥0.BecauseI˜ij=Iij2, V˜j=Vj2, it is obvious that equation (13) satisfies the condition of x1,x2≥0 in equation (20), and the form is exactly the same. Figure 2 is the structure diagram of microgrid system, which is obviously a radial power network. For the radial power network, the second-order cone relaxation model established is strictly accurate; that is, the optimal solution calculated by the second-order cone relaxation model is also the optimal solution of the original problem. At the same time, if the optimal scheduling objective function of microgrid operation is convex and is a strictly increasing function of branch current, then the second-order cone relaxation transformed model is accurate convergence.For the microgrid system in this paper, the objective of system optimization cost is the strict increasing function of branch current. The analysis is as follows: under the condition of (13), the node voltage V˜j in microgrid is basically unchanged due to the constraints of upper and lower limits of voltage (voltage loss is ±5%). The branch current I˜ij (actually the square of the branch current) can have a wide range of values under the constraints of the upper and lower limits of the current. However, the greater the difference between I˜ij and the actual value of the branch current, the greater the loss I˜ijrij on the branch of the microgrid, so that the power supply needs to provide more active power to meet the active power balance constraints in (15), which leads to the increase of the system cost target. Therefore, the cost objective of microgrid system is a strictly increasing function of branch current I˜ij. In the process of seeking the lowest cost objective of the system, I˜ij converges to the equal sign of (13) and finally makes I˜ij equal to the actual value of branch current. Therefore, the system model obtained by second-order cone relaxation for power flow constraints is effective and accurate.


## 4. Simulation Analysis

In order to verify the validity and accuracy of the model, a simulation example of the microgrid system is analyzed, and the time stepΔt is taken as 1 h, and the scheduling time T is 24 h. The simulation results are based on MATLAB programming. For convenience, Gurobi solver is used to solve the optimization problem.


### 4.1. Basic Data

The load distribution of microgrid 24 hours a day is shown in Figure3.Figure 3
Microgrid load.The forecast output of the wind turbine in one day is shown in Figure4, the TOU price is shown in Figure 5, and the natural gas price is given as 2.5 yuan/m3.Figure 4
Wind power forecast output.Figure 5
Electricity price.


### 4.2. Second-Order Cone Transformation Model for Microgrid without Abandoned Wind

When the wind turbine output is normal, the wind power of microgrid system and the loss of microgrid branch are shown in Figure6, while the current of microgrid branches L23 and L36 is shown in Figure 7.Figure 6
Total line loss and abandoned wind volume without abandoned wind.Figure 7
Current of branches L12 and L36 without abandoned wind.It can be seen from Figures6 and 7 that, in the case without abandoned wind in the microgrid, the microgrid power flow obtained by the model after the second-order cone transformation is completely consistent with the actual value. At this time, the second-order cone transformation method is effective and accurate, and the above conclusion that the objective function is the strictly increasing function of branch current I˜ij is also completely correct. The actual value of branch current in Figure 7 is obtained by equation (21) according to node voltage V and line power flow P-Q checking calculation.(21)I˜ij=Pij2+Qij2V˜i,∀ij∈E.


### 4.3. Second-Order Cone Transformation Model for Microgrid with Abandoned Wind

When the wind turbine output is 1.5 times the normal condition, the wind abandonment appears in the microgrid system. At this time, the power of the abandoned wind and the loss of the branch of the microgrid are shown in Figure8, while the current of branches L23 and L36 is shown in Figure 9.Figure 8
Total line loss and abandoned wind volume with abandoned wind.Figure 9
Current of branches L12 and L36 with abandoned wind.When the wind abandonment occurs in the microgrid, the current of each branch calculated by the transformation model is different from the actual value, and the wind abandonment is also different from the actual value. It can be seen from Figure8 that the abandoned wind volume of microgrid calculated by the second-order cone relaxation transformation model is less than the actual abandoned wind volume, and the difference is large, while it can be seen from Figure 9 that the branch current of microgrid calculated by the second-order cone relaxation transformation model is greater than the actual branch current, and the difference is also large. At the same time, the results obtained by the second-order cone relaxation transformation model are very different from the actual value in the periods of 0:00–7:00 and 23:00–24:00, that is, the period when the microgrid has abandoned wind at night, while in the daytime, when there is no abandoned wind in the microgrid, there is no difference with the actual value, so it is accurate. For this problem, the explanation can be given by analyzing equations (13) and (14).In the case of no wind abandonment in microgrid, the above conclusion that the objective function is the strictly increasing function of branch currentI˜ij is correct. However, in the case of wind abandonment in microgrid system, when I˜ij is greater than the actual value, the loss I˜ijrij on the branch of microgrid “increases,” and the power output further increases, but at this time, the wind turbine is used as the power supply, The increased branch loss power is compensated by the abandoned wind power. Therefore, in the process of solving the optimal cost objective function, this part of “increased” loss power will not increase the system cost, but cause a false appearance of reducing the abandoned wind volume of microgrid system. The final results are shown in Figures 7 and 8; by solving the second-order cone relaxation transformation model, the abandoned wind power of microgrid system decreases and the branch current increases. Therefore, it can be seen from the above analysis that when the microgrid system has abandoned wind, the system cost target is no longer a strictly increasing function of branch current I˜ij.


### 4.4. Solving the Deviation Problem of Second-Order Cone Transformation Model

It can be seen from the above analysis that when the microgrid system abandons the wind, the constraints of equations (13) and (15) are insufficient to make the branch current I˜ij converge to the actual value, because at this time the objective cost function is no longer a strictly increasing function of I˜ij. In the night time with wind abandonment, there is a large deviation between the second-order cone conversion value and the actual value at 0 : 00–7:00 and 23 : 00–24 : 00. The maximum deviation of total line loss is 34.5 kW, the maximum deviation of wind abandonment power is 43 kW, the maximum deviation of branch L12 current is 430 A, and the maximum deviation of branch L36 current is 135 A. These deviations are obviously not allowed in practical application. In order to solve the above problem, it is necessary to add a strictly increasing function of I˜ij in the objective cost function, Obviously, the active power loss of microgrid branch is the strict increasing function of I˜ij, and it is also practical to add the branch loss cost to the objective function. Equation (22) is the increased cost function of active power loss of microgrid branch:(22)fLine=KLine∑t=1T∑ij∈EI˜ijrijΔt,where KLine is the branch loss cost coefficient, which is very small. Its function is to ensure that the objective cost function is a strictly increasing function of the branch current I˜ij of the microgrid at any time, and it almost does not affect the optimal scheduling of the microgrid system. After adding the branch loss cost function of microgrid into the objective cost function, the optimal scheduling problem of microgrid system is solved again, as shown in Figures 10 and 11. The results show that when the microgrid system has abandoned wind, the solution result of the second-order cone relaxation transformation model is still the actual effective value, which verifies the effectiveness of the method.Figure 10
Total line loss and abandoned wind volume with abandoned wind after improvement.Figure 11
Current of branches L12 and L36 with abandoned wind after improvement.


## 4.1. Basic Data

The load distribution of microgrid 24 hours a day is shown in Figure3.Figure 3
Microgrid load.The forecast output of the wind turbine in one day is shown in Figure4, the TOU price is shown in Figure 5, and the natural gas price is given as 2.5 yuan/m3.Figure 4
Wind power forecast output.Figure 5
Electricity price.


## 4.2. Second-Order Cone Transformation Model for Microgrid without Abandoned Wind

When the wind turbine output is normal, the wind power of microgrid system and the loss of microgrid branch are shown in Figure6, while the current of microgrid branches L23 and L36 is shown in Figure 7.Figure 6
Total line loss and abandoned wind volume without abandoned wind.Figure 7
Current of branches L12 and L36 without abandoned wind.It can be seen from Figures6 and 7 that, in the case without abandoned wind in the microgrid, the microgrid power flow obtained by the model after the second-order cone transformation is completely consistent with the actual value. At this time, the second-order cone transformation method is effective and accurate, and the above conclusion that the objective function is the strictly increasing function of branch current I˜ij is also completely correct. The actual value of branch current in Figure 7 is obtained by equation (21) according to node voltage V and line power flow P-Q checking calculation.(21)I˜ij=Pij2+Qij2V˜i,∀ij∈E.


## 4.3. Second-Order Cone Transformation Model for Microgrid with Abandoned Wind

When the wind turbine output is 1.5 times the normal condition, the wind abandonment appears in the microgrid system. At this time, the power of the abandoned wind and the loss of the branch of the microgrid are shown in Figure8, while the current of branches L23 and L36 is shown in Figure 9.Figure 8
Total line loss and abandoned wind volume with abandoned wind.Figure 9
Current of branches L12 and L36 with abandoned wind.When the wind abandonment occurs in the microgrid, the current of each branch calculated by the transformation model is different from the actual value, and the wind abandonment is also different from the actual value. It can be seen from Figure8 that the abandoned wind volume of microgrid calculated by the second-order cone relaxation transformation model is less than the actual abandoned wind volume, and the difference is large, while it can be seen from Figure 9 that the branch current of microgrid calculated by the second-order cone relaxation transformation model is greater than the actual branch current, and the difference is also large. At the same time, the results obtained by the second-order cone relaxation transformation model are very different from the actual value in the periods of 0:00–7:00 and 23:00–24:00, that is, the period when the microgrid has abandoned wind at night, while in the daytime, when there is no abandoned wind in the microgrid, there is no difference with the actual value, so it is accurate. For this problem, the explanation can be given by analyzing equations (13) and (14).In the case of no wind abandonment in microgrid, the above conclusion that the objective function is the strictly increasing function of branch currentI˜ij is correct. However, in the case of wind abandonment in microgrid system, when I˜ij is greater than the actual value, the loss I˜ijrij on the branch of microgrid “increases,” and the power output further increases, but at this time, the wind turbine is used as the power supply, The increased branch loss power is compensated by the abandoned wind power. Therefore, in the process of solving the optimal cost objective function, this part of “increased” loss power will not increase the system cost, but cause a false appearance of reducing the abandoned wind volume of microgrid system. The final results are shown in Figures 7 and 8; by solving the second-order cone relaxation transformation model, the abandoned wind power of microgrid system decreases and the branch current increases. Therefore, it can be seen from the above analysis that when the microgrid system has abandoned wind, the system cost target is no longer a strictly increasing function of branch current I˜ij.


## 4.4. Solving the Deviation Problem of Second-Order Cone Transformation Model

It can be seen from the above analysis that when the microgrid system abandons the wind, the constraints of equations (13) and (15) are insufficient to make the branch current I˜ij converge to the actual value, because at this time the objective cost function is no longer a strictly increasing function of I˜ij. In the night time with wind abandonment, there is a large deviation between the second-order cone conversion value and the actual value at 0 : 00–7:00 and 23 : 00–24 : 00. The maximum deviation of total line loss is 34.5 kW, the maximum deviation of wind abandonment power is 43 kW, the maximum deviation of branch L12 current is 430 A, and the maximum deviation of branch L36 current is 135 A. These deviations are obviously not allowed in practical application. In order to solve the above problem, it is necessary to add a strictly increasing function of I˜ij in the objective cost function, Obviously, the active power loss of microgrid branch is the strict increasing function of I˜ij, and it is also practical to add the branch loss cost to the objective function. Equation (22) is the increased cost function of active power loss of microgrid branch:(22)fLine=KLine∑t=1T∑ij∈EI˜ijrijΔt,where KLine is the branch loss cost coefficient, which is very small. Its function is to ensure that the objective cost function is a strictly increasing function of the branch current I˜ij of the microgrid at any time, and it almost does not affect the optimal scheduling of the microgrid system. After adding the branch loss cost function of microgrid into the objective cost function, the optimal scheduling problem of microgrid system is solved again, as shown in Figures 10 and 11. The results show that when the microgrid system has abandoned wind, the solution result of the second-order cone relaxation transformation model is still the actual effective value, which verifies the effectiveness of the method.Figure 10
Total line loss and abandoned wind volume with abandoned wind after improvement.Figure 11
Current of branches L12 and L36 with abandoned wind after improvement.


## 5. Conclusion

This paper mainly studies the application of the second-order cone relaxation method in solving the optimal power flow of microgrid. Through the second-order cone relaxation method, the nonlinear constraints in microgrid power flow are transformed into the second-order cone programming problem (SOCP), and the application conditions of the second-order cone relaxation method are further discussed. In the microgrid operation optimization scheduling problem, if the microgrid structure is a radial power network and the system cost objective is a strictly increasing function of the branch current of the microgrid, then the microgrid model after second-order cone transformation is accurate and effective. When there is no abandoned wind in the microgrid system, the branch current is a strict increasing function of the system cost objective, and the second-order cone relaxation method is accurate. However, when the microgrid system has abandoned wind, the branch current is no longer the strict increasing function of the optimization objective, and the second-order cone relaxation method is biased. This problem can be solved by increasing the line loss cost function. Simulation results show the effectiveness of this method. Although this method can effectively improve the application scope of second-order cone programming, there are still some problems, such as slow solution speed and complex operation. The next research direction should be to study the improved second-order cone relaxation method which can solve the problem quickly.



---

*Source: 2073332-2021-08-20.xml*