Energy supply and demand scheduling method, device, equipment and storage medium
Through Gaussian process regression, reinforcement learning and two-stage robust optimization methods, the flexible scheduling problem of the energy system was solved, energy supply and demand balance and efficiency were achieved, and operating costs were reduced.
Patent Information
- Application Number
- CN202510933912.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-08
AI Technical Summary
The existing energy system is difficult to achieve flexible scheduling when faced with the intermittent and uncertain nature of renewable energy, the dynamic changes in energy demand, and the complexity of energy equipment, resulting in an imbalance in energy supply and demand, low utilization efficiency, and high operating costs.
The Gaussian process regression method is used to predict energy demand data. Combined with reinforcement learning and two-stage robust optimization methods, a flexibility supply evaluation index is constructed, the decision variables are solved, and the energy supply and demand scheduling of the energy system is realized.
It achieves a balance between energy supply and demand, improves energy utilization efficiency and reduces operating costs.
Smart Images

Figure CN120430660B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy management technology, and in particular to an energy supply and demand scheduling method, apparatus, equipment and storage medium. Background Art
[0002] Energy systems aim to integrate renewable energy, energy storage technologies, and smart energy management systems to provide efficient and sustainable energy supply solutions that meet the energy needs of community residents while minimizing reliance on traditional energy sources and indirect carbon emissions. Flexible scheduling is key to balancing energy supply and demand, improving energy efficiency, and reducing operating costs. However, due to the intermittent and uncertain nature of renewable energy, the dynamic nature of energy demand, and the complexity of energy equipment, achieving flexible scheduling in energy systems remains challenging. Summary of the Invention
[0003] The purpose of this application is to provide an energy supply and demand scheduling method, device, equipment and storage medium, which can achieve energy supply and demand balance, improve energy utilization efficiency and reduce operating costs.
[0004] The present invention provides an energy supply and demand scheduling method, including:
[0005] Obtain historical energy demand data of the energy system;
[0006] Using a Gaussian process regression method, energy demand data is predicted based on the historical energy demand data to obtain an uncertain prediction data set of energy demand prediction data;
[0007] Performing flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system;
[0008] A reinforcement learning method is used to solve a first decision variable in a first objective function; the first objective function is used to describe the benefits related to energy acquisition in the energy system, and the first decision variable is used to describe an energy decision action that affects the benefits related to energy acquisition in the energy system;
[0009] A two-stage robust optimization method is used to solve a second decision variable in a second objective function based on the first decision variable and the flexible supply evaluation index; the second objective function is used to describe the benefits related to energy conversion in the energy system, and the second decision variable is used to describe the energy decision action that affects the energy supply and flexible supply performance in the energy system;
[0010] According to the solved first objective function and the solved second objective function, the energy system implements corresponding energy decision-making actions to achieve energy supply and demand scheduling.
[0011] In some embodiments, the Gaussian process regression method is used to predict energy demand data based on the historical energy demand data to obtain an uncertain prediction data set of energy demand prediction data, including:
[0012] Taking the historical energy demand data as the input of a test set, constructing a prior distribution of the test set;
[0013] Constructing a joint Gaussian distribution between the output target value of the test set and the output target value of the training set based on the prior distribution to construct a posterior distribution of the training set;
[0014] The mean and variance of the posterior distribution are solved to construct a prediction interval of the energy demand prediction data under corresponding confidence conditions, and the uncertain prediction data set is constructed based on the prediction interval.
[0015] In some embodiments, performing flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system includes:
[0016] Solving the energy demand load interval of the energy system based on the uncertain load data set;
[0017] According to the energy demand load range, a flexibility analysis is performed on the energy system to obtain an upward flexibility supply evaluation index and a downward flexibility supply evaluation index of the energy system.
[0018] In some embodiments, solving the first decision variable in the first objective function using a reinforcement learning method includes:
[0019] Constructing an action space, a state space, and a reward function for benefits related to energy acquisition in the energy system;
[0020] A Q-Learning method is used to iteratively solve decision variables under the constraints of the action space, the state space, and the reward function until a first decision variable corresponding to the maximum benefit related to energy acquisition is obtained.
[0021] In some embodiments, the first decision variable includes a state variable of the energy storage device, an operating power of the energy storage device, an amount of electricity purchased, and an amount of gas purchased. The expression of the first objective function is:
[0022] ,
[0023] ,
[0024] ,
[0025] ,
[0026] in, is the maintenance cost of energy storage equipment, Adjusting costs for energy storage equipment, The energy cost for the external network is is the energy storage equipment maintenance factor, is the operating power of the energy storage device, is the energy storage device adjustment factor, and are all state variables of the energy storage device. To obtain The non-zero elements correspond to And construct the matrix , For electricity price, For gas prices, To purchase electricity, The amount of gas purchased.
[0027] In some embodiments, the two-stage robust optimization method is used to solve the second decision variable in the second objective function according to the first decision variable and the flexibility supply evaluation index, including:
[0028] Constructing an energy conversion efficiency constraint and an input / output power constraint of benefits related to energy supply in the energy system based on the first decision variable and the flexibility supply evaluation index;
[0029] With solving the minimum first energy conversion cost as the main problem and solving the minimum second energy conversion cost as the sub-problem, the decision variables are iteratively solved under the constraints of the energy conversion efficiency constraint and the input and output power constraint until the second decision variable corresponding to the maximum benefit related to the energy supply is obtained; the first energy conversion cost is the sum of the energy conversion equipment maintenance cost and the flexibility supply cost, and the second energy conversion cost is the difference between the flexibility adjustment cost and the voluntary carbon reduction income.
[0030] In some embodiments, the second decision variables include the operating power and response power of the energy conversion equipment, the upward flexibility supply evaluation index, the downward flexibility supply evaluation index, the output data of the photovoltaic power generation equipment, the output data of the wind power generation equipment, the upward flexibility margin, and the downward flexibility margin. The expression of the second objective function is:
[0031] ,
[0032] ,
[0033] ,
[0034] ,
[0035] ,
[0036] ,
[0037] in, Maintenance costs for energy conversion equipment, Adjusting costs for flexibility, Provide cost for flexibility, To provide voluntary carbon reduction income, is the flexible margin shortfall penalty, For uncertain prediction datasets, is the energy conversion equipment maintenance factor, is the energy conversion equipment regulation factor, is the elastic load adjustment factor, is the flexible supply coefficient of the power system, is the flexible supply coefficient of the natural gas system, is the flexible supply coefficient of the thermal energy system, is the carbon reduction coefficient of wind and solar power, is the elastic load carbon reduction coefficient, is the carbon reduction coefficient of energy storage equipment, is the elastic load response coefficient, is the deficiency penalty factor, is the operating power of the energy conversion equipment, is the predicted operating power of the energy conversion equipment, is the response power of the energy conversion device, Provide evaluation indicators for the upward flexibility of the power system, Provide evaluation indicators for the downward flexibility of the power system, Provide evaluation indicators for the upward flexibility of natural gas systems, Provide evaluation indicators for the downward flexibility of natural gas systems, Provide evaluation indicators for the upward flexibility of thermal energy systems, Provide evaluation indicators for the downward flexibility of thermal energy systems, Output data for photovoltaic power generation equipment, Output data of wind power equipment, To obtain The non-zero elements correspond to And construct the matrix, and are all state variables of the energy storage device. is the operating power of the energy storage device, For the upward flexibility margin of energy conversion equipment, It is the downward flexibility margin of energy conversion equipment.
[0038] The present application also provides an energy supply and demand scheduling device, including:
[0039] The first module is used to obtain historical energy demand data of the energy system;
[0040] The second module is used to use the Gaussian process regression method to predict energy demand data based on the historical energy demand data to obtain an uncertain prediction data set of energy demand prediction data;
[0041] The third module is used to perform flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system;
[0042] a fourth module, configured to employ a reinforcement learning method to solve a first decision variable in a first objective function, wherein the first objective function is configured to describe benefits related to energy acquisition in the energy system, and the first decision variable is configured to describe an energy decision action that affects the benefits related to energy acquisition in the energy system;
[0043] a fifth module for solving a second decision variable in a second objective function based on the first decision variable and the flexibility supply evaluation index using a two-stage robust optimization method; the second objective function is used to describe the benefits related to energy conversion in the energy system, and the second decision variable is used to describe the energy decision action that affects the energy supply and flexibility supply performance in the energy system;
[0044] The sixth module is used to enable the energy system to implement corresponding energy decision-making actions based on the solved first objective function and the solved second objective function to achieve energy supply and demand scheduling.
[0045] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements an energy supply and demand scheduling method when executing the computer program.
[0046] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned energy supply and demand scheduling method is implemented.
[0047] The beneficial effects of the present application are as follows: a Gaussian process regression method is adopted to predict an uncertain prediction data set of energy demand prediction data based on the historical energy demand data of the energy system, and a flexibility supply evaluation index of the energy system is obtained based on the uncertain load data set. A reinforcement learning method is adopted to solve the energy decision-making actions used to describe the benefits related to energy acquisition that affect the energy system, and a two-stage robust optimization method is adopted to solve the energy decision-making actions used to describe the energy supply and flexible supply performance that affect the energy system. The energy system implements the solved energy decision-making actions to realize energy supply and demand scheduling, which can achieve energy supply and demand balance, improve energy utilization efficiency and reduce operating costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of the energy supply and demand scheduling method provided in an embodiment of the present application.
[0049] Figure 2 It is a structural diagram of the energy supply and demand scheduling device provided in an embodiment of the present application.
[0050] Figure 3 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0052] It should be noted that although the device schematics illustrate functional module divisions and the flowcharts illustrate logical sequences, in certain circumstances, the steps illustrated may be performed in a sequence that differs from the module divisions in the device or the sequence in the flowcharts. Terms such as "first" and "second" in the specification, claims, and drawings are used to distinguish similar items and are not intended to describe a specific sequence or precedence.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0054] Figure 1 This is a flow chart of the energy supply and demand scheduling method provided by the embodiment of the present application. Figure 1 , in some embodiments, Figure 1 The method may specifically include but is not limited to steps S101 to S106.
[0055] Step S101: Acquire historical energy demand data of the energy system.
[0056] In step S102 , a Gaussian process regression method is used to predict energy demand data based on historical energy demand data to obtain an uncertain prediction data set of energy demand prediction data.
[0057] Step S103: performing flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system.
[0058] Step S104: Using a reinforcement learning method, solve for a first decision variable in a first objective function. The first objective function is used to describe the benefits related to energy acquisition in the energy system, and the first decision variable is used to describe an energy decision action that affects the benefits related to energy acquisition in the energy system.
[0059] In step S105, a two-stage robust optimization method is used to solve the second decision variable in the second objective function based on the first decision variable and the flexible supply evaluation index. The second objective function describes the benefits associated with energy conversion in the energy system, and the second decision variable describes the energy decision actions that affect energy supply and flexible supply performance in the energy system.
[0060] Step S106 , according to the solved first objective function and the solved second objective function, the energy system implements corresponding energy decision-making actions to achieve energy supply and demand scheduling.
[0061] An energy system is an energy management system for a specific area (such as a community) that aims to provide green and sustainable energy solutions. Its main functions include energy data collection, monitoring and analysis, energy consumption management, energy production and load balancing, etc.
[0062] Historical energy demand data includes historical energy storage demand data of energy storage equipment and historical conversion energy demand data of energy conversion equipment. The historical energy storage demand data of energy storage equipment may include historical state variables, historical operating power, historical electricity purchase volume, and historical gas purchase volume of energy storage equipment. Energy storage equipment may include electricity storage equipment, gas storage equipment, and heat storage equipment. The historical conversion energy demand data of energy conversion equipment may include historical operating power, historical response power, historical output data, historical inelastic load data, and historical elastic load data of energy conversion equipment. Energy conversion equipment may include wind power generation equipment, photovoltaic power generation equipment, cogeneration equipment, gas turbines, and electric boilers.
[0063] The historical energy demand data of the energy system may be obtained by interacting with a terminal device storing the historical energy demand data of the energy system to obtain the required historical energy demand data of the energy system.
[0064] In some embodiments, step S102 specifically includes: using historical energy demand data as the input of the test set to construct a prior distribution of the test set; based on the prior distribution, constructing a joint Gaussian distribution between the output target value of the test set and the output target value of the training set to construct the posterior distribution of the training set; solving the mean and variance of the posterior distribution to construct a prediction interval of the energy demand prediction data under corresponding confidence conditions, and constructing an uncertain prediction data set based on the prediction interval.
[0065] First, the corresponding historical energy demand data is used as the input vector , establish a prior distribution in a given n-dimensional test set F, the specific process is as follows:
[0066] ,
[0067] ,
[0068] ,
[0069] in, is the input vector constructed from historical energy demand data, for The corresponding output value, n is the time scale, i is a positive integer, i∈[1,n].
[0070] In the Gaussian process regression method, and The relationship between can be regarded as a Gaussian process , which can be written as:
[0071] ,
[0072] in, is an independent and identically distributed noise variable with a mean of 0 and a variance of Gaussian distribution.
[0073] This prior distribution is usually assumed to The mean is 0 and the variance is , recorded as:
[0074] ,
[0075] in, and Both are test sets constructed from historical energy demand data.
[0076] It is known that the output target value of the test set and the output target value of the training set form a joint Gaussian distribution, and we can get dimensional training set The posterior distribution of , the specific process is as follows:
[0077] ,
[0078] ,
[0079] in, is the training set, is the output vector corresponding to the training set, is the time scale, j is a positive integer, j∈[1, ], is the covariance matrix between the training set and the test set, is the covariance matrix of the training set itself, for The transposed matrix of .
[0080] According to the multivariate Gaussian distribution, the posterior distribution The mean is , the variance is The Gaussian distribution of is:
[0081] ,
[0082] Therefore, the mean and variance of the posterior distribution can be obtained as follows:
[0083] ,
[0084] ,
[0085] Based on this, we can obtain the prediction interval of uncertain prediction data under certain confidence conditions, and construct an uncertain prediction data set based on this prediction interval as follows:
[0086] ,
[0087] in, is the mean of the posterior distribution, is the standard deviation of the posterior distribution, q is the number of samples in the training set, To be significant level, by adjusting To achieve the scaling of the upper and lower bounds of the uncertainty set, is a two-sided standard normal distribution Quantile.
[0088] Considering that the lower limit of the prediction interval of historical energy demand data cannot be negative in practice, the historical energy demand data is The confidence interval U of the predicted value under is:
[0089] ,
[0090] Among them, CL is the lower limit of the confidence interval, and CU is the upper limit of the confidence interval.
[0091] Based on the above Gaussian process regression, an uncertain prediction dataset is constructed. For example, the uncertain prediction datasets corresponding to the historical output data of photovoltaic power generation equipment, the historical output data of wind power generation equipment, the historical elastic load data, the historical load data, and the historical load elastic response data can be constructed respectively.
[0092] In some embodiments, step S103 specifically includes: solving the energy demand load range of the energy system based on the uncertain load data set; performing flexibility analysis on the energy system based on the energy demand load range to obtain the upward flexibility supply evaluation index and downward flexibility supply evaluation index of the energy system.
[0093] Flexibility analysis of energy systems requires data on the flexibility requirements of each energy subsystem and the flexibility supply of each energy device.
[0094] In a specific embodiment, flexibility analysis is performed on the energy system, and flexibility analysis is performed on the power system, natural gas system, and thermal energy system in the energy system respectively.
[0095] The upper and lower limits of the energy demand load range for the net power load fluctuation of the power system are:
[0096] ,
[0097] in, is the upper bound of net power load fluctuation, is the lower bound of net power load fluctuation, and are the upper and lower limits of the electric load forecast interval, and are the upper and lower limits of the output prediction interval of photovoltaic power generation equipment, and are the upper and lower limits of the wind power equipment output prediction range respectively.
[0098] The upper and lower limits of the energy demand load range for the natural gas net load fluctuation of the natural gas system are:
[0099] ,
[0100] in, is the upper bound of natural gas net load fluctuation, is the lower bound of natural gas net load fluctuation, and are the upper and lower limits of the gas load forecast interval respectively.
[0101] The upper and lower limits of the energy load range for the thermal energy system's net thermal load fluctuation are:
[0102] ,
[0103] in, is the upper bound of the net heat load fluctuation, is the lower bound of the net heat load fluctuation, and are the upper and lower limits of the heat load prediction interval respectively.
[0104] The upward flexibility supply and demand indicators and downward flexibility demand indicators of the energy system are:
[0105] ,
[0106] ,
[0107] in, and are the upward flexibility demand index and downward flexibility demand index of the energy system, is the load forecast mean, m∈[E,G,H], E represents the electric energy subsystem, G represents the natural gas subsystem, and H represents the thermal energy subsystem.
[0108] The upward flexibility supply evaluation index, downward flexibility supply evaluation index, upward flexibility margin and downward flexibility margin of the power system are:
[0109] ,
[0110] ,
[0111] ,
[0112] ,
[0113] in, and They are the upward flexibility supply evaluation index and the upward flexibility supply evaluation index of the power system, For the upward flexibility margin of the power system, is the downward flexibility margin of the power system, and They are the upward flexibility evaluation index and downward flexibility evaluation index of the power cogeneration equipment, and They are the power upward flexibility evaluation index and power downward flexibility evaluation index of the gas turbine, and They are the upward power flexibility evaluation index and the downward power flexibility evaluation index of the electric boiler, and They are the upward charging flexibility evaluation index and the downward charging flexibility evaluation index of new energy vehicles, and They are the discharge upward flexibility evaluation index and discharge downward flexibility evaluation index of new energy vehicles, and They are the upward charging flexibility evaluation index and the downward charging flexibility evaluation index of the storage device, and They are the upward discharge flexibility evaluation index and the downward discharge flexibility evaluation index of the energy storage device, and They are the upward flexibility evaluation index and downward flexibility evaluation index of the elastic electric load, It is the upward flexibility demand index of the power subsystem. It is the downward flexibility demand indicator for the electric energy subsystem.
[0114] The upward flexibility supply evaluation index, downward flexibility supply evaluation index, upward flexibility margin, and downward flexibility margin of the natural gas system are:
[0115] ,
[0116] ,
[0117] ,
[0118] ,
[0119] in, and are the upward flexibility supply evaluation index and the upward flexibility supply evaluation index of the natural gas system, For the upward flexibility margin of the natural gas system, is the downward flexibility margin of the natural gas system, and They are the natural gas upward flexibility evaluation index and the natural gas downward flexibility evaluation index of the combined heat and power generation equipment, and are the upward flexibility evaluation index and downward flexibility evaluation index of the gas turbine, and They are the upward flexibility evaluation index and downward flexibility evaluation index of elastic gas load, is the upward flexibility demand indicator for the natural gas subsystem, Downward flexibility demand indicator for the natural gas subsystem.
[0120] The upward flexibility supply evaluation index, downward flexibility supply evaluation index, upward flexibility margin and downward flexibility margin of the thermal energy system are:
[0121] ,
[0122] ,
[0123] ,
[0124] ,
[0125] in, and They are the upward flexibility supply evaluation index and the upward flexibility supply evaluation index of the thermal energy system, is the upward flexibility margin of the thermal energy system, is the downward flexibility margin of the thermal energy system, and They are the thermal energy upward flexibility evaluation index and thermal energy downward flexibility evaluation index of the combined heat and power generation equipment, and They are the upward flexibility evaluation index and downward flexibility evaluation index of thermal energy for electric boilers, and They are the upward charging flexibility evaluation index and the downward charging flexibility evaluation index of the heat storage tank, and They are the upward and downward flexibility evaluation indexes of the heat storage tank, and are the upward flexibility evaluation index and downward flexibility evaluation index of elastic thermal load, The upward flexibility demand index for the thermal energy subsystem, Downward flexibility demand indicator for the thermal energy subsystem.
[0126] In some embodiments, step S104 specifically includes: constructing an action space, a state space, and a reward function of the benefits related to energy acquisition in the energy system; using the Q-Learning method, under the constraints of the action space, the state space, and the reward function, iteratively solving the decision variables until the first decision variable corresponding to the maximum benefit related to energy acquisition is obtained.
[0127] In a specific embodiment, the first decision variable includes the state variable of the energy storage device, the operating power of the energy storage device, the amount of electricity purchased, and the amount of gas purchased. The expression of the first objective function is:
[0128] ,
[0129] ,
[0130] ,
[0131] ,
[0132] in, is the maintenance cost of energy storage equipment, Adjusting costs for energy storage equipment, The energy cost for the external network is is the energy storage equipment maintenance factor, is the operating power of the energy storage device, is the energy storage device adjustment factor, and are all state variables of the energy storage device. To obtain The non-zero elements correspond to And construct the matrix , For electricity price, For gas prices, To purchase electricity, The amount of gas purchased.
[0133] The action space of benefits related to energy acquisition in the energy system is:
[0134] ,
[0135] in, is the vector corresponding to the amount of electricity purchased from the Internet, is the vector corresponding to the amount of gas purchased from the external network, is the vector corresponding to the charging and discharging power of new energy vehicles, is the vector corresponding to the charging and discharging power of the storage device, is the vector corresponding to the charging and discharging power of the heat storage tank.
[0136] The range of variation in benefits related to energy acquisition in the energy system is:
[0137] ,
[0138] in, To adjust the space upwards, To adjust the space downward, is the unit adjustment of action i, is the upward change unit of action i, is the downward change unit of action i, Is a positive integer.
[0139] The action constraints for energy acquisition-related benefits in the energy system include rated capacity constraints, charge and discharge state constraints, charge and discharge power constraints, charge state constraints, and energy balance constraints at the beginning and end of the cycle. Thermal storage tanks and new energy vehicles in the discharge state, as energy storage devices, also meet the above constraints, similar to power storage devices. The action constraints for energy acquisition-related benefits in the energy system are:
[0140] ,
[0141] ,
[0142] ,
[0143] ,
[0144] ,
[0145] ,
[0146] ,
[0147] ,
[0148] in, is the rated capacity of the storage device at time t, and are the maximum and minimum rated capacities of the storage device at time t, is the energy storage state at time t, is a binary variable indicating the charging state of the energy storage device at time t, is a binary variable indicating that the storage state is in standby state at time t, is a binary variable indicating that the storage device is in a discharging state at time t, is the state of charge of the energy storage device at time t, is the state of charge of the energy storage device at time t-1, is the energy self-loss rate of the storage device, is the charging efficiency of the energy storage device, is the charging power of the energy storage device, is the discharge efficiency of the energy storage device, is the discharge power of the storage device, Δt is the time period, and are the maximum and minimum charging power of the energy storage device, and are the maximum and minimum discharge power of the storage device, and are the charge states at the beginning and end of the energy storage device scheduling cycle, respectively.
[0149] The state space of benefits associated with energy acquisition in energy systems for:
[0150] ,
[0151] in, Real-time energy prices for electricity and gas, is the energy state of new energy vehicles, is the state of charge of the storage device, is the energy state of the heat storage tank, is the set of action vectors at the previous time scale, is the true value of renewable energy and load in the previous time scale.
[0152] The reward function for the benefits associated with energy acquisition in the energy system is:
[0153] ,
[0154] in, Performing actions for energy systems The corresponding operating costs, is the penalty factor, To constrain the out-of-bounds penalty, is the maintenance cost of energy storage equipment, Adjusting costs for energy storage equipment, The energy cost for the external network.
[0155] The Q-Learning method with better convergence performance is used to solve the state variables of the energy storage device and its operating power, external grid electricity purchase volume, and external grid gas purchase volume. By collecting the above data, the energy decision action that maximizes the benefits related to energy acquisition in the energy system is finally obtained.
[0156] In some embodiments, step S105 specifically includes: constructing an energy conversion efficiency constraint and an input / output power constraint for the benefits related to energy supply in the energy system based on the first decision variable and the flexibility supply evaluation index; taking solving the minimum first energy conversion cost as the main problem and solving the minimum second energy conversion cost as the subproblem, and iteratively solving the decision variables under the constraints of the energy conversion efficiency constraint and the input / output power constraint until the second decision variable corresponding to the maximum benefit related to energy supply is obtained. The first energy conversion cost is the sum of the energy conversion equipment maintenance cost and the flexibility supply cost, and the second energy conversion cost is the difference between the flexibility adjustment cost and the voluntary carbon reduction income.
[0157] In a specific embodiment, the second decision variables include the operating power and response power of the energy conversion equipment, the upward flexibility supply evaluation index, the downward flexibility supply evaluation index, the output data of the photovoltaic power generation equipment, the output data of the wind power generation equipment, the upward flexibility margin, and the downward flexibility margin. The expression of the second objective function is:
[0158] ,
[0159] ,
[0160] ,
[0161] ,
[0162] ,
[0163] ,
[0164] in, Maintenance costs for energy conversion equipment, Adjusting costs for flexibility, Provide cost for flexibility, To provide voluntary carbon reduction income, is the flexible margin shortfall penalty, For uncertain prediction datasets, is the energy conversion equipment maintenance factor, is the energy conversion equipment regulation factor, is the elastic load adjustment factor, is the flexible supply coefficient of the power system, is the flexible supply coefficient of the natural gas system, is the flexible supply coefficient of the thermal energy system, is the carbon reduction coefficient of wind and solar power, is the elastic load carbon reduction coefficient, is the carbon reduction coefficient of energy storage equipment, is the elastic load response coefficient, is the deficiency penalty factor, is the operating power of the energy conversion equipment, is the predicted operating power of the energy conversion equipment, is the response power of the energy conversion device, Provide evaluation indicators for the upward flexibility of the power system, Provide evaluation indicators for the downward flexibility of the power system, Provide evaluation indicators for the upward flexibility of natural gas systems, Provide evaluation indicators for the downward flexibility of natural gas systems, Provide evaluation indicators for the upward flexibility of thermal energy systems, Provide evaluation indicators for the downward flexibility of thermal energy systems, Output data for photovoltaic power generation equipment, Output data of wind power equipment, To obtain The non-zero elements correspond to And construct the matrix, and are all state variables of the energy storage device. is the operating power of the energy storage device, For the upward flexibility margin of energy conversion equipment, It is the downward flexibility margin of energy conversion equipment.
[0165] The second objective function needs to satisfy the following constraints:
[0166] Cogeneration equipment constraints include energy conversion efficiency constraints and input and output power constraints. Gas turbine equipment constraints and electric boiler equipment constraints, as energy regulation devices, also have these constraints, similar to cogeneration equipment. Cogeneration consumes natural gas to generate electricity and heat. Its physical model is:
[0167] ,
[0168] ,
[0169] ,
[0170] ,
[0171] ,
[0172] ,
[0173] ,
[0174] in, is the output power of the combined heat and power generation at time t, is the natural gas input volume of combined heat and power generation at time t, The gas-to-electricity conversion efficiency of combined heat and power generation, is the thermal power output of the combined heat and power generation at time t, The conversion efficiency of heat energy collected in the gas-to-electricity process of combined heat and power generation, and are the maximum and minimum electric power output of combined heat and power generation, and are the maximum thermal power and minimum thermal power of combined heat and power generation, and They are the upper and lower climbing limits of the combined heat and power generation equipment, It is an evaluation index of the upward flexibility of electricity for combined heat and power generation equipment. It is an evaluation index for the downward flexibility of electricity in combined heat and power generation equipment. It is an evaluation index of thermal energy upward flexibility of combined heat and power generation equipment. It is an evaluation index for the thermal energy downward flexibility of combined heat and power generation equipment.
[0175] The elastic load constraint is:
[0176] ,
[0177] ,
[0178] ,
[0179] ,
[0180] in, and are the upper and lower limits of the elastic load m respectively.
[0181] The energy balance constraint is:
[0182] ,
[0183] ,
[0184] ,
[0185] in, To purchase electricity from the Internet, is the photovoltaic power supply, Power supply to the fan, The power supply for combined heat and electricity generation is Provide heat for the gas turbine, Discharge for new energy vehicles, Discharge the storage device, is the power consumption of the electric boiler, Charging new energy vehicles, Charge the storage device, is the elastic electric load, is an inelastic electric load, is the gas consumption of combined heat and power generation, is the gas consumption of the gas turbine, is the elastic gas load, is an inelastic gas load, Provide heat for combined heat and power generation. Release energy to the heat storage tank. Charge the thermal storage tank. is the elastic thermal load, Inelastic thermal load.
[0186] Solve the second objective function according to the C&CG algorithm to find the minimum first energy conversion cost The main problem is to find the minimum second energy conversion cost As a sub-problem, for The target value of . Since there are uncertain variables in the sub-problem, the KKT condition is used in the sub-problem and the Lagrange multiplier method is used to solve the problem. Transform the double-layer max{min} problem into a single-layer max problem. Then solve the problem and get a solution that is likely to be the worst scenario. , and then put this Decision variables for the corresponding scenario and constraints Add all back to the main problem. The main problem is added to the original constraints Decision variables for the corresponding scenario and its corresponding constraints , perform the operation again, and repeat this process until the objective function value of the main problem is solved and the objective function value solved in the subproblem Meet the conditions , the solution is completed to obtain the optimal objective function in time period t The energy decision action that meets multiple objectives in time period t .
[0187] The objective function value obtained according to the two-stage robust optimization Update the reward function value of the reinforcement learning part Repeat steps S104 and S105 until the reinforcement learning converges, and the optimal strategy of the energy system is obtained. ).
[0188] In some embodiments, step S106 specifically includes: outputting the energy decision action obtained by solving the first objective function And the energy decision action obtained by solving the second objective function , so that the energy system can implement corresponding energy decision-making actions to achieve energy supply and demand scheduling.
[0189] See also Figure 2 The embodiment of the present application further provides an energy supply and demand scheduling device, which can implement the above-mentioned energy supply and demand scheduling method, and the device includes:
[0190] The first module 201 is used to obtain historical energy demand data of the energy system;
[0191] The second module 202 is configured to use a Gaussian process regression method to predict energy demand data based on historical energy demand data to obtain an uncertain prediction data set of energy demand prediction data;
[0192] The third module 203 is used to perform flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system;
[0193] A fourth module 204 is configured to solve a first decision variable in a first objective function using a reinforcement learning method; the first objective function is configured to describe benefits related to energy acquisition in the energy system, and the first decision variable is configured to describe an energy decision action that affects the benefits related to energy acquisition in the energy system;
[0194] A fifth module 205 is configured to employ a two-stage robust optimization method to solve a second decision variable in a second objective function based on the first decision variable and the flexibility supply evaluation index; the second objective function is configured to describe benefits associated with energy conversion in the energy system, and the second decision variable is configured to describe energy decision actions that affect energy supply and flexibility supply performance in the energy system;
[0195] The sixth module 206 is used to enable the energy system to implement corresponding energy decision-making actions based on the solved first objective function and the solved second objective function to achieve energy supply and demand scheduling.
[0196] The specific implementation of the energy supply and demand scheduling device is basically the same as the specific embodiment of the above-mentioned energy supply and demand scheduling method, and will not be repeated here.
[0197] Figure 3 It is a block diagram of an electronic device according to an exemplary embodiment.
[0198] Refer to the following Figure 3 The electronic device 300 according to this embodiment of the present disclosure is described. Figure 3 The electronic device 300 shown is merely an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0199] like Figure 3 As shown, electronic device 300 is implemented as a general-purpose computing device. Components of electronic device 300 may include, but are not limited to, at least one processing unit 310, at least one storage unit 320, a bus 330 connecting various system components (including storage unit 320 and processing unit 310), a display unit 340, and the like.
[0200] The storage unit stores program code, which can be executed by the processing unit 310, so that the processing unit 310 executes the steps according to various exemplary embodiments of the present disclosure described in the above energy supply and demand scheduling method section of this specification.
[0201] The storage unit 320 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 3201 and / or a cache memory unit 3202 , and may further include a read-only memory unit (ROM) 3203 .
[0202] The storage unit 320 may also include a program / utility 3204 having a set (at least one) of program modules 3205, such program modules 3205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0203] Bus 330 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0204] The electronic device 300 can also communicate with one or more external devices 300′ (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 300, and / or any device that enables the electronic device 300 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 350. Furthermore, the electronic device 300 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 360. The network adapter 360 can communicate with other modules of the electronic device 300 via the bus 330. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 300, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0205] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned energy supply and demand scheduling method is implemented.
[0206] The energy supply and demand scheduling method, apparatus, equipment and storage medium provided in the embodiments of the present application adopt a Gaussian process regression method to predict an uncertain prediction data set of energy demand prediction data based on the historical energy demand data of the energy system, obtain a flexibility supply evaluation index of the energy system based on the uncertain load data set, adopt a reinforcement learning method to solve the energy decision-making actions used to describe the benefits related to energy acquisition in the energy system, and adopt a two-stage robust optimization method to solve the energy decision-making actions used to describe the energy supply and flexible supply performance in the energy system, so that the energy system implements the solved energy decision-making actions to realize energy supply and demand scheduling, which can achieve energy supply and demand balance, improve energy utilization efficiency and reduce operating costs.
[0207] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above-mentioned method according to the embodiments of the present disclosure.
[0208] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0209] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0210] Those skilled in the art will appreciate that the modules described above can be distributed in the device according to the description of the embodiment, or can be modified accordingly to be used in one or more devices that are different from the embodiment. The modules of the above embodiment can be combined into one module or further divided into multiple submodules.
[0211] While the exemplary embodiments of the present disclosure have been specifically illustrated and described above, it should be understood that the present disclosure is not limited to the detailed structures, configurations, or implementations described herein; rather, the present disclosure is intended to encompass various modifications and equivalent configurations within the spirit and scope of the appended claims.
Claims
1. A method for energy supply and demand scheduling, characterized in that: include: Obtain historical energy demand data of the energy system; A Gaussian process regression method is used to predict energy demand data based on the historical energy demand data to obtain an uncertain prediction data set of the energy demand prediction data, including: using the historical energy demand data as the input of a test set, constructing a prior distribution of the test set, constructing a joint Gaussian distribution between the output target value of the test set and the output target value of the training set based on the prior distribution to construct a posterior distribution of the training set, solving the mean and variance of the posterior distribution to construct a prediction interval of the energy demand prediction data under corresponding confidence conditions, and constructing the uncertain prediction data set based on the prediction interval; Performing a flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index of the energy system, including: solving an energy demand load interval of the energy system based on the uncertain load data set, performing a flexibility analysis on the energy system based on the energy demand load interval to obtain an upward flexibility supply evaluation index and a downward flexibility supply evaluation index of the energy system; A reinforcement learning method is used to solve a first decision variable in a first objective function, including: constructing an action space, a state space, and a reward function for benefits related to energy acquisition in the energy system, and using a Q-Learning method to iteratively solve the decision variable under the constraints of the action space, the state space, and the reward function until a first decision variable corresponding to when the benefits related to energy acquisition are maximized is obtained; the first objective function is used to describe the benefits related to energy acquisition in the energy system, and the first decision variable is used to describe an energy decision action that affects the benefits related to energy acquisition in the energy system; A two-stage robust optimization method is adopted to solve the second decision variable in the second objective function based on the first decision variable and the flexibility supply evaluation index, including: constructing the energy conversion efficiency constraint and input-output power constraint of the benefits related to energy supply in the energy system based on the first decision variable and the flexibility supply evaluation index, with solving the minimum first energy conversion cost as the main problem and solving the minimum second energy conversion cost as the sub-problem, and iteratively solving the decision variables under the constraints of the energy conversion efficiency constraint and the input-output power constraint until the second decision variable corresponding to the maximum benefit related to energy supply is obtained; the second objective function is used to describe the benefits related to energy conversion in the energy system, the second decision variable is used to describe the energy decision action that affects the energy supply and flexible supply performance in the energy system, the first energy conversion cost is the sum of the energy conversion equipment maintenance cost and the flexibility supply cost, and the second energy conversion cost is the difference between the flexibility adjustment cost and the voluntary carbon reduction income; According to the solved first objective function and the solved second objective function, the energy system implements corresponding energy decision-making actions to achieve energy supply and demand scheduling.
2. The energy supply and demand scheduling method according to claim 1, characterized in that: The first decision variables include the state variables of the energy storage device, the operating power of the energy storage device, the amount of electricity purchased, and the amount of gas purchased. The expression of the first objective function is: , , , , in, is the maintenance cost of energy storage equipment, Adjusting costs for energy storage equipment, The energy cost for the external network is is the energy storage equipment maintenance factor, is the operating power of the energy storage device, is the energy storage device adjustment factor, and are all state variables of the energy storage device. To obtain The non-zero elements correspond to And construct the matrix , For electricity price, For gas prices, To purchase electricity, The amount of gas purchased.
3. The energy supply and demand scheduling method according to claim 1, characterized in that: The second decision variables include the operating power and response power of the energy conversion equipment, the upward flexibility supply evaluation index, the downward flexibility supply evaluation index, the output data of the photovoltaic power generation equipment, the output data of the wind power generation equipment, the upward flexibility margin, and the downward flexibility margin. The expression of the second objective function is: , , , , , , in, Maintenance costs for energy conversion equipment, Adjusting costs for flexibility, Provide cost for flexibility, To provide voluntary carbon reduction income, is the flexible margin shortfall penalty, For uncertain prediction data sets, is the energy conversion equipment maintenance factor, is the energy conversion equipment regulation factor, is the elastic load adjustment factor, is the flexible supply coefficient of the power system, is the flexible supply coefficient of the natural gas system, is the flexible supply coefficient of the thermal energy system, is the wind and solar carbon reduction coefficient, is the elastic load carbon reduction coefficient, is the carbon reduction coefficient of energy storage equipment, is the elastic load response coefficient, is the shortage penalty factor, is the operating power of the energy conversion equipment, is the predicted operating power of the energy conversion equipment, is the response power of the energy conversion device, Provide evaluation indicators for the upward flexibility of the power system, Provide evaluation indicators for the downward flexibility of the power system, Provide evaluation indicators for the upward flexibility of natural gas systems, Provide evaluation indicators for the downward flexibility of natural gas systems, Provide evaluation indicators for the upward flexibility of thermal energy systems, Provide evaluation indicators for the downward flexibility of thermal energy systems, Output data for photovoltaic power generation equipment, Output data of wind power equipment, To obtain The non-zero elements correspond to And construct the matrix, and are all state variables of the energy storage device. is the operating power of the energy storage device, For the upward flexibility margin of energy conversion equipment, It is the downward flexibility margin of energy conversion equipment.
4. An energy supply and demand scheduling device, characterized in that: include: The first module is used to obtain historical energy demand data of the energy system; The second module is configured to use a Gaussian process regression method to predict energy demand data based on the historical energy demand data to obtain an uncertain prediction data set of the energy demand prediction data, including: using the historical energy demand data as the input of a test set, constructing a prior distribution of the test set, constructing a joint Gaussian distribution between the output target value of the test set and the output target value of the training set based on the prior distribution to construct a posterior distribution of the training set, solving the mean and variance of the posterior distribution to construct a prediction interval of the energy demand prediction data under corresponding confidence conditions, and constructing the uncertain prediction data set based on the prediction interval; A third module is configured to perform flexibility analysis on the energy system based on the uncertain load data set to obtain a flexibility supply evaluation index for the energy system, including: solving an energy demand load interval for the energy system based on the uncertain load data set, performing flexibility analysis on the energy system based on the energy demand load interval, and obtaining an upward flexibility supply evaluation index and a downward flexibility supply evaluation index for the energy system; A fourth module is configured to employ a reinforcement learning method to solve a first decision variable in a first objective function, including: constructing an action space, a state space, and a reward function for benefits related to energy acquisition in the energy system, and employing a Q-Learning method to iteratively solve the decision variable under the constraints of the action space, the state space, and the reward function until a first decision variable corresponding to when the benefits related to energy acquisition are maximized is obtained; the first objective function is configured to describe the benefits related to energy acquisition in the energy system, and the first decision variable is configured to describe an energy decision action that affects the benefits related to energy acquisition in the energy system; The fifth module is used to adopt a two-stage robust optimization method to solve the second decision variable in the second objective function according to the first decision variable and the flexibility supply evaluation index, including: constructing the energy conversion efficiency constraint and input-output power constraint of the benefits related to energy supply in the energy system according to the first decision variable and the flexibility supply evaluation index, with solving the minimum first energy conversion cost as the main problem and solving the minimum second energy conversion cost as the sub-problem, and iteratively solving the decision variables under the constraints of the energy conversion efficiency constraint and the input-output power constraint until the second decision variable corresponding to the maximum benefit related to energy supply is obtained; the second objective function is used to describe the benefits related to energy conversion in the energy system, the second decision variable is used to describe the energy decision action that affects the energy supply and flexible supply performance in the energy system, the first energy conversion cost is the sum of the energy conversion equipment maintenance cost and the flexibility supply cost, and the second energy conversion cost is the difference between the flexibility adjustment cost and the voluntary carbon reduction income; The sixth module is used to enable the energy system to implement corresponding energy decision-making actions based on the solved first objective function and the solved second objective function to achieve energy supply and demand scheduling.
5. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the energy supply and demand scheduling method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the energy supply and demand scheduling method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Optical storage charging station operation optimization method and system based on near-end strategy optimization algorithm
CN115986834A
Hydrogen energy system scheduling method with self-adaptive multi-step comprehensive view
CN119918886A