Method, device and medium for formulating energy storage charging and discharging strategy based on multi-factor prediction

By building a multi-factor prediction model and rolling optimization scheduling strategy, the problem of adjusting power consumption strategies under the uncertainty of grid scheduling in the power industry is solved, the accuracy and flexibility of power consumption forecasting are achieved, and the economic benefits of enterprises in demand response events are improved.

CN119401513BActive Publication Date: 2025-09-09JIANGSU WEIHENG INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411985982.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-09-09
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

During demand response events in the power industry, companies find it difficult to effectively cope with the uncertainty of grid scheduling. Existing technologies lack advanced forecasting models and optimization algorithms, resulting in inflexible and inaccurate adjustments to power consumption strategies, affecting economic and social benefits.

Method used

A storage charging and discharging strategy based on multi-factor prediction is adopted. Production load, life load and distributed photovoltaic prediction models are constructed through linear regression, random forest regression and ANN. Combined with the linear programming solver and rolling optimization scheduling model, a scheduling strategy for future power load is formulated to achieve flexible adaptation and accurate prediction of different types of power loads.

Benefits of technology

It improves the accuracy and flexibility of future electricity consumption forecasts, can quickly respond to load changes in a short period of time, balance electricity supply and demand, reduce power shortages or waste, and improve the economic benefits of enterprises in demand response events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119401513B_ABST
    Figure CN119401513B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of electric energy storage equipment, and specifically discloses a method, device and medium for formulating energy storage charging and discharging strategies based on multi-factor prediction. Compared with the existing technology, the method, device and medium proposed in the present application integrate the production load prediction model, the life load prediction model and the distributed photovoltaic prediction model to establish an electricity consumption prediction model, which can not only more comprehensively reflect the actual situation of the power system, but also improve the accuracy of future electricity consumption forecasts. On this basis, the present invention proposes to establish a day-ahead scheduling prediction model and an intraday scheduling optimization model, and formulate a scheduling strategy for future electricity loads based on the optimized future comprehensive electricity consumption data. According to the method proposed in the present invention, not only can it quickly respond to load changes in a short period of time and improve the flexibility and real-time performance of load scheduling, but it also forms a hierarchical scheduling strategy from long-term to short-term, so as to be able to cope with changes in electricity demand at different time scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of energy storage economic optimization and scheduling, and specifically relates to a method, device and medium for formulating energy storage charging and discharging strategies based on multi-factor prediction. Background Art

[0002] In demand response events in the power industry, companies face the uncertainty of grid dispatch and need to adopt effective strategies. This context is similar to the time-of-use pricing mechanism in the current electricity pricing system. Both require companies to adjust their electricity consumption based on grid demand and price fluctuations.

[0003] In a demand response event, the grid notifies businesses in advance, asking them to reduce or increase their electricity consumption during specific times to balance the grid's load. This is similar to the peak, flat, and off-peak periods in time-of-use pricing, except that demand response events can be more flexible and urgent.

[0004] Businesses need to respond to these demands by optimizing their electricity usage profiles. This includes adjusting production plans and rationally dispatching energy storage equipment. Similar to strategies under time-of-use pricing, businesses also need to consider how to maximize economic benefits during demand response events. For example, they can reduce electricity usage during periods of high grid demand to avoid high prices, or provide backup capacity to receive compensation when the grid needs it.

[0005] However, responding to demand response events is more complex because the timing of events and the amount of regulation may not be as fixed and predictable as time-of-use electricity prices. Therefore, companies need more advanced forecasting models and optimization algorithms to plan ahead and adjust electricity usage strategies in real time.

[0006] In general, responding to demand response events is an important way for enterprises to interact with the power grid in the electricity market. Through reasonable strategies, both economic and social benefits can be improved. Summary of the Invention

[0007] To address the deficiencies in the prior art, the present application provides a method, device, and medium for formulating energy storage charging and discharging strategies based on multi-factor prediction. The method, device, and medium provided in the present application.

[0008] According to a first aspect of the present application, a method for formulating an energy storage charging and discharging strategy based on multi-factor prediction is provided, the method comprising the steps of:

[0009] S1, collects data related to energy storage charging and discharging.

[0010] S2, judging whether the current energy storage charging and discharging strategy needs to be changed based on the collected energy storage charging and discharging related information data.

[0011] S3, establishing a power consumption prediction model based on the data collected about energy storage charging and discharging, and using the established power consumption prediction model to predict future comprehensive power consumption data to obtain future comprehensive power consumption data, specifically including the following steps:

[0012] 301, using linear regression to build a production load prediction model. Specifically, using linear regression to perform category prediction on production load data, the categories include: normal production and abnormal production.

[0013] 302. Use random forest regression to build a life load prediction model. Specifically, use random forest regression to perform category prediction on life load data, where the categories include typical working days and special days.

[0014] 303. Use ANN to build a distributed photovoltaic prediction model. Specifically, use ANN-1 and ANN-2 to form a weather category prediction model for sunny and cloudy days. The weather categories include: sunny and cloudy.

[0015] The present invention proposes to establish a future electricity consumption forecast model by integrating a production load forecast model, a life load forecast model and a distributed photovoltaic forecast model. This model can not only reflect the actual situation of the power system more comprehensively, thereby improving the accuracy of future electricity consumption forecasts; it can also adapt to changes in different types of electricity loads, conduct future electricity consumption forecasts for complex and changeable electricity loads, and improve the accuracy and flexibility of future electricity consumption forecasts.

[0016] S4, optimizing the future comprehensive electricity consumption data according to the constrained electricity load.

[0017] S401: Classify the power load and add constraints to the classified power load.

