Industrial and commercial energy storage system charging and discharging decision-making method based on GRU optimization model

By adopting a charge and discharge decision-making method based on the GRU optimization model in the energy storage system and combining the PSO algorithm to optimize parameters, the problem of lack of flexibility and targeted charging and discharge decision-making in the existing technology is solved, and more efficient and economical energy management and grid stability are achieved.

CN119891286AActive Publication Date: 2025-04-25HANGZHOU DIANZI UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510053502.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

The existing charging and discharging decision-making methods for energy storage systems lack flexibility and pertinence, and fail to effectively consider the volatility of industrial and commercial electricity consumption and the changes in grid load, resulting in the inability to optimize the charging and discharging plan based on real-time data, affecting the efficiency and effectiveness of energy management.

Method used

The charging and discharging management strategy of industrial and commercial energy storage systems based on the GRU optimization model is adopted. Only the power value at the next moment is predicted at each time through the sliding window, and the PSO algorithm is used to assist the parameter optimization of the GRU model to improve the prediction accuracy and guide the charging and discharging decision of the energy storage system.

Benefits of technology

It improves the accuracy and flexibility of charging and discharging decisions in the energy storage system, can better respond to changes in grid demand and equipment status, improve energy utilization efficiency, reduce energy waste and electricity costs, and enhance grid stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119891286A_ABST
    Figure CN119891286A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of energy storage system charging and discharging decision making, and particularly relates to an industrial and commercial energy storage system charging and discharging decision making method based on a GRU optimization model. And taking total active power data per minute in recent 7 days as a data set for training. The method comprises the following steps: preprocessing to remove abnormal data, performing parameter optimization on a GRU model by using a particle optimization algorithm to obtain a hyper-parameter value, constructing a PSO-GRU model to predict the power condition at the next moment, and making a charging and discharging decision. The energy utilization efficiency can be improved, the power supply and demand can be better matched by optimizing the charging and discharging time decision of the energy storage system, the energy waste is reduced, and the power grid stability is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of energy storage system charging and discharging decision-making, and specifically relates to an industrial and commercial energy storage system charging and discharging decision-making method based on a GRU optimization model. Background Art

[0002] With the rapid development of industrialization and informatization, industrial and commercial electricity consumption has continued to rise, putting forward higher requirements for the stability and reliability of power supply. In this context, as an important part of the power system, the energy storage system and its charging and discharging decision-making method are of great significance for improving energy efficiency, reducing costs and promoting the widespread application of renewable energy. This paper will explore the charging and discharging time decision-making method of the energy storage system based on industrial and commercial electricity consumption, aiming to provide an efficient and economical energy storage management strategy for the power system.

[0003] In the field of energy storage system charging and discharging time decision-making, traditional methods often rely on fixed schedules and simple rules. Although this method is easy to implement, it also lacks the necessary flexibility and pertinence. It fails to take into account the volatility of industrial and commercial electricity consumption, changes in grid load, and the actual status of energy storage equipment, resulting in the inability to optimize charging and discharging plans based on real-time data. In addition, the existing energy storage system decision-making mechanism usually lacks real-time monitoring of the health status of energy storage equipment and grid demand, which means that the charging and discharging cycle is often based on preset or static strategies rather than changes in the actual grid and equipment status. This decision-making method that lacks dynamic adjustment cannot respond to changes in grid demand and equipment status in a timely manner, and thus cannot achieve the maximum benefit of the energy storage system. Too long charging and discharging intervals may lead to energy waste, while too frequent charging and discharging may shorten the service life of the equipment and increase maintenance costs. Therefore, scientifically formulating charging and discharging time decisions for energy storage systems based on industrial and commercial electricity consumption is a key step in improving energy efficiency and economic benefits.

[0004] At present, the industry has proposed some theories and technologies for decision-making on charging and discharging time of energy storage systems, but the methods and strategies used in the research have certain defects.

