# Construction of an Optimal Scheduling Method for Campus Energy Systems Based on Deep Learning Models

Authors: Jingyun Li; Hong Zhao
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Aiming at the problem of high cost and low efficiency of planning and scheduling caused by load uncertainty of campus energy system, a 3-layer planning and scheduling model based on multivariate load prediction is proposed, mainly including prediction layer, planning layer, and scheduling layer; a long-term and short-term prediction model of multivariate load is constructed based on random forest regression network and long and short-term memory network. With the objective of minimizing the comprehensive planning and scheduling cost and the scheduling operation cost, the optimal comprehensive system cost and configuration scheme are obtained by using improved particle swarm algorithm and CPLEX solver; the equipment status and system cost are analyzed by planning and scheduling under different scenarios. By comparing the planning and scheduling results of the constructed 3-layer model with the conventional two-layer model, the economy and reliability of the 3-layer planning and scheduling model are demonstrated.


---

## Body

## 1. Introduction

Overdependence on fossil energy has always been one of the serious problems limiting energy development. According to the current demand of energy for social development of each country, the storage of oil, fossil, and other nonrenewable energy sources will no longer be able to supply the sustainable development of human society in the long term. Facing the serious energy problem, China tries to find the solution to the problem from the perspective of “integrated energy” which is complemented by renewable energy and traditional energy [1]. Therefore, under the background of national strong support for the construction of renewable energy power plants, the new energy generation led by wind power and photovoltaic has been developed rapidly.When wind power and photovoltaic power generation units are connected to the power grid, the random fluctuation of their output will have an impact on the safe and reliable operation environment of the power grid. Although experts and scholars at home and abroad are carrying out research on improving the accuracy of wind power and photovoltaic output prediction, it is difficult for the prediction results to achieve satisfactory accuracy and there are prediction errors. In recent years, with the continuous expansion of renewable energy entering the power market, the operation of power grid is to ensure safety and reliability, and reduce the proportion of power generation from other energy sources. These phenomena are consistent with the national energy development trend [2]. Integrated energy system is a small energy system that organically combines wind power, PV, and other distributed renewable power sources, user multienergy demand, energy coupling equipment, and multienergy storage devices, with self-management and control functions, providing an effective solution for new energy access and consumption [3].In the integrated energy system, multiple forms of energy flow in the system, effectively promoting the complementary and coordinated use of energy sources, while helping to improve energy utilization efficiency, increase the penetration rate of renewable energy in the grid, reduceCO2 emissions, reduce the pollution caused by fossil energy to the environment, and achieve the purpose of reducing operating costs [4]. The park-level integrated energy system is an important carrier to achieve energy synergy and complementarity, and the coupling of multiple energy sources and the coordination of power output between devices in the park can be used to achieve efficient utilization of energy, while reducing operating costs and increasing the consumption of renewable energy. In summary, it is important to conduct in-depth research on the integrated energy system at the campus level [5].In summary, this paper takes multienergy complementarity, cost saving, efficient energy use, and green environment protection as the starting point, addresses the problems of complex energy coupling in the system, difficulty in optimal scheduling, and uncertainties on the supply side and user side, takes the actual industrial park as an example, and establishes the park based on the analysis of the mathematical model of the park equipment and prediction uncertainties; combined with conditional risk value assessment CVaR theory and model prediction control the project is based on the analysis of the mathematical model of the park equipment and the prediction determinism. The project inherits and carries forward the advantages of integrated energy system optimal scheduling from existing research and has practical significance [6].


## 2. Related Work

