Transformer abnormal value detection method based on LSTM-AE and multivariate data
By combining the LSTM-AE model with unsupervised learning, the anomaly detection problem of complex time series data such as transformer oil temperature and load rate is solved, efficient and robust anomaly detection is achieved, the dependence on labeled data is reduced, and the detection accuracy and adaptability are improved.
Patent Information
- Application Number
- CN202511269823.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies have difficulty effectively processing complex time series data of transformer oil temperature and load rate, resulting in low anomaly detection accuracy. In addition, methods that rely on labeled data have problems of high cost and poor adaptability in practical applications.
An unsupervised learning model based on LSTM-AE is adopted. By constructing a transformer outlier detection method combining LSTM and autoencoder, the reconstruction error is used to automatically detect outliers, reducing dependence on labeled data and improving detection accuracy and robustness.
The accuracy and robustness of transformer oil temperature and load rate anomaly detection are improved, the demand for labeled data is reduced, the system is more adaptable, and it can operate stably in complex industrial environments, achieving efficient anomaly detection of oil temperature and load rate.
Smart Images

Figure CN120744799A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transformer anomaly value detection, and in particular to a transformer anomaly value detection method based on LSTM-AE and multivariate data. Background Art
[0002] With the increasing complexity and load demands of modern power systems, the reliability and safety of transformers have become increasingly critical. The proper operation of transformers is directly related to the stability of power systems, and oil temperature and load factor are key parameters affecting transformer health. Abnormalities in these two indicators can lead to transformer overload or overheating, ultimately causing equipment failure and even serious power accidents. Therefore, monitoring and detecting anomalies in oil temperature and load factor have become crucial for ensuring the safe operation of power systems. However, with advances in data acquisition technology, the volume and complexity of data generated during transformer operation are increasing, and data structures are becoming more diverse and complex. Traditional anomaly detection methods are no longer able to cope with this large-scale and complex time-series data. Most existing monitoring systems still rely on simple statistical methods and traditional data analysis tools for preliminary processing of oil temperature and load factor data. These methods often rely on preset thresholds or simple models, which struggle to accurately capture complex time-series dependencies and abnormal patterns. This leads to frequent missed or false detection of outliers, severely impacting the application value of the data.
[0003] To address these challenges, machine learning and deep learning algorithms are being gradually introduced to anomaly detection for oil temperature and load factor, combined with ambient temperature learning. Machine learning algorithms can automatically learn complex time series features and perform anomaly detection by analyzing historical data, significantly improving detection accuracy and robustness. By building a predictive model for oil temperature and load factor, the system can predict future operating conditions based on historical data and identify anomalies based on the difference between the predicted and actual values. When the prediction error is large, these data points are identified as outliers, enabling accurate anomaly detection.
[0004] At present, technical research on outlier detection has achieved certain results. The following are several major existing outlier detection methods and their technical defects: (1) Distance-based method: This method determines whether a point is an outlier by calculating the distance between it and other data points. If the distance between a point and other data points is significantly greater than the distance between normal data, the point is determined to be an outlier. K-Nearest Neighbor (KNN) is one of the most common distance-based outlier detection algorithms. However, the disadvantage of this method is that it has high requirements for parameter setting, and its time and space complexity increases significantly with the increase of data dimension, making it more expensive to apply in high-dimensional data scenarios.
[0005] (2) Clustering-based outlier detection methods: Clustering algorithms are an unsupervised learning method that is often used in outlier detection. This method groups data points with similar characteristics into the same cluster, and outliers far from the cluster center are identified as outliers. However, clustering-based methods are less effective in detecting outliers, especially when the data dimension increases, the performance of clustering algorithms will significantly decrease. In addition, clustering algorithms mainly target the overall distribution characteristics of the data, making it difficult to effectively detect anomalies in complex time series data.
[0006] (3) Learning model-based methods: Learning model-based outlier detection methods build models (such as Random Forest (RF), Support Vector Machine (SVM), etc.) and train them on the dataset to learn the intrinsic properties of the data, thereby detecting outliers. The advantage of this type of method is that it can mine deep information from the data, but its performance is highly dependent on the quality and quantity of the training data. If the training data is biased or incomplete, the detection results of the model will be seriously affected, resulting in missed or false detection of outliers. In addition, this type of method usually requires a large amount of labeled abnormal data. It is difficult to obtain comprehensive abnormal samples in practical applications, which limits the widespread application of the model. Summary of the Invention
[0007] The present invention provides a transformer anomaly value detection method based on LSTM-AE and multivariate data. The purpose is to solve the problems of existing technologies in processing complex time series data, relying on labeled data, and having low detection accuracy by constructing an unsupervised anomaly detection model combining LSTM and autoencoder. This method can achieve efficient anomaly detection of possible faults of oil temperature and load factor under ambient temperature, greatly improve the monitoring capability of the power system, and provide more reliable protection for the safe operation of the transformer.
[0008] The present invention is achieved through the following technical solutions: A transformer outlier detection method based on LSTM-AE and multivariate data includes the following steps: Sampling a number of original multivariate monitoring indicators based on time series for monitoring whether the transformer is abnormal from the normal operation data of the transformer, each of the original multivariate monitoring indicators includes a plurality of feature data; Preprocessing the original multivariate monitoring indicators to obtain a multivariate input data sequence set based on a time series; Constructing an LSTM-AE model, and performing unsupervised training on the original LSTM-AE model using the multivariate input data sequence set, so that the LSTM-AE model outputs a reconstructed data sequence corresponding to each multivariate input data sequence, wherein the reconstructed data sequence is composed of initial reconstructed data based on a time series, and then performing denormalization on the initial reconstructed data corresponding to the same sampling point to obtain final reconstructed data, and taking the sum of the errors between the final reconstructed data and the corresponding feature data as the reconstruction error of the sampling point, and completing the training of the LSTM-AE model when the reconstruction error is within the anomaly detection threshold range, thereby obtaining a transformer anomaly detection model; The multivariate input data sequence to be detected is input into the transformer anomaly detection model in real time to obtain a corresponding reconstructed data sequence, and the reconstruction error between the final reconstructed data of each sampling point in the reconstructed data sequence and the corresponding feature data is calculated to determine whether the feature data is abnormal.
[0009] As an optimization, the characteristic data include oil temperature, load rate and ambient temperature obtained according to a time series.
[0010] As an optimization, the specific process of preprocessing the original multivariate monitoring indicators to obtain a multivariate input data sequence set is as follows: Eliminating abnormal data from the original multivariate monitoring indicators, and then performing missing value filling on the original multivariate monitoring indicators from which the abnormal data have been eliminated to obtain intermediate multivariate monitoring indicators, wherein the abnormal data include original multivariate monitoring indicators whose values are not within a set first threshold range and original multivariate monitoring indicators whose oil temperature variation per unit time step exceeds 1 degree Celsius; Normalizing the intermediate multivariate monitoring indicators to obtain normalized multivariate monitoring indicators; The normalized multivariate monitoring indicator is divided according to the set sliding time window to obtain a multivariate input data sequence set based on the time series, wherein each multivariate input data sequence in the multivariate input data sequence set is a T×F two-dimensional vector, and the multivariate input data sequence includes T input data groups based on the time series, and each input data group includes F feature data, wherein T represents the number of time steps in the time window, and T and F are both positive integers.
[0011] As an optimization, the LSTM-AE model includes an LSTM encoder, a repeated vector layer, an LSTM decoder, a Timedistributed layer, and a feature fusion layer, wherein: The LSTM encoder is used to extract the most relevant feature data in the multivariate input data sequence and form a time series-based encoding feature sequence; The repeated vector layer is used to replicate the coding feature sequence to obtain T coding feature sequences; The LSTM decoder is used to decode the T encoding feature sequences respectively to obtain decoding feature sequences; The Timedistributed layer is used to perform matrix multiplication with the decoded feature sequence to obtain a T×F two-dimensional vector as a first result; The feature fusion layer is used to perform feature fusion on the first result to obtain a reconstructed data sequence consisting of T pieces of initial reconstructed data of the oil temperature.
[0012] As an optimization, the LSTM encoder includes T first LSTM units, T input data groups are respectively input into one of the first LSTM units, the first LSTM unit at the first position obtains a hidden state according to the first input data group, and the j-th first LSTM unit obtains the hidden state of the j-th first LSTM unit according to the hidden state output by the j-1-th first LSTM unit and the j-th input data group, and passes it to the j+1-th first LSTM unit, wherein, .
[0013] As an optimization, the LSTM decoder includes T second LSTM units, and the T encoding feature sequences are respectively input to one second LSTM unit. The first second LSTM unit obtains a hidden state according to the first encoding feature sequence, and the jth second LSTM unit obtains the hidden state of the jth second LSTM unit according to the hidden state output by the j-1th second LSTM unit and the jth input data group, and passes it to the j+1th second LSTM unit, wherein, .
[0014] As an optimization, the feature fusion layer is used to perform feature fusion on the first result, and obtain the specific expression of the reconstructed data about the oil temperature: ; in, represents the reconstructed oil temperature value corresponding to the i-th input data group, 、 、 are the oil temperature, load rate and ambient temperature in the i-th input data group, 、 、 are the weights of oil temperature, load rate and ambient temperature in the i-th input data group, b is the deviation term, .
[0015] As an optimization, the calculation formula of the reconstruction error is: ; in, represents the oil temperature reconstruction value corresponding to the m-th multivariate input data sequence at the n-th sampling point. represents the reconstruction error of the nth sampling point, and M represents the number of multivariate input data sequences containing the nth sampling point.
[0016] As an optimization, the specific expression of the anomaly detection threshold range is: ; ; in, represents the upper limit of the anomaly detection threshold, represents the lower limit of the anomaly detection threshold, represents the mean of the average reconstruction error, , represents the standard deviation of the mean reconstruction error, , n represents the total number of samples, that is, the error term involved in the calculation The total number of .
[0017] As an optimization, the following steps are also included: The intermediate multivariate monitoring indicators based on time series, reconstructed data series, and indicator data that are not within the anomaly detection threshold range are displayed.
[0018] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. Improved accuracy of time series data anomaly detection: This invention combines LSTM (Long Short-Term Memory) and autoencoder models to effectively process complex time series data such as oil temperature and load rate. By capturing long-term data dependencies, LSTM can identify gradual or sudden anomalies in the data, significantly improving detection accuracy and reliability, and addressing the shortcomings of existing technologies in time series anomaly detection.
[0019] 2. Reduced reliance on labeled data: Compared to existing anomaly detection methods that rely on labeled data, this approach uses an unsupervised learning model to model normal data using an autoencoder and automatically detect outliers using reconstruction errors. This solution significantly reduces the need for labeled data and improves the model's adaptability and versatility, enabling it to operate efficiently even in environments with insufficient or missing labeled data.
[0020] 3. Improved robustness: The algorithm model combining LSTM and autoencoders employed in this invention is highly robust and can operate stably in complex and changing industrial environments. By analyzing oil temperature and load factor data in real time, this invention demonstrates high stability in the face of data fluctuations and external environmental changes, ensuring detection accuracy and safety under various operating conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings: Figure 1 This is a flow chart of a transformer anomaly detection method based on LSTM-AE and multivariate data according to the present invention; Figure 2 Schematic diagram of the structure of the LSTM-AE model in the present invention; Figure 3 Schematic diagram of the structure of the encoder and repetition vector layer in the present invention; Figure 4 Schematic diagram of the structure of the decoder, TimeDistributed layer and feature fusion layer in the present invention; Figure 5 Calculation process diagram of oil temperature reconstruction error; Figure 6 This is a trend chart of the mean value of the average reconstruction error of the transformer oil temperature in a specific case; Figure 7 The oil temperature trend graph shows abnormal values in a specific case; Figure 8 This is the transformer oil temperature load rate trend chart for the specific case on June 23; Figure 9 This is the transformer oil temperature load rate trend chart for the specific case on June 26; Figure 10 The following is a trend chart of the transformer oil temperature load rate on June 27 in a specific case. DETAILED DESCRIPTION
[0022] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with examples and drawings. The exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention.
[0023] Before introducing the specific implementation scheme of the present invention, it is necessary to explain the current situation and the solution effects of the present invention as follows: (1) As the power system becomes more and more complex, the oil temperature load in the transformer has significant temporal and nonlinear characteristics with the change of ambient temperature and time. Traditional statistical methods have difficulty in capturing these characteristics and are unable to accurately identify outliers. Existing distance-based or clustering-based methods often perform poorly in high-dimensional time series data, have high time and space complexity, and have limited detection accuracy, which can easily lead to false detection or missed detection. The present invention combines a long short-term memory network (LSTM) and an autoencoder to form a transformer anomaly detection model, aiming to effectively capture the temporal dependency in oil temperature data and identify abnormal data points by calculating the reconstruction error. The transformer anomaly detection model solves the problem that the existing technology cannot effectively process complex nonlinear time series data, and improves the efficiency and accuracy of oil temperature and load anomaly detection.
[0024] (2) Most existing anomaly detection methods rely on a large amount of labeled data for supervised learning. Acquiring labeled data is costly and complex, especially in industrial scenarios. In practical applications, abnormal data is often scarce and difficult to fully cover all possible abnormal patterns. To address this problem, the present invention adopts an unsupervised learning method, models oil temperature data through an autoencoder, and automatically identifies outliers using reconstruction errors, eliminating the need for manual labeling of a large number of abnormal points. This unsupervised detection method can reduce the initial data labeling cost, adapt to more application scenarios, and improve the versatility and practicality of the model.
[0025] (3) Oil temperature data has obvious time series characteristics. Traditional methods cannot fully utilize its time series dependencies, resulting in the inability to accurately capture gradual or sudden anomalies. By introducing the LSTM network, the present invention can identify potential abnormal patterns in the dynamic changes of oil temperature data. The LSTM network can effectively handle the fluctuations of oil temperature in different time periods by learning the long-term dependencies of oil temperature data, thereby enhancing the system's ability to perceive abnormal situations. This technology can achieve real-time monitoring and early warning of oil temperature, significantly improving the timeliness and robustness of oil temperature anomaly detection.
[0026] Next, the specific solutions of the present invention are introduced.
[0027] This embodiment 1 provides a transformer anomaly detection method based on LSTM-AE and multivariate data, such as Figure 1 As shown, the goal is to efficiently and accurately detect anomalies in transformer oil temperature and load based on the correlation between oil temperature and load ratio under ambient temperature. The entire technical solution consists of four main steps: data acquisition, data preprocessing, model training, and model application.
[0028] 1. Data collection: S1. Sampling a number of original multivariate monitoring indicators based on time series for monitoring whether the transformer is abnormal from normal operation data of the transformer, each of the original multivariate monitoring indicators includes a plurality of feature data.
[0029] In some embodiments, the characteristic data includes oil temperature, load rate, and ambient temperature obtained based on a time series.
[0030] In this invention, data acquisition is the first step in anomaly detection. This step extracts key monitoring indicators (i.e., raw multivariate monitoring indicators) from transformer operating data, primarily including oil temperature and load factor, and then analyzes them in combination with ambient temperature. The data acquisition system uses sensors to record these raw multivariate monitoring indicators in real time, generating raw time series data (i.e., raw multivariate monitoring indicators based on time series). This ensures data continuity and accuracy, providing a foundation for subsequent model processing.
[0031] Specifically, sensors installed on the transformer collect real-time data such as oil temperature, load factor, and ambient temperature (oil temperature, load factor, and ambient temperature serve as characteristic data for determining transformer anomalies). These sensors transmit this data to a central data processing system at a set frequency. Data is transmitted via the Industrial Internet of Things (IIoT) platform to ensure data security and reliability during transmission, preventing loss or corruption. The collected data is stored and managed on the server, providing a reliable data foundation for subsequent preprocessing, model training, and testing.
[0032] 2. Data preprocessing S2. Preprocess the original multivariate monitoring indicators to obtain a multivariate input data sequence set based on time series.
[0033] To improve model effectiveness, raw data (raw multivariate monitoring indicators) requires preprocessing, such as cleaning and normalization. Specifically, before inputting the collected oil temperature, load factor, and ambient temperature data into the transformer anomaly detection model, they must be preprocessed to ensure data integrity, consistency, and quality, enabling the transformer anomaly detection model to effectively learn and detect abnormal patterns. Data preprocessing consists of three sub-steps: data cleaning, data standardization, and data segmentation.
[0034] In some embodiments, the specific process of S2 is: S2.1. Eliminate abnormal data from the original multivariate monitoring indicators, and then perform missing value filling on the original multivariate monitoring indicators from which the abnormal data has been eliminated to obtain intermediate multivariate monitoring indicators, wherein the abnormal data include original multivariate monitoring indicators whose values are not within a set first threshold range and original multivariate monitoring indicators whose oil temperature variation per unit time step exceeds 1 degree Celsius; The above process is the data cleaning process.
[0035] More specifically, the raw data collected from the sensor is first screened to remove abnormal data, as this data is obviously abnormal and is used as test data for the subsequent transformer anomaly detection model. The obviously abnormal data features that are removed include: oil temperature below 0 degrees, oil temperature above 90 degrees, and oil temperature change amplitude per unit time step exceeding 1 degree.
[0036] The remaining data is then cleaned, and this part of the data is treated as normal data as the original training data for the model. However, the remaining data may still contain missing values, or abnormally slightly higher or lower noise data points. For missing values, linear interpolation is used to fill them, that is, the vacant position is filled according to the average value of the two known data points before and after. The processed data ensures that the model can learn based on accurate and reliable data during subsequent training. The solution to abnormally slightly higher or lower noise data points is to formulate a first threshold range and select data within the first threshold range as test data input to the transformer anomaly detection model. The first threshold range is different for different types of feature data. It is set here according to the actual situation and will not be elaborated on.
[0037] S2.2. Normalizing the intermediate multivariate monitoring indicators to obtain normalized multivariate monitoring indicators; This step is data normalization.
[0038] The oil temperature, load rate and ambient temperature data after cleaning are normalized according to the following formulas: (1) in, is the cleaned characteristic data, that is, the characteristic data that constitutes the intermediate multivariate monitoring indicators, is the normalized feature data, is the mean of the cleaned feature data, is the standard deviation of the cleaned feature data. It should be noted that the mean and standard deviation are the mean and standard deviation calculated for all feature data.
[0039] This process normalizes all cleaned feature data to zero mean and unit variance, eliminating dimensional differences between features. This ensures that each feature has a consistent impact on the network during the training of the Transformer Outlier Detection Model, preventing any one feature from overly influencing the model's weights. Furthermore, the standardized feature data improves the convergence and stability of the Transformer Outlier Detection Model during training.
[0040] S2.3. The normalized multivariate monitoring indicator is divided according to the set sliding time window to obtain a set of multivariate input data sequences based on time series, wherein each multivariate input data sequence in the set of multivariate input data sequences is a T×F two-dimensional vector, and the multivariate input data sequence includes T input data groups based on time series, and each input data group includes F feature data, wherein T represents the number of time steps in the time window, and T and F are both positive integers.
[0041] The above steps are data segmentation.
[0042] More specifically, the normalized oil temperature and load rate data is split into time windows of 12, or hourly, so that every 12 consecutive time steps of data form a data batch and are input into the model. A time step here can be understood as a discrete representation of the sampling time. Time steps are divided based on the sampling time, with every five minutes representing a time step. In implementation, starting from the first time step of the dataset (normalized multivariate monitoring indicators), each window contains 12 consecutive time steps of data, moving incrementally in a sliding window manner. This generated batch data preserves the continuity of the time series and, combined with the ambient temperature, captures the temporal variations of oil temperature, load rate, and ambient temperature. The split data is stored for input into the LSTM-AE model for training.
[0043] After the data is segmented, the normalized multivariate monitoring indicators are made into a series of multivariate input data series based on time series. .
[0044] Represents the nth multivariate input data sequence.
[0045] Each multivariate input data sequence X has a time window data with a fixed time window length T ,in , Represents the t-th input data set. l is the dimension, R is a real number, Represents an l-dimensional real vector space. That is, each input data set contains l real features.
[0046] Right now , Represents the Tth input data group in the first multivariate input data sequence.
[0047] Each input data set x contains three feature data ,The first column of data represents the oil temperature, the second column represents the load rate, and the third column represents the ambient temperature. ,The multivariate input data sequence when inputting the transformer ,abercrombie shop timbre detection model each time time ,is a two-dimensional data of T×F, where T is the time step and F is the ,number of features in each time step, which means that each time step contains F ,feature data.
[0048] Therefore, in this embodiment, F is 3 and T is 12. The multivariate input data sequence is a 12×3 two-dimensional vector.
[0049] 3. Model training S3. Construct an LSTM-AE model, and perform unsupervised training on the original LSTM-AE model through the set of multivariate input data sequences, so that the LSTM-AE model outputs a reconstructed data sequence corresponding to each multivariate input data sequence, and the reconstructed data sequence is composed of initial reconstructed data based on the time series. Then, the initial reconstructed data corresponding to the same sampling point (time step) is denormalized to obtain the final reconstructed data, and the error between the final reconstructed data and the corresponding feature data is used as the reconstruction error of the sampling point. When the reconstruction error is within the anomaly detection threshold range, the training of the LSTM-AE model is completed to obtain a transformer anomaly detection model.
[0050] like Figure 2 As shown, X is the input feature, that is, the input data, and r is the reconstructed oil temperature value. Just repetition , which means copying the Z vector T times according to the time step length T, and h is the hidden state. The LSTM-AE model includes an LSTM encoder, a repeated vector layer, an LSTM decoder, a Timedistributed layer, and a feature fusion layer, where The LSTM encoder is used to extract the most relevant feature data in the multivariate input data sequence and form a time series-based encoding feature sequence; The repeated vector layer is used to replicate the coding feature sequence to obtain T coding feature sequences; The LSTM decoder is used to decode the T encoding feature sequences respectively to obtain decoding feature sequences; The Timedistributed layer is used to perform matrix multiplication with the decoded feature sequence to obtain a T×F two-dimensional vector as a first result; The feature fusion layer is used to perform feature fusion on the first result to obtain a reconstructed data sequence consisting of T pieces of initial reconstructed data of the oil temperature.
[0051] This paper uses an unsupervised learning model based on a long short-term memory (LSTM) network combined with an autoencoder (AE) to detect anomalies in transformer oil temperature data. The model's structure consists of two core components: an encoder and a decoder. By using an LSTM network as a component of the autoencoder, the model is able to effectively process time series data.
[0052] The core idea of an autoencoder is to map input data into a low-dimensional latent space through an encoder, and then reconstruct the original data from this low-dimensional representation through a decoder. The encoder's primary function is to extract features from the input data and compress it into a compact representation, preserving important information while discarding redundancy. The decoder, on the other hand, is responsible for recovering an output from this compact representation that is as close to the original data as possible. Therefore, the goal of an autoencoder is to learn a compressed representation that minimizes reconstruction error. Consequently, the autoencoder can automatically extract characteristic patterns in the data and use these features to reconstruct the data.
[0053] In this invention, the autoencoder learns the normal patterns of transformer oil temperature, load factor, and ambient temperature data, enabling detection of abnormal input data through larger reconstruction errors. To enable the autoencoder to process time series data, the present invention employs multi-layer LSTM networks in both the encoder and decoder components of the autoencoder. As the core component of the encoder, the LSTM compresses the input time series into a low-dimensional latent space while capturing the temporal dependencies and characteristic patterns in the data. The decoder, on the other hand, utilizes the LSTM network to gradually reconstruct the original time series from these latent representations, ensuring that the temporal information of the sequence data is preserved during the reconstruction process.
[0054] Next, we introduce the specific structure of each component of the LSTM-AE model.
[0055] like Figure 3 As shown, the LSTM encoder includes T first LSTM units, T input data groups are respectively input to one of the first LSTM units, the first first LSTM unit at the first position obtains a hidden state according to the first input data group, and the j-th first LSTM unit obtains the hidden state of the j-th first LSTM unit according to the hidden state output by the j-1-th first LSTM unit and the j-th input data group, and passes it to the j+1-th first LSTM unit, wherein, .
[0056] The main purpose of the LSTM encoder is to act as a sequence folding layer, converting feature data into a batch of time-based feature sequences. It is similar to performing independent convolution operations on the time steps of the feature sequence. Figure 3This paper details how the (AE) encoder interacts with a series of first LSTM units, which are trained to identify the most relevant features in the input sequence. The multivariate input data sequence consists of 12 samples (each containing oil temperature, load rate, and ambient temperature) collected at 12 time steps (5-minute intervals). This multivariate input data sequence is reshaped into a 2D dataset (i.e., a two-dimensional dataset) to be sent to the encoder. For example, for a multivariate input data sequence based on time steps, the input data is a 2D vector with one dimension containing the 12 time steps and the other containing the feature data (i.e., samples of oil temperature, load rate, and ambient temperature), represented as a 12×3 vector. The encoder creates the first layer of an LSTM network consisting of 12 first LSTM units. Each first LSTM unit processes one sample (a sample is a set of input data, i.e., feature data at one sampling point). The 12 first LSTM units operate sequentially, with the first first LSTM unit passing the hidden state to the second first LSTM unit. The second first LSTM unit decides whether to retain or forget the previous sample of the first first LSTM unit. During the encoding process, the first LSTM unit will consider the values of all three features and capture the relationship between them. This means that the feature representation of oil temperature will implicitly contain information about load rate and ambient temperature. The hidden layer operation process of this layer is: (2) in, is the input of time step t, that is, the input data set of the t-th time step, 、 denote the hidden state and cell state at time step t, respectively.
[0057] If the second first LSTM unit decides to keep it (the hidden state of the first first LSTM unit. Each LSTM unit processes the input data of the current time step and passes the processed information to the next LSTM unit. Finally, the last LSTM unit outputs all relevant information. The first LSTM processes the first time step x1 input data and passes the processed information to the next, i.e., second, first LSTM unit). The second first LSTM unit writes the hidden state of the first LSTM unit into long-term memory and passes the sample information processed by the first first LSTM unit (the information processed by the first LSTM unit, i.e., the hidden state output by the first LSTM unit) and the feature information processed from the sample being processed by the second first LSTM unit (here, feature information refers to the useful information extracted and processed from the input data by the first LSTM unit at each time step) to the third first LSTM unit, and so on. The last first LSTM unit, i.e., the 12th first LSTM unit in the model of the present invention, contains the feature information of all samples worth saving, i.e., the useful information at each time step, which was processed by the first 11 first LSTM units. The information of all relevant samples is output by the last first LSTM unit and is compressed as follows: (3) in, is the hidden state of the last time step, z is the encoded fixed-size vector, and this output vector is now used as a 1×16 vector as the encoded feature sequence.
[0058] Then a RepeatVector layer is added as the second layer to create copies of the 1×16 vector, the number of which is equal to the number of time steps. For example, the number of time steps (i.e., the number of time steps) in the model of the present invention is 12, so the second layer creates 12 copies of the encoded features as a two-dimensional vector equal to 12×16. That is, in this embodiment, the T encoded feature sequences is a 12×16 two-dimensional vector, expressed as: (4) z is the encoded fixed-size vector; T is the number of time steps in the original time series; for example, if the number of time steps is 12, then T=12, which means that the original time series contains 12 discrete time points; It is a layer operation (or function) in deep learning that "repeats the input vector T times." Here, T is a parameter of the operation that specifies the number of repetitions (i.e., the number of time steps that match the original time series).
[0059] It is the output of the RepeatVector operation, namely the "feature vector after repeating".
[0060] The LSTM decoder includes T second LSTM units, and the T encoding feature sequences are respectively input to one second LSTM unit. The first second LSTM unit obtains a hidden state according to the first encoding feature sequence, and the j-th second LSTM unit obtains the hidden state of the j-th second LSTM unit according to the hidden state output by the j-1-th second LSTM unit and the j-th input data group, and passes it to the j+1-th second LSTM unit, wherein, .
[0061] The main purpose of the LSTM decoder is to act as a sequence unfolding layer to restore the sequence structure of the input data after sequence folding in time steps. Figure 4 The details of how the decoder interacts with the second LSTM unit to reconstruct the output are described. Each 1×16 set represents one encoded feature in the original time series (i.e., each 1×16 set represents one encoded feature sequence). This is now fed into the decoder, which creates a third-layer network with 12 second LSTM units, where the number of second LSTM units represents the number of encoded features in the encoded feature sequence (for example, in our model, the encoded feature sequence has 12 data points, i.e., the encoded feature sequence consists of 12 encoded features). Each second LSTM unit processes the input of 1×16 encoded features and outputs a vector of the same size (i.e., 12×16) representing the results learned from the encoded features (i.e., a total of 12 second LSTM units process the data, ultimately outputting 12 1×16 data points). Each LSTM unit processes one time step of input and outputs a 1×16 vector. The outputs of the 12 LSTM units can be combined into a 12×16 matrix, where each row corresponds to the output of one time step. The final output decoded features are 12×16, which are used for matrix multiplication with the 16×3 vector created by the additional Timedistributed layer, ensuring that the model can reconstruct the values of all three features for each time step. The first result of this calculation is represented as a vector of size 12×3. It is represented as: (5) (6) in, Refers to the input data provided to the t-th second LSTM unit, here it is the t-th encoded feature sequence, represents the computational operation of the LSTM (Long Short-Term Memory) unit, F is the dimension of the decoded features (the same as the number of input features), is the hidden state output by the second LSTM unit at time step t. The TimeDistributed layer performs an independent linear transformation on the output of each time step. It is a time distribution layer operation in deep learning. Its function is to apply the same transformation F independently to each time step of the time series data. represents the reconstructed data at time step t. Finally, feature fusion is performed in the fifth dense layer, combining the three reconstructed feature values (oil temperature, load rate, and ambient temperature) of each time step output by the decoder into the initial oil temperature reconstruction value of the current time step. The calculation process can be expressed as: (7) in, represents the initial oil temperature reconstruction value corresponding to the i-th input data group, 、 、 are the oil temperature, load rate and ambient temperature in the i-th input data group, 、 、 are the weights of oil temperature, load rate and ambient temperature in the i-th input data group, b is the deviation term, , according to the back-propagation process, the weights are updated by calculating the gradient of the loss function with respect to the model parameters (including the weights of the fully connected layer) and using gradient descent according to the calculation, corresponding to the three eigenvalues.
[0062] The addition of LSTM networks enables the autoencoder to process sequential data, not just static feature data. This means the model not only learns how to compress input data into a low-dimensional latent space but also captures the temporal dependencies of the data during encoding and decoding. This combination enables the model to not only detect anomalies but also consider the temporal trends and long-term dependencies of the data during processing, thereby improving the accuracy of anomaly detection.
[0063] After the LSTM-AE model outputs the initial reconstructed data, the initial reconstructed data is then denormalized to obtain the final reconstructed data.
[0064] Here, since the reconstructed data obtained is the oil temperature reconstruction value, the LSTM-AE model outputs the initial oil temperature reconstruction value, and then the initial oil temperature reconstruction value is denormalized to obtain the final oil temperature reconstruction value.
[0065] The entire model is trained by minimizing the error between the reconstructed data and the input data. The loss function is the mean square error between each original oil temperature data point (the oil temperature in the intermediate multivariate monitoring indicator) and the final oil temperature reconstructed data point (i.e., the final oil temperature reconstruction value), which is defined as: (8) represents the oil temperature of the nth sampling point in the intermediate multivariate monitoring index, represents the final oil temperature reconstruction value corresponding to the nth sampling point in the mth multivariate input data sequence, M represents the number of multivariate input data sequences containing the nth sampling point, Loss represents the mean square error.
[0066] Here, after the multivariate input data sequence is input into the LSTM-AE model, the initial and final oil temperature reconstruction values are obtained, and the initial and final oil temperature reconstruction values correspond to the final oil temperature reconstruction values respectively.
[0067] The time interval between two adjacent sampling points is called a time step. Since the oil temperature at the same sampling point is the same for any multivariate input data sequence, for a given sampling point, we can simply select the actual oil temperature value from any multivariate input data sequence that contains that sampling point. However, the reconstructed oil temperature values corresponding to the same sampling point in different multivariate input data sequences may not be the same. Therefore, the initial and final reconstructed oil temperature values need to be determined based on the multivariate input data sequence.
[0068] By minimizing this loss function, the model is continuously optimized, minimizing the reconstruction error. The key to autoencoders is that the encoder extracts and compresses features from time series data, and then the decoder reconstructs the data from the compressed latent state. The entire autoencoder model is suitable for unsupervised learning. The model learns the normal patterns of the input data and optimizes parameters during training to ultimately minimize the reconstruction error. After training, the model can be used to reconstruct new input data, and the reconstruction error can be used to determine whether the data is abnormal.
[0069] Through these steps, the model learned to capture the temporal characteristics of oil temperature and load factor data during training, and established an adaptive detection system through unsupervised learning. This system can detect anomalies without annotating abnormal data, improving the model's adaptability and versatility, and providing strong technical support for the stable operation of power system transformers.
[0070] 4. Model Application S4. Input the multivariate input data sequence to be detected into the transformer anomaly value detection model in real time to obtain a corresponding reconstructed data sequence, and determine whether the feature data is abnormal by calculating the reconstruction error between the final reconstructed data of each sampling point in the reconstructed data sequence and the corresponding feature data.
[0071] Specifically, it includes: 1) Reconstruction Error: First, reconstruction error calculation is the core of anomaly detection. In a real-time monitoring environment, new oil temperature and load rate data flow into the system and are processed by the model's encoder and decoder. The encoder converts the new input multivariate input data sequence into feature vectors (i.e., encoded feature sequences). The decoder then reconstructs output data (i.e., initial reconstructed data) based on these feature vectors that is similar to the original input multivariate input data sequence. The initial reconstructed data is then denormalized to obtain the final reconstructed data. The system compares the original input data with the reconstructed data (final reconstructed data) and calculates the reconstruction error for each data point. The reconstruction error reflects the model's ability to reproduce the data. Under normal circumstances, the model can accurately reconstruct the data, resulting in a low error value. However, when the input data is anomalous, the reconstruction error increases significantly because its characteristic pattern does not match normal data.
[0072] The specific reconstruction error calculation is to extract the oil temperature reconstruction value (final oil temperature reconstruction value) obtained after feature fusion of each multivariate input data sequence and the error between the original oil temperature data in the corresponding intermediate multivariate monitoring indicator and divide it by each value (each value here refers to the value of this time step that exists in several multivariate input data sequences. For example, if it exists in 5 multivariate input data sequences, the number is 5), that is, the average value of all reconstruction errors in this time step is used as the final reconstruction error. This is because the data is in the form of a sliding window, so there will be a situation where a time step exists in multiple multivariate input data sequences. Figure 5 Specifically, the present invention explains how to calculate the reconstruction loss of each sample containing different time series, that is, the reconstruction loss of each oil temperature original data of different multivariate input data sequences. Assume that there are 5 oil temperature data points , and form them into 3 time series [ , that is, the original value, such as Figure 5 As shown, , , , the three time series are input to obtain the reconstructed output sequence, that is, 3 oil temperature reconstruction value sequences are obtained, namely The corresponding oil temperature reconstruction value sequence is , The corresponding oil temperature reconstruction value sequence is , The corresponding oil temperature reconstruction value sequence is For example, the error at the third time point is calculated by taking the final oil temperature reconstruction value and the original value of the three corresponding time series to get the error, and then averaging the three errors to get the final reconstruction error. For example, the reconstruction error calculation at the third time point is:
[0073] Therefore, the calculation formula of the reconstruction error is: (9); in, represents the oil temperature reconstruction value corresponding to the oil temperature at the nth sampling point, Represents the reconstruction error of the nth sampling point, that is, the error term of the nth sampling point, is the actual oil temperature at the nth sampling point.
[0074] In order to ensure the accuracy of anomaly detection, the present invention adopts a statistical method to calculate the mean of the reconstruction error ( ) and standard deviation ( ) to dynamically set the threshold. The detection range is shown in the following formula: (10) (11) in, represents the upper limit of the anomaly detection threshold, represents the lower limit of the anomaly detection threshold, represents the mean of the average reconstruction error, represents the standard deviation of the mean reconstruction error.
[0075] 、 The specific calculation formula is as follows: (12) (13) Among them, n represents the total number of samples, that is, the error term involved in the calculation The total number of error i is the value of the reconstruction error of each data point. Usually, the upper threshold of the reconstruction error is set to the mean plus three times the standard deviation ( ), the lower threshold is the mean minus three times the standard deviation ( ). The error values within this range are considered to be the error range of normal data, and data points outside this range are considered to be abnormal points. Set the threshold to It is based on the "Three Sigma Rule" in statistics, also known as the Three Sigma Rule. Specifically, it assumes that the reconstruction error presents a normal distribution. The characteristics of the normal distribution are that the data is concentrated around the mean and the shape of the distribution presents a bell-shaped curve. In this distribution, , The range represents the mean around which approximately 99.7% of the data points will fall. up and down This means that and The range between and encompasses the errors of almost all normal data points. This threshold setting method ensures sufficient system sensitivity while reducing both false positive and false negative rates. See the subsequent model training results for specific thresholds.
[0076] Anomaly detection: The reconstruction error threshold is the upper and lower limits of the threshold output by the model before. The reconstruction error calculated by formula (9) is compared with the threshold. If the reconstruction error of a data point (oil temperature) exceeds this threshold, the data point is considered to be abnormal. This comparison process can effectively identify abnormal points in the data that deviate from the normal pattern. Points with large reconstruction errors usually represent significant differences between the input data and the normal pattern learned by the model, which may reflect potential faults or abnormal conditions in the operation of the equipment. The specific formula is as follows
[0077] Indicates whether it is an abnormal result. Indicates that it is judged as abnormal. Indicates that the judgment is normal.
[0078] The present invention further comprises the steps of: The intermediate multivariate monitoring indicators based on time series, reconstructed data series, and indicator data that are not within the anomaly detection threshold range are displayed.
[0079] Result Output and Visualization: Once an outlier is detected, the system records the data value, timestamp, and corresponding reconstruction error for each outlier. To facilitate user understanding and further analysis, the system outputs the detection results to a database and file, and generates a detailed detection report. This report includes the original data value, final reconstruction value, reconstruction error, and anomaly label for each time step. Furthermore, the system supports exporting these detection results in CSV or other common formats for convenient storage and analysis.
[0080] To enhance user understanding, the system also provides data visualization. By plotting the data trends and reconstruction errors for oil temperature and load factor, users can intuitively observe the location and distribution of abnormal points. Specifically, the time step corresponding to the abnormal value detected by the transformer abnormal value detection model can be used to find abnormal data for the original multivariate monitoring indicators.
[0081] The chart display includes the following: 1. The raw data curves of oil temperature, load rate, and ambient temperature (the curves corresponding to the intermediate multivariate monitoring indicators) show the changing trends of the data over time.
[0082] 2. The final reconstructed data curve generated by the model is compared with the original data (oil temperature in the intermediate multivariate monitoring indicator) to demonstrate the model's ability to reconstruct normal data.
[0083] 3. Detected anomalies are marked on the chart with different colors or symbols to facilitate users to quickly locate and identify them.
[0084] Through this anomaly detection and output process, the present invention accurately identifies anomalies in oil temperature and load factor data in real time and provides users with detailed anomaly reports and visual analysis. The automation and efficiency of this entire process ensures the system's stability and reliability in complex industrial environments, improving the efficiency of transformer monitoring and maintenance.
[0085] Next, the method of the present invention is described through specific examples.
[0086] Transformers in a certain region were selected in June 2023. Equipment at Site 36 recorded historical data every 5 minutes, totaling 8,640 items. The first half of this data, totaling 4,320 items, was used to extract data on transformer oil temperature, load factor, and ambient temperature. This data was then cleaned. Based on the anomaly determination rules for individual eigenvalues, data points with oil temperatures below 0°C, above 90°C, changes exceeding 1°C, and load factor changes exceeding 100% were removed. The oil temperature, load factor, and ambient temperature at the same time for these removed data points were then combined into a three-dimensional vector for input into the model.
[0087] The LSTM-AE model under this data is adjusted in parameters and trained for minimum reconstruction error. A model that can produce a relatively stable minimum reconstruction error is trained. The historical data with the corresponding data points removed according to the single eigenvalue outlier rule is then substituted into the detection model of the present invention for training, and the model is saved for testing. The specific parameters of the LSTM-AE model are set as follows: input_size: The feature dimension of the input data, which is set to 3 here.
[0088] num_layers: The number of LSTM stacked layers, set to 12. More layers can capture more complex sequence dependencies, but also increase the depth of the model, which may lead to gradient disappearance or gradient explosion problems.
[0089] output_size: The feature dimension of the output data is set to 3, the same as the input dimension.
[0090] bidirectional: Whether to use bidirectional LSTM. Set it to False to not use bidirectional.
[0091] window_size: The time window size is set to 12. It affects the length of the local dependencies of the time series data captured by the model.
[0092] batch_size: Batch size, set to 64. Improve memory utilization and training speed.
[0093] num_epochs: The number of training rounds, here set to 500. Improves the model's performance on reconstruction.
[0094] criterion: loss function, here we use mean squared error loss (MSELoss).
[0095] optimizer: Optimizer. Here we use the Adam optimizer and the learning rate is set to 0.001.
[0096] After obtaining a trained transformer anomaly detection model, we input 4,320 data points from the second half of June into the prepared LSTM-AE model to obtain the correlation between the oil temperature load rate and the ambient temperature. We calculated the mean square error (MSE) for each oil temperature data point and averaged the mean square error for each data point as the reconstruction error. We then calculated the reconstruction error for each data point to obtain the average reconstruction error. We then set a threshold based on the average reconstruction error and a statistical threshold (mean ± 3 times the standard deviation). Values exceeding the threshold were identified as outliers, and the following were determined: Figure 6 .
[0097] Since the present invention is an unsupervised learning outlier detection method and does not have a dataset with anomalies labeled, to more effectively evaluate the performance of the detection model of the present invention, the present invention uses the evaluation indicators (all dimensionless) used in unsupervised learning: the Davidson-Bouldin Index (DBI), the Dunn Validity Index (DVI), and the Silhouette Coefficient. The reconstruction error at each time point is used as the anomaly score output by the transformer outlier detection model. Clustering is performed based on these anomaly scores, and finally the above-mentioned evaluation indices are calculated. The smaller the DPI, the better, the larger the DVI, the better the effect, and the closer the Silhouette Coefficient is to 1, the better the effect. The transformer outlier detection model of the present invention is compared with the evaluation indicators of the other six models to evaluate its performance.
[0098] Table 1 Comparison of experimental results
[0099] Table 1 shows the performance of the transformer anomaly detection model proposed in this paper in predicting oil temperature anomalies and compares it with other models using similar models. Seven representative algorithms (RRCF, robust random cut forest; RNN, recurrent neural network; AE, autoencoder; LSTM, long short-term memory; GRU, gated recurrent unit; Transformer; and CFT-Net, CFT network) were compared using individual metrics to evaluate the performance of the transformer anomaly detection model proposed in this paper. The algorithm names and evaluation results are shown in Table 1. As can be seen from the table, the proposed detection method leads the pack in terms of the Davidson-Botting index, Dunn index, and silhouette coefficient.
[0100] The prediction results show that the average reconstruction error is 0.0092, the corresponding upper threshold is 0.0256884, and the lower threshold is -0.015213249. The output and visualization of abnormal data will be obtained. The specific distribution of abnormal value points is as follows Figure 7 shown.
[0101] 47 abnormal values of transformer oil temperature were obtained. The single oil temperature abnormal value detection could only detect 5. The transformer abnormal value detection model of the present invention detects abnormal values that may appear in the sequence value (multivariate input data sequence) by linking the relationship between oil temperature and load rate, as well as their (oil temperature and load rate) data from the previous hour. This cannot be detected by the simple oil temperature rule.
[0102] Next, analyze the distribution points of normal data and outlier data.
[0103] The following uses the normal trend of oil temperature and load rate on June 23 to illustrate the normal situation of the transformer. The normal data is as follows Figure 8 As shown in the figure, the oil temperature and load rate data are generally stable, with relatively consistent change trends, showing characteristics consistent with normal operation.
[0104] Specifically, as the ambient temperature rises, the oil temperature gradually increases, fluctuating between 35°C and 50°C without experiencing a rapid increase, while the load factor fluctuates between 35% and 55%. From midnight to early morning, the load factor gradually decreases, from approximately 40% to 35%, consistent with the oil temperature trend. The oil temperature also gradually decreases during this period, demonstrating a positive correlation between the two. Subsequently, starting in the morning, the load factor gradually increases, reaching a peak of approximately 55%, while the oil temperature also rises simultaneously, reaching a level close to 50°C. This indicates that as the equipment load increases, the oil temperature also rises accordingly. From the afternoon to evening, the load factor fluctuates slightly but generally stabilizes, while the oil temperature remains relatively high around 50°C. This demonstrates that the equipment load factor can affect the oil temperature, and the two are positively correlated, preventing the oil temperature from being excessively high.
[0105] Next, we analyze the changing trends around abnormal data. We illustrate this by taking abnormal values caused by oil temperature and load as examples.
[0106] Take the abnormal data No. 26 detected by the transformer abnormal value detection model of the present invention as an example, which is abnormal data caused by oil temperature. Figure 9 This is the oil temperature load rate trend chart for the entire day of the 26th. The red dotted line represents the abnormal value point caused by the detected oil temperature.
[0107] Specifically, let's take the abnormal data point on the 26th detected by the model as an example. As the ambient temperature (AT) gradually increased, the oil temperature became excessively high and the rate of increase was too rapid, nearly reaching 60°C. The model, which predicts based on the data from the previous hour, detected that the rising slope was too high, resulting in a large reconstruction error. Then, at 12:00 PM, the load factor suddenly dropped from 75% to approximately 40%, potentially aligning with the load factor to regulate the oil temperature. The model keenly detected this, but when the load factor suddenly dropped to regulate the oil temperature, the oil temperature actually increased instead of decreasing, continuing to rise until around 2:00 PM. The model concluded that the excessively high oil temperature and the unusual load factor fluctuations at this time may have indicated that the oil temperature had reached an abnormal point, further exacerbating the abnormal signal detected by the model. This anomaly did not align with the previous normal operating trend and pattern, and was therefore identified by the model as a potential anomaly.
[0108] In addition, let’s look at an abnormal situation. For example, the abnormal data on No. 27 detected by the model Figure 10 .
[0109] The oil temperature and load factor on the 27th remained relatively stable for most of the time. AT represents ambient temperature. Specifically, the oil temperature remained at approximately 50°C, while the load factor was around 55%. There was a positive correlation between the two, and as the load factor changed, the oil temperature also fluctuated slightly. However, near 9:00 PM, the graph showed significant abnormal fluctuations. At this point, the load factor suddenly and rapidly rose, reaching a high of approximately 65%, but then suddenly dropped, while the oil temperature remained essentially unchanged. Subsequently, near 11:00 PM, the load factor fluctuated dramatically again, dropping sharply for a short period before recovering, demonstrating a distinctly unstable state. This dramatic load fluctuation, inconsistent with the stable oil temperature, suggests the equipment may have experienced abnormal load conditions or a fault. It's possible that a fault in the transformer's load caused the abnormal transformer data.
[0110] It should be noted that Figures 8-10 In the chart, the ordinate has two meanings. If it is for oil temperature and ambient temperature, the dimension of the ordinate is degrees Celsius. If it is for load rate, the ordinate has no dimension and represents the load rate in percentage.
[0111] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of 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 transformer outlier detection method based on LSTM-AE and multivariate data, characterized in that: The steps include: Sampling a number of original multivariate monitoring indicators based on time series for monitoring whether the transformer is abnormal from the normal operation data of the transformer, each of the original multivariate monitoring indicators includes a plurality of feature data; Preprocessing the original multivariate monitoring indicators to obtain a multivariate input data sequence set based on a time series; Constructing an LSTM-AE model, and performing unsupervised training on the LSTM-AE model using the set of multivariate input data sequences, so that the LSTM-AE model outputs a reconstructed data sequence corresponding to each multivariate input data sequence, wherein the reconstructed data sequence is composed of initial reconstructed data based on a time series, and then performing denormalization on the initial reconstructed data corresponding to the same sampling point to obtain final reconstructed data, and taking the sum of the errors between the final reconstructed data and the corresponding feature data as the reconstruction error of the sampling point, and completing the training of the LSTM-AE model when the reconstruction error is within the anomaly detection threshold range, thereby obtaining a transformer anomaly detection model; The multivariate input data sequence to be detected is input into the transformer anomaly detection model in real time to obtain a corresponding reconstructed data sequence, and the reconstruction error between the final reconstructed data of each sampling point in the reconstructed data sequence and the corresponding feature data is calculated to determine whether the feature data is abnormal.
2. A transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 1, characterized in that: The characteristic data include oil temperature, load rate and ambient temperature obtained according to a time series.
3. A transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 2, characterized in that: The specific process of preprocessing the original multivariate monitoring indicators to obtain a multivariate input data sequence set is as follows: Eliminating abnormal data from the original multivariate monitoring indicators, and then performing missing value filling on the original multivariate monitoring indicators from which the abnormal data have been eliminated to obtain intermediate multivariate monitoring indicators, wherein the abnormal data include original multivariate monitoring indicators whose values are not within a set first threshold range and original multivariate monitoring indicators whose oil temperature variation per unit time step exceeds 1 degree Celsius; Normalizing the intermediate multivariate monitoring indicators to obtain normalized multivariate monitoring indicators; The normalized multivariate monitoring indicator is divided according to the set sliding time window to obtain a multivariate input data sequence set based on the time series, wherein each multivariate input data sequence in the multivariate input data sequence set is a T×F two-dimensional vector, and the multivariate input data sequence includes T input data groups based on the time series, and each input data group includes F feature data, wherein T represents the number of time steps in the time window, and T and F are both positive integers.
4. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 3 is characterized in that: The LSTM-AE model includes an LSTM encoder, a repeated vector layer, an LSTM decoder, a Timedistributed layer, and a feature fusion layer, wherein the LSTM encoder is used to extract the most relevant feature data in the multivariate input data sequence and form a time series-based encoded feature sequence; The repeated vector layer is used to replicate the coding feature sequence to obtain T coding feature sequences; The LSTM decoder is used to decode the T encoding feature sequences respectively to obtain decoding feature sequences; The Timedistributed layer is used to perform matrix multiplication with the decoded feature sequence to obtain a T×F two-dimensional vector as a first result; The feature fusion layer is used to perform feature fusion on the first result to obtain a reconstructed data sequence consisting of T pieces of initial reconstructed data of the oil temperature.
5. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 4 is characterized in that: The LSTM encoder includes T first LSTM units, T input data groups are respectively input to one of the first LSTM units, the first LSTM unit at the first position obtains a hidden state according to the first input data group, and the j-th first LSTM unit obtains the hidden state of the j-th first LSTM unit according to the hidden state output by the j-1-th first LSTM unit and the j-th input data group, and passes it to the j+1-th first LSTM unit, wherein, .
6. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 4 is characterized in that: The LSTM decoder includes T second LSTM units, and the T encoding feature sequences are respectively input to one second LSTM unit. The first second LSTM unit obtains a hidden state according to the first encoding feature sequence, and the j-th second LSTM unit obtains the hidden state of the j-th second LSTM unit according to the hidden state output by the j-1-th second LSTM unit and the j-th input data group, and passes it to the j+1-th second LSTM unit, wherein, .
7. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 4 is characterized in that: The feature fusion layer is used to perform feature fusion on the first result to obtain the specific expression of the initial reconstructed data about the oil temperature: ; in, represents the reconstructed oil temperature value corresponding to the i-th input data group, 、 、 are the oil temperature, load rate and ambient temperature in the i-th input data group, 、 、 are the weights of oil temperature, load rate and ambient temperature in the i-th input data group, b is the deviation term, .
8. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 7 is characterized in that: The calculation formula of the reconstruction error is: in, represents the final oil temperature reconstruction value corresponding to the oil temperature of the nth sampling point in the mth multivariate input data sequence, represents the reconstruction error of the nth sampling point, and M represents the number of multivariate input data sequences containing the nth sampling point.
9. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 8, characterized in that: The specific expression of the anomaly detection threshold range is: ; ; in, represents the upper limit of the anomaly detection threshold, represents the lower limit of the anomaly detection threshold, represents the mean of the average reconstruction error, represents the standard deviation of the mean reconstruction error, , , n represents the total number of samples, is the reconstruction error of the i-th sample.
10. The transformer anomaly detection method based on LSTM-AE and multivariate data according to claim 3, characterized in that: The following steps are also included: The intermediate multivariate monitoring indicators based on time series, reconstructed data series, and indicator data that are not within the anomaly detection threshold range are displayed.
Citation Information
Cited By
Synchronous timing system fault diagnosis method based on unsupervised learning
CN121765502A
A synchronous timing system fault diagnosis method based on unsupervised learning
CN121765502B