# A Two-Stage Optimization Model of Capacity Allocation and Regulation Operation for Virtual Power Plant

Authors: Lu Zhang; Fulin Li; Zhiyi Wang; Bo Zhang; Diqing Qu; Qi Lv; Dunnan Liu
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Capacity allocation and optimal scheduling of virtual power plants (VPP) are important aspects to ensure the effectiveness of system investment and operational economy. In this study, a two-stage optimization model for capacity planning and regulation operation of VPPs considering source-load-storage resources is constructed. In the first stage, a capacity optimization model is constructed for the VPP with the lowest annual economic cost under the refinement constraints of source-storage resources. In the second stage, based on the capacity allocation results and load characteristics, a source-load interactive operation optimization model with the lowest typical daily operating cost and incentive-based demand response is constructed under the resource capacity constraint, so as to realize the capacity allocation and energy control of the VPPs in all stages of source-load-storage resources. Finally, a planning solver is applied to solve the algorithm. The proposed model is validated. The results show that the presence or absence of demand response, the form of demand response, and the charge state of energy storage all have an impact on the allocation and operation results. Adequate consideration of the source-side, load-side, and storage-side interactions can provide a reference for more accurate planning and optimization. The research results are intended to be able to provide VPPs investors and operators with a full process of construction and operation solutions.


---

## Body

## 1. Introduction

Studies on planning problems are mainly focused on capacity planning of energy storage systems. The commonly used planning methods include simulated annealing algorithm [1], mixed integer linear programming model [2, 3], mixed integer nonlinear programming model [4], time-series simulation method [5], ant colony algorithm [6], and particle swarm optimization algorithm [7]. Application scenarios mainly include electric vehicle charging station energy storage systems [8, 9], pumped storage power station energy storage systems [10, 11], wind farm energy storage systems [12], and microgrid energy storage systems [13]. Lu and Wang [1] use a simulated annealing algorithm to solve the capacity planning problem of a hybrid energy storage system under the minimum average operating cost. Qian et al. [7] use particle swarm optimization to solve the planning problem of wind farm energy storage systems. In addition, in order to improve the applicability of the traditional algorithm for the new scene, the traditional algorithm is often improved, such as in [9] for electric vehicle charging station energy storage system capacity planning when using an improved simulated annealing algorithm, Wang et al. [6] used the improved ant colony algorithm to solve multiobjective planning and energy storage systems under configuration problems.In the process of virtual power plant operation, there are not only capacity allocation problems but also operation optimization problems. In the study of virtual power plant operation optimization, the optimization objectives are mostly profit maximization [14, 15], system operation cost minimization [16], optimal profit distribution [17], etc. According to the number of optimization objectives, the existing optimization model can be divided into a single-layer optimization model [18], a two-layer optimization model [19], and a multilayer optimization model [17]. For example, Fang et al. [17] established a three-stage two-layer optimization model to solve the operation optimization problem of the virtual power plant. Optimization methods are mostly random optimization, robust optimization, and interval optimization, but such methods have high computational complexity and are too conservative. Therefore, some scholars combine multiple methods and adopt joint methods to solve the scheduling problems of virtual power plants [20]. In addition to the above optimization methods, some scholars also adopted distributed optimization method [21], elephant grazing optimization method [22], and Shapley’s value method [23] to solve the optimization operation problem of the virtual plants. From the perspective of coverage subject, the current optimization model can be mainly divided into single a virtual power plant optimization model and virtual power plant alliance optimization model [23]. A framework for autonomous VGT (virtual generation tribe) decentralized cooperative control for smart grids was proposed in [24]. VGT-CCA (VGT-based collaborative consensus algorithm) was developed for the first time to solve the dynamic GCD (generation command and dispatch) optimization problem of AGC (automatic generation control) under an ideal communication network.Although some scholars have carried out some research on the capacity configuration of virtual power plants, the following problems and shortcomings exist:(1)
Existing research has mainly focused on the configuration of storage capacity or distributed power capacity for virtual power plants, with little literature on the simultaneous planning of source-storage capacity for virtual power plants, which should take into account the interaction between resources in a comprehensive manner during the planning stage. For example, in [14], only distributed power supply, energy storage system, and power users were considered in modeling, but the load-side demand response resources such as electric vehicles were not taken into account. In addition, the coordination of source-side, charge-side, and storage-side resources in virtual power plants is not considered in most literature.(2)
Existing studies mainly predetermine the parameters of each unit’s rated power and thus configure its number of units to achieve individual optimization, rather than total optimization of the overall capacity. There is no restriction on the technical parameters of the units, and virtual power plants have more flexibility in aggregating units.(3)
The constraints of the existing capacity allocation models are relatively simple, which is not the case in practice.In contrast to previous studies, this study simultaneously considers the source-side, load-side, and storage-side interactions and constructs a two-tier planning model. In addition, this study optimizes the capacity of the overall system input devices, rather than just the number of fixed capacity devices. Compared to the simplified system operation model, this study refines the model by portraying the power output of different devices, making the model more refined.According to the access capacity requirements of distributed power generation in the “Technical Regulations for Distributed Power Access to Power Grid” issued by the State Grid Corporation of China, this study intends to build a two-stage capacity planning and operation optimization model for virtual power plants. In the first stage, aiming at the lowest annual economic cost of the system, considering the refined operation constraints and capacity constraints of equipment, a mixed-integer nonlinear capacity planning model is constructed, and the constraint nesting method is used for nonlinear decoupling, and the capacity configuration of each resource is obtained by solving the solution. Results: in the second stage, aiming at the lowest daily operating cost of the system and taking the planned capacity as a constraint, an operation optimization model that takes into account the incentive demand response (IDR) is constructed.The possible innovations of this study are as follows:(1)
A two-layer model considering power source-grid-load-storage multiparticipant is constructed(2)
A nested model that comprehensively considers upper-level capacity planning and lower-level operation optimization is constructed(3)
A lower-level optimization model considering load-side incentive demand response is constructed


## 2. The Structure and Equipment Model of the VPP

### 2.1. The Structure of VPP

In this paper, distributed photovoltaic (PV), distributed wind power (WP), gas turbine, energy storage, and incentive demand response resources are integrated into a virtual power plant, and the energy control platform of the virtual power plant makes the best coordinated operation strategy according to the actual load demand of the terminal user and the capacity of each unit. At the same time, in order to give full play to the adjustment of the demand side resource potential, the paper sets up the IDR to participate in the optimal operation of virtual power plant, the virtual power plant and the related user anchoring prior agreement, regulation control platform of virtual power plant energy through the ascending and descending form directly to adjust its power consumption behavior, and according to the number of load adjustment type and give the corresponding subsidy. IDR can improve the self-regulation performance and energy management level of the virtual power plant. The structure of the virtual power plant is shown in Figure1.Figure 1
Virtual power plant structure.


### 2.2. Model of Each Device

#### 2.2.1. Distributed Photovoltaic Output Model

The power of photovoltaic power generation is related to local lighting intensity, radiation density, and environmental temperature. Generally, the photovoltaic output model can be expressed as follows:(1)PPVt=PPV,ratedFPtρP1+HTSt−Te,TSt=Tαt+0.01381+0.031Tαt1−0.042VtFPt,where PPVt is the output of distributed PV at a given time, PPV,rated is the maximum power of distributed photovoltaic under rated conditions, FPt is the actual light intensity at time t, ρP is the density of illumination radiation at standard rating, Te is the rated ambient temperature, and Tαt is the actual ambient temperature at time t.


#### 2.2.2. Distributed Wind Power Output Model

The power of wind power generation is related to wind speed conditions, and it shows phased characteristics with the fluctuation of wind speed. Generally, the wind power output model can be expressed as follows:(2)PWPt=0Vt≤VinαWPVWPt3−βWPPWP,ratedVin≤Vt≤VratedPeVrated≤Vt≤Vout0Vout≤Vt,αWP=PeVrated3−Vin3,βWP=Vin3Vrated3−Vin3,where PWP,rated is the maximum power of distributed fan under rated condition, Vrated, Vin, and Vout, respectively, represent rated wind speed, cut wind speed, and load cut wind speed, Vt is the actual wind speed at time t, and Pe is the rated power of the fan.


#### 2.2.3. Gas Turbine Output Model

The output of a gas turbine is mainly related to the calorific value of natural gas and the power generation efficiency of a gas turbine, and its expression is(3)PGAS,int=LHVQGASt,PGASt=LHVQGAStηGAS,where PGAS,int represents the input power of the gas turbine at time t, PGASt is the output power of the gas turbine, LHV is the calorific value of natural gas, and ηGAS is the power generation efficiency of the gas turbine.


#### 2.2.4. Energy Storage Device Model

The charging and discharging characteristics of a battery are usually described by the battery capacity, state of charge, and other parameters. The state of charge refers to the ratio of the remaining power in the batteryqr to the rated capacity of the battery PESS.rated at a certain moment, which can be expressed as follows:(4)SOC=qrPESS.rated.When a battery is charged and discharged, it will generate electric energy loss. Assuming that the loss coefficient of charging isδin and that of discharging is δout, then the charging state gint and discharge state goutt of the battery in period t can be expressed as follows:(5)gint=gint−1+θESSintPESS,int1−δin,goutt=goutt−1−θESSouttPESS,outt1+δin,where θESSint and θESSoutt indicate the charging and discharging status of the battery. The value 0 indicates that no charging or discharging occurs, and the value 1 indicates that the charging or discharging occurs.


## 2.1. The Structure of VPP

In this paper, distributed photovoltaic (PV), distributed wind power (WP), gas turbine, energy storage, and incentive demand response resources are integrated into a virtual power plant, and the energy control platform of the virtual power plant makes the best coordinated operation strategy according to the actual load demand of the terminal user and the capacity of each unit. At the same time, in order to give full play to the adjustment of the demand side resource potential, the paper sets up the IDR to participate in the optimal operation of virtual power plant, the virtual power plant and the related user anchoring prior agreement, regulation control platform of virtual power plant energy through the ascending and descending form directly to adjust its power consumption behavior, and according to the number of load adjustment type and give the corresponding subsidy. IDR can improve the self-regulation performance and energy management level of the virtual power plant. The structure of the virtual power plant is shown in Figure1.Figure 1
Virtual power plant structure.


## 2.2. Model of Each Device

### 2.2.1. Distributed Photovoltaic Output Model

The power of photovoltaic power generation is related to local lighting intensity, radiation density, and environmental temperature. Generally, the photovoltaic output model can be expressed as follows:(1)PPVt=PPV,ratedFPtρP1+HTSt−Te,TSt=Tαt+0.01381+0.031Tαt1−0.042VtFPt,where PPVt is the output of distributed PV at a given time, PPV,rated is the maximum power of distributed photovoltaic under rated conditions, FPt is the actual light intensity at time t, ρP is the density of illumination radiation at standard rating, Te is the rated ambient temperature, and Tαt is the actual ambient temperature at time t.