At present, domestic and foreign scholars’ research on integrated energy systems mainly focuses on four aspects: modeling and energy flow analysis, market multiactor game, coordinated planning, and optimal scheduling. In terms of energy flow analysis research, [7] introduces the concept of probabilistic energy flow in integrated energy systems, and [8] analyzes the energy flow of electricity-gas hybrid networks based on the maximum entropy principle. Paper [9] analyzed in detail the coupling and conversion of energy sources in the system based on the energy hub model for optimal scheduling of regional integrated energy systems. For the uncertainties of wind power and PV access and electric and thermal loads, [10] establishes interval energy flow models and probabilistic optimal models, respectively, to reduce the impact of uncertainties on the system. In terms of the market multisubject game, [11] constructed a stochastic optimization model of the park considering cooperative alliances and a multisubject benefit distribution model. According to different game subjects, the study of multisubject game in integrated energy system covers dynamic game among power generation companies, grid companies, and natural gas companies [12], master-slave game among energy sellers and combined cooling, heating, and power operators and load aggregators [13], and demand response evolution game among users based on nodal energy prices [14], etc. In terms of integrated energy system coordination planning, [15] established a regional system planning model considering interconnection interactions and analyzed the model in terms of energy station planning, energy network planning, and joint station-network planning in different scenarios to provide an outlook. In [16], a source-side capacity planning model that takes into account economy and safety is established to realize the siting and capacity determination of power generation devices and energy storage devices. In [16], a phased planning model and a multistage planning model for integrated energy systems were developed and solved with the objective of minimizing investment cost and operation cost, respectively.As for the optimal scheduling of integrated energy systems, experts and scholars at home and abroad mostly study the output scheduling plan of each unit when the system operating cost is minimal from the perspective of system economy and have achieved certain research results. Paper [17] considered the energy storage characteristics of water storage tanks and their influence on the operating cost of the park from the actual industrial park and established a day-ahead economic dispatching model. Paper [18] used the distribution robust optimization method to deal with the uncertainty of wind power output and established a day-ahead economic dispatch opportunity constraint model. Paper [19] conducted a two-stage day-ahead economic dispatch based on load forecast uncertainty and introduced customer-side demand response. Paper [14] also established a multilayer economic dispatch model with the objective of minimizing operating cost. Among them, the upper layer of the model is a mixed integer linear programming MILP model and the lower layer is transformed into a Karush-Kuhn-Tucker optimality condition, and the model is solved more efficiently. In [15], a regional integrated energy system is studied and PV plants and energy storage devices are added to the model to give the corresponding dispatching strategies. In [16], the optimization model of electric and thermal integration is established from the perspective of heat network complexity. The objective function of the model is to minimize the operating cost and the amount of abandoned wind, and the results of the example verify the promotion of wind power consumption by the energy synergy and complementarity of electricity-thermal system.Based on the mathematical model of the park system, [16] points out two key points in the future research of the integrated energy system model of the park from the perspective of practical requirements: first, to consider the imbalance of the scheduling results caused by the prediction errors on both sides of the source-load and to construct an optimized scheduling model with good robustness. Secondly, the system should combine day-ahead scheduling with intraday real-time scheduling to build a refined scheduling model when operating optimally. To verify the advantages of the integrated energy system of the multienergy complementary park over the traditional single energy system in terms of economy, a two-stage optimal scheduling model of the park system was established in [17]. The results show that the integrated energy system of the park has more advantages and benefits in terms of economy, energy consumption, and pollution compared with the traditional single energy system. To verify the advantages of the integrated energy system in enhancing energy utilization, [18] established evaluation indexes and evaluation models for the system regarding energy efficiency to reflect the utilization characteristics of multiple energy sources. The final results show that the proposed evaluation indexes can be effectively applied to the preevaluation of the energy efficiency of the integrated energy system in the park. It has implications for the optimal scheduling of the park system.


## 3. Modeling and Analysis of Integrated Energy Systems in Parks

### 3.1. Integrated Energy System Structure of the Campus

An industrial park is used as an example for optimal scheduling research. The structure diagram of the integrated energy system of the park is shown in Figure1. The main energy equipment in the park includes gas turbines and supporting waste heat boiler equipment, gas boilers, steam drive equipment, air conditioning and refrigeration systems, ice storage and cooling units, absorption refrigeration units, photovoltaic units, battery energy storage devices, etc. The system supplies the electrical load through a centralized busbar. Thermal energy is used in a stepwise manner to supply the steam load, hot water load, and cooling load of the system.Figure 1
Structure diagram of the integrated energy system of the industrial park.According to the energy flow direction in Figure1, it can be seen that the total electrical load in the park contains the AC load and DC load for production in the park, the input electrical power for air conditioning and cooling, and the input electrical power for the ice storage and cooling device, and the electrical energy is supplied by the superior power grid, gas turbine, photovoltaic unit, and electric energy storage device together. The steam load of the park is fully supplied by the steam-driven equipment. The thermal load contains the hot water load and the thermal power consumed by the absorption chiller for cooling, which is supplied jointly by the waste heat boiler and the thermal energy recovered by the steam-driven equipment. The cooling load of the park is supplied by a combination of air conditioning and ice storage cooling units.The heat energy of the park exhibits a graded utilization characteristic. Stepped utilization of thermal energy refers to the classification of thermal energy in the system into high-grade heat, medium-grade heat, and low-grade heat according to temperature requirements. Grade refers to the proportion of available energy per unit of energy, and the higher the temperature, the higher the grade of thermal energy. The park improves energy utilization efficiency and reduces energy consumption through graded utilization of thermal energy. The high-grade heat in the heat energy gradient is used in high-temperature thermal cycle equipment such as gas turbine, which is manifested by the combustion of natural gas in the combustion chamber to produce high-temperature flue gas of 1000°C into the gas turbine to expand and do work for power generation. The discharged 500°C high-temperature flue gas is recovered by the waste heat boiler and processed into medium-grade heat, which is used to supply steam load or as heat source for other energy conversion equipment. Low-grade heat from the waste heat boiler flue gas recovery temperature is lower, usually about 100°C, demand is small, and the utilization rate is often not high, usually only used to supply hot water load or as a heat source for absorption chillers.


