Energy storage system arbitrage end-to-end method considering battery attenuation cost

Through end-to-end prediction methods and deep neural networks, combined with electricity price prediction and battery attenuation cost modeling, the charging and discharging decisions of energy storage systems are optimized, and the problem of failure to effectively consider battery attenuation costs in the existing technology is solved, and higher arbitrage returns and full life cycle returns are achieved in the energy storage system.

CN120146894APending Publication Date: 2025-06-13STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510287087.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

The existing arbitrage optimization method for energy storage systems fails to effectively consider the cost of battery attenuation, resulting in a significant attenuation of battery capacity during frequent charging and discharging of energy storage systems, affecting the overall benefits over the entire life cycle.

Method used

The end-to-end prediction method is adopted, combined with deep neural networks, an electricity price prediction model and an energy storage battery attenuation cost model are established, and the charging and discharging decisions of the energy storage system are optimized to account for the battery attenuation cost through the end-to-end closed-loop training algorithm.

Benefits of technology

By considering the cost of battery attenuation and optimizing the charging and discharging decisions of the energy storage system, the arbitrage benefits of the energy storage system are significantly improved and the overall benefits over the entire life cycle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146894A_ABST
    Figure CN120146894A_ABST
Patent Text Reader

Abstract

The invention provides an energy storage system arbitrage end-to-end method considering battery attenuation cost, and relates to the field of energy storage arbitrage optimization, and the method comprises the steps: building an electricity price prediction model based on a deep neural network, and achieving the hour-by-hour electricity price prediction in the next day; an energy storage system arbitrage optimization model is established, and the attenuation cost of the energy storage battery is modeled as a part of an objective function of the optimization model; establishing an end-to-end model fusing the electricity price prediction model and the energy storage arbitrage optimization model, wherein the energy storage arbitrage optimization model is equivalently converted into a neural network layer structure compatible with the electricity price prediction model; a two-stage training algorithm is established to determine parameters of an end-to-end model, in the first stage, the electricity price prediction model is pre-trained only by using the electricity price prediction error, and in the second stage, the electricity price prediction model is re-trained by using the decision error of energy storage arbitrage optimization. According to the method, convergence of the electricity price prediction model can be accelerated, the decision error influence can be considered, and the overall arbitrage income in the whole life cycle of the energy storage system is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy storage arbitrage optimization, and in particular to an end-to-end energy storage system arbitrage method taking into account battery degradation costs. Background Art

[0002] Energy storage systems can achieve arbitrage by charging when electricity prices are low and discharging when electricity prices are high. Electricity price forecasting is the input condition for energy storage arbitrage optimization and is a key factor affecting the level of energy storage arbitrage.

[0003] Energy storage system operation optimization includes "prediction first, then optimization" and end-to-end prediction methods. Traditional energy storage system arbitrage optimization methods mostly adopt the "prediction first, then optimization" framework, dividing electricity price prediction and arbitrage optimization into two independent processes. Under this framework, the final decision benefit is optimized by maximizing the prediction accuracy. However, the method of optimizing decision benefits by minimizing prediction errors ignores the inconsistency between prediction errors and decision errors, that is, the relationship between decision benefits and prediction accuracy is asymmetric and nonlinear, so a lower average prediction error does not necessarily produce better decision benefits. In addition, traditional energy storage system arbitrage optimization does not take into account the battery attenuation cost. The battery capacity of the energy storage system will decay significantly during frequent charging and discharging. If the attenuation cost is not taken into account, it will affect its overall benefits throughout its life cycle.

[0004] The end-to-end prediction method directly optimizes the overall goal of the task during the model learning process. In the process of combining prediction and optimization, the error between the optimal decision and the actual decision, that is, the decision error, is used as the loss function to train the model, forming a closed-loop training process. This method does not aim at the highest prediction accuracy, but the highest decision benefit. However, the existing end-to-end prediction method does not consider the battery capacity attenuation cost caused by the charging and discharging process in the problem of arbitrage optimization of energy storage systems. Due to the many factors affecting battery attenuation and the complexity of modeling, it is difficult to embed it into the end-to-end prediction method. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to consider the impact of battery attenuation costs in the arbitrage process of energy storage systems, and to fully consider the mutual influence of prediction errors and decision benefits by means of end-to-end prediction. Specifically, the present invention includes the steps of energy storage battery attenuation modeling, energy storage system arbitrage optimization problem construction and solving through end-to-end closed-loop training algorithm, so as to improve the arbitrage benefits of energy storage systems.

[0006] The present invention proposes an end-to-end method for energy storage system arbitrage considering the battery degradation cost, which closes the loop and integrates the prediction and optimization processes. When training the electricity price prediction model, the influence of the prediction result on the arbitrage optimization decision error is incorporated, and at the same time, the degradation cost of the energy storage battery is considered in the arbitrage optimization objective. It is an end-to-end method from the electricity price prediction feature quantity to the optimal decision of energy storage arbitrage.

[0007] The present invention provides an end-to-end method for energy storage system arbitrage considering the battery degradation cost, and the method includes the following steps:

[0008] Step 1: Establish an electricity price prediction model based on a deep neural network and initialize the parameters of the electricity price prediction model.

[0009] As Figure 1 shown, an electricity price prediction model is constructed based on a deep neural network (DNN), and the specific structure is the input layer - hidden layer - hidden layer - output layer. Among them, the activation function of the neuron adopts the ReLu function, and Dropout regularization is used for the hidden layer. The input layer includes: 1) the hourly electricity price of the previous day, 2) the hourly load of the previous day, 3) the load prediction value of the predicted target day, and 4) time feature indicators such as weekdays, holidays, and day of the week. The output layer is the day-ahead electricity price for each hour of the predicted target day, as Figure 1 shown. The size of both hidden layers is 400, and the dropout rate of Dropout regularization is 0.2. Initialize the neural network parameters, and randomly take values according to the normal distribution with a mean of 0 and a standard deviation of 0.01.

[0010] Step 2: Establish a model for the degradation cost of the energy storage battery, and establish an energy storage arbitrage optimization model according to the operating constraints of the energy storage system.

[0011] First, establish a model for the degradation cost of the energy storage battery. The depth of discharge of the energy storage battery is the main factor affecting its life, and the calculation formula for the depth of discharge is:

[0012]

[0013] In the formula: D t represents the depth of discharge of the energy storage battery at time t, P t represents the operating power of the energy storage battery at time t, Δt represents the charge and discharge time interval of the energy storage battery, and E B represents the capacity of the energy storage battery.

[0014] The number of charge and discharge cycles that the energy storage battery can complete within its life cycle with a depth of discharge of D t and the depth of discharge D t are approximately in the following inverse relationship:

[0015]

[0016] Where: L t represents the number of charge-discharge cycles that can withstand a depth of discharge of D t during the battery life cycle, and k 1 represents the fitting coefficient of the energy storage battery life attenuation curve. The meaning of Equation (2) is that the energy storage battery can complete L t charge-discharge cycles with a depth of discharge of D t during the life cycle.

[0017] The average battery attenuation cost per unit degree of charge and discharge of the energy storage battery at time t is:

[0018]

[0019] Where: C B is the total cost of the energy storage battery, η ch and η dis are the charging and discharging efficiencies respectively. Thus, the battery attenuation cost generated during one charge-discharge process of the energy storage system is:

[0020]

[0021] Where: γ is the battery attenuation cost coefficient.

[0022] Then, based on the energy storage battery charge-discharge attenuation cost model shown in Equation (4), an energy storage arbitrage optimization model considering battery attenuation cost is established:

[0023]

[0024] s.t. P t = P dis,t - P ch,t (5b)

[0025]

[0026] E min ≤ E t ≤ E max (5e)

[0027] E 24 = E init (5f)

[0028]

[0029] C D,t ≥ γP t 2 (5j)

[0030] Where: P dis,t and P ch,tThey are the discharge and charge powers of the energy storage system at time t respectively, which are decision variables; E t is the electricity stored in the energy storage system at time t, E min and E max are the minimum and maximum electricity of the energy storage, and are the maximum charge and maximum discharge powers respectively. Equation (5a) is the objective function, where λ T P represents the arbitrage profit obtained by the energy storage through charge and discharge within T hours, represents the battery degradation cost caused by the charge and discharge of the energy storage within T hours. Equation (5b) is the power balance constraint, equations (5c)-(5f) are the energy storage electricity constraints, equations (5g)-(5i) are the operating power constraints, and equation (5j) is the battery degradation cost constraint. Among them, equation (5i) is the relaxed form of the charge-discharge complementary constraint of the energy storage, and the constraint condition (5j) is the relaxed form of equation constraint (4). After relaxation, it does not affect the solution of the optimization problem.

[0031] Step 3: Collect historical data and perform data preprocessing to form a training data set required for training the electricity price prediction model.

[0032] The hourly electricity price of the previous day, the hourly load of the previous day, the load prediction value of the predicted target day, and the date characteristics of the target day constitute the input feature vector of the prediction model, and its historical samples are denoted as X i . The date characteristics use 0-1 variables to represent whether the predicted target day is a working day and whether it is a holiday. If the predicted target day is a working day, the working day variable is 1, otherwise it is 0; if the predicted target day is a holiday, the holiday variable is 1, otherwise it is 0. The week characteristics are represented by 1-7. The hourly electricity price of the predicted target day is the output, and its historical samples of actual values are denoted as λ i . The collected sample set is denoted as {(X 1 , λ 1 ), (X 2 , λ 2 ), …, (X N , λ N )}. Standardize the data of each feature quantity to complete the data preprocessing. The standardization formula is:

[0033]

[0034] In the formula: X, represent the original data and the standardized data respectively; μ is the average value of the original data, and σ is the standard deviation of the original data.

[0035] Step 4: Establish a loss function with the goal of minimizing the electricity price prediction error. Based on the collected historical data set for training, use the backpropagation algorithm to train the electricity price prediction model to obtain a pre-trained model for electricity price prediction.