[0005] Patent CN202411256091.5 "Energy storage charging and discharging control method, device, storage medium and equipment" provides a method for predicting the user's maximum demand for the month by combining the historical demand of the power grid and energy storage inlet and outlet lines in a preset time period, and adjusting the charging and discharging power of the energy storage system accordingly. The core of this patent is to use the historical load demand curve to predict and adjust the charging and discharging strategy to optimize the efficiency of power resources and reduce costs. It relies on historical data and lacks the prediction accuracy of machine learning models; has limited ability to handle nonlinear relationships; insufficient use of real-time data, and inflexible model updates; low levels of automation and intelligence, requiring manual intervention; sensitive to outliers, affecting model stability.

[0006] Patent CN202410977907.7 "Dynamic management methods, devices, equipment and media for electric energy" mainly collects charging and discharging power data samples of energy storage stations, combines local electricity price information, calculates the standard deviation and sample mean, and then obtains a reasonable charging and discharging power range, and dynamically configures the charging and discharging strategy based on the rule engine. Its method mainly relies on historical data and preset rules, and may not be able to flexibly adapt to new power consumption patterns. In contrast, machine learning methods can learn and predict complex power consumption curves from big data, providing more accurate charging and discharging strategies. In addition, the patented method may have limitations in handling nonlinear relationships and real-time data updates, while machine learning models can be dynamically adjusted to better respond to changes.

[0007] Patent CN202411087622.2 "An intelligent charging and discharging management method for energy storage equipment" manages the charging and discharging process of energy storage equipment by setting operating logic and power limits, aiming to optimize energy utilization efficiency and extend battery life. However, this method may not be as flexible and accurate as prediction methods based on machine learning because it relies on preset rules and thresholds rather than learning patterns from large amounts of data. This may result in the inability to adjust the charging and discharging strategy in a timely manner when faced with complex and changing electricity demand, thereby affecting the efficiency and effectiveness of energy management. Therefore, although the existing energy storage system charging and discharging time decision methods can scientifically manage charging and discharging to a certain extent, they still have a lot of room for improvement in terms of strategy, accuracy, promotion, and feasibility. These methods mainly rely on historical data and preset rules, lack the prediction accuracy and flexibility of machine learning models, have limited ability to handle nonlinear relationships, insufficient use of real-time data, inflexible updating of models, low levels of automation and intelligence, require manual intervention, and are sensitive to outliers, affecting model stability. In contrast, machine learning methods can learn from big data and predict complex electricity consumption curves, provide more accurate charging and discharging strategies, and dynamically adjust to better respond to changes. In this way, when faced with complex and changing electricity demands, strategies can be adjusted in a timely manner to improve the efficiency and effectiveness of energy management.

[0008] Patent CN202010800193.4 "A method for forming a cloud energy storage charging and discharging strategy based on GRU multi-step prediction technology" divides a day into 24 points and uses the GRU model for multi-step prediction, which greatly reduces the accuracy of the GRU model prediction. This is because in multi-step prediction, each step of the prediction depends on the prediction result of the previous step, and the result of the previous step prediction is not real data, which causes the error to gradually accumulate. The final accumulated error will be very large, and the availability is not high.

[0009] It is precisely because of the shortcomings of the existing technology that the technical solution of the present invention comes into being, aiming to propose an optimized energy storage system charging and discharging decision method, which is not only lightweight but also has good scalability and can effectively solve the defects in the above-mentioned technology. Summary of the invention

[0010] In response to the above problems, the present invention proposes a charge and discharge management strategy for industrial and commercial energy storage systems based on the GRU optimization model, aiming to solve the defects and deficiencies in the prior art. Although the present invention also uses the GRU model, the data used for prediction are all historical real values. The sliding window only predicts the value of the next point each time, and the next point is predicted after the new real value is obtained. The prediction accuracy is much higher than the prior art. Secondly, the present invention also uses the PSO algorithm to assist in the parameter optimization of the GRU model to obtain better prediction accuracy and guide the charging and discharging decisions of the energy storage system.