### 3.2. Equipment Mathematical Model

To optimize the scheduling of the integrated energy system in the industrial park for optimal analysis of investment decisions, the mathematical modeling of the equipment in Figure1 is performed first. The mathematical model of each equipment is as follows.From the perspective of power system, gas turbine is also a kind of distributed power supply, which has the characteristics of high controllability, rapid start-stop, small size, low operating environment requirement, and high energy utilization rate. It converts natural gas into electricity, and the heat released in the conversion process is recovered by the supporting waste heat boiler, and the recovered heat energy is distinguished into medium-grade heat energy and low-grade heat energy according to the temperature. The correlation equations are shown in equations (1) to (3).(1)PGT,it=ηGTeλgasGGT,it,(2)HWH,mid,it=ηWH,midh1−ηGTeλgasGGT,it,(3)HWH,low,it=ηWH,owh1−ηGTeλgasGGT,it,where PGT,it, GGT,it are the electric power output and natural gas power input of the i-th gas turbine at time t. ηGTe is the gas turbine conversion efficiency. λgas is the natural gas calorific value. HWH,low,it, HWH,mid,it are the waste heat boiler medium-grade heat and low-grade heat recovery power. ηWH,owh, ηWH,midh are the waste heat boiler medium-grade heat and low-grade heat recovery efficiency.As a common heat producing equipment in integrated energy systems, gas boilers consume natural gas to produce medium-grade hot steam to meet the system’s steam load and hot water load in a campus. The input natural gas power and output medium-grade hot steam power of a gas boiler have the following relationship:(4)HGB,it=ηGBhλgasGGB,it,where HGB,it and GGB,it are the medium-grade thermal power and the input natural gas power of the i-th gas boiler at time t output. ηGBh is the heating efficiency of gas boiler.Absorption chillers are important cold and heat coupling equipment in industrial production processes. Absorption chillers utilize medium-grade heat and low-grade heat for refrigeration operations, and the refrigeration power is(5)FBr,it=IBrcHBr,in,it,where FBr,it, HBr,in,it are the output cooling power and input thermal power of the i-th absorption chiller at time t. IBrc is the refrigeration energy efficiency ratio.The air conditioning and refrigeration system provides the necessary temperature environment for industrial production and is an important electric refrigeration equipment with a refrigeration power of(6)Fair,it=IaircPair,it,where Fair,it, Pair,it are the cooling power output and the electrical power input of the i-th air conditioning unit in time period t. Iairc is the cooling energy efficiency ratio of the air conditioner.


## 3.1. Integrated Energy System Structure of the Campus

An industrial park is used as an example for optimal scheduling research. The structure diagram of the integrated energy system of the park is shown in Figure1. The main energy equipment in the park includes gas turbines and supporting waste heat boiler equipment, gas boilers, steam drive equipment, air conditioning and refrigeration systems, ice storage and cooling units, absorption refrigeration units, photovoltaic units, battery energy storage devices, etc. The system supplies the electrical load through a centralized busbar. Thermal energy is used in a stepwise manner to supply the steam load, hot water load, and cooling load of the system.Figure 1
Structure diagram of the integrated energy system of the industrial park.According to the energy flow direction in Figure1, it can be seen that the total electrical load in the park contains the AC load and DC load for production in the park, the input electrical power for air conditioning and cooling, and the input electrical power for the ice storage and cooling device, and the electrical energy is supplied by the superior power grid, gas turbine, photovoltaic unit, and electric energy storage device together. The steam load of the park is fully supplied by the steam-driven equipment. The thermal load contains the hot water load and the thermal power consumed by the absorption chiller for cooling, which is supplied jointly by the waste heat boiler and the thermal energy recovered by the steam-driven equipment. The cooling load of the park is supplied by a combination of air conditioning and ice storage cooling units.The heat energy of the park exhibits a graded utilization characteristic. Stepped utilization of thermal energy refers to the classification of thermal energy in the system into high-grade heat, medium-grade heat, and low-grade heat according to temperature requirements. Grade refers to the proportion of available energy per unit of energy, and the higher the temperature, the higher the grade of thermal energy. The park improves energy utilization efficiency and reduces energy consumption through graded utilization of thermal energy. The high-grade heat in the heat energy gradient is used in high-temperature thermal cycle equipment such as gas turbine, which is manifested by the combustion of natural gas in the combustion chamber to produce high-temperature flue gas of 1000°C into the gas turbine to expand and do work for power generation. The discharged 500°C high-temperature flue gas is recovered by the waste heat boiler and processed into medium-grade heat, which is used to supply steam load or as heat source for other energy conversion equipment. Low-grade heat from the waste heat boiler flue gas recovery temperature is lower, usually about 100°C, demand is small, and the utilization rate is often not high, usually only used to supply hot water load or as a heat source for absorption chillers.