### 2.2.2. Distributed Wind Power Output Model

The power of wind power generation is related to wind speed conditions, and it shows phased characteristics with the fluctuation of wind speed. Generally, the wind power output model can be expressed as follows:(2)PWPt=0Vt≤VinαWPVWPt3−βWPPWP,ratedVin≤Vt≤VratedPeVrated≤Vt≤Vout0Vout≤Vt,αWP=PeVrated3−Vin3,βWP=Vin3Vrated3−Vin3,where PWP,rated is the maximum power of distributed fan under rated condition, Vrated, Vin, and Vout, respectively, represent rated wind speed, cut wind speed, and load cut wind speed, Vt is the actual wind speed at time t, and Pe is the rated power of the fan.


### 2.2.3. Gas Turbine Output Model

The output of a gas turbine is mainly related to the calorific value of natural gas and the power generation efficiency of a gas turbine, and its expression is(3)PGAS,int=LHVQGASt,PGASt=LHVQGAStηGAS,where PGAS,int represents the input power of the gas turbine at time t, PGASt is the output power of the gas turbine, LHV is the calorific value of natural gas, and ηGAS is the power generation efficiency of the gas turbine.


### 2.2.4. Energy Storage Device Model

The charging and discharging characteristics of a battery are usually described by the battery capacity, state of charge, and other parameters. The state of charge refers to the ratio of the remaining power in the batteryqr to the rated capacity of the battery PESS.rated at a certain moment, which can be expressed as follows:(4)SOC=qrPESS.rated.When a battery is charged and discharged, it will generate electric energy loss. Assuming that the loss coefficient of charging isδin and that of discharging is δout, then the charging state gint and discharge state goutt of the battery in period t can be expressed as follows:(5)gint=gint−1+θESSintPESS,int1−δin,goutt=goutt−1−θESSouttPESS,outt1+δin,where θESSint and θESSoutt indicate the charging and discharging status of the battery. The value 0 indicates that no charging or discharging occurs, and the value 1 indicates that the charging or discharging occurs.


## 2.2.1. Distributed Photovoltaic Output Model

The power of photovoltaic power generation is related to local lighting intensity, radiation density, and environmental temperature. Generally, the photovoltaic output model can be expressed as follows:(1)PPVt=PPV,ratedFPtρP1+HTSt−Te,TSt=Tαt+0.01381+0.031Tαt1−0.042VtFPt,where PPVt is the output of distributed PV at a given time, PPV,rated is the maximum power of distributed photovoltaic under rated conditions, FPt is the actual light intensity at time t, ρP is the density of illumination radiation at standard rating, Te is the rated ambient temperature, and Tαt is the actual ambient temperature at time t.


## 2.2.2. Distributed Wind Power Output Model

The power of wind power generation is related to wind speed conditions, and it shows phased characteristics with the fluctuation of wind speed. Generally, the wind power output model can be expressed as follows:(2)PWPt=0Vt≤VinαWPVWPt3−βWPPWP,ratedVin≤Vt≤VratedPeVrated≤Vt≤Vout0Vout≤Vt,αWP=PeVrated3−Vin3,βWP=Vin3Vrated3−Vin3,where PWP,rated is the maximum power of distributed fan under rated condition, Vrated, Vin, and Vout, respectively, represent rated wind speed, cut wind speed, and load cut wind speed, Vt is the actual wind speed at time t, and Pe is the rated power of the fan.


## 2.2.3. Gas Turbine Output Model

The output of a gas turbine is mainly related to the calorific value of natural gas and the power generation efficiency of a gas turbine, and its expression is(3)PGAS,int=LHVQGASt,PGASt=LHVQGAStηGAS,where PGAS,int represents the input power of the gas turbine at time t, PGASt is the output power of the gas turbine, LHV is the calorific value of natural gas, and ηGAS is the power generation efficiency of the gas turbine.


## 2.2.4. Energy Storage Device Model

The charging and discharging characteristics of a battery are usually described by the battery capacity, state of charge, and other parameters. The state of charge refers to the ratio of the remaining power in the batteryqr to the rated capacity of the battery PESS.rated at a certain moment, which can be expressed as follows:(4)SOC=qrPESS.rated.When a battery is charged and discharged, it will generate electric energy loss. Assuming that the loss coefficient of charging isδin and that of discharging is δout, then the charging state gint and discharge state goutt of the battery in period t can be expressed as follows:(5)gint=gint−1+θESSintPESS,int1−δin,goutt=goutt−1−θESSouttPESS,outt1+δin,where θESSint and θESSoutt indicate the charging and discharging status of the battery. The value 0 indicates that no charging or discharging occurs, and the value 1 indicates that the charging or discharging occurs.


## 3. Two-Stage Optimization Model

This study adopts the two-stage optimization method to carry out capacity planning and operation optimization of the virtual power plant, and the optimization process is shown in Figure2. The first stage is to make capacity planning for each distributed resource of the virtual power plant and determine the optimal installation capacity of the unit. In the second stage, based on the known capacity results, the optimal operation scheme of the virtual power plant is determined, and the unit output plan is reasonably arranged.Figure 2
Two-stage optimization process of virtual power plant.


### 3.1. Capacity Planning Stage

In the planning stage, the optimal capacity allocation scheme is determined under the capacity constraints and operational constraints of each unit under the optimization objective of the lowest annual economic cost of the virtual power plant.


#### 3.1.1. Objective Function

The annual economic cost of a virtual power plant consists of equalized investment costCINV, operating cost COP, environmental cost CENV, and salvage value recovery income RSY, which can be expressed as follows:(6)F1=CINV+COP+CENV−RSY.(1)
Equipment investment and construction costs:(7)CINV=∑n=1NRINV,nUnPn,rated,RINV,n=r1+rLn1+rLw−1,whereCINV is the equipment input and construction cost of the virtual power plant, N represents the number of types of polymerization equipment in the virtual power plant, RINV,n is the annualized conversion coefficient of the investment cost of category I equipment, Un represents the unit capacity investment cost of the nth equipment in the virtual power plant, including distributed photovoltaic unit investment cost UPV, distributed wind power unit investment cost UWP, energy storage unit investment cost UESS, and gas turbine unit investment cost UQT, Pn,rated represents the configured capacity of the equipment, namely, PWP,rated, PPV,rated, PQT,rated, and PESS,rated are, respectively, the rated capacity of wind turbine, photovoltaic unit, gas turbine unit, and energy storage unit, r represents discount rate, and Ln represents the service life of the nth equipment.(2)
System annual operating cost: the annual operating cost of a virtual power plantCOP consists of generator unit operation and maintenance cost CYW, gas turbine unit fuel cost CFUE, gas turbine start-up and shutdown cost CQT, and power grid interaction cost CGRID:(8)COP=∑m=1MDmCYW,m+CESS,m+CFUE,m+CQT,m+CGRD,m,CYW,m=∑n=1N∑t=1TλnPn,mtΔt,CESS,m=∑t=1τφESSPESSin,mt+PESSout,mtΔt,CFUE,m=∑t=1TVQT0FGT0⋅PQT,mtηQT0Δt,CQT,m=∑t=1TγQTθQT,mt1−θQT,mt−1+θQT,mt−11−θQT,mtΔt,CGRID,m=∑t=1TQGD,mtPGD,mt−QSD,mtPSD,mtΔt,whereN represents the number of types of generator sets, including wind turbine set, photovoltaic set, and gas turbine set, M represents typical day types, M=3, which are summer, winter, and transition season, respectively. T represents the total scheduling period, T=24, Dm is the duration of typical days in a year, λn is the unit operation and maintenance cost of various generating sets, φESS represents the unit operation and maintenance cost of energy storage equipment, Pn,mt represents the power of all types of generator sets in the virtual power plant in the m typical day at time, PWP,mt, PPV,mt, and PQT,mt, respectively, represent the output power of distributed wind turbine, photovoltaic unit, and gas turbine in the m typical day at t time, PESSin,mt and PESSout,mt, respectively, represent the charging power and discharge power of the energy storage equipment i in the m typical day at t time, VQT0 represents the energy consumption of a standard cubic meter of natural gas, FQT0 represents the heat generated after the complete combustion of a standard cubic meter of natural gas, ηQT0 represents the energy conversion efficiency of a gas turbine, γQT represents gas turbine start-up and shutdown cost per unit time, θQT,mt represents the start-stop state, which is represented by state variables 0–1, 0 represents the shutdown state, and 1 represents the start-up state, QSD,mt and QGD,mt, respectively, represent the electricity price for sale and purchase between the virtual power plant and the main network in the m typical day at t time, PSD,mt and PGD,mt, respectively, represent the power sold and power purchased in the m typical day at t time and Δt is the scheduling step, Δt=1.(3)
Environmental costs: virtual power plants distributed photovoltaic and distributed wind power are clean power generation systems, and their pollutant emissions can be ignored. The gas turbine uses fossil fuels, so it will produce certain air pollutants during the operation of the system. In addition, when purchasing electricity from the main network, it is assumed that thermal power is purchased, which also generates environmental pollutants.The annual pollutant treatment cost of the virtual power plantCENV is expressed as follows:(9)CENV=∑m=1M∑j=1J∑t=1TDmϑnYQTnPQT,mt+YGDnPGD,mtΔt,whereJ represents the types of pollutants, J=3, which are, respectively, CO2, SO2, and NOX, θn is the unit emission treatment fee representing the nth pollutant, YQTn and YGDn, respectively, represent the emission coefficient of jth the pollutant when purchasing power from the grid and distributed gas turbine units in the virtual power plant, and PQT,mt and PGD,mt, respectively, represent the generation power of distributed gas turbine sets and power purchasing power of the grid in the m typical day at t time.(4)
Residual value of the system: system residual value refers to the remaining cost of a certain equipment in the virtual power plant at the end of the project life cycle. The remaining cost can be calculated by using the proportional method, expressed as follows:(10)RSY=ξCINVr1+rLn−1,whereRSY is the residual value income of the virtual power plant equipment, which is generated only at the end of the last year of the life cycle and ξ represents the ratio of residual value return to the initial investment, usually 5% [14].


#### 3.1.2. Constraints