[0018] S402, optimizing the future comprehensive power consumption data according to the power load scheduling plan and the power load constraints to obtain the optimized future comprehensive power consumption data, specifically including the following steps:

[0019] A1, set the objective function of future comprehensive electricity consumption data.

[0020] Specifically, the objective function of the future comprehensive electricity consumption data includes minimizing the total electricity cost and maximizing the load utilization rate.

[0021] A2, taking the electricity load constraint as the feasible domain of the objective function of future comprehensive electricity consumption data.

[0022] A3, uses a linear programming solver to solve the objective function of future comprehensive electricity consumption data.

[0023] A4, based on the solution results of the future comprehensive electricity consumption data, obtain the optimized future comprehensive electricity consumption data.

[0024] Specifically, the optimized future comprehensive electricity consumption data includes optimized total load power, optimized local load power, and optimized external load power.

[0025] S5, establish short-time-scale rolling optimization scheduling, and formulate the scheduling strategy of future power load based on the optimized future comprehensive power consumption data.

[0026] S501, constructing a short-time-scale rolling optimization scheduling model. Specifically, the time-scale rolling optimization scheduling adopts a two-layer structure to manage power fluctuations of different scheduling durations respectively.

[0027] S502 , calculating the power consumption during the future peak period and the future off-peak period according to the peak period power consumption and the peak period power consumption in the optimized future comprehensive power consumption data.

[0028] S503: Based on the calculated future peak hours and future peak hours electricity consumption, and the short-time-scale rolling optimization scheduling model, a future electricity storage charging and discharging scheduling strategy is formulated. Specifically, the future electricity storage charging and discharging scheduling strategy steps are as follows:

[0029] B1, using a day-ahead scheduling prediction model, which is usually based on historical data and weather forecast information; where the time scale is set to ≥ 24 hours.

[0030] B2, the forecast data is sent to the dispatch center, which initiates the start-stop plan and the call plan and outputs the day-ahead dispatch plan;

[0031] B3, uses an intraday short-time-scale rolling optimization model, which is able to process data on shorter time scales.

[0032] Among them, the time scale is set to ≥4 hours; the day-ahead scheduling prediction model outputs the day-ahead scheduling plan and provides it to the intraday short-time scale rolling optimization model.

[0033] B4 sends the short-term forecast data to the dispatch center, which initiates the start-stop plan and the call plan and outputs the intraday dispatch plan.

[0034] S5, establish a day-ahead scheduling prediction model and an intraday scheduling optimization model, and formulate a scheduling strategy for future power load based on the optimized future comprehensive power consumption data.

[0035] S501 , constructing a day-ahead scheduling prediction model and an intraday scheduling optimization model. Specifically, both the day-ahead scheduling prediction model and the intraday scheduling optimization model adopt a two-layer structure to manage power fluctuations of different scheduling durations respectively.

[0036] S502 , calculating the power consumption during the future peak period and the future off-peak period according to the peak period power consumption and the peak period power consumption in the optimized future comprehensive power consumption data.

[0037] S503, a day-ahead dispatch prediction model generates a day-ahead dispatch reference value, and the day-ahead dispatch reference value, the future peak period, and the future off-peak period electricity consumption are input into an intraday dispatch optimization model to obtain a future electricity consumption and energy storage charging and discharging dispatch strategy.

[0038] The specific steps include:

[0039] B1, using a day-ahead scheduling prediction model, which is usually based on historical data and weather forecast information; where the time scale is set to ≥ 24 hours;

[0040] B2, the forecast data is sent to the dispatch center, which initiates the start-stop plan and the call plan and outputs the day-ahead dispatch plan;

[0041] B3, uses an intraday short-time-scale rolling optimization model, which is able to process data on shorter time scales.

[0042] Among them, the time scale is set to ≥4 hours; the day-ahead scheduling prediction model outputs the day-ahead scheduling plan and provides it to the intraday short-time scale rolling optimization model.

[0043] B4 sends the short-term forecast data to the dispatch center, which initiates the start-stop plan and the call plan and outputs the intraday dispatch plan.

[0044] B5 uses the intraday short-time-scale rolling optimization model, takes the intraday scheduling plan as the initial data, and makes real-time adjustments.

[0045] The contradiction between supply and demand in the power system is a long-standing problem. By accurately predicting the power load and formulating reasonable scheduling strategies, the power supply and demand can be better balanced, and the power shortage or waste caused by the contradiction between supply and demand can be reduced. The present invention proposes to establish a day-ahead scheduling prediction model and an intraday scheduling optimization model, and formulate a scheduling strategy for future power loads based on the optimized future comprehensive power consumption data. According to the method proposed in the present invention, the day-ahead scheduling prediction model and the intraday scheduling optimization model of the upper and lower layers respectively manage power fluctuations of different scheduling durations, which can not only quickly respond to load changes in a short period of time and improve the flexibility and real-time performance of load scheduling, but also the day-ahead scheduling prediction model and the intraday scheduling optimization model can cooperate with each other to form a hierarchical scheduling strategy from long-term to short-term, thereby being able to cope with changes in power demand at different time scales.

[0046] According to the second aspect of the present application, the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement any of the above-mentioned methods for formulating energy storage charging and discharging strategies based on multi-factor prediction.

[0047] According to the third aspect of the present application, the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program is loaded and executed by a processor to implement any of the above-mentioned methods for formulating energy storage charging and discharging strategies based on multi-factor prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 Is a schematic diagram of the process of this application;

[0049] Figure 2 Is a logical relationship diagram of the embodiment of the present application;

[0050] Figure 3 This is a schematic diagram of the control time domain of an embodiment of the present invention;

[0051] Figure 4 Schematic diagram of the electricity consumption prediction model in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose and features of this application more obvious and easy to understand, the present technical solution is described in detail below through embodiments and in conjunction with the accompanying drawings.