## 3.2. Equipment Mathematical Model

To optimize the scheduling of the integrated energy system in the industrial park for optimal analysis of investment decisions, the mathematical modeling of the equipment in Figure1 is performed first. The mathematical model of each equipment is as follows.From the perspective of power system, gas turbine is also a kind of distributed power supply, which has the characteristics of high controllability, rapid start-stop, small size, low operating environment requirement, and high energy utilization rate. It converts natural gas into electricity, and the heat released in the conversion process is recovered by the supporting waste heat boiler, and the recovered heat energy is distinguished into medium-grade heat energy and low-grade heat energy according to the temperature. The correlation equations are shown in equations (1) to (3).(1)PGT,it=ηGTeλgasGGT,it,(2)HWH,mid,it=ηWH,midh1−ηGTeλgasGGT,it,(3)HWH,low,it=ηWH,owh1−ηGTeλgasGGT,it,where PGT,it, GGT,it are the electric power output and natural gas power input of the i-th gas turbine at time t. ηGTe is the gas turbine conversion efficiency. λgas is the natural gas calorific value. HWH,low,it, HWH,mid,it are the waste heat boiler medium-grade heat and low-grade heat recovery power. ηWH,owh, ηWH,midh are the waste heat boiler medium-grade heat and low-grade heat recovery efficiency.As a common heat producing equipment in integrated energy systems, gas boilers consume natural gas to produce medium-grade hot steam to meet the system’s steam load and hot water load in a campus. The input natural gas power and output medium-grade hot steam power of a gas boiler have the following relationship:(4)HGB,it=ηGBhλgasGGB,it,where HGB,it and GGB,it are the medium-grade thermal power and the input natural gas power of the i-th gas boiler at time t output. ηGBh is the heating efficiency of gas boiler.Absorption chillers are important cold and heat coupling equipment in industrial production processes. Absorption chillers utilize medium-grade heat and low-grade heat for refrigeration operations, and the refrigeration power is(5)FBr,it=IBrcHBr,in,it,where FBr,it, HBr,in,it are the output cooling power and input thermal power of the i-th absorption chiller at time t. IBrc is the refrigeration energy efficiency ratio.The air conditioning and refrigeration system provides the necessary temperature environment for industrial production and is an important electric refrigeration equipment with a refrigeration power of(6)Fair,it=IaircPair,it,where Fair,it, Pair,it are the cooling power output and the electrical power input of the i-th air conditioning unit in time period t. Iairc is the cooling energy efficiency ratio of the air conditioner.


## 4. Predictive Layer Model

### 4.1. Long-Term Load Forecasting Model

The integrated energy planning stage requires long-term planning and coordination of the system by equipment life cycle as well as annual repair and maintenance costs, while the cooling, heating, and electrical loads require long-term forecast data to meet the long-term reliability requirements in the planning stage. The random forest regression (RFR) algorithm [10] has the advantages of low parameter setting and fast convergence Gk,v and can still show strong generalization ability when dealing with large amounts of data and can effectively avoid overfitting problems, which is suitable for long-term load forecasting scenarios with large amounts of data. The algorithm integrates several classification and regression trees (CART), and the best cut points and cut features can be selected by traversing the features and feature values during model training, and then the weighted sum of the impurity of the cut nodes is obtained to measure the merits of the cut points to obtain accurate prediction values. In this paper, the impurity function of squared average error is used for calculation, as shown in the following equation:(7)Gk,v=1s∑ji∈Jleftji−j¯left2+∑ji∈Jrightji−j¯right2,where k,v are the value of the tangent variable and the tangent component, respectively; s is the number of all training samples of the current node; Jleft,Jright are the set of training samples of the left and right subnodes, respectively; and j¯left, j¯right are the average of the training samples of the left and right subnodes, respectively. RFR obtains the prediction output by averaging all CART predictions integrated internally. The multivariate load long-term prediction model is shown in Figure 2.Figure 2
Long-term multivariate load forecasting process based on RFR.


### 4.2. Short-Term Load Forecasting Model

