A multi-energy system scheduling-oriented learning method based on prediction-optimization-closed loop
By constructing a BiLSTM-based prediction model and a closed-loop optimization method based on the error rate-additional cost curve, the problem of the asymmetric impact of prediction errors on the operating costs of multi-energy systems is solved, and the synergistic optimization of prediction and scheduling is achieved, thereby improving the system's economy and resilience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAMEN UNIV
- Filing Date
- 2026-04-15
- Publication Date
- 2026-06-02
AI Technical Summary
The existing forecast-optimization-open-loop model cannot effectively distinguish the asymmetric impact of renewable energy output forecasting errors on the operating costs of multi-energy systems, resulting in suboptimal economic efficiency of dispatching decisions and a lack of a collaborative optimization mechanism between forecasting and dispatching.
A prediction model based on a bidirectional long short-term memory network (BiLSTM) is adopted, combined with a clustering algorithm and a two-stage economic scheduling optimization model, to construct an error rate-additional cost curve. The prediction model is optimized in a closed loop by using the backpropagation algorithm and gradient descent method, and the scheduling decision loss is fed back to coordinate the optimization of prediction and scheduling.
It significantly reduced the operating costs of multi-energy systems, improved system flexibility and energy storage efficiency, enhanced resilience to the uncertainties of renewable energy, optimized scheduling during critical periods, and reduced system operating costs by approximately 2.9%.
Smart Images

Figure CN122134156A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multi-energy system operation optimization technology, specifically involving a multi-energy system scheduling-oriented learning method based on a prediction-optimization closed loop. Background Technology
[0002] As the penetration rate of renewable energy in energy systems continues to increase, the volatility and uncertainty of its output pose significant challenges to the scheduling and operation of multi-energy systems (MES). MES typically encompass multiple load demands, including electricity, heat, and cooling, as well as various energy devices such as photovoltaics, battery storage, combined heat and power, and heat pumps. Their scheduling decisions must achieve optimal overall system economics while meeting diverse load demands.
[0003] Currently, the commonly used paradigm for scheduling problems in multi-energy systems containing renewable energy is the Prediction-Optimization-Open-loop (POO) model. This model first uses a predictive model to forecast future renewable energy output, then uses this forecast as a deterministic input to pass to a downstream scheduling optimization model to formulate the system's operating plan. This open-loop paradigm treats forecasting and scheduling as two independent stages. This open-loop model has the following drawbacks:
[0004] It only pursues improved statistical accuracy in forecasting, ignoring the actual impact of forecast errors on the economics of dispatching decisions. In actual operation, forecast errors of different directions (overestimation or underestimation), different magnitudes, and occurring at different times (such as peak or off-peak periods for renewable energy output) have a highly asymmetric impact on the total operating cost of multi-energy systems. For example, overestimating renewable energy output during peak periods may lead to the system needing to urgently purchase high-priced energy from the external energy market, the cost of which is far lower than the impact of underestimating output during off-peak periods. The traditional open-loop paradigm cannot distinguish this asymmetry, and simply reducing the absolute value of the error cannot effectively avoid the occurrence of high-cost errors, resulting in a final dispatching decision that is not economically optimal.
[0005] Furthermore, this paradigm lacks a mechanism to feed scheduling cost information back to the prediction model. The prediction model cannot perceive the specific impact of its output on downstream scheduling costs, and thus cannot achieve collaborative optimization between prediction and scheduling. Summary of the Invention
[0006] The purpose of this invention is to provide a multi-energy system scheduling-oriented learning method based on prediction-optimization-closed loop. This method feeds back the economic loss of scheduling decisions as a guiding signal to the training process of the prediction model, thereby achieving prediction model learning with the goal of minimizing scheduling costs. This solves the problem of inconsistency between prediction objectives and decision objectives in the existing prediction-optimization-open loop model.
[0007] To achieve the above objectives, the solution of this invention is: a multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop, comprising the following steps: S1. Construct and pre-train a renewable energy prediction model: A renewable energy output prediction model was built based on the Bidirectional Long Short-Term Memory (BiLSTM) network. The input features of the prediction model include historical renewable energy output impact data, meteorological characteristics of the target prediction day, and seasonal and hourly time characteristics. An error index was used to pre-train the prediction model to minimize the statistical deviation between the predicted and actual values. S2. Extract typical operating scenarios for multi-energy systems: Historical multi-energy load data and renewable energy output impact data are divided into datasets by season. Clustering algorithms are used to cluster the datasets of each season to generate typical daily load curves for each season and multiple typical daily renewable energy output impact curves, thus obtaining typical operating scenarios covering different seasons and renewable energy output characteristics. S3. Establish a two-stage economic dispatch optimization model for multi-energy systems: The first phase is: day-ahead dispatch, which involves developing an initial equipment operation plan based on renewable energy output forecasts and load demand, with the goal of minimizing day-ahead dispatch planning costs; The second phase is: intraday adjustment, which involves real-time correction of the day-ahead dispatch plan based on the actual output of renewable energy, with the goal of minimizing the additional costs caused by forecast errors, and updating the operation plan. S4. Construct an error rate-additional cost curve and quantify decision loss: Based on the two-stage economic scheduling optimization model, for each time period in each typical operating scenario, a mapping relationship between the prediction error rate and the additional cost caused by the error is established, forming an error rate-additional cost curve; based on the error rate-additional cost curve, a decision loss function that maps the prediction error to additional cost is defined. S5. Construct a hybrid loss function and implement closed-loop optimization of the prediction model: S5.1 Construct the total loss function, which is the weighted sum of the prediction loss of the prediction model and the decision loss defined in step S4; S5.2. Fine-tune the pre-trained prediction model using the total loss function. During the fine-tuning stage, update the prediction model parameters using the backpropagation algorithm and gradient descent method. S5.3 Input the predicted values output by the fine-tuned prediction model into the two-stage economic dispatch optimization model to complete the closed-loop dispatch optimization of the multi-energy system and realize the synergistic optimization of prediction and dispatch.
[0008] Furthermore, in step S1, the bidirectional long short-term memory network structure consists of an input layer, two BiLSTM layers, and two fully connected layers, wherein the first BiLSTM layer contains 128 hidden units and the second BiLSTM layer contains 64 hidden units.
[0009] Furthermore, in step S1, the error index is one or more combinations of mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE).
[0010] Furthermore, in step S2, the historical data is divided into summer, transitional season, and winter datasets according to the season, and the clustering algorithm is the K-medoids algorithm; the typical daily renewable energy output impact curve includes three typical curves: high, medium, and low.
[0011] Furthermore, step S4 specifically includes: S4.1, Define the output prediction error rate For predicted values Compared with actual value The ratio, , set up The value range is 0.5~1.55. Discretization with a fixed step size yields several discrete error rates. S4.2, Calculate the discrete error rate per hour t in each typical operating scenario. Input a two-stage economic scheduling model and calculate the discrete error rates. Corresponding total system operating cost It also defines the additional costs caused by errors in renewable energy output forecasting. ,in, When The theoretical optimal cost in hour t; S4.3. Use a piecewise linear function to fit the discrete error rate-additional cost data pairs to obtain the piecewise linear function of error rate-additional cost for that period. S4.4. The Huber loss function is used to smooth the piecewise linear function in the neighborhood of the breakpoint, so that the error rate-additional cost function is continuous at the breakpoint and the first derivative is continuous, thus obtaining a differentiable error rate-additional cost mapping function over the entire interval, which is used as the decision loss function.
[0012] Furthermore, in step S5.1, the total loss function is calculated as follows: ; In the formula, For mean square error loss, The decision loss is derived from the error rate-additional cost curve. This is the error rate versus additional cost curve. and These are the weighting coefficients.
[0013] Furthermore, in step S5.2, the model parameters The update rules are as follows: ; In the formula, Let be the parameters to be updated in the renewable energy output prediction model for the t-th iteration. These are the model parameters updated after the (t+1)th iteration. The learning rate for model training. It is the partial derivative sign. The total loss function is the model parameters at the t-th iteration. The first-order partial derivative.
[0014] Furthermore, the renewable energy source is one or more of photovoltaic, wind power, and hydropower.
[0015] Furthermore, the multi-energy system includes multiple loads such as electricity, heat, and cooling, as well as at least two energy devices from photovoltaic, battery energy storage systems, combined heat and power, and grid interaction.
[0016] After adopting the above solution, the beneficial effects of the present invention are as follows: The prediction-optimization-closed-loop paradigm proposed in this invention achieves cost-oriented collaborative optimization of prediction and decision-making by using the economic loss of scheduling decisions as a guiding signal to feed back into the training process of the prediction model. This brings significant beneficial effects, specifically reflected in the following aspects: 1. Compared with the traditional prediction-optimization-open-loop paradigm, the POC paradigm of this invention can actively suppress prediction error patterns that lead to high compensation costs. By considering the asymmetric impact of error direction and time on cost, high-cost errors are actively suppressed, and the system operating cost is reduced by approximately 2.9% compared with the traditional open-loop method, as shown in Table 1.
[0017] 2. Unlike traditional methods that symmetrically handle prediction errors, this invention fully considers the asymmetric impact of prediction errors on system economy. Specifically, this invention constructs an error rate-additional cost curve, such as... Figure 3As shown, the inherent laws governing renewable energy forecasting errors are quantified, effectively addressing the cost risks caused by the asymmetry in the direction of forecasting errors.
[0018] 3. Overcoming the time sensitivity of forecast errors and optimizing scheduling during critical periods. This invention discovers that the economic impact of forecast errors exhibits high temporal heterogeneity, such as... Figure 4 As shown, the impact is greatest during peak photovoltaic output periods (such as 11:00-17:00). Traditional uniformly weighted loss functions cannot distinguish the sensitivity during this period.
[0019] 4. Enhance system flexibility and energy storage efficiency, strengthening operational resilience. The POC paradigm optimizes the charging and discharging strategy of battery energy storage systems through more accurate forecasting. The system tends to store low-priced electricity during off-peak hours to offset midday power shortages caused by potential overestimation errors, thereby significantly reducing reliance on the high-priced intraday spot market. In the case study, intraday grid procurement decreased from 693 kWh to 105 kWh. Figure 5 As shown in -b. This synergistic optimization with flexible resources enhances the overall resilience and economic efficiency of multi-energy systems in the face of renewable energy uncertainties. Attached Figure Description
[0020] Figure 1 This is a diagram illustrating the overall technical framework of the prediction-optimization-closed-loop multi-energy system scheduling-oriented learning method of the present invention. Figure 1 -a is a schematic diagram of the traditional prediction-then-optimization model; Figure 1 -b is a schematic diagram of the economic scheduling stage of MES; Figure 1 -c is a schematic diagram of the mode in which the cyclic optimization is fed back to the prediction in this invention.
[0021] Figure 2 This is a combined graph of performance test results for the POC and POO paradigms. Figure 2 -a is a schematic diagram of the decision-making process of the two-stage economic scheduling optimization model; Figure 2 -b is a curve comparing the actual value of photovoltaic power generation on a typical day with the predicted values of POC and POO paradigms; Figure 2 -c is a graph showing the change in prediction loss of the prediction model during the first stage of training. Figure 2 -d-1 is a graph showing the change in prediction loss of the prediction model during the second stage of training; Figure 2 -d-2 is a graph showing the change in decision loss of the prediction model during the second stage of training; Figure 2-d-3 is a graph showing the change in the combined total loss of the prediction model during the second stage of training; Figure 2 -e is the error distribution histogram of the POC paradigm and POO paradigm in different error intervals (such as overestimation / underestimation).
[0022] Figure 3 This is a schematic diagram of the error rate-additional cost curve for a typical operating scenario of the present invention.
[0023] Figure 4 This is a time-by-time distribution feature map of the additional cost of prediction error in this invention, wherein, Figure 4 -a is an hourly distribution feature map of the additional cost of summer forecast errors; Figure 4 -b is the hourly distribution feature map of the additional cost of forecast error during the transition season; Figure 4 -c is an hourly distribution feature map of the additional cost of winter prediction errors.
[0024] Figure 5 The scheduling strategy diagrams for MES in different paradigms are shown below: Figure 5 -a-1 is a comparison chart of hourly average scheduling costs for typical summer scenarios; Figure 5 -a-2 is a comparison chart of hourly average scheduling costs for typical scenarios during the transition season; Figure 5 -a-3 is a comparison chart of hourly average scheduling costs for typical winter scenarios; Figure 5 -b-1 is a schematic diagram of the supply and demand balance of the POO paradigm on a typical summer day; Figure 5 -b-2 is a schematic diagram of the supply and demand balance of the POC paradigm on a typical summer day; Figure 5 -b-3 is a schematic diagram of the supply and demand balance of the theoretically optimal paradigm on a typical day in summer; Figure 5 -c-1 is a diagram of the hourly charging strategy of a typical summer day for a battery energy storage system; Figure 5 -c-2 is a diagram of the hourly discharge strategy of a typical summer day for a battery energy storage system; Figure 5 -c-3 is an hourly strategy diagram for day-ahead power grid procurement during typical summer days; Figure 5 -c-4 is an hourly strategy diagram for intraday power grid procurement on a typical summer day; Figure 5 -c-5 is a diagram showing the hourly scheduling strategy of heat pump units on a typical summer day; Figure 5-c-6 is a diagram showing the hourly dispatching strategy of cogeneration units on a typical summer day.
[0025] In each of the attached figures, TO represents the theoretical optimum. Detailed Implementation
[0026] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] This invention proposes a prediction-optimization-closed-loop scheduling-oriented learning method for multi-energy systems. For example... Figures 1 to 5 As shown, this method feeds back the scheduling decision loss of a multi-energy system to the fine-tuning prediction model, achieving global optimization. The overall framework is as follows (see reference). Figure 1 ): First, a renewable energy forecasting module based on a bidirectional long short-term memory (BiLSTM) network was developed to predict hourly renewable energy output (power generation).
[0028] Secondly, clustering techniques are used to extract representative daily scenarios from historical data to capture seasonality and operational diversity.
[0029] Third, a two-stage multi-energy system economic dispatch optimization model that simultaneously meets the needs of electricity, heating and cooling was constructed to quantify the impact of prediction errors on system dispatch costs.
[0030] Finally, the cost-error function is derived from the scheduling optimization model and fed back as a decision-oriented loss into the prediction training process.
[0031] The technical solution of this invention will be described in detail below using photovoltaic (PV) power generation forecasting as an example. Here, renewable energy refers to photovoltaic power, renewable energy output refers to photovoltaic power output, and renewable energy output impact data refers to photovoltaic irradiance data. Those skilled in the art will understand that this invention is also applicable to forecasting and scheduling scenarios for other renewable energy sources such as wind power and hydropower.
[0032] Step S1: Construct a renewable energy prediction model In this embodiment, a bidirectional long short-term memory (BiLSTM) network is used as the basic prediction model. Its network structure consists of an input layer, two BiLSTM layers, and two fully connected layers. The first BiLSTM layer contains 128 hidden units, and the second BiLSTM layer contains 64 hidden units. This basic prediction model can effectively capture long-term dependencies in time series data.
[0033] The input features of this prediction model include: historical irradiance data, meteorological characteristics of the target prediction day (such as temperature, humidity, and wind speed), and time characteristics (season, hour, etc.).
[0034] Before entering closed-loop optimization, the prediction model needs to be pre-trained to enable it to have basic prediction capabilities.
[0035] This phase uses three commonly used error metrics: Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Squared Error (RMSE) to statistically evaluate the prediction quality. The goal is to minimize the predicted value. Compared with actual value Statistical deviation between them.
[0036] The mean absolute error (MAE) measures the average absolute deviation between the predicted and actual values, and avoids the cancellation between positive and negative errors, as shown in Equation 1:
[0037] The mean squared error (MSE) amplifies the effect of larger errors by squaring them and is more sensitive to outliers, as shown in Equation 2:
[0038] The root mean square error (RMSE) is derived from the mean square error (MSE) and uses the same units as the original data, which makes the interpretation more intuitive, as shown in Equation 3:
[0039] In the formula, To contribute to actual photovoltaic power, For the predicted photovoltaic output, This represents the number of samples.
[0040] In the pre-training phase, the specific process is as follows: After inputting historical photovoltaic power output data into the BiLSTM network to obtain prediction results, the gradient of the MSE loss function with respect to the network parameters is calculated using the backpropagation algorithm. An optimization algorithm (Adam optimizer) is then used for iterative parameter updates to minimize the statistical deviation between the predicted and actual values. Simultaneously, the mean absolute error (MAE) and root mean square error (RMSE) are used as auxiliary evaluation metrics. MAE and RMSE are calculated on the validation set in each training iteration cycle to monitor the model's generalization ability and trigger an early stopping mechanism to prevent overfitting. After pre-training, the prediction model possesses the initial ability to capture the temporal patterns of photovoltaic power output.
[0041] In the subsequent closed-loop optimization of this invention, the mean squared error (MSE) will be used as a representative of the prediction loss, denoted as... .
[0042] In addition to statistical accuracy, the economic value of the forecasting model is also assessed through the operating cost of multi-energy system dispatch. The detailed calculation of this operating cost will be given in the subsequent section on multi-energy system economic dispatch optimization models. It depends on the additional cost caused by photovoltaic output forecasting errors.
[0043] Step S2: Extraction of typical operating scenarios and data preparation Because the operation of multi-energy systems exhibits significant seasonality and weather dependence, directly modeling all historical data would be computationally intensive and difficult to capture key features. Therefore, this step uses clustering techniques to extract representative typical operating scenarios.
[0044] First, historical multi-energy load (electricity, heat, cooling) data and photovoltaic irradiance data are divided by season (e.g., summer, transitional season, winter).
[0045] Subsequently, the K-medoids clustering algorithm was used to perform cluster analysis on the data within each season. Specifically: for load data, a typical daily load curve was generated for each season; for solar irradiance data, considering its large fluctuations, three typical curves were generated for each season, representing high irradiance days, medium irradiance days, and low irradiance days, respectively.
[0046] Specifically, the K-medoids clustering algorithm is used to divide the photovoltaic irradiance time series of M historical calendar days within a certain season into 3 clusters. Let the historical daily irradiance dataset for this season be... ,in Let represent the 24-hour irradiance sequence for day i. The goal of clustering is to find a set of typical daily sequences that actually exist in the dataset. (i.e., cluster centers) to minimize the total distance from all sample points to their respective cluster centers. The objective function for optimization is as follows:
[0047] In the formula, The value of the clustering objective function; Indicates the first Clusters ( (corresponding to high, medium, and low irradiance days respectively). For the first The sequence of cluster centers of each cluster; Represents the irradiance sequence for day i. with cluster center sequence Distance indicators between them.
[0048] In this embodiment, the distance indicator The calculation is performed using Euclidean distance, and the formula is as follows:
[0049] In the formula, and and represent the irradiance values at time t for the i-th day sequence and the corresponding cluster center, respectively. The objective function is iteratively optimized until convergence, and the final output is... This refers to the extracted impact curves of renewable energy output on typical daily levels of high, medium, and low.
[0050] During clustering, metrics such as Euclidean distance or Manhattan distance can be used to measure the similarity between daily curves.
[0051] Through the above steps, we obtained nine representative typical operating scenarios (three seasons × three irradiance types). For example... Figure 3 As shown, these scenarios comprehensively represent the system's operational status under different seasons and weather conditions, providing a data foundation for subsequent cost quantification analysis.
[0052] Step S3: Establish an economic dispatch optimization model for multi-energy systems: The multi-energy system in this embodiment includes photovoltaic (PV), battery energy storage system (BESS), combined heat and power (CHP) unit, and interaction with the power grid.
[0053] To simulate the actual operation of the system and quantify the impact of prediction errors on operating costs, this step constructs a two-stage multi-energy system economic dispatch optimization model, referencing... Figure 2 The goal of this model is to minimize the total operating cost of the system while meeting the demands for electricity, heat (heating), and cooling loads (cooling). The total operating cost of the system... From the day-ahead planned costs of the first phase Intraday adjustment costs in the second phase The structure, and its objective function, are as follows:
[0054] Phase 1: Day-ahead Scheduling. Based on the predicted photovoltaic output and the predicted load demand, a scheduling plan for the following day is formulated with the goal of minimizing the cost of the day-ahead scheduling plan. This plan includes the initial operation plan for the equipment the following day, such as start-up and shutdown plans and processing plans. The predicted load demand includes the day-ahead predicted values of electrical load, thermal load, and cooling load. In the offline training and typical scenario analysis phase of this invention, the predicted load demand is directly taken from the typical daily load curve data of the corresponding season extracted by the clustering algorithm in step S2. In the actual online operation phase of the multi-energy system, the predicted load demand is obtained in advance through a preset conventional load forecasting algorithm (BiLSTM) based on historical load data and weather forecast data. Since the core of this invention is to solve the high uncertainty of photovoltaic output and its asymmetric cost problem, to highlight the key point, it is assumed that the system's load forecasting accuracy is high, and its predicted values are treated as deterministic input parameters in the day-ahead scheduling phase.
[0055] The dispatching was based on the predicted photovoltaic output value. Develop a preliminary equipment operation plan based on load demand. Its cost... This mainly includes the operating cost of the combined heat and power (CHP) unit, the day-ahead grid power purchase cost, and the power consumption cost of the heat pump. The calculation formula is as follows:
[0056] In the formula, t is the scheduling period; T is the scheduling cycle; , and These represent the combined heat and power (CHP) cost for time period t, the day-ahead grid power purchase cost, and the heat pump operating cost, respectively.
[0057] Phase Two: Intraday Adjustment. On the actual operating day, the day-ahead dispatch plan is adjusted in real time based on the actual photovoltaic output to minimize the additional costs incurred in compensating for forecast errors. If there is a deviation between the actual and forecasted photovoltaic output, the system will balance this by adjusting the charging and discharging power of the battery energy storage system, adjusting the output of the combined heat and power (CHP) units, or buying and selling electricity from the real-time / spot market. Its cost... The difference between the real-time market cost of purchasing electricity and the revenue from selling electricity is calculated using the following formula:
[0058] In the formula, The additional cost of purchasing electricity from the real-time market (spot market) during time period t; The objective function is to calculate the revenue from selling electricity to the grid. This objective function allows for a quantitative analysis of the additional dispatch costs caused by renewable energy forecasting errors.
[0059] For example, when the actual output of photovoltaic power is lower than the predicted value, electricity needs to be purchased from the real-time market at a higher price to meet the load, and this part of the electricity purchase cost is the additional cost.
[0060] To ensure the safe and stable operation of the multi-energy system, the solution to the above objective function must satisfy the following constraints.
[0061] Energy balance constraint: The system must meet the supply and demand balance of electricity, heat and cold energy in the day-ahead and real-time phases, respectively.
[0062] Current energy balance:
[0063] Real-time energy balance:
[0064] In the formula, For total electricity load demand, and These are the discharge and charging power of the battery energy storage, respectively. and These represent the day-ahead and intraday power purchase volumes, respectively. Power generation for CHP This refers to the power consumption of the heat pump.
[0065] Equipment capacity and operational constraints: (1) Capacity constraints. The output of all energy conversion equipment (such as CHP, absorption chillers, boilers, heat pumps, etc.) shall not exceed their corresponding rated installed capacity. (2) CHP operational constraints. To avoid the unit operating under low load, the minimum partial load factor of CHP is limited (not less than 30% of full load). At the same time, to avoid frequent start-ups and shutdowns, a limit is set on the maximum number of start-ups and shutdowns per day, and the ramp rate of adjacent time periods is constrained (power change shall not exceed 50% of the installed capacity).
[0066] Energy storage system constraints: (1) The storage capacity of an energy storage system (including battery energy storage and cold storage system) in any time period t is related to the storage capacity in the previous time period and the charging and discharging efficiency in the current time period, and the total energy storage capacity cannot exceed its installed capacity. (2) Introduce 0-1 Boolean variable constraints to ensure that the energy storage device cannot perform charging and discharging operations at the same time period, that is, satisfy:
[0067] In the formula, and These are binary variables representing the energy release and charging states, respectively.
[0068] Step S4: Construct the error rate-additional cost curve and quantify the decision loss: Based on the aforementioned multi-energy system economic dispatch optimization model, we construct the error rate-additional cost curves for each typical operating scenario over a 24-hour period to generate and approximate the loss function. These curves characterize the relationship between prediction errors and the resulting additional costs, providing a basis for feeding cost-oriented losses back into the prediction model.
[0069] S4.1 Definition of Prediction Error Rate: Define the photovoltaic power output prediction error rate. Forecast value of photovoltaic power output Compared with actual photovoltaic output The ratio, .
[0070] Based on the empirical distribution of photovoltaic output prediction errors in MES scheduling The range is set to 0.5 to 1.55, with a step size of 0.05, to obtain several discrete error rates.
[0071] S4.2 Discrete error rate for each hour t in each typical operating scenario The corresponding predicted value is calculated, as shown in Equation 12:
[0072] In the formula, This represents the actual photovoltaic output at time t.
[0073] Predicted values The input is then run into the multi-energy system economic dispatch optimization model in step three to obtain the total system operating cost. .
[0074] Additional cost calculation: Additional costs caused by forecast errors The difference between the actual cost and the theoretically optimal cost without error is shown in Equation 5:
[0075] In the formula, Is when The theoretical optimal cost in hour t (without prediction error).
[0076] This process generates a discrete set of data for each hour t. Data pairs. Each typical operating scenario yields a set of 24 discrete data pairs over 24 hours.
[0077] S4.3. A piecewise linear function is used to fit the discrete error rate-additional cost data pairs to obtain the hourly error rate-additional cost piecewise linear function. As shown in Equation 14:
[0078] In the formula, This represents the slope of the i-th segment of the linear function. This represents the slope of the i-th segment of the linear function. To minimize the error rate, This represents the maximum error rate.
[0079] S4.4, Huber Loss Breakpoint Smoothing: Since piecewise linear functions are not differentiable at their breakpoints, they cannot be directly used for backpropagation training of neural networks. Therefore, piecewise linear functions must be smoothed to make them continuous over the entire interval and their first derivative continuous.
[0080] This embodiment employs a smoothing method based on the Huber loss concept. In a small neighborhood near each breakpoint, a quadratic function replaces the original linear function, thereby connecting the left and right segments and ensuring that the function is smooth and differentiable within that neighborhood.
[0081] The specific smoothing process is as follows: For each breakpoint at time t neighborhood To avoid overlap of the smooth neighborhoods of adjacent breakpoints, The value is set to half the step size of the discrete error interval. Within this neighborhood, the Huber loss function is used to replace the original linear segments on both sides of the breakpoint, thereby ensuring that at the breakpoint... Continuity of the first derivative. Let adjacent discontinuities be considered. The Section (left) and the first The slopes of the linear segments (on the right) are respectively and To ensure at the breakpoint The function value and first derivative are continuous at the point, and the Huber smoothing function is used. The calculation formula is:
[0082] In the formula, This indicates the point at which the original piecewise linear function breaks. The actual function value at that point. The slope of the segment before the breakpoint; The slope of the segment after the breakpoint; in the neighborhood of the breakpoint. Otherwise, the original piecewise linear function form is retained.
[0083] After smoothing, we obtain a time-varying, hourly-level, scenario-based error rate-additional cost mapping function, denoted as: The complete mathematical expression of this decision loss function is composed of a quadratic function segment within the smoothed neighborhood of the breakpoint and an original linear function segment outside the neighborhood. Its unified piecewise expression is defined as follows:
[0084] In the formula, Let be the decision loss function that is continuously differentiable at time t; The x-axis represents the error rate of the k-th breakpoint, where K is the total number of breakpoints; The set smooth neighborhood half-width; To breakpoint neighborhood Built-in Huber smooth quadratic function; The original error rate - additional cost piecewise linear function preserved outside all smooth neighborhoods.
[0085] Through the above expression, the present invention realizes a continuous and full-range first derivative continuous quantization mapping from the prediction error rate to the additional cost of multi-energy system scheduling, thereby satisfying the mathematical conditions for feeding the scheduling cost as a guiding signal back to the prediction model and using the gradient descent-based backpropagation algorithm for closed-loop training.
[0086] Repeat the above process to construct a smoothed decision loss function for each hour (24 hours) under each typical operating scenario (9 scenarios in total) obtained in step S2, resulting in a total of 9 × 24 = 216 different decision loss functions, which are used for model fine-tuning in subsequent step S5. Figure 3 As shown, a schematic diagram of the error rate-additional cost curves for different typical operating scenarios is presented.
[0087] Figure 4 It is an hourly analysis of the additional costs caused by prediction errors in different scenarios. It is precisely because of the asymmetry of error costs that the traditional POO paradigm (which handles errors symmetrically) cannot achieve optimal results. The POC paradigm, by constructing hourly and scenario-by-scenario cost curves, can accurately identify and suppress errors in high-cost periods.
[0088] Step S5: Prediction model closed-loop optimization: This step combines decision loss and prediction loss to perform closed-loop fine-tuning of the prediction model, giving it cost-awareness capabilities. Specifically: S5.1 Constructing the total loss function: Define the total loss function It is the prediction loss of the mean square error. And decision loss based on error rate-additional cost mapping function The weighted combination is calculated as follows:
[0089] In the formula, decision loss The smoothed error rate-additional cost mapping function value obtained in step S4, i.e. α and β are adaptive weight values, which are adaptively adjusted according to the relative magnitudes of the two losses to balance the statistical accuracy and economic benefits of the prediction. The calculation method is as follows:
[0090] When the prediction loss is large, α automatically increases to ensure the basic prediction accuracy of the model; when the decision loss is large, β automatically increases to guide the model to optimize in the direction of minimizing scheduling cost.
[0091] S5.2, Model Closed-Loop Fine-Tuning: The training of the prediction model in this invention is mainly divided into two stages: Phase 1: Before closed-loop fine-tuning, the prediction model is pre-trained using only the prediction loss (see step S1).
[0092] The second stage involves fine-tuning the pre-trained prediction model using the total loss function. The specific steps are as follows: like Figure 1 As shown in step -c, we extract raw data samples corresponding to the nine typical operating scenarios (e.g., data for all days belonging to the summer high-irradiance cluster) from the seasonal datasets divided in step S2, as fine-tuning data. We input the feature data of these samples into the pre-trained prediction model to obtain the predicted photovoltaic output value and calculate the corresponding error rate. The decision loss is obtained through the error rate-additional cost mapping function. Combined with predicted loss Obtain the total loss function ; The backpropagation algorithm is used to calculate the total loss against the model parameters. The partial derivatives are used to update the model parameters via gradient descent. The parameter update rule is as follows:
[0093] In the formula, Let be the parameters to be updated in the photovoltaic power output prediction model at the t-th iteration. These are the model parameters updated after the (t+1)th iteration. The learning rate for model training. It is the partial derivative sign. The total loss function is the model parameters at the t-th iteration. The first-order partial derivative.
[0094] S5.3, Optimization of Closed-Loop Scheduling: The fine-tuned prediction model is used as the core for photovoltaic (PV) power output prediction and applied to the actual multi-energy system dispatch. Specifically, the PV power output prediction value output by the fine-tuned prediction model is input into a two-stage economic dispatch optimization model in real time to sequentially complete the day-ahead dispatch plan formulation and intraday adjustment plan correction. At the same time, the actual error rate minus the additional cost data generated during the intraday dispatch process is fed back to the prediction model in real time for online rolling fine-tuning. This forms a continuous closed loop of "prediction-dispatch-cost feedback-model optimization," ultimately optimizing the operating cost of the multi-energy system.
[0095] Effect verification: To verify the effectiveness of this invention, a comparative test was conducted in a simulated multi-energy system (including PV, BESS, and CHP) between the prediction-optimization-closed-loop paradigm of this invention and the traditional prediction-optimization-open-loop paradigm. The open-loop paradigm used the same BiLSTM model as this invention (but trained only with MSE) for prediction and the same optimization model for scheduling.
[0096] The results are shown in Table 1. On the same annual test data, the total operating cost of the system using the closed-loop paradigm of this invention is reduced by about 2.9% compared with the open-loop paradigm.
[0097]
[0098] Further analysis shows that the closed-loop paradigm of this invention significantly reduces the high-priced electricity purchases during peak photovoltaic output periods (11:00-17:00) due to overestimation of forecasts, and optimizes the charging and discharging strategy of the battery energy storage system, enabling it to store more energy during off-peak periods to offset the risk of potential power shortages at midday. Figure 5 The diagram shows a comparison of scheduling strategies and costs for MES across different paradigms.
[0099] In summary, this invention constructs an error rate-additional cost curve, feeding back the economic objective of downstream scheduling as a decision loss to the training process of the upstream prediction model, thus achieving closed-loop collaborative optimization of prediction and decision-making. This method not only focuses on the statistical accuracy of prediction but also on the economic value of the prediction results, thereby suppressing the generation of high-cost prediction errors at the source and significantly improving the economic efficiency of multi-energy system operation.
[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop, characterized in that, Includes the following steps: S1. Construct and pre-train a renewable energy prediction model: A renewable energy output prediction model was built based on the Bidirectional Long Short-Term Memory (BiLSTM) network. The input features of the prediction model include historical renewable energy output impact data, meteorological characteristics of the target prediction day, and seasonal and hourly time characteristics. An error index was used to pre-train the prediction model to minimize the statistical deviation between the predicted and actual values. S2. Extract typical operating scenarios for multi-energy systems: Historical multi-energy load data and renewable energy output impact data are divided into datasets by season. Clustering algorithms are used to cluster the datasets of each season to generate typical daily load curves for each season and multiple typical daily renewable energy output impact curves, thus obtaining typical operating scenarios covering different seasons and renewable energy output characteristics. S3. Establish a two-stage economic dispatch optimization model for multi-energy systems: The first phase is: day-ahead dispatch, which involves developing an initial equipment operation plan based on renewable energy output forecasts and load demand, with the goal of minimizing day-ahead dispatch planning costs; The second phase is: intraday adjustment, which involves real-time correction of the day-ahead dispatch plan based on the actual output of renewable energy, with the goal of minimizing the additional costs caused by forecast errors, and updating the operation plan. S4. Construct an error rate-additional cost curve and quantify decision loss: Based on the two-stage economic scheduling optimization model, for each time period in each typical operating scenario, a mapping relationship between the prediction error rate and the additional cost caused by the error is established, forming an error rate-additional cost curve; based on the error rate-additional cost curve, a decision loss function that maps the prediction error to additional cost is defined. S5. Construct a hybrid loss function and implement closed-loop optimization of the prediction model: S5.1 Construct the total loss function, which is the weighted sum of the prediction loss of the prediction model and the decision loss defined in step S4; S5.
2. Fine-tune the pre-trained prediction model using the total loss function. During the fine-tuning stage, update the prediction model parameters using the backpropagation algorithm and gradient descent method. S5.3 Input the predicted values output by the fine-tuned prediction model into the two-stage economic dispatch optimization model to complete the closed-loop dispatch optimization of the multi-energy system and realize the synergistic optimization of prediction and dispatch.
2. The multi-energy system scheduling guidance learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: In step S1, the bidirectional long short-term memory network structure consists of an input layer, two BiLSTM layers and two fully connected layers, wherein the first BiLSTM layer contains 128 hidden units and the second BiLSTM layer contains 64 hidden units.
3. The multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: In step S1, the error index is one or more combinations of mean absolute error (MAE), mean square error (MSE), and root mean square error (RMSE).
4. The multi-energy system scheduling-guided learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: In step S2, the historical data is divided into summer, transitional season and winter datasets according to the season, and the clustering algorithm is the K-medoids algorithm; the typical daily renewable energy output impact curve includes three typical curves: high, medium and low.
5. The multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that, Step S4 specifically includes: S4.1, Define the output prediction error rate For predicted values Compared with actual value The ratio, , set up The value range is 0.5~1.
55. Discretization with a fixed step size yields several discrete error rates. S4.2, Calculate the discrete error rate per hour t in each typical operating scenario. Input a two-stage economic scheduling model and calculate the discrete error rates. Corresponding total system operating cost It also defines the additional costs caused by errors in renewable energy output forecasting. ,in, When The theoretical optimal cost in hour t; S4.
3. Use a piecewise linear function to fit the discrete error rate-additional cost data pairs to obtain the piecewise linear function of error rate-additional cost for that period. S4.
4. The Huber loss function is used to smooth the piecewise linear function in the neighborhood of the breakpoint, so that the error rate-additional cost function is continuous at the breakpoint and the first derivative is continuous, thus obtaining a differentiable error rate-additional cost mapping function over the entire interval, which is used as the decision loss function.
6. The multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: In step S5.1, the total loss function is calculated as follows: ; In the formula, For mean square error loss, The decision loss is derived from the error rate-additional cost curve. This is the error rate versus additional cost curve. and These are the weighting coefficients.
7. The multi-energy system scheduling-guided learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: In step S5.2, model parameters The update rules are as follows: ; In the formula, Let be the parameters to be updated in the renewable energy output prediction model for the t-th iteration. These are the model parameters updated after the (t+1)th iteration. The learning rate for model training. It is the partial derivative sign. The total loss function is the model parameters at the t-th iteration. The first-order partial derivative.
8. The multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: The renewable energy source is one or more of photovoltaic, wind power, and hydropower.
9. The multi-energy system scheduling-oriented learning method based on prediction-optimization-closed-loop as described in claim 1, characterized in that: The multi-energy system includes multiple loads such as electricity, heat, and cooling, as well as at least two energy devices from photovoltaic, battery energy storage systems, combined heat and power, and grid interaction.