Energy storage frequency modulation market participation method, system, equipment and medium
By introducing a multi-head attention mechanism and an improved snow ablation algorithm, combined with the hippo optimization algorithm, a comprehensive prediction model and clustering algorithm for frequency modulation clearing prices and electricity prices are generated, which solves the uncertainty of prediction and clustering in the frequency modulation market and improves the problem of improvement of prediction and clustering. The market participation efficiency and accuracy of energy storage are achieved.
Patent Information
- Application Number
- CN202411031301.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-22
AI Technical Summary
The existing technology is difficult to effectively predict the change pattern of frequency modulation clearance prices and electricity prices, and the traditional K-mean algorithm has problems when clustering, is sensitive to the initial clustering center, is prone to falling into local optimality, and is difficult to capture the relationship between uncertain information. , resulting in uncertainty in the yield and winning rate of energy storage in the frequency modulation market.
A multi-head attention mechanism and an improved snow ablation algorithm are introduced to generate a comprehensive prediction model of frequency modulation clearance price and electricity price, and clustered it with the hippo optimization algorithm to establish a dual-objective optimization model to achieve participation in the energy storage frequency modulation market.
Through more accurate prediction and clustering, the yield and winning rate of energy storage in the frequency modulation market is improved, local optimal solutions are avoided, the stability and feature recognition capabilities of the algorithm are improved, and complex optimization problems can be better handled and large-scale data.
Smart Images

Figure CN119010072A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of energy storage business models, and in particular to a method, system, device and medium for participating in an energy storage frequency regulation market. Background Art
[0002] With the continuous development of the world's industrial level, human demand for energy is increasing. The combustion of large amounts of fossil energy has led to excessive emissions of greenhouse gases, which in turn has led to serious global climate problems. Against this background, distributed power sources with advantages such as low investment, high flexibility, and environmental friendliness have been widely used and promoted to reduce greenhouse gas emissions and reduce dependence on fossil fuel energy, playing a key role in solving environmental problems. However, the randomness and volatility of renewable energy output have brought great challenges to the stability of power grid frequency.
[0003] To address these challenges, energy storage, with its rapid power regulation and flexible energy management capabilities, has become a key technology for addressing the challenges of renewable energy grid integration. As energy storage technology scales up and its costs decrease, it is gradually transforming into a highly efficient frequency regulation resource for automatic generation control in power systems. However, the uncertainty of frequency regulation market clearing prices, electricity prices, and frequency regulation signals can significantly impact the profitability and bid-winning rate of energy storage. Therefore, it is necessary to predict these market clearing prices and electricity prices, and to cluster frequency regulation signals to reduce their uncertainty.
[0004] Historical data indicates that frequency regulation clearing prices and electricity prices exhibit underlying patterns of change. However, due to the sheer volume of data, manual feature identification and extraction is inefficient, labor-intensive, and inaccurate. Therefore, neural network prediction is necessary. The traditional K-means algorithm suffers from weaknesses such as sensitivity to initial cluster centers, prone to falling into local optima, and difficulty capturing relationships between uncertain information. Therefore, improvements are necessary.
[0005] Currently, no effective solutions have been proposed for the problems in related technologies. Summary of the Invention
[0006] In response to the problems in the related art, the present invention proposes a method, system, device and medium for participating in the energy storage frequency regulation market to overcome the above-mentioned technical problems existing in the existing related art.
[0007] To this end, the specific technical solutions adopted in the present invention are as follows:
[0008] According to a first aspect of the present invention, a method for participating in an energy storage frequency regulation market is provided, the method comprising the following steps:
[0009] The multi-head attention mechanism is introduced into the bidirectional gated recurrent unit to generate a comprehensive forecast model of the frequency modulation clearing price and electricity price, and the electricity price in the future time period is predicted through the comprehensive forecast model;
[0010] A clustering algorithm is designed based on the fitness function of the Hippo optimization algorithm, and the clustering algorithm is combined with the electricity price in the future time period to cluster the energy storage frequency regulation signal scenarios;
[0011] Based on the clustered energy storage frequency regulation signal scenarios, a dual-objective optimization model and a real-time stage optimization model are established to achieve energy storage frequency regulation market participation.
[0012] Preferably, the method of introducing the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and the electricity price, and predicting the electricity price in the future time period by using the comprehensive prediction model includes the following steps:
[0013] Design an improved snow ablation algorithm and optimize the key parameters of the bidirectional gated recurrent unit based on the improved snow ablation algorithm;
[0014] Collect historical electricity price data and perform feature identification and feature extraction on the historical electricity price data based on improved symplectic geometric mode decomposition to generate a comprehensive forecast model for frequency modulation clearing price and electricity price;
[0015] The feature recognition and feature extraction results are converted into attention matrices and introduced into the comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period.
[0016] Preferably, the design of an improved snow ablation algorithm and the optimization of key parameters of the bidirectional gated cyclic unit based on the improved snow ablation algorithm include the following steps:
[0017] After initializing the good point set, the snow melting algorithm is improved by combining the periodic oscillation strategy.
[0018] In the process of improving the snow melting algorithm, the iterative initial population is randomly divided into exploration population and development population of equal size;
[0019] Based on the simulation of Brownian motion of exploration population and development population, the degree-day method is applied to calculate the snowmelt process in the development population while updating the position of the exploration population.
[0020] The key parameters of the bidirectional gated recurrent unit are optimized based on the calculation results of the snowmelt process.
[0021] Preferably, the collecting of historical electricity price data and sequentially performing feature recognition and feature extraction on the historical electricity price data based on improved symplectic geometric mode decomposition comprises the following steps:
[0022] Collect historical electricity price data, analyze the historical electricity price data to generate original time series, and reconstruct the original time series into a trajectory matrix;
[0023] Performing local tangent space alignment on the trajectory matrix to preserve the local geometric structure in the electricity price history data and generate a new trajectory matrix;
[0024] Constructing a Hamiltonian matrix to perform symplectic matrix similarity transformation to preserve the symplectic structure of the new trajectory matrix after local tangent space alignment and generate a reconstruction matrix;
[0025] The diagonal elements of the reconstruction matrix are averaged using the diagonal average transformation, and the symplectic geometric components are obtained by reconstructing the components through the similarity standard. Feature recognition and feature extraction results are generated based on the symplectic geometric components.
[0026] Preferably, the step of converting the feature recognition and feature extraction results into an attention matrix and introducing the matrix into a comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period comprises the following steps:
[0027] Construct a feature matrix based on symplectic geometry components and use the feature matrix as input to generate the query matrix, key matrix, and value matrix of the multi-head attention mechanism;
[0028] Based on the query matrix, key matrix and value matrix of the multi-head attention mechanism, the attention output of each head is calculated respectively, and the attention outputs of each head are spliced to generate the output of the multi-head attention mechanism;
[0029] The output of the multi-head attention mechanism is used as the input of the comprehensive prediction model, and the comprehensive prediction value of the frequency regulation clearing price and electricity price in the future time period is output through the comprehensive prediction model.
[0030] Preferably, the design of a clustering algorithm based on the fitness function of the Hippo optimization algorithm and clustering the energy storage frequency modulation signal scenarios by combining the clustering algorithm with the electricity price in the future time period include the following steps:
[0031] The intra-class cohesion and inter-class separation metrics of the clustering algorithm are calculated separately to verify the cohesion and separation degree of the clustering results respectively;
[0032] The intra-class cohesion measure is calculated based on the intra-class cohesion and inter-class separation measures, and the intra-class cohesion measure is normalized;
[0033] The fitness function of the Hippo optimization algorithm is constructed based on the normalized intra-class cohesion measure, and the optimal cluster center solution is generated;
[0034] A three-branch clustering algorithm is constructed based on the optimal cluster center solution, and the three-branch clustering algorithm is used to cluster the energy storage frequency regulation signal scenarios in combination with the electricity price in the future time period.
[0035] Preferably, the step of constructing a fitness function of the Hippo optimization algorithm based on the normalized intra-class cohesion measure comprises the following steps:
[0036] Randomly select several data points from the trajectory matrix as initial cluster centers, and perform iterative clustering optimization after setting the initial cluster centers;
[0037] Based on the distance between each data point and the current cluster center, the data points are reallocated to the nearest cluster center; the new cluster center is calculated and the position of the initial cluster center is gradually adjusted until the convergence state is met;
[0038] In each round of iterative optimization, the fitness value is calculated to evaluate the clustering effect, and the maximized fitness function of the Hippo optimization algorithm is generated, while optimizing the cohesion within the cluster and the separation between clusters.
[0039] Preferably, the construction of a three-branch clustering algorithm based on the optimal cluster center solution includes the following steps:
[0040] When the optimal cluster centers converge to the same position, the optimal cluster center solution is extracted, and the optimal cluster center set is generated based on the optimal cluster center solution;
[0041] Calculate whether the distance difference between each data point in the optimal cluster center set and the remaining optimal cluster centers is less than the threshold, and divide the data set based on the judgment result;
[0042] The upper approximate support set of the three-branch clustering algorithm is calculated based on the divided data set, and the upper approximate support set is divided into the core area and the edge area of the three-branch clustering algorithm.
[0043] Preferably, the dual-objective optimization model and the real-time stage optimization model are established based on the clustered energy storage frequency modulation signal scenarios to achieve energy storage frequency modulation market participation, which includes the following steps:
[0044] Establish an objective function of frequency regulation revenue and bid-winning rate, and establish a dual-objective optimization model based on frequency regulation revenue and bid-winning rate by combining frequency regulation capacity cost and frequency regulation mileage cost, and solve the dual-objective optimization model;
[0045] Establish a real-time optimization model based on deviation assessment and frequency modulation benefits, and solve the real-time optimization model;
[0046] In the dual-objective optimization model, the frequency regulation benefits and the winning bid rate are combined, and the initial state of charge of the energy storage is selected according to the clustered energy storage frequency regulation signal scenario, so as to realize the participation of energy storage in the frequency regulation market.
[0047] Preferably, the objective function of the frequency modulation benefit is expressed as:
[0048]
[0049] Where D m is the number of FM scenes; δ v is the probability of the vth scenario occurring; and are the capacity price and performance price of the t-th period of scenario v respectively; is the FM mileage of the t-th period of scenario v; K is the energy storage capacity participating in frequency regulation in the tth period of scenario v; perf is the frequency modulation performance; T is 24h.
[0050] Preferably, the objective function of the bid winning rate is expressed as:
[0051]
[0052] Where, represents the frequency regulation capacity cost of energy storage in the t-th period of scenario v;
[0053] It represents the frequency regulation mileage cost of energy storage in the tth period of scenario v.
[0054] According to a second aspect of the present invention, a system for participating in an energy storage frequency regulation market is provided, the system comprising:
[0055] The prediction model building module is used to introduce the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and electricity price, and use the comprehensive prediction model to predict the electricity price in the future time period;
[0056] The frequency modulation signal scenario clustering module is used to design a clustering algorithm based on the fitness function of the Hippo optimization algorithm, and to cluster energy storage frequency modulation signal scenarios by combining the clustering algorithm with electricity prices in future time periods;
[0057] The energy storage frequency regulation participation module is used to establish a dual-objective optimization model and a real-time stage optimization model based on the clustered energy storage frequency regulation signal scenarios, thereby realizing energy storage frequency regulation market participation.
[0058] According to a third aspect of the present invention, a computer device is provided.
[0059] Preferably, the computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0060] According to a fourth aspect of the present invention, a computer-readable storage medium is provided.
[0061] Preferably, the computer-readable storage medium stores a computer program, and the computer program implements the steps of the above method when executed by a processor.
[0062] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages:
[0063] 1. The present invention improves the snow melting algorithm and proposes a snow melting algorithm based on good point set initialization and periodic oscillation strategy. Through good point set initialization, the algorithm is more evenly distributed in the search space, which increases the diversity of the population and helps avoid falling into the local optimal solution. The periodic oscillation mutation strategy significantly improves the convergence speed of the algorithm without increasing the computational burden, enabling the algorithm to find high-quality solutions more quickly. The dual population mechanism and the overall position update equation are combined with the exploration and utilization strategy, so that the algorithm exhibits better balance when dealing with complex optimization problems. The algorithm performs particularly well in multi-peak and high-dimensional problems, demonstrating its superior search efficiency and adaptability. At the same time, the symplectic geometric mode decomposition is improved based on local tangent space alignment, making it more robust to noise, thereby improving its feature recognition and extraction capabilities. Finally, the ISAO-ISGMD-BiGRU combined prediction model is obtained, and combined with the multi-head attention mechanism to predict electricity prices, it can more accurately capture and utilize the temporal and spatial characteristics of the data, better understand the different parts of the input sequence, and provide more accurate prediction results.
[0064] 2. The present invention improves the K-means algorithm and proposes a three-branch clustering algorithm based on the Hippo optimization algorithm. The intra-class cohesion and inter-class separation metrics are used as the fitness function of the Hippo optimization algorithm. The Hippo optimization algorithm's efficient search and fast convergence capabilities are used to find the optimal clustering center, thereby improving the stability and accuracy of the K-means algorithm. At the same time, the three-branch decision method divides the clustering results into three regions, effectively capturing the uncertainty of the data and reducing the decision-making risk. The FM signal scenario is clustered by the three-branch clustering algorithm based on the Hippo optimization algorithm to obtain a typical FM signal scenario. Compared with other clustering methods, the three-branch clustering algorithm based on the Hippo optimization algorithm can find an approximate optimal solution with fewer iterations and computational costs, and has better time complexity, and can process large-scale FM historical data.
[0065] 3. The present invention establishes a dual-objective optimization model for the day-ahead market that considers frequency regulation benefits and bid-winning rates. This model simultaneously considers the frequency regulation benefits of energy storage and the charging and discharging losses and life losses of energy storage, achieving the optimal frequency regulation yield rate throughout the entire life cycle of energy storage. At the same time, an optimization model that considers deviation assessment and frequency regulation benefits in the real-time stage is established, and the initial state of charge of the energy storage is set according to the positive or negative value of the frequency modulation signal clustering results, thereby further improving the real-time frequency regulation yield rate of energy storage. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0067] Figure 1 This is a flow chart of a method for participating in an energy storage frequency regulation market according to an exemplary embodiment;
[0068] Figure 2 This is a principle block diagram of an energy storage frequency regulation market participation system according to an exemplary embodiment;
[0069] Figure 3 This is a flowchart of a three-branch K-means clustering algorithm based on the Hippo optimization algorithm in a method for participating in an energy storage frequency regulation market according to an exemplary embodiment;
[0070] Figure 4 The figure is a schematic diagram showing the structure of a computer device according to an exemplary embodiment. DETAILED DESCRIPTION
[0071] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0072] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0073] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0074] In the absence of conflict, the embodiments of the present invention and the features thereof may be combined with each other.
[0075] Figure 1 An embodiment of a method for participating in an energy storage frequency regulation market according to the present invention is shown.
[0076] In this optional embodiment, the energy storage frequency regulation market participation method includes the following steps:
[0077] Step S1: introduce the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and the electricity price, and predict the electricity price in the future time period through the comprehensive prediction model.
[0078] In this optional embodiment, the method of introducing the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and the electricity price, and predicting the electricity price in the future time period by using the comprehensive prediction model includes the following steps:
[0079] An improved snow melting algorithm is designed, and the key parameters of the bidirectional gated recurrent unit are optimized based on the improved snow melting algorithm; historical electricity price data are collected, and feature recognition and feature extraction are performed on the historical electricity price data in sequence based on the improved symplectic geometric mode decomposition to generate a comprehensive prediction model of frequency modulation clearing price and electricity price. The feature recognition and feature extraction results are converted into an attention matrix and introduced into the comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period.
[0080] In this optional embodiment, the design of an improved snow ablation algorithm and the optimization of key parameters of a bidirectional gated recurrent unit based on the improved snow ablation algorithm include the following steps:
[0081] After initializing the good point set, the snow melting algorithm is improved by combining it with a periodic oscillation strategy. During the improvement of the snow melting algorithm, the iterative initial population is randomly divided into an exploration population and an exploitation population of equal size. Brownian motion is simulated based on the exploration population and the exploitation population, and the degree-day method is applied to the exploitation population to calculate the snow melting process while updating the position of the exploration population. The key parameters of the bidirectional gated recurrent unit are optimized based on the calculation results of the snow melting process.
[0082] In this optional embodiment, improving the snow ablation algorithm based on good point set initialization and periodic oscillation strategy includes:
[0083] (1) Initialization of good point set:
[0084] s i,d =s low,d +(s up,d -s low,d )·Halton(i,p d )
[0085] Where s i,d is the position of the i-th individual in dimension d, s up,d and s low,d are the upper and lower bounds of d dimension respectively; Halton(i,p d ) is a prime number p in d dimension dThe i-th value in the Halton sequence of .
[0086]
[0087] Where a k is an integer bit. For the i-th value in the Halton sequence, its p d The hexadecimal representation is:
[0088]
[0089] Where a k is Halton(i,p d ) in p d The kth digit in the base. For example, if p1=2, p2=3, then Halton(4,p1)=100, i.e., a2=1, a1=0, a0=0.
[0090] (2) Exploration stage:
[0091] The position update in the exploration phase based on Brownian motion is calculated as follows:
[0092]
[0093] Where s i (t) is the position of the i-th individual in the t-th iteration, BM i (t) is a random number vector based on Gaussian distribution representing Brownian motion, f osc1 is a periodic oscillation function with a range of [0,1], G(t) is the current optimal solution, s elite (t) is an individual randomly selected from multiple elites in the group, is the center of mass of the entire group.
[0094]
[0095] s elite (t)∈[G(t),s second (t),s third (t),s c (t)]
[0096] Where s second (t) and s third (t) are the second best individual and the third best individual in the current population, s c (t) is the centroid position of the individuals whose fitness value ranks in the top 50%.
[0097]
[0098] Where N1 is the number of leaders, which is half of the population size, and s li (t) is the i-th optimal leader.
[0099] (3) Development stage:
[0100] The degree-day method is used to describe the development stage. The calculation process is as follows:
[0101] M=F d ×T
[0102] Where M represents the snowmelt rate, F d is the degree-day factor, and T is the average daily temperature.
[0103]
[0104] Where, t max represents the maximum number of iterations, and t represents the number of iterations.
[0105] Therefore, the snowmelt rate calculation formula can be expressed as:
[0106]
[0107] In summary, the position update formula of individuals in the development phase is as follows:
[0108]
[0109] Where, f osc2 It is a periodic oscillation function with a range of [-1,1].
[0110] (4) Dual population mechanism:
[0111] At the initial stage of iteration, the population is randomly divided into sub-populations of equal size, one of which is responsible for exploration, denoted as N a , another population is responsible for development, and the other population is recorded as N b , in the subsequent iteration process, N b The scale of N gradually decreases. a The scale increases accordingly.
[0112] To sum up, the SAO position update equation is as follows:
[0113]
[0114] In this optional embodiment, the collecting of electricity price historical data and sequentially performing feature recognition and feature extraction on the electricity price historical data based on improved symplectic geometric mode decomposition include the following steps:
[0115] Historical electricity price data is collected and analyzed to generate the original time series, which is then reconstructed into a trajectory matrix. The trajectory matrix is locally aligned in tangent space to retain the local geometric structure in the historical electricity price data and generate a new trajectory matrix. A Hamiltonian matrix is constructed to perform symplectic matrix similarity transformation to retain the symplectic structure of the new trajectory matrix after local tangent space alignment and generate a reconstructed matrix. The diagonal elements of the reconstructed matrix are averaged using a diagonal average transformation, and the symplectic geometric components are obtained by reconstructing the components using the similarity standard. Feature recognition and feature extraction results are generated based on the symplectic geometric components.
[0116] In this optional embodiment, improving the symplectic geometric mode decomposition based on local tangent space alignment includes:
[0117] (1) Reconstruction of original sequence:
[0118] The original time series u=(u1,u2,…,u n ) is reconstructed into a trajectory matrix to convert the original time series into points in a high-dimensional space and map the original problem into a high-dimensional space.
[0119]
[0120] Where U is the trajectory matrix, u is the original time series, d is the embedding dimension, τ is the delay time, and m = n-(d-1)τ.
[0121] (2) Trajectory matrix reconstruction based on local tangent space alignment:
[0122] The obtained trajectory matrix U is aligned in local tangent space to preserve the local geometric structure of the original data and generate a new trajectory matrix T.
[0123]
[0124] Where, is the nearest neighbor matrix of the trajectory matrix U, Q i is a set of orthogonal bases in the nearest neighbor matrix, L i is the transformation matrix, Y i is the global coordinate, is the nearest neighbor matrix of Y, where the new trajectory matrix is expressed as: T = [T1, T2, ..., T d ].
[0125]
[0126] Where, e and e T are unit column vectors and unit row vectors respectively, Θ i and are the orthogonal projection matrix and the generalized inverse of the orthogonal projection matrix, respectively, and I is the identity matrix.
[0127] (3) Symplectic matrix similarity transformation:
[0128] Construct Hamiltonian matrix A (where A = T T The symplectic matrix similarity transformation is performed on T) to preserve the symplectic structure of the new trajectory matrix T obtained after the local tangent space alignment, thus simplifying the problem to symplectic structure analysis.
[0129]
[0130] Construct a symplectic orthogonal matrix:
[0131]
[0132] Where N = M 2 , Q is a symplectic orthogonal matrix, R is an upper triangular matrix, and is composed of the eigenvalues of the Hamiltonian matrix A.
[0133] According to the properties of the Hamiltonian matrix A, let Z i =Q i S i Get the reconstruction matrix Z:
[0134] Z=Z1+Z2+...+Z d
[0135] (4) Diagonal average transformation:
[0136] The diagonal elements of the reconstructed matrix Z are averaged through diagonal averaging transformation to facilitate the next step of calculation.
[0137]
[0138] Where Z i Can be divided diagonally into n elements (y1,y2,…,y n ), where d * =min(d,m);m * =max(d,m).
[0139] (5) Partial Reorganization:
[0140] The similarity criterion is used to reconstruct different components with similar frequencies and high correlations, thereby obtaining symplectic geometric components. The final feature extraction result is:
[0141]
[0142] Where, SGC h is the symplectic geometric component of the hth iteration, that is, the hth intrinsic mode function of the original signal; R h is the normalized variance.
[0143] In this optional embodiment, converting the feature recognition and feature extraction results into an attention matrix and introducing it into a comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period includes the following steps:
[0144] A feature matrix is constructed based on symplectic geometry components, and the feature matrix is used as input to generate the query matrix, key matrix and value matrix of the multi-head attention mechanism; the query matrix, key matrix and value matrix of the multi-head attention mechanism are used to calculate the output of each attention head respectively, and the output of each attention head is spliced to generate the output of the multi-head attention mechanism; the output of the multi-head attention mechanism is used as the input of the comprehensive prediction model, and the comprehensive prediction model is used to output the comprehensive prediction value of the frequency modulation clearing price and electricity price in the future time period.
[0145] In this optional embodiment, the ISAO-ISMGD-based BiGRU-Multi-Head Attention prediction model is a complex prediction system that integrates multiple advanced technologies, specifically covering the following aspects:
[0146] ISAO (Improved Snow Absorption Algorithm): This is an optimization algorithm typically used to find optimal solutions. In this model, it is used to optimize the parameters of a neural network model. It is particularly effective in finding optimal or near-optimal parameter configurations when dealing with large amounts of data and complex models.
[0147] ISMGD (Symplectic Mode Decomposition): This is a technique used in signal processing that can effectively extract important features and patterns from data. In predictive models, the input data is processed through symplectic mode decomposition to better capture the intrinsic structure and dynamic changes of the data.
[0148] BiGRU (Bidirectional Gated Recurrent Unit): BiGRU is a deep learning model that is particularly suitable for processing time series data. It can capture the forward and backward dependencies of the data by using both forward and reverse gated recurrent units on time series data, which is extremely important for time-sensitive prediction tasks.
[0149] Multi-Head Attention: This is an attention mechanism that allows the model to focus on multiple different pieces of information simultaneously when processing data. Through multi-head attention, the model can analyze input data from different perspectives, improving information utilization efficiency and prediction accuracy.
[0150] In this optional embodiment, the parameters of the reset gate and update gate of BiGRU are optimized based on ISAO, and feature recognition and extraction are performed based on ISGMD. ISAO-ISGMD-BiGRU is combined with the multi-head attention mechanism to predict electricity prices.
[0151] (1) Feature extraction and reconstruction based on ISMGD and multi-head attention mechanism:
[0152] The original price series is processed to obtain the symplectic geometric component SGC h , the obtained symplectic geometric components form a characteristic matrix (component matrix) Y = [SGC1, SGC2, .., SGC N ], take the component matrix Y as input, and get the query matrix Q, key matrix K and value matrix V of the multi-head attention mechanism:
[0153]
[0154] Where W i Q 、W i K and W i V are the projection matrices of the query matrix, key matrix, and value matrix of the i-th attention head, respectively.
[0155] For each attention head, calculate its attention output:
[0156]
[0157] Where, head i represents the attention output of each attention head, softmax is the activation function, used to normalize the attention score, Time is 24h, d k is the dimension of the key matrix vector.
[0158] Concatenate the outputs of each attention head:
[0159]
[0160] Where, Indicates data concatenation; W O is the output projection matrix.
[0161] (2) The output of the multi-head attention mechanism is used as the input of BiGRU for electricity price prediction:
[0162] Let the original sequence after feature extraction and recognition be X=[x1,x2,…,x N ], input BiGRU for electricity price prediction.
[0163] The mathematical process of BiGRU is as follows:
[0164] Forward GRU:
[0165] r=σ(w r [hk-1 ,x k ]+b r )
[0166] Where r is the reset gate control vector, x k is the current input, h k-1 is the state of the previous moment; σ is the sigmoid function, w r and b r To reset the gate parameters, the ISAO algorithm proposed in the present invention is used for optimization.
[0167] h k =tanh(w h [r·h k-1 ,x k ]+b h )
[0168] Where h k is the new input of the forward GRU, b h is the bias term for the new input.
[0169] z=σ(w z [h k-1 ,x k ]+b z )
[0170] Where z is the update gate control vector, w z and b z To update the gate parameters.
[0171] h k =(1-z)·h k-1 +z·h k
[0172] Inverse GRU:
[0173]
[0174] Where, is the reset gate gating vector of the inverse GRU.
[0175] h k =tanh(w h [r·h k-1 ,x k ]+b h )
[0176] Where h k is the new input to the inverse GRU.
[0177]
[0178] Where, is the update gate control vector of the reverse GRU.
[0179]
[0180] Finally, the output of BiGRU is:
[0181]
[0182] Step S2: Design a clustering algorithm based on the fitness function of the Hippo optimization algorithm, and cluster the energy storage frequency modulation signal scenarios by combining the clustering algorithm with the electricity price in the future time period.
[0183] In this optional embodiment, the design of a clustering algorithm based on the fitness function of the Hippo optimization algorithm and clustering of energy storage frequency modulation signal scenarios using the clustering algorithm in combination with electricity prices in a future time period include the following steps:
[0184] The intra-class cohesion and inter-class separation metrics of the clustering algorithm are calculated separately to verify the cohesion and separation degrees of the clustering results respectively; the intra-class cohesion measure is calculated based on the intra-class cohesion and inter-class separation metrics, and the intra-class cohesion measure is normalized; the fitness function of the Hippo optimization algorithm is constructed based on the normalized intra-class cohesion measure, and the optimal cluster center solution is generated; based on the optimal cluster center solution, a three-branch clustering algorithm is constructed, and the three-branch clustering algorithm is used to cluster the energy storage frequency regulation signal scenarios in combination with the electricity price in the future time period.
[0185] In this optional embodiment, constructing the fitness function of the Hippo optimization algorithm based on the normalized intra-class cohesion measure includes the following steps:
[0186] Several data points are randomly selected from the trajectory matrix as the initial cluster centers, and iterative clustering optimization is performed after setting the initial cluster centers. Based on the distance between each data point and the current cluster center, the data points are reallocated to the nearest cluster center. New cluster centers are calculated and the positions of the initial cluster centers are gradually adjusted until convergence is achieved. In each round of iterative optimization, the fitness value is calculated to evaluate the clustering effect, and the maximum fitness function of the Hippo optimization algorithm is generated, while optimizing the cohesion within the cluster and the separation between clusters.
[0187] In this optional embodiment, constructing a three-branch clustering algorithm based on the optimal cluster center solution includes the following steps:
[0188] When the optimal cluster centers converge to the same position, the optimal cluster center solution is extracted, and the optimal cluster center set is generated based on the optimal cluster center solution; the distance difference between each data point in the optimal cluster center set and the remaining optimal cluster centers is calculated to see whether it is less than a threshold, and the data set is divided based on the judgment result; the upper approximate support set of the three-branch clustering algorithm is calculated based on the divided data set, and the upper approximate support set is divided into the core area and edge area of the three-branch clustering algorithm.
[0189] In this optional embodiment, the Hippo optimization algorithm fitness function based on intra-class cohesion and inter-class separation metrics includes:
[0190] (1) Intra-cluster cohesion:
[0191] Let U={x1,x2,…,x n ,…,x N} is a finite set of data to be clustered, C S ={C1,C2,…,C K} is a subset of U, and C={c1,c2,…,c K} is the set of cluster centers, for each cluster C K ∈C S (1≤k≤K), its intra-class cohesion is:
[0192]
[0193] Where, C K Intra-class cohesion; dist(x i ,c k ) represents the object x i To cluster center c k distance.
[0194] dist(x i ,c k )=|x i -c k |
[0195] In the formula, |x i -c k | represents object x i To cluster center c k The Euclidean distance.
[0196] In order to more comprehensively represent the clustering results, let the minimum cohesion value of all clusters be C S The intra-class cohesion is:
[0197]
[0198] Where C ohe,CSC S The larger the value, the better the cohesion of the entire clustering result, and the smaller the value, the worse the cohesion.
[0199] (2) Inter-class separation measure:
[0200] Let U={x1,x2,…,x n ,…,x N} is a finite set of data to be clustered, C S ={C1,C2,…,C K} is a subset of U, and C={c1,c2,…,c K} is the set of cluster centers, C S The inter-class separation metric is defined as:
[0201]
[0202] Where S ep,CS Indicates C S The inter-class separation measure, the higher the value, the higher the degree of separation of the entire clustering result; the lower the value, the lower the degree of separation; dist(c i ,c j ) is the cluster center c i and c j The distance between them.
[0203] Because C ohe,CS and S ep,CS The scales between them are different, so the intra-class cohesion measure needs to be normalized during the calculation process, which is defined as follows:
[0204]
[0205] (3) HOA fitness function:
[0206] f it,HOA,CS =C ohe,CS -S ep,CS
[0207] This process consists of four key steps: initialization, optimization, update, and multiple iterations until convergence. The hippo group is regarded as a set of cluster centers with K×D dimensions, where K is the number of clusters (set to 10 here) and D is the dimension of the data (set to 43200 here); nPop is set to 3, where nPop is the number of hippos; first, in the initial stage, 10 data points are randomly selected from the data set as the initial cluster centers, and then an optimization process is performed based on the fitness value and access level to maximize the fitness function; all parameters are updated, and convergence is achieved through two iterations (i.e., optimization process and update process). Finally, all hippos converge to the same position, i.e., the optimal cluster center Copt The solution.
[0208] In this optional embodiment, the HOA-based three-branch clustering algorithm includes:
[0209] (1) Optimal cluster center:
[0210] The optimal cluster center C obtained by HOA opt Defined as:
[0211]
[0212] The HOA-based three-branch clustering algorithm consists of two main steps: first, using overlapping clustering to obtain the upper approximate support set (support set) of the clusters; second, using perturbation analysis to divide the upper approximate support set into core regions and edge regions. Because the K-means algorithm has limitations in capturing uncertain information and cannot handle situations where an object may simultaneously belong to two or more clusters with similar proximity, a minimum distance is introduced to determine the cluster with which each object has the highest similarity.
[0213] (2) Minimum distance:
[0214] is the set of optimal cluster centers of U, where K is the number of centers, and for any x∈U, the minimum distance from object x to K centers Defined as:
[0215]
[0216] Where, is the minimum distance to object x, is the cluster center with the minimum distance to object x.
[0217] In addition, the present invention uses Euclidean distance as a distance metric. In order to determine whether the data is uncertain, the concept of relative distance set based on minimum distance is introduced; it is used to determine whether the difference between the minimum distance of object x and its distance to other optimal cluster centers is less than a threshold α. Based on this criterion, the data is divided into two groups: deterministic data and uncertain data.
[0218] (3) Relative distance set:
[0219] For any x∈U, the relative distance set of object x is defined as:
[0220]
[0221] Where, The distance between object x and the jth cluster center, α is a predetermined threshold; when the relative distance set of object x is When the relative distance set of object x is x may belong to multiple clusters, which means it is uncertain.
[0222] (4) Upper approximation support:
[0223] The upper approximate support of the k-th cluster Defined as:
[0224]
[0225] Where, is the core area of the three clusters. For the edge area.
[0226] The upper approximate support is the set of upper approximate supports of all clusters, namely:
[0227]
[0228] Based on the two classifications of similarity distance, the following rule is established to assign the object x to the upper approximate support of the corresponding cluster.
[0229]
[0230] Where, Indicates the upper approximate support of the cluster center with the smallest distance to object x.
[0231] Consider an extreme case, that is, the case where object x has the minimum distance with two or more cluster centers at the same time. In this special case, object x will exist in multiple approximate support sets at the same time. Therefore, a cluster center will be randomly selected as the minimum distance of object x.
[0232] The upper approximate support satisfies the following properties:
[0233]
[0234] The above formulas respectively indicate that the upper approximate support set of each cluster is non-empty and all objects can be effectively partitioned by the upper approximate support set.
[0235] Will The objects in can be divided into the following two types:
[0236]
[0237] If an object x belongs to type I, then x exists in only one upper approximate support, which means that x clearly belongs to one cluster. If an object x belongs to type II, then x exists in multiple upper approximate supports, which means that x may belong to multiple clusters. Following the concept of triple clustering, objects belonging to type II are assigned to the marginal area.
[0238] Regarding type I, the similarity strength between objects in the same cluster may also be different. Considering the relationship within the cluster, perturbation analysis is used and the parameter β is introduced to further classify objects belonging to type I into core areas and edge areas. The specific process is: add the upper approximate support of the kth cluster to the same object, where for The cardinality of , thus obtaining the new k-th cluster:
[0239]
[0240] Where, is the new upper approximate support of the k-th cluster.
[0241] Recalculate The center of the new cluster center
[0242]
[0243] Compare the distance between the new and old centers, recorded as like Then x in type I enters the core area of the kth cluster, otherwise it belongs to the edge area.
[0244] (5) Core area:
[0245] The core area of the k-th cluster is defined as:
[0246]
[0247] Where, For the current center; express is the new center of ; β is the given limit.
[0248] (6) Marginal area:
[0249] The edge region of the kth cluster is defined as:
[0250]
[0251] Where, It means that x belonging to the core area is removed in type I.
[0252] Step S3: Based on the clustered energy storage frequency regulation signal scenarios, a dual-objective optimization model and a real-time stage optimization model are established to achieve energy storage frequency regulation market participation.
[0253] In this optional embodiment, establishing a dual-objective optimization model and a real-time stage optimization model based on the clustered energy storage frequency modulation signal scenarios to achieve energy storage frequency modulation market participation includes the following steps:
[0254] An objective function of frequency regulation revenue and bid-winning rate is established, and a dual-objective optimization model based on frequency regulation revenue and bid-winning rate is established in combination with frequency regulation capacity cost and frequency regulation mileage cost, and the dual-objective optimization model is solved. A real-time optimization model based on deviation assessment and frequency regulation revenue is established, and the real-time optimization model is solved. Frequency regulation revenue and bid-winning rate are combined in the dual-objective optimization model, and the initial state of charge of energy storage is selected according to the clustered energy storage frequency regulation signal scenario, so as to realize energy storage frequency regulation market participation.
[0255] In this optional embodiment, a dual-objective optimization model for the day-ahead market is established that considers both frequency regulation revenue and bid-winning rate, and the NSGA-III algorithm is used to solve the model, including:
[0256] (1) Objective function:
[0257] 1) Frequency modulation income:
[0258]
[0259] Where D m is the number of FM scenes; δ v is the probability of the vth scenario occurring; and are the capacity price and performance price of the t-th period of scenario v respectively; is the FM mileage of the t-th period of scenario v; K is the energy storage capacity participating in frequency regulation in the tth period of scenario v; perf is the frequency modulation performance; T is 24h.
[0260] 2) Bid-winning rate:
[0261]
[0262] Where, represents the frequency regulation capacity cost of energy storage in the t-th period of scenario v;
[0263] It represents the frequency regulation mileage cost of energy storage in the tth period of scenario v.
[0264] The cost of frequency regulation capacity is as follows:
[0265]
[0266] Where c ba is the battery cost; E BESS is the rated capacity of energy storage; μ CRF,BE is the annual value coefficient of energy storage.
[0267]
[0268] Where, l BE is the life of energy storage, and d is the discount rate.
[0269] The FM mileage costs are as follows:
[0270]
[0271] Where, and are the energy storage charge and discharge loss cost and life attenuation cost respectively; μ is the μth frequency modulation signal instruction cycle; Γ is the number of frequency modulation signal instructions, and its value is 1800; f μ is the frequency modulation signal; σ up and σ down is a 0-1 variable, both cannot be 1 at the same time; η cha and η dis are the charging and discharging power of energy storage respectively; is the electricity price during period t; S OC,v,μ c is the state of charge of the energy storage under the μth frequency modulation signal instruction in scenario v; in is the inverter cost of energy storage; P BESS is the rated power of energy storage; k BESS The energy storage characteristic parameters obtained by fitting are usually obtained by fitting the relationship between the number of cycles and the depth of discharge based on the operating data of the energy storage; N0 is the number of cycles when the energy storage is fully charged and discharged.
[0272] (2) Constraints:
[0273] 1) Capacity constraints for energy storage participating in the frequency regulation market:
[0274]
[0275] 2) Energy storage state of charge constraints:
[0276] S oc,min ≤S oc,v,t ≤S oc,max
[0277] Where S oc,max and S oc,min are the upper and lower limits of the energy storage state of charge, respectively.
[0278] In this optional embodiment, establishing an optimization model that considers deviation assessment and frequency modulation benefits in the real-time phase, and using a CPLEX solver to solve the model includes:
[0279] (1) Objective function:
[0280]
[0281] Where, They are the frequency regulation revenue, frequency regulation mileage cost, and deviation penalty fee of energy storage in the real-time stage; and They are the capacity price and performance price of energy storage in the real-time operation stage respectively; and They are the frequency regulation capacity and frequency regulation mileage of energy storage in the real-time operation phase respectively; It is the frequency modulation signal in the real-time operation stage; is the electricity price in the real-time operation stage; c fix It is the penalty fee for unit capacity deviation.
[0282] (2) Constraints:
[0283] 1) Capacity constraints for energy storage participating in the frequency regulation market during real-time operation:
[0284]
[0285] 2) Energy storage state of charge constraints:
[0286] S oc,min ≤S oc,v,t ≤S oc,max
[0287] Figure 2 An embodiment of an energy storage frequency regulation market participation system of the present invention is shown.
[0288] In this optional embodiment, the energy storage frequency regulation market participation system includes:
[0289] Prediction model building module 1 is used to introduce the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and electricity price, and use the comprehensive prediction model to predict the electricity price in the future time period;
[0290] Frequency modulation signal scenario clustering module 2 is used to design a clustering algorithm based on the fitness function of the Hippo optimization algorithm, and cluster the energy storage frequency modulation signal scenarios by combining the clustering algorithm with the electricity price in the future time period;
[0291] The energy storage frequency regulation participation module 3 is used to establish a dual-objective optimization model and a real-time stage optimization model based on the clustered energy storage frequency regulation signal scenarios, so as to achieve energy storage frequency regulation market participation.
[0292] Figure 4 An embodiment of a computer device of the present invention is shown. The computer device may be a server, comprising a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is configured to store static and dynamic information data. The network interface of the computer device is configured to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps of the above-described method embodiment are implemented.
[0293] Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0294] In addition, the present invention also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiment when executing the computer program.
[0295] In addition, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0296] In summary, with the help of the above technical solutions of the present invention, the present invention improves the snow melting algorithm and proposes a snow melting algorithm based on good point set initialization and periodic oscillation strategy. Through good point set initialization, the algorithm is more evenly distributed in the search space, the diversity of the population is increased, and it helps to avoid falling into the local optimal solution. The periodic oscillation mutation strategy significantly improves the convergence speed of the algorithm without increasing the computational burden, so that the algorithm can find high-quality solutions faster. The dual population mechanism and the overall position update equation are combined with the exploration and utilization strategy, so that the algorithm shows better balance ability when dealing with complex optimization problems. The performance of the algorithm is particularly outstanding in multi-peak and high-dimensional problems, showing its superior search efficiency and adaptability. At the same time, the symplectic geometric mode decomposition is improved based on local tangent space alignment, so that it has better robustness to noise, thereby improving its feature recognition and extraction capabilities. Finally, the ISAO-ISGMD-BiGRU combined prediction model is obtained, and the electricity price is predicted in combination with the multi-head attention mechanism, which can more accurately capture and utilize the temporal and spatial characteristics of the data, and better understand the different parts of the input sequence, providing more accurate prediction results. The present invention improves the K-means algorithm. In this paper, a three-branch clustering algorithm based on the Hippo optimization algorithm is proposed. The intra-class cohesion and inter-class separation metrics are used as the fitness function of the Hippo optimization algorithm. The efficient search and fast convergence ability of the Hippo optimization algorithm are used to find the optimal clustering center, which improves the stability and accuracy of the K-means algorithm. At the same time, the three-branch decision method divides the clustering results into three areas, effectively capturing the uncertainty of the data and reducing the decision risk. The FM signal scene is clustered by the three-branch clustering algorithm based on the Hippo optimization algorithm to obtain a typical FM signal scene. Compared with other clustering methods, the three-branch clustering algorithm based on the Hippo optimization algorithm is It can find an approximate optimal solution with fewer iterations and computational costs, has better time complexity, and can process large-scale frequency regulation historical data. The present invention establishes a dual-objective optimization model for the day-ahead market that takes into account frequency regulation benefits and bid-winning rates. This model simultaneously considers the frequency regulation benefits of energy storage and the charging and discharging losses and life losses of energy storage, achieving the optimal frequency regulation yield rate throughout the life cycle of energy storage. At the same time, it establishes an optimization model that considers deviation assessment and frequency regulation benefits in the real-time stage, and sets the initial state of charge of the energy storage according to the positivity of the frequency modulation signal clustering results, thereby further improving the real-time frequency regulation yield rate of energy storage.
[0297] It is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for participating in the energy storage frequency regulation market, characterized in that: The energy storage frequency regulation market participation method includes the following steps: The multi-head attention mechanism is introduced into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and electricity price, and the electricity price in the future time period is predicted through the comprehensive prediction model; A clustering algorithm is designed based on the fitness function of the Hippo optimization algorithm, and the clustering algorithm is combined with the electricity price in the future time period to cluster the energy storage frequency regulation signal scenarios; Based on the clustered energy storage frequency regulation signal scenarios, a dual-objective optimization model and a real-time stage optimization model are established to achieve energy storage frequency regulation market participation.
2. A method for participating in the energy storage frequency regulation market according to claim 1, characterized in that: The method of introducing the multi-head attention mechanism into the bidirectional gated recurrent unit, generating a comprehensive prediction model of the frequency modulation clearing price and the electricity price, and predicting the electricity price in the future time period by the comprehensive prediction model includes the following steps: Design an improved snow melting algorithm and optimize the key parameters of the bidirectional gated recurrent unit based on the improved snow melting algorithm; Collect historical electricity price data, and perform feature recognition and feature extraction on the historical electricity price data in turn based on the improved symplectic geometric mode decomposition to generate a comprehensive prediction model of frequency modulation clearing price and electricity price; The feature recognition and feature extraction results are converted into attention matrices and introduced into the comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period.
3. A method for participating in the energy storage frequency regulation market according to claim 2, characterized in that: The design of the improved snow ablation algorithm and the optimization of the key parameters of the bidirectional gated cyclic unit based on the improved snow ablation algorithm include the following steps: After initializing the good point set, the snow melting algorithm is improved by combining the periodic oscillation strategy. In the process of improving the snow melting algorithm, the iterative initial population is randomly divided into exploration population and development population of equal size; Based on the simulation of Brownian motion of exploration population and development population, the degree-day method is applied in the development population to calculate the snowmelt process while updating the position of the exploration population. The key parameters of the bidirectional gated recurrent unit are optimized based on the calculation results of the snowmelt process.
4. A method for participating in the energy storage frequency regulation market according to claim 3, characterized in that: The collecting of electricity price historical data and sequentially performing feature recognition and feature extraction on the electricity price historical data based on improved symplectic geometric mode decomposition comprises the following steps: Collect historical electricity price data, analyze the historical electricity price data to generate original time series, and reconstruct the original time series into a trajectory matrix; Perform local tangent space alignment on the trajectory matrix to preserve the local geometric structure in the electricity price history data and generate a new trajectory matrix; Constructing a Hamiltonian matrix to perform symplectic matrix similarity transformation to preserve the symplectic structure of the new trajectory matrix after local tangent space alignment and generate a reconstruction matrix; The diagonal elements of the reconstruction matrix are averaged using the diagonal average transformation, and the symplectic geometric components are obtained through the similarity standard reconstruction components. The feature recognition and feature extraction results are generated based on the symplectic geometric components.
5. A method for participating in the energy storage frequency regulation market according to claim 4, characterized in that: The step of converting the feature recognition and feature extraction results into an attention matrix and introducing it into a comprehensive prediction model to output the frequency modulation clearing price and electricity price in the future time period includes the following steps: Construct a feature matrix based on symplectic geometry components, and use the feature matrix as input to generate the query matrix, key matrix, and value matrix of the multi-head attention mechanism; Based on the query matrix, key matrix and value matrix of the multi-head attention mechanism, the attention output of each head is calculated respectively, and the outputs of each attention are concatenated to generate the output of the multi-head attention mechanism; The output of the multi-head attention mechanism is used as the input of the comprehensive prediction model, and the comprehensive prediction value of the frequency modulation clearing price and electricity price in the future time period is output through the comprehensive prediction model.
6. A method for participating in the energy storage frequency regulation market according to claim 5, characterized in that: The design of a clustering algorithm based on the fitness function of the Hippo optimization algorithm and clustering of energy storage frequency modulation signal scenarios by combining the clustering algorithm with the electricity price in the future time period include the following steps: The intra-class cohesion and inter-class separation measures of the clustering algorithm are calculated to verify the cohesion and separation of the clustering results respectively; The intra-class cohesion measure is calculated based on the intra-class cohesion and inter-class separation measures, and the intra-class cohesion measure is normalized; The fitness function of the Hippo optimization algorithm is constructed based on the normalized intra-class cohesion measure, and the optimal cluster center solution is generated; A three-branch clustering algorithm is constructed based on the optimal cluster center solution, and the three-branch clustering algorithm is used to cluster the energy storage frequency regulation signal scenarios in combination with the electricity price in the future time period.
7. A method for participating in the energy storage frequency regulation market according to claim 6, characterized in that: The fitness function of the Hippo optimization algorithm based on the normalized intra-class cohesion measure is constructed, comprising the following steps: Randomly select several data points from the trajectory matrix as initial cluster centers, and perform iterative cluster optimization after setting the initial cluster centers; Based on the distance between each data point and the current cluster center, redistribute the data point to the nearest cluster center; calculate the new cluster center and gradually adjust the position of the initial cluster center until it meets the convergence state; In each round of iterative optimization, the fitness value is calculated to evaluate the clustering effect, and the maximum fitness function of the Hippo optimization algorithm is generated, while optimizing the cohesion within the cluster and the separation between clusters.
8. A method for participating in the energy storage frequency regulation market according to claim 7, characterized in that: The three-branch clustering algorithm based on the optimal cluster center solution comprises the following steps: When the optimal cluster centers converge to the same position, the optimal cluster center solution is extracted, and the optimal cluster center set is generated based on the optimal cluster center solution; Calculate whether the distance difference between each data point in the optimal cluster center set and the remaining optimal cluster centers is less than the threshold, and divide the data set based on the judgment result; The upper approximate support set of the three-branch clustering algorithm is calculated based on the divided data set, and the upper approximate support set is divided into the core area and the edge area of the three-branch clustering algorithm.
9. A method for participating in the energy storage frequency regulation market according to claim 8, characterized in that: The dual-objective optimization model and the real-time stage optimization model are respectively established based on the clustered energy storage frequency modulation signal scenario to achieve energy storage frequency modulation market participation, which includes the following steps: Establish the objective function of frequency regulation revenue and bid winning rate, and establish a dual-objective optimization model based on frequency regulation revenue and bid winning rate in combination with frequency regulation capacity cost and frequency regulation mileage cost, and solve the dual-objective optimization model; Establish a real-time optimization model based on deviation assessment and frequency modulation benefits, and solve the real-time optimization model; The frequency regulation revenue and the winning bid rate are combined in the dual-objective optimization model, and the initial state of charge of the energy storage is selected according to the clustered energy storage frequency regulation signal scenario, so as to realize the participation of energy storage in the frequency regulation market.
10. A method for participating in the energy storage frequency regulation market according to claim 9, characterized in that: The objective function of the frequency modulation benefit is expressed as: Where D m is the number of FM scenes; δ v is the probability of the vth scenario occurring; and are the capacity electricity price and performance electricity price of the t-th period of scenario v respectively; is the frequency modulation mileage of the t-th period of scenario v; K is the energy storage capacity participating in frequency regulation in the tth period of scenario v; perf is the frequency modulation performance; T is the time.
11. A method for participating in the energy storage frequency regulation market according to claim 10, characterized in that: The expression of the objective function of the bid winning rate is: In the formula, represents the frequency regulation capacity cost of energy storage in the tth period of scenario v; It represents the frequency regulation mileage cost of energy storage in the tth period of scenario v.
12. A system for participating in an energy storage frequency regulation market, used to implement the energy storage frequency regulation market participation method according to any one of claims 1 to 11, characterized in that: The energy storage frequency regulation market participation system includes: The prediction model building module is used to introduce the multi-head attention mechanism into the bidirectional gated recurrent unit to generate a comprehensive prediction model of the frequency modulation clearing price and electricity price, and predict the electricity price in the future time period through the comprehensive prediction model; The frequency modulation signal scenario clustering module is used to design a clustering algorithm based on the fitness function of the Hippo optimization algorithm, and cluster the energy storage frequency modulation signal scenarios by combining the clustering algorithm with the electricity price in the future time period; The energy storage frequency regulation participation module is used to establish a dual-objective optimization model and a real-time stage optimization model based on the clustered energy storage frequency regulation signal scenarios, so as to realize the energy storage frequency regulation market participation.
13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