(1)
Power balance constraint:(11)PGD,mt−PSD,mt+PWP,mt+PPV,mt+PQT,mt+PESSout,mt−PESSin,mtVPPoutput=PL,mt+PLup,mt−PLdown,mt,wherePL,mt represents the period load.(2)
Distributed power constraint.①
Unit power constraint: for distributed wind power and distributed photovoltaic, the output power constraints of both should meet the following formula:(12)θWP,mtβWPPWP,rated≤PWP,mt≤θWP,mtPWP,rated,θPV,mtβPVPPV,rated≤PPV,mt≤θPV,mtPPV,rated,whereθWP,mt and θPV,mt are the start-stop state of wind turbine and photovoltaic unit and βWP and βPV are the minimum load rates of wind power and photovoltaic, respectively.②
Unit capacity constraint:(13)PWP,min≤PWP,mt≤ζPLt,PPV,min≤PPV,mt≤ζPLt,wherePWP,min and PPV,min represent the minimum output of fan and photovoltaic, respectively, and ζ represents the proportional coefficient of the total load at the same time.(3)
Gas turbine confinement:①
Power constraint:(14)0≤PQT,mt≤PQT,rated.②
Up and down climbing power constraints:(15)PPAmin≤PQT,mt−PQT,mt−1≤PPAmax,wherePPAmin and PPAmax, respectively, represent the up and down climbing power limits of gas turbine units.③
Equipment output constraint:(16)θQT,mtβQTPQT,rated≤PQT,mt≤θQT,mtPQT,rated,whereθQT,mt is the start-stop state of each device at t time and βQT is the minimum load rate of the gas turbine set.④
Capacity constraint:(17)PQT,min≤PQT,rated≤PLmax,wherePQT,min represents the minimum gas turbine capacity and PLmax is the maximum load.(4)
Energy storage constraints:①
Power storage balance constraint: the electric quantity stored by the energy storage batteryQESS,mt at t time is equal to the electric quantity stored at t−1 time plus the actual charging quantity at t time, minus the actual discharge quantity at t time, and the expression is(18)QESS,mt=QESS,mt−1+ηESS,inPESS,in,mt−PESS,out,mtηESS,out,whereQESS,mt represents the energy storage capacity of energy storage battery at t time and ηESS,in and ηESS, out, respectively, represent the charge and discharge efficiency of energy storage equipment.②
Constraints on upper and lower limits of charge:(19)QESS,minPESS,rated≤QESS,mt≤QESS,maxPESS,rated,whereQESS,min and QESS,max, respectively, represent state limits of energy storage battery capacity.③
Constraint of equal power storage in starting and ending states:(20)QESS,m0=QESS,mT−1,whereQESS,m0 represents the energy storage capacity of the initial energy storage battery and QESS,mT−1 represents the electricity stored in the last scheduling period in a scheduling cycle.④
Charge and discharge power constraints: in order to delay the life of energy storage battery, the charge and discharge power of energy storage equipment should be maintained within a certain range:(21)θESS,mintPESS,inmin≤PESS,in,mt≤θESS,mintPESS,inmax,θESS,mouttPESS,outmin≤PESS,out,mt≤θESS,mouttPESS,outmax,PESS,inmax=γESS,inPESS,rated,PESS,outmax=γESS,outPESS,rated,wherePESS,inmax and PESS,outmax, respectively, represent the maximum charging and discharging power of the energy storage equipment and θESS,min and θESS,moutt, respectively, represent the charging and discharging state of the storage equipment at t time, which is represented by 0–1 variables. If the variable is equal to 0, it means that there is no charge/discharge at this time, and if the variable is equal to 1, it means that the charge/discharge occurs at this time. γESS,in and γESS,out, respectively, represent charge and discharge rates of energy storage.⑤
Maximum discharge power constraint of energy storage: the maximum discharge power of the energy storage device should not exceed the maximum load, which can be expressed as follows:(22)0≤PESS,outmax≤PLmax.⑥
Charge/discharge uniqueness constraint:(23)0≤θESS,mint+θESS,moutt≤1.The constraint is to avoid simultaneous charging and discharging of the same energy storage device in the optimization process.(6)
Restrictions on purchasing and selling electricity:①
Purchasing and selling power constraints:(24)θGD,mtPGDmint≤PGD,mt≤θGD,mtPGDmaxt,θSD,mtPSDmint≤PSD,mt≤θSD,mtPSDmaxt,wherePGDmint and PGDmaxt, respectively, represent the maximum value of power purchased from the main network by the virtual power plant in the time period, PSDmint and PSDmaxt, respectively, represent the power limits of the virtual power plant selling electricity to the main network in the time period, and θGD,mt and θSD,mt, respectively, represent the state variables of the virtual power plant purchasing and selling electricity from the main network, which are represented by 0–1 variables. When the value is equal to 1, it means that the purchasing/selling of electricity takes place at this moment; when the value is equal to 0, it means that the purchasing/selling of electricity does not take place at this moment.②
Power purchase/sale uniqueness constraint:(25)0≤θGD,mt+θSD,mt≤1.This means that electricity cannot be bought and sold at the same time.


### 3.2. Operational Optimization Stage

In the operation stage, the capacity of each unit has been obtained from the first stage, the capacity is taken as the constraint condition, IDR is considered in the energy management of the virtual power plant, and the optimal operation scheduling scheme of the unit is obtained by taking the operation cost of typical day and IDR cost as the optimization objective.


#### 3.2.1. Objective Function

(26)FOP=CYW,m+CESS,m+CFUE,m+CQT,m+CGRID,m+CDR,m.The daily operating cost modeling of the virtual power plant is the same as described above. IDR considers the compensation cost of transferable load, which is divided into upstream transfer load and downstream transfer load, expressed as follows:(27)CDR,m=Cup,m+Cdown,m,CDR,m=∑t=1TαupPLup,mt+βdownPLdown,mtΔt,where CDR,m represents the daily demand response cost of the m typical day, including the compensation cost of upstream transfer load Cup,m and compensation cost of downstream transfer load Cdown,m, αup and βdown, respectively, represent the compensation coefficient of upstream transfer load and downstream transfer load, and PLup,mt and PLdown,mt, respectively, represent the upward transfer load and downward transfer load in the first period of the m typical day.


#### 3.2.2. Constraints

(1)
Demand response constraints;①
Transferable load transfer constraints:(28)0≤PLup,mt≤δL,muptPLt,0≤PLdown,mt≤δL,mdowntφDRPLt,wherePLt represents the load of time period, φDR represents the response proportion of the transferable load, and δL,mup and δL,mdown, respectively, represent the state variables of upstream and downstream load transfer, which are represented by 0–1.②
Balance constraint of transferable load:(29)∑t=1TPLup,mt=∑t=1TPLdown,mt,ensure that the amount of uplink is equal to the amount of cut in a scheduling period.③
Upstream/downstream uniqueness constraints:(30)0≤δL,mupt+δL,mdownt≤1.This means that the uplink and downlink cannot be performed at the same time.(2)
Other constraints: in addition to the demand response constraints, the optimization stage also contains the corresponding capacity constraints and operation constraints, which are the same as those in the planning stage. The difference is that the equipment capacity in the planning stage is a decision variable, and the equipment capacity in the operation stage is a known quantity.


## 3.1. Capacity Planning Stage

In the planning stage, the optimal capacity allocation scheme is determined under the capacity constraints and operational constraints of each unit under the optimization objective of the lowest annual economic cost of the virtual power plant.


### 3.1.1. Objective Function

The annual economic cost of a virtual power plant consists of equalized investment costCINV, operating cost COP, environmental cost CENV, and salvage value recovery income RSY, which can be expressed as follows:(6)F1=CINV+COP+CENV−RSY.(1)
Equipment investment and construction costs:(7)CINV=∑n=1NRINV,nUnPn,rated,RINV,n=r1+rLn1+rLw−1,whereCINV is the equipment input and construction cost of the virtual power plant, N represents the number of types of polymerization equipment in the virtual power plant, RINV,n is the annualized conversion coefficient of the investment cost of category I equipment, Un represents the unit capacity investment cost of the nth equipment in the virtual power plant, including distributed photovoltaic unit investment cost UPV, distributed wind power unit investment cost UWP, energy storage unit investment cost UESS, and gas turbine unit investment cost UQT, Pn,rated represents the configured capacity of the equipment, namely, PWP,rated, PPV,rated, PQT,rated, and PESS,rated are, respectively, the rated capacity of wind turbine, photovoltaic unit, gas turbine unit, and energy storage unit, r represents discount rate, and Ln represents the service life of the nth equipment.(2)
System annual operating cost: the annual operating cost of a virtual power plantCOP consists of generator unit operation and maintenance cost CYW, gas turbine unit fuel cost CFUE, gas turbine start-up and shutdown cost CQT, and power grid interaction cost CGRID:(8)COP=∑m=1MDmCYW,m+CESS,m+CFUE,m+CQT,m+CGRD,m,CYW,m=∑n=1N∑t=1TλnPn,mtΔt,CESS,m=∑t=1τφESSPESSin,mt+PESSout,mtΔt,CFUE,m=∑t=1TVQT0FGT0⋅PQT,mtηQT0Δt,CQT,m=∑t=1TγQTθQT,mt1−θQT,mt−1+θQT,mt−11−θQT,mtΔt,CGRID,m=∑t=1TQGD,mtPGD,mt−QSD,mtPSD,mtΔt,whereN represents the number of types of generator sets, including wind turbine set, photovoltaic set, and gas turbine set, M represents typical day types, M=3, which are summer, winter, and transition season, respectively. T represents the total scheduling period, T=24, Dm is the duration of typical days in a year, λn is the unit operation and maintenance cost of various generating sets, φESS represents the unit operation and maintenance cost of energy storage equipment, Pn,mt represents the power of all types of generator sets in the virtual power plant in the m typical day at time, PWP,mt, PPV,mt, and PQT,mt, respectively, represent the output power of distributed wind turbine, photovoltaic unit, and gas turbine in the m typical day at t time, PESSin,mt and PESSout,mt, respectively, represent the charging power and discharge power of the energy storage equipment i in the m typical day at t time, VQT0 represents the energy consumption of a standard cubic meter of natural gas, FQT0 represents the heat generated after the complete combustion of a standard cubic meter of natural gas, ηQT0 represents the energy conversion efficiency of a gas turbine, γQT represents gas turbine start-up and shutdown cost per unit time, θQT,mt represents the start-stop state, which is represented by state variables 0–1, 0 represents the shutdown state, and 1 represents the start-up state, QSD,mt and QGD,mt, respectively, represent the electricity price for sale and purchase between the virtual power plant and the main network in the m typical day at t time, PSD,mt and PGD,mt, respectively, represent the power sold and power purchased in the m typical day at t time and Δt is the scheduling step, Δt=1.(3)
Environmental costs: virtual power plants distributed photovoltaic and distributed wind power are clean power generation systems, and their pollutant emissions can be ignored. The gas turbine uses fossil fuels, so it will produce certain air pollutants during the operation of the system. In addition, when purchasing electricity from the main network, it is assumed that thermal power is purchased, which also generates environmental pollutants.The annual pollutant treatment cost of the virtual power plantCENV is expressed as follows:(9)CENV=∑m=1M∑j=1J∑t=1TDmϑnYQTnPQT,mt+YGDnPGD,mtΔt,whereJ represents the types of pollutants, J=3, which are, respectively, CO2, SO2, and NOX, θn is the unit emission treatment fee representing the nth pollutant, YQTn and YGDn, respectively, represent the emission coefficient of jth the pollutant when purchasing power from the grid and distributed gas turbine units in the virtual power plant, and PQT,mt and PGD,mt, respectively, represent the generation power of distributed gas turbine sets and power purchasing power of the grid in the m typical day at t time.(4)
Residual value of the system: system residual value refers to the remaining cost of a certain equipment in the virtual power plant at the end of the project life cycle. The remaining cost can be calculated by using the proportional method, expressed as follows:(10)RSY=ξCINVr1+rLn−1,whereRSY is the residual value income of the virtual power plant equipment, which is generated only at the end of the last year of the life cycle and ξ represents the ratio of residual value return to the initial investment, usually 5% [14].


