Method and system for predicting the power load of an energy storage system

The integration of load and weather data using an advanced prediction model with multi-head self-attention and frequency domain enhancement addresses the low accuracy of conventional load prediction algorithms, enhancing prediction accuracy and adaptability to dynamic changes.

JP7832407B1Active Publication Date: 2026-03-17ZHEJIANG JINKO ENERGY STORAGE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Conventional load prediction algorithms for energy storage systems suffer from low accuracy due to reliance on historical load data and neglect of real-time weather data, failing to adapt to dynamic changes and resulting in significant prediction errors, especially in exceptional cases.

Method used

A method and system that integrates load and weather data using a prediction model with an encoder-decoder structure, incorporating multi-head self-attention, frequency domain enhancement, and residual connections to improve load prediction accuracy by fusing weather data with historical load sequences, and employing a scroll prediction mechanism for real-time updates.

Benefits of technology

Enhances load prediction accuracy by leveraging both historical and real-time weather data, enabling timely adjustments to load fluctuations and improving prediction efficiency through continuous updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007832407000001_ABST
    Figure 0007832407000001_ABST
Patent Text Reader

Abstract

This invention provides a method and system for predicting the power load of an energy storage system. [Solution] The method obtains the load sequence and weather sequence for the current time period, determines if any of the past load sequences of the energy storage system have a similarity that exceeds a preset threshold, and if not, obtains and modifies an initial load prediction sequence for a future time period based on the load sequence and weather sequence to obtain a modified first load prediction sequence. If there is a similarity, obtains the first load sequence with the highest similarity, obtains the actual load sequence and actual weather sequence for one target time period after the first load sequence, obtains a predicted weather sequence corresponding to a future time period, calculates a weather difference sequence between the actual weather sequence and the predicted weather sequence, obtains a load difference sequence based on the weather difference sequence, and superimposes the load difference sequence on the actual load sequence to obtain a second load prediction sequence.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application relates to the field of energy storage technology, and more particularly to a method and system for predicting the power load of an energy storage system. [Background technology]

[0002] Virtual power plants (VPPs) and microgrids are two crucial components of the current power system, playing a vital role in improving energy utilization efficiency and enhancing the flexibility and reliability of the power grid. Energy storage systems can provide virtual power plants and microgrids with rapid response and adjustment capabilities, and can supply them with a stable supply of electrical energy. Load forecasting for virtual power plants and microgrids can optimize energy dispatch for energy storage systems, playing a vital role in increasing the operational reliability and energy utilization efficiency of energy storage systems, and strengthening the flexibility and reliability of the power grid.

[0003] With technological advancements and increasing demand, users are placing higher expectations on energy dispatch for energy storage systems, and consequently, higher accuracy requirements for load prediction technologies in virtual power plants or microgrids. However, conventional load prediction algorithms still suffer from low accuracy, which negatively impacts the energy utilization efficiency of energy storage systems. [Overview of the project] [Problems that the invention aims to solve]

[0004] The present embodiment aims to provide a method for predicting the power load of an energy storage system and an energy storage system that can improve the accuracy of load prediction for an energy storage system. [Means for solving the problem]

[0005] To solve the above technical problems, an embodiment of the present invention provides a method for predicting the power load of an energy storage system, which involves obtaining a load sequence for the current time period of the energy storage system and obtaining a weather sequence for the current time period, wherein the weather sequence for the current time period is a sequence consisting of weather data corresponding to multiple points in time, and the weather data includes at least temperature, humidity, atmospheric pressure, and weather type, where the weather type is characterized in the form of numerical coding, and determining whether there are any load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, and if there are no load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, then predicting the power load from the current time period onward based on the load sequence and the weather sequence This includes obtaining an initial load prediction sequence for the upcoming time period, modifying the initial load prediction sequence to obtain a modified first load prediction sequence, obtaining the first load sequence with the highest similarity to the load sequence from among the past load sequences of the energy storage system if there is a load sequence in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, obtaining the actual load sequence and actual weather sequence for one target time period after the time period in which the first load sequence is located, obtaining a predicted weather sequence corresponding to the future time period after the current time period, calculating a weather difference sequence between the actual weather sequence and the predicted weather sequence, obtaining a load difference sequence based on the weather difference sequence, and superimposing the load difference sequence onto the actual load sequence to obtain a second load prediction sequence corresponding to the future time period.

[0006] Embodiments of the present invention provide an energy storage system comprising an energy storage device, a bidirectional energy storage converter, and an energy management module, wherein the energy management module is used to implement a power load prediction method for the energy storage system as described above, and the energy management module is also used to adjust the charge / discharge strategy of the energy storage system based on the first load prediction sequence or the second load prediction sequence.

[0007] In some embodiments, obtaining an initial load prediction sequence for future time periods after the current time period based on the load sequence and the weather sequence involves making the load sequence and the weather sequence input sequences to the prediction model such that the prediction model outputs the initial load prediction sequence for the future time period, wherein the prediction model includes an encoder and a decoder, the encoder including a plurality of stacked encoder layers and residual connection modules and layer normalization modules positioned after the stacked encoder layers, each encoder layer including a multi-head self-awareness mechanism module and a first feedforward neural network module, the decoder including sequentially connected mask self-awareness mechanism modules, frequency domain enhancement modules, attention mechanism modules and a second feedforward neural network module, and the frequency domain enhancement modules decomposing the load sequence with a moving average to obtain a low-frequency trend portion and a high-frequency trend portion, and randomly selecting a fixed number of frequency components using a discrete Fourier transform or wavelet transform to use as the basis frequencies for the calculations of the attention mechanism module.

[0008] In some embodiments, the training process of the prediction model involves obtaining an initial training sequence, the initial training sequence including feature data corresponding to the nearest N time points, each of which includes load data and weather data for the corresponding time point, where N is an integer greater than 0, and performing a normalization process on the initial training sequence to obtain a target training sequence, the formula for the normalization process being The file is TIFF0007832407000002.tif521, where x is a feature data of the initial training sequence, min(X) is the minimum feature data of the initial training sequence, max(X) is the maximum feature data of the initial training sequence, and x' is a feature data of the normalized target training sequence, and the process includes inputting the target training sequence into the prediction model and training it to obtain the prediction model after training.

[0009] In some embodiments, the load sequence and the weather sequence are both input sequences to the prediction model so that the prediction model outputs the initial load prediction sequence for the future time period, the encoder receives the input sequence, the length of the input sequence is M, M is an integer greater than 0, and the encoder performs layer-by-layer extraction on the input sequence to express the features of the input sequence Ζ enc The goal is to obtain the following, and the encoder formula is Ζ enc =Encoder(X), where X is one feature data from the input sequence, and one such feature data consists of load data and weather data at the same time point, and Encoder(X) represents the mapping result of the encoder to the input feature data X, and the decoder is the feature representation Z enc , Feature data X of the starting point of the prediction for the aforementioned future time period featBased on this, generating the initial load prediction sequence for the future time period, where the formula of the decoder is Y = Decoder(Z enc , X feat ), where Y is the initial load prediction sequence, and Decoder(Z enc , X feat ) represents the mapping result of the decoder for the feature representation Z enc , and the feature data X feat at the prediction start point of the future time period, and includes:

[0010] In some embodiments, h independent attention heads are installed in parallel in the multi-head self-attention mechanism module, and each of the attention heads has respective first projection matrices W i Q , W i K , W i V , where h is an integer greater than 1, and the first projection matrices W i Q , W i K , W i V are respectively used to perform linear transformation on the query, key, and value. Each of the attention heads maps the input sequence based on the respective first projection matrices W i Q , W i K , W i V to obtain an attention output Q i . The h attention outputs Q i are stitched in the feature dimension to obtain a stitching output Concat(O1, O2, …, O h ). The stitching output Concat(O1, O2, …, O O ) is mapped to the original dimension MultiHead(Q, K, V) by the second projection matrix W h . The calculation formula of the original dimension MultiHead(Q, K, V) is MultiHead(Q, K, V) = Concat(O1, O2, …, O h )WO Here, Q is the query vector, K is the key vector, and V is the value vector. The first feedforward neural network module outputs a mapping F(x) corresponding to each feature data x in the initial training sequence based on the original dimensional MultiHead(Q,K,V), and the residual connection module outputs a residual connection output x from the mapping F(x). out Obtain the residual connection output x out The formula for calculating x out =x+F(x), and the layer normalization module is the residual connection output x out Layer normalization is performed on the LayerNorm(x out )=LayerNorm(x+F(x)) and get LayerNorm(x out ) is x out This represents the result of performing layer normalization processing on the input of each encoder layer, and the layer normalization module is used to normalize the input of each encoder layer to a zero mean and unit variance.

[0011] In some embodiments, the mask self-attention mechanism module includes a mask matrix M, where, for the query vector and key vector of the decoder, if j ≤ i, then M ij = 0, and the position i corresponding to the key vector is shown to focus on the information of the position j corresponding to the query vector, and if j > i, then M ij = -∞, indicating that the position i corresponding to the key vector cannot pay attention to the information of the position j corresponding to the query vector, and the calculation formula for the mask self-attention mechanism module is: TIFF0007832407000003.tif673, where MaskedAttn(Q,K,V) represents the output result of the masked self-attention mechanism module when the input query vector, key vector, and value vector are Q, K, and V, respectively. T represents the point product of the query vector Q and the key vector K, and d k QK is the dimension of vector K. T Used to scale the results, TIFF0007832407000004.tif630 is This represents the value of the Softmax function when the input is TIFF0007832407000005.tif610.

[0012] In some embodiments, modifying the initial load prediction sequence and obtaining a modified first load prediction sequence includes obtaining a predicted weather sequence corresponding to the predicted future time period, estimating the influence deviation of the initial load prediction sequence on the predicted weather sequence and obtaining a weather correction value sequence, and obtaining an error calibration value sequence corresponding to the initial load prediction sequence based on the load sequence and the weather sequence, and modifying the initial load prediction sequence and obtaining a modified first load prediction sequence includes obtaining the modified first load prediction sequence based on the initial load prediction sequence, the weather correction value sequence and the error calibration value sequence.

