Anomaly detection method suitable for spacecraft telemetry data
By combining LSTM and Transformer models, the Transformer-LSTM model captures global and local dependencies in spacecraft telemetry data, solves the problem of difficulty in accurately detecting spacecraft faults in the existing technology, and achieves accurate anomaly detection of telemetry data. Improved detection performance.
Patent Information
- Application Number
- CN202410793845.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Existing technologies are difficult to accurately detect faults in spacecraft telemetry data, especially due to the large amount of data, high dimensions, and complex data relationships, which make it difficult to accurately detect faults using traditional methods.
A Transformer-LSTM model that combines LSTM and Transformer models is designed to capture the global and local dependencies in the time series through the Multi-HeadAttention mechanism. It is combined with the LSTM decoder to generate output and uses the 3σ criterion to determine the normal interval to realize the analysis of spacecraft telemetry data. Anomaly detection.
It achieves precise anomaly detection of spacecraft telemetry data, improves detection accuracy and performance, can better capture trend information of time series data, and is suitable for large-scale data processing.
Smart Images

Figure CN118690299A
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of satellite telemetry, and in particular relates to an anomaly detection method applicable to spacecraft telemetry data. Background Art
[0002] Modern aerospace industry is developing rapidly, and the functions of spacecraft are becoming more and more perfect. As a type of spacecraft, communication satellites have an important impact on the development of the country's aerospace industry. With the increasing complexity of the structure of communication satellites, their on-orbit failure rate has also increased significantly. Satellite telemetry parameters are one of the key indicators for evaluating satellite status. Their high dynamics and diversity make them a key reference for satellite performance and health status. Therefore, it has become an urgent task in the aerospace field to monitor, analyze and interpret satellite telemetry data to achieve fault detection and alarm of communication satellites. In this context, it has become crucial to develop an efficient method for detecting anomalies in satellite telemetry data, which is also one of the current main concerns in this field.
[0003] At present, there are four main methods for detecting anomalies in spacecraft telemetry data in the field: those based on manual monitoring combined with thresholds, those based on expert systems, those based on building models based on expert experience, and those based on machine learning. Among them, the method based on manual monitoring combined with thresholds requires a lot of time and human resources, is difficult to apply to large-scale data, and does not have good scalability. The method based on expert systems cannot effectively detect some unknown abnormal situations. Building models based on expert experience requires a lot of time to learn expert experience. For ultra-large-scale data, it is impossible to establish a corresponding model for each dimensional parameter, and it is impossible to record all abnormal situations. Machine learning can establish clustering models without labeled data, reducing the need for labeled data. At the same time, deep learning technology shows strong adaptability in time series data processing, can better capture the trend information of time series data, and has the ability to process large-scale data. Therefore, compared with traditional methods, methods based on machine learning have better adaptability and performance in the field of satellite fault detection.
[0004] However, current fault detection is still based on simple threshold detection, which can only detect some specific faults. In addition, satellite telemetry data has the characteristics of large data volume, high dimension, and complex data relationships, making it difficult to accurately detect faults using traditional detection methods. Summary of the invention
[0005] The purpose of the present invention is to provide an anomaly detection method suitable for spacecraft telemetry data, which can combine the ability of LSTM model to capture long-term dependencies and the ability of Transformer model to capture global dependencies, and design a Transformer-LSTM model that can more accurately detect anomalies in telemetry data.
[0006] The technical solution adopted by the present invention is as follows:
[0007] A method for detecting anomalies in spacecraft telemetry data, the method comprising the following steps:
[0008] S1: Data acquisition, select a spacecraft, this spacecraft is specific, obtain its telemetry data, and select parameters related to electrical characteristics from the telemetry data, and divide the parameter data set into training data and test data in a ratio of 4:6;
[0009] S2: Preprocess the data, which includes the following steps:
[0010] S21: Perform data filling. According to the trend of telemetry parameter changes, the missing data points are filled by taking the average value of the previous second and the next second. If a parameter is always missing, it is filled with 0.
[0011] S22: directly delete the data points with discontinuous jump characteristics;
[0012] S23: Parameter normalization ensures that different features have similar value ranges to prevent certain features from dominating the calculation process;
[0013] S3: Define training data as y train y train , the test data is y test y test , the prediction result data obtained by inputting the model is defined as y pre y pre , set 3σ as the sample normal variance standard. train y train Input Transformer-LSTM model;
[0014] S4: Calculate y test With y pre The distance is 3σ, and the normal interval is determined using the 3σ criterion, that is, data samples with variance exceeding the 3σ interval are considered abnormal;
[0015] S5: Once the model training is complete, it is deployed for anomaly detection in spacecraft telemetry data.
[0016] In S3, the model training process includes the following steps:
[0017] S31: According to the input data y train , design a Transformer encoder with an appropriate number of layers;
[0018] S32: The Transformer encoder continuously learns the changing trends and laws of the spacecraft time series through the Multi-Head Attention mechanism, and obtains an output that can effectively represent the changing laws of several parameter sequences of the input spacecraft;
[0019] S33: The LSTM decoder receives the output of the Transformer encoder as input in chronological order and uses the output as the initial hidden state;
[0020] S34: The LSTM decoder receives a special start symbol to generate the target sequence, and receives the output of the previous time step and the hidden state of the current time step at each time step to generate the output of the current time step and update the current hidden state until the output y is obtained. pre .
[0021] In S3, the modeling method is as follows:
[0022] a. Design an N-layer Transformer encoder, each layer contains a Multi-Head Attention sublayer and a feedforward neural network sublayer. Assume that the input is X∈R L×F , represents L F-dimensional vectors;
[0023] b. Transformer encoder represents a function T:R L×F →R L×F ;
[0024] Where T is composed of T1(·), T2(·), …, T N (·) These N layers, each of which can be represented by T m (X) = f m (Attention m (x)+x), f m (·) is a simple feed-forward neural network layer, Attention m (x) is the self-attention mechanism function;
[0025] c. The LSTM decoder receives the output X of the Transformer encoder output ∈R L×F As input, and set as the initial hidden state H0, initialize the weight parameters and memory cell C0 of the LSTM decoder;
[0026] d. At each time step t, the LSTM decoder receives input X t and the hidden state H of the previous time step t-1 , then calculate the input gate I t 、Forget Gate F t , output gate Ot and candidate memory cells The calculation formulas are as follows:
[0027] I t =σ(X t W xi +H t-1 W hi +b i )
[0028] F t =σ(X t W xf +H t-1 W hf +b f )
[0029] O t =σ(X t W xo +H t-1 W ho +b o )
[0030]
[0031] Among them, W xi , W xf , W xo , W hi , W hf , W ho 、b i 、b f 、b o , W xc , W hc is the weight parameter of the LSTM model.
[0032] Renew memory cells C t and the hidden state H t , where the input gate I t and forget gate F t To update memory cells C t , using output gate O t and the updated memory cell C t To calculate the hidden state H of the current time step t .
[0033] In step d, the updating process is modeled as follows:
[0034]
[0035] H t =O t ⊙tanh(C t )
[0036] Among them, ⊙ represents element-wise multiplication; until the time step ends, the output y is obtained pre .
[0037] In S4, the credibility method of determining the normal interval using the 3σ criterion is as follows:
[0038] S41: Introduce Gaussian distribution parameters μ and σ for prediction error, use standard deviation multiplier N as adjustment parameter, and follow the principle of maximizing correlation coefficient;
[0039] S42: In order to measure the credibility of the standard, r is used to represent the actual fault value y and the predicted fault value The correlation coefficient between the two variables ranges from -1 to 1, with a value of 1 indicating a perfect linear match between the two variables.
[0040] In S41, binary variables y and y represents the actual fault value, Indicates the predicted fault value. A value of 0 indicates no fault, and a value of 1 indicates a fault occurs. Defines the fault value predicted by the i time series The calculation formula is as follows:
[0041]
[0042] The calculation formula in S42 is as follows:
[0043]
[0044] The technical effects achieved by the present invention are:
[0045] The present invention is an anomaly detection method for spacecraft telemetry data. Through the Multi-HeadAttention mechanism, it can capture the relationship between different time steps in the sequence. Moreover, due to the parallel computing capability of Transformer, it will not give higher weight to the data at the nearest time point, and can also extract distant time series features. Therefore, the output of the Transformer encoder can effectively represent the change law of several parameter sequences of the input spacecraft. In this process, the Transformer encoder helps to model the normal operation mode of the spacecraft, providing a basis for subsequent anomaly detection.
[0046] The present invention discloses an anomaly detection method for spacecraft telemetry data, which is suitable for anomaly detection of spacecraft telemetry data. The Transformer encoder is combined with the LSTM decoder, which complements each other and can not only learn the global laws of time series data, but also grasp the local time dependency, thereby realizing accurate detection of abnormal data. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of an embodiment of the present invention;
[0048] Figure 2 It is a structural diagram of the LSTM model of an embodiment of the present invention;
[0049] Figure 3 is a structural diagram of a Transformer model according to an embodiment of the present invention;
[0050] Figure 4 It is a performance comparison chart of the embodiments of the present invention using the LSTM model, Transformer model and Transformer-LSTM model for detection. DETAILED DESCRIPTION
[0051] In order to make the purpose and advantages of the present invention more clearly understood, the present invention is specifically described below in conjunction with embodiments. It should be understood that the following text is only used to describe one or several specific embodiments of the present invention, and does not strictly limit the scope of protection of the specific claims of the present invention.
[0052] like Figure 1-Figure 4 As shown in the figure, LSTM is a special recurrent neural network consisting of an input gate, a forget gate, an output gate, and memory cells for recording additional information. LSTM takes into account time and nonlinear relationships on the basis of learning the rules between complex data, and has excellent modeling capabilities for the temporal information of sequence data. The LSTM decoder takes the output of the Transformer encoder as input and predicts the future values of the time series of several spacecraft parameters in chronological order. The output of each time step is affected by the input of the current time step and the memory of the previous time step, which enables LSTM to capture temporal information and trends well. This dependency between moments is transmitted through the memory of the cell state, giving full play to the unique advantages of LSTM in local sequential modeling.
[0053] The Transformer model is a deep learning model with powerful sequence modeling and feature extraction capabilities. In the field of spacecraft telemetry data anomaly detection, the role of the Transformer encoder is to process the input telemetry data sequence to learn the changing trends and laws of the spacecraft time series. Through the Multi-Head Attention mechanism, it can capture the relationship between different time steps in the sequence, and due to the parallel computing capability of the Transformer, it will not give higher weight to the data at the nearest time point, and can also extract distant time series features. Therefore, the output of the Transformer encoder can effectively represent the changing laws of several parameter sequences of the input spacecraft. In this process, the Transformer encoder helps to model the normal operating mode of the spacecraft and provides a basis for subsequent anomaly detection.
[0054] The present invention is applicable to the anomaly detection of spacecraft telemetry data. It combines the Transformer encoder with the LSTM decoder, which complement each other and can not only learn the global laws of time series data, but also grasp the local time dependency, thereby realizing the accurate detection of abnormal data. The specific implementation steps are as follows:
[0055] A method for detecting anomalies in spacecraft telemetry data, the method comprising the following steps:
[0056] S1: Data acquisition, select a specific spacecraft, obtain its telemetry data, and select parameters related to electrical characteristics from the telemetry data. Since fault data is difficult to obtain, this experiment uses spacecraft periodic events as abnormal data. The total number of data sets involved in the final periodic events is 125,000, and the number of abnormal points is 25,000. Divide the parameter data set into training data and test data in a ratio of 4:6;
[0057] S2: Preprocess the data, which includes the following steps:
[0058] S21: Perform data filling. According to the trend of telemetry parameter changes, the missing data points are filled by taking the average value of the previous second and the next second. If a parameter is always missing, it is filled with 0.
[0059] S22: directly delete the data points with discontinuous jump characteristics;
[0060] S23: Parameter normalization ensures that different features have similar value ranges to prevent certain features from dominating the calculation process;
[0061] S3: Define training data as y train y train , the test data is y test y test, the prediction result data obtained by inputting the model is defined as y pre y pre , set 3σ as the sample normal variance standard. train y train Input Transformer-LSTM model;
[0062] S4: Calculate y test With y pre The distance is 3σ, and the normal interval is determined using the 3σ criterion, that is, data samples with variance exceeding the 3σ interval are considered abnormal;
[0063] S5: Once the model training is complete, it is deployed for anomaly detection in spacecraft telemetry data.
[0064] In S3, the model training process includes the following steps:
[0065] S31: According to the input data y train , design a Transformer encoder with an appropriate number of layers;
[0066] S32: The Transformer encoder continuously learns the changing trends and laws of the spacecraft time series through the Multi-Head Attention mechanism, and obtains an output that can effectively represent the changing laws of several parameter sequences of the input spacecraft;
[0067] S33: The LSTM decoder receives the output of the Transformer encoder as input in chronological order and uses the output as the initial hidden state;
[0068] S34: The LSTM decoder receives a special start symbol to generate the target sequence, and receives the output of the previous time step and the hidden state of the current time step at each time step to generate the output of the current time step and update the current hidden state until the output y is obtained. pre .
[0069] In S3, the modeling method is as follows:
[0070] a. Design an N-layer Transformer encoder, each layer contains a Multi-Head Attention sublayer and a feedforward neural network sublayer. Assume that the input is X∈R L×F , represents L F-dimensional vectors;
[0071] b. Transformer encoder represents a function T:R L×F →R L×F ;
[0072] Where T is composed of T1(·), T2(·), …, TN (·) These N layers, each of which can be represented by T m (X) = f m (Attention m (x)+x), f m (·) is a simple feed-forward neural network layer, Attention m (x) is the self-attention mechanism function;
[0073] c. The LSTM decoder receives the output X of the Transformer encoder output ∈R L×F As input, and set as the initial hidden state H0, initialize the weight parameters of the LSTM decoder (such as W xi , W xf , W xo , W hi , W hf , W ho 、b i 、b f 、b o , W xc , W hc 、b c etc.) and memory cell C0; these parameters will be gradually updated during the training process.
[0074] d. At each time step t, the LSTM decoder receives input X t and the hidden state H of the previous time step t-1 , then calculate the input gate I t 、Forget Gate F t , output gate O t and candidate memory cells The calculation formulas are as follows:
[0075] I t =σ(X t W xi +H t-1 W hi +b i )
[0076] F t =σ(X t W xf +H t-1 W hf +b f )
[0077] O t =σ(X t W xo +H t-1 W ho +bo )
[0078]
[0079] Among them, W xi , W xf , W xo , W hi , W hf , W ho 、b i 、b f 、b o , W xc , W hc is the weight parameter of the LSTM model.
[0080] Renew memory cells C t and the hidden state H t , where the input gate I t and forget gate F t To update memory cells C t , using output gate O t and the updated memory cell C t To calculate the hidden state H of the current time step t .
[0081] In step d, the update process is modeled as follows:
[0082]
[0083] H t =O t ⊙tanh(C t )
[0084] Among them, ⊙ represents element-wise multiplication; until the time step ends, the output y is obtained pre .
[0085] In S4, the credibility of the normal interval is determined using the 3σ criterion as follows:
[0086] S41: Introduce Gaussian distribution parameters μ and σ for prediction error, use standard deviation multiplier N as adjustment parameter, and follow the principle of maximizing correlation coefficient;
[0087] S42: In order to measure the credibility of the standard, r is used to represent the actual fault value y and the predicted fault value The correlation coefficient between the two variables ranges from -1 to 1, with a value of 1 indicating a perfect linear match between the two variables.
[0088] In S41, define binary variables y and y represents the actual fault value, Indicates the predicted fault value. A value of 0 indicates no fault, and a value of 1 indicates a fault occurs. Defines the fault value predicted by the i time series The calculation formula is as follows:
[0089]
[0090] The calculation formula in S42 is as follows:
[0091]
[0092] Finally, by adjusting different parameters N, we can get y and The changes in the correlation between the two are shown in the following table:
[0093] Nσ r 2σ 0.9027 3σ 0.9428 4σ 0.8976 5σ 0.8791 6σ 0.7863
[0094] It can be seen from the data in the table that the correlation coefficient between the actual fault value and the predicted fault value corresponding to 3σ is closer to 1, which also shows the credibility of using the 3σ criterion to determine the normal interval.
[0095] like Figure 4 As shown in the figure, the precision, recall and F1 values obtained by the three models after abnormal data detection directly reflect the accuracy, coverage and overall performance of the model. In terms of precision, the Transformer-LSTM model shows higher accuracy than the other two models, indicating that the model can misjudge normal data as abnormal data less often. In terms of recall, the Transformer-LSTM model also shows better performance, which means that our model can better capture real abnormal data. The Transformer-LSTM model is also significantly better than the other two models in F1 value, indicating that it has achieved a better balance in the abnormal data detection task and has better performance.
[0096] The above is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention shall be implemented according to the conventional means in the art unless otherwise specified and limited.
Claims
1. An anomaly detection method for spacecraft telemetry data, Features: The detection method comprises the following steps: S1: Data acquisition: select a spacecraft, obtain its telemetry data, and select parameters related to electrical characteristics from the telemetry data. Divide the parameter data set into training data and test data in a ratio of 4:6; S2: Preprocess the data, which includes the following steps: S21: Perform data filling. According to the trend of telemetry parameter changes, the missing data points are filled by taking the average value of the previous second and the next second. If a parameter is always missing, it is filled with 0. S22: directly delete the data points with discontinuous jump characteristics; S23: Parameter normalization, ensuring that different features have similar value ranges; S3: Define training data as y train y train , the test data is y test y test , the prediction result data obtained by inputting the model is defined as y pre y pre , set 3σ as the sample normal variance standard, and transform the training data y train y train Input Transformer-LSTM model; S4: Calculate y test With y pre The distance is 3σ, and the normal interval is determined using the 3σ criterion, that is, data samples with variance exceeding the 3σ interval are considered abnormal; S5: Once the model training is complete, it is deployed for anomaly detection in spacecraft telemetry data.
2. The method for detecting anomalies of spacecraft telemetry data according to claim 1, Features: In S3, the model training process includes the following steps: S31: According to the input data y train , design a Transformer encoder with a suitable number of layers; S32: The Transformer encoder continuously learns the changing trends and laws of the spacecraft time series through the Multi-Head Attention mechanism, and obtains an output that can effectively represent the changing laws of several parameter sequences of the input spacecraft; S33: The LSTM decoder receives the output of the Transformer encoder as input in chronological order and uses the output as the initial hidden state; S34: The LSTM decoder receives a special start symbol to generate the target sequence, and receives the output of the previous time step and the hidden state of the current time step at each time step to generate the output of the current time step and update the current hidden state until the output y is obtained. pre .
3. The method for detecting anomalies of spacecraft telemetry data according to claim 1, Features: In S3, the modeling method is as follows: a. Design an N-layer Transformer encoder, each layer contains a Multi-Head Attention sublayer and a feedforward neural network sublayer. Assume that the input is X∈R L×F , represents L F-dimensional vectors; b. Transformer encoder represents a function T:R L×F →R L×F ; Among them, T is composed of T 1 (·),T 2 (·),…,T N (·) These N layers, each of which can be represented by T m (X) = f m (Attention m (x)+x), f m (·) is a simple feed-forward neural network layer, Attention m (x) is the self-attention mechanism function; c. The LSTM decoder receives the output X of the Transformer encoder output ∈R L×F As input, and set as the initial hidden state H 0 , initialize the weight parameters and memory cells C of the LSTM decoder 0 ; d. At each time step t, the LSTM decoder receives input X t and the hidden state H of the previous time step t-1 , then calculate the input gate I t 、Forget Gate F t , output gate O t and candidate memory cells The calculation formulas are as follows: I t =σ(X t W xi +H t-1 W hi +b i ) F t =σ(X t W xf +H t-1 W hf +b f ) O t =σ(X t W xo +H t-1 W ho +b o ) Among them, W xi , W xf , W xo , W hi , W hf , W ho , b i , b f , b o , W xc , W hc is the weight parameter of the LSTM model; Renew memory cells C t and the hidden state H t , where the input gate I t and forget gate F t To update memory cells C t , using output gate O t and the updated memory cell C t To calculate the hidden state H of the current time step t .
4. The method for detecting anomalies of spacecraft telemetry data according to claim 3, Features: In step d, the updating process is modeled as follows: H t =O t ⊙tanh(C t ) Among them, ⊙ represents element-wise multiplication; until the time step ends, the output y is obtained pre .
5. The method for detecting anomalies of spacecraft telemetry data according to claim 1, Features: In S4, the credibility method of determining the normal interval using the 3σ criterion is as follows: S41: Introduce Gaussian distribution parameters μ and σ for prediction error, use standard deviation multiplier N as adjustment parameter, and follow the principle of maximizing correlation coefficient; S42: In order to measure the credibility of the standard, r is used to represent the actual fault value y and the predicted fault value The correlation coefficient between the two variables ranges from -1 to 1, with a value of 1 indicating a perfect linear match between the two variables.
6. The method for detecting anomalies of spacecraft telemetry data according to claim 5, Features: In S41, binary variables y and y represents the actual fault value, Indicates the predicted fault value. A value of 0 indicates no fault, and a value of 1 indicates a fault occurs. Defines the fault value predicted by the i time series The calculation formula is as follows:
7. The method for detecting anomalies in spacecraft telemetry data according to claim 5, Features: The calculation formula in S42 is modeled as follows:
8. The method for detecting anomalies of spacecraft telemetry data according to claim 1, Features: In S2, parameter normalization is used to reduce the local features dominating the calculation process.
Citation Information
Patent Citations
Open circuit fault identification method for fan converter based on long short time memory (LSTM)
CN109738776A
Spacecraft telemetry data exception detection method based on integrated LSTM
CN109934337A
Internet of Things data analysis and anomaly detection method and system
CN116796256A
TransformerLSTM-based ship anomaly detection method
CN116955945A
Unsupervised Web attack detection method based on Transform and comparative learning
CN117494121A
