Multi-energy system dynamic scheduling algorithm and system based on real-time electricity price
By adopting a dynamic scheduling algorithm based on real-time electricity prices in multi-energy systems, and using electricity price prediction model and genetic algorithm to optimize the scheduling strategy, the energy balance problem of multi-energy systems under unstable environment and changing market demands is solved, and efficient Stable energy regulation and maximization of economic benefits.
Patent Information
- Application Number
- CN202411738027.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-09-14
- Filing Date
- 2024-11-29
- Publication Date
- 2025-02-14
AI Technical Summary
How to balance energy supply and demand in multi-energy systems under unstable environmental conditions and changing market demand, especially when considering real-time electricity price changes, how to efficiently and stably regulate multiple energy systems to achieve economical Maximize benefits.
A dynamic scheduling algorithm based on real-time electricity prices is adopted to build an electricity price prediction model by collecting historical electricity price data and influencing electricity price factors, and using genetic algorithms to establish a dynamic scheduling optimization model, with the goal of minimizing energy costs, iterating Optimize, output global optimal solution.
It realizes efficient and stable regulation of various energy systems based on dynamic electricity prices, improves the economic and stability of the system, provides high-accurate electricity price prediction and scheduling strategy that is close to the global optimal solution, and optimizes energy costs and economic benefits. .
Smart Images