[0053] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0054] Example 1:

[0055] like Figure 1 The process and Figure 2 As shown in the logic in, the embodiment of the present application provides a method for formulating energy storage charging and discharging strategies based on multi-factor prediction, and the specific implementation steps are as follows:

[0056] S1, collects data related to energy storage charging and discharging.

[0057] Optionally, the energy storage charging and discharging related information includes production plans, electricity load, climate conditions, electricity prices, scheduling conditions, etc.

[0058] S2, judging whether the current energy storage charging and discharging strategy needs to be changed based on the collected energy storage charging and discharging related information data.

[0059] The specific judgment conditions are:

[0060] Set a threshold for energy storage charge and discharge related information, and judge whether the data collected from the energy storage charge and discharge related information exceeds the threshold. If it exceeds the threshold, the current energy storage charge and discharge strategy is changed; otherwise, the current energy storage charge and discharge strategy is not changed.

[0061] For example: setting a monitoring threshold, when the production plan changes by more than a certain percentage, triggering a change in the current energy storage charging and discharging strategy; setting a threshold for electricity price changes, when the electricity price policy changes significantly, triggering a change in the current energy storage charging and discharging strategy.

[0062] S3, establishing a power consumption prediction model based on the data collected about energy storage charging and discharging, and using the established power consumption prediction model to predict future comprehensive power consumption data to obtain future comprehensive power consumption data.

[0063] The electricity consumption forecast model includes the production load forecast model, the life load forecast model and the distributed photovoltaic forecast model.

[0064] In the specific implementation process, the production load forecasting model is constructed by linear regression, the life load forecasting model is constructed by random forest regression, and the distributed photovoltaic forecasting model is constructed by ANN.

[0065] 301, using linear regression to build a production load prediction model. Specifically, using linear regression to perform category prediction on production load data, the categories include: normal production and abnormal production.

[0066] In the specific implementation process, normal production refers to the normal operation of production equipment, and abnormal production refers to equipment failure, order fluctuations or supply chain interruptions.

[0067] 304. Use random forest regression to build a life load prediction model. Specifically, use random forest regression to perform category prediction on life load data, where the categories include typical working days and special days.

[0068] Life load forecasting models such as Figure 4 shown.

[0069] In the specific implementation process, a typical working day refers to a non-holiday and normal weather situation, and a special day refers to a holiday or extreme weather situation.

[0070] 305 , using ANN to construct a distributed photovoltaic prediction model. Specifically, using ANN-1 and ANN-2 to form a weather category prediction model for sunny and cloudy days, where the weather categories include: sunny and cloudy days.

[0071] In this embodiment, ANN refers to an artificial neural network.

[0072] It should be pointed out that the production load forecast is affected by the production plan data, and the life load forecast model and distributed photovoltaic forecast model are affected by seasonal weather.

[0073] The present invention proposes to establish a future electricity consumption forecast model by integrating a production load forecast model, a life load forecast model and a distributed photovoltaic forecast model. This model can not only reflect the actual situation of the power system more comprehensively, thereby improving the accuracy of future electricity consumption forecasts; it can also adapt to changes in different types of electricity loads, conduct future electricity consumption forecasts for complex and changeable electricity loads, and improve the accuracy and flexibility of future electricity consumption forecasts.

[0074] In specific implementation, when there is a lack of a specific forecasting model, the forecast data can be replaced by historical typical electricity consumption data, especially for short-term or temporary planned electricity consumption forecasts.

[0075] S4, optimizing the future comprehensive electricity consumption data according to the constrained electricity load.

[0076] S401: Classify the power load and add constraints to the classified power load.

[0077] Specifically, the constraints include adjustable power load power constraints, power load transfer constraints, power load transfer upper limit constraints, total power load before and after adjustment constraints, power load power balance constraints and power load cost-benefit constraints.

[0078] The adjustable power load power constraint includes adjustable power load power constraint one and adjustable power load power constraint two.

[0079] Among them, the formula for the adjustable power load power constraint 1 is:

[0080]

[0081] In the formula, t is the time information, m is the level of adjustable power load power, is the power of the mth level adjustable electrical load at time t, is the maximum adjustable proportion of the mth level adjustable power load in the total power, is the total load power at time t.

[0082] Setting the mth level of adjustable load is to perform corresponding processing and scheduling according to the adjustable level.

[0083] The set adjustable level is determined based on the urgency of the adjustment, the impact on system performance, the execution time requirement, etc.

[0084] The larger the value of m, the greater the impact on system operation stability.

[0085] The formula for the second power constraint of the adjustable power load is:

[0086]

[0087] Where, is the power of the mth level adjustable user load at time t, is the preset target threshold of the total power load of the system at the current moment, is the total load power at time t.

[0088] Optionally, The value of is set to 5%.

[0089] Electricity load transfer constraints include electricity load transfer upper limit constraints and electricity load transferability constraints.

[0090] The formula for the power load transfer constraint is:

[0091]

[0092] Where, is the theoretical amount of electrical load that can be transferred outward at time t, Theoretically, it is the amount of electrical load that can be transferred from the outside at time t.

[0093] This constraint is designed to prevent double transfer, meaning there can be no load transfer both outward and inward. For example, during peak hours, the energy storage device can only discharge and not be charged; while during off-peak hours, the energy storage device can only be charged and not discharged.

[0094] The formula for the upper limit constraint of electricity load transfer is:

[0095]

[0096]

[0097] Where, is the load that can actually be transferred outward at time t. is the load amount of electricity load actually transferred from the outside at time t, is the theoretical amount of electrical load that can be transferred outward at time t, is the theoretical load amount transferred from the actual external environment at time t, is the total load of the electrical load at time t, is the transfer upper limit coefficient.

[0098] The formula for the total power load constraint before and after regulation is:

[0099]

[0100]

[0101]

[0102] Where C is the total power load, To calculate the sum, The actual load that can be transferred outward is the load of electricity consumption. The load amount of the electricity load actually transferred from the outside is Calculate to find the minimum value.

[0103] The power balance constraint method of the electric load is:

[0104]

[0105] Where sum(PIL(m,t)) represents the total load of the adjustable power load at time t, Pmgb(t) is the total power consumption of the adjustable power load at time t, is the load that can actually be transferred outward at time t. is the load amount of electricity load actually transferred from the outside at time t, is the total load of the electrical load at time t.

[0106] The electricity load cost-benefit constraints include the total electricity load transfer costs and electricity load compensation costs.

[0107] The calculation formula for the total electricity load transfer fee is:

[0108]

[0109] Where Cshift(t) is the total transfer cost of electricity load at time t, is the load that can actually be transferred outward at time t. is the load actually received from the outside at time t, A is the cost weight of transferring the transferable load to the outside, and B is the cost weight of receiving the transferred load from the outside.

[0110] The calculation formula for electricity load compensation fee is:

[0111]

[0112] Where, Compensation for electricity load, As the basic electricity cost, is the adjustment coefficient, For the electrical load.

[0113] S402, optimizing the future comprehensive power consumption data according to the power load scheduling plan and the power load constraints to obtain the optimized future comprehensive power consumption data, specifically including the following steps:

[0114] A1, set the objective function of future comprehensive electricity consumption data.

[0115] Specifically, the objective function of the future comprehensive electricity consumption data includes minimizing the total electricity cost and maximizing the load utilization rate.

[0116] Among them, the calculation formula for minimizing the total electricity cost is:

[0117]

[0118] Where, To minimize the total electricity cost, (t) is the electricity price at time t, is the load that can actually be transferred outward at time t. is the load amount of electricity load actually transferred from the outside at time t, , sum represents sum calculation.

[0119] The calculation formula for maximizing load utilization is:

[0120]

[0121] Where, To maximize load utilization, is the load that can actually be transferred outward at time t. is the load amount of electricity load actually transferred from the outside at time t, is the power of the mth level adjustable user load at time t, sum represents the summation calculation, and C is the total power load.

[0122] A2, taking the electricity load constraint as the feasible domain of the objective function of future comprehensive electricity consumption data.

[0123] A3, uses a linear programming solver to solve the objective function of future comprehensive electricity consumption data.

[0124] Optionally, the linear programming solver includes tools such as Gurobi, CPLEX, or Python's SciPy library.

[0125] A4, based on the solution results of the future comprehensive electricity consumption data, obtain the optimized future comprehensive electricity consumption data.

[0126] Specifically, the optimized future comprehensive electricity consumption data includes optimized total load power, optimized local load power, and optimized external load power.

[0127] Among them, the formula for the optimized total load power is:

[0128] Poptim(t) = - SHIFTL(t) + SHIFTQ(t) - sum(PIL(m,t))

[0129] Where Poptim(t) is the total load power after optimization, is the load that can actually be transferred outward at time t. is the load amount of electricity load actually transferred from the outside at time t, is the power of the mth level adjustable user load at time t, sum represents the sum calculation, is the total load of the electrical load at time t.

[0130] The formula for the optimized local load power is:

[0131] Plocal(t) = - SHIFTL(t)

[0132] Where Plocal(t) is the optimized local load power, is the total load of the electrical load at time t, It is the load amount of the electricity load that can actually be transferred outward at time t.

[0133] The formula for the optimized external load power is:

[0134] Pexternal(t)=SHIFTQ(t)

[0135] Where Pexternal(t) is the optimized external load power, which is the load actually transferred from the outside at time t.

[0136] S5, establish a day-ahead scheduling prediction model and an intraday scheduling optimization model, and formulate a scheduling strategy for future power load based on the optimized future comprehensive power consumption data.

[0137] S501 , constructing a day-ahead scheduling prediction model and an intraday scheduling optimization model. Specifically, both the day-ahead scheduling prediction model and the intraday scheduling optimization model adopt a two-layer structure to manage power fluctuations of different scheduling durations respectively.

[0138] Among them, the upper layer is mainly used to smooth out the fluctuations in cold and hot energy power with longer scheduling time. Its control time domain is 1 hour and the scheduling time window is 2 hours; the lower layer is used to smooth out the fluctuations in electric power with shorter scheduling time. Its control time domain is 5 minutes and the scheduling time window is 1 hour.

[0139] Specific as Figure 3 As shown in the figure, at time t0, the system predicts the cooling and heating energy data for the period t0+1 to t0+3 and adjusts the planned output of each cogeneration equipment accordingly for the period t0+1 to t0+2. Simultaneously, the system also predicts the electric energy data for the period t0+N to t0+1+N and dispatches equipment to smooth out system power fluctuations for the period t0+N to t0+2N.

[0140] Due to the different scheduling time windows, the scheduling of cold and hot energy will be carried out before the scheduling of electric energy, so that the scheduling of electric energy and the scheduling of cold and hot energy can be carried out separately.

[0141] S502 , calculating the power consumption during the future peak period and the future off-peak period according to the peak period power consumption and the peak period power consumption in the optimized future comprehensive power consumption data.

[0142] The calculation formula for future peak-hour electricity consumption is:

[0143]

[0144] Where, For future peak hours, is the load power at time t during the future peak period, and For future peak electricity consumption periods.

[0145] The calculation formula for peak power consumption is:

[0146]

[0147] Where, For future peak period electricity consumption, is the load power at time t during the future peak period, and For future peak electricity consumption periods.

[0148] S503, a day-ahead dispatch prediction model generates a day-ahead dispatch reference value, and the day-ahead dispatch reference value, the future peak period, and the future off-peak period electricity consumption are input into an intraday dispatch optimization model to obtain a future electricity consumption and energy storage charging and discharging dispatch strategy.

[0149] The specific steps include:

[0150] B1, using a day-ahead scheduling prediction model, which is usually based on historical data and weather forecast information; where the time scale is set to ≥ 24 hours;

[0151] B2, the forecast data is sent to the dispatch center, which initiates the start-stop plan and the call plan and outputs the day-ahead dispatch plan;

[0152] B3, uses an intraday short-time-scale rolling optimization model, which is able to process data on shorter time scales.

[0153] Among them, the time scale is set to ≥4 hours; the day-ahead scheduling prediction model outputs the day-ahead scheduling plan and provides it to the intraday short-time scale rolling optimization model.

[0154] B4 sends the short-term forecast data to the dispatch center, which initiates the start-stop plan and the call plan and outputs the intraday dispatch plan.

[0155] B5 uses the intraday short-time-scale rolling optimization model, takes the intraday scheduling plan as the initial data, and makes real-time adjustments.

[0156] Among them, the time scale is set to ≥15min.

[0157] In an optional implementation, day-ahead scheduling includes performing it at 0:00 every day, reading the data of the previous day, performing 24-hour forecast and scheduling, and saving the results; intraday scheduling includes performing it at 0:00 every 4 hours, reading the current data, performing 4-hour forecast and scheduling, and saving the results; real-time scheduling includes performing it at every 15 minutes on the hour, reading the current data, performing 15-minute forecast and scheduling, and saving the results.

[0158] The contradiction between supply and demand in the power system is a long-standing problem. By accurately predicting the power load and formulating reasonable scheduling strategies, the power supply and demand can be better balanced, and the power shortage or waste caused by the contradiction between supply and demand can be reduced. The present invention proposes to establish a day-ahead scheduling prediction model and an intraday scheduling optimization model, and formulate a scheduling strategy for future power loads based on the optimized future comprehensive power consumption data. According to the method proposed in the present invention, the day-ahead scheduling prediction model and the intraday scheduling optimization model of the upper and lower layers respectively manage power fluctuations of different scheduling durations, which can not only quickly respond to load changes in a short period of time and improve the flexibility and real-time performance of load scheduling, but also the day-ahead scheduling prediction model and the intraday scheduling optimization model can cooperate with each other to form a hierarchical scheduling strategy from long-term to short-term, thereby being able to cope with changes in power demand at different time scales.

[0159] The present application also provides a computer device that can implement the steps of any of the methods for formulating an energy storage charging and discharging strategy based on multi-factor predictions provided in the present application. Therefore, the present application can achieve the beneficial effects of the method for formulating an energy storage charging and discharging strategy based on multi-factor predictions provided in the present application. For details, please refer to the previous embodiments and will not be repeated here.

[0160] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be accomplished through instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application further provides a storage medium storing computer instructions that can be loaded by a processor to execute the steps of any embodiment of the method for formulating an energy storage charging and discharging strategy based on multi-factor prediction provided in the embodiments of the present application.

[0161] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc. Since the instructions stored in the storage medium can execute the steps of any of the embodiments of the method for solving the distributed collaborative scheduling scheme for the heat storage system provided in the embodiments of the present application, the embodiments of the present application can achieve the beneficial effects that can be achieved by any of the methods for formulating energy storage charging and discharging strategies based on multi-factor prediction provided in the embodiments of the present application. For details, please refer to the previous embodiments and will not be repeated here.

[0162] Example 2:

[0163] In this example, Python is used as the programming language, and the construction code of the linear regression model is as follows:

[0164] import pandas as pd

[0165] import numpy as np

[0166] from sklearn.linear_model import LinearRegression

[0167] def production_load_forecast(production_plan):

[0168] # Read production plan data

[0169] df = pd.read_csv('production_plan.csv')

[0170] # Features and target variables

[0171] X = df[['production_plan']]

[0172] y = df['production_load']

[0173] # Train linear regression model

[0174] model = LinearRegression()

[0175] model.fit(X, y)

[0176] # Forecasting production load

[0177] forecast = model.predict(production_plan)

[0178] return forecast

[0179] Example 3:

[0180] In this embodiment, Python is used as the programming language, and the construction code of the random forest regression model is as follows:

[0181] from sklearn.ensemble import RandomForestRegressor

[0182] def living_load_forecast(season, weather):

[0183] # Read life load data

[0184] df = pd.read_csv('living_load_data.csv')

[0185] # Features and target variables

[0186] X = df[['season', 'weather']]

[0187] y = df['living_load']

[0188] # Train random forest regression model

[0189] model = RandomForestRegressor(n_estimators=100, random_state=42)

[0190] model.fit(X, y)

[0191] # Forecasting life load

[0192] forecast = model.predict(np.array([season, weather]).reshape(1, -1))

[0193] return forecast

[0194] Example 4:

[0195] In this example, Python is used as the programming language, and the ANN construction code is as follows:

[0196] import tensorflow as tf

[0197] from tensorflow.keras.models import Sequential

[0198] from tensorflow.keras.layers import Dense

[0199] def train_ann_model(weather_data, load_data, model_type):

[0200] # Create ANN model

[0201] model = Sequential()

[0202] model.add(Dense(128, input_dim=weather_data.shape[1], activation='relu'))

[0203] model.add(Dense(64, activation='relu'))

[0204] model.add(Dense(1))

[0205] # Compile the model

[0206] model.compile(optimizer='adam', loss='mean_squared_error')

[0207] # Train the model

[0208] model.fit(weather_data, load_data, epochs=50, batch_size=32,validation_split=0.2)

[0209] # Save the model

[0210] model.save(f'ann_{model_type}.h5')

[0211] return model

[0212] def load_ann_model(model_type):

[0213] return tf.keras.models.load_model(f'ann_{model_type}.h5')

[0214] def solar_pv_forecast(weather_forecast):

[0215] # Read weather forecast data

[0216] df = pd.read_csv('weather_forecast.csv')

[0217] # Scenario Classification

[0218] if df['weather'].iloc[0]== 'Sunny':

[0219] model_type = 'sunny'

[0220] elif df['weather'].iloc[0]== 'Cloudy':

[0221] model_type = 'cloudy'

[0222] else:

[0223] raise ValueError("Unknown weather conditions")

[0224] # Load the corresponding ANN model

[0225] model = load_ann_model(model_type)

[0226] # Forecasting PV load

[0227] forecast = model.predict(df[['temperature', 'humidity']])

[0228] return forecast

[0229] Example 5:

[0230] In this embodiment, Python is used as the programming language, and the construction code of the day-ahead scheduling prediction model is as follows:

[0231] import pandas as pd

[0232] import numpy as np

[0233] from sklearn.preprocessing import MinMaxScaler

[0234] # Load data

[0235] data = pd.read_csv("load_data.csv")

[0236] load_values ​​= data['load'].values ​​# Assume that the load data is in the 'load' column

[0237] # Normalization

[0238] scaler = MinMaxScaler()

[0239] normalized_load = scaler.fit_transform(load_values.reshape(-1, 1))

[0240] # Build training data (for example, use the load of the previous 24 hours to predict the load of the next hour)

[0241] def create_sequences(data, seq_length):

[0242] X, y = [], []

[0243] for i in range(len(data) - seq_length):

[0244] X.append(data[i:i+seq_length])

[0245] y.append(data[i+seq_length])

[0246] return np.array(X), np.array(y)

[0247] seq_length = 24 # Use the load of the previous 24 hours to predict the load of the next hour

[0248] X, y = create_sequences(normalized_load, seq_length)

[0249] # Divide the training set and test set

[0250] train_size = int(len(X) * 0.8)

[0251] X_train, X_test = X[:train_size], X[train_size:]

[0252] y_train, y_test = y[:train_size], y[train_size:]

[0253] from tensorflow.keras.models import Sequential

[0254] from tensorflow.keras.layers import Dense, LSTM, Dropout

[0255] def build_generator(input_dim):

[0256] model = Sequential()

[0257] model.add(LSTM(50, input_shape=(input_dim, 1), return_sequences=True))

[0258] model.add(Dropout(0.2))

[0259] model.add(LSTM(50, return_sequences=False))

[0260] model.add(Dropout(0.2))

[0261] model.add(Dense(1, activation='tanh')) # Output the normalized load value

[0262] return model

[0263] generator = build_generator(seq_length)

[0264] generator.summary()

[0265] from tensorflow.keras.models import Sequential

[0266] from tensorflow.keras.layers import Dense, LSTM, Dropout

[0267] def build_generator(input_dim):

[0268] model = Sequential()

[0269] model.add(LSTM(50, input_shape=(input_dim, 1), return_sequences=True))

[0270] model.add(Dropout(0.2))

[0271] model.add(LSTM(50, return_sequences=False))

[0272] model.add(Dropout(0.2))

[0273] model.add(Dense(1, activation='tanh')) # Output the normalized load value

[0274] return model

[0275] def build_discriminator(input_dim):

[0276] model = Sequential()

[0277] model.add(LSTM(50, input_shape=(input_dim, 1), return_sequences=True))

[0278] model.add(Dropout(0.2))

[0279] model.add(LSTM(50, return_sequences=False))

[0280] model.add(Dropout(0.2))

[0281] model.add(Dense(1, activation='sigmoid')) # Output probability

[0282] return model

[0283] discriminator = build_discriminator(seq_length)

[0284] discriminator.summary()

[0285] from tensorflow.keras.optimizers import Adam

[0286] # Compile the discriminator

[0287] discriminator.compile(optimizer=Adam(learning_rate=0.0002), loss='binary_crossentropy', metrics=['accuracy'])

[0288] # Freeze the discriminator weights

[0289] discriminator.trainable = False

[0290] # Build GAN model

[0291] gan_input = tf.keras.Input(shape=(seq_length, 1))

[0292] gan_output = discriminator(generator(gan_input))

[0293] gan = tf.keras.Model(gan_input, gan_output)

[0294] # Compile GAN

[0295] gan.compile(optimizer=Adam(learning_rate=0.0002), loss='binary_crossentropy')

[0296] gan.summary()

[0297] def train_gan(generator, discriminator, gan, data, epochs=10000,batch_size=128, save_interval=1000):

[0298] half_batch = int(batch_size / 2)

[0299] for epoch in range(epochs):

[0300] # Generate real samples

[0301] idx = np.random.randint(0, data.shape[0], half_batch)

[0302] real_samples = data.iloc[idx]

[0303] # Generate fake samples

[0304] noise = np.random.normal(0, 1, (half_batch, 100))

[0305] fake_samples = generator.predict(noise)

[0306] # Train the discriminator

[0307] d_loss_real = discriminator.train_on_batch(real_samples,np.ones((half_batch, 1)))

[0308] d_loss_fake = discriminator.train_on_batch(fake_samples,np.zeros((half_batch, 1)))

[0309] d_loss = 0.5 * np.add(d_loss_real, d_loss_fake)

[0310] # Generate noise for training generator

[0311] noise = np.random.normal(0, 1, (batch_size, 100))

[0312] # Training the generator

[0313] valid_y = np.array([1] * batch_size)

[0314] g_loss = gan.train_on_batch(noise, valid_y)

[0315] # Print progress

[0316] if epoch % save_interval == 0:

[0317] print(f"{epoch} [D loss: {d_loss[0]}, acc.: {100*d_loss[1]}] [G loss: {g_loss}]")

[0318] import tensorflow as tf

[0319] # Training parameters

[0320] epochs = 100

[0321] batch_size = 32

[0322] # Training loop

[0323] for epoch in range(epochs):

[0324] # 1. Training the Discriminator

[0325] idx = np.random.randint(0, X_train.shape[0], batch_size)

[0326] real_samples = X_train[idx]

[0327] real_labels = y_train[idx]

[0328] # Generate fake samples

[0329] noise_input = np.random.normal(0, 1, (batch_size, seq_length, 1))

[0330] fake_labels = generator.predict(real_samples) # Generate load using generator

[0331] # Train the discriminator

[0332] d_loss_real = discriminator.train_on_batch(np.hstack((real_samples, real_labels.reshape(-1, 1, 1))), np.ones((batch_size, 1)))

[0333] d_loss_fake = discriminator.train_on_batch(np.hstack((real_samples, fake_labels.reshape(-1, 1, 1))), np.zeros((batch_size, 1)))

[0334] d_loss = 0.5 * np.add(d_loss_real, d_loss_fake)

[0335] # 2. Training the Generator

[0336] noise_input = np.random.normal(0, 1, (batch_size, seq_length, 1))

[0337] g_loss = gan.train_on_batch(real_samples, np.ones((batch_size,1)))

[0338] # Print training progress

[0339] print(f"Epoch {epoch+1} / {epochs} | D loss: {d_loss[0]:.4f}, Daccuracy: {d_loss[1]:.4f} | G loss: {g_loss:.4f}")

[0340] It should be noted that the serial numbers of the embodiments of the present application are for description only and do not represent the advantages and disadvantages of the embodiments. In addition, the terms "including", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0341] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0342] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for formulating energy storage charging and discharging strategies based on multi-factor prediction, characterized in that: Including steps: S1, collects data related to energy storage charging and discharging; S2, based on the collected energy storage charging and discharging related information, determines whether the current energy storage charging and discharging strategy needs to be adjusted; S3, constructing a power consumption prediction model based on the data related to energy storage charging and discharging, and using the power consumption prediction model to perform category prediction on future comprehensive power consumption data to obtain future comprehensive power consumption data, specifically including the following steps: 301, using linear regression to build a production load prediction model. Specifically, using linear regression to predict the production load data by category, the categories include: normal production and abnormal production; 302, using random forest regression to build a life load prediction model. Specifically, using random forest regression to predict the categories of life load data, the categories include: typical working days and special days; 303, using ANN to build a distributed photovoltaic prediction model. Specifically, using ANN-1 and ANN-2 to form a weather category prediction model for sunny and cloudy days, the weather categories include: sunny and cloudy; S4, optimizing the future comprehensive power consumption data according to the constrained power load; S5: Establish a day-ahead dispatch prediction model and an intraday dispatch optimization model, and formulate a dispatch strategy for future power load based on the optimized future comprehensive power consumption data; S4 includes the following steps: S401, classifying the power load and adding constraints to the classified power load; Constraints include adjustable power load power constraints, power load transfer constraints, power load transfer upper limit constraints, total power load before and after adjustment constraints, power load power balance constraints, and power load cost-benefit constraints; The adjustable electric load power constraint includes an adjustable electric load power constraint 1 and an adjustable electric load power constraint 2; The formula for the adjustable power load power constraint 1 is: 0≤PIL(m,t)≤cIL(m)*pload(t) Where t is the time information, m is the level of the adjustable power load power, PIL(m,t) is the power of the mth level adjustable power load at time t, cIL(m) is the maximum adjustable proportion of the mth level adjustable power load in the total power, and pload(t) is the power of the total power load at time t. The formula for the second power constraint of the adjustable power load is: PIL(m,t)≤Tag*pload(t) Where PIL(m,t) is the power of the mth level adjustable user load at time t, Tag is the preset target threshold of the total system power load at the current moment, and pload(t) is the power of the total power load at time t. Electricity load transfer constraints include electricity load transfer upper limit constraints and electricity load transferability constraints; The formula for the power load transfer constraint is: USHIFTL(t)+USHIFTQ(t)≤1 Where USHIFTL(t) is the theoretical load that can be transferred outward at time t, and USHIFTQ(t) is the theoretical load that can be transferred from the outside at time t. The formula for the upper limit constraint of electricity load transfer is: SHIFTL(t)≤USHIFTL(t)*pload(t)*Lup SHIFTQ(t)≤USHIFTQ(t)*pload(t)*Lup Where SHIFTL(t) is the load of the load that can be transferred outward at time t, SHIFTQ(t) is the load of the load that is actually transferred from the outside at time t, USHIFTL(t) is the load of the load that can be transferred outward at time t in theory, USHIFTQ(t) is the load of the load that is actually transferred from the outside at time t in theory, pload(t) is the total load of the load at time t, and Lup is the transfer upper limit coefficient; The formula for the total power load constraint before and after regulation is: sum(SHIFTL)=sum(SHIFTQ) sum(SHIFTL)≤C sum(SHIFTQ)≤C Where C is the total power load, sum is the sum calculation, SHIFTL is the load of the power load that can be transferred outward, SHIFTQ is the load of the power load that is actually transferred in from the outside, and Min is the minimum value calculation; The power balance constraint method of the electric load is: load(t)-SHIFTL(t)+SHIFTQ(t)-sum(PIL(m,t))=Pmgb(t) Where sum(PIL(m,t)) represents the total load of the adjustable power load at time t, Pmgb(t) is the total power consumption of the adjustable power load at time t, SHIFTL(t) is the load of the power load actually transferred outward at time t, SHIFTQ(t) is the load of the power load actually received from the outside at time t, and pload(t) is the total load of the power load at time t. The electricity load cost-benefit constraints include the total electricity load transfer costs and electricity load compensation costs; The calculation formula for the total electricity load transfer fee is: Cshift(t)=A*SHIFTL(t)+B*SHIFTQ(t) Where Cshift(t) is the total transfer cost of electricity load at time t, SHIFTL(t) is the load of electricity load actually transferred outward at time t, SHIFTQ(t) is the load of electricity load actually received from the outside at time t, A is the cost weight of the electricity load transferred outward, and B is the cost weight of the electricity load received from the outside; The calculation formula for electricity load compensation fee is: Comp=Basic-α*ΔL Where Comp is the electricity load compensation fee, Basic is the basic electricity fee, α is the adjustment coefficient, and ΔL is the electricity load; S402, optimizing the future comprehensive power consumption data according to the power load scheduling plan and the power load constraints to obtain the optimized future comprehensive power consumption data, including the following steps: A1, setting the objective function of future comprehensive electricity consumption data; The objective functions of the future integrated electricity consumption data include minimizing the total electricity cost and maximizing the load utilization; The formula for minimizing the total electricity cost is: Min_Ctotal=∑(Charge(t)*(pload(t)-SHIFTL(t)+SHIFTQ(t)-sum(PIL(m,t))) Where Min_Ctotal is the minimized total electricity cost, Charge(t) is the electricity price at time t, SHIFTL(t) is the actual load amount of the transferable load to the outside at time t, SHIFTQ(t) is the actual load amount of the load transferred from the outside at time t, PIL(m,t) is the power of the adjustable load at level m at time t, and sum represents the summation calculation; The calculation formula for maximizing load utilization is: Max_Utili=∑(pload(t)-SHIFTL(t)+SHIFTQ(t)-sum(PIL(m,t))) / C Where Max_Utili is the maximum load utilization, SHIFTL(t) is the load of the load that can be transferred outward at time t, SHIFTQ(t) is the load of the load that is actually transferred from the outside at time t, PIL(m,t) is the power of the m-th level adjustable user load at time t, sum represents the summation calculation, and C is the total power load; A2, taking the power load constraint as the feasible domain of the objective function of future comprehensive power consumption data; A3, using a linear programming solver, solves the objective function of the future comprehensive electricity consumption data; A4, based on the solution results of the future comprehensive electricity consumption data, obtain the optimized future comprehensive electricity consumption data.

2. The method for formulating energy storage charging and discharging strategies based on multi-factor prediction according to claim 1 is characterized in that: S2 determines whether the current energy storage charging and discharging strategy needs to be changed. The specific judgment conditions are: Set thresholds for energy storage charging and discharging related information. By judging whether the deviation between the collected energy storage charging and discharging related data and the day-ahead reference value exceeds the threshold, if any data exceeds the preset threshold, it triggers a change to the current energy storage charging and discharging strategy; if all data are within the threshold range, the current strategy remains unchanged.

3. The method for formulating energy storage charging and discharging strategies based on multi-factor prediction according to claim 1, characterized in that: S5 includes the steps of: S501: Build a day-ahead scheduling prediction model and an intraday scheduling optimization model. Specifically, both the day-ahead scheduling prediction model and the intraday scheduling optimization model use a two-layer structure to manage power fluctuations of different scheduling durations. S502, calculating the power consumption during the future peak period and the future peak period according to the peak period power consumption and the peak period power consumption in the optimized future comprehensive power consumption data; S503, a day-ahead dispatch prediction model generates a day-ahead dispatch reference value, and the day-ahead dispatch reference value, the future peak period, and the future off-peak period electricity consumption are input into an intraday dispatch optimization model to obtain a future electricity consumption and energy storage charging and discharging dispatch strategy.

4. The method for formulating energy storage charging and discharging strategies based on multi-factor prediction according to claim 3 is characterized in that: The calculation formula for the future peak period electricity consumption is: Where E_High is the electricity consumption during the future peak period, P_High(t) is the load power at time t during the future peak period, and t j and t i For future peak electricity consumption periods; The calculation formula for the peak period power consumption is: Where E_Peak is the electricity consumption during the future peak period, P_Peak(t) is the load power at time t during the future peak period, and t n and t m For future peak electricity consumption periods.

5. The method for formulating energy storage charging and discharging strategies based on multi-factor prediction according to claim 3 is characterized in that: S503 includes the following steps: B1, using a day-ahead scheduling prediction model that makes predictions based on historical data and weather forecasts, with a time scale of ≥ 24 hours; B2, the forecast data is sent to the dispatch center, which initiates the start-stop plan and the call plan and outputs the day-ahead dispatch plan; B3, using a rolling optimization model on a short intraday time scale; B4 sends the short-term forecast data to the dispatch center, which then initiates the start / stop plan and the call plan, and outputs the intraday dispatch plan. B5 uses the intraday short-time-scale rolling optimization model, takes the intraday scheduling plan as the initial data, and makes real-time adjustments.

6. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the method for multi-factor prediction and formulation of energy storage charging and discharging strategies according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which is loaded and executed by a processor to implement the method for formulating energy storage charging and discharging strategies based on multi-factor prediction as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Park-level multi-energy complementary system optimization scheduling method and device

    CN113255992A