The integrated energy system needs to be optimally adjusted according to the short-term load in order to obtain a better solution and a more economical system operation cost during the actual operation, so the load forecasting needs to be performed for the scheduling phase with short-term forecasting. The long short-term memory (LSTM) [12] prediction algorithm has better robustness and memory capability in the process of load prediction, and it can overcome the problem of lack of long-term memory capability and gradient anomaly in recurrent neural networks and has more accurate prediction results than other algorithms. LSTM prediction can be generally divided into 3 stages.Stage 1: Selecting the forgetting stage. The forgetting gate determines the discarded information, which is processed by the sigmoid unit, and the weight is set to a value between 0 and 1. When the weight is 0, all the information is discarded, and when the weight is 1, all the information is kept, and after processing, we getft, mt.Stage 2: Selective update stage. First, the input gate is selectively updated byyt−1 and xt, and then the updated state information is obtained through the tanh layer u˜t , and the newly formed u˜t is added to the selection information to obtain the new information ut.Stage 3: Output stage. The newut is processed with the input yt−1 and yt by the sigmoid unit to obtain ot, and the information ut is multiplied with the new information by the tanh layer to obtain the output yt. The specific equation is as follows:(8)ft=σWfyt−1,xt+bf,mt=σWmyt−1,xt+bm,u˜t=tanhWuyt−1,xt+bu,ut=ftut−1+mtu˜t,ot=σWoyt−1,xt+bo,yt=ottanhut,where W is the weight matrix in the corresponding state; b is the bias vector in the corresponding state; xt is the current moment input; yt, yt−1 are the current moment and the previous moment output, respectively; ot is the current moment information; ut, ut−1, u˜t are the current moment and the previous moment output state and the update phase state, respectively.Construct a short-term prediction model based on LSTM, set the number of implicit network layers to 1, set the regularization parameter to 0.2, choose the sigmoid function as the activation function, input load data and feature data to train the model and adjust the network parameters according to Adam’s algorithm, and take the mean square error (MSE) function as the loss function.(9)EMSE=1s∑i=1szi−z^i2,where zi, z^i are the true value and predicted value, respectively; EMSE is the mean square error value.


### 4.3. Planning Layer Model

The planning layer takes the number of equipment types and start-stop status of the integrated energy system as the optimization variables and the overall planning and scheduling costC of the system as the objective function, including the initial investment cost of the equipment CB and the scheduling and operation cost of the system COP, which is calculated as follows:(10)minC=CB+COP,CB=∑n=1Nττ+1lτ+1l−1Qnθn,where n is the equipment index; N is the total number of n types of equipment; τ is the discount rate for the planning period of the equipment (taken as 6%); l is the planning life cycle of the equipment; Q is the rated capacity of the equipment; θ is the unit capacity cost of the equipment; the technical and economic parameters of the equipment are given in [13].(11)COP=CMC+CEC+CGC+CENV,where CMC is the operation and maintenance cost; CEC is the cost of electricity purchased from the external network; CGC is the cost of gas purchased from the external network; CENV is the cost of pollutant treatment, and the equation is as follows:(12)CMC=vd∑t=1T∑nNψnPoutn,tΔt,CEC=vd∑t=1TγetPetΔt,CGC=vd∑t=1TγgtPgtΔt,CENV=vd∑t=1TλetPet+λgtPgtΔt,where vd is the length of the planning period; T is the length of the optimization period (T is 24 h); Δt is the dispatch step (Δt  = 1); ψ is the maintenance cost per unit capacity of the equipment; Poutn,t is the power output of equipment n at the time; λet and λgt are the unit prices of electricity and gas energy from the external network at the time; Pgt and Pet are the input power of electricity and gas energy at the time t; λe,λg are the equivalent pollutant emission treatment cost of the system at the time for electricity and gas energy, respectively.


### 4.4. Model Solving

In this paper, we construct a 3-layer model of integrated energy system and apply RFR and LSTM forecasting algorithms to predict long-term and short-term loads, respectively, in the forecasting layer; apply CPLEX solver to plan based on the load forecasting data in the planning layer to obtain the seasonal equipment allocation scheme and the planning initial investment cost; the scheduling layer, based on the allocation scheme in the planning layer and the short-term load forecasting data in the forecasting layer, performs the scheduling operation optimization of the system based on the improved particle swarm algorithm [9] to optimize the scheduling operation of the system and obtain the optimal output state of the equipment and return the obtained scheduling operation cost to the planning layer to calculate the overall planning and scheduling cost of the system to realize the optimal planning and scheduling of the system. The specific model solution is shown in Figure 3.Figure 3
Integrated energy system 3-layer model solving process.


## 4.1. Long-Term Load Forecasting Model

The integrated energy planning stage requires long-term planning and coordination of the system by equipment life cycle as well as annual repair and maintenance costs, while the cooling, heating, and electrical loads require long-term forecast data to meet the long-term reliability requirements in the planning stage. The random forest regression (RFR) algorithm [10] has the advantages of low parameter setting and fast convergence Gk,v and can still show strong generalization ability when dealing with large amounts of data and can effectively avoid overfitting problems, which is suitable for long-term load forecasting scenarios with large amounts of data. The algorithm integrates several classification and regression trees (CART), and the best cut points and cut features can be selected by traversing the features and feature values during model training, and then the weighted sum of the impurity of the cut nodes is obtained to measure the merits of the cut points to obtain accurate prediction values. In this paper, the impurity function of squared average error is used for calculation, as shown in the following equation:(7)Gk,v=1s∑ji∈Jleftji−j¯left2+∑ji∈Jrightji−j¯right2,where k,v are the value of the tangent variable and the tangent component, respectively; s is the number of all training samples of the current node; Jleft,Jright are the set of training samples of the left and right subnodes, respectively; and j¯left, j¯right are the average of the training samples of the left and right subnodes, respectively. RFR obtains the prediction output by averaging all CART predictions integrated internally. The multivariate load long-term prediction model is shown in Figure 2.Figure 2
Long-term multivariate load forecasting process based on RFR.


