Abnormity detection method and system for compressed air energy storage system
By building an abnormality detection model based on Transformer and graph neural network, combining the flow model and logarithmic loss function, the compressed air energy storage system has solved the problem of insufficient perception ability and slow response speed in abnormal state detection, and achieved more accurate and Fast abnormality detection.
Patent Information
- Application Number
- CN202411342278.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-09-25
AI Technical Summary
The existing compressed air energy storage system has problems such as insufficient perception and slow response in abnormal state detection. The traditional monitoring method focuses on a single device, fails to fully consider system-level abnormal state, and relies on a large amount of equipment data processing and manual experience. The judgment increases the limitations of response time and recognition ability.
Using anomaly detection method based on timing running data, by constructing anomaly detection model of Transformer neural network and graph neural network, the interaction relationship and long-term dependencies between various components of the system are extracted, and the flow model and log-loss function are combined to evaluate the relevance. Construct the difference between the data and the actual data, and update the model to improve detection accuracy and response speed.
The system's sensitivity to abnormal states and detection accuracy is improved. By continuously evaluating model performance and updating parameters, the model can adapt to new data changes, improving the response speed and accuracy of detection results.
Smart Images

Figure CN118934591A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of compressed air energy storage systems, and in particular to an abnormality detection method and system for compressed air energy storage systems. Background Art
[0002] Compressed air energy storage (CAES) systems play a key role in promoting the efficient use of renewable energy and balancing grid loads. Due to their complex multi-device coupling structure and the characteristics of involving multiple energy forms, especially when operating under high temperature and high pressure conditions, once a failure occurs, it may cause serious damage to personnel safety, the environment and assets. Therefore, it is crucial to ensure the reliability and safety of the system.
[0003] At present, the operation monitoring of compressed air energy storage systems mainly relies on signals collected by sensors, such as temperature, pressure, flow and other parameters, and real-time monitoring and control through logic controllers; traditional monitoring methods focus on abnormal detection of a single device, and fail to fully consider the abnormal state of the system level. If the perception module of a single device fails, it may cause abnormal state of the system level; on the other hand, the existing abnormality detection methods rely on a large amount of equipment data processing and manual experience judgment, which not only increases the response time of the system, but also limits the ability to quickly identify and respond to potential problems. Based on this, a method and system for abnormality detection of compressed air energy storage systems are proposed. Summary of the invention
[0004] In order to solve the technical problems of insufficient abnormal state perception and slow response speed of compressed air energy storage system, the purpose of the present invention is to provide a method and system for detecting abnormality of compressed air energy storage system. The technical solutions adopted are as follows:
[0005] The first technical solution is a method for detecting abnormality of a compressed air energy storage system, the method comprising:
[0006] Obtain the operating data of each stage of the compressed air energy storage system and perform preprocessing to obtain time series operating data;
[0007] Build an anomaly detection model and use time series operation data to train the anomaly detection model;
[0008] Build an evaluation model to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model;
[0009] The updated anomaly detection model is used to output anomaly detection results.
[0010] Furthermore, the operation data of each stage of the compressed air energy storage system is obtained and preprocessed to obtain the time series operation data including:
[0011] For the running data of each stage, the mean value and standard deviation are calculated respectively;
[0012] The running data of each stage were normalized based on the mean value and standard deviation.
[0013] Furthermore, the expression for normalizing the operation data of each stage is:
[0014]
[0015] In the formula, z i represents the normalized result of the i-th data point; x i represents the i-th data point; N represents the number of data samples.
[0016] Furthermore, an anomaly detection model is constructed and trained using time series operation data, including:
[0017] Build an anomaly detection model based on transformer neural network and graph neural network.
[0018] Furthermore, the anomaly detection model based on transformer neural network and graph neural network includes:
[0019] Leverage the self-attention mechanism in the transformer architecture to extract long-term dependencies in runtime data;
[0020] Use graph neural networks to extract the interaction relationships between various components of the compressed air energy storage system;
[0021] A multi-head attention mechanism is used to extract features from runtime series data.
[0022] Furthermore, the expression for extracting long-term dependencies in runtime data using the self-attention mechanism in the transformer architecture is:
[0023]
[0024] In the formula, Q h represents the query matrix; K h represents the bond matrix; V h represents the value matrix; d k represents the dimension of the key vector; softmax represents the activation function; Q h K h T It represents the dot product between the query vector and the key vector, reflecting the similarity between the query vector and the key vector.
[0025] Furthermore, the expression of the interaction relationship between the various components of the compressed air energy storage system extracted by using the graph neural network is:
[0026]
[0027] In the formula, Represents the result of node v aggregation at layer l; A represents the set of neighbor nodes of node v; uv represents an element in the adjacency matrix; Represents the node features of neighbor node u at the l-1 layer.
[0028] Furthermore, the expression for extracting features from runtime data using the multi-head attention mechanism is:
[0029] MultiHead(Q,K,V)=Concat(head1,…,head H )W O
[0030] In the formula, MultiHead represents the output of the multi-head attention structure; head1 represents the output of the first attention head; H represents the number of attention heads; W O Represents the output projection matrix; Concat represents the concatenation operation.
[0031] Furthermore, evaluating the difference between the anomaly detection model reconstructed data and the time series running data and updating the trained anomaly detection model includes:
[0032] The flow model is combined with the logarithmic loss function to measure the difference between the reconstructed data and the actual data.
[0033] The second technical solution is a compressed air energy storage system abnormality detection system, including the compressed air energy storage system abnormality detection system described in the first technical solution, the system comprising:
[0034] A data acquisition module is configured to obtain and pre-process the operation data of the compressed air energy storage system at each stage to obtain time series operation data;
[0035] An anomaly detection model training module, configured to train an anomaly detection model using time series operation data;
[0036] an anomaly detection model evaluation module, configured to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model;
[0037] The anomaly detection module is configured to output an anomaly detection result using the updated anomaly detection model.
[0038] The present invention has the following beneficial effects:
[0039] The compressed air energy storage system anomaly detection method and system provided by the present invention train an anomaly detection model through time series operation data, extract complex features from multi-dimensional time series data, and improve the model's sensitivity to abnormal conditions; by constructing an evaluation model to detect the difference between reconstructed data and actual data, the trained anomaly detection model is updated, and the updated anomaly detection model can output anomaly detection results more accurately. By continuously evaluating the model performance and updating the model parameters, the model can continuously adapt to new data changes, thereby improving the response speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A method flow chart of a method for detecting abnormality of a compressed air energy storage system provided by one embodiment of the present invention;
[0042] Figure 2 A schematic diagram of the structure of a compressed air energy storage system abnormality detection system provided by one embodiment of the present invention;
[0043] Figure 3 A schematic flow chart of a method for detecting anomalies in a compressed air energy storage system provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method and system for detecting abnormalities in a compressed air energy storage system proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0045] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0046] The specific scheme of a method and system for detecting abnormalities in a compressed air energy storage system provided by the present invention is described in detail below in conjunction with the accompanying drawings.
[0047] See also Figure 1 , Figure 3, which shows a method flow chart of a method for detecting abnormality of a compressed air energy storage system provided by an embodiment of the present invention, the method comprising:
[0048] Step S100: Acquire the operating data of each stage of the compressed air energy storage system and perform preprocessing to obtain time series operating data; specifically, install temperature, pressure and other sensors in key parts of the compressed air energy storage system such as compressors, air storage tanks, heat exchangers, etc., and record the operating data of the compressed air energy storage system under different working conditions, including but not limited to:
[0049] Equipment status data: multi-stage compressor speed, cold oil tank height, hot oil tank height;
[0050] Temperature status data: ambient temperature, multi-stage compressor outlet temperature, gas storage temperature, cold oil tank temperature, hot oil tank temperature;
[0051] Pressure status data: ambient pressure, multi-stage compressor outlet pressure, gas storage reservoir pressure;
[0052] To ensure the quality of the above data, the preprocessing of the above data includes but is not limited to: confirming whether the data of each sensor is complete and whether there are missing values; if missing values are found, filling strategies such as forward filling, backward filling or interpolation can be selected to fill them; filtering methods can also be used to remove noise in sensor readings; statistical methods such as box plots and Z-scores can also be used to identify and process outliers;
[0053] In actual application, the corresponding operation data can be collected by setting external environmental conditions (such as temperature, humidity) and operation time. The collected operation data is divided into normal operation data and abnormal operation data. In order to simulate abnormal conditions, harmonic signals or step signals are input into the system to simulate the abnormal operation state of the system under specific conditions, and the abnormal data generated by the simulation are marked for use in model performance testing; for example, harmonic signals are used to simulate periodic fluctuations that may occur in the system, such as frequency fluctuations or vibrations; step signals are used to simulate sudden and large changes in the system, such as sudden changes in pressure or temperature;
[0054] Step S100 specifically includes:
[0055] Step S110: for each stage of operation data, the average value and standard deviation are calculated respectively; for each state data (such as equipment state, temperature state, pressure state), the average value and standard deviation are calculated respectively;
[0056] Step S120: Based on the mean value and standard deviation, the operation data of each stage is normalized. The operation data of the compressed air energy storage system consists of multiple types of data with inconsistent dimensions. Using data with inconsistent dimensions to train the model will reduce the model accuracy and convergence speed. A standardization method is defined to convert the existing data into a distribution with a mean of 0 and a variance of 1. The expression is:
[0057]
[0058] In the formula, z i represents the normalized result of the i-th data point; x i represents the i-th data point; N represents the number of data samples;
[0059] Then, the normalized data set is divided into training set, validation set and test set according to a certain ratio. For each state data, the sliding window method is used to divide the data. Starting from the first time point of the data set, the window is slid to the end of the data set in sequence, moving one time step each time to generate a new data window; for each generated window, a label is assigned to it according to the actual situation; if all the data in the window comes from normal operating data, it is marked as "normal"; if the window contains abnormal data, it is marked as "abnormal".
[0060] Step S200: construct an anomaly detection model and train the anomaly detection model using time series operation data;
[0061] Step S200 specifically includes:
[0062] Step S210: construct an anomaly detection model based on the transformer neural network and the graph neural network; specifically,
[0063] Step S210 specifically includes:
[0064] Step S211: The self-attention mechanism in the transformer architecture is used to extract the long-term dependencies in the runtime series data. The feature extraction module is constructed using the transformer. The dependency between any two points in the sequence is directly calculated through the self-attention mechanism, which can more effectively capture the long-term dependencies of the time series data. The expression is:
[0065]
[0066] In the formula, Q h represents the query matrix; K h represents the bond matrix; V h represents the value matrix; d k represents the dimension of the key vector; softmax represents the activation function; Q h Kh T Represents the dot product between the query vector and the key vector, reflecting the similarity between the query vector and the key vector; specifically, the time series running data is mapped into three different representations: query (Query, Q), key (Key, K) and value (Value, V), which can be obtained through linear transformation (fully connected layer); for the query vector Q at each position h , calculate the key vector K between it and all other positions h The dot product between them reflects the similarity between the query vector and the key vector; to avoid saturation of the softmax function due to large dot products, divide by the key vector dimension d k The square root of ; Apply the softmax function to the scaled dot product to convert it into a probability distribution, which represents the importance weight of each position, and use these weights to weighted sum the value vector to get the attention output; During the training process, the dropout technique can also be applied to prevent overfitting, that is, randomly shut down a part of the neurons to increase the generalization ability of the model;
[0067] Step S212: The interaction relationship between the various components of the compressed air energy storage system is extracted using the graph neural network. In order to further capture the complex relationship and feature dependency between nodes, the graph neural network is used to construct a graph structure learning module. The graph neural network establishes a node feature graph and a corresponding adjacency matrix, and captures the relationship and structural information between nodes by iteratively updating the node status. The information transmission between different nodes is realized by aggregating neighbor information. The expression is:
[0068]
[0069] In the formula, Represents the result of node v aggregation at layer l; A represents the set of neighbor nodes of node v; uv represents an element in the adjacency matrix; Represents the node features of neighbor node u in the l-1 layer; specifically, initialize the adjacency matrix A to represent the connection relationship between nodes. In the compressed air energy storage system, each component (such as compressor, gas tank, turbine, etc.) can be regarded as a node in the graph, and use the long short-term memory network (LSTM) to process the time series data of the compressed air energy storage system. LSTM can capture the long-term dependencies in the time series data. In addition, an attention mechanism is added to enhance the model's ability to focus on important information in the sequence. Attention weights are generated by adding a linear transformation layer to the LSTM structure, and these weights are applied to the output of the LSTM. The output of the LSTM unit is combined with the generated attention weights so that the model can more effectively identify and utilize key features. In the GNN module, during the forward propagation process, the adjacency matrix A is multiplied by the node feature h to obtain the neighbor information of each node. Then, this information is transformed through a linear layer, and an activation function is applied to process the merged features, and finally the updated node features are output. Through the graph neural network, the complex interaction relationship between the internal components of the compressed air energy storage system can be effectively captured. By combining the graph structure with the time series features, the model can better understand and characterize the behavior patterns of the system, thereby improving the accuracy of anomaly detection.
[0070] Step S213: Use a multi-head attention mechanism to extract features from the runtime time series data. The multi-head attention structure extracts complex features from multidimensional time series data. Each attention head can independently learn different features and patterns in multivariate data. The expression is:
[0071] MultiHead(Q,K,V)=Concat(head1,…,head H )W O
[0072] In the formula, MultiHead represents the output of the multi-head attention structure; head1 represents the output of the first attention head; H represents the number of attention heads; W O Denotes the output projection matrix; Concat denotes the concatenation operation; Specifically, in order to capture the information in different subspaces, the query matrix, key matrix, and value matrix are each split into different parts, namely, Q i ,K i ,V i , where i = 1, 2…H; for each split part, the attention score is calculated separately and the attention mechanism is applied, so that each head can focus on different aspects of the data; then the output results of all attention heads are spliced together to form a multidimensional vector, which is then transformed by a linear transformation (output projection matrix W O) is mapped to the desired dimension to obtain the final multi-head attention output; the features extracted by the multi-head attention mechanism are integrated into the overall anomaly detection model. These features can be used together with other types of features obtained in the previous steps to train the model to identify normal and abnormal operation modes, and the model is trained using a data set containing normal and abnormal samples, and the model performance is evaluated through test data; step S213, through the application of the multi-head attention mechanism, can extract features more comprehensively and meticulously from the operating sequence data of the compressed air energy storage system, thereby improving the effect of anomaly detection.
[0073] Step S300: construct an evaluation model to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model;
[0074] Step S300 specifically includes:
[0075] Step S310: Use the flow model in combination with the logarithmic loss function to measure the difference between the reconstructed data and the actual data; specifically, the input compressed air energy storage system operation time series data is transformed through a series of transformations through the flow model to obtain the transformed data, which is expressed as:
[0076] Y=f(X)
[0077] In the formula, X represents the running time data; Y represents the reconstructed data; f represents the reversible function;
[0078]
[0079] Where, J represents the Jacobian matrix;
[0080] p(Y)=p(X)|J| -1
[0081] Where p(Y) represents the probability density of reconstructed data; p(X) represents the probability density of running data;
[0082] After each transformation, the absolute value of the logarithm of the Jacobian determinant is calculated. This is because during the transformation process, the volume change factor, namely the Jacobian determinant, needs to be taken into account, which ensures the reversibility of the transformation and correctly adjusts the probability density during the transformation process, so that the model can accurately learn and generate data distribution;
[0083] Using the transformed data, calculate its logarithmic probability under a simple basic distribution (such as the standard normal distribution), add the logarithmic probability of the basic distribution to the sum of the absolute values of the logarithms of the Jacobian determinant to obtain the total logarithmic probability, which is expressed as:
[0084] p(X)′=exp(log(p Z (X))+|log(J(X))|)
[0085] L = -log(p(X)′)
[0086] Where p(X)′ represents the total log probability; p Z (X) represents the probability density of the runtime data under the basic distribution;
[0087] The logarithmic loss function is used to measure the difference between the reconstructed data and the actual data, and its expression is:
[0088] L = -log(p(X′))
[0089] In the formula, L represents the difference between the reconstructed data and the real data. By minimizing this loss function, the reconstructed data is made as close to the original data as possible, so that the flow model can better fit the real distribution of the data. The back propagation algorithm is used to update the model parameters.
[0090] In summary, through the logarithmic loss function, the anomaly detection model can learn the data distribution more accurately and perform better when facing data imbalance; the calculation of the Jacobian determinant ensures the reversibility of the transformation process, so that the anomaly detection model can not only learn the data distribution, but also generate new data samples; because the flow model can capture the subtle features of the data, it can better identify those abnormal situations that do not conform to the normal operating mode; the compressed air energy storage system anomaly detection method provided in this application constructs an effective and robust compressed air energy storage system anomaly detection model, which can automatically identify abnormal behaviors in the system and improve the safety and reliability of the system; the combination of Transformer and graph neural network can capture the complex interactions and dependencies within the system, thereby improving the accuracy of anomaly detection.
[0091] Step S400: Use the updated anomaly detection model to output anomaly detection results; specifically, the updated anomaly detection model outputs anomaly scores or probabilities at each time point, and the higher the score, the more likely the data at that time point is abnormal; normal data and abnormal data can be distinguished by setting thresholds, and when an anomaly is detected, a corresponding alarm mechanism should also be triggered to notify maintenance personnel or the automation system to take corresponding measures, such as stopping system operation, starting a backup system, etc.
[0092] See also Figure 2 The second technical solution is a compressed air energy storage system abnormality detection system, including the compressed air energy storage system abnormality detection system described in the first technical solution, and the system includes:
[0093] A data acquisition module is configured to obtain and pre-process the operation data of the compressed air energy storage system at each stage to obtain time series operation data;
[0094] An anomaly detection model training module, configured to train an anomaly detection model using time series operation data;
[0095] an anomaly detection model evaluation module, configured to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model;
[0096] The anomaly detection module is configured to output an anomaly detection result using the updated anomaly detection model.
[0097] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. Abnormality detection method of compressed air energy storage system, It is characterized in that The method comprises: Obtain the operating data of each stage of the compressed air energy storage system and perform preprocessing to obtain time series operating data; Build an anomaly detection model and use time series operation data to train the anomaly detection model; Build an evaluation model to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model; The updated anomaly detection model is used to output anomaly detection results.
2. The method for detecting abnormality of a compressed air energy storage system according to claim 1, It is characterized in that The operation data of each stage of the compressed air energy storage system is obtained and preprocessed to obtain the time series operation data including: For the running data of each stage, the mean value and standard deviation are calculated respectively; The running data of each stage were normalized based on the mean value and standard deviation.
3. The method for detecting abnormality of a compressed air energy storage system according to claim 2, It is characterized in that The expression for normalizing the running data of each stage is: In the formula, z i represents the normalized result of the i-th data point; x i represents the i-th data point; N represents the number of data samples.
4. The method for detecting abnormality of a compressed air energy storage system according to claim 1, It is characterized in that Building an anomaly detection model and using time series running data to train an anomaly detection model include: Build an anomaly detection model based on transformer neural network and graph neural network.
5. The method for detecting abnormality of a compressed air energy storage system according to claim 4, It is characterized in that Building anomaly detection models based on transformer neural networks and graph neural networks includes: Leverage the self-attention mechanism in the transformer architecture to extract long-term dependencies in runtime data; Use graph neural networks to extract the interaction relationships between various components of the compressed air energy storage system; A multi-head attention mechanism is used to extract features from runtime series data.
6. The method for detecting abnormality of a compressed air energy storage system according to claim 5, It is characterized in that The expression for extracting long-term dependencies in runtime data using the self-attention mechanism in the transformer architecture is: In the formula, Q h represents the query matrix; K h represents the bond matrix; V h represents the value matrix; d k represents the dimension of the key vector; softmax represents the activation function; Q h K h T It represents the dot product between the query vector and the key vector, reflecting the similarity between the query vector and the key vector.
7. The method for detecting abnormality of a compressed air energy storage system according to claim 6, It is characterized in that The expression for extracting the interaction relationship between the various components of the compressed air energy storage system using graph neural network is: In the formula, Represents the result of node v aggregation at layer l; A represents the set of neighbor nodes of node v; uv represents an element in the adjacency matrix; Represents the node features of neighbor node u at the l-1 layer.
8. The method for detecting abnormality of a compressed air energy storage system according to claim 7, It is characterized in that The expression for extracting features from runtime data using the multi-head attention mechanism is: MultiHead(Q,K,V)=Concat(head 1 ,…,head H )W o In the formula, MultiHead represents the output of the multi-head attention structure; head 1 represents the output of the first attention head; H represents the number of attention heads; W O Represents the output projection matrix; Concat represents the concatenation operation.
9. The method for detecting abnormality of a compressed air energy storage system according to any one of claims 1 to 8, It is characterized in that Evaluating the difference between the anomaly detection model reconstruction data and the time series operation data and updating the trained anomaly detection model includes: The flow model is combined with the logarithmic loss function to measure the difference between the reconstructed data and the actual data.
10. Compressed air energy storage system abnormality detection system, It is characterized in that A compressed air energy storage system abnormality detection system comprising any one of claims 1 to 9, the system comprising: A data acquisition module is configured to obtain and pre-process the operation data of the compressed air energy storage system at each stage to obtain time series operation data; An anomaly detection model training module, configured to train an anomaly detection model using time series operation data; an anomaly detection model evaluation module, configured to evaluate the difference between the anomaly detection model reconstructed data and the time series running data and update the trained anomaly detection model; The anomaly detection module is configured to output an anomaly detection result using the updated anomaly detection model.
Citation Information
Patent Citations
Anomaly detection systems and methods
CA3212533A1
Mixed model multivariate time sequence anomaly detection method based on graph neural network
CN113516226A
Machine room anomaly detection method and device based on graph structure and abnormal attention mechanism
CN115018021A
Device and method for correcting abnormal data
KR102635946B1