### 3.1.2. Constraints

(1)
Power balance constraint:(11)PGD,mt−PSD,mt+PWP,mt+PPV,mt+PQT,mt+PESSout,mt−PESSin,mtVPPoutput=PL,mt+PLup,mt−PLdown,mt,wherePL,mt represents the period load.(2)
Distributed power constraint.①
Unit power constraint: for distributed wind power and distributed photovoltaic, the output power constraints of both should meet the following formula:(12)θWP,mtβWPPWP,rated≤PWP,mt≤θWP,mtPWP,rated,θPV,mtβPVPPV,rated≤PPV,mt≤θPV,mtPPV,rated,whereθWP,mt and θPV,mt are the start-stop state of wind turbine and photovoltaic unit and βWP and βPV are the minimum load rates of wind power and photovoltaic, respectively.②
Unit capacity constraint:(13)PWP,min≤PWP,mt≤ζPLt,PPV,min≤PPV,mt≤ζPLt,wherePWP,min and PPV,min represent the minimum output of fan and photovoltaic, respectively, and ζ represents the proportional coefficient of the total load at the same time.(3)
Gas turbine confinement:①
Power constraint:(14)0≤PQT,mt≤PQT,rated.②
Up and down climbing power constraints:(15)PPAmin≤PQT,mt−PQT,mt−1≤PPAmax,wherePPAmin and PPAmax, respectively, represent the up and down climbing power limits of gas turbine units.③
Equipment output constraint:(16)θQT,mtβQTPQT,rated≤PQT,mt≤θQT,mtPQT,rated,whereθQT,mt is the start-stop state of each device at t time and βQT is the minimum load rate of the gas turbine set.④
Capacity constraint:(17)PQT,min≤PQT,rated≤PLmax,wherePQT,min represents the minimum gas turbine capacity and PLmax is the maximum load.(4)
Energy storage constraints:①
Power storage balance constraint: the electric quantity stored by the energy storage batteryQESS,mt at t time is equal to the electric quantity stored at t−1 time plus the actual charging quantity at t time, minus the actual discharge quantity at t time, and the expression is(18)QESS,mt=QESS,mt−1+ηESS,inPESS,in,mt−PESS,out,mtηESS,out,whereQESS,mt represents the energy storage capacity of energy storage battery at t time and ηESS,in and ηESS, out, respectively, represent the charge and discharge efficiency of energy storage equipment.②
Constraints on upper and lower limits of charge:(19)QESS,minPESS,rated≤QESS,mt≤QESS,maxPESS,rated,whereQESS,min and QESS,max, respectively, represent state limits of energy storage battery capacity.③
Constraint of equal power storage in starting and ending states:(20)QESS,m0=QESS,mT−1,whereQESS,m0 represents the energy storage capacity of the initial energy storage battery and QESS,mT−1 represents the electricity stored in the last scheduling period in a scheduling cycle.④
Charge and discharge power constraints: in order to delay the life of energy storage battery, the charge and discharge power of energy storage equipment should be maintained within a certain range:(21)θESS,mintPESS,inmin≤PESS,in,mt≤θESS,mintPESS,inmax,θESS,mouttPESS,outmin≤PESS,out,mt≤θESS,mouttPESS,outmax,PESS,inmax=γESS,inPESS,rated,PESS,outmax=γESS,outPESS,rated,wherePESS,inmax and PESS,outmax, respectively, represent the maximum charging and discharging power of the energy storage equipment and θESS,min and θESS,moutt, respectively, represent the charging and discharging state of the storage equipment at t time, which is represented by 0–1 variables. If the variable is equal to 0, it means that there is no charge/discharge at this time, and if the variable is equal to 1, it means that the charge/discharge occurs at this time. γESS,in and γESS,out, respectively, represent charge and discharge rates of energy storage.⑤
Maximum discharge power constraint of energy storage: the maximum discharge power of the energy storage device should not exceed the maximum load, which can be expressed as follows:(22)0≤PESS,outmax≤PLmax.⑥
Charge/discharge uniqueness constraint:(23)0≤θESS,mint+θESS,moutt≤1.The constraint is to avoid simultaneous charging and discharging of the same energy storage device in the optimization process.(6)
Restrictions on purchasing and selling electricity:①
Purchasing and selling power constraints:(24)θGD,mtPGDmint≤PGD,mt≤θGD,mtPGDmaxt,θSD,mtPSDmint≤PSD,mt≤θSD,mtPSDmaxt,wherePGDmint and PGDmaxt, respectively, represent the maximum value of power purchased from the main network by the virtual power plant in the time period, PSDmint and PSDmaxt, respectively, represent the power limits of the virtual power plant selling electricity to the main network in the time period, and θGD,mt and θSD,mt, respectively, represent the state variables of the virtual power plant purchasing and selling electricity from the main network, which are represented by 0–1 variables. When the value is equal to 1, it means that the purchasing/selling of electricity takes place at this moment; when the value is equal to 0, it means that the purchasing/selling of electricity does not take place at this moment.②
Power purchase/sale uniqueness constraint:(25)0≤θGD,mt+θSD,mt≤1.This means that electricity cannot be bought and sold at the same time.


## 3.1.1. Objective Function

The annual economic cost of a virtual power plant consists of equalized investment costCINV, operating cost COP, environmental cost CENV, and salvage value recovery income RSY, which can be expressed as follows:(6)F1=CINV+COP+CENV−RSY.(1)
Equipment investment and construction costs:(7)CINV=∑n=1NRINV,nUnPn,rated,RINV,n=r1+rLn1+rLw−1,whereCINV is the equipment input and construction cost of the virtual power plant, N represents the number of types of polymerization equipment in the virtual power plant, RINV,n is the annualized conversion coefficient of the investment cost of category I equipment, Un represents the unit capacity investment cost of the nth equipment in the virtual power plant, including distributed photovoltaic unit investment cost UPV, distributed wind power unit investment cost UWP, energy storage unit investment cost UESS, and gas turbine unit investment cost UQT, Pn,rated represents the configured capacity of the equipment, namely, PWP,rated, PPV,rated, PQT,rated, and PESS,rated are, respectively, the rated capacity of wind turbine, photovoltaic unit, gas turbine unit, and energy storage unit, r represents discount rate, and Ln represents the service life of the nth equipment.(2)
System annual operating cost: the annual operating cost of a virtual power plantCOP consists of generator unit operation and maintenance cost CYW, gas turbine unit fuel cost CFUE, gas turbine start-up and shutdown cost CQT, and power grid interaction cost CGRID:(8)COP=∑m=1MDmCYW,m+CESS,m+CFUE,m+CQT,m+CGRD,m,CYW,m=∑n=1N∑t=1TλnPn,mtΔt,CESS,m=∑t=1τφESSPESSin,mt+PESSout,mtΔt,CFUE,m=∑t=1TVQT0FGT0⋅PQT,mtηQT0Δt,CQT,m=∑t=1TγQTθQT,mt1−θQT,mt−1+θQT,mt−11−θQT,mtΔt,CGRID,m=∑t=1TQGD,mtPGD,mt−QSD,mtPSD,mtΔt,whereN represents the number of types of generator sets, including wind turbine set, photovoltaic set, and gas turbine set, M represents typical day types, M=3, which are summer, winter, and transition season, respectively. T represents the total scheduling period, T=24, Dm is the duration of typical days in a year, λn is the unit operation and maintenance cost of various generating sets, φESS represents the unit operation and maintenance cost of energy storage equipment, Pn,mt represents the power of all types of generator sets in the virtual power plant in the m typical day at time, PWP,mt, PPV,mt, and PQT,mt, respectively, represent the output power of distributed wind turbine, photovoltaic unit, and gas turbine in the m typical day at t time, PESSin,mt and PESSout,mt, respectively, represent the charging power and discharge power of the energy storage equipment i in the m typical day at t time, VQT0 represents the energy consumption of a standard cubic meter of natural gas, FQT0 represents the heat generated after the complete combustion of a standard cubic meter of natural gas, ηQT0 represents the energy conversion efficiency of a gas turbine, γQT represents gas turbine start-up and shutdown cost per unit time, θQT,mt represents the start-stop state, which is represented by state variables 0–1, 0 represents the shutdown state, and 1 represents the start-up state, QSD,mt and QGD,mt, respectively, represent the electricity price for sale and purchase between the virtual power plant and the main network in the m typical day at t time, PSD,mt and PGD,mt, respectively, represent the power sold and power purchased in the m typical day at t time and Δt is the scheduling step, Δt=1.(3)
Environmental costs: virtual power plants distributed photovoltaic and distributed wind power are clean power generation systems, and their pollutant emissions can be ignored. The gas turbine uses fossil fuels, so it will produce certain air pollutants during the operation of the system. In addition, when purchasing electricity from the main network, it is assumed that thermal power is purchased, which also generates environmental pollutants.The annual pollutant treatment cost of the virtual power plantCENV is expressed as follows:(9)CENV=∑m=1M∑j=1J∑t=1TDmϑnYQTnPQT,mt+YGDnPGD,mtΔt,whereJ represents the types of pollutants, J=3, which are, respectively, CO2, SO2, and NOX, θn is the unit emission treatment fee representing the nth pollutant, YQTn and YGDn, respectively, represent the emission coefficient of jth the pollutant when purchasing power from the grid and distributed gas turbine units in the virtual power plant, and PQT,mt and PGD,mt, respectively, represent the generation power of distributed gas turbine sets and power purchasing power of the grid in the m typical day at t time.(4)
Residual value of the system: system residual value refers to the remaining cost of a certain equipment in the virtual power plant at the end of the project life cycle. The remaining cost can be calculated by using the proportional method, expressed as follows:(10)RSY=ξCINVr1+rLn−1,whereRSY is the residual value income of the virtual power plant equipment, which is generated only at the end of the last year of the life cycle and ξ represents the ratio of residual value return to the initial investment, usually 5% [14].