[0011] Considering that industrial and commercial electricity consumption has a strong regularity, the present invention only uses the power data of industrial and commercial electricity consumption, without the need to access other sensors, and can conveniently optimize and upgrade the charging and discharging management strategy of the existing energy storage device. At the same time, the particle swarm optimization algorithm is combined to find the best parameters to further optimize the accuracy of the GRU algorithm model prediction, so that the reliability of the charging and discharging decision is greatly improved. At the same time, for the selection of data sets, considering that industrial and commercial production activities are generally carried out on a weekly basis, that is, the electricity consumption pattern of a certain day of this week is very similar to the electricity consumption pattern of the same day of the previous week. The historical data set used by the training model is composed of the data of the previous 7 days of the day of prediction, so that the model can capture this inherent law and improve the accuracy of the prediction. Secondly, in order to further improve the versatility of the model, the system will use the historical data collected on the day during the valley period after 12 o'clock every night, and combine the data of the previous 6 days to train the model, so that it can learn the new electricity consumption pattern of the day and improve the accuracy of the prediction of the new day. Finally, the optimal charging and discharging strategy under the same power consumption conditions is calculated, and the power consumption curve is smoothed through model prediction to reduce the impact of high electricity prices during peak hours and peak hours on power consumption. At the same time, it assists in demand control. When the peak power consumption in the next period is predicted and the remaining power of the current energy storage system is insufficient to reduce the maximum demand of the next cycle to a reasonable range, the discharge of the current cycle is reduced or stopped and left to the next cycle, so that the maximum demand of the month can be controlled within a reasonable range as much as possible, and the power consumption curve is further smoothed to reduce the power consumption cost priced on demand, providing a reliable and reasonable basis for the efficient management of the energy storage system.

[0012] A charging and discharging decision method for an industrial and commercial energy storage system based on a GRU optimization model comprises the following steps:

[0013] S1: During the daily low electricity consumption period, the energy storage meter of the industrial and commercial energy storage system is used to obtain the data point e of the industrial and commercial energy storage system time series power data for the past week. i ,i=e1,e2,e3,…,e 7t ; The time series power data is sampled according to a fixed sampling period, and t data points are collected every day;

[0014] S2: Data point preprocessing:

[0015] The first 7t-1 data points in the time series power data are grouped into 6t groups using the rolling window method:

[0016] {e1,e2,e3,…,e t},{e2,e2,e3,…,e t+1},{e3,e4,e5,…,e t+2},…,{e 6t ,e 6t+1 ,e 6t+2 ,…,e 7t-1}

[0017] The labels corresponding to the 6t groups are: e t+1 ,e t+2 ,e t+3 ,…,e 7t ;

[0018] S3: Use the particle optimization algorithm PSO to optimize the parameters of the GRU model to obtain the hyperparameter values;

[0019] The hyperparameter values ​​are specifically: the number of neurons, random dropout rate, and batch size of the first layer of the GRU neural network are optimized;

[0020] S4: Substitute the hyperparameter values ​​into the GRU network to build a PSO-GRU power prediction model; input the 6t groups in S2 into the PSO-GRU power prediction model respectively, and use the labels corresponding to the 6t groups to perform supervised training on the PSO-GRU power prediction model; obtain the trained PSO-GRU power prediction model;

[0021] S5: Get t data points before the current moment, input them into the trained PSO-GRU power prediction model, and obtain the power prediction value at the next moment;

[0022] S6: Make a charging and discharging decision at the next moment according to the power prediction value at the next moment;

[0023] Get the current electricity price time table, and determine the peak time, peak time, normal time, and valley time from high to low electricity prices.

[0024] Get the current power W1 and the average power W2 from 0:00 to the current time;

[0025] Obtain the maximum demand power W3 and the maximum charging and discharging power W4 of the energy storage system set in advance;

[0026] Determine whether demand control is performed at all times;

[0027] If not: then the charge and discharge decision follows the following rules:

[0028] Rule 1: When W1 is greater than W2 or W1 is greater than W3, the energy storage system discharges, and the discharge power is Min(Max(W1-W2,W1-W3),W4).

[0029] Rule 2: When W1 is less than W2 or W1 is less than W3, the energy storage system is charged, and the charging power is Min(Max(W2-W1,W3-W1),W4).

[0030] Rule 3: When the remaining power of the energy storage system is insufficient to support demand control at the next moment and demand control is not required at the current moment, if there is any charging behavior, stop the original charging behavior, and determine whether demand control is required at the next moment based on the value predicted by the PSO-GRU power prediction model. If it is determined that charging at the current moment can meet the discharge demand at the next moment, charge at the power of W3-W1 at the current moment until the power demand of demand control at the next moment is met;