[0036] First, construct a loss function based on the Mean Square Error (MSE):

[0037]

[0038] In the formula: λ i,t are the predicted electricity price value and the actual electricity price value at the t-th hour of the i-th group of samples respectively. T is the number of time periods on the prediction day, which is 24, and N batch is the number of samples in each batch during training.

[0039] Then, based on the training dataset and the electricity price prediction model constructed in step 1, obtain the historical prediction values. Calculate the loss function according to formula (7), perform backpropagation on the electricity price prediction model, and obtain the gradient of the loss function with respect to the parameters Θ of the electricity price prediction model According to the obtained gradient and using the Adam optimization algorithm, perform iterative updates based on gradient descent on the model parameters Θ to train the electricity price prediction model. At the same time, use the grid search method to optimize the hyperparameters, including the number of iterations, the number of samples in each batch, the learning rate, etc.

[0040] Finally, obtain the electricity price prediction model that minimizes the electricity price prediction error.

[0041] Step 5: Convert the energy storage arbitrage optimization model into a neural network layer structure compatible with the electricity price prediction model, and establish an end-to-end energy storage arbitrage model that integrates the front and back ends of the electricity price prediction model and the energy storage arbitrage optimization model.

[0042] Convert the energy storage arbitrage optimization model established in step 2 into a differentiable optimization layer and use it as a layer in the neural network. The input of this optimization layer is the predicted electricity price value output by the electricity price prediction model, and the output is the charge and discharge decision of the energy storage system for one day of the target day. Combine this optimization layer with the electricity price prediction model to construct a complete end-to-end energy storage arbitrage model, whose input is the input feature vector of the electricity price prediction model and the output is the charge and discharge decision of the energy storage for one day of the target day.

[0043] Step 6: Establish a loss function with the goal of minimizing the arbitrage decision error of the energy storage system. Based on the collected historical data, use the backpropagation algorithm to retrain the electricity price prediction model in the end-to-end energy storage arbitrage model to achieve end-to-end closed-loop training.

[0044] First, construct a loss function based on the decision error:

[0045]

[0046] In the formula: B oracle,i,t is the ideal optimal arbitrage profit at the t-th hour of the i-th group of samples, Bactual,i,t is the actual arbitrage profit at the t-th hour of the i-th group of samples.

[0047] Ideal optimal arbitrage profit B oracle,i,t and actual arbitrage profit B actual,i,t are calculated according to equations (9) and (10) respectively:

[0048] B oracle,i,t = λ i,t P oracle,i,t - C D,oracle,i,t (9)

[0049] B actual,i,t = λ i,t P actual,i,t - C D,actual,i,t (10)

[0050] Where: P oracle,i,t is the ideal optimal charge-discharge power decision of the energy storage at the t-th hour of the i-th group of samples, which is obtained by inputting the actual electricity price into the energy storage arbitrage optimization model for solution; C D,oracle,i,t is the ideal optimal energy storage attenuation cost at the t-th hour of the i-th group of samples; P actual,i,t is the actual charge-discharge power decision of the energy storage at the t-th hour of the i-th group of samples, which is obtained by inputting the predicted electricity price into the energy storage arbitrage optimization model for solution; C D,actual,i,t is the actual energy storage attenuation cost at the t-th hour of the i-th group of samples.

[0051] Then, based on the training data set and the energy storage arbitrage end-to-end model constructed in step 5, obtain the energy storage charge-discharge decision, calculate the loss function according to equation (8), perform backpropagation on the electricity price prediction model in the energy storage arbitrage end-to-end model, and obtain the gradient of the loss function with respect to the parameters Θ of the electricity price prediction model According to the obtained gradient and using the Adam optimization algorithm, perform iterative updates based on gradient descent on the model parameters Θ to train the electricity price prediction model. At the same time, use the grid search method to optimize the hyperparameters, including the number of iterations, the number of samples per batch, the learning rate, etc.

[0052] Finally, obtain the electricity price prediction model with minimized decision error.

[0053] In the step process of the present invention, steps 1, 2, and 3 are preparatory steps and are the basis for steps 4, 5, and 6. Step 2 is insurmountable for competitors. The most core part of step 2 is the modeling process (4) of battery attenuation. Steps 5 and 6 are processes added on the basis of step 4. Step 5 realizes the end-to-end fusion of the electricity price prediction model and the energy storage arbitrage optimization model by converting the energy storage arbitrage optimization model into a neural network layer; step 6 further improves the final arbitrage profit effect of the electricity price prediction model through the retraining process of the electricity price prediction model in the energy storage arbitrage end-to-end model.

[0054] The basic steps of the present invention are similar to those of the conventional end-to-end prediction method, that is:

[0055] (1) Establish a prediction model and an optimization model;

[0056] (2) Data acquisition and preprocessing;

[0057] (3) Conduct end-to-end closed-loop prediction training.

[0058] The difference between the method of the present invention and the basic end-to-end prediction method lies in:

[0059] (1) In step 2, the modeling of the energy storage battery degradation cost is added, which is not considered in the conventional end-to-end prediction of energy storage system arbitrage;

[0060] (2) Step 4 is added for the prediction process with the goal of minimizing the electricity price error, which enables the electricity price prediction model to converge quickly, is conducive to quickly improving the prediction effect of the electricity price model, and improves the arbitrage benefit.

[0061] Compared with the basic end-to-end prediction method, the advantages of the present invention are:

[0062] (1) Model the energy storage battery degradation cost and embed it as an objective function into the arbitrage optimization model, so as to optimize the overall revenue during the entire life cycle of the energy storage system considering the degradation cost.

[0063] (2) The combination of the model pre-training process with the goal of minimizing the electricity price error and the end-to-end closed-loop training process can accelerate the convergence of the electricity price prediction model, and at the same time can consider the influence of decision errors and improve the arbitrage revenue. Description of the Drawings

[0064] Figure 1 is the electricity price prediction model in the present invention;

[0065] Figure 2 is the end-to-end closed-loop training flow chart of the present invention. Detailed Embodiment

[0066] The embodiments of the present invention will be described in detail below. The present invention proposes an end-to-end method for energy storage system arbitrage considering battery degradation cost, including the following steps:

[0067] Step 1: Establish an electricity price prediction model based on a deep neural network and initialize the parameters of the electricity price prediction model.

[0068] Such as Figure 1As shown, a electricity price prediction model is constructed based on a deep neural network (DNN). The specific structure is the input layer - hidden layer - hidden layer - output layer. The activation function of the neurons adopts the ReLu function, and Dropout regularization is used for the hidden layer. The input layer includes: 1) the hourly electricity price of the previous day, 2) the hourly load of the previous day, 3) the load prediction value of the target day to be predicted, and 4) time feature indicators such as weekdays, holidays, and day of the week. The output layer is the day-ahead electricity price for each hour of the target day, as Figure 1 shown. The size of both hidden layers is 400, and the dropout rate of Dropout regularization is 0.2. Initialize the neural network parameters, randomly take values according to the normal distribution with a mean of 0 and a standard deviation of 0.01.

[0069] Step 2: Establish a storage battery degradation cost model and, based on the operating constraints of the energy storage system, establish an energy storage arbitrage optimization model.

[0070] First, establish a storage battery degradation cost model. The depth of discharge of the storage battery is the main factor affecting its life. The formula for calculating the depth of discharge is:

[0071]

[0072] In the formula: D t represents the depth of discharge of the energy storage battery at time t, P t represents the operating power of the energy storage battery at time t, Δt represents the charge and discharge time interval of the energy storage battery, and E B represents the capacity of the energy storage battery.

[0073] The number of charge and discharge cycles that the energy storage battery can complete within its life cycle with a depth of discharge of D t and the depth of discharge D t are approximately in the following inverse relationship:

[0074]

[0075] In the formula: L t represents the number of charge and discharge cycles that can withstand a depth of discharge of D t within the battery life cycle, and k 1 represents the fitting coefficient of the energy storage battery life attenuation curve. The meaning of Equation (2) is that the energy storage battery can complete L t charge and discharge cycles with a depth of discharge of D t within its life cycle.

[0076] The average battery degradation cost per unit degree of charge and discharge of the energy storage battery at time t is:

[0077]

[0078] In the formula: CB is the total cost of the energy storage battery, and η ch and η dis are the charging and discharging efficiencies respectively. Thus, the battery degradation cost generated during one charge-discharge process of the energy storage system is:

[0079]

[0080] In the formula: γ is the battery degradation cost coefficient.

[0081] Then, based on the energy storage battery charge-discharge degradation cost model shown in Equation (4), an energy storage arbitrage optimization model considering the battery degradation cost is established:

[0082]

[0083] s.t. P t = P dis,t - P ch,t (5b)

[0084]

[0085] E min ≤ E t ≤ E max (5e)

[0086] E 24 = E init (5f)

[0087]

[0088] C D,t ≥ γP t 2 (5j)

[0089] In the formula: P dis,t and P ch,t are the discharging and charging powers of the energy storage system at time t respectively, and are decision variables; E t is the electric quantity stored in the energy storage system at time t, E min and E max are the minimum and maximum electric quantities of the energy storage, and are the maximum charging and maximum discharging powers respectively. Equation (5a) is the objective function, where λ T P represents the arbitrage profit obtained by the energy storage through charge and discharge within T hours, It represents the battery degradation cost caused by charge and discharge of the energy storage within T hours. Equation (5b) is the power balance constraint, equations (5c)-(5f) are the energy storage capacity constraints, equations (5g)-(5i) are the operating power constraints, and equation (5j) is the battery degradation cost constraint. Among them, equation (5i) is the relaxation form of the charge-discharge complementarity constraint of the energy storage, and the constraint condition (5j) is the relaxation form of the equality constraint (4). After relaxation, it does not affect the solution of the optimization problem.

