A gravity wave instrument fault detection model and method based on Seq2Seq
By using a Seq2Seq autoencoder and a self-attention enhanced GRU, the challenges of fault feature extraction and multi-class recognition in gravimeter fault detection were solved, achieving more efficient fault detection and state modeling, and improving detection accuracy and equipment stability.
Patent Information
- Application Number
- CN202410288801.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-03-14
AI Technical Summary
Gravity wave instrument fault detection faces challenges such as difficulty in extracting fault features and identifying multi-class faults. Existing methods are not effective in detecting and diagnosing nonlinear faults, and their detection performance is unsatisfactory when data is sparse.
A fault detection method for gravimeters based on Seq2Seq autoencoders is adopted. A self-attention enhanced GRU is used for encoding and decoding. The encoder encodes multivariate time series data into high-level features, the decoder reconstructs the data, and a fully connected layer is used to determine the fault category. A reconstruction error threshold is set to determine the fault state.
It improves the accuracy and reliability of fault detection, can more accurately capture the operating status of the gravity wave meter, promptly detect potential faults, extend equipment life, and improve equipment reliability and stability.
Smart Images

Figure CN118260668B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of meteorological equipment fault detection computer application, in particular to a gravity wave instrument fault detection method based on Seq2Seq. BACKGROUND
[0002] The extremely high precision requirement, unique monitoring principle and complex operating environment of the gravity wave instrument make its operation extremely sensitive and prone to failure, resulting in observation interruption and even errors. At present, the gravity wave instrument fault detection still faces the following problems: first, the gravity wave instrument has a complex system structure and operating conditions, the gravity wave instrument is composed of three subsystems, each subsystem contains multiple components and sensors, which makes the system may misreport faults or fail to accurately detect real faults; second, the gravity wave instrument state monitoring data is large and high-dimensional, the gravity wave instrument needs to continuously collect and store a large amount of data during operation, these data have high dimension and variability, and certain technology and algorithm support is needed to extract fault features and patterns from them; finally, the gravity wave instrument has insufficient fault data samples, although the gravity wave instrument is a complex system, but the fault samples are few, which makes the fault detection and diagnosis more difficult. In view of the above problems, some researchers have proposed a gravity wave instrument linear fault detection method based on contribution analysis and supervised learning. This method identifies linear faults by analyzing the feature relationships between different components, and uses supervised learning algorithms to model the actual data set to extract fault features. However, this method requires sufficient training data and is not suitable for nonlinear fault detection and diagnosis. Some researchers have proposed a gravity wave instrument fault detection method based on time series analysis and convolutional neural network (CNN). This method converts fault data into two-dimensional images, uses CNN to extract fault features and patterns, and achieves high-precision detection. However, this method still has limitations for fault-prone, multi-temporal and multi-class detection. Some researchers have proposed a gravity wave instrument fault detection method based on geometric deep learning. This method uses geometric deep learning to extract high-dimensional data features and topological learning of fault samples to achieve efficient and low-dimensional fault classification and detection. However, this method requires a large amount of fault data to train the model and the detection effect is not good for data sparse situations. SUMMARY
[0003] The technical problem to be solved by the present application is:
[0004] There are still problems such as difficulty in extracting fault features and difficulty in multi-classification fault recognition in fault detection at present, and in view of the above problems, the present application provides a gravitational wave instrument fault detection method based on a Seq2Seq self-encoder. The method is based on a self-attention enhanced GRU to construct a Seq2Seq self-encoder. In the encoding stage, the encoder receives the gravitational wave instrument multi-element time series data, takes the last vector of the hidden state sequence as the encoding vector, and outputs it to the decoder layer. In the decoding stage, the output sequence is output to the output layer as the reconstruction vector. If the reconstruction error exceeds the set threshold, the gravitational wave instrument is determined to be in a fault state, and the encoding vector is sent to the full connection layer for fault category determination, and finally a fault category probability distribution is output.
[0005] To solve the above technical problems, the technical scheme adopted by the present application is:
[0006] A gravitational wave instrument fault detection model based on Seq2Seq, characterized in that the gravitational wave instrument fault detection model is composed of an input layer, an encoder, a decoder, an output layer and a full connection layer;
[0007] The input layer receives gravitational wave instrument multi-element time series data as the input of the model; the output of the input layer is the gravitational wave instrument data sequence, which is input to the encoder and the decoder;
[0008] In the encoding stage, the encoder receives the gravitational wave instrument multi-element time series data, takes the last vector of the hidden state sequence as the encoding vector, and outputs it to the decoder layer; in the decoding stage, the output sequence is output to the output layer as the reconstruction vector; if the reconstruction error exceeds the set threshold, the gravitational wave instrument is determined to be in a fault state, and the encoding vector is sent to the full connection layer for fault category determination, and finally a fault category probability distribution is output.
[0009] A gravitational wave instrument fault detection method based on Seq2Seq, characterized in that it comprises:
[0010] Collecting gravitational wave instrument data; pre-processing the collected gravitational wave instrument data to obtain gravitational wave instrument multi-element time series data;
[0011] Input the gravitational wave instrument multi-element time series data into the gravitational wave instrument fault detection model, in the encoding stage, the encoder receives the gravitational wave instrument multi-element time series data; the current input and hidden state of the encoder are sent to a self-attention enhanced GRU unit to calculate the next hidden state and output, and this process is repeated until all the input gravitational wave instrument data is processed, obtaining a hidden state sequence; the last vector of the hidden state sequence is taken as the encoding vector and output to the decoder layer;
[0012] In the decoding stage, the encoding vector is taken as the initial hidden state of the decoder, and a special start symbol is taken as the initial input of the decoder layer; the current input and hidden state of the decoder layer are input into a self-attention enhanced GRU unit to calculate the next hidden state and output, and the process is repeated until a special end symbol is output or a maximum length is reached to obtain an output sequence; the output sequence is taken as the reconstruction vector and output to the output layer; in the output layer, the input gravitational wave instrument multivariate time series data and the reconstruction vector are aligned so that the lengths of the input data and the reconstruction vector are the same.
[0013] The reconstruction error is calculated, and if the reconstruction error exceeds a set threshold, the gravitational wave instrument is determined to be in a fault state, and the encoding vector is input into a fully connected layer for fault category determination, and finally a fault category probability distribution is output.
[0014] The further technical scheme of the present application is that the collected gravitational wave instrument data is derived from a rotating temperature spectrum measurement subsystem, a large field of view gravitational wave instrument imaging subsystem, a fine spectrum detection subsystem, a CCD camera, a filter wheel, a TEC air conditioner, and environmental parameters.
[0015] The further technical scheme of the present application is that the preprocessing of the collected gravitational wave instrument data includes data classification of original data, deletion of redundant data, filling of missing data, merging of data sets, screening of data features, and data standardization.
[0016] The further technical scheme of the present application is that the reconstruction error calculation formula is as follows:
[0017]
[0018] Wherein, E is the reconstruction error, x ti and respectively represent the i-th element of x t and , d is the feature dimension of the input data, and T is the length of the input sequence.
[0019] A computer system, characterized in comprising: one or more processors, a computer readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0020] A computer readable storage medium, characterized in storing computer executable instructions, the instructions being executed to implement the above method.
[0021] The beneficial effects of the present application are:
[0022] The present application is established on the basis of the normal operation of the gravity wave instrument, aiming to provide an effective gravity wave instrument fault detection method. The gravity wave instrument fault detection method adopts an encoder-decoder structure, which cooperates to complete accurate gap modeling of the gravity wave instrument state. In this model, the encoder is responsible for converting the multivariate time series data into high-level feature representation, while the decoder reconstructs these features to restore the gravity wave instrument state, thereby providing strong support for fault detection. The fault detection model learns the features of the normal and fault states of the gravity wave instrument, and calculates the error between the reconstructed vector and the input data sequence, providing a reliable basis for fault determination. This process is equivalent to the model learning the data features in the normal state, which can capture the data patterns in different states, and then determine whether there is a fault. By setting a preset threshold, once the reconstruction error exceeds the threshold, it can be determined that the gravity wave instrument has failed, and the specific category of the fault is further determined. This intelligent fault determination method effectively combines feature learning and error calculation, improving the accuracy and reliability of fault detection.
[0023] The innovation of the gravity wave instrument fault detection model not only lies in the technical breakthrough, but also significantly expands the application prospect of gravity wave instrument fault detection. Compared with traditional methods, this model not only improves accuracy and efficiency, but also shows broad potential in practical applications. The introduction of this technology not only brings innovation to the field of gravity wave instrument fault detection, but also demonstrates many benefits in practice. From a technical point of view, the advantage of this model lies in its high accuracy in modeling the state of the gravity wave instrument. Through the feature extraction of the encoder and the reconstruction process of the decoder, the model can more comprehensively understand the running state of the gravity wave instrument, thereby more accurately detecting potential faults. In addition, the use of GRU units enhanced by self-attention mechanisms helps better capture the timing information and key features in the gravity wave instrument data sequence, further improving the performance of the model. In terms of practical application, this technology not only improves the accuracy and efficiency of fault detection, but also provides reliable technical support for the long-term stable operation of the gravity wave instrument; by timely discovering and determining faults, appropriate maintenance and repair measures can be taken, reducing the time of equipment operation anomalies, thereby prolonging the life of the equipment and improving the reliability and stability of the equipment. Overall, this gravity wave instrument fault detection model not only has foresight and innovation in technology, but also exhibits significant benefits in practical applications. This method also provides an advanced and reliable method for the maintenance and management of gravity wave instruments, and the present application can not only be applied to gravity wave instrument meteorological equipment, but also be applied to general equipment fault modeling analysis, providing reliable technical support for long-term stable operation and remote maintenance of equipment. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings are not intended to be restrictive in any way.
[0025] Figure 1 Schematic diagram of the gravity wave instrument fault detection model.
[0026] Figure 2 Flow chart of the gravity wave instrument data preprocessing.
[0027] Figure 3 Gravity wave instrument redundant data example.
[0028] Figure 4 Schematic diagram of the gravity wave instrument fault analysis tree.
[0029] Figure 5 Flow chart of the gravity wave instrument fault detection. DETAILED DESCRIPTION
[0030] In order to make the objects, technical solutions and advantages of the present application clearer, further detailed description will be made to the present application in combination with the drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. In addition, the technical features involved in the various embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0031] The working state of the gravity wave instrument directly affects the detection effect of the gravity wave. However, in the actual operation process, the gravity wave instrument may have various faults, such as unstable voltage, environmental interference, etc. These factors or faults will cause the performance of the gravity wave instrument to decline, and even will damage the integrity of the gravity wave observation data. Therefore, the fault detection of the gravity wave instrument is an important measure to ensure the continuous and stable operation of the gravity wave instrument. For the fault detection problem of the gravity wave instrument, the present application proposes a gravity wave instrument fault detection method based on Seq2Seq autoencoder. First, the encoder is responsible for encoding the multi-element time series data of the gravity wave instrument into high-level feature representation, and the decoder reconstructs the encoded features to realize the modeling of the state of the gravity wave instrument; in the process of encoding and decoding, the self-attention mechanism enhanced GRU unit is used to improve the attention degree of the time sequence information and important features of the gravity wave instrument data sequence, which is helpful to more accurately capture the running state of the gravity wave instrument; finally, the fault detection model learns the features of the normal and fault states of the gravity wave instrument, calculates the reconstruction error of the vector and the input gravity wave instrument data sequence; if the reconstruction error exceeds the preset threshold, it is determined that the gravity wave instrument has a fault, and the gravity wave instrument fault category is determined. The structure of the gravity wave instrument fault detection model based on Seq2Seq autoencoder is shown in Figure 1
[0032] According to Figure 1 As shown, the gravimeter fault detection model based on a Seq2Seq autoencoder consists of an input layer, encoder, decoder, output layer, and fully connected layer. The input layer receives multivariate time series data from the gravimeter as input to the model. The input to the input layer is a multivariate time series X = {x1, x2, ..., x...} from the gravimeter. T}, where x t ∈R d is a d-dimensional feature vector representing the state of the gravimeter at time t, where T is the length of the input sequence. The output of the input layer is the gravimeter data sequence X, which serves as the input to the encoder and decoder.
[0033] During the encoding phase, the encoder receives multivariate time-series data X from a gravimeter. First, the gravimeter data X is used as input, with each data point x... t =(x t1 ,x t2 ,...,x td The data contains multiple features, such as ambient temperature, ambient humidity, and operating voltage. 'd' represents the dimension of the gravimeter data features. Each feature vector is used as the initial input to the encoder. Then, the encoder's current input and hidden state are fed into a self-attention-enhanced GRU unit to calculate the next hidden state and output. This process is repeated until all the input gravimeter data has been processed, resulting in a hidden state sequence H = {h1, h2, ..., h...}. T}, where h t ∈R h H is an h-dimensional hidden state vector, where T is the length of the input gravimeter data sequence. Finally, the last vector h of the hidden state sequence H is... T As an encoded vector, it is output to the decoder layer.
[0034] In the decoding stage, the encoding vector h is first... T ∈R h The initial hidden state is used as the decoder's initial hidden state, and a special start symbol <s> is used as the initial input to the decoder layer. Then, the current input and hidden state of the decoder layer are fed into a self-attention-enhanced GRU unit to calculate the next hidden state and output. This process is repeated until a special end symbol < / s> is output, or a maximum length T′ is reached, resulting in an output sequence Y = {y1, y2, ..., y...}. T′}, where y t ∈R d Y is a d-dimensional output vector, and T′ is the length of the output sequence, satisfying T′≤T. Finally, the output sequence Y is used as a reconstruction vector and output to the output layer.
[0035] The detection method of the present invention includes the following steps:
[0036] Step one: data collection of gravimeter
[0037] The data set of the present application is from the historical data of the operation of the gravimeter, the gravimeter has three subsystems and three core components, and the sampling frequency of the data is once every 3 minutes.
[0038] The gravimeter has three subsystems, namely the rotational temperature spectrum measurement subsystem, the large field of view gravimeter imaging subsystem and the fine spectrum detection subsystem, and the three subsystems collect voltage, current and other data on the branch circuit and environmental temperature and humidity and other environmental data at the subsystem. The data indicators collected by the three subsystems are shown in Table 1, mainly including voltage, current, environmental temperature and humidity and environmental noise of the subsystem.
[0039] Table 1 gravimeter subsystem data collection table
[0040]
[0041] In the three subsystems of the gravimeter, each subsystem has two core components, namely the CCD camera and the filter wheel, in addition, the gravimeter system has a core component TEC air conditioner, so the gravimeter system needs to collect data from three core components, and the data indicators are shown in Table 2.
[0042] Table 2 gravimeter subsystem data collection table
[0043]
[0044]
[0045] Environmental factors also have a very important influence on the normal operation of the gravimeter, so the gravimeter also needs to consider environmental factors when collecting data, and the environmental parameters that need to be collected include environmental temperature, environmental humidity, etc., as shown in Table 3.
[0046] Table 3 gravimeter environmental parameter table
[0047]
[0048]
[0049] According to the data collection requirements of the gravimeter, the original data of the gravimeter is a multivariate time series, and the collection data x t is expressed as:
[0050] x t =(x t1 ,x t2 ,...,x td ) (1.1)
[0051] where d is the dimension of the gravity wave instrument data features, such as ambient temperature, ambient humidity, working voltage value, etc. The gravity wave instrument multivariate time series data is represented as follows:
[0052] X = {x1, x2,..., x T} (1.2)
[0053] In the formula, T is the length of the time series.
[0054] Step two: gravity wave instrument data preprocessing
[0055] The quality of the gravity wave instrument data directly determines the effect of the fault detection and fault prediction model. However, the data collected from the gravity wave instrument contains redundant data, missing data, fault data and normal data. Therefore, the gravity wave instrument data needs to be preprocessed first, which includes data classification, deletion of redundant data, filling of missing data, merging of data sets, screening of data features and data standardization, etc. The gravity wave instrument data preprocessing flowchart is shown in Figure 2 .
[0056] According to Figure 2 , after collecting the original gravity wave instrument data, the original data needs to be classified and the redundant data in the data needs to be deleted to improve the quality and effectiveness of the data. Then the data completion model proposed in the application is used to complete the missing data. Finally, the completed data is screened for features and standardized to reduce the dimension and complexity of the data and eliminate the dimensional and scale differences of the data, facilitating subsequent data analysis and modeling. The data preprocessing process is as follows:
[0057] (1) Data classification
[0058] From the perspective of the running state of the gravity wave instrument, the data can be classified into normal data, redundant data, missing data, fault data, etc. If some data points or data segments do not meet the general rules of the normal working state curve of the gravity wave instrument, these points are referred to as fault data. The gravity wave instrument data is obtained through a sensor system, and the data collection process mainly includes data measurement, data storage and data transmission. However, any problem in the middle can cause the final collected gravity wave instrument data to have phenomena such as data duplication, data loss or data fluctuation.
[0059] (2) Delete redundant data
[0060] In the raw data set of the gravitational wave detector, the data of the same subsystem or core component ID repeatedly appears at the same timestamp, which inevitably exists redundant data. The useless redundant data can be directly deleted, and only the uniqueness of the subsystem or core component ID and the timestamp is retained. The redundant data of the gravitational wave detector is shown in the following table. Figure 3
[0061] (3) Missing value filling
[0062] Missing data refers to data items showing null or zero values in the raw data of the gravitational wave detector. Null and zero value data are mainly caused by data loss in the time period due to network interruption accidents and other factors in the data acquisition system network of the gravitational wave detector. For gravitational wave detector fault detection and fault prediction, these null or zero values are not real time series data. The existence of missing data will affect the distribution of normal data, thereby causing the accuracy of gravitational wave detector fault detection, so it is necessary to fill the missing data before fault detection. The present application fills the missing values by using the K-Nearest Neighbors Imputation (KNN) method.
[0063] (4) Feature selection
[0064] There is a certain correlation between data features, and some features are very similar. The feature selection method removes irrelevant and redundant dimensions from the original high-dimensional data and selects meaningful features to input into the model for training. Therefore, feature selection can improve fault detection accuracy, reduce the complexity of the fault detection model structure, reduce model training and inference time, and increase the interpretability of the model. The running state of the gravitational wave detector at each moment is always changing, and the correlation between the dimensions of the state data of the gravitational wave detector at each moment is also inconsistent. Feature selection of gravitational wave detector data can improve the generalization ability of the fault detection model.
[0065] The feature selection of gravitational wave detector data observes whether each dimension of the feature diverges by using the mean-variance selection method. The mean-variance selection method calculates the correlation between single-dimensional features and faults, and has the characteristics of high calculation efficiency and strong robustness. The mean-variance selection method is represented as:
[0066]
[0067]
[0068]
[0069] wherein, μ i represents the mean of i feature time series data, (σ i ) 2 represents the variance of i feature time series data, d i A feature score representing an i-th feature.
[0070] (5) Data standardization processing
[0071] After the data of the gravitational wave detector is filled and screened by features, the data amplitudes of each feature dimension are inconsistent, which greatly affects the convergence of training and the accuracy of reasoning. Data standardization processing can map the feature values of each dimension to [0, 1]. For the index data of the gravitational wave detector, there are some phenomena of large amplitude, sharp rise and sharp decline. The present application uses the Z-score data standardization method, and the mapping function is:
[0072]
[0073] In the formula, represents the original data of the feature dimension i at time t, μ i and σ i respectively represent the mean and standard deviation of the feature dimension i, represents the data standardized value at the current time t.
[0074] Step three: gravitational wave detector fault category analysis
[0075] In the process of gravitational wave detector fault detection, the present application collects internal parameters of the gravitational wave detector, such as temperature, humidity and noise intensity, as well as working voltage of the gravitational wave detector, input AC voltage value, output DC voltage value, and environmental TEC air conditioner temperature and other state data values. According to historical experience data, a fault analysis tree mechanism model is constructed, and the gravitational wave detector fault analysis tree is as shown in Figure 4 .
[0076] Step four: inputting gravitational wave detector multivariate time series data in the input layer
[0077] The gravitational wave detector fault detection flow chart is as shown in Figure 5 . First, the gravitational wave detector data is preprocessed, and then the training set is divided. Then the encoder hidden state is initialized, and the encoder hidden state is updated according to the current time step. When the time step reaches T, the attention score and weight are calculated. Next, the hidden state of the decoder is initialized, and the hidden state output by the encoder is reconstructed. If the reconstruction error exceeds the preset threshold, it is determined that a fault has occurred, and the fault category is determined.
[0078] The input layer of the gravitational wave detector fault detection model receives the gravitational wave detector multivariate time series data as the input of the model. The input of the input layer is a gravitational wave detector multivariate time series X = {x1, x2,..., x T}, where each data point x t = (x t1 , x t2..., x td ) contains multiple features such as ambient temperature, ambient humidity, working voltage value, etc., d is the dimension of the gravity wave instrument data features, represents the state of the gravity wave instrument at the t-th time point, and T is the length of the input sequence. The output of the input layer is the gravity wave instrument data sequence X as the input of the encoder and the decoder.
[0079] Step five: calculate the similarity of input vectors and encoding vectors in the encoder stage
[0080] In the encoder, the self-attention weight matrix A ∈ R T×T of the input gravity wave instrument multivariate time series X is calculated. ij , where A i represents the attention weight of the i-th input vector x j , and the calculation formula is:
[0081]
[0082] , where e ij is a scalar representing the similarity of x i and x j , and the calculation formula is:
[0083]
[0084] , where W a ∈ R d×d is a learnable weight matrix used to map the input vector and the encoding vector to the same space in order to calculate the similarity of the two vectors. is a scaling factor to prevent gradient vanishing or explosion.
[0085] Step six: calculate the self-attention output matrix in the encoding stage
[0086] In the encoder, the self-attention output matrix Z of the input gravity wave instrument multivariate time series X is calculated, and the calculation formula is:
[0087]
[0088] , where Z is the self-attention output matrix, Z ∈ R T×d , and Z i represents the self-attention output vector of the i-th input vector x i .
[0089] Step seven: calculate the hidden state sequence in the encoding stage
[0090] In the encoder, the self-attention output matrix Z is input into a standard GRU unit as input, and the hidden state sequence H = {h1, h2,..., hT}, wherein h t ∈ R h is an h-dimensional hidden state vector, which is calculated as follows:
[0091] r t = σ(W r Z t + U r h t-1 + b r ) (1.10)
[0092] z t = σ(W z Z t + U z h t-1 + b z ) (1.11)
[0093]
[0094]
[0095] where r t and z t are the reset gate and update gate for controlling the flow of information. σ is the sigmoid function, ⊙ is the element-wise multiplication, W r , W z , W h , U r , U z , U h ∈ R h×d and b r , b z , b h ∈ R h are the learnable weight matrices and bias vectors.
[0096] In the encoder, the last vector h T of the hidden state sequence H is taken as the encoding vector and output to the decoder.
[0097] Step eight: calculate the attention weight of the current input and the encoding vector in the decoder stage
[0098] In the decoding stage, the encoding vector h T ∈ R h is taken as the initial hidden state of the decoder, and a special start symbol <s> is taken as the initial input of the decoder layer.
[0099] In the decoder, the encoding vector h TAs the initial hidden state h0, the start symbol <s> is used as the initial input y0. For each time step t = 1, 2, ..., T′, the current input y is calculated. t-1 and encoding vector h T Attention weight A t The calculation formula is:
[0100]
[0101] Among them, e t It is a scalar, representing y t-1 and h T The similarity is calculated using the following formula:
[0102]
[0103] Among them, W a ∈R d×h It is a learnable weight matrix. It is a scaling factor used to prevent gradient vanishing or exploding.
[0104] Step 9: Calculate the self-attention output of the current input during the decoding phase.
[0105] In the decoder, the current input y is calculated. t-1 Self-attention output Z t The calculation formula is:
[0106] Z t =A t y t-1 (1.16)
[0107] Step 10: Calculate the hidden state of the current input during the decoding phase.
[0108] In the decoder, the self-attention output Z is... t As input, it is fed into a standard GRU unit to compute the next hidden state h. t and output y t Hidden state h t The calculation formula is the same as the formula for calculating the hidden state by the GRU unit in the encoder. For details, please refer to formulas 1.4 to 1.7. The output y... t The calculation formula is:
[0109] y t =W y h t +b y (1.17)
[0110] Among them, b y ∈R h It is the bias vector.
[0111] Step eleven: output the result of current time step
[0112] In the decoder, output the next hidden state h t and output y t as the result of current time step. If output y t is an end symbol < / s >, or the maximum length T' is reached, stop the calculation, output the sequence Y = { y1, y2,..., y T′} and output Y as the reconstruction vector to the output layer.
[0113] Step twelve: output layer outputs the reconstruction vector
[0114] In the output layer, first align the input gravitational wave detector multivariate time series data X = { x1, x2,..., x T} and the reconstruction vector Y = { y1, y2,..., y T′} so that the length of the input data and the reconstruction vector is the same. If T' < T, pad zeros at the end of Y to get the aligned reconstruction vector where is a d-dimensional vector and T is the length of the input gravitational wave detector data.
[0115] Step thirteen: calculate the reconstruction error
[0116] Calculate the Euclidean distance between the gravitational wave detector data X and the aligned reconstruction vector as the reconstruction error E, the calculation formula is:
[0117]
[0118] where x ti and represent the i-th element of x t and respectively, and d is the feature dimension of the input data.
[0119] Step fourteen: output the reconstruction error
[0120] Output the reconstruction error E as the basis for fault detection. If E exceeds a preset threshold θ, it is determined that the gravitational wave detector has a fault, otherwise it is determined that the gravitational wave detector is normal. In order to ensure the effectiveness of the reconstruction error threshold θ in different situations, dynamic adjustment of the reconstruction error threshold is required.
[0121] The gravity wave instrument dataset is divided into a training set and a validation set, and the gravity wave instrument fault detection model is trained using the training set. After the gravity wave instrument fault detection model is trained, forward propagation is performed on each sample in the training set and the reconstruction error is calculated. Then, the reconstruction error on the training set is counted, the mean and standard deviation are calculated, and the calculation formula is as follows:
[0122]
[0123]
[0124] wherein, is the mean of the reconstruction error of all samples in the gravity wave instrument training dataset, s E is the standard deviation of the reconstruction error of all samples in the gravity wave instrument training dataset, N t is the total number of samples in the gravity wave instrument training dataset, E i is the reconstruction error of the i-th sample in the training dataset.
[0125] In the fault detection model verification stage, first, the mean and the standard deviation s E obtained on the training set are used to calculate the threshold, and the calculation formula is as follows:
[0126]
[0127] wherein, k is the threshold adjustment parameter.
[0128] The obtained threshold is used to infer on the gravity wave instrument validation set, and the reconstruction error of each sample on the validation set is calculated. Finally, the performance of the gravity wave instrument fault detection model under different thresholds is analyzed, and if the model performance is not ideal, the threshold and model parameters need to be iteratively fine-tuned.
[0129] Step fifteen: calculate the loss function of the fault detection task
[0130] The goal of the fault detection task is to determine whether the gravity wave instrument has failed, which is a binary classification problem, so the binary cross-entropy loss function is used, and the calculation is as follows:
[0131]
[0132] wherein, N is the number of samples in the gravity wave instrument dataset, y d,i is the true fault detection result of the i-th sample, is the predicted fault detection result of the i-th sample, and log is the natural logarithm.
[0133] Step sixteen: fault category determination
[0134] The full connection layer makes a fault class determination according to the encoding vector, and outputs a fault class probability distribution representing the fault type of the gravitational wave instrument. First, the encoding vector h T The input full connection layer calculates the gravitational wave instrument fault class vector m ∈ R c , where c is the number of gravitational wave instrument fault classes, and the calculation formula is:
[0135] m = W m h T + b m (1.23)
[0136] where W m ∈ R c×h and b m ∈ R c are learnable weight matrix and bias vector.
[0137] Step seventeen: calculate the fault class probability distribution
[0138] Apply the softmax function to the gravitational wave instrument fault class vector m to obtain the fault class probability distribution p ∈ R c , and the calculation formula is:
[0139]
[0140] where p i represents the probability of the i-th gravitational wave instrument fault class.
[0141] Step eighteen: calculate the loss function of the fault class determination task
[0142] The goal of the fault class determination task is to determine which type of fault occurred in the gravitational wave instrument, which is a multi-classification problem. Therefore, the multivariate cross-entropy loss function is used, and the calculation is as follows:
[0143]
[0144] where N is the number of samples, C is the number of fault classes, y c,i,j is the true label of the j-th fault class of the i-th sample, is the predicted probability of the j-th fault class of the i-th sample, and log is the natural logarithm.
[0145] Step nineteen: output the gravitational wave instrument fault class probability distribution
[0146] The full connection layer outputs the gravitational wave instrument fault class probability distribution p, which is used as the basis for determining the gravitational wave instrument fault class, where c is the number of gravitational wave instrument fault classes, and p iProbability of the i-th gravity wave instrument failure category. The probability distribution p represents the possibility of each kind of failure of the gravity wave instrument. The failure type of the gravity wave instrument can be determined according to the maximum value of p, or whether the gravity wave instrument has occurred a certain kind of failure can be determined according to the threshold value of p. For example, if the first dimension of p represents the voltage overload failure, the second dimension represents the system ambient temperature high failure, and the third dimension represents the ambient humidity high failure, if p = [0.8, 0.1, 0.1], it is determined that the gravity wave instrument has occurred the voltage overload failure.
[0147] The above merely provides a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements shall be encompassed within the protection scope of the present application.
Claims
1. A method for detecting faults of a gravitational wave detector based on Seq2Seq, characterized in that The method comprises the following steps: collecting gravity wave instrument data; preprocessing the collected gravity wave instrument data to obtain gravity wave instrument multivariate time series data; inputting the gravity wave instrument multivariate time series data into a gravity wave instrument fault detection model; in the encoding stage, the encoder receives the gravity wave instrument multivariate time series data; the current input and hidden state of the encoder are input into a self-attention enhanced GRU unit to calculate the next hidden state and output; this process is repeated until all the input gravity wave instrument data is processed, and a hidden state sequence is obtained; the last vector of the hidden state sequence is taken as an encoding vector and output to the decoder layer; in the decoding stage, the encoding vector is taken as the initial hidden state of the decoder, and a special start symbol is taken as the initial input of the decoder layer; the current input and hidden state of the decoder layer are input into a self-attention enhanced GRU unit to calculate the next hidden state and output; this process is repeated until a special end symbol is output or a maximum length is reached, and an output sequence is obtained; the output sequence is taken as a reconstruction vector and output to the output layer; in the output layer, the input gravity wave instrument multivariate time series data and the reconstruction vector are aligned so that the lengths of the input data and the reconstruction vector are the same; calculating the reconstruction error; if the reconstruction error exceeds a set threshold, it is determined that the gravity wave instrument is in a fault state, and the encoding vector is input into a fully connected layer for fault category determination, and finally a fault category probability distribution is output; the reconstruction error calculation formula is as follows: wherein, is the reconstruction error, and denote the and first element of the is the feature dimension of the input data, is the length of the input sequence. 2.The method of claim 1, wherein, the collected gravity wave instrument data is derived from a rotating temperature spectrum measurement subsystem, a large field of view gravity wave instrument imaging subsystem, a fine spectrum detection subsystem, a CCD camera, a filter wheel, a TEC air conditioner, and environmental parameters. 3.The method of claim 1, wherein, the preprocessing of the collected gravity wave instrument data comprises data classification, deletion of redundant data, filling of missing data, merging of data sets, screening of data features, and data standardization. 4.A Seq2Seq based gravitational wave detector fault detection device implementing the method of claim 1. The gravity wave instrument fault detection device comprises a gravity wave instrument fault detection model composed of an input layer, an encoder, a decoder, an output layer, and a fully connected layer; the input layer receives the gravity wave instrument multivariate time series data as the input of the model; the output of the input layer is the gravity wave instrument data sequence, which is input to the encoder and the decoder; in the encoding stage, the encoder receives the gravity wave instrument multivariate time series data, and the current input and hidden state of the encoder are input into a self-attention enhanced GRU unit to calculate the next hidden state and output; this process is repeated until all the input gravity wave instrument data is processed, and a hidden state sequence is obtained; the last vector of the hidden state sequence is taken as an encoding vector and output to the decoder layer; in the decoding stage, the output sequence is taken as a reconstruction vector and output to the output layer; if the reconstruction error exceeds a set threshold, it is determined that the gravity wave instrument is in a fault state, and the encoding vector is input into a fully connected layer for fault category determination, and finally a fault category probability distribution is output.
5. A computer system, characterized by The method comprises the following steps: one or more processors, a computer readable storage medium storing one or more programs for execution by the one or more processors, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1-3.
6. A computer-readable storage medium, characterized in that having computer-executable instructions stored therein which, when executed, implement the method of any one of claims 1-3.
Citation Information
Patent Citations
Promotion prediction method and system based on depth model
CN111126674A
Air quality prediction method based on variational recursive network and self-attention mechanism
CN113095550A