Figure CN119443723A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-energy system scheduling optimization, and in particular to a multi-energy system dynamic scheduling algorithm and system based on real-time electricity prices. Background Art
[0002] Multi-energy systems are complex networks composed of multiple energy forms such as electricity, heat, and cold energy. These systems usually include multiple power generation units, energy storage units, and load points. Their complexity comes not only from the diversity of energy forms, but also from the synergy of each unit in the system, energy flow, and its conversion efficiency. In order to effectively operate and optimize these systems, it is necessary to solve how to achieve a balance between energy supply and demand under unstable environmental conditions and changing market demands. This scheduling task becomes more complicated when considering real-time electricity price changes.
[0003] Real-time electricity price refers to the mechanism that the electricity price in the future electricity market is updated in real time as time changes. This price fluctuation is mainly affected by multiple factors such as market demand, power generation costs and supply conditions. Changes in real-time electricity prices pose a challenge to the dispatch of energy systems, because the system needs to dynamically adjust the dispatch strategy according to the real-time electricity price to minimize energy costs and optimize economic benefits. Effectively responding to these changes requires the dispatch system to have efficient response capabilities and flexible optimization strategies to ensure that the economy and stability of the system can be maintained in the case of electricity price fluctuations.
[0004] Based on this, how to efficiently and stably regulate various energy systems according to dynamic electricity prices to maximize economic benefits is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The purpose of the present invention is to provide a multi-energy system dynamic scheduling algorithm and system based on real-time electricity prices, so as to solve the technical problem of how to efficiently and stably regulate multiple energy systems according to dynamic electricity prices to achieve maximum economic benefits.
[0006] The present invention is implemented by the following technical solution: a multi-energy system dynamic scheduling algorithm based on real-time electricity prices, comprising the following steps:
[0007] Step S1, collecting historical electricity price data and data on factors affecting electricity price in the target area, and preprocessing the historical electricity price data and data on factors affecting electricity price to construct a training set;
[0008] Step S2: construct an electricity price prediction model and train the electricity price prediction model using a training set until a trained electricity price prediction model is obtained by fitting, and use the trained electricity price prediction model to predict electricity prices and output real-time electricity prices;
[0009] Step S3: With the goal of minimizing energy costs, a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm is established, and real-time electricity prices are used for iteration. The iteration is continued until the algorithm stop condition is met, and the global optimal solution is output.
[0010] According to a preferred embodiment, the preprocessing includes but is not limited to data cleaning and data standardization.
[0011] According to a preferred embodiment, the electricity price prediction model is a linear regression model, and the expression is Y=β0+β1X1+…+β n X n +∈, where Y is the predicted electricity price, β0 is the intercept term, (β1,…,β n ) is the load demand (X1,…,X n ) is the regression coefficient, and ∈ is the error term.
[0012] According to a preferred embodiment, step S3 specifically includes:
[0013] Step S301, create an initial population and set algorithm parameters, where individuals in the population represent load scheduling strategies;
[0014] Step S302: define the fitness function as Fitness = 1 / (1+E price +Cop), where E price is the electricity price prediction error, Cop is the energy cost;
[0015] Step S303: Calculate the fitness of individuals in the current population and obtain the local optimal solution c best ;
[0016] Calculate the mean solution x of the current population mean , based on the mean solution x mean For the local optimal solution x best Make adjustments and generate a new solution x new1 ;
[0017] Calculate the new solution c new1 The fitness of the local optimal solution c best Make updates;
[0018] Step S304: Calculate the fitness of individuals in the current population and obtain the global worst solution c worst ;
[0019] Based on the local optimal solution c best For the local worst solution c worst Make adjustments and generate a new solution c new2 ;
[0020] Calculate the new solution c new2The fitness of the global worst solution x worst Make updates;
[0021] Step S305: determine an excellent solution from the current population, and perform mutation operations on other individuals in the current population based on the characteristics of the excellent solution;
[0022] Step S306: Determine whether the current population has met the algorithm stopping condition. If so, stop the iteration and take the solution x with the highest fitness during the iteration. optimal The solution is output as the global optimal solution; otherwise, the process jumps to step S303 and continues iterating until the algorithm stopping condition is met.
[0023] According to a preferred embodiment, in step S302, the electricity price prediction error E price The expression is The expression of energy cost Cop is T is the time period, p ∧ t is the real-time electricity price predicted at time t, pt is the actual electricity price at time t, C gen,t is the cost of city electricity, C wind,t is the cost of wind power, C solar,t is the photovoltaic cost, C charge,t The cost of energy storage.
[0024] According to a preferred embodiment, in step S303, the new solution x new1 =x best +α·rand()·(x best -x mean ), α is the first adjustment step, rand() generates a random number between [0,1];
[0025] In step S304, the new solution x new2 =x worst +β·rand()·(x best -x worst ), β is the second adjustment step.
[0026] The present invention also provides a multi-energy system dynamic dispatching system based on real-time electricity prices, based on the above-mentioned algorithm, including:
[0027] The data collection and processing module is used to collect the historical electricity price data and the data of factors affecting electricity price in the target area, and pre-process the historical electricity price data and the data of factors affecting electricity price to construct a training set;
[0028] The electricity price prediction module is used to construct an electricity price prediction model and train the electricity price prediction model using a training set until a trained electricity price prediction model is obtained, and then use the trained electricity price prediction model to predict electricity prices and output real-time electricity prices.
[0029] The optimization module is used to establish a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm with the goal of minimizing energy costs, and iterate using real-time electricity prices. It continues to iterate until the algorithm stop conditions are met and outputs the global optimal solution.
[0030] The technical solution of a multi-energy system dynamic scheduling algorithm and system based on real-time electricity prices provided by the present invention has at least the following advantages and beneficial effects: (1) The present invention constructs a training set through pre-processed historical electricity price data and data on factors affecting electricity prices, trains an electricity price prediction model, and can provide highly accurate electricity price predictions; (2) The present invention explores large-scale problem spaces through genetic algorithms and can obtain scheduling strategies that are close to the global optimal solution; the present invention adopts genetic algorithm optimization to not only consider the electricity price prediction error, but also comprehensively considers the power generation cost and maintenance cost, thereby optimizing the economic benefits; the present invention can improve the model's adaptability and robustness to actual conditions through repeated optimization iterations and solution improvements. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 A flow chart of a multi-energy system dynamic scheduling algorithm based on real-time electricity prices provided in Example 1 of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0033] Example 1
[0034] Figure 1 A flowchart of a multi-energy system dynamic scheduling algorithm based on real-time electricity prices provided by an embodiment of the present invention. Figure 1 As shown, the algorithm includes the following steps:
[0035] Step S1: Collect historical electricity price data and data on factors affecting electricity price in the target area, pre-process the historical electricity price data and data on factors affecting electricity price, and construct a training set.
[0036] In this embodiment, the data of factors affecting electricity prices include historical electricity demand, weather conditions, total power generation, consumption data, etc. The preprocessing of historical electricity price data and data of factors affecting electricity prices can be selected as data cleaning, data standardization, data transformation, data amplification, etc.
[0037] Step S2: construct an electricity price prediction model and use the training set to train the electricity price prediction model, evaluate the model performance and optimize the regression coefficient until a trained electricity price prediction model is fitted, use the trained electricity price prediction model to predict electricity prices, and output real-time electricity prices.
[0038] In this embodiment, the electricity price prediction model is a linear regression model, and the expression is as follows:
[0039] Y=β0+β1X1+…+β n X n +∈
[0040] In the above formula, Y is the predicted electricity price, β0 is the intercept term, (β1,…,β n ) is the load demand (X1,…,X n ) is the regression coefficient, and ∈ is the error term.
[0041] It should be noted that this embodiment constructs a training set by pre-processing historical electricity price data and data on factors affecting electricity prices, and trains an electricity price prediction model, which can provide highly accurate electricity price predictions.
[0042] Step S3: With the goal of minimizing energy costs, a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm is established, and real-time electricity prices are used for iteration. The iteration is continued until the algorithm stop condition is met, and the global optimal solution is output.
[0043] In this embodiment, a large-scale problem space is explored by a genetic algorithm to obtain a scheduling strategy close to the global optimal solution. The genetic algorithm optimization specifically includes:
[0044] Step S301: Create an initial population x=(x1, x2, ..., x n-1 ,x n ) and set the algorithm parameters. The individuals in the population represent a possible load scheduling strategy; the algorithm parameters include population size, maximum number of iterations and fitness threshold.
[0045] Step S302: define the fitness function as Fitness = 1 / (1+E price +Cop), where E price is the electricity price prediction error, Cop is the energy cost;
[0046] Electricity price forecast error E price The expression is as follows:
[0047]
[0048] In the above formula, T is the time period, p ∧ t is the real-time electricity price predicted at time t, and pt is the actual electricity price at time t;
[0049] The expression of energy cost Cop is as follows:
[0050]
[0051] In the above formula, C gen,t is the electricity cost at time t, C wind,t is the wind power cost at time t, C solar,t is the photovoltaic cost at time t, C charge,t is the energy storage cost at time t; C gen is the cost coefficient of the city electricity, P gen is the power generation of the mains, C maintm is the maintenance cost of the mains power generation, C wind is the cost coefficient of wind power, P wind is the wind power generation power, C main,wind is the maintenance cost of wind power generation, C solar is the cost coefficient of photovoltaics, P solar is the photovoltaic power generation, C maint,solar is the maintenance cost of photovoltaic power generation, C charge is the charging cost of energy storage, P charge is the charging power of energy storage, C discharge is the discharge cost of energy storage, P discharge is the discharge power of energy storage, C maint,storage The maintenance cost of energy storage.
[0052] It should be noted that the genetic algorithm optimization in this embodiment not only takes into account the electricity price prediction error, but also comprehensively considers the power generation cost and maintenance fee, thereby optimizing the economic benefits.
[0053] Step S303: Calculate the fitness of individuals in the current population and obtain the local optimal solution x best ;
[0054] Calculate the mean solution x of the current population mean , based on the mean solution x mean For the local optimal solution x best Make adjustments and generate a new solution x new1 , new interpretation x new1 The expression is as follows:
[0055] x best +α·rand()·(x best-x mean )
[0056] In the above formula, α is the first adjustment step, and rand() generates a random number between [0,1];
[0057] Furthermore, we calculate the new solution x new1 The fitness of the local optimal solution x best To update; specifically, the new solution x new1 The fitness and local optimal solution x best The fitness of the new solution x new1 The fitness of the local optimal solution x best The fitness of best Update to x new1 .
[0058] Step S304: Calculate the fitness of individuals in the current population and obtain the global worst solution x worst ;
[0059] Based on the local optimal solution x best For the local worst solution x worst Make adjustments and generate a new solution x new2 , solve for x new2 The expression is as follows:
[0060] x new2 =x worst +β·rand()·(x best -x worst )
[0061] In the above formula, β is the second adjustment step size.
[0062] Furthermore, we calculate the new solution x new2 The fitness of the global worst solution x worst To update; specifically, the new solution x new2 The fitness and the global worst solution x worst The fitness of the new solution x new2 The fitness of the solution is better than the global worst solution x worst The fitness of worst Update to x new2 .
[0063] Step S305: Based on the information sharing mechanism, the features between excellent solutions are used to improve other solutions. Specifically, several excellent solutions with higher fitness are determined from the current population, and the excellent solutions can represent high-quality scheduling strategies. Furthermore, based on the features of the excellent solutions, other individuals in the current population are mutated, the features of the excellent solutions are transferred to other solutions, and then updated, thereby improving the overall fitness level of the population.
[0064] Step S306: Determine whether the current population has met the algorithm stopping condition. If so, stop the iteration and take the solution x with the highest fitness during the iteration. optimal It is output as the global optimal solution, otherwise, jump to step S303 to continue iterating until the algorithm stopping condition is met; in this embodiment, the algorithm stopping condition is that the fitness change is less than the set threshold or the maximum number of iterations is reached.
[0065] It should be noted that through repeated optimization iterations and solution improvements, the adaptability and robustness of the model to actual conditions can be improved.
[0066] Example 2
[0067] This embodiment, based on the technical solution provided in Embodiment 1, provides a multi-energy system dynamic scheduling system based on real-time electricity prices, including:
[0068] The data collection and processing module is used to collect the historical electricity price data and the data of factors affecting electricity price in the target area, and pre-process the historical electricity price data and the data of factors affecting electricity price to construct a training set;
[0069] The electricity price prediction module is used to construct an electricity price prediction model and train the electricity price prediction model using a training set until a trained electricity price prediction model is obtained, and then use the trained electricity price prediction model to predict electricity prices and output real-time electricity prices.
[0070] The optimization module is used to establish a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm with the goal of minimizing energy costs, and iterate using real-time electricity prices. It continues to iterate until the algorithm stop conditions are met and outputs the global optimal solution.
[0071] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A dynamic dispatch algorithm for a multi-energy system based on real-time electricity prices, characterized in that: The following steps are involved: Step S1, collecting historical electricity price data and data on factors affecting electricity price in the target area, and preprocessing the historical electricity price data and data on factors affecting electricity price to construct a training set; Step S2: construct an electricity price prediction model and train the electricity price prediction model using a training set until a trained electricity price prediction model is obtained by fitting, and use the trained electricity price prediction model to predict electricity prices and output real-time electricity prices; Step S3: With the goal of minimizing energy costs, a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm is established, and real-time electricity prices are used for iteration. The iteration is continued until the algorithm stop condition is met, and the global optimal solution is output.
2. The multi-energy system dynamic scheduling algorithm based on real-time electricity prices according to claim 1 is characterized in that: The preprocessing includes but is not limited to data cleaning and data standardization.
3. The multi-energy system dynamic scheduling algorithm based on real-time electricity prices according to claim 1 is characterized in that: The electricity price prediction model is a linear regression model, and the expression is Y=β0+β1X1+…+β n X n +∈, where Y is the predicted electricity price, β0 is the intercept term, (β1,…,β n ) is the load demand (X1,…,X n ) is the regression coefficient, and ∈ is the error term.
4. The multi-energy system dynamic scheduling algorithm based on real-time electricity prices according to any one of claims 1 to 3, characterized in that: The step S3 specifically includes: Step S301, create an initial population and set algorithm parameters, where individuals in the population represent load scheduling strategies; Step S302: define the fitness function as Fitness = 1 / (1+E price +Cop), where E price is the electricity price prediction error, Cop is the energy cost; Step S303: Calculate the fitness of individuals in the current population and obtain the local optimal solution x best ; Calculate the mean solution x of the current population mean , based on the mean solution x mean For the local optimal solution x best Make adjustments and generate a new solution x new1 ; Calculate the new solution x new1 The fitness of the local optimal solution x best Make updates; Step S304: Calculate the fitness of individuals in the current population and obtain the global worst solution x worst ; Based on the local optimal solution x best For the local worst solution x worst Make adjustments and generate a new solution x new2 ; Calculate the new solution x new2 The fitness of the global worst solution x worst Make updates; Step S305: determine an excellent solution from the current population, and perform mutation operations on other individuals in the current population based on the characteristics of the excellent solution; Step S306: Determine whether the current population has met the algorithm stopping condition. If so, stop the iteration and take the solution x with the highest fitness during the iteration. optimal The solution is output as the global optimal solution; otherwise, the process jumps to step S303 and continues iterating until the algorithm stopping condition is met.
5. The multi-energy system dynamic scheduling algorithm based on real-time electricity prices as claimed in claim 4, characterized in that: In step S302, the electricity price prediction error E price The expression is The expression of energy cost Cop is: T is the time period, p^t is the real-time electricity price predicted at time t, pt is the actual electricity price at time t, C gen,t is the cost of city electricity, C wind,t is the cost of wind power, C solar,t is the photovoltaic cost, C charge,t The cost of energy storage.
6. The multi-energy system dynamic scheduling algorithm based on real-time electricity prices as claimed in claim 4, characterized in that: In step S303, the new solution x new1 =x best +α·rand()·(x best -x mean ), α is the first adjustment step, rand() generates a random number between [0, 1]; In step S304, the new solution x new2 =x worst +β·rand()·(x best -x worst ), β is the second adjustment step.
7. A multi-energy system dynamic dispatching system based on real-time electricity prices, based on the algorithm described in any one of claims 1 to 6, characterized in that: include: The data collection and processing module is used to collect the historical electricity price data and the data of factors affecting electricity price in the target area, and pre-process the historical electricity price data and the data of factors affecting electricity price to construct a training set; The electricity price prediction module is used to construct an electricity price prediction model and train the electricity price prediction model using a training set until a trained electricity price prediction model is obtained, and then use the trained electricity price prediction model to predict electricity prices and output real-time electricity prices. The optimization module is used to establish a dynamic scheduling optimization model for a multi-energy system based on a genetic algorithm with the goal of minimizing energy costs, and iterate using real-time electricity prices. It continues to iterate until the algorithm stop conditions are met and outputs the global optimal solution.