[0013] In some embodiments, estimating the influence deviation of the predicted weather sequence on the initial load prediction sequence and obtaining a weather correction value sequence includes inputting the predicted weather sequence to the weather correction model such that the weather correction model outputs the weather correction value sequence, where the weather correction model includes a plurality of parallel convolutional kernels, the weather correction model includes a nonlinear activation layer and a pooling layer, each of the convolutional kernels has a different width and expansion rate, and the method by which the weather correction model obtains the weather correction value sequence is such that each of the convolutional kernels sequentially extracts features from each of the weather data in the predicted weather sequence, and the initial weather features f j Obtaining initial weather characteristics f j ga f j =Conv (kj,dj) It is obtained by the formula (W(t:t+H)) and Conv (kj,dj)(W(t:t+H) represents the convolution operation on W(t:t+H) when the width of the convolution kernel is k and the expansion rate is d, (W(t:t+H)) is the predicted weather sequence, and W(t:t+H)=[w1,w2,…,w H ] where H is the number of prediction steps, w1, w2, ..., w H The weather data are from different points in time, and the weather correction model is the initial weather feature f output by each of the convolutional kernels. j The integrated meteorological features F are formed by fusing these together to correspond to each of the aforementioned meteorological data. met To obtain the integrated meteorological feature F met The nonlinear activation layer and the pooling layer extract a weather correction value sequence ΔYmet(t:t+H) of length H, and each element in ΔYmet is a weather correction value corresponding to each of the weather data.

[0014] In some embodiments, obtaining an error calibration value sequence corresponding to the initial load prediction sequence based on the load sequence and the weather sequence includes making the load sequence and the weather sequence input sequences to an error learning model such that the error learning model outputs the error calibration value sequence, and the loss function of the error learning model is: The file is TIFF0007832407000006.tif427, where e(t) is a sequence of past error calibration values ​​learned by the error learning model, and y(t) is a sequence of past real loads. TIFF0007832407000007.tif418 is a predicted load sequence from the past.

[0015] In some embodiments, the error learning model is a deep residual network model, the deep residual network model comprises L all-connection layers, where L is an integer greater than 1, each all-connection layer learns and corrects the error portion not captured by the previous all-connection layer, and the output of the i-th all-connection layer of the deep residual network model is The expression TIFF0007832407000008.tif555 is satisfied, l is greater than 0 and less than L, where u l (t+i) represents the input features of the lth all-connected layer at time t+i, the input features of the lth all-connected layer include the output of the previous all-connected layer, and the input features of the lth all-connected layer are the input sequence of the error learning model, Θ l is the parameter of the first all-connection layer, F (l) (u l (t+i);Θ l ) is u l (t+i) and Θ l This is a calibration term obtained by mapping based on the Lth all-connection layer, and is the error calibration value sequence output by the Lth all-connection layer. The formula for TIFF0007832407000009.tif411 is: The filename is TIFF0007832407000010.tif560.

[0016] In some embodiments, obtaining the corrected first load prediction sequence based on the initial load prediction sequence, the weather correction value sequence, and the error calibration value sequence is done by the initial load prediction sequence and the weather correction value sequence ΔYmet(t:t Obtaining weather correction forecast value sequences based on TIFF0007832407000011.tif43H), and the initial load forecast sequence, the error calibration value sequence Reference predicted value sequence based on TIFF0007832407000012.tif411 The acquisition of TIFF0007832407000013.tif411, and the aforementioned reference predicted value sequence The formula for TIFF0007832407000014.tif411 is: It is TIFF0007832407000015.tif442, TIFF0007832407000016.tif415 is the initial load prediction sequence, and the XGBoost gradient boosting decision tree model is input to the XGBoost gradient boosting decision tree model such that the XGBoost gradient boosting decision tree model outputs the first load prediction sequence, wherein the auxiliary feature sequence includes important weather elements for the current time period, important weather elements for the future time period, the actual load error sequence for the previous prediction cycle, and time index features for the future time period, and the XGBoost gradient boosting decision tree model includes multiple regression trees, the XGBoost gradient boosting decision tree model aims to minimize the prediction error £, and the target function of the XGBoost gradient boosting decision tree model is It is TIFF0007832407000017.tif545, and here, TIFF0007832407000018.tif413 is a file where the input to the loss function is y i , This is the result calculated when TIFF0007832407000019.tif33, and y i This is the actual load value of the i-th sample, TIFF0007832407000020.tif33 is the predicted load value for the i-th sample, TIFF0007832407000021.tif517 is a regularization term, and f k represents the kth regression tree, and T is the total number of such regression trees. The formula for TIFF0007832407000022.tif33 is: TIFF0007832407000023.tif521, f k (x i ) is the case where the k-th regression tree has a feature vector x for the i-th sample. i This represents the predicted value entered.

[0017] In some embodiments, the method by which the XGBoost gradient boosting decision tree model obtains the first load prediction sequence is as follows: the XGBoost gradient boosting decision tree model obtains a bias term b(z), a first fusion weight w1(z) of the reference prediction sequence, and a second fusion weight w2(z) of the weather-corrected prediction sequence based on the auxiliary feature sequence; and fuses the reference prediction sequence and the weather-corrected prediction sequence according to the first fusion weight w1(z), the second fusion weight w2(z), and the bias term b(z) to obtain the first load prediction sequence The objective is to obtain TIFF0007832407000024.tif46, and the first load prediction sequence The formula for TIFF0007832407000025.tif46 is: It is TIFF0007832407000026.tif564, and here, TIFF0007832407000027.tif417 represents the baseline forecast value, TIFF0007832407000028.tif415 includes representing the aforementioned weather correction forecast sequence.

[0018] In some embodiments, the similarity of the loading sequences in the past loading sequences is calculated using a Gaussian similarity function, and the Gaussian similarity function is: The file is TIFF0007832407000029.tif788, where σ is a scale parameter set based on past fluctuation ranges, and X τ:τ+M-1 This is the past loading sequence from time τ-M+1 to τ, and X t-M+1:t This is the loading sequence from time t-M+1 to t, and X t-M+1:t =[y(t-M+1),...,y(t)], where y(t) is the load data corresponding to one point in time in the load sequence.

[0019] In some embodiments, the formula for calculating the weather difference sequence ΔW between the actual weather sequence and the predicted weather sequence is ΔW = W t+1:t+H -W τ+1:τ+HAnd here, W τ+1:τ+H represents the actual weather sequence, W t+1:t+H ΔW represents a predicted weather sequence, and obtaining a load difference sequence based on the weather difference sequence involves inputting the weather difference sequence ΔW into a weather correction model or error learning model to obtain the load difference sequence due to weather differences. This includes estimating TIFF0007832407000030.tif55. [Effects of the Invention]

[0020] The technical solution provided in the embodiment of this application has at least the following advantages.

[0021] In this embodiment, if there are no load sequences in the past load sequences of the energy storage system whose similarity to the load sequence of the current time period exceeds a preset threshold, an initial load prediction sequence for future time periods after the current time period is obtained based on the load sequence and weather sequence, the initial load prediction sequence is modified, and a modified first load prediction sequence is obtained. If there is a load sequence in the past load sequences of the energy storage system whose similarity to the load sequence of the current time period exceeds a preset threshold, the first load sequence with the highest similarity to the load sequence of the current time period is obtained from the past load sequences, the actual load sequence and actual weather sequence for one target time period after the time period in which the first load sequence is located are obtained, and a predicted weather sequence corresponding to future time periods after the current time period is obtained, a weather difference sequence is calculated between the actual weather sequence and the predicted weather sequence, a load difference sequence is obtained based on the weather difference sequence, and the load difference sequence is superimposed on the actual load sequence to obtain a second load prediction sequence corresponding to future time periods. As a result, when the similarity between the load sequence of the current time period and past load sequences is high, load prediction can be performed quickly based on the past load sequences of the energy storage system, and load prediction can be performed by fusing weather data, achieving both efficiency and accuracy in load prediction. If the load sequence for the current time period is insufficient to compare with past load sequences, the accuracy of load prediction can be improved by modifying the initial load prediction sequence and fusing it with weather data. [Brief explanation of the drawing]

[0022] One or more embodiments are illustrated by the figures in the corresponding accompanying drawings, and these illustrative descriptions are not limiting to the embodiments. Elements assigned the same reference numerals in the drawings are represented as similar elements, and unless otherwise noted, the figures in the accompanying drawings do not constitute a proportional limitation. [Figure 1] Figure 1 is a flowchart of a power load prediction method for an energy storage system according to one embodiment of the present invention. [Figure 2] Figure 2 is a flowchart of a power load prediction method for an energy storage system according to another embodiment of the present invention. [Figure 3] Figure 3 is a flowchart of each substep of step 207 according to another embodiment of the present application. [Figure 4] Figure 4 is a flowchart showing the acquisition of the first load prediction sequence using an XGBoost gradient boosting decision tree model according to another embodiment of the present invention. [Modes for carrying out the invention]

[0023] As can be seen from the background technology, conventional load prediction algorithms for energy storage systems still suffer from the problem of low accuracy in load prediction.

[0024] Analysis and research have shown that conventional load prediction models rely almost entirely on historical load data for their predictions, often neglecting the dynamic changes in real-time weather data. Because weather elements (e.g., temperature, humidity, atmospheric pressure) have a very significant impact on load, conventional models fail to effectively capture the influence of these elements on load changes, resulting in low prediction accuracy. Furthermore, most conventional load prediction models lack the ability to flexibly adapt to real-time changes and continue to use the same model across different time periods and scenarios, making it difficult to adapt to changes in load modes and resulting in low prediction accuracy. For example, in exceptional cases such as holidays or extreme weather, the prediction errors of conventional models are large. In addition, conventional load prediction models are generally static, and subsequent predictions cannot be updated each time a prediction result is output. Therefore, in actual operation, when new weather changes or load fluctuations occur, the system cannot adjust the prediction results in a timely manner, leading to a decrease in the accuracy of subsequent predictions.

[0025] In the embodiment of the present invention, if there are no load sequences in the past load sequences of the energy storage system whose similarity to the load sequence of the current time period exceeds a preset threshold, an initial load prediction sequence for future time periods after the current time period is obtained based on the load sequence and weather sequence, the initial load prediction sequence is modified, and a modified first load prediction sequence is obtained. If there is a load sequence in the past load sequences of the energy storage system whose similarity to the load sequence of the current time period exceeds a preset threshold, the first load sequence with the highest similarity to the load sequence of the current time period is obtained from the past load sequences, the actual load sequence and actual weather sequence for one target time period after the time period in which the first load sequence is located are obtained, and a predicted weather sequence corresponding to future time periods after the current time period is obtained, a weather difference sequence is calculated between the actual weather sequence and the predicted weather sequence, a load difference sequence is obtained based on the weather difference sequence, and the load difference sequence is superimposed on the actual load sequence to obtain a second load prediction sequence corresponding to future time periods. This makes it possible to quickly perform load prediction based on the past load sequences of the energy storage system when the similarity between the load sequence of the current time period and past load sequences is high, and to perform load prediction by fusing weather data, thereby achieving both efficiency and accuracy in load prediction. If the load sequence for the current time period is insufficient to compare with past load sequences, the accuracy of load prediction can be improved by modifying the initial load prediction sequence and fusing it with weather data.

[0026] To further clarify the purpose, technical concept, and advantages of the embodiments of this application, each embodiment will be described in detail below in conjunction with the accompanying drawings. However, as will be apparent to those skilled in the art, although many technical details are proposed in each embodiment of this application to help the reader better understand the application, the technical concept for which the application seeks protection can be realized without these technical details and the various changes and modifications based on the embodiments below. The classification of each embodiment below is for convenience only and does not constitute any limitation to the specific embodiments of this application. Each embodiment may be combined with or referenced from one another on non-consistent premises.

[0027] One embodiment of the present invention relates to a method for predicting the power load of an energy storage system, and as shown in Figure 1, is a flowchart of the power load prediction method for an energy storage system of this embodiment, which includes the following steps.

[0028] Step 101: Obtain the load sequence for the energy storage system for the current time period, and obtain the weather sequence for the current time period.

[0029] Specifically, the load sequence for the current time period is a sequence of load data corresponding to multiple points in time, and the weather sequence for the current time period is a sequence of weather data corresponding to multiple points in time. The weather data includes at least temperature, humidity, atmospheric pressure, and weather type (including sunny, rainy, cloudy, etc.), where the weather type is characterized in the form of numerical coding, and continuous weather elements such as temperature, humidity, and atmospheric pressure can be directly represented as numerical features.

[0030] In this embodiment, a method for fusing multimodal features is used to integrate meteorological data into load predictions for energy storage devices, thereby improving the accuracy of load predictions. To this end, in this embodiment, after obtaining the load sequence for the current time period and the meteorological sequence for the current time period, the load data for the corresponding time point is stitched together with the meteorological data for each time step, so that subsequent models can receive information from both modals simultaneously.

[0031] Step 102: Determine whether the past load sequences of the energy storage system contain any load sequences whose similarity to the current load sequence exceeds a preset threshold.

[0032] In this embodiment, if there are no load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, the system proceeds to step 103. If there are load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, the system proceeds to step 105.

[0033] In this embodiment, different processing is performed by determining whether there are any load sequences in the past whose similarity to the load sequence in the current time period exceeds a preset threshold. If the similarity between the load sequence in the current time period and the past load sequence is high, load prediction is performed quickly based on the past load sequence of the energy storage system, i.e., prediction is performed by the historical similarity matching method. If the similarity between the load sequence in the current time period and the past load sequence is low, load prediction is performed by correcting the initial load prediction sequence, i.e., prediction is performed by the model inference calibration method. This achieves both efficiency and accuracy in load prediction.

[0034] Specifically, this embodiment employs a scroll prediction mechanism that updates the load prediction results every 15 minutes, for example, to reflect the latest load and weather information in real time. Scroll prediction updates the prediction whenever new information becomes available. For example, if the actual load movement deviates from the previous cycle's prediction, a new similarity search selects a newer, more matching segment, correcting the prediction's trajectory. Such a continuous update mechanism significantly increases the sensitivity of the prediction to real-time changes, allowing for timely reflection of sudden load fluctuations and improving prediction accuracy.

[0035] The scroll prediction mechanism in this embodiment is implemented using a "historical similarity matching + model inference calibration" method. Specifically, at each update point, it searches for load segments that are historically similar to the current scenario as a reference, and makes a prediction using the historical similarity matching method. If there are no load segments historically similar to the current scenario, it combines them with the latest model calibration to form the final prediction, and makes a prediction using the model inference calibration method.

[0036] In some embodiments, the similarity of loading sequences in past loading sequences is calculated using a Gaussian similarity function, and the Gaussian similarity function is: The file is TIFF0007832407000031.tif788, where σ is a scale parameter set based on past fluctuation ranges, and X τ:τ+M-1 This is the past loading sequence from time τ-M+1 to τ, and X t-M+1:t This is the loading sequence from time t-M+1 to t, and X t-M+1:t =[y(t-M+1),...,y(t)], where y(t) is the matched feature, and y(t) is the load data corresponding to one point in time in the load sequence.

[0037] Specifically, in the scroll prediction mechanism, for each scroll time point t, a segment similar to the current load state is first searched from the past database, and the current load state can be represented using a feature point matching vector. Generally, a load sequence from a period prior to the current time point can be selected. For example, the most recent M 15-minute load values ​​can be used to represent the load sequence at the current time point, i.e., vector X. t-M+1:t It can be constructed as follows, where, if M is large, downsampling or keypoints (e.g., maximum load, minimum load over the past few hours) can be added to compress the features. Vector X t-M+1:t and multiple past load sequences X τ:τ+M-1 By performing Gaussian similarity function calculations for each of the loaded sequences X, t-M+1:t and each past load sequence X τ:τ+M-1 The similarity score is obtained, indicating that the sequences are closer when the similarity score is close to 1, and the sequences are more different when the similarity score is close to 0. Then, multiple past load sequences X are examined. τ:τ+M-1 Load sequence X t-M+1:t By determining whether there are any load sequences whose similarity exceeds a pre-set threshold, different load prediction processes can be performed for each, thereby achieving both efficiency and accuracy in load prediction.

[0038] Step 103: Based on the load sequence and weather sequence, obtain the initial load forecast sequence for future time periods beyond the current time period.

[0039] Specifically, in this embodiment, after acquiring load sequences and weather sequences, the load sequences and weather sequences are fused as multimodal features, and an initial load prediction sequence for future time periods is obtained based on the multimodal features resulting from the fusion of load sequences and weather sequences. This integrates weather data with the load prediction of the energy storage device, thereby improving the accuracy of the load prediction.

[0040] In some embodiments, in step 103, that is, obtaining an initial load prediction sequence for a future time period after the current time period based on a load sequence and a weather sequence can be realized in the following way: taking both the load sequence and the weather sequence as input sequences of a prediction model so that the prediction model outputs an initial load prediction sequence for the future time period. Specifically, multi-modal features obtained by fusing the load sequence and the weather sequence are input into the prediction model, and the prediction model can output a corresponding initial load prediction sequence for the future time period based on the multi-modal features.

[0041] In some embodiments, taking both the load sequence and the weather sequence as input sequences of a prediction model so that the prediction model outputs an initial load prediction sequence for the future time period can be realized in the following way: The encoder receives multi-modal features obtained by fusing the input sequences, that is, the load sequence and the weather sequence. The length of the input sequence is M, where M is an integer greater than 0. The encoder performs layer-by-layer extraction on the input sequence to obtain the feature representation Ζ enc of the input sequence. The formula of the encoder is Ζ enc =Encoder(Χ), where X is one piece of feature data in the input sequence. One piece of feature data is composed of load data and weather data at one time point. Encoder(Χ) represents the mapping result of the encoder for the input feature data X. The decoder generates an initial load prediction sequence for the future time period based on the feature representation Ζ enc and the feature data X feat at the prediction start point of the future time period. The formula of the decoder is Y = Decoder(Ζ enc , X feat ). Here, X feat is the feature data at the prediction start point, which includes the load data and weather data at the prediction start point. Y is the initial load prediction sequence, Y = [y(t + 1), y(t + 2), …, y(t + H)]. Y represents an initial load prediction sequence with the time point t as the start point and a step size of H. This initial load prediction sequence is used as the reference prediction for the subsequent correction process. Decoder(Ζenc , X feat ) represents the feature expression Ζ enc , the feature data X of the prediction start point in the future time zone feat represents the mapping result of the decoder for

[0042] The prediction model of this embodiment is an improvement on the structure of the FEDformer (Frequency Enhanced Decomposed Transformer) model, and its structure combines improvements such as frequency domain enhancement and residual network based on the mechanism of the Transformer (inverter).

[0043] The improved FEDformer model in this embodiment uses an encoder-decoder structure similar to a standard Transformer, including an encoder and a decoder. The encoder includes a plurality of stacked encoder layers, a residual connection module and a layer normalization module arranged after the stacked encoder layers. Each encoder layer includes a multi-head self-attention mechanism module and a first feed-forward neural network module. The decoder includes a sequentially connected masked self-attention mechanism module, a frequency domain enhancement module, an attention mechanism module, and a second feed-forward neural network module. The encoder is used to receive an input sequence with a length of N, and the input sequence includes load data and meteorological data. After linear embedding, it is represented as the input matrix TIFF0007832407000032.tif417, where d is the feature dimension, and the feature expression Ζ of the sequence enc is extracted step by step. The decoder takes the information output from the encoder and the known information of the prediction start point as inputs to generate a prediction sequence TIFF0007832407000033.tif49 for the future H steps (for example, 16 15-minute step sizes, that is, 4 hours). That is, the improved FEDformer model mechanism captures the historical mode at the current time by the encoder and extrapolates the mode into the future by the decoder.

[0044] The core of conventional Transformer models lies in self-attention, which allows the model to efficiently focus on correlations between different time steps within a sequence. For example, the input of the current encoder layer Given TIFF0007832407000034.tif412 (where n is the sequence length, and n=N in the encoder), first query it with a trainable matrix Q=HW Q Key K=HW K and value V = HW V We perform a linear mapping to this, where, TIFF0007832407000035.tif427, d k This is the spatial dimension of attention, and we calculate the dot product of attention, and the formula is: It is TIFF0007832407000036.tif645, and here, The correlation fraction matrix between each time step is obtained in TIFF0007832407000037.tif64, Softmax normalization is performed on each row to obtain attention weights, and then a weighted sum is performed on the value vector to obtain the output. Taking the attention calculation of the i-th layer as an example, If you set it to TIFF0007832407000038.tif736, the attention output will be O (i) =A (i) V (i) The size of this is the same as the input H. Conventional Transformer models can automatically assign attentional weights based on correlation through self-attention, for example, the current load point may have higher attention to the load at the same time point one day ago, thereby capturing the rule of the diurnal cycle.

[0045] Since a single attention head may not be able to represent complex modes, this embodiment uses multi-head attention, specifically, each encoder layer includes a multi-head self-attention mechanism module and a first feedforward neural network module, and the multi-head self-attention mechanism module of the encoder layer has h independent attention heads in parallel, and each attention head has its own first projection matrix W i Q , W i K , W i V It has such that h is an integer greater than 1, and W i Q , W i K , W i V These are used to perform linear transformations on queries, keys, and values, respectively.

[0046] Specifically, each attention head has its own learnable first projection matrix W for performing linear transformations on the query, key, and value. i Q , W i K , W i V It has the first projection matrix W i Q , W i K , W i V Each of these maps the input query, key, and value vectors to a different feature space. In this way, the input sequence is projected into different subspaces, and each attention head can learn different feature representations, where each attention head can focus on different modes or time scales in the input sequence, helping the predictive model simultaneously capture many features such as seasonal trends, diurnal cycles, and random fluctuations of the load.

[0047] Specifically, each attention head has its own first projection matrix Wi Q , W i K , W i V Based on this, the input sequence is mapped to the attention output Q. i Obtaining h attention outputs Q i Stitch the features in the feature dimension and output the stitched output Concat(O1,O2,…,O h ) obtained, and the second projection matrix W O The stitching output is Concat(O1,O2,…,O h ) is mapped to the original dimension MultiHead(Q,K,V), and the formula for calculating the original dimension MultiHead(Q,K,V) is MultiHead(Q,K,V)=Concat(O1…,O h )W O Here, Q is the query vector, K is the key vector, and V is the value vector.

[0048] Specifically, each encoder layer further includes a first feedforward neural network module connected to the outputs of multiple attention heads, and the first feedforward neural network module outputs a mapping F(x) corresponding to each feature data x in the initial training sequence based on the original dimensional MultiHead(Q,K,V). Subsequently, to mitigate gradient vanishing in the deep network and improve feature transfer efficiency, the improved FEDformer model has a residual connection module and a layer normalization module after each sublayer, i.e., the multihead attention mechanism, the first feedforward neural network module, and the residual connection module outputs the residual connection output x from the mapping F(x). out Obtain the residual connection output x out The formula for calculating x out =x+F(x), and the layer normalization module has residual connection output x out Layer normalization is performed on the LayerNorm(x out )=LayerNorm(x+F(x)) and get LayerNorm(x out ) is x outThe result of performing layer normalization processing on the input is shown, and the layer normalization module is used to normalize the input of each encoder layer to a zero mean and unit variance. In this embodiment, by accumulating residuals in this recursive form, each layer learns only incremental changes, i.e., mapping F(x), enabling stepwise improvement to the input features, allowing the model to better learn the calibration of prediction errors for each layer, and the layer normalization module can ensure numerical stability even after superimposing residuals, thereby accelerating convergence.

[0049] The decoder in this embodiment includes sequentially connected masked self-attention mechanism modules, frequency domain enhancement modules, attention mechanism modules, and a second feedforward neural network module. In the decoder design process, a mask mechanism is employed for self-attention to avoid seeing future information and to prevent future data from influencing the decoder. By adding a mask, predictions are ensured to be strictly based on past data.

[0050] Specifically, the mask self-attention mechanism module includes a mask matrix M, where, for the query vector and key vector of the decoder, if j ≤ i, then M ij We show that = 0, and that the position i corresponding to the key vector is the information of the position j corresponding to the query vector, and if j > i, then M ij = -∞, indicating that the position i corresponding to the key vector cannot pay attention to the information of the position j corresponding to the query vector. The calculation formula for the masked self-attention mechanism module is: TIFF0007832407000039.tif673, where MaskedAttn(Q,K,V) represents the output of the above masked self-attention mechanism module when the input query vector, key vector, and value vector are Q, K, and V, respectively. T represents the point product of the query vector Q and the key vector K, and d k QK is the dimension of the key vector mentioned above. TUsed to scale the results, TIFF0007832407000040.tif630 is This represents the value of the Softmax function when the input is TIFF0007832407000041.tif610.

[0051] Specifically, for the query and key in the decoder's input sequence, if the position corresponding to the key follows the position of the query, its attention score is forced to -∞ or set to a very small negative value, so that the weight of the Softmax function becomes almost zero. In this way, when the decoder generates the t-th future load prediction, it can refer only to information before time t (including the past known portion and the first few predictions generated) without misusing future values ​​after time t, thus the masked attention mechanism module can ensure the causality of the decoding process.

[0052] Specifically, the frequency domain enhancement module decomposes the load sequence using a moving average to obtain low-frequency and high-frequency trend components, and then randomly selects a fixed number of frequency components using the discrete Fourier transform or wavelet transform to use as the base frequencies for the attention mechanism module's calculations.

[0053] The frequency domain enhancement module is a unique improvement over FEDformer in this embodiment, where frequency domain information is fused into the attention calculation, and trend and seasonal components are obtained by decomposing the sequence with a moving average. The original load sequence is decomposed into a low-frequency trend portion (representing gradual changes or long-term trends in the load) and a relatively high-frequency seasonality / periodic portion (representing periodic fluctuations such as diurnal cycles). In the frequency domain, the trend corresponds to components close to zero frequency (representing extremely low bandwidths and smooth changes), and seasonal components such as diurnal cycles are represented as prominent components at specific non-zero frequencies (for example, a spectral peak is formed at the frequency of the corresponding period for a 24-hour cycle). In other words, the low-frequency band in the spectrum indicates the trend / tendency of the load, and specific mid-to-high frequency bands indicate the main periodic (seasonal) fluctuations. The frequency domain enhancement module extracts the main frequency components by first obtaining the low-frequency and high-frequency trend portions, then using the Discrete Fourier Transform (DFT) or Wavelet Transform. The FEDformer model then performs the aforementioned decomposition and spectral analysis on the load sequence, selecting and calculating only a few important frequency bases, thereby reducing the impact of timing length on the calculation.

[0054] The frequency domain enhancement module in this embodiment can capture periodic structures in the load sequence, improving the efficiency and stability of long-term time series forecasting. By embedding periodic features into the attention mechanism, the model becomes more sensitive to periodic changes during long-term forecasting, improving the performance of traditional Transformers in long-term time series forecasting.

[0055] In some embodiments, the training process of a predictive model involves obtaining an initial training sequence, which includes feature data corresponding to the nearest N time points, where each feature data includes load data and weather data for the corresponding time point, and N is an integer greater than 0; and performing a normalization process on the initial training sequence to obtain a target training sequence, the formula for the normalization process being: The file is TIFF0007832407000042.tif625, where x is one feature data in the initial training sequence, min(X) is the minimum feature data in the initial training sequence, max(X) is the maximum feature data in the initial training sequence, and x' is one feature data in the normalized target training sequence, and the target training sequence is input into a predictive model to train it and obtain a post-trained predictive model.

[0056] The normalization process in this embodiment maps each feature value to a similar numerical range by uniformly normalizing original features from different sources and with different dimensions (for example, Min-Max normalization or Z-score normalization).

[0057] In this embodiment, normalization eliminates dimensional differences, accelerates model convergence, and avoids situations where certain features dominate model training due to excessively large numerical ranges. In particular, for data with different magnitudes, such as load values ​​and weather values, normalization ensures equilibrium of the gradients of each input dimension of the FEDformer model.

[0058] Specifically, in this embodiment, the initial training sequence of the prediction model is a multimodal feature that fuses load data and weather data. By introducing multimodal features into the model training process, the model can learn relationships between modals, such as "increased air conditioner load due to high temperature," thereby improving the accuracy of the model's predictions. In some embodiments, the multimodal features input to the prediction model may also include time index features such as time, day of the week, and holidays. By providing these to the prediction model through periodic embedding or coding schemes, the prediction model can better depict the daily and weekly modes of load. The prediction model in this embodiment can spontaneously learn correlations between different features and loads from the multimodal input, thereby improving the accuracy and robustness of predictions.

[0059] Specifically, in this embodiment, when training the prediction model described above, it is necessary to determine the size of one time window, i.e., the length of past sequences that the model must learn. In this embodiment, a sufficiently long window can be experimentally selected to cover the main periodic features and associated influences. For example, by taking load data and weather data from the past day or longer (e.g., the same quarter within a week) as input, the prediction model can capture the rules of day-night load changes and recent trends. At the same time, the time window cannot be made too long so as not to increase computational latency in order to meet the demand for scroll predictions updated every 15 minutes.

[0060] To achieve accuracy and real-time performance in the predictive model, the data from the nearest N time points is used for the model's input feature sequence x. (t-N+1) ,…,x t Assuming this is the selection, here, each time point includes load data and multiple types of weather data, and the optimal value of N can be determined by global search and cross-validation methods, so that the window length covers the main modes while avoiding redundant noise. At the same time, before model training, i.e., in preprocessing, the data within the time window is resampled and aligned to ensure that past load sequences and past weather sequences correspond precisely in time, and a sliding window is used to smoothly handle missing values ​​and outliers, thereby improving data quality.

[0061] Step 104: Modify the initial load prediction sequence to obtain the modified first load prediction sequence.

[0062] In this embodiment, the accuracy of the acquired first load prediction sequence can be improved by modifying the initial load prediction sequence after acquiring it, thereby improving the accuracy of the load prediction.

[0063] Step 105: Obtain the first load sequence from past load sequences that has the highest similarity to the current load sequence, and obtain the actual load sequence and actual weather sequence for one target time period starting from the time period in which the first load sequence is located.

[0064] In this embodiment, after determining in step 102 that there are load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, the system proceeds to step 105, where the first load sequence with the highest similarity to the load sequence is obtained from the past load sequences, and the actual load sequence and actual weather sequence for one target time period after the time period in which the first load sequence is located are obtained.

[0065] In this embodiment, the similarity of multiple segments in the past database is calculated using a Gaussian similarity function algorithm, and several of the most similar ones are selected as candidates, and the single past load sequence X with the highest similarity is selected. τ:τ+M‐1 This is called a similar day sequence, and this similar day sequence is extracted at future H step sizes after time point τ, for example, 4-hour real loads y(τ+1), ..., y(τ+H), and combined with the inference load sequence at the current time. This is the initial estimation for TIFF0007832407000043.tif631, that is, it obtains the actual load sequence for the target time period after the time period in which the first load sequence is located. This embodiment is based on the "similar days" concept, meaning that if the current load curve shape has appeared in the past, the next trend is likely to be similar, and provides a prediction criterion for the inferred load sequence based on historical prior validation.

[0066] Specifically, considering only the similarity between past weather sequences and the current load sequence would only yield rough load results, and the accuracy of load predictions could not be guaranteed. Therefore, it is also necessary to consider the differences between current and past external conditions, such as the impact of weather data on the load. In this embodiment, the actual load sequence for one target time period after the time period in which the first load sequence is located is obtained, and at the same time, the actual weather sequence corresponding to the target time period is also obtained.

[0067] Step 106: Obtain the predicted weather sequence corresponding to future time periods from the current time period onward, and calculate the weather difference sequence between the actual weather sequence and the predicted weather sequence.

[0068] Specifically, in this embodiment, the impact on the load of meteorological data is considered, and a predicted weather sequence corresponding to future time periods beyond the current time period is obtained. After obtaining the actual weather sequence corresponding to the target time period and the predicted weather sequence corresponding to future time periods, a weather difference sequence is calculated between the actual weather sequence and the predicted weather sequence. This makes it easier to subsequently obtain a load difference sequence based on the weather difference sequence, and the impact on the load of meteorological data is also considered in the historical similarity matching method, thereby improving the accuracy of load prediction in the historical similarity matching process.

[0069] In some embodiments, the formula for step 106, i.e., calculating the weather difference sequence ΔW between the actual weather sequence and the predicted weather sequence, is ΔW = W t+1:t+H -W τ+1:τ+H And here, W τ+1:τ+H This represents the actual weather sequence, W t+1:t+H This represents the predicted weather sequence, and in this embodiment, the difference between each weather data in the actual weather sequence and each weather data in the predicted weather sequence is calculated, and these differences constitute the weather difference sequence ΔW.

[0070] Step 107: Obtain the load difference sequence based on the weather difference sequence.

[0071] Specifically, in this embodiment, after obtaining the weather difference sequence described above, a load difference sequence is obtained based on the weather difference sequence. This allows for the calculation of the impact of weather data on the load, i.e., the load difference sequence, thereby improving the accuracy of the obtained load prediction sequence.

[0072] In some embodiments, step 107, i.e., obtaining a load difference sequence based on a weather difference sequence, is achieved by: inputting the weather difference sequence ΔW into a weather correction model or error learning model to obtain the load difference sequence due to weather differences. TIFF0007832407000044.tif55 is estimated, where the weather modification model and forecast model are the models mentioned in the subsequent model inference correction method, and the weather modification model and forecast model are described in detail later. In this embodiment, by applying the weather modification model and forecast model used in the subsequent model inference correction method to the historical similarity matching method, the utilization rate of the models mentioned in the subsequent model inference correction method can be increased, the design cost can be reduced, and the accuracy of the load prediction results can be improved.

[0073] Step 108: The load difference sequence is superimposed on the actual load sequence to obtain a second load prediction sequence corresponding to future time periods.

[0074] Specifically, in this embodiment, a load difference sequence is obtained, and the load difference sequence is superimposed on the actual load sequence to obtain a second load prediction sequence corresponding to future time periods. This allows the influence of weather on the load to be considered during the load prediction process, thereby improving the accuracy of the load prediction.

[0075] In this embodiment, the weather record of the historical load sequence with the highest degree of similarity is obtained, and the actual weather sequence for the target time period following the historical similar sequence is obtained and compared with the predicted weather sequence for future time periods from the current time period onward. For example, W τ+1:τ+H represents the actual weather sequence for one target time period after the historical load sequence with the highest similarity, W t+1:t+H This represents the predicted weather sequence for future time periods beyond the current time period, and the difference between the two is ΔW = W. t+1:t+H -W τ+1:τ+H This calculates the following: For example, if the actual weather sequence is cloudy, and the predicted weather sequence for future time periods from the current time onward is sunny, the difference is represented as a positive value on solar radiation, and then the weather difference sequence ΔW is input into a weather correction model or error learning model to calculate the load difference sequence due to weather difference. The value TIFF0007832407000045.tif55 is estimated. In this embodiment, the process of obtaining a load difference sequence based on a weather difference sequence can be performed using the aforementioned trained weather correction model and error learning model. Since the weather correction model and prediction model have learned the relationship between the error between weather and load, they can be generalized to new scenarios, thereby reducing design costs and improving the accuracy of load prediction results.

[0076] Specifically, the error learning model is f err (·) represents outputting a load difference sequence based on the input weather difference sequence, and the error learning model is f err The formula obtained by calculating the load difference sequence based on (·) is: It is TIFF0007832407000046.tif551, and here, TIFF0007832407000047.tif420 represents the load difference sequence with time t as the starting point and step size H, and ΔW(t+1:t+H) represents the weather difference sequence with time t as the starting point and step size H.

[0077] Subsequently, the formula for calculating a second load prediction sequence corresponding to future time periods by superimposing the load difference sequence onto the actual load sequence is: It is TIFF0007832407000048.tif466, and here, TIFF0007832407000049.tif423 represents the actual load sequence when time t is the starting point and the step size is H. TIFF0007832407000050.tif418 represents the second load prediction sequence, with time t as the starting point and step size H.

[0078] In this embodiment, after obtaining the historical load sequence with the highest similarity, if the currently predicted weather conditions differ from the corresponding weather conditions in the past, the model adjusts the original historical load pattern upwards or downwards, for example, if the current conditions are hotter than the past. TIFF0007832407000051.tif420 The overall result is positive, the prediction curve is higher than the pure historical curve, and if the present is colder than the past, The overall result for TIFF0007832407000052.tif420 is negative, and the prediction curve is lower than the pure historical curve.

[0079] The load prediction method for the energy storage system in this embodiment can achieve both efficiency and accuracy in load prediction by rapidly predicting the load based on past load sequences of the energy storage system when the similarity between the current load sequence and past load sequences is high, and by fusing meteorological data. When the similarity between the current load sequence and past load sequences is low, the accuracy of the load prediction can be improved by modifying the initial load prediction sequence and fusing meteorological data. In other words, this embodiment improves prediction accuracy by combining meteorological data from an open-source air quality model with conventional load prediction, and can more accurately predict load fluctuations, especially when faced with weather changes.

[0080] Another embodiment of the present invention relates to a method for predicting the power load of an energy storage system, and as shown in Figure 2, is a flowchart of the power load prediction method for an energy storage system of this embodiment, which includes the following steps.

[0081] Step 201: Obtain the load sequence for the energy storage system for the current time period, and obtain the weather sequence for the current time period.

[0082] Step 202: Determine whether the past load sequences of the energy storage system contain any load sequences whose similarity to the current load sequence exceeds a preset threshold.

[0083] In this embodiment, if there are no load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, the system proceeds to step 203. If there are load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a preset threshold, the system proceeds to step 208.

[0084] Step 203: Based on the load sequence and weather sequence, obtain the initial load forecast sequence for future time periods beyond the current time period.

[0085] Step 204: Obtain the predicted weather sequence corresponding to the predicted future time period.

[0086] Step 205: Estimate the deviation of the predicted weather sequence's influence on the initial load prediction sequence and obtain the weather correction value sequence.

[0087] In this embodiment, by obtaining a predicted weather sequence corresponding to future time periods from the current time period onward, calculating the influence deviation of the predicted weather sequence on the initial load prediction sequence, and obtaining a weather correction value sequence, the influence of the weather sequence can be introduced into the correction process of the preliminary load prediction sequence, thereby improving the accuracy of the final load prediction result.

[0088] In some embodiments, estimating the influence deviation of the predicted weather sequence on the initial load prediction sequence and obtaining a weather correction value sequence involves inputting the predicted weather sequence to a weather correction model so that the weather correction model outputs a weather correction value sequence, where the weather correction model includes multiple parallel convolutional kernels, the weather correction model includes a nonlinear activation layer and a pooling layer, and each convolutional kernel has a different width and expansion rate. The method by which the weather correction model obtains the weather correction value sequence is that each convolutional kernel sequentially extracts features from each weather data in the predicted weather sequence, and the initial weather features f j Obtaining initial weather characteristics f j is, f j =Conv (kj,dj) It is obtained by the formula (W(t:t+H)) and Conv (kj,dj) (W(t:t+H)) represents the convolution operation on (W(t:t+H)) when the width of the convolution kernel is k and the expansion rate is d, where W(t:t+H) is the predicted weather sequence, and W(t:t+H)=[w1,w2,…,w H ] where H is the number of prediction steps, w1, w2, ..., w H These are the aforementioned weather data from different time points in time, and the initial weather features f output by each convolution kernel. j The integrated weather features F, which combines these to correspond to each weather data set, are formed by fusing them together. met To obtain integrated meteorological features F met A weather correction value sequence ΔYmet(t:t+H) of length H is extracted using a nonlinear activation layer and a pooling layer, and each element in ΔYmet is a weather correction value corresponding to each weather data.

[0089] The impact of meteorological factors on load is complex and diverse. For example, a sudden rise in temperature can cause a surge in the load on electrical equipment such as air conditioners, and a change in weather from sunny to rainy can reduce sunlight, leading to an increase in the load on electrical equipment such as lighting. Therefore, in this embodiment, a weather correction module is added. The weather correction model in this embodiment is modeled based on MSCNN (Multi-Scale Convolutional Neural Network), and the multi-scale convolutional neural network is used to extract features and estimate the impact on meteorological data. For example, load predictions are corrected when the latest weather forecast is obtained every four hours.

[0090] Specifically, the MSCNN in this embodiment can extract patterns of change in meteorological elements at different time scales by introducing convolutional kernels of different sizes and dilation rates. In this embodiment, multiple parallel convolutional branches are constructed on an input meteorological sequence (e.g., a 15-minute weather forecast sequence for the next 4 hours, with multidimensional elements including temperature, humidity, etc.). Here, some convolutional branches use small convolutional kernels (e.g., lengths 3-5) to capture short-term rapid changes, while other convolutional branches use larger convolutional kernels or dilated convolutions (Dilated CNNs) to capture longer-period trend effects.

[0091] Specifically, each convolutional branch has its own convolutional receptive field, allowing it to focus on weather changes at different scales. For example, a small receptive field convolution can capture the instantaneous impact of sudden weather changes (e.g., a sudden downpour) on the load, while a large receptive field convolution can extract the gradual effect of diurnal temperature trends on the load.

[0092] Specifically, in this embodiment, the initial weather features f output from each convolutional kernel are j After obtaining the initial weather features f1, f2, ..., f extracted from each convolutional branch, m The channel dimensions are stitched or weighted and merged to integrate the meteorological features Fmet The fusion method involves directly stitching together all connected layers or 1x1 convolutions to reduce dimensionality, allowing the weather modification model to automatically learn the importance of features at each scale. Alternatively, a weighted average can be achieved by manually assigning weights to features at different scales.

[0093] In this embodiment, the weather features F are integrated using a simple stitching method. met For example, F met =|f1||f2||…||f m You can obtain |, and then F met The model extracts a weather influence sequence ΔYmet(t:t+H) of length H using a nonlinear activation layer (e.g., ReLU) and a pooling layer, where each element of ΔY"met" corresponds to a weather-related load correction value at one future point in time. The weather correction model in this embodiment ensures that the model considers both rapid weather variability and gradual trends through multiscale fusion, and the corresponding output ΔYmet of the weather correction model can simultaneously reflect short-term anomalies and long-term deviations, thereby improving the accuracy of corrections to the initial load sequence and enhancing the accuracy of load predictions.

[0094] The weather correction value sequence output by the MSCNN model in this embodiment can be considered as a single factor or deviation from the initial load sequence and is used to correct the initial load sequence. For example, one load data from the initial load sequence The forecast model outputs a weather data set, denoted as TIFF0007832407000053.tif415, and one of the weather correction value sequences output by the weather correction module is used. When written as TIFF0007832407000054.tif415, it represents one of the load prediction data points in the load prediction sequence that ultimately fuses weather impacts. TIFF0007832407000055.tif415 is, It is TIFF0007832407000056.tif473, and here, TIFF0007832407000057.tif415 can be considered as the additive effect of weather correction factors on load data at this point in time.

[0095] In this embodiment, synergistic effects can also be considered, and factor effects can be applied. It can be converted to the format TIFF0007832407000058.tif442. However, since the relationship between load data and weather data is always similar to a linear relationship, the additive correction described above can be used to correct it more effectively and improve the accuracy of the forecast.

[0096] In this example, during the training process of MSCNN, the deviation between past weather data and past load data is used as a sample. We can supervise the training of TIFF0007832407000059.tif38, which allows it to approximate the true "weather load error". For example, if high temperatures actually occur and the load is higher than the baseline forecast, MSCNN will show a positive value. The convolution kernel weights are adjusted to output TIFF0007832407000060.tif38, and conversely, negative deviations are output at low temperatures to make accurate corrections to the baseline prediction during inference.

[0097] In actual applications, each time a new weather forecast is obtained (e.g., updated every 4 hours), the latest future weather sequence is input into MSCNN, the weather correction sequence ΔYmet for the next few hours is calculated, and then the weather correction sequence is added to the initial load prediction sequence output by the prediction model within the current scroll period to obtain a real-time corrected first load prediction. If previous weather forecasts were considered during the previous prediction, the weather correction calculates the impact of the difference between the old and new weather forecasts on the load. When the change in weather forecasts is small, TIFF0007832407000061.tif38 is close to zero, indicating that no major adjustments are needed. If there is a significant change in the forecast (for example, if a large temperature increase is expected), TIFF0007832407000062.tif38 provides a positive deviation to boost the load forecast. In this embodiment, the weather correction model ensures that the load forecast follows up with weather updates in real time, thereby improving the accuracy of the load forecast.

[0098] Step 206: Based on the load sequence and weather sequence, obtain the error calibration value sequence corresponding to the initial load prediction sequence.

[0099] In this embodiment, the load sequence and weather sequence for the current time period are acquired, and an error calibration value sequence corresponding to the initial load prediction sequence is acquired based on the load sequence and weather sequence. This introduces the influence of the weather sequence into the correction process of the initial load prediction sequence, thereby improving the accuracy of the final load prediction result.

[0100] In some embodiments, obtaining an error calibration value sequence corresponding to an initial load prediction sequence based on a load sequence and a weather sequence involves using the load sequence and weather sequence as input sequences to an error learning model so that the error learning model outputs an error calibration value sequence, and the loss function of the error learning model is: The file is TIFF0007832407000063.tif427, where e(t) is the sequence of past error calibration values ​​learned by the error learning model, and y(t) is the sequence of past real loads. TIFF0007832407000064.tif415 is a predicted load sequence from the past.

[0101] In some embodiments, the error learning model is a deep residual network model (ResNet), where the ResNet deep residual network model includes L all-connection layers, L being an integer greater than 1, and each all-connection layer learns and corrects the error portion not captured by the previous all-connection layer, and the output of the l-th all-connection layer of the ResNet deep residual network model is The expression TIFF0007832407000065.tif555 is satisfied, l is greater than 0 and less than L, where u l represents the input features of the l-th all-connected layer, the input features of the l-th all-connected layer include the output of the previous all-connected layer, and the input features of the l-th all-connected layer are the input sequence of the error learning model, Θ l F is the parameter of the entire connection layer of the lth layer. (l) (u l (t+i);Θ l ) is u l (t+i) and Θ l This is a calibration term obtained by mapping based on the following. After stacking L all-connected layers of the ResNet deep residual network model, the error calibration value sequence output by the Lth all-connected layer is obtained. The formula for TIFF0007832407000066.tif411 is: The filename is TIFF0007832407000067.tif560.

[0102] In this embodiment, to further improve the accuracy of load prediction, an error learning module is introduced, and a deep residual network model is used to model the prediction error, recursively learning and calibrating the prediction deviation of the prediction model FEDformer. The core idea of ​​the error learning model in this embodiment is to have the model learn the difference between the predicted value and the true value, and to use this difference as compensation for the initial load prediction sequence, thereby improving the accuracy of the final prediction.

[0103] The goal of the error learning module is to predict future errors based on past information, namely load sequences and weather sequences. Predict TIFF0007832407000068.tif49 and use it to obtain one load data from the initial load sequence. TIFF0007832407000069.tif415 was modified, and the final load prediction result obtained, i.e., one load data from the first load prediction sequence, was corrected. TIFF0007832407000070.tif411 is, The filename is TIFF0007832407000071.tif442.

[0104] The ResNet deep residual network model possesses the attribute of residual connectivity and avoids degradation of the deep network by learning residuals layer by layer. In the error learning model, each layer attempts to learn and correct the portion of the error that was not captured by the previous layer. For example, the first layer learns deviations such as the overall load being high or low, and the second layer learns more detailed periodic errors. Referring to the equation satisfied by the output of the i-th layer of the ResNet deep residual network model described above, this equation represents the idea of ​​recursive residuals, that is, each layer each has one new correction term F based on the previously accumulated error estimates. ( l ) This is added. At the same time, the ResNet deep residual network model ensures that even when the number L of connected layers is large, the gradient is effectively transmitted by identity mapping, and the network can continuously accumulate learning errors without losing stability.

[0105] The basic unit of the ResNet error learning model in this embodiment includes multiple fully connected layers, incorporates nonlinear activation, and directly applies the input to the output. For example, if two fully connected layers are used as the residual unit, for an input feature z, the residual unit calculates F(z) = σ(zW1 + b1)W2 + b2, and outputs F(z) + z as the input to the next layer. During the training process, the error e(t) calculated from past data is used. i With ) as the true value, we train ResNet to approximate these errors using the mean squared error (MSE) loss, where the loss function is It may also be TIFF0007832407000072.tif639, where M is the number of training samples. In this example, L err By minimizing the error, the ResNet error learning model gives one estimate given the current model input. Learn how to compensate for model deviations by outputting TIFF0007832407000073.tif49. Note that errors are usually more stable and smaller in amplitude than the load data in the original load sequence, so ResNet can learn error patterns more easily. For example, if a model consistently underestimates loads during the morning hours, ResNet can specialize in learning this model and output a single positive deviation calibration value in the morning to offset the model's system error.