[0031] If: When the current period is a normal period or a low period, the charging and discharging decision follows Rule 2;

[0032] When the current period is the peak period, the charging and discharging decision follows Rule 1.

[0033] Furthermore, in S3, the number of neurons in the first layer of the GRU neural network is set between 256 and 300, the random dropout rate is set between 0.03 and 0.19, and the batch size is set between 64 and 128.

[0034] Furthermore, in S1, the time series power data is sampled at a fixed period of no more than 1 minute.

[0035] Furthermore, the preprocessing described in S2 also includes correcting outliers in the data points:

[0036] Combine the historical power data of the energy storage meter at the same time on the same day last week to correct the abnormal extreme values; correct the data during the energy storage system alarm period.

[0037] Furthermore, the preprocessing described in S2 also includes normalization processing.

[0038] Furthermore, the normalization process specifically includes using a min-max normalization method:

[0039]

[0040] Where, X * is the normalized data; x max and x min are the minimum and maximum values ​​of the data set, respectively, and x is the original sample data; using the above formula, the data point e of the time series power data is i Normalize.

[0041] The beneficial effects of the present invention are as follows: 1) Improve energy utilization efficiency: By optimizing the charging and discharging time decisions of the energy storage system, the power supply and demand can be better matched and energy waste can be reduced, especially in intermittent energy sources such as wind and solar energy, the energy storage system can balance the time difference between power generation and power consumption. 2) Enhance the stability of the power grid: Reasonable charging and discharging decisions can release energy at the peak of the power grid load, help the power grid cope with peak demand, reduce the load pressure of the power grid, and improve the stability and reliability of the power grid. 3) It has strong versatility: By adjusting the number of data points collected in a day, the data after different time intervals can be predicted while retaining a high degree of accuracy. 4) Improved economic benefits: Reasonable charging and discharging decisions can bring significant economic benefits to enterprises through various business models such as peak-valley arbitrage, demand management, and self-generation and self-use. 5) Enhanced dynamic adjustment capabilities: Previous decisions were manually entered in advance, and the laws mastered by people were relatively rough, while neural networks can deeply understand the inherent laws between data, and can also dynamically make appropriate decisions for real-time changing environments. 6) The granularity of decision adjustment can be very fine: In the past, decisions were made to make the same operation over a relatively long period of time. The present invention can set the decision granularity to 1 minute at the minimum, so as to better respond to sudden changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 This is a flow chart of the energy storage charging and discharging decision-making method of the present invention;

[0043] Figure 2 It is the flow chart of PSO algorithm;

[0044] Figure 3 This is a comparison chart of the true values ​​of the model results before and after improvement. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and beneficial effects of the present invention more clearly described, the present invention will be further described in detail below with reference to the accompanying drawings and specific examples. Figure 1 This is a flow chart of the energy storage charging and discharging decision method of the present invention. It includes the following steps:

[0046] S1: Collect daily power data of energy storage meters.

[0047] S2: Preprocess abnormal data, divide the data set into rolling parts based on the number of data points collected in units of days as input and take the next point of the rolling window as output to form a training data set and normalize it using a linear transformation algorithm. This can make it easier for the model to capture patterns and features in the data and improve the performance of the model.

[0048] S21: The present invention is aimed at a company's energy storage management project in Hangzhou. The power station is divided according to different energy storage cabinets. The data selection intercepts the historical daily energy storage meter power data of the power station's energy storage meter from September 2023 to September 2024. The corresponding output is the ideal daily power curve of the current power station on that day. The corresponding data set is sent by the gateway device and then filtered. After that, the data will be sent to the microservice platform for data analysis. The unit data set obtained is as follows:

[0049] S in ={{e1,e2,e3,…,e t},{e2,e2,e3,…,e t+1},{e3,e4,e5,…,e t+2},…,{e 6t ,e 6t+1 ,e 6t+2 ,…,e 7t-1}}

[0051] S out ={e t+1 ,e t+2 ,e t+3 ,…,e 7t}

[0052] There are 6t sets of input data in total. Each set of data in the input set consists of t variable values. Therefore, the input set can be represented by Sin above, and the corresponding output set can be represented by Sout.