[0090] Step 3: Collect historical data and perform data preprocessing to form a training data set required for training the electricity price prediction model.

[0091] The hourly electricity price of the previous day, the hourly load of the previous day, the load prediction value of the predicted target day, and the date characteristics of the target day constitute the input feature vector of the prediction model, and its historical samples are denoted as X i . The date characteristics use 0-1 variables to indicate whether the predicted target day is a working day and whether it is a holiday. If the predicted target day is a working day, the working day variable is 1, otherwise it is 0; if the predicted target day is a holiday, the holiday variable is 1, otherwise it is 0. The week characteristics are represented by 1-7. The hourly electricity price of the predicted target day is the output quantity, and its historical samples of the actual value are denoted as λ i . The collected sample set is denoted as {(X 1 , λ 1 ), (X 2 , λ 2 ), …, (X N , λ N )}. Standardize the data of each feature quantity to complete the data preprocessing. The standardization formula is:

[0092]

[0093] In the formula: X, respectively represent the original data and the standardized data; μ is the average value of the original data, and σ is the standard deviation of the original data.

[0094] Step 4: Establish a loss function with the goal of minimizing the electricity price prediction error. Based on the collected historical data set for training, use the backpropagation algorithm to train the electricity price prediction model to obtain a pre-trained model for electricity price prediction.

[0095] First, construct a loss function based on the Mean Square Error (MSE):

[0096]

[0097] In the formula: λ i,tThey are the predicted electricity price and the actual electricity price at the t-th hour of the i-th group of samples respectively. T is the number of time periods on the prediction day, which is 24, and N batch is the number of samples in each batch during training.

[0098] Then, based on the training dataset and the electricity price prediction model constructed in Step 1, historical predicted values are obtained. The loss function is calculated according to Equation (7), and backpropagation is performed on the electricity price prediction model to obtain the gradient of the loss function with respect to the parameters Θ of the electricity price prediction model. Based on the obtained gradient and using the Adam optimization algorithm, iterative updates based on gradient descent are performed on the model parameters Θ to train the electricity price prediction model. Meanwhile, the hyperparameters, including the number of iterations, the number of samples in each batch, the learning rate, etc., are optimized using the grid search method.

[0099] Finally, an electricity price prediction model with minimized electricity price prediction error is obtained.

[0100] Step 5: Convert the energy storage arbitrage optimization model into a neural network layer structure compatible with the electricity price prediction model, and establish an end-to-end energy storage arbitrage model with front-end and back-end fusion of the electricity price prediction model and the energy storage arbitrage optimization model.

[0101] Convert the energy storage arbitrage optimization model established in Step 2 into a differentiable optimization layer and use it as a layer in the neural network. The input of this optimization layer is the predicted electricity price output by the electricity price prediction model, and the output is the charge and discharge decision of the energy storage system for one day of the target day. Combine this optimization layer with the electricity price prediction model to construct a complete end-to-end energy storage arbitrage model, whose input is the input feature vector of the electricity price prediction model and the output is the charge and discharge decision of the energy storage for one day of the target day.

[0102] Step 6: Establish a loss function with the goal of minimizing the arbitrage decision error of the energy storage system. Based on the collected historical data, use the backpropagation algorithm to retrain the electricity price prediction model in the end-to-end energy storage arbitrage model to achieve end-to-end closed-loop training.

[0103] First, construct a loss function based on the decision error:

[0104]

[0105] In the formula: B oracle,i,t is the ideal optimal arbitrage profit at the t-th hour of the i-th group of samples, and B actual,i,t is the actual arbitrage profit at the t-th hour of the i-th group of samples.

[0106] The ideal optimal arbitrage profit B oracle,i,t and the actual arbitrage profit B actual,i,t are calculated according to Equations (9) and (10) respectively:

[0107] B oracle,i,t =λi,t P oracle,i,t -C D,oracle,i,t (9)

[0108] B actual,i,t = λ i,t P actual,i,t -C D,actual,i,t (10)

[0109] Where: P oracle,i,t is the optimal charging and discharging power decision of the energy storage at the t-th hour of the i-th group of samples, which is obtained by inputting the actual electricity price into the energy storage arbitrage optimization model and solving; C D,oracle,i,t is the ideal optimal energy storage attenuation cost at the t-th hour of the i-th group of samples; P actual,i,t is the actual charging and discharging power decision of the energy storage at the t-th hour of the i-th group of samples, which is obtained by inputting the predicted electricity price into the energy storage arbitrage optimization model and solving; C D,actual,i,t is the actual energy storage attenuation cost at the t-th hour of the i-th group of samples.

[0110] Then, based on the training data set and the energy storage arbitrage end-to-end model constructed in step 5, obtain the energy storage charging and discharging decision. According to formula (8), calculate the loss function, and perform backpropagation on the electricity price prediction model in the energy storage arbitrage end-to-end model to obtain the gradient of the loss function with respect to the parameters Θ of the electricity price prediction model According to the obtained gradient and using the Adam optimization algorithm, perform iterative updates based on gradient descent on the model parameters Θ to train the electricity price prediction model. At the same time, use the grid search method to optimize the hyperparameters, including the number of iterations, the number of samples per batch, the learning rate, etc.

[0111] Finally, obtain the electricity price prediction model with the minimized decision error.

[0112] The data of the embodiment comes from the Pennsylvania-New Jersey-Maryland (PJM) power market, including 6 years of hourly nodal electricity price and load prediction data. The first 66.7% is used as training data, and the last 33.3% is used as test data. During the test, based on the test data set and the trained energy storage arbitrage end-to-end model, obtain the electricity price prediction value and the energy storage charging and discharging decision. Use the decision error and the daily average arbitrage profit to measure the energy storage arbitrage effect. The decision error is obtained from formula (8), and the daily average arbitrage profit is obtained from formula (10). The smaller the decision error and the larger the daily average arbitrage profit, the better the energy storage arbitrage effect.

[0113] Table 1 Hyperparameters of the pre-training process with the goal of minimizing the electricity price error

[0114] Hyperparameter Value Number of iterations 300 Batch size 128 Learning rate 5e-4 Hidden layer size 400 Number of hidden layers 2 Dropout rate 0.2 Optimizer Adam

[0115] Table 2 Energy storage system parameters

[0116] Parameter Value Battery capacity (kWh) 1000 Minimum stored electricity (kWh) 100 Maximum stored electricity (kWh) 950 Initial electricity (kWh) 500 Maximum charge / discharge power (kW) 500 Charge / discharge efficiency 0.95 Time interval (h) 1 Total battery cost ($) 139,000 Battery degradation cost coefficient 12.83

[0117] Table 3 Parameters of the end-to-end closed-loop training process

[0118] Parameter Value Number of iterations 150 Batch size 1 Learning rate 1e-5 Optimizer Adam

[0119] The end-to-end model for optimizing energy storage arbitrage is constructed using the technical solution proposed in the present invention, and is compared with the energy storage arbitrage optimization technical solution based on "prediction first and then optimization" and the end-to-end model for optimizing energy storage arbitrage without considering the energy storage battery degradation cost. The relevant parameter settings include three parts: 1) the hyperparameters of the electricity price model training process for minimizing the prediction error (see Table 1), 2) the operating parameters of the energy storage system (see Table 2), and 3) the hyperparameters of the end-to-end closed-loop training for minimizing the decision error (see Table 3).

[0120] Table 4 shows the comparison of the end-to-end model for optimizing energy storage arbitrage (End-to-end Method with Battery Degradation Costs, EMBDC) proposed based on the solution of the present invention, the electricity price prediction model (Pure Prediction, PP) trained by the energy storage arbitrage optimization technical solution based on "prediction first and then optimization", and the end-to-end model for optimizing energy storage arbitrage (End-to-end Method, EM) without considering the energy storage battery degradation cost on the 2017 test dataset. The training of the PP model only includes the training process of the electricity price prediction model with the goal of minimizing the electricity price error using the hyperparameters in Table 1. The training of the EM model includes both the pre-training of the electricity price prediction model and the end-to-end closed-loop training process, but the battery degradation cost coefficient is set to 0, that is, the training is carried out without considering the energy storage battery degradation cost; the training of the EMBDC model includes both the pre-training of the electricity price prediction model and the end-to-end closed-loop training process, but the battery degradation cost coefficient is set to 12.83, that is, the end-to-end method for optimizing energy storage arbitrage considering the battery degradation cost proposed in the present invention.

[0121] Based on the annual test results, the daily average revenue of energy storage arbitrage obtained by the energy storage arbitrage optimization technical solution based on the "predict first and then optimize" is 8.4346 $ / day. The daily average revenue of energy storage arbitrage obtained by the energy storage arbitrage optimization technical solution without considering the energy storage battery degradation cost is 3.0077 $ / day. While the daily average revenue of energy storage arbitrage of the end-to-end model for energy storage arbitrage optimization proposed based on the solution of the present invention is 8.5384 $ / day. Compared with the PP model, the gap between the actual and the ideal optimal benefits obtained by the end-to-end model trained by the solution of the present invention is reduced by approximately 0.1 $ / day, that is, the benefit improvement ratio increases by 1.23%, and the annual revenue is increased by 36.5 $. Compared with the EM model, the gap between the actual and the ideal optimal benefits obtained by the end-to-end model trained by the solution of the present invention is reduced by approximately 5.53 $ / day, that is, the benefit improvement ratio increases by 183.88%, and the annual revenue is increased by 2018.45 $. Since the EM model does not consider the energy storage battery degradation cost when making charge and discharge decisions, the battery degradation cost generated by the decisions made is relatively large, reducing the profit of arbitrage. Therefore, the EMBDC model of the solution of the present invention has a more obvious improvement effect compared with the EM model.

[0122] From the monthly test results in 2017, the EMBDC model is superior to both the PP model and the EM model.

[0123] Table 4 Comparison of test results of energy storage arbitrage models under different solutions

[0124]

[0125] In summary, it can be seen that the end-to-end closed-loop training method proposed by the present invention can effectively improve the energy storage arbitrage revenue while taking into account the energy storage battery degradation cost.

[0126] The above is only one embodiment of the present invention. Equivalent changes and substitutions made according to the embodiments of the present invention are all within the protection scope of the present invention.

Claims

1. An end-to-end method for energy storage system arbitrage taking into account battery degradation costs, characterized in that: The steps include: The electricity price prediction model pre-training module is used to train the electricity price prediction model through back propagation with the goal of minimizing the electricity price prediction error; An energy storage arbitrage end-to-end training module is adopted. On the basis of the electricity price prediction pre-training model obtained by executing the electricity price prediction model pre-training module, an energy storage arbitrage optimization model is added to form an energy storage arbitrage end-to-end model. With the goal of minimizing the arbitrage decision error of the energy storage system, the electricity price prediction model in the end-to-end model is retrained through back propagation.

2. The end-to-end method for energy storage system arbitrage taking into account battery degradation cost according to claim 1, characterized in that: Establish an electricity price prediction model based on a deep neural network and initialize the electricity price prediction model parameters: An electricity price prediction model is constructed based on a deep neural network. The specific structure of the electricity price prediction model is input layer-hidden layer-hidden layer-output layer, in which the activation function of the neuron adopts the ReLu function, and the hidden layer uses Dropout regularization. The input layer contains: 1) the hourly electricity price of the previous day, 2) the hourly load of the previous day, 3) the load forecast value of the predicted target day, 4) time characteristic indicators such as working days, holidays, and days of the week. The output layer is the hourly day-ahead electricity price of the predicted target day. The size of the two hidden layers is 400, and the dropout rate of Dropout regularization is 0.

2. The neural network parameters are initialized and randomly selected from a normal distribution with a mean of 0 and a standard deviation of 0.

01.

3. The end-to-end method for energy storage system arbitrage taking into account battery degradation cost according to claim 1, characterized in that: Establishing energy storage battery attenuation cost model: The calculation formula for the discharge depth of energy storage batteries is: Where: D t Indicates the discharge depth of the energy storage battery at time t, P t represents the operating power of the energy storage battery at time t, Δt represents the charging and discharging time interval of the energy storage battery, and E B Indicates the capacity of the energy storage battery; The depth of discharge that a storage battery can complete during its life cycle is D t The number of charge and discharge cycles and the depth of discharge D t The inverse relationship is approximately as follows: Where: L t Indicates that during the battery life cycle, it can withstand a discharge depth of D t The number of charge and discharge cycles, k1 represents the fitting coefficient of the energy storage battery life decay curve, and the meaning of formula (2) is that the energy storage battery can complete L t The depth of discharge is D t Charge and discharge cycles; The average battery attenuation cost of each unit of electricity charged and discharged by the energy storage battery at time t is: Where: C B is the total cost of the energy storage battery, η ch and η dis are the charging and discharging efficiencies respectively. Therefore, the battery attenuation cost generated by one charging and discharging process of the energy storage system is: Where: γ is the battery attenuation cost coefficient.

4. The end-to-end method for energy storage system arbitrage taking into account battery degradation cost according to claim 1, characterized in that: According to the operation constraints of the energy storage system, an energy storage arbitrage optimization model is established: Based on the energy storage battery charging and discharging attenuation cost model shown in formula (4), an energy storage arbitrage optimization model taking into account the battery attenuation cost is established: s.t.P t =P dis,t -P ch,t (5b) AND min ≤E t ≤E max (5e) AND 24 =And init (5f) C D,t ≥γP t 2 (5j) Where: P dis,t and P ch,t are the discharging and charging powers of the energy storage system at time t, respectively, and are decision variables; E t is the amount of electricity stored in the energy storage system at time t, E min and E max is the minimum and maximum energy storage capacity, and are the maximum charging and discharging powers respectively, and equation (5a) is the objective function, where λ T P represents the arbitrage profit obtained by energy storage through charging and discharging within T hours, represents the battery degradation cost caused by charging and discharging of energy storage within T hours, formula (5b) is the power balance constraint, formulas (5c)-(5f) are the energy storage capacity constraints, formulas (5g)-(5i) are the operating power constraints, and formula (5j) is the battery degradation cost constraint, where formula (5i) is the relaxed form of the energy storage charging and discharging complementarity constraint, and constraint (5j) is the relaxed form of equation constraint (4), which does not affect the solution of the optimization problem after relaxation.

5. The end-to-end method for energy storage system arbitrage taking into account battery degradation cost according to claim 1, characterized in that: Collect historical data and perform data preprocessing to form the training data set required for training the electricity price prediction model: The hourly electricity price of the previous day, the hourly load of the previous day, the load forecast value of the target day, and the date characteristics of the target day constitute the input feature vector of the prediction model, and its historical sample is recorded as X i , the date feature uses a 0-1 variable to indicate whether the forecast target day is a working day or a holiday. If the forecast target day is a working day, the working day variable is 1, otherwise it is 0; if the forecast target day is a holiday, the holiday variable is 1, otherwise it is 0. The week feature is represented by 1-7; the hourly electricity price of the forecast target day is the output, and the historical sample of its actual value is recorded as λ i The collected sample set is recorded as {(X1,λ1),(X2,λ2),…,(X N ,λ N )}, standardize the data of each feature quantity and complete data preprocessing. The standardization formula is: Where: X, represent the original data and the standardized data respectively; μ is the mean value of the original data, and σ is the standard deviation of the original data.

6. The end-to-end method for energy storage system arbitrage taking into account battery degradation costs according to claim 2, characterized in that: A loss function with the goal of minimizing the electricity price prediction error is established. Based on the collected historical data set for training, the electricity price prediction model is trained using the back propagation algorithm to obtain a pre-trained model for electricity price prediction: First, construct a loss function based on the mean square error MSE: Where: λ i,t are the electricity price forecast and actual electricity price of the tth hour of the i-th group of samples, T is the number of time periods on the forecast day, which is 24, and N batch is the number of samples in each batch in training; Then, based on the training data set and the electricity price prediction model constructed in step 1, the historical prediction value is obtained, the loss function is calculated according to formula (7), the electricity price prediction model is back-propagated, and the gradient of the loss function to the electricity price prediction model parameter θ is obtained. According to the obtained gradient, the Adam optimization algorithm is used to iteratively update the model parameter Θ based on gradient descent to train the electricity price prediction model. At the same time, the grid search method is used to optimize the hyperparameters, including the number of iterations, the number of samples in each batch, and the learning rate. Finally, an electricity price prediction model with minimized electricity price prediction error is obtained.

7. The end-to-end method for energy storage system arbitrage taking into account battery degradation costs according to claim 4, characterized in that: Convert the energy storage arbitrage optimization model into a neural network layer structure that is compatible with the electricity price prediction model: The energy storage arbitrage optimization model is transformed into a differentiable optimization layer and used as a layer in the neural network. The input of the optimization layer is the electricity price forecast value output by the electricity price forecast model, and the output is the charging and discharging decision of the energy storage system on the target day.

8. The end-to-end method for energy storage system arbitrage taking into account battery degradation costs according to claim 7, characterized in that: Establish an energy storage arbitrage end-to-end model that integrates the electricity price prediction model and the energy storage arbitrage optimization model: The differentiable optimization layer obtained by transforming the energy storage arbitrage optimization model is combined with the electricity price forecasting model to construct a complete energy storage arbitrage end-to-end model, whose input is the input feature vector of the electricity price forecasting model and whose output is the energy storage charging and discharging decision on the target day.

9. The end-to-end method for energy storage system arbitrage taking into account battery degradation costs according to claim 8, characterized in that: Establish a loss function with the goal of minimizing the arbitrage decision error of the energy storage system: Construct a loss function based on decision error: Where: B oracle,i,t is the ideal optimal arbitrage return of the tth hour of the i-th group of samples, B actual,i,t is the actual arbitrage profit of the tth hour of the i-th group of samples; Ideal optimal arbitrage return B oracle,i,t 、Actual arbitrage income B actual,i,t Calculate according to formula (9) and formula (10) respectively: B oracle,i,t Zλ i,t P.S oracle,i,t -C D,oracle,i,t (9) B actual,i,t Zλ i,t P.S actual,i,t -C D,actual,i,t (10) Where: P oracle,i,t is the ideal optimal charging and discharging power decision of the energy storage in the tth hour of the i-th group of samples, which is obtained by inputting the actual value of the electricity price into the energy storage arbitrage optimization model; C D,oracle,i,t is the ideal optimal energy storage decay cost of the tth hour of the i-th group of samples; P actual,i,t is the actual charging and discharging power decision of the energy storage in the tth hour of the i-th group of samples, which is obtained by inputting the electricity price forecast value into the energy storage arbitrage optimization model; C D,actual,i,t is the actual energy storage decay cost of the tth hour of the i-th group of samples.

10. The end-to-end method for energy storage system arbitrage taking into account battery degradation costs according to claim 9, characterized in that: Based on the collected historical data, the back propagation algorithm is used to retrain the electricity price prediction model in the energy storage arbitrage end-to-end model to achieve end-to-end closed-loop training: Based on the training data set and the energy storage arbitrage end-to-end model, the energy storage charging and discharging decision is obtained. The loss function is calculated according to formula (8), and the electricity price prediction model in the energy storage arbitrage end-to-end model is back-propagated to obtain the gradient of the loss function to the electricity price prediction model parameter θ According to the obtained gradient, the Adam optimization algorithm is used to iteratively update the model parameter Θ based on gradient descent to train the electricity price prediction model; at the same time, the grid search method is used to optimize the hyperparameters, including the number of iterations, the number of samples in each batch, and the learning rate; Finally, an electricity price prediction model with minimized decision error is obtained.

Citation Information

Cited By

  • Flow battery energy storage intelligent scheduling method and system

    CN122225501A