## 3.1.2. Constraints

(1)
Power balance constraint:(11)PGD,mt−PSD,mt+PWP,mt+PPV,mt+PQT,mt+PESSout,mt−PESSin,mtVPPoutput=PL,mt+PLup,mt−PLdown,mt,wherePL,mt represents the period load.(2)
Distributed power constraint.①
Unit power constraint: for distributed wind power and distributed photovoltaic, the output power constraints of both should meet the following formula:(12)θWP,mtβWPPWP,rated≤PWP,mt≤θWP,mtPWP,rated,θPV,mtβPVPPV,rated≤PPV,mt≤θPV,mtPPV,rated,whereθWP,mt and θPV,mt are the start-stop state of wind turbine and photovoltaic unit and βWP and βPV are the minimum load rates of wind power and photovoltaic, respectively.②
Unit capacity constraint:(13)PWP,min≤PWP,mt≤ζPLt,PPV,min≤PPV,mt≤ζPLt,wherePWP,min and PPV,min represent the minimum output of fan and photovoltaic, respectively, and ζ represents the proportional coefficient of the total load at the same time.(3)
Gas turbine confinement:①
Power constraint:(14)0≤PQT,mt≤PQT,rated.②
Up and down climbing power constraints:(15)PPAmin≤PQT,mt−PQT,mt−1≤PPAmax,wherePPAmin and PPAmax, respectively, represent the up and down climbing power limits of gas turbine units.③
Equipment output constraint:(16)θQT,mtβQTPQT,rated≤PQT,mt≤θQT,mtPQT,rated,whereθQT,mt is the start-stop state of each device at t time and βQT is the minimum load rate of the gas turbine set.④
Capacity constraint:(17)PQT,min≤PQT,rated≤PLmax,wherePQT,min represents the minimum gas turbine capacity and PLmax is the maximum load.(4)
Energy storage constraints:①
Power storage balance constraint: the electric quantity stored by the energy storage batteryQESS,mt at t time is equal to the electric quantity stored at t−1 time plus the actual charging quantity at t time, minus the actual discharge quantity at t time, and the expression is(18)QESS,mt=QESS,mt−1+ηESS,inPESS,in,mt−PESS,out,mtηESS,out,whereQESS,mt represents the energy storage capacity of energy storage battery at t time and ηESS,in and ηESS, out, respectively, represent the charge and discharge efficiency of energy storage equipment.②
Constraints on upper and lower limits of charge:(19)QESS,minPESS,rated≤QESS,mt≤QESS,maxPESS,rated,whereQESS,min and QESS,max, respectively, represent state limits of energy storage battery capacity.③
Constraint of equal power storage in starting and ending states:(20)QESS,m0=QESS,mT−1,whereQESS,m0 represents the energy storage capacity of the initial energy storage battery and QESS,mT−1 represents the electricity stored in the last scheduling period in a scheduling cycle.④
Charge and discharge power constraints: in order to delay the life of energy storage battery, the charge and discharge power of energy storage equipment should be maintained within a certain range:(21)θESS,mintPESS,inmin≤PESS,in,mt≤θESS,mintPESS,inmax,θESS,mouttPESS,outmin≤PESS,out,mt≤θESS,mouttPESS,outmax,PESS,inmax=γESS,inPESS,rated,PESS,outmax=γESS,outPESS,rated,wherePESS,inmax and PESS,outmax, respectively, represent the maximum charging and discharging power of the energy storage equipment and θESS,min and θESS,moutt, respectively, represent the charging and discharging state of the storage equipment at t time, which is represented by 0–1 variables. If the variable is equal to 0, it means that there is no charge/discharge at this time, and if the variable is equal to 1, it means that the charge/discharge occurs at this time. γESS,in and γESS,out, respectively, represent charge and discharge rates of energy storage.⑤
Maximum discharge power constraint of energy storage: the maximum discharge power of the energy storage device should not exceed the maximum load, which can be expressed as follows:(22)0≤PESS,outmax≤PLmax.⑥
Charge/discharge uniqueness constraint:(23)0≤θESS,mint+θESS,moutt≤1.The constraint is to avoid simultaneous charging and discharging of the same energy storage device in the optimization process.(6)
Restrictions on purchasing and selling electricity:①
Purchasing and selling power constraints:(24)θGD,mtPGDmint≤PGD,mt≤θGD,mtPGDmaxt,θSD,mtPSDmint≤PSD,mt≤θSD,mtPSDmaxt,wherePGDmint and PGDmaxt, respectively, represent the maximum value of power purchased from the main network by the virtual power plant in the time period, PSDmint and PSDmaxt, respectively, represent the power limits of the virtual power plant selling electricity to the main network in the time period, and θGD,mt and θSD,mt, respectively, represent the state variables of the virtual power plant purchasing and selling electricity from the main network, which are represented by 0–1 variables. When the value is equal to 1, it means that the purchasing/selling of electricity takes place at this moment; when the value is equal to 0, it means that the purchasing/selling of electricity does not take place at this moment.②
Power purchase/sale uniqueness constraint:(25)0≤θGD,mt+θSD,mt≤1.This means that electricity cannot be bought and sold at the same time.


## 3.2. Operational Optimization Stage

In the operation stage, the capacity of each unit has been obtained from the first stage, the capacity is taken as the constraint condition, IDR is considered in the energy management of the virtual power plant, and the optimal operation scheduling scheme of the unit is obtained by taking the operation cost of typical day and IDR cost as the optimization objective.


### 3.2.1. Objective Function

(26)FOP=CYW,m+CESS,m+CFUE,m+CQT,m+CGRID,m+CDR,m.The daily operating cost modeling of the virtual power plant is the same as described above. IDR considers the compensation cost of transferable load, which is divided into upstream transfer load and downstream transfer load, expressed as follows:(27)CDR,m=Cup,m+Cdown,m,CDR,m=∑t=1TαupPLup,mt+βdownPLdown,mtΔt,where CDR,m represents the daily demand response cost of the m typical day, including the compensation cost of upstream transfer load Cup,m and compensation cost of downstream transfer load Cdown,m, αup and βdown, respectively, represent the compensation coefficient of upstream transfer load and downstream transfer load, and PLup,mt and PLdown,mt, respectively, represent the upward transfer load and downward transfer load in the first period of the m typical day.


### 3.2.2. Constraints

(1)
Demand response constraints;①
Transferable load transfer constraints:(28)0≤PLup,mt≤δL,muptPLt,0≤PLdown,mt≤δL,mdowntφDRPLt,wherePLt represents the load of time period, φDR represents the response proportion of the transferable load, and δL,mup and δL,mdown, respectively, represent the state variables of upstream and downstream load transfer, which are represented by 0–1.②
Balance constraint of transferable load:(29)∑t=1TPLup,mt=∑t=1TPLdown,mt,ensure that the amount of uplink is equal to the amount of cut in a scheduling period.③
Upstream/downstream uniqueness constraints:(30)0≤δL,mupt+δL,mdownt≤1.This means that the uplink and downlink cannot be performed at the same time.(2)
Other constraints: in addition to the demand response constraints, the optimization stage also contains the corresponding capacity constraints and operation constraints, which are the same as those in the planning stage. The difference is that the equipment capacity in the planning stage is a decision variable, and the equipment capacity in the operation stage is a known quantity.


## 3.2.1. Objective Function

(26)FOP=CYW,m+CESS,m+CFUE,m+CQT,m+CGRID,m+CDR,m.The daily operating cost modeling of the virtual power plant is the same as described above. IDR considers the compensation cost of transferable load, which is divided into upstream transfer load and downstream transfer load, expressed as follows:(27)CDR,m=Cup,m+Cdown,m,CDR,m=∑t=1TαupPLup,mt+βdownPLdown,mtΔt,where CDR,m represents the daily demand response cost of the m typical day, including the compensation cost of upstream transfer load Cup,m and compensation cost of downstream transfer load Cdown,m, αup and βdown, respectively, represent the compensation coefficient of upstream transfer load and downstream transfer load, and PLup,mt and PLdown,mt, respectively, represent the upward transfer load and downward transfer load in the first period of the m typical day.


## 3.2.2. Constraints

(1)
Demand response constraints;①
Transferable load transfer constraints:(28)0≤PLup,mt≤δL,muptPLt,0≤PLdown,mt≤δL,mdowntφDRPLt,wherePLt represents the load of time period, φDR represents the response proportion of the transferable load, and δL,mup and δL,mdown, respectively, represent the state variables of upstream and downstream load transfer, which are represented by 0–1.②
Balance constraint of transferable load:(29)∑t=1TPLup,mt=∑t=1TPLdown,mt,ensure that the amount of uplink is equal to the amount of cut in a scheduling period.③
Upstream/downstream uniqueness constraints:(30)0≤δL,mupt+δL,mdownt≤1.This means that the uplink and downlink cannot be performed at the same time.(2)
Other constraints: in addition to the demand response constraints, the optimization stage also contains the corresponding capacity constraints and operation constraints, which are the same as those in the planning stage. The difference is that the equipment capacity in the planning stage is a decision variable, and the equipment capacity in the operation stage is a known quantity.


## 4. Methods

Unit output and energy storage constraints in the capacity planning stage and operation optimization stage contain both 0–1 variables and continuous variables, which are typical mixed integer nonlinear programming. In [15], a nested constraints are used for the nonlinear decoupling method, the core idea of the method is through the capacity constraint expanded output range of all equipment and then determines the equipment according to equipment start-stop state in output constraints, so as to realize decoupling between variables, which will eventually nonlinear constraints is converted to linear constraints. The following takes gas turbine unit as an example to illustrate the implementation steps of constraint nesting.SincePGT,min≤PGT,rated≤PLmax,the output range of gas turbine equipment can be divided into(31)θGT,mtβGTPGT,rated≤PGT,mt≤θGT,mtPGT,rated,which expand to(32)θGT,mtβGTPGT,min≤PGT,mt≤θGT,mtPLmax.WhenθGT,mt=0, the output constraint of the device is(33)PGT,mt=0.WhenθGT,mt=1, the output constraint of the device is(34)βGTPGT,min≤PGT,mt≤PGT,rated.Similarly, the nonlinear constrained transformation of other devices is also treated with this method, which will not be described again.After processing, the virtual power plant capacity optimization model is transformed from mixed integer nonlinear programming to mixed integer linear programming, which is modeled by YALMIP syntax in the Matlab environment and solved by a CPLEX solver.


## 5. Case Study

### 5.1. Parameters