[0053] Generally speaking, the pattern of electricity consumption on weekends is different from that on weekdays, and the patterns of electricity consumption between weekdays are generally similar, and this pattern is cyclical in weeks. Considering the high correlation between the electricity consumption curve and the work week, the historical data of the most recent week is divided into units of t data points per day with every minute data as the data point, and a sliding window with a window length of t data points is used to generate the training data set, i.e. the input of the model, with a moving unit at a time. The corresponding output is the first data point after the sliding window, i.e. the output predicted by the model.

[0054] S22: All collected power data will be combined with the historical power data of the energy storage meter at the same time on the same day last week to correct abnormal extreme values, and at the same time correct the data during the energy storage system alarm period. Since network delays, meter failures, sensor failures and other issues will pollute the data, all collected power data will be combined with the gateway reporting status and historical data for judgment. It is also necessary to correct the data for time periods such as standby, failure, shutdown and network interruption delay to eliminate the impact of the failure.

[0055] S23: normalize the input data.

[0056] Input data normalization: The input data values ​​are converted and mapped to a specified area to further analyze the characteristics of the data. Data normalization can reduce the impact of a larger range of data in the original data, improve the speed of model training and the accuracy of prediction. The present invention adopts the min-max normalization method to make the input data between [0, 1].

[0057]

[0058] Where, X * is the normalized data; x max and x min are the minimum and maximum values ​​of the data set respectively, and x is the original sample data.

[0059] Using the above formula, for the data point e of the time series power data i Normalize.

[0060] S3: Optimize the parameters of the GRU model according to the particle optimization algorithm to obtain the hyperparameter values.

[0061] S31: Divide the preprocessed data into a training set and a test set in a ratio of 8:2.

[0062] S32: The number of GRU neural networks, random dropout rate, and batch size are optimized, and then the evolutionary number, learning factor, and position and speed of the PSO algorithm are initialized, as well as the position and speed of the i-th particle. The reason why these three parameters are selected here is that the number of neurons in the neural network directly affects the complexity and ability of the model, so it must be considered first. Secondly, the random dropout rate is selected to improve the generalization ability of the model. Randomly "discarding" a part of the neurons during the training process helps to improve this ability. Finally, the batch size is selected for the dual considerations of training speed and generalization ability. A reasonable batch size helps to improve the generalization ability of the model, and at the same time, it can also prevent the training time from being too long. After further optimization of the appropriate parameters by the PSO algorithm, the accuracy of the model prediction is improved, further ensuring the accuracy of the prediction. Then the position and speed of the PSO algorithm are defined as the learning rate and number of hidden layers of the GRU model, and the speed and position of each particle flying are updated to generate a new generation of particle populations.

[0063] The PSO algorithm is an optimization algorithm based on swarm intelligence. It was born from the two-dimensional space simulation of the foraging behavior and group behavior of bird animal populations. First, many initial search particles with random positions and velocities are set in the two-dimensional space. The particles guide an optimal point in the space by adding the velocity and position to complete the local optimization and global optimization. In the optimization process, by constantly tracking the optimal solution and comparing the best position found by the local search, the optimal position of the entire particle swarm is updated and saved, and finally the process from local optimization to global optimization is realized. Assume that there is a D-dimensional search space, the group consists of n particles, X i is the position, V i is the speed, P i is the optimal position of an individual,

[0064] The position coordinates of the i-th particle are: X id =(x i1 ,x i2 ,...,x iD ), i=1,2,3,4,...N;

[0065] The velocity vector of the i-th particle is: V id =(v i1 ,v i2 ,...,v iD ), i=1,2,3,4,...N;

[0066] The i-th particle continuously iterates to find the optimal solution through the fitness value determined by the fitness function, and at the same time tracks its current best position pb i and gb i After that, change its speed and position according to the following iterative formulas.

[0067] V in (k+1)=ωV in (k)+c1×r1(k)×(pb in -X in )+c2×r2(k)×(gb in -X in )

[0068] X in (k+1)=V in (k)+X in (k+1)

[0069] Where n = 1, 2, ..., N is the dimension of the search space, i = 1, 2, ...M is the number of particles to be searched, V in is the velocity of particle i in the kth iteration, r is a random number distributed between [0, 1], X in is the current position of the particle, c1, c2 are learning factors, and ω is the inertia factor.

