A charging and discharging decision method for energy storage system based on real-time electricity price
By using the hollow convolution model in the energy storage system to predict real-time electricity price and combining the cross-hour rolling time domain strategy to judge peak and valley values, the problem of difficulty in capturing the peak and valley values of electricity prices in the existing technology is solved, and more efficient energy storage system scheduling and lower operating costs are achieved.
Patent Information
- Application Number
- CN202110323604.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-03-26
AI Technical Summary
The prior art is difficult to effectively capture the peak and valley values of electricity prices and use them for real-time energy storage system scheduling, resulting in large errors in electricity price estimation and high scheduling costs.
The real-time electricity price prediction method based on the hollow convolution model is adopted, and the peak and valley value judgment is carried out and the charge and discharge strategy of the energy storage system is optimized through the comparison of single-step and multi-step prediction results, combined with the cross-hour rolling time domain strategy.
It significantly improves the accuracy of market electricity price prediction, optimizes the charging and discharging strategies of energy storage systems, reduces operating costs, improves economic benefits, and enhances the learning ability of nonlinear relationships in price changes.
Smart Images

Figure CN112862221B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electricity price prediction and price peak detection, and in particular to a method for charging and discharging decision-making of an energy storage system based on real-time electricity prices. Background Art
[0002] To meet their needs, large users can connect their subnet terminals to self-provided energy storage systems. The optimization goals of self-provided energy storage systems mainly include improving energy efficiency, achieving supply and demand balance, reducing carbon emissions, and reducing operating costs. As the domestic real-time electricity market matures, it is foreseeable that prices will fluctuate frequently due to market competition. Self-provided energy storage systems can be used to purchase electricity during the low electricity price period and release the stored electricity to the subnet to supplement consumption during the peak period, thereby preventing price peaks.
[0003] As competition in the electricity market becomes increasingly fierce, it is increasingly important to optimize the dispatch of self-contained energy storage systems by optimizing electricity price forecasts and peak and valley value classification. However, prices are greatly affected by supply and demand, and fluctuate violently. The complex nonlinear relationship in its fluctuations cannot be well handled by simple models. At the same time, in the dispatch process, methods that only rely on day-ahead forecast data or intra-hour peak capture methods are greatly affected by hyperparameters and are very likely to miss the peak price time point, which also poses a challenge to the dispatch strategy of energy storage systems.
[0004] In practical applications, due to the sharp fluctuations in electricity prices, the estimation error of electricity prices is large, resulting in high dispatch costs. The key lies in how to instantly capture the peak and valley values of prices and use them for real-time dispatch, which requires new ideas and technologies to solve these problems.
[0005] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0006] In view of the problems in the related technology, the present invention proposes a charging and discharging decision method for an energy storage system based on real-time electricity prices to overcome the above-mentioned technical problems existing in the existing related technology.
[0007] To this end, the specific technical solution adopted by the present invention is as follows:
[0008] A method for charging and discharging decision of an energy storage system based on real-time electricity prices, the method comprising the following steps:
[0009] S1. Collect electricity price data and data on factors affecting electricity price in a pre-set area for several years, and pre-process the electricity price data and data on factors affecting electricity price;
[0010] S2. Process the electricity price data to obtain two sets of data sets at the five-minute level and the hourly level, and split the two sets of data sets;
[0011] S3. Training single-step and multi-step dilated convolution models based on several years of historical electricity price data and data on factors affecting electricity prices, and the single-step and multi-step dilated convolution models include dilated convolution blocks and fully connected parts;
[0012] S4. Load the historical electricity price data and real-time electricity price data into the single-step and multi-step dilated convolution models to obtain the single-step and multi-step prediction values, and use the cross-hour rolling time domain strategy to judge the peak and valley values;
[0013] S5. Dispatching the energy storage system according to the peak and valley value judgment results;
[0014] Among them, data on factors affecting electricity prices include but are not limited to load, total production, and demand.
[0015] Furthermore, the collecting of electricity price data and data of factors influencing electricity price in a preset region for several years in S1, and preprocessing of the electricity price data and data of factors influencing electricity price include the following steps:
[0016] S11. Collect electricity price data and data on factors affecting electricity price for several years;
[0017] S12. Detect bad data in electricity price data and data of factors affecting electricity price, and find and eliminate abnormal data;
[0018] S13, filling in the missing data in the electricity price data and the data of factors affecting the electricity price;
[0019] S14. Standardize the electricity price data and the data of factors affecting the electricity price.
[0020] Furthermore, the step of processing the electricity price data in S2 to obtain two sets of data sets at the five-minute level and the hourly level, and segmenting the two sets of data sets includes the following steps:
[0021] S21, taking the average of 12 5-minute electricity price data per hour as the electricity price data for that hour;
[0022] S22. Create hourly datasets based on fine-grained datasets;
[0023] S23. According to the chronological order, all hourly data sets are divided into three parts: training set, validation set and test set.
[0024] Furthermore, the training of single-step and multi-step dilated convolution models based on several years of historical electricity price data and data of factors affecting electricity prices in S3 includes the following steps:
[0025] S31, randomly shuffle the data in the training set and the validation set that are arranged in chronological order;
[0026] S32. Establish single-step and multi-step dilated convolution models;
[0027] S33, inputting the historical electricity value and data of factors affecting electricity prices of the training set in batches, and continuously training the single-step and multi-step dilated convolution models;
[0028] S34. According to the verification results of the verification set, if the single-step and multi-step dilated convolution models converge, stop training, and save the structures and parameters of the single-step and multi-step dilated convolution models;
[0029] S35. According to the verification result of the verification set, if overfitting occurs, the model size is reduced by a certain proportion, and the process is repeated from step S32.
[0030] S36: Input the test set into the single-step and multi-step dilated convolution models, and measure the economic benefits of the models. If the economic benefits are lower than expected, re-execute from step S32 and adjust the model parameters.
[0031] Furthermore, in S36, the test set is input into the single-step and multi-step dilated convolution models, and the economic benefits of the models are measured. If the economic benefits are lower than expected, step S32 is re-executed, and the model parameters are adjusted, including the following steps:
[0032] S361, obtaining the hourly multi-step electricity price forecast values for all remaining hours of the day output by the multi-step dilated convolution model and the current time step electricity price forecast value output by the single-step dilated convolution model;
[0033] S362, if the electricity price forecast value at the current time step is higher than all subsequent hourly electricity price forecast values, output the result as the peak value;
[0034] S363. The price difference of electricity during the charging and discharging period is determined by using single-step and multi-step void convolution models, and the economic benefit is determined by comparing it with the maximum possible profit.
[0035] Furthermore, in S362, if the electricity price forecast value at the current time step is lower than all subsequent hourly electricity price forecast values, the result is output as a valley value, and the rest are output as normal values.
[0036] Furthermore, in S4, the historical electricity price data and the real-time electricity price data are loaded into the single-step and multi-step dilated convolution models, the single-step and multi-step predicted values are obtained, and the peak and valley value judgment is performed using a cross-hour rolling time domain strategy, including the following steps:
[0037] S41. Obtain the real-time electricity value and the real-time value of factors affecting electricity price every 5 minutes;
[0038] S42, loading the single-step and multi-step dilated convolution models saved in step S3;
[0039] S43, using a multi-step dilated convolutional model at every full hour to make hourly predictions for all remaining hours of the day, and making single-step predictions at every 5-minute time step;
[0040] S44. According to step S36, a cross-hour rolling time domain strategy is used to determine the peak and valley values.
[0041] Furthermore, the scheduling of the energy storage system according to the peak-valley value judgment result in S5 includes the following steps:
[0042] S51, obtaining the judgment result of the cross-hour rolling time domain strategy;
[0043] S52, if the judgment result is a peak value, the energy storage system is scheduled to discharge within the next 60 minutes; if the judgment result is a valley value, the energy storage system is scheduled to charge within the next 60 minutes and the process is restarted from step S41; if the judgment result is a normal value, the process is restarted from step S41;
[0044] S53, measuring the economic benefits of the model, if the economic benefits are lower than expected, re-execute step S32 to the current operation;
[0045] S54. If the economic benefits meet expectations, the entire process will be completed smoothly.
[0046] The beneficial effects of the present invention are as follows: the energy storage system charging and discharging decision method based on real-time electricity prices of the present invention enhances the benefits of large-scale energy storage systems, more effectively reduces operating costs, and increases profits. Through the atrous convolutional neural network, deep learning technology is introduced to effectively improve the accuracy of market electricity price forecasts. At the same time, combined with the comparison of single-step and multi-step prediction results, an innovative cross-hour rolling time domain strategy is used to provide more charging and discharging opportunities for self-contained energy storage systems, better capture the peak and valley values of electricity prices, optimize the charging and discharging strategy, effectively improve the economic benefits of self-contained energy storage systems, and significantly improve the system's learning ability for nonlinear relationships in price changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 The present invention is a flowchart of a method for making decisions on charging and discharging an energy storage system based on real-time electricity prices according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in the field should be able to understand other possible implementations and advantages of the present invention. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components.
[0050] According to an embodiment of the present invention, a method for charging and discharging decision-making for an energy storage system based on real-time electricity prices is provided. In view of the shortcomings of the prior art and the fact that the scheduling strategy is highly dependent on the price prediction accuracy of the model, the purpose of the present invention is to provide a method for charging and discharging decision-making for an energy storage system based on real-time electricity prices. By utilizing single-step and multi-step dilated convolution models to predict electricity prices and making decisions through a more effective cross-hour rolling time domain strategy, the ability to capture price peaks and valleys is effectively improved, the charging and discharging strategy is optimized, and the economic benefits are maximized.
[0051] The present invention is further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to the energy storage system charging and discharging decision method based on real-time electricity price according to an embodiment of the present invention, the method includes the following steps:
[0052] Step S1: Collecting electricity price data of a certain region for many years and data on factors affecting electricity price, such as load, total production, and demand, and preprocessing the data;
[0053] Step S11: For a certain region, collect market electricity price data for many years and external influencing factor data of load, demand, power generation, total flow and time coding information. The data granularity is 5 minutes, and a total of four years of data, a total of 420,768 items, are collected;
[0054] Step S12: perform bad data detection, find nearly 1000 abnormal data points, and use the nearest neighbor data to correct the abnormal values;
[0055] Step S13: performing missing data filling, if it is found that some data are missing, the missing data are filled by interpolation;
[0056] Step S14: perform data standardization, use the variance and standard deviation of each year to perform data standardization separately and merge the data sets;
[0057] Step S2: Process the electricity price data into two sets of data sets at the five-minute level and the hourly level, and split the data sets;
[0058] Step S21: taking the average of 12 5-minute data per hour as the hourly data;
[0059] Step S22: Produce an hourly data set based on the fine-grained data set;
[0060] Step S23: Divide the entire data set into three parts in chronological order: a training set, a validation set, and a test set. The data from the last year is used as a test set alone, and the data from the first three years is divided into a training set and a validation set at a ratio of 8:2.
[0061] Step S3: training single-step and multi-step models based on many years of historical electricity price data and influencing factor data, the model includes a dilated convolution block and a fully connected part;
[0062] Step S31: randomly shuffle the data in the training set and the validation set that are arranged in chronological order to prevent the model from overfitting;
[0063] Step S32: Establish single-step and multi-step dilated convolution models. The backbones of the two branch models are consistent, consisting of two initial convolution layers and three dilated convolution blocks. Each dilated convolution block contains four dilated convolution layers, and their dilation rates are 1, 2, 4, and 8 from bottom to top. The single-step branch model is then directly connected to a fully connected layer and outputs nine quantile price prediction values for the next time step. The multi-step branch model passes through three fully connected layers (the number of neurons is 72, 128, and 216, respectively) and finally outputs the prediction value for the next day. ReLU is used as the activation function. In order to improve the accuracy of the model, batch normalization is added to each layer. The convolution kernel size is 8, and the number of convolution kernels in each layer is 24.
[0064] Traditional convolution operations only extract features in pixel-level neighborhoods, limiting the relationship between pixels. The dilated convolution operation can expand the receptive field of the convolution kernel and extract multi-dimensional features without increasing parameters.
[0065] Step S33: inputting historical electricity value and influencing factor data of the training set in batch size of 128, and continuing training;
[0066] Step S34: According to the verification results of the verification set, if the mean absolute error between the model prediction value and the actual value does not decrease within 100 batches, stop training and save the structure and parameters of the dilated convolution model;
[0067] Step S35: If the validation error is more than twice the training error, it is considered that overfitting occurs. The actual calculation results show that the validation error is less than twice the training error, so the result is valid.
[0068] Step S36: Input the test set into the model, use the cross-hour rolling time domain strategy to simulate the scheduling, and measure the economic benefits of the model. If the economic benefits are lower than expected, re-execute from S32 and adjust the model parameters at the same time;
[0069] Step S361: input the test data into the model in time step order, and obtain the hourly multi-step electricity price forecast values for all remaining hours of the day output by the multi-step model and the current time step electricity price forecast value output by the single-step model;
[0070] Step S362: if the electricity price prediction value of the current time step is higher than all subsequent hourly electricity price prediction values, the result is output as a peak value; if the electricity price prediction value of the current time step is lower than all subsequent hourly electricity price prediction values, the result is output as a valley value; otherwise, normal values are output;
[0071] Step S363: The price difference of electricity during the charging and discharging periods is determined by the model and compared with the maximum possible profit. If more than 60% of the maximum possible profit can be captured, the model is considered effective.
[0072] Step S4: taking historical and real-time electricity price data as input, obtaining single-step and multi-step forecast values, and using a cross-hour rolling time domain strategy to determine peak and valley values;
[0073] Step S41: Obtain real-time electricity value and influencing factor values every 5 minutes;
[0074] Step S42: loading the single-step and multi-step dilated convolution prediction models saved in step S3;
[0075] Step S43: using the multi-step model at every full hour to make hourly predictions for all remaining hours of the day, and making single-step predictions at every 5-minute time step;
[0076] Step S44: similar to step S36, a cross-hour rolling time domain strategy is used to determine the peak and valley values;
[0077] Step S5: dispatching the large-scale energy storage system according to the peak value determination result;
[0078] Step S51: Obtain the judgment result of the cross-hour rolling time domain strategy;
[0079] Step S52: If the judgment result is a peak value, the energy storage system is scheduled to discharge within the next 60 minutes; if the judgment result is a valley value, the energy storage system is scheduled to charge within the next 60 minutes and re-execute from S41; if the judgment result is a normal value, re-execute from S41.
[0080] Step S53: similar to step S363, measure the economic benefits of the model. If the economic benefits are lower than 60% of the maximum possible profit, re-execute S32 to the current operation;
[0081] Step S54: If the economic benefits meet expectations, the entire process is successfully completed.
[0082] In summary, the energy storage system charging and discharging decision method based on real-time electricity prices of the present invention enhances the benefits of large-scale energy storage systems, more effectively reduces operating costs, and increases profits. Through the atrous convolutional neural network, deep learning technology is introduced to effectively improve the accuracy of market electricity price forecasts. At the same time, combined with the comparison of single-step and multi-step prediction results, an innovative cross-hour rolling time domain strategy is used to provide more charging and discharging opportunities for self-contained energy storage systems, which can better capture the peak and valley values of electricity prices, optimize the charging and discharging strategy, effectively improve the economic benefits of self-contained energy storage systems, and significantly improve the system's learning ability for nonlinear relationships in price changes.
[0083] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for charging and discharging decision-making of an energy storage system based on real-time electricity prices, characterized in that: The method comprises the following steps: S1. Process the electricity price data to obtain two sets of data sets at the five-minute level and the hourly level, and split the two sets of data sets; S2. Based on several years of historical electricity price data and data on factors affecting electricity prices, single-step and multi-step dilated convolution models are trained, and the single-step and multi-step dilated convolution models include dilated convolution blocks and fully connected parts; S3, loading historical electricity price data and real-time electricity price data into single-step and multi-step dilated convolution models, obtaining single-step and multi-step forecast values, and using a cross-hour rolling time domain strategy to determine peak and valley values; S4. Dispatching the energy storage system according to the peak and valley value judgment results; Among them, data on factors affecting electricity prices include but are not limited to load, total production, and demand.
2. A method for charging and discharging energy storage system based on real-time electricity price according to claim 1, characterized in that: In S1, the electricity price data is processed to obtain two sets of data sets at the five-minute level and the hourly level, and the two sets of data sets are divided into the following steps: S11, taking the average of 12 5-minute electricity price data per hour as the electricity price data for that hour; S12. Create hourly datasets based on fine-grained datasets; S13. Divide all hourly data sets into three parts according to chronological order: training set, validation set and test set.
3. The method for charging and discharging decision-making of an energy storage system based on real-time electricity prices according to claim 1, characterized in that: The training of single-step and multi-step dilated convolution models based on several years of historical electricity price data and data of factors affecting electricity prices in S2 includes the following steps: S21, randomly shuffle the data in the training set and the validation set that are arranged in chronological order; S22. Establish single-step and multi-step dilated convolution models; S23, input the historical electricity value and data of factors affecting electricity prices of the training set in batches, and continuously train the single-step and multi-step dilated convolution models; S24. According to the verification results of the verification set, if the single-step and multi-step dilated convolution models converge, stop training, and save the structures and parameters of the single-step and multi-step dilated convolution models; S25. According to the verification result of the verification set, if overfitting occurs, the model size is reduced by a certain proportion, and the process is repeated from step S22. S26: Input the test set into the single-step and multi-step dilated convolution models, and measure the economic benefits of the models. If the economic benefits are lower than expected, re-execute from step S22 and adjust the model parameters.
4. A method for charging and discharging decision-making of an energy storage system based on real-time electricity prices according to claim 3, characterized in that: In S26, the test set is input into the single-step and multi-step dilated convolution models, and the economic benefits of the models are measured. If the economic benefits are lower than expected, step S22 is re-executed, and the model parameters are adjusted, including the following steps: S261. Obtain the hourly multi-step electricity price forecast values for all remaining hours of the day output by the multi-step dilated convolution model and the current time step electricity price forecast value output by the single-step dilated convolution model; S262. If the electricity price forecast value at the current time step is higher than all subsequent hourly electricity price forecast values, the result is output as a peak value; S263. The price difference of electricity during the charging and discharging period is determined by using single-step and multi-step void convolution models, and the economic benefit is determined by comparing it with the maximum possible profit.
5. A method for charging and discharging energy storage system based on real-time electricity price according to claim 4, characterized in that: In the above S262, if the electricity price forecast value at the current time step is lower than all subsequent hourly electricity price forecast values, the result is output as a valley value, and the rest are output as normal values.
6. The method for charging and discharging decision-making of an energy storage system based on real-time electricity prices according to claim 1, characterized in that: In S3, historical electricity price data and real-time electricity price data are loaded into single-step and multi-step dilated convolution models to obtain single-step and multi-step prediction values, and a cross-hour rolling time domain strategy is used to perform peak and valley value judgment, including the following steps: S31. Obtain the real-time electricity value and the real-time value of factors affecting electricity price every 5 minutes; S32, loading the single-step and multi-step dilated convolution models saved in step S2; S33, use a multi-step dilated convolutional model at every full hour to make hourly predictions for all remaining hours of the day, and make single-step predictions at every 5-minute time step; S34. According to step S26, a cross-hour rolling time domain strategy is used to determine the peak and valley values.
7. A method for charging and discharging energy storage system based on real-time electricity price according to claim 6, characterized in that: The scheduling of the energy storage system according to the peak-valley value judgment result in S4 includes the following steps: S41, obtaining the judgment result of the cross-hour rolling time domain strategy; S42, if the judgment result is a peak value, the energy storage system is scheduled to discharge within the next 60 minutes; if the judgment result is a valley value, the energy storage system is scheduled to charge within the next 60 minutes and the process is restarted from step S31; if the judgment result is a normal value, the process is restarted from step S31; S43, measuring the economic benefits of the model, if the economic benefits are lower than expected, re-execute step S22 to the current operation; S44. If the economic benefits meet expectations, the entire process will be completed smoothly.
Citation Information
Patent Citations
Short-term power load prediction method based on multilayer improved GRU neural network
CN107578124A
Short-term load forecasting method based on information fusion convolution neural network model
CN109543901A