Taking a certain region in north China as an example for example analysis, considering the seasonal characteristics of north China, this study selected one day in summer, winter, and transition season as a typical scene, with the duration of 108 days in summer, 139 days in transition season, and 118 days in winter, respectively. The load of three typical days is shown in Figure3. Relevant technical and economic parameters are shown in Table 1, pollutant emission and environmental governance parameters are shown in Table 2, and real-time purchase and sale price parameters are shown in Table 3. Typical daily PV output forecast is shown in Figure 4. The forecast output of typical daily wind power is shown in Figure 5.Figure 3
Typical daily load in summer, winter, and transition season.Table 1
Related technical and economic parameters.
ParametersValuesUPV/(CNY)9000UESS/(CNY)650r0.067LWP/(year)20LGAS/(year)20λWP/(CNY/kW)0.06VQT/(CNY/m3)3.2ηQT/%40%ηESS,in/%95%QESS,min/kW0.2γESS,in/%20%PPAmin/kW10γQT/(CNY/kW)6ρP/(c/m3)1Vin/(m/s)3Vrated/(m/s)12βWP/%10%ζ20%UWP/(CNY)6000UQT/(CNY)6000φESS/(year/kW)0.002LPV/(year)30FQT0/(year)20λPV/(CNY/kW)0.009FQT0/(kW/m3)9.7ξ/%5%ηESS,out/%95%QESS,max/kW0.8γESS,out/%20%PPAmax/kW150QESS,m0/kW0.3Te/(C/m3)298Vout/(m/s)25LHV/(J/kg)9.75βPV/%10%βGT/%10%Table 2
Pollutant emission parameters.
PollutantsCO2SO2NOXEmission coefficient of thermal power unit/(g/kWh)3151.781.55Emission coefficient of gas turbine set/(g/kWh)203.740.0110.202Unit governance cost/(CNY/kg)0.2015.1763.02Table 3
Time-of-use price parameters.
Period of timeTimePurchase price/(CNY/kWh)Selling price (CNY/kWh)Peak time8 : 00–11 : 000.98620.620319 : 00–23 : 000.98620.6203Flat time12 : 00–18 : 000.66440.3951Valley time24 : 00–7 : 000.34830.2438Figure 4
Forecast output curve of typical day PV.Figure 5
Forecast output curve of typical day wind power.


### 5.2. Results of Capacity Planning Stage

In order to illustrate the effectiveness of the model and explore the impact of energy storage devices on capacity planning of the virtual power plant, the following scenarios are set up in this study. In scenario 1, the virtual power plant only aggregates distributed PV and distributed fan and gas turbine and calculates economic and environmental indicators. In scenario 2, an energy storage device is added to the virtual power plant based on scenario 1, including integrated energy storage, distributed PV, distributed fan, and gas turbine, and economic and environmental indicators are calculated.To illustrate the effectiveness of the model and explore the impact of energy storage devices on capacity planning of the virtual power plant, the following scenarios are set up in this study. In scenario 1, the virtual power plant only aggregates distributed PV, distributed fan, and gas turbine and calculates economic and environmental indicators. In scenario 2, an energy storage device is added to the virtual power plant based on Scenario 1, including integrated energy storage, distributed PV, distributed fan, and gas turbine, and economic and environmental indicators are calculated.Table4 shows the economic results of capacity configuration in the two scenarios. When energy storage is configured, the investment cost is 12.41% higher than that, without energy storage because new equipment needs to be invested. When no energy storage is configured, the annual start-up and shutdown cost of the gas turbine is 0, indicating that there is no energy storage for energy decoupling, and the gas turbine unit keeps running at all times. This will reduce the purchase of electricity from the main network of the virtual power plant, and the interaction cost of the grid in the scenario with energy storage is 19.34% lower. However, as the fuel cost of the virtual power plant only comes from the gas turbine unit, the fuel cost in the scenario without energy storage will increase by 33.60% compared with the scenario without energy storage. In addition, in the energy storage scenario, power purchase and storage can be carried out in the off-peak period of power grid load; that is, the electricity price is low. Therefore, the interaction cost of the power grid in the energy storage scenario is relatively high, which also leads to the relatively high environmental governance cost in the energy storage scenario.Table 4
Economic results of each scene.
Cost typeScenario 1Scenario 2Equivalent annual investment cost/ten thousand yuan321.72361.64Annual unit operation and maintenance cost/ten thousand yuan43.8637.50Annual fuel cost/ten thousand yuan640.39479.32Annual environmental management cost/ten thousand yuan207.16225.38Annual main network interaction cost/ten thousand yuan314.65390.11Annual gas unit start-up and shutdown cost/ten thousand yuan00.85Annual salvage value/ten thousand yuan3.804.69Total annual cost/ten thousand yuan1523.981490.10This is because the environmental pollution of a virtual power plant consists mainly of emissions from within the gas turbine unit and emissions from the thermal unit when power is purchased. The emissions per unit power of thermal units are however much higher than the unit power output of gas turbine units. Therefore, the environmental cost mainly depends on the amount of electricity purchased from the main network by the system. The interaction cost of the main network with energy storage is high, and its environmental cost is relatively large. The annual environmental pollution emission is about 6,540,111 kg, which is 390,538 kg more than that without energy storage. Table5 shows the planning results of each resource capacity.Table 5
Capacity configuration results of each scene.
The unit typeScenario 1Scenario 2Distributed PV (kW)1293.311293.31Distributed wind power (kW)2214.562214.56Gas turbine (kW)1956.151500.00Energy storage (kW)—9304.11In summary, the total annual cost of the scenario with energy storage is 14.910 million yuan and that of the scenario without energy storage is 15.2398 million yuan. From the point of view of environmental protection, the environmental benefit of not configuring energy storage is greater, but there is not much difference between the two as shown in Table6. Therefore, investors should still choose the scheme with greater economic benefits; that is, the allocation of energy storage is the best scheme for virtual power plant planning, which also verifies the validity and rationality of the capacity planning model proposed in this paper.Table 6
Pollutant emission results of each scene.
PollutantsScenario 1Scenario 2CO2/kg6122868.046521220.16SO2/kg12259.717445.90NOX/kg14445.2911445.66Total emissions/kg6149573.046540111.72


### 5.3. Results of Optimization Stage

In order to verify the impact of demand response on the operation optimization stage, the following scenarios are set in this study: IDR is not considered in scenario 1. Scenario 2 considers IDR's participation in load regulation and provides corresponding subsidies. First, the scheduling output plan and corresponding operating cost index of three typical days are calculated, respectively, in the two scenarios to verify the effectiveness of the proposed optimization model. Second, the results of dispatching output of each equipment and the state of charge of energy storage equipment with IDR participation are analyzed. Finally, the optimization effect of IDR participation on load curve was verified, and the sensitivity of IDR participation to optimization effect was explored.


#### 5.3.1. Analysis of the Effect of Demand Response

Table7 shows the daily operating costs for the two scenarios in summer, transition season, and winter, respectively. The total operating cost of Scenario 2 is lower by 2,000 CNY/day relative to Scenario 1 because both scenarios operate the same PV and turbine base of the virtual power plant system in order to meet customer load, as the unit operating cost of Scenario 1 also does not participate in demand response and will be covered by the gas turbine generating units when system load demand increases and is met by purchasing power from the grid. Over three typical days, the average daily fuel cost for Scenario 1 is 13,600 CNY, 5.15% higher than Scenario 2, and the average daily main grid interaction cost for Scenario 1 is 33,100 CNY, 3.63% higher than Scenario 2. The lower fuel cost and main grid interaction cost in Scenario 1 are compared to the subsidy cost of demand response in Scenario 2 resulting in a lower total operating cost in Scenario 2. This indicates that the introduction of incentive demand response in the virtual power plant system can lead to better operational cost savings and validates the effectiveness of the operational optimization model with demand response proposed in this paper.Table 7
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.090.090.130.090.090.13Cost of fuel1.570.711.791.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.720.362.230.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0000.230.020.052.961.465.172.931.465.00Total cost9.599.39Figures6–8 show the optimal scheduling results of unit daily operation in typical days and IDR in summer, transition season, and winter, respectively. During 00 : 00–5:00 at night, the pv output value is 0, and the electric energy is mainly maintained by fans, gas turbines, and the purchase of electricity from the main network, and the purchase of electricity from the main network accounts for a higher proportion. This is because the cost of purchasing electricity from the main network is relatively low. During the period of 6 : 00–14 : 00, the load continues to increase and reaches the peak value. The output of gas turbine, fan, and photovoltaic unit also gradually increases. The energy storage equipment also performs discharge energy supply during the peak load period. In summer and winter when the load value is relatively high, the load from 15 : 00 to 18 : 00 is still at a high level. Besides self-supply, electricity needs to be purchased from the main network again to meet the load demand. During 19:00-24:00, when the load is in the declining phase, the gas turbine is always on and provides more power. This is due to the peak power consumption period when purchasing power from the power purchasing entity will bear higher costs. It is more economical and reliable to use gas turbine units and discharge energy storage systems.Figure 6
Unit output plan of typical summer days.Figure 7
Unit output plan of typical day in transition season.Figure 8
Unit output plan on typical winter days.In order to verify the effect of IDR on load curve optimization, this study compared the load curve before and after participation in demand response in three typical days (see Figure9) and the load response variation (see Figure 10). In the three typical days, when the electricity load is at a low point, the incentive demand responds to the user’s increase in electricity consumption and reduces the electricity consumption in the two peak periods, respectively, so as to realize the space-time transfer of electricity load. Therefore, the incentive demand response can effectively respond to the demand of system peak cutting and valley filling, so as to improve the stability and economy of the system.Figure 9
Load curves before and after IDR in typical days.Figure 10
Load variation before and after IDR in typical days.In order to explore the influence of IDR participation degree on system optimal operation, a typical day in summer was taken as an example to set the participation degree to 10%, 15%, and 20%, respectively, and the parameter sensitivity analysis was conducted by comparing the system operation cost. The results show that, with the increase of the participation ratio of demand response, although the compensation cost of demand response increases, the total operating cost presents a downward trend. This is because the higher the proportion of demand response is, the user realizes the balance of power generation and consumption of the system through load transfer in peak hours and low hours, thus reducing the cost of purchasing power from the main network in the high price period when the original rigid power consumption mode is short of power. It is worth noting that the demand response participation ratio should not be too high and should be controlled within a reasonable range. Detailed results are shown in Table8.Table 8
Sensitivity analysis results of demand response participation on system operation.
Cost type/100 yuanDegree of demand response participation10%15%20%Operation and maintenance costs8.708.688.68Cost of fuel153.76153.35153.34Environmental costs58.4058.4458.43Cost of interaction72.2971.3570.00Cost of start and stop0.180.180.18Cost of response1.131.702.26Total cost294.46293.69292.89