## 4.2. Short-Term Load Forecasting Model

The integrated energy system needs to be optimally adjusted according to the short-term load in order to obtain a better solution and a more economical system operation cost during the actual operation, so the load forecasting needs to be performed for the scheduling phase with short-term forecasting. The long short-term memory (LSTM) [12] prediction algorithm has better robustness and memory capability in the process of load prediction, and it can overcome the problem of lack of long-term memory capability and gradient anomaly in recurrent neural networks and has more accurate prediction results than other algorithms. LSTM prediction can be generally divided into 3 stages.Stage 1: Selecting the forgetting stage. The forgetting gate determines the discarded information, which is processed by the sigmoid unit, and the weight is set to a value between 0 and 1. When the weight is 0, all the information is discarded, and when the weight is 1, all the information is kept, and after processing, we getft, mt.Stage 2: Selective update stage. First, the input gate is selectively updated byyt−1 and xt, and then the updated state information is obtained through the tanh layer u˜t , and the newly formed u˜t is added to the selection information to obtain the new information ut.Stage 3: Output stage. The newut is processed with the input yt−1 and yt by the sigmoid unit to obtain ot, and the information ut is multiplied with the new information by the tanh layer to obtain the output yt. The specific equation is as follows:(8)ft=σWfyt−1,xt+bf,mt=σWmyt−1,xt+bm,u˜t=tanhWuyt−1,xt+bu,ut=ftut−1+mtu˜t,ot=σWoyt−1,xt+bo,yt=ottanhut,where W is the weight matrix in the corresponding state; b is the bias vector in the corresponding state; xt is the current moment input; yt, yt−1 are the current moment and the previous moment output, respectively; ot is the current moment information; ut, ut−1, u˜t are the current moment and the previous moment output state and the update phase state, respectively.Construct a short-term prediction model based on LSTM, set the number of implicit network layers to 1, set the regularization parameter to 0.2, choose the sigmoid function as the activation function, input load data and feature data to train the model and adjust the network parameters according to Adam’s algorithm, and take the mean square error (MSE) function as the loss function.(9)EMSE=1s∑i=1szi−z^i2,where zi, z^i are the true value and predicted value, respectively; EMSE is the mean square error value.


## 4.3. Planning Layer Model

The planning layer takes the number of equipment types and start-stop status of the integrated energy system as the optimization variables and the overall planning and scheduling costC of the system as the objective function, including the initial investment cost of the equipment CB and the scheduling and operation cost of the system COP, which is calculated as follows:(10)minC=CB+COP,CB=∑n=1Nττ+1lτ+1l−1Qnθn,where n is the equipment index; N is the total number of n types of equipment; τ is the discount rate for the planning period of the equipment (taken as 6%); l is the planning life cycle of the equipment; Q is the rated capacity of the equipment; θ is the unit capacity cost of the equipment; the technical and economic parameters of the equipment are given in [13].(11)COP=CMC+CEC+CGC+CENV,where CMC is the operation and maintenance cost; CEC is the cost of electricity purchased from the external network; CGC is the cost of gas purchased from the external network; CENV is the cost of pollutant treatment, and the equation is as follows:(12)CMC=vd∑t=1T∑nNψnPoutn,tΔt,CEC=vd∑t=1TγetPetΔt,CGC=vd∑t=1TγgtPgtΔt,CENV=vd∑t=1TλetPet+λgtPgtΔt,where vd is the length of the planning period; T is the length of the optimization period (T is 24 h); Δt is the dispatch step (Δt  = 1); ψ is the maintenance cost per unit capacity of the equipment; Poutn,t is the power output of equipment n at the time; λet and λgt are the unit prices of electricity and gas energy from the external network at the time; Pgt and Pet are the input power of electricity and gas energy at the time t; λe,λg are the equivalent pollutant emission treatment cost of the system at the time for electricity and gas energy, respectively.


## 4.4. Model Solving