[0070] S33: Determine the boundaries of the PSO algorithm optimization parameters. Considering the large data set, the reasonable boundaries of the maximum and minimum values ​​are determined by sandwiching them from both sides (the boundary values ​​when the model performance begins to decline or begin to rise). The size of the first layer of the neural network is set between 64 and 256 neurons, the random dropout rate is set between 0.01 and 0.1, and the batch size is set between 32 and 128.

[0071] S34: In each iteration, the fitness of the PSO algorithm particles is first calculated according to the fitness function, and then the GRU model is trained through the training set, and the root mean square error value of the result is used as the fitness value of the PSO algorithm particles.

[0072]

[0073] In the formula, n represents the sample size of the test set data, X act (i) represents the actual value of power at time i, X pred (i) indicates a calculated value.

[0074] S35: Finally, the algorithm ends when the fitness value tends to be stable or iterates to the maximum value, and the individual optimal value and the global optimal value of the PSO algorithm particles are updated, and the speed and position of the PSO algorithm particles are updated at the same time.

[0075] S4: Substitute the hyperparameter values ​​into the GRU network to build the PSO-GRU power prediction model.

[0076] GRU (Gated Recurrent Unit) is a deep learning model suitable for time series data. Its original design is to solve the gradient vanishing or gradient exploding problems encountered by traditional recurrent neural networks (RNNs) when processing long sequence data. GRU effectively captures the long-term dependencies in time series data by introducing a gating mechanism to control the flow of information. It is a very suitable choice for capturing the patterns in electricity consumption data.

[0077] GRU is mainly composed of update and reset gates. The update gate analyzes the output of the previous time step and combines it with the input at the current moment to select the content that needs to be updated in the cell state, while the reset gate determines the information that needs to be forgotten in the cell state by the previous output and the current input value. This information is controlled by the sigmoid function. The output gate is used to select the information to be output in the cell state. This information is updated according to the following equation. The improvement of GRU is that the network has an additional memory unit on the original basis. This memory unit can remember and store past information. And the output result of the memory module at time t in the GRU model is jointly determined by the output gate and the cell state.

[0078] z t =σ(W z ·[h t-1 ,x t ])

[0079] r t =σ(W f ·[h t-1 ,x t ])

[0080]

[0081] In the formula, x t is the input vector; h t is the output vector; i represents the input gate; o represents the output gate; f represents the forget gate; C t Indicates the current state; C t-1 Indicates the memory information status of the previous moment; h t-1 represents the output of the hidden layer unit at the previous moment; h t represents the output of the hidden layer unit; σ represents the singmoid activation function; tanh represents the tangent function; W represents the weight matrix; b represents the bias vector.

[0082] S5: To predict the value of the t+1th data point based on the previous t data points at the current moment, just feed the most recent t data points into the model.

[0083] S6: Make charging and discharging decision based on the value predicted by the model for the next time period.

[0084] S61: Read the electricity price time table for this month to determine which time period in a day is the peak time period, peak time period, normal time period, and valley time period, where the electricity prices are from high to low as peak time period, peak time period, normal time period, and valley time period, and the discharge benefits are from high to low as peak time period, peak time period, normal time period, and valley time period.

[0085] According to the time period division set in the document of Zhejiang Provincial Development and Reform Commission in 2023, the peak period accounts for 4 hours, the peak period accounts for 8 hours, and the off-peak period accounts for 12 hours in a day. In order to maximize the benefits, and considering that the energy storage capacity is generally not enough to support high-power discharge for more than 12 hours, the discharge period is set during the peak period and the peak period, and the charging period is set during the normal period and the off-peak period.

[0086] First, assume that the power at the current moment is W1, and the average power from the first non-valley period of the day to the present moment is W2 (the reason for this selection is that the electricity consumption during the valley period is obviously lower. If the average power of the day is calculated from the first valley period of the day, it will easily trigger the discharge rules of the energy storage system, thereby requiring a larger energy storage system capacity), and obtain the pre-set maximum demand power value W3 and the maximum charging and discharging power W4 of the energy storage system.

[0087] First, determine whether demand control is performed at any time; the demand control means ensuring that the average power within 15 minutes does not exceed the maximum demand power value W3 set in advance. If it exceeds, discharge from the energy storage system so that the power obtained from the power grid does not exceed the maximum demand power value W3;

[0088] If not: then the charge and discharge decision follows the following rules:

[0089] Rule 1: When W1 is greater than W2 or W1 is greater than W3, the energy storage system discharges, and the discharge power is Min(Max(W1-W2,W1-W3),W4).

[0090] Rule 2: When W1 is less than W2 or W1 is less than W3, the energy storage system is charged, and the charging power is Min(Max(W2-W1,W3-W1),W4).

[0091] Rule 3: If the value predicted by the PSO-GRU power prediction model determines that demand control is required at the next moment and that demand control is not required at the current moment, and the remaining power of the energy storage system is insufficient to support demand control at the next moment, then charging is performed at the power of W3-W1 at the current moment.

[0092] Until the power demand of demand control at the next moment is met.

[0093] If: When the current period is a normal period or a low period, the charging and discharging decision follows Rule 2;

[0094] When the current period is a peak period, the charging and discharging decision follows rule 1;

[0095] No charging is performed during peak and peak periods, and no discharging is performed during valley and normal periods.

[0096] This decision fully considers the actual needs of industrial and commercial energy storage, and helps users of energy storage systems reduce their electricity costs from two perspectives: electricity charges and basic charges. (Electricity charges refer to charges calculated based on electricity consumption, while basic charges are basic electricity charges charged by the power supply bureau to users, which are usually related to the user's transformer capacity or maximum demand. It reflects the user's stable occupancy and instantaneous demand for grid resources.) At the same time, it smoothes the electricity consumption curve with a finer granularity, and simultaneously helps the grid to smooth the electricity consumption curve, which can reduce the grid's investment in grid redundancy and achieve more optimized resource allocation.

[0097] The present invention uses the root mean square error (RMSE) and the correlation coefficient (R 2 ) to evaluate the model.

[0098] The performance evaluation indicators are root mean square error (RMSE) and correlation coefficient (R 2 ) are used to measure the performance of the algorithm. They are two important indicators for evaluating the model. Among them, RMSE is the average size of the measurement error, which is the square root of the average of the squared difference between the calculated value and the true value. The order of magnitude is more intuitive; the smaller the result of the indicator, the better the model calculation effect. The calculation formula is as follows:

[0099]

[0100] Among them, M is the number of calculations, y is the true value, Calculate values ​​for the model

[0101]

[0102] Correlation coefficient R 2 The value range is from -1 to +1. The closer the value is to +1, the stronger the linear relationship between the two data sets. The closer the value is to -1, the stronger the linear relationship between the two data sets. The closer the value is to 0, the weaker the relationship between the two data sets.

[0103] This experiment uses the optimal parameters of the above process to establish the PSO-GRU model, and the recognition results of the GRU model are as follows: Figure 3 As shown in the figure, it can be seen that PSO-GRU has better calculation effect and higher curve fitting degree. The specific calculation evaluation indicators and the result data are shown in the following table.

[0104]

[0105] The training set 1 is a data set made of data from the past three days, while the training set 2 is a data set made of data from the past week. As can be seen from the table above, the corresponding time series power data for several days after the training set is collected is used as the test set. The model training optimization effect of the model trained with the training set 2 based on PSO-GRU is better, and the model calculation results are more accurate. 2 The score was improved by 11.2% compared with the GRU model using training set 1, and the optimization effect was quite obvious, indicating that the effect of this invention met expectations.

Claims

1. A charging and discharging decision method for industrial and commercial energy storage systems based on a GRU optimization model, characterized in that: The following steps are involved: S1: During the daily low electricity consumption period, the energy storage meter of the industrial and commercial energy storage system is used to obtain the data point e of the industrial and commercial energy storage system time series power data for the past week. i ,i=e1,e2,e3,…,e 7t ; The time series power data is sampled according to a fixed sampling period, and t data points are collected every day; S2: Data point preprocessing: The first 7t-1 data points in the time series power data are grouped into 6t groups using the rolling window method: {e1,e2,e3,…,e t },{e2,e2,e3,…,e t+1 },{e3,e4,e5,…,e t+2 },…,{e 6t ,e 6t+1 ,e 6t+2 ,…,e 7t-1 } The labels corresponding to the 6t groups are: e t+1 ,e t+2 ,e t+3 ,…,e 7t ; S3: Use the particle optimization algorithm PSO to optimize the parameters of the GRU model to obtain the hyperparameter values; The hyperparameter values ​​are specifically: the number of neurons, random dropout rate, and batch size of the first layer of the GRU neural network are optimized; S4: Substitute the hyperparameter values ​​into the GRU network to build a PSO-GRU power prediction model; input the 6t groups in S2 into the PSO-GRU power prediction model respectively, and use the labels corresponding to the 6t groups to perform supervised training on the PSO-GRU power prediction model; obtain the trained PSO-GRU power prediction model; S5: Get t data points before the current moment, input them into the trained PSO-GRU power prediction model, and obtain the power prediction value at the next moment; S6: Make a charging and discharging decision at the next moment according to the power prediction value at the next moment; Get the current electricity price time table, and determine the peak time, peak time, normal time, and valley time from high to low electricity prices. Get the current power W1 and the average power W2 from 0:00 to the current time; Obtain the maximum demand power W3 and the maximum charging and discharging power W4 of the energy storage system set in advance; Determine whether demand control is performed at all times; If not: then the charge and discharge decision follows the following rules: Rule 1: When W1 is greater than W2 or W1 is greater than W3, the energy storage system discharges, and the discharge power is Min(Max(W1-W2,W1-W3),W4); Rule 2: When W1 is less than W2 or W1 is less than W3, the energy storage system is charged, and the charging power is Min(Max(W2-W1,W3-W1),W4); Rule 3: When the remaining power of the energy storage system is insufficient to support demand control at the next moment and demand control is not required at the current moment, if there is any charging behavior, stop the original charging behavior, and determine whether demand control is required at the next moment based on the value predicted by the PSO-GRU power prediction model. If it is determined that charging at the current moment can meet the discharge demand at the next moment, charge at the power of W3-W1 at the current moment until the power demand of demand control at the next moment is met; If: When the current period is a normal period or a low period, the charging and discharging decision follows Rule 2; When the current period is the peak period, the charging and discharging decision follows Rule 1.

2. A charging and discharging decision method for an industrial and commercial energy storage system based on a GRU optimization model as claimed in claim 1, characterized in that: In S3, the number of neurons in the first layer of the GRU neural network is set between 256 and 300, the random dropout rate is set between 0.03 and 0.19, and the batch size is set between 64 and 128.

3. A charging and discharging decision method for an industrial and commercial energy storage system based on a GRU optimization model as claimed in claim 1, characterized in that: In S1, the fixed sampling period of the time series power data is no more than 1 minute.

4. The charging and discharging decision method for industrial and commercial energy storage systems based on the GRU optimization model according to claim 1, characterized in that: The preprocessing described in S2 also includes correcting outliers in the data points: Combine the historical power data of the energy storage meter at the same time on the same day last week to correct the abnormal extreme values; correct the data during the energy storage system alarm period.

5. The charging and discharging decision method for industrial and commercial energy storage systems based on the GRU optimization model according to claim 1, characterized in that: The preprocessing described in S2 also includes normalization processing.

6. A charging and discharging decision method for an industrial and commercial energy storage system based on a GRU optimization model as claimed in claim 5, characterized in that: The normalization process specifically includes using a min-max normalization method: Where, X * is the normalized data; x max and x min are the minimum and maximum values ​​of the data set, respectively, and x is the original sample data; using the above formula, the data point e of the time series power data is i Normalize.

Citation Information

Patent Citations

  • A method for formulating cloud energy storage charging and discharging strategies based on GRU multi-step prediction technology

    CN112217195B

  • Power dynamic management method, device, equipment and medium

    CN118508444B

  • Intelligent charging and discharging management method for energy storage equipment

    CN118971272A

  • Energy storage charging and discharging control method, device, storage medium and equipment

    CN119010145B

  • Cloud energy storage charging and discharging strategy forming method based on GRU multi-step prediction technology

    CN112217195A