#### 5.3.2. Analysis of the Effect of Energy Storage

To verify the influence of energy storage on the operation optimization stage, the following scenarios are set in this study: scenario 1 does not consider aggregated energy storage; scenario 2 considers aggregated energy storage. In both scenarios, the dispatch output plan and the corresponding operating cost indexes are calculated for a typical day in summer, transition season, and winter to verify the effectiveness of the proposed optimization model, as shown in Table9. It can be seen that the addition of energy storage equipment can maximize the use of renewable energy while purchasing power on the grid during periods of low electricity prices, thus reducing the total system operating costs.Table 9
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.080.080.100.090.090.13Cost of fuel1.600.721.821.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.750.392.320.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0.260.020.060.230.020.053.191.445.222.931.465.00Total cost9.869.39Figure11 shows the change of the charged state of the energy storage device. The initial charge is 0.3 KW. At 5 : 00–7:00 in the trough period, the user’s load demand is relatively low, and the real-time electricity price of the main network is low. At this time, the virtual power plant purchases electricity from the main network and stores part of the energy through the energy storage device so that the system can discharge during the peak load period to meet the peak load demand and to reduce the purchase of electricity in the high-price period of the main network. In addition, in order to delay the life of the energy storage device, the initial and final state charge of the energy storage device is equal to 0.3 kW. As far as the utilization rate is concerned, it can be found that VPP can largely utilize the energy storage equipment after aggregating the energy storage equipment and has a high utilization rate.Figure 11
Change curve of energy storage charge state.


## 5.1. Parameters

Taking a certain region in north China as an example for example analysis, considering the seasonal characteristics of north China, this study selected one day in summer, winter, and transition season as a typical scene, with the duration of 108 days in summer, 139 days in transition season, and 118 days in winter, respectively. The load of three typical days is shown in Figure3. Relevant technical and economic parameters are shown in Table 1, pollutant emission and environmental governance parameters are shown in Table 2, and real-time purchase and sale price parameters are shown in Table 3. Typical daily PV output forecast is shown in Figure 4. The forecast output of typical daily wind power is shown in Figure 5.Figure 3
Typical daily load in summer, winter, and transition season.Table 1
Related technical and economic parameters.
ParametersValuesUPV/(CNY)9000UESS/(CNY)650r0.067LWP/(year)20LGAS/(year)20λWP/(CNY/kW)0.06VQT/(CNY/m3)3.2ηQT/%40%ηESS,in/%95%QESS,min/kW0.2γESS,in/%20%PPAmin/kW10γQT/(CNY/kW)6ρP/(c/m3)1Vin/(m/s)3Vrated/(m/s)12βWP/%10%ζ20%UWP/(CNY)6000UQT/(CNY)6000φESS/(year/kW)0.002LPV/(year)30FQT0/(year)20λPV/(CNY/kW)0.009FQT0/(kW/m3)9.7ξ/%5%ηESS,out/%95%QESS,max/kW0.8γESS,out/%20%PPAmax/kW150QESS,m0/kW0.3Te/(C/m3)298Vout/(m/s)25LHV/(J/kg)9.75βPV/%10%βGT/%10%Table 2
Pollutant emission parameters.
PollutantsCO2SO2NOXEmission coefficient of thermal power unit/(g/kWh)3151.781.55Emission coefficient of gas turbine set/(g/kWh)203.740.0110.202Unit governance cost/(CNY/kg)0.2015.1763.02Table 3
Time-of-use price parameters.
Period of timeTimePurchase price/(CNY/kWh)Selling price (CNY/kWh)Peak time8 : 00–11 : 000.98620.620319 : 00–23 : 000.98620.6203Flat time12 : 00–18 : 000.66440.3951Valley time24 : 00–7 : 000.34830.2438Figure 4
Forecast output curve of typical day PV.Figure 5
Forecast output curve of typical day wind power.


## 5.2. Results of Capacity Planning Stage

In order to illustrate the effectiveness of the model and explore the impact of energy storage devices on capacity planning of the virtual power plant, the following scenarios are set up in this study. In scenario 1, the virtual power plant only aggregates distributed PV and distributed fan and gas turbine and calculates economic and environmental indicators. In scenario 2, an energy storage device is added to the virtual power plant based on scenario 1, including integrated energy storage, distributed PV, distributed fan, and gas turbine, and economic and environmental indicators are calculated.To illustrate the effectiveness of the model and explore the impact of energy storage devices on capacity planning of the virtual power plant, the following scenarios are set up in this study. In scenario 1, the virtual power plant only aggregates distributed PV, distributed fan, and gas turbine and calculates economic and environmental indicators. In scenario 2, an energy storage device is added to the virtual power plant based on Scenario 1, including integrated energy storage, distributed PV, distributed fan, and gas turbine, and economic and environmental indicators are calculated.Table4 shows the economic results of capacity configuration in the two scenarios. When energy storage is configured, the investment cost is 12.41% higher than that, without energy storage because new equipment needs to be invested. When no energy storage is configured, the annual start-up and shutdown cost of the gas turbine is 0, indicating that there is no energy storage for energy decoupling, and the gas turbine unit keeps running at all times. This will reduce the purchase of electricity from the main network of the virtual power plant, and the interaction cost of the grid in the scenario with energy storage is 19.34% lower. However, as the fuel cost of the virtual power plant only comes from the gas turbine unit, the fuel cost in the scenario without energy storage will increase by 33.60% compared with the scenario without energy storage. In addition, in the energy storage scenario, power purchase and storage can be carried out in the off-peak period of power grid load; that is, the electricity price is low. Therefore, the interaction cost of the power grid in the energy storage scenario is relatively high, which also leads to the relatively high environmental governance cost in the energy storage scenario.Table 4
Economic results of each scene.
Cost typeScenario 1Scenario 2Equivalent annual investment cost/ten thousand yuan321.72361.64Annual unit operation and maintenance cost/ten thousand yuan43.8637.50Annual fuel cost/ten thousand yuan640.39479.32Annual environmental management cost/ten thousand yuan207.16225.38Annual main network interaction cost/ten thousand yuan314.65390.11Annual gas unit start-up and shutdown cost/ten thousand yuan00.85Annual salvage value/ten thousand yuan3.804.69Total annual cost/ten thousand yuan1523.981490.10This is because the environmental pollution of a virtual power plant consists mainly of emissions from within the gas turbine unit and emissions from the thermal unit when power is purchased. The emissions per unit power of thermal units are however much higher than the unit power output of gas turbine units. Therefore, the environmental cost mainly depends on the amount of electricity purchased from the main network by the system. The interaction cost of the main network with energy storage is high, and its environmental cost is relatively large. The annual environmental pollution emission is about 6,540,111 kg, which is 390,538 kg more than that without energy storage. Table5 shows the planning results of each resource capacity.Table 5
Capacity configuration results of each scene.
The unit typeScenario 1Scenario 2Distributed PV (kW)1293.311293.31Distributed wind power (kW)2214.562214.56Gas turbine (kW)1956.151500.00Energy storage (kW)—9304.11In summary, the total annual cost of the scenario with energy storage is 14.910 million yuan and that of the scenario without energy storage is 15.2398 million yuan. From the point of view of environmental protection, the environmental benefit of not configuring energy storage is greater, but there is not much difference between the two as shown in Table6. Therefore, investors should still choose the scheme with greater economic benefits; that is, the allocation of energy storage is the best scheme for virtual power plant planning, which also verifies the validity and rationality of the capacity planning model proposed in this paper.Table 6
Pollutant emission results of each scene.
PollutantsScenario 1Scenario 2CO2/kg6122868.046521220.16SO2/kg12259.717445.90NOX/kg14445.2911445.66Total emissions/kg6149573.046540111.72


## 5.3. Results of Optimization Stage

In order to verify the impact of demand response on the operation optimization stage, the following scenarios are set in this study: IDR is not considered in scenario 1. Scenario 2 considers IDR's participation in load regulation and provides corresponding subsidies. First, the scheduling output plan and corresponding operating cost index of three typical days are calculated, respectively, in the two scenarios to verify the effectiveness of the proposed optimization model. Second, the results of dispatching output of each equipment and the state of charge of energy storage equipment with IDR participation are analyzed. Finally, the optimization effect of IDR participation on load curve was verified, and the sensitivity of IDR participation to optimization effect was explored.


### 5.3.1. Analysis of the Effect of Demand Response

Table7 shows the daily operating costs for the two scenarios in summer, transition season, and winter, respectively. The total operating cost of Scenario 2 is lower by 2,000 CNY/day relative to Scenario 1 because both scenarios operate the same PV and turbine base of the virtual power plant system in order to meet customer load, as the unit operating cost of Scenario 1 also does not participate in demand response and will be covered by the gas turbine generating units when system load demand increases and is met by purchasing power from the grid. Over three typical days, the average daily fuel cost for Scenario 1 is 13,600 CNY, 5.15% higher than Scenario 2, and the average daily main grid interaction cost for Scenario 1 is 33,100 CNY, 3.63% higher than Scenario 2. The lower fuel cost and main grid interaction cost in Scenario 1 are compared to the subsidy cost of demand response in Scenario 2 resulting in a lower total operating cost in Scenario 2. This indicates that the introduction of incentive demand response in the virtual power plant system can lead to better operational cost savings and validates the effectiveness of the operational optimization model with demand response proposed in this paper.Table 7
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.090.090.130.090.090.13Cost of fuel1.570.711.791.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.720.362.230.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0000.230.020.052.961.465.172.931.465.00Total cost9.599.39Figures6–8 show the optimal scheduling results of unit daily operation in typical days and IDR in summer, transition season, and winter, respectively. During 00 : 00–5:00 at night, the pv output value is 0, and the electric energy is mainly maintained by fans, gas turbines, and the purchase of electricity from the main network, and the purchase of electricity from the main network accounts for a higher proportion. This is because the cost of purchasing electricity from the main network is relatively low. During the period of 6 : 00–14 : 00, the load continues to increase and reaches the peak value. The output of gas turbine, fan, and photovoltaic unit also gradually increases. The energy storage equipment also performs discharge energy supply during the peak load period. In summer and winter when the load value is relatively high, the load from 15 : 00 to 18 : 00 is still at a high level. Besides self-supply, electricity needs to be purchased from the main network again to meet the load demand. During 19:00-24:00, when the load is in the declining phase, the gas turbine is always on and provides more power. This is due to the peak power consumption period when purchasing power from the power purchasing entity will bear higher costs. It is more economical and reliable to use gas turbine units and discharge energy storage systems.Figure 6
Unit output plan of typical summer days.Figure 7
Unit output plan of typical day in transition season.Figure 8
Unit output plan on typical winter days.In order to verify the effect of IDR on load curve optimization, this study compared the load curve before and after participation in demand response in three typical days (see Figure9) and the load response variation (see Figure 10). In the three typical days, when the electricity load is at a low point, the incentive demand responds to the user’s increase in electricity consumption and reduces the electricity consumption in the two peak periods, respectively, so as to realize the space-time transfer of electricity load. Therefore, the incentive demand response can effectively respond to the demand of system peak cutting and valley filling, so as to improve the stability and economy of the system.Figure 9
Load curves before and after IDR in typical days.Figure 10
Load variation before and after IDR in typical days.In order to explore the influence of IDR participation degree on system optimal operation, a typical day in summer was taken as an example to set the participation degree to 10%, 15%, and 20%, respectively, and the parameter sensitivity analysis was conducted by comparing the system operation cost. The results show that, with the increase of the participation ratio of demand response, although the compensation cost of demand response increases, the total operating cost presents a downward trend. This is because the higher the proportion of demand response is, the user realizes the balance of power generation and consumption of the system through load transfer in peak hours and low hours, thus reducing the cost of purchasing power from the main network in the high price period when the original rigid power consumption mode is short of power. It is worth noting that the demand response participation ratio should not be too high and should be controlled within a reasonable range. Detailed results are shown in Table8.Table 8
Sensitivity analysis results of demand response participation on system operation.
Cost type/100 yuanDegree of demand response participation10%15%20%Operation and maintenance costs8.708.688.68Cost of fuel153.76153.35153.34Environmental costs58.4058.4458.43Cost of interaction72.2971.3570.00Cost of start and stop0.180.180.18Cost of response1.131.702.26Total cost294.46293.69292.89


### 5.3.2. Analysis of the Effect of Energy Storage

To verify the influence of energy storage on the operation optimization stage, the following scenarios are set in this study: scenario 1 does not consider aggregated energy storage; scenario 2 considers aggregated energy storage. In both scenarios, the dispatch output plan and the corresponding operating cost indexes are calculated for a typical day in summer, transition season, and winter to verify the effectiveness of the proposed optimization model, as shown in Table9. It can be seen that the addition of energy storage equipment can maximize the use of renewable energy while purchasing power on the grid during periods of low electricity prices, thus reducing the total system operating costs.Table 9
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.080.080.100.090.090.13Cost of fuel1.600.721.821.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.750.392.320.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0.260.020.060.230.020.053.191.445.222.931.465.00Total cost9.869.39Figure11 shows the change of the charged state of the energy storage device. The initial charge is 0.3 KW. At 5 : 00–7:00 in the trough period, the user’s load demand is relatively low, and the real-time electricity price of the main network is low. At this time, the virtual power plant purchases electricity from the main network and stores part of the energy through the energy storage device so that the system can discharge during the peak load period to meet the peak load demand and to reduce the purchase of electricity in the high-price period of the main network. In addition, in order to delay the life of the energy storage device, the initial and final state charge of the energy storage device is equal to 0.3 kW. As far as the utilization rate is concerned, it can be found that VPP can largely utilize the energy storage equipment after aggregating the energy storage equipment and has a high utilization rate.Figure 11
Change curve of energy storage charge state.


## 5.3.1. Analysis of the Effect of Demand Response

Table7 shows the daily operating costs for the two scenarios in summer, transition season, and winter, respectively. The total operating cost of Scenario 2 is lower by 2,000 CNY/day relative to Scenario 1 because both scenarios operate the same PV and turbine base of the virtual power plant system in order to meet customer load, as the unit operating cost of Scenario 1 also does not participate in demand response and will be covered by the gas turbine generating units when system load demand increases and is met by purchasing power from the grid. Over three typical days, the average daily fuel cost for Scenario 1 is 13,600 CNY, 5.15% higher than Scenario 2, and the average daily main grid interaction cost for Scenario 1 is 33,100 CNY, 3.63% higher than Scenario 2. The lower fuel cost and main grid interaction cost in Scenario 1 are compared to the subsidy cost of demand response in Scenario 2 resulting in a lower total operating cost in Scenario 2. This indicates that the introduction of incentive demand response in the virtual power plant system can lead to better operational cost savings and validates the effectiveness of the operational optimization model with demand response proposed in this paper.Table 7
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.090.090.130.090.090.13Cost of fuel1.570.711.791.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.720.362.230.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0000.230.020.052.961.465.172.931.465.00Total cost9.599.39Figures6–8 show the optimal scheduling results of unit daily operation in typical days and IDR in summer, transition season, and winter, respectively. During 00 : 00–5:00 at night, the pv output value is 0, and the electric energy is mainly maintained by fans, gas turbines, and the purchase of electricity from the main network, and the purchase of electricity from the main network accounts for a higher proportion. This is because the cost of purchasing electricity from the main network is relatively low. During the period of 6 : 00–14 : 00, the load continues to increase and reaches the peak value. The output of gas turbine, fan, and photovoltaic unit also gradually increases. The energy storage equipment also performs discharge energy supply during the peak load period. In summer and winter when the load value is relatively high, the load from 15 : 00 to 18 : 00 is still at a high level. Besides self-supply, electricity needs to be purchased from the main network again to meet the load demand. During 19:00-24:00, when the load is in the declining phase, the gas turbine is always on and provides more power. This is due to the peak power consumption period when purchasing power from the power purchasing entity will bear higher costs. It is more economical and reliable to use gas turbine units and discharge energy storage systems.Figure 6
Unit output plan of typical summer days.Figure 7
Unit output plan of typical day in transition season.Figure 8
Unit output plan on typical winter days.In order to verify the effect of IDR on load curve optimization, this study compared the load curve before and after participation in demand response in three typical days (see Figure9) and the load response variation (see Figure 10). In the three typical days, when the electricity load is at a low point, the incentive demand responds to the user’s increase in electricity consumption and reduces the electricity consumption in the two peak periods, respectively, so as to realize the space-time transfer of electricity load. Therefore, the incentive demand response can effectively respond to the demand of system peak cutting and valley filling, so as to improve the stability and economy of the system.Figure 9
Load curves before and after IDR in typical days.Figure 10
Load variation before and after IDR in typical days.In order to explore the influence of IDR participation degree on system optimal operation, a typical day in summer was taken as an example to set the participation degree to 10%, 15%, and 20%, respectively, and the parameter sensitivity analysis was conducted by comparing the system operation cost. The results show that, with the increase of the participation ratio of demand response, although the compensation cost of demand response increases, the total operating cost presents a downward trend. This is because the higher the proportion of demand response is, the user realizes the balance of power generation and consumption of the system through load transfer in peak hours and low hours, thus reducing the cost of purchasing power from the main network in the high price period when the original rigid power consumption mode is short of power. It is worth noting that the demand response participation ratio should not be too high and should be controlled within a reasonable range. Detailed results are shown in Table8.Table 8
Sensitivity analysis results of demand response participation on system operation.
Cost type/100 yuanDegree of demand response participation10%15%20%Operation and maintenance costs8.708.688.68Cost of fuel153.76153.35153.34Environmental costs58.4058.4458.43Cost of interaction72.2971.3570.00Cost of start and stop0.180.180.18Cost of response1.131.702.26Total cost294.46293.69292.89


## 5.3.2. Analysis of the Effect of Energy Storage

To verify the influence of energy storage on the operation optimization stage, the following scenarios are set in this study: scenario 1 does not consider aggregated energy storage; scenario 2 considers aggregated energy storage. In both scenarios, the dispatch output plan and the corresponding operating cost indexes are calculated for a typical day in summer, transition season, and winter to verify the effectiveness of the proposed optimization model, as shown in Table9. It can be seen that the addition of energy storage equipment can maximize the use of renewable energy while purchasing power on the grid during periods of low electricity prices, thus reducing the total system operating costs.Table 9
Daily operation cost results of each scenario.
Cost type/ten thousand yuanScenario 1Scenario 2SummerTransition seasonWinterSummerTransition seasonWinterOperation and maintenance costs0.080.080.100.090.090.13Cost of fuel1.600.721.821.530.641.71Environmental costs0.580.311.020.580.311.02Cost of interaction0.750.392.320.700.402.09Cost of start and stop0.00180.00420.00060.00180.00420.0006Cost of response0.260.020.060.230.020.053.191.445.222.931.465.00Total cost9.869.39Figure11 shows the change of the charged state of the energy storage device. The initial charge is 0.3 KW. At 5 : 00–7:00 in the trough period, the user’s load demand is relatively low, and the real-time electricity price of the main network is low. At this time, the virtual power plant purchases electricity from the main network and stores part of the energy through the energy storage device so that the system can discharge during the peak load period to meet the peak load demand and to reduce the purchase of electricity in the high-price period of the main network. In addition, in order to delay the life of the energy storage device, the initial and final state charge of the energy storage device is equal to 0.3 kW. As far as the utilization rate is concerned, it can be found that VPP can largely utilize the energy storage equipment after aggregating the energy storage equipment and has a high utilization rate.Figure 11
Change curve of energy storage charge state.


## 6. Conclusion

This study focuses on capacity planning and operation optimization correlation of virtual power plant and establishes a two-stage progressive optimization model. Energy storage equipment is introduced in the planning and configuration stage of the virtual power plant, and incentive demand response is introduced in the optimization operation stage. The research conclusions are as follows:(1)
Virtual power plants with energy storage are considered to make reasonable charging and discharging strategies according to real-time electricity price and actual load situation, which can effectively increase the flexibility of energy flow and significantly improve the rationality of system investment and economic operation. The results show that the virtual plant with aggregated load and energy storage has a 2.1% lower daily operating cost than the virtual plant without aggregation.(2)
Taking the demand response into account, the optimized operation stage can effectively reduce the daily operation cost and optimize the power load curve of users, motivate users to participate in peak-cutting and valley-filling, and better realize the optimal allocation of resources.(3)
Participation degree of demand response has a certain influence on the operation effect of the virtual power plant. There is a negative correlation between the degree of demand response participation and the daily operating cost of the system. It is very important to select the appropriate scale of responding users to participate in system regulation to improve the operation economy and stability of virtual power plants. The higher the level of demand response participation, the lower the daily operating cost. However, the impact on customer satisfaction with energy use cannot be ignored.(4)
The two-stage capacity planning and operation optimization model proposed in this paper first determines the optimal capacity allocation scheme of resources and guides the virtual power plant operation with this output boundary, so the optimization results are more consistent with reality.The model constructed in this study ignores the impact of scenery out uncertainty on capacity planning and operation optimization results and also does not consider the impact of the current carbon market on capacity allocation and operation optimization results. In the future, we will build on this study to model the uncertainty of scenery and consider the impact of multiple energy and environmental markets [21].



---

*Source: 7055106-2022-11-28.xml*