In this paper, we construct a 3-layer model of integrated energy system and apply RFR and LSTM forecasting algorithms to predict long-term and short-term loads, respectively, in the forecasting layer; apply CPLEX solver to plan based on the load forecasting data in the planning layer to obtain the seasonal equipment allocation scheme and the planning initial investment cost; the scheduling layer, based on the allocation scheme in the planning layer and the short-term load forecasting data in the forecasting layer, performs the scheduling operation optimization of the system based on the improved particle swarm algorithm [9] to optimize the scheduling operation of the system and obtain the optimal output state of the equipment and return the obtained scheduling operation cost to the planning layer to calculate the overall planning and scheduling cost of the system to realize the optimal planning and scheduling of the system. The specific model solution is shown in Figure 3.Figure 3
Integrated energy system 3-layer model solving process.


## 5. Analysis of Algorithm Results

This section is divided into two parts: description of the data of the day-ahead-intraday coordinated optimization model based on the model predictive control MPC and the conditional value-at-risk CVaR and analysis of the scheduling results of the model. In the analysis of the results, we focus on the analysis of the model predictive control MPC and conditional value-at-risk CVaR based on the scheduling results to improve the model economy and the ability to cope with uncertainty risk and to verify the effectiveness of the proposed model.


### 5.1. Algorithm Base Data

The integrated energy system optimal scheduling model established in this paper, day-ahead optimal scheduling, aims to calculate the capacity plan of energy storage devices based on the short-term forecast data of PV output and load demand and through the coupling and complementation between multiple energy devices, with the aim of reducing system operating costs. The results of the scheduling plans of other devices are then input to the intraday rolling optimal scheduling model as a reference. The intraday optimal scheduling further adjusts the power purchase contract and equipment output in real time according to the ultra-short-term forecast of load at each moment, so that the system can maximize the reduction of operating cost without extreme load loss [20]. The intraday rolling optimization scheduling period is 4 hours, and the solution calculation time interval is 15 min, and the scheduling plan is rolled over every 1 hour for a total of 24 times. The data of equipment parameter table, equipment start-up and shutdown maintenance unit cost, and time-of-day tariff of the model based on the model prediction control strategy are the same as those of the model in Section 3. In consideration of minimizing the risk of load loss under extreme scenarios during park operation, the risk preference coefficient in the model built in this paper is taken as λ = 0.353.Based on the ultra-short-term forecasts of intraday rooftop PV and load demand, the scenario uncertainty is processed and the scenario generation and reduction methods are applied to generate five typical scenarios of PV output and load demand as shown in Figures4 and 5.Figure 4
A set of typical scenarios for ultra-short-term forecasting of photovoltaic output.Figure 5
A set of typical scenarios for ultra-short-term forecasting of load demand.


### 5.2. Analysis of Operating Cost Results

The intraday rolling optimization corrects the power purchase contract plan of the higher-level grid obtained from the previous day’s dispatch, and the curves before and after the power purchase contract correction are shown in Figure6.Figure 6
The electricity purchase contract in the day-to-day.In the day-ahead-internal coordinated optimal scheduling established in this paper, the intraday rolling optimization corrects the purchased power at each moment of the park in order to reduce the operating cost and uncertainty load loss risk by more accurate scheduling based on the intraday ultra-short-term forecast data. From Figure6, it can be concluded that the purchased power varies more during off-peak hours of electricity prices, and during peak hours of electricity prices, the purchased power varies less, and the corrected purchased power appears to decrease instead of increase in some moments.The total cost of electricity, heat, and gas purchased by the park in a day is $1649,168, $287,059, and $519,944. Figure7 records the variation of electricity, heat, and gas purchase cost of the park in one day for each time period.Figure 7
Day-to-day coordination and optimization of energy purchase costs.


### 5.3. Analysis of the Effect of Considering CVaR Loss of Load Risk Assessment Under Model Predictive Control Strategy

In this paper, we add the CVaR evaluation index describing the risk of lost load to the intraday rolling optimal dispatch based on the model predictive control MPC to minimize the risk of lost load under multiple scenarios of system uncertainty and minimize the total cost of the park including the operating cost and risk cost. The operating costs of the MPC and CVaR-based campus scheduling model established in this paper and the traditional MPC scheduling model under five scenarios are shown in Figures8 and 9, respectively.Figure 8
Comparison of results under scenario 1 between the scheduling model based on CVaR and MPC and the traditional MPC model.Figure 9
Comparison of CVaR and MPC based scheduling model with traditional MPC model under scenario 2.Five uncertain typical scenarios of dispatching costs based on model predictive control MPC with conditional risk assessment CVaR and traditional MPC optimal dispatching model show that after considering the uncertainty of PV output and load demand, establishing a typical set of prediction scenarios, and applying conditional risk value CVaR to assess the risk of power loss load in the park, most of the time the park’s energy purchase cost, light abandonment penalty cost, and grid power purchase default costs increase, but the cost of compensating for lost load decreases significantly, which is because the model increases the supply of electricity at a certain moment in order to reduce the risk of lost load, and accordingly, the increase of abandonment occurs in some scenarios.


## 5.1. Algorithm Base Data

The integrated energy system optimal scheduling model established in this paper, day-ahead optimal scheduling, aims to calculate the capacity plan of energy storage devices based on the short-term forecast data of PV output and load demand and through the coupling and complementation between multiple energy devices, with the aim of reducing system operating costs. The results of the scheduling plans of other devices are then input to the intraday rolling optimal scheduling model as a reference. The intraday optimal scheduling further adjusts the power purchase contract and equipment output in real time according to the ultra-short-term forecast of load at each moment, so that the system can maximize the reduction of operating cost without extreme load loss [20]. The intraday rolling optimization scheduling period is 4 hours, and the solution calculation time interval is 15 min, and the scheduling plan is rolled over every 1 hour for a total of 24 times. The data of equipment parameter table, equipment start-up and shutdown maintenance unit cost, and time-of-day tariff of the model based on the model prediction control strategy are the same as those of the model in Section 3. In consideration of minimizing the risk of load loss under extreme scenarios during park operation, the risk preference coefficient in the model built in this paper is taken as λ = 0.353.Based on the ultra-short-term forecasts of intraday rooftop PV and load demand, the scenario uncertainty is processed and the scenario generation and reduction methods are applied to generate five typical scenarios of PV output and load demand as shown in Figures4 and 5.Figure 4
A set of typical scenarios for ultra-short-term forecasting of photovoltaic output.Figure 5
A set of typical scenarios for ultra-short-term forecasting of load demand.


## 5.2. Analysis of Operating Cost Results

The intraday rolling optimization corrects the power purchase contract plan of the higher-level grid obtained from the previous day’s dispatch, and the curves before and after the power purchase contract correction are shown in Figure6.Figure 6
The electricity purchase contract in the day-to-day.In the day-ahead-internal coordinated optimal scheduling established in this paper, the intraday rolling optimization corrects the purchased power at each moment of the park in order to reduce the operating cost and uncertainty load loss risk by more accurate scheduling based on the intraday ultra-short-term forecast data. From Figure6, it can be concluded that the purchased power varies more during off-peak hours of electricity prices, and during peak hours of electricity prices, the purchased power varies less, and the corrected purchased power appears to decrease instead of increase in some moments.The total cost of electricity, heat, and gas purchased by the park in a day is $1649,168, $287,059, and $519,944. Figure7 records the variation of electricity, heat, and gas purchase cost of the park in one day for each time period.Figure 7
Day-to-day coordination and optimization of energy purchase costs.


## 5.3. Analysis of the Effect of Considering CVaR Loss of Load Risk Assessment Under Model Predictive Control Strategy

In this paper, we add the CVaR evaluation index describing the risk of lost load to the intraday rolling optimal dispatch based on the model predictive control MPC to minimize the risk of lost load under multiple scenarios of system uncertainty and minimize the total cost of the park including the operating cost and risk cost. The operating costs of the MPC and CVaR-based campus scheduling model established in this paper and the traditional MPC scheduling model under five scenarios are shown in Figures8 and 9, respectively.Figure 8
Comparison of results under scenario 1 between the scheduling model based on CVaR and MPC and the traditional MPC model.Figure 9
Comparison of CVaR and MPC based scheduling model with traditional MPC model under scenario 2.Five uncertain typical scenarios of dispatching costs based on model predictive control MPC with conditional risk assessment CVaR and traditional MPC optimal dispatching model show that after considering the uncertainty of PV output and load demand, establishing a typical set of prediction scenarios, and applying conditional risk value CVaR to assess the risk of power loss load in the park, most of the time the park’s energy purchase cost, light abandonment penalty cost, and grid power purchase default costs increase, but the cost of compensating for lost load decreases significantly, which is because the model increases the supply of electricity at a certain moment in order to reduce the risk of lost load, and accordingly, the increase of abandonment occurs in some scenarios.


## 6. Conclusions

Compared with the traditional rolling optimization model based on model predictive control, the dispatching model considering the risk assessment of lost load under the model predictive control strategy established in this paper, the abandonment penalty cost, and power purchase contract default cost of the model under five scenarios increase to different degrees, but the cost of compensating lost load decreases, and the total cost of each scenario decreases to some extent. Considering that forecast fluctuations may cause system operation to lose load or abandon light, an optimization model based on CVaR theory is developed based on the day-ahead dispatch to address this uncertainty, aiming at minimizing system operation costs while minimizing system load loss under probabilistic scenarios. The scheduling results reduce the total cost of scheduling from 2.7591369 million yuan to 2.61311588 million yuan compared with the day-ahead economic scheduling, while the model enhances the park’s ability to cope with forecast uncertainty and makes the scheduling plan more secure and reliable. In summary, the effectiveness of the day-ahead-intraday coordinated optimal scheduling model established in this paper is verified in terms of scheduling economy and handling uncertainty.



---

*Source: 5350786-2022-03-31.xml*