[0106] In this embodiment, when making an actual prediction, information such as the load sequence and weather sequence from the previous time is input to the error learning model ResNet, and the error calibration value sequence for the future H step is calculated, i.e. We obtain TIFF0007832407000074.tif427, and then use it to generate the initial load prediction sequence output by the prediction model FEDformer, i.e. In addition, the first load prediction sequence after calibration (TIFF0007832407000075.tif438) The result is TIFF0007832407000076.tif49. In this way, the error learning model ResNet can perform deviation correction for FEDformer predictions, improving the accuracy and robustness of the model.

[0107] In this embodiment, before modifying the initial load prediction sequence and obtaining the modified first load prediction sequence, a predicted weather sequence corresponding to the predicted future time period is obtained, and a weather correction value sequence is obtained by estimating the influence deviation of the predicted weather sequence on the initial load prediction sequence. Additionally, an error calibration value sequence corresponding to the initial load prediction sequence is obtained based on the load sequence and weather sequence, thereby providing a basis for subsequently modifying the initial load prediction sequence and improving the accuracy of the obtained modified first load prediction sequence.

[0108] Step 207: Obtain the corrected first load forecast sequence based on the initial load forecast sequence, weather correction value sequence, and error calibration value sequence.

[0109] As shown in Figure 3, this is a flowchart of each substep of step 207 of this embodiment, which is to obtain a corrected first load forecast sequence based on the initial load forecast sequence, weather correction value sequence, and error calibration value sequence, and includes the following steps.

[0110] Step 2071: Obtain the weather-corrected forecast sequence based on the initial load forecast sequence and the weather-corrected value sequence.

[0111] Step 2072: Obtain a baseline predicted value sequence based on the initial load prediction sequence and the error calibration value sequence.

[0112] Specifically, the baseline predicted value sequence The formula for TIFF0007832407000077.tif49 is: It is TIFF0007832407000078.tif442, TIFF0007832407000079.tif415 is an initial load prediction sequence.

[0113] Step 2073: The weather-corrected forecast sequence, baseline forecast sequence, and auxiliary feature sequence are used as inputs to the gradient boosting decision tree model so that the gradient boosting decision tree model outputs the first load forecast sequence.

[0114] Specifically, the gradient boosting decision tree model is an XGBoost (eXtreme Gradient Boosting) model, and the auxiliary feature sequence includes important weather elements for the current time period, important weather elements for future time periods, the actual load error sequence for the previous forecast period, and time index features for future time periods. The XGBoost gradient boosting decision tree model includes multiple regression trees.

[0115] Specifically, the XGBoost gradient boosting decision tree model aims to minimize the prediction error £, and the target function of the XGBoost gradient boosting decision tree model is: It is TIFF0007832407000080.tif545, and here, TIFF0007832407000081.tif413 is a file where the input to the loss function is y i , This is the result calculated when TIFF0007832407000082.tif33, and y i This is the actual load value of the i-th sample, TIFF0007832407000083.tif33 is the predicted load value for the i-th sample, TIFF0007832407000084.tif517 is a regularization term, f k represents the kth regression tree, and T is the total number of regression trees. In this embodiment, by minimizing £, XGBoost ensures fitting of the training data and prevents overfitting caused by the model being too complex. During the training process, XGBoost uses a quadratic gradient improvement strategy to gradually build decision trees and reduce errors, and the resulting model is essentially an additive combination of multiple regression trees, i.e., The formula for TIFF0007832407000085.tif33 is: TIFF0007832407000086.tif521, f k (x i ) is the case where the k-th regression tree has a feature vector x for the i-th sample. i This represents the predicted value entered.

[0116] As shown in Figure 4, this is a flowchart for how the XGBoost gradient boosting decision tree model obtains the first load prediction sequence, and the method by which the XGBoost gradient boosting decision tree model obtains the first load prediction sequence includes the following steps.

[0117] Step 207a: Obtain the bias term, the first fused weight of the baseline forecast sequence, and the second fused weight of the weather-corrected forecast sequence based on the auxiliary feature sequence.

[0118] Step 207b: The baseline forecast sequence and the weather-corrected forecast sequence are fused according to the first fusion weight, second fusion weight, and bias term to obtain the first load forecast sequence.

[0119] The formula for calculating the first load prediction sequence is: It is TIFF0007832407000087.tif564, and here, TIFF0007832407000088.tif417 represents the baseline forecast value, TIFF0007832407000089.tif415 represents a weather-corrected forecast sequence, where b(z) is the bias term.

[0120] To further improve the robustness of the prediction results and leverage the advantages of different models, this embodiment employs an XGBoost fusion mechanism, specifically the XGBoost gradient boosting decision tree model, after obtaining the weather correction value sequence and the error calibration value sequence. The XGBoost gradient boosting decision tree model performs weighted fusion on the prediction results from multiple sources, namely the weather correction value sequence and the error calibration value sequence. As an integrated learning method, XGBoost can automatically adjust the weights and deviation calibrations of different predictions based on past errors, thereby achieving an optimal combination of prediction results.

[0121] Specifically, the input features of the XGBoost fusion model include prediction results and related auxiliary information from each of the above modules. The main features input from XGBoost include weather-corrected prediction sequence, baseline prediction sequence, and other auxiliary features, which help determine how the tree model weights different predictions under specific weather conditions, provide the actual error of the previous scroll period for calibration, and provide importance for distinguishing between different daytime and nighttime models.

[0122] In this embodiment, the XGBoost fusion model includes a weather-corrected forecast sequence and a baseline forecast sequence, allowing XGBoost to obtain two sets of forecast results: a weather-corrected forecast sequence (obtained by correction based on an MSCNN network model) and a baseline forecast sequence (obtained by calibration based on a ResNet residual network model). One of these focuses on the time series model, while the other focuses on the weather elements. Simultaneously, auxiliary features provide context, enabling XGBoost to dynamically adjust the confidence levels of the two sets of results depending on the environment. For example, in stable weather conditions, the baseline forecast sequence is primarily trusted, while in extreme weather conditions, the weather-corrected forecast sequence is often relied upon.

[0123] In extreme cases, if XGBoost determines that a particular model modification structure is highly reliable in the current situation, it can assign a weight close to 1 to the predictions of this model, assign another weight close to 0, and generally take a weighted average of the two. Because XGBoost is a tree model, the above weights are actually fixed values ​​within each decision leaf node and correspond to a certain rule domain, but overall they are piecewise constant functions of the input space and are reflected as rule-based weight fusion.

[0124] In actual applications, the sequence of reference prediction values ​​obtained for each scroll prediction is used. TIFF0007832407000090.tif417 and weather revised forecast sequence Inputting files like TIFF0007832407000091.tif415 into XGBoost, and predicting the final corrected fusion. The output file TIFF0007832407000092.tif46 is generated. Through offline training, XGBoost learns how to combine the strengths of two forecast results, for example, by smoothing out potential underestimated peaks in the baseline forecast sequence or correcting the overcorrection tendency of the weather-corrected forecast sequence under stable weather conditions. The fused result shows lower overall error and higher stability in various scenarios, meeting the requirements for forecast reliability of virtual power plants and microgrids.

[0125] Step 208: Obtain the first load sequence from past load sequences that has the highest similarity to the current load sequence, and obtain the actual load sequence and actual weather sequence for one target time period starting from the time period in which the first load sequence is located.

[0126] Step 209: Calculate the weather difference sequence between the actual weather sequence and the predicted weather sequence.

[0127] Step 210: Obtain a load difference sequence based on the weather difference sequence.

[0128] Specifically, in step 204 above, since a predicted weather sequence corresponding to future time periods from the current time period onward is obtained, the weather difference sequence between the actual weather sequence and the predicted weather sequence can be directly used to calculate the weather difference sequence, and a load difference sequence can be obtained based on the weather difference sequence.

[0129] Step 211: The load difference sequence is superimposed on the actual load sequence to obtain a second load prediction sequence corresponding to future time periods.

[0130] Steps 201, 202, 203, 208, 209, 210, and 211 of this embodiment are almost identical to steps 101, 102, 103, 105, 106, 107, and 108 of the above embodiment, respectively, and to avoid duplication, their explanation is omitted here.

[0131] Scroll predictions are updated accordingly whenever new information becomes available. For example, if the actual load movement deviates from the prediction of the previous cycle, a new similar search selects a newer, more matching segment, and the prediction corrects the trajectory. Such a continuous update mechanism significantly increases the sensitivity of predictions to real-time changes, allowing for timely reflection of sudden load fluctuations or inflection points in trends. In practice, this process can be automated as a background service, triggering calculations every 15 minutes to form a continuously scrolling prediction stream.

[0132] In another aspect of the present invention, an energy storage system is provided, comprising an energy storage device, a bidirectional energy storage converter, and an energy management module, the energy management module being used to implement a power load prediction method for the energy storage system as described above, and the energy management module being used to adjust the charge / discharge strategy of the energy storage system based on a first load prediction sequence or a second load prediction sequence.

[0133] As those skilled in the art will understand, the embodiments described above are specific examples for realizing the present invention, and in actual applications, various formal and detailed modifications can be made without departing from the spirit and scope of the present invention.

Claims

1. A method for predicting the power load of an energy storage system, The present time period load sequence of an energy storage system and the present time period weather sequence, wherein the present time period weather sequence is a sequence of weather data corresponding to multiple points in time, and the weather data includes at least temperature, humidity, atmospheric pressure, and weather type, where the weather type is characterized in the form of numerical coding. The process involves determining whether or not there are any load sequences in the past load sequences of the energy storage system whose similarity to the load sequence exceeds a predetermined threshold, If there are no past load sequences in the energy storage system whose similarity to the load sequence exceeds a preset threshold, then an initial load prediction sequence for future time periods from the current time period onward is obtained based on the load sequence and the weather sequence. The initial load prediction sequence is modified to obtain the first load prediction sequence after modification. If the past load sequences of the energy storage system contain load sequences whose similarity to the aforementioned load sequence exceeds a preset threshold, the first load sequence with the highest similarity to the aforementioned load sequence is obtained from the past load sequences, and the actual load sequence and actual weather sequence for one target time period after the time period in which the first load sequence is located are obtained. To obtain a predicted weather sequence corresponding to the future time period after the current time period, The calculation of the weather difference sequence between the actual weather sequence and the predicted weather sequence, Obtaining a load difference sequence based on the aforementioned weather difference sequence, This includes superimposing the load difference sequence onto the actual load sequence to obtain a second load prediction sequence corresponding to the future time period, A method for predicting the power load of an energy storage system, characterized by the features described above.

2. Obtaining an initial load prediction sequence for future time periods after the current time period based on the load sequence and the weather sequence is: The load sequence and the weather sequence are both input sequences to the prediction model such that the prediction model outputs the initial load prediction sequence for the future time period, wherein the prediction model includes an encoder and a decoder, the encoder includes a plurality of stacked encoder layers and residual connection modules and layer normalization modules located after the stacked encoder layers, each encoder layer includes a multi-head self-attention mechanism module and a first feedforward neural network module, and the decoder includes sequentially connected mask self-attention mechanism modules, frequency domain enhancement modules, attention mechanism modules, and a second feedforward neural network module. The frequency domain enhancement module includes decomposing the load sequence using a moving average to obtain a low-frequency trend portion and a high-frequency trend portion, and randomly selecting a fixed number of frequency components using a discrete Fourier transform or wavelet transform to use as the base frequency for the calculation of the attention mechanism module. A method for predicting the power load of an energy storage system according to feature 1.

3. The training process of the aforementioned predictive model is as follows: The process involves obtaining an initial training sequence, wherein the initial training sequence includes feature data corresponding to the nearest N time points, and each feature data corresponding to a time point includes load data and weather data for that time point, where N is an integer greater than 0. The process involves performing a normalization operation on the initial training sequence to obtain a target training sequence, wherein the formula for the normalization operation is: Here, x is a feature data of the initial training sequence, min(X) is the minimum feature data of the initial training sequence, max(X) is the maximum feature data of the initial training sequence, and x' is a feature data of the normalized target training sequence. This includes inputting the target training sequence into the prediction model and training it to obtain the prediction model after training, The method for predicting the power load of an energy storage system according to feature 2.

4. To ensure that the prediction model outputs the initial load prediction sequence for the future time period, both the load sequence and the weather sequence are input sequences to the prediction model. The encoder receives the input sequence, the length of the input sequence is M, and M is an integer greater than 0. The encoder extracts layers from the input sequence to represent the features of the input sequence Ζ enc The goal is to obtain the encoder equation, which is Ζ enc = Encoder(X), where X is one feature data from the input sequence, and this one feature data consists of load data and weather data at the same time point, and Encoder(X) represents the mapping result of the encoder to the input feature data X, The decoder, the feature expression Ζ enc , the feature data X of the prediction start point in the future time zone feat Based on, generate the initial load prediction sequence in the future time zone, and the formula of the decoder is Y = Decoder(Ζ enc , X feat ), where Y is the initial load prediction sequence, and Decoder(Ζ enc , X feat ) represents the mapping result of the decoder for the feature expression Ζ enc , the feature data X of the prediction start point in the future time zone feat , including The method for predicting the power load of an energy storage system according to feature 2.

5. The multi-head self-attention mechanism module has h independent attention heads installed in parallel, and each of the attention heads has its own first projection matrix W i Q , W i K , W i V The first projection matrix W has such that h is an integer greater than 1. i Q , W i K , W i V These are used to perform linear transformations on the query, key, and value, respectively. Each of the attention heads is the respective first projection matrix W i Q , W i K , W i V Based on this, the input sequence is mapped to the attention output Q i Obtaining h attention outputs Q i Stitch the feature dimension and output Concat(O 1 , O 2 , ..., O h ) is obtained, and the second projection matrix W O The stitching output Concat(O 1 , O 2 , ..., O h The original dimension MultiHead(Q,K,V) is mapped to the original dimension MultiHead(Q,K,V), and the formula for calculating the original dimension MultiHead(Q,K,V) is MultiHead(Q,K,V) = Concat(O 1 , O 2 , ..., O h )W O Here, Q is the query vector, K is the key vector, and V is the value vector. The first feedforward neural network module outputs a mapping F(x) corresponding to each feature data x in the initial training sequence based on the original dimensional MultiHead(Q,K,V), The residual connection module outputs the residual connection output x from the mapping F(x). out Obtain the residual connection output x out The formula for calculating x out = x + F(x), The layer normalization module has the residual connection output x out Layer normalization is performed on it and LayerNormal(x out )=LayerNorm(x+F(x)) and obtain LayerNorm(x out ) is x out This shows the result of applying layer normalization to the given data. The layer normalization module is used to normalize the input of each encoder layer to a zero mean and unit variance. The method for predicting the power load of an energy storage system according to feature 3.

6. The mask self-attention mechanism module includes a mask matrix M, where, for the query vector and key vector of the decoder, if j ≤ i, then M ij = 0, indicating that the position i corresponding to the key vector focuses on the information of the position j corresponding to the query vector, and if j > i, then M ij = -∞, indicating that the position i corresponding to the key vector cannot pay attention to the information of the position j corresponding to the query vector, and the calculation formula for the mask self-attention mechanism module is, Here, MaskedAttn(Q, K, V) represents the output result of the masked self-attention mechanism module when the input query vector, key vector, and value vector are Q, K, and V in order, and QK T represents the point product of the query vector Q and the key vector K, and d k QK is the dimension of the key vector K. T Used to scale the results, teeth This represents the value of the Softmax function when given as input. The method for predicting the power load of an energy storage system according to feature 2.

7. Before modifying the initial load prediction sequence and obtaining the modified first load prediction sequence, Obtaining a predicted weather sequence corresponding to the predicted future time period, To estimate the deviation of the predicted weather sequence from the initial load prediction sequence and obtain a weather correction value sequence, This includes obtaining an error calibration value sequence corresponding to the initial load prediction sequence based on the load sequence and the weather sequence, Modifying the initial load prediction sequence and obtaining the modified first load prediction sequence is: This includes obtaining the first load prediction sequence after correction based on the initial load prediction sequence, the weather correction value sequence, and the error calibration value sequence. A method for predicting the power load of an energy storage system according to feature 1.

8. Estimating the influence deviation of the predicted weather sequence on the initial load prediction sequence and obtaining a weather correction value sequence includes using the predicted weather sequence as input to the weather correction model so that the weather correction model outputs the weather correction value sequence. Here, the weather modification model includes a plurality of parallel convolutional kernels, the weather modification model includes a nonlinear activation layer and a pooling layer, and the width and expansion rate of each convolutional kernel are all different. The method by which the weather correction model obtains the weather correction value sequence is that each convolution kernel sequentially extracts features from each of the weather data in the predicted weather sequence, and the initial weather features f j Obtaining the initial weather characteristics f j ga f j =Conv (kj,dj) It is obtained by the formula (W(t:t+H)) and Conv (kj,dj) (W(t:t+H)) represents the convolution operation on W(t:t+H) when the width of the convolution kernel is k and the expansion rate is d, where W(t:t+H) is the predicted weather sequence, and W(t:t+H) = [w 1 ,w 2 ... lol H ], where H is the number of predicted steps, and w 1 , lol 2 ...lol H The weather data are from different points in time, and the weather correction model is the initial weather feature f output by each of the convolutional kernels. j The integrated meteorological features F are formed by fusing these together to correspond to each of the aforementioned meteorological data. met To obtain the integrated meteorological feature F met The nonlinear activation layer and the pooling layer extract the weather correction value sequence ΔYmet(t:t+H) having a length of H, and each element in ΔYmet is a weather correction value corresponding to each of the weather data. The method for predicting the power load of an energy storage system according to feature 7.

9. Obtaining an error calibration value sequence corresponding to the initial load prediction sequence based on the load sequence and the weather sequence is, The load sequence and the weather sequence are used as input sequences for the error learning model so that the error learning model outputs the error calibration value sequence. The loss function of the aforementioned error learning model is: Here, e(t) is a sequence of past error calibration values ​​learned by the error learning model, and y(t) is a sequence of past real loads. This is a load sequence predicted in the past. The method for predicting the power load of an energy storage system according to feature 8.

10. The error learning model is a deep residual network model, the deep residual network model includes L all-connection layers, where L is an integer greater than 1, and each all-connection layer learns and corrects the error portion not captured by the previous all-connection layer, and the output of the i-th all-connection layer of the deep residual network model is The equation satisfies the following, where l is greater than 0 and less than L, Here, l (t+i) represents the input features of the l-th all-connected layer at time t+i, the input features of the l-th all-connected layer include the output of the previous all-connected layer, and the input features of the l-th all-connected layer are the input sequence of the error learning model, Θ l F is the parameter of the first all-connection layer, (l) (u l (t+i); Θ l ) is u l (t+i) and Θ l This is a calibration term obtained by mapping based on the Lth all-connection layer, and is the error calibration value sequence output by the Lth all-connection layer. The formula for this calculation is: That is, The method for predicting the power load of an energy storage system according to feature 9.

11. Obtaining the corrected first load prediction sequence based on the initial load prediction sequence, the weather correction value sequence, and the error calibration value sequence is: Obtaining a weather-corrected forecast sequence based on the initial load prediction sequence and the weather-corrected value sequence ΔYmet(t:t+H), The initial load prediction sequence, The error calibration value sequence Based on the baseline predicted value sequence The means of obtaining the aforementioned reference predicted value sequence The formula for this calculation is: And, This is the initial load prediction sequence, The XGBoost gradient boosting decision tree model is input to the XGBoost gradient boosting decision tree model such that the XGBoost gradient boosting decision tree model outputs the first load prediction sequence, wherein the auxiliary feature sequence includes important weather elements for the current time period, important weather elements for the future time period, an actual load error sequence for the previous prediction cycle, and a time index feature for the future time period, and the XGBoost gradient boosting decision tree model includes a plurality of regression trees. The XGBooster gradient boosting decision tree model aims to minimize the prediction error £, and the target function of the XGBooster gradient boosting decision tree model is: And here, The input to the loss function is y i , This is the result calculated in the case of y i This is the actual load value of the i-th sample, This is the predicted loading value for the i-th sample, is a regularization term, and f k represents the kth regression tree, and T is the total number of such regression trees. The formula for this calculation is: and f k (x i ) is the case where the k-th regression tree has a feature vector x for the i-th sample. i The input represents the predicted value. A method for predicting the power load of an energy storage system according to the feature described in 10.

12. The method by which the XGBoost gradient boosting decision tree model obtains the first load prediction sequence is as follows: The XGBoosst gradient boosting decision tree model determines a bias term b(z) and a first fused weight w of the reference prediction sequence based on the auxiliary feature sequence. 1 (z), the second fusion weight w of the weather correction forecast sequence 2 To obtain (z), The reference prediction value sequence and the weather correction prediction value sequence are given the first fusion weight w 1 (z), second fusion weight w 2 (z), merged according to the bias term b(z) to form the first load prediction sequence The objective is to obtain the first load prediction sequence The formula for this calculation is: And here, This represents the aforementioned baseline predicted value, This includes representing the aforementioned weather correction forecast sequence, The method for predicting the power load of an energy storage system according to feature 11.

13. The similarity of the load sequences in the aforementioned past load sequences is calculated using a Gaussian similarity function, and the Gaussian similarity function is: Here, σ is a scale parameter set based on past fluctuation ranges, and X τ:τ+M-1 This is the past load sequence from time τ-M+1 to τ, and X t-M+1:t This is the load sequence from time t-M+1 to t, and X t-M+1:t =[y(t-M+1) , . . . , y(t)], where y(t) is the load data corresponding to one point in time in the load sequence. A method for predicting the power load of an energy storage system according to feature 1.

14. The calculation formula for calculating the meteorological difference sequence ΔW between the actual meteorological sequence and the predicted meteorological sequence is ΔW = W t+1:t+H - W τ+1:τ+H where W τ+1:τ+H represents the actual meteorological sequence, and W t+1:t+H represents the predicted meteorological sequence, Obtaining a load difference sequence based on the aforementioned weather difference sequence is, The weather difference sequence ΔW is input into a weather correction model or an error learning model, and the load difference sequence due to weather differences is input to the weather difference sequence. Including the estimation of A method for predicting the power load of an energy storage system according to feature 1.

15. An energy storage system, The energy storage system comprises an energy storage device, a bidirectional energy storage converter, and an energy management module, wherein the energy management module is used to implement the power load prediction method for the energy storage system described in any one of claims 1 to 14, and the energy management module is also used to adjust the charge / discharge strategy of the energy storage system based on the first load prediction sequence or the second load prediction sequence. An energy storage system characterized by the following features.

Citation Information

Patent Citations

  • Family load short-term prediction method, system and equipment based on Transform model and medium

    CN117394351A

  • Power load leveling device

    JP2016116401A