Satellite momentum wheel anomaly detection method, device, electronic equipment and storage medium
Through the multi-head sparse self-attention layer and dynamic time warping algorithm of the momentum wheel health model, the waveform characteristics of the satellite momentum wheel telemetry data are extracted, which solves the problems of low efficiency and poor reliability in the existing technology and realizes efficient and accurate anomaly detection.
Patent Information
- Application Number
- CN202411509674.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-10-28
AI Technical Summary
In the existing technology, anomaly detection of satellite momentum wheels relies on expert experience, which is inefficient, unreliable and poorly transferable, and cannot effectively utilize the shape features in telemetry data.
The momentum wheel health model is adopted to perform mean sampling on the telemetry data through a multi-head sparse self-attention layer and a dynamic time warping algorithm to extract waveform features. The prediction is combined with the attention weight matrix to ensure that key features are not lost and reduce computational complexity.
The accuracy and efficiency of satellite momentum wheel anomaly detection are improved, the computational complexity and memory usage are reduced, and the accuracy of model prediction is improved.
Smart Images

Figure CN119416115B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of satellite fault diagnosis, and in particular to a method, device, electronic device, and storage medium for detecting anomalies of a satellite momentum wheel. Background Art
[0002] Momentum wheels are commonly used as attitude control actuators on satellites and play a vital role in maintaining satellite attitude. Multidimensional telemetry values, such as the wheel's speed, control voltage, and motor current, not only reflect the wheel's operating status but also provide information on its performance, lifespan, and reliability. Abnormal multidimensional telemetry values associated with a satellite's momentum wheels indicate possible structural degradation or other faults. Therefore, these multidimensional telemetry values can be used to monitor and provide early warnings about the wheel's operating and health status.
[0003] Related technologies primarily rely on expert knowledge. Experts in the field of satellite momentum wheels, based on their experience, set different alarm thresholds for momentum wheel speed, motor current, control voltage, friction torque, shaft temperature, shell temperature, and drive circuit shell temperature, forming a fault tree. For example, if the shaft temperature exceeds 40°C for five consecutive hours, a shaft temperature alarm is triggered.
[0004] However, setting different early warning strategies for different telemetry values based on expert experience is inefficient, unreliable, and has poor portability. Summary of the Invention
[0005] The present disclosure provides a method, device, electronic device and storage medium for detecting anomalies of a satellite momentum wheel. The method can extract shape features from serial telemetry data of a satellite momentum wheel, reduce computational complexity, improve prediction accuracy, and retain key features of the serial telemetry data through mean sampling.
[0006] The technical solution of the present disclosure is achieved as follows:
[0007] In a first aspect, the present disclosure provides a method for detecting anomalies of a satellite momentum wheel, the method comprising:
[0008] The input data of the momentum wheel health model is obtained, and the input data includes: the time series telemetry data and mask time series data of the first period of the satellite momentum wheel, the time series data of the second period in the masked time series data is the mask, and the second period is a period of preset length after the first period; the time series telemetry data of the first period is input into the momentum wheel health model, and the input data is mean sampled through the multi-head sparse self-attention layer included in the momentum wheel health model to obtain the sampled input data; based on the sampled input data, the waveform characteristics of the input data are extracted through the dynamic time warping algorithm to obtain the attention weight matrix; according to the attention weight matrix and the input data, the output prediction data of the second period is obtained; according to the prediction data of the second period and the collected telemetry data of the satellite momentum wheel of the second period, it is determined whether the satellite momentum wheel is abnormal.
[0009] In a second aspect, the present disclosure provides an abnormality detection device for a satellite momentum wheel, which includes: an acquisition part, an input-output part, a feature extraction part and a determination part; the acquisition part is configured to acquire input data of a momentum wheel health model, the input data including: time series telemetry data and masked time series data of a first period of the satellite momentum wheel, the time series data of a second period in the masked time series data being a mask, and the second period being a period of preset length after the first period; the input-output part is configured to input the time series telemetry data of the first period into the momentum wheel health model, and perform mean sampling on the input data through a multi-head sparse self-attention layer included in the momentum wheel health model to obtain the sampled input data; the feature extraction part is configured to extract the waveform features of the input data based on the sampled input data through a dynamic time warping algorithm to obtain an attention weight matrix; the input-output part is further configured to obtain output prediction data of the second period based on the attention weight matrix and the input data; the determination part is configured to determine whether the satellite momentum wheel is abnormal based on the prediction data of the second period and the collected telemetry data of the second period of the satellite momentum wheel.
[0010] In a third aspect, the present disclosure provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the satellite momentum wheel anomaly detection method as described in the first aspect.
[0011] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a program or instruction. When the program or instruction is executed by a processor, the steps of the satellite momentum wheel anomaly detection method as described in the first aspect are implemented.
[0012] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product includes a computer program or instructions. When the computer program product runs on a processor, the processor executes the computer program or instructions to implement the steps of the satellite momentum wheel anomaly detection method as described in the first aspect.
[0013] In a sixth aspect, the present disclosure provides a chip comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the satellite momentum wheel anomaly detection method as described in the first aspect.
[0014] The present disclosure provides a method for detecting anomalies of a satellite momentum wheel, the method comprising: obtaining input data of a momentum wheel health model, the input data comprising: time-series telemetry data and masked time-series data of a first time period of the satellite momentum wheel, the time-series data of a second time period in the masked time-series data being a mask, and the second time period being a time period of a preset length after the first time period; inputting the time-series telemetry data of the first time period into the momentum wheel health model, performing mean sampling on the input data through a multi-head sparse self-attention layer included in the momentum wheel health model to obtain sampled input data; extracting waveform features of the input data based on the sampled input data through a dynamic time warping algorithm to obtain an attention weight matrix; obtaining output prediction data of a second time period according to the attention weight matrix and the input data; and determining whether the satellite momentum wheel is abnormal according to the prediction data of the second time period and the collected telemetry data of the second time period of the satellite momentum wheel. Compared with the random sampling of the Informer model, which is prone to losing key features, in this disclosure, mean sampling is used to ensure that all input data contributes, avoiding the loss of key features while reducing the calculation dimension. In addition, the waveform characteristics of the input data can be extracted through the dynamic time warping algorithm, ensuring that the final feature expression contains more information, thereby improving the accuracy of model prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of the network structure of an Informer model provided by the present disclosure;
[0016] Figure 2 A schematic flow chart of a method for detecting anomalies of a satellite momentum wheel provided by the present disclosure;
[0017] Figure 3 A schematic diagram comparing the waveform of the actual value of the momentum wheel housing temperature and the waveform of the predicted value of the momentum wheel housing temperature provided by the present disclosure;
[0018] Figure 4 A schematic diagram of the health statistics provided for this disclosure;
[0019] Figure 5Anomaly confirmation line chart provided for this disclosure;
[0020] Figure 6 A schematic diagram of the network structure of the momentum wheel health model provided by the present disclosure;
[0021] Figure 7 Schematic diagram of the process of processing input data by the multi-head sparse self-attention layer provided in this disclosure;
[0022] Figure 8 This is a structural block diagram of a satellite momentum wheel anomaly detection device provided by the present disclosure;
[0023] Figure 9 A schematic diagram of the hardware structure of an electronic device provided by the present disclosure. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in this disclosure to clearly describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.
[0025] The terms "first," "second," and the like in the specification of this application are used to distinguish similar objects, and are not used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the present disclosure can be implemented in an order other than that illustrated or described herein. Furthermore, the objects distinguished by "first," "second," and the like generally refer to a class of objects, and do not limit the number of objects. For example, the first object may be one or more.
[0026] Since the telemetry data of the satellite momentum wheel is time-series, and the time-series characteristics in the telemetry data can reflect the changes in the working status of the momentum wheel, whether the momentum wheel is working normally is usually not only checked by checking the telemetry value of a sampling point, but also by combining the telemetry value of the sampling point and the telemetry values of a certain range of samples before and after the sampling point to comprehensively consider whether there is any abnormality in the momentum wheel.
[0027] For time series prediction, the existing Transformer and Informer models have good time series prediction capabilities. However, the Transformer model's self-attention mechanism has quadratic time complexity, meaning the amount of computation increases quadratically with the length of the sequence. This results in very high computational costs for long sequences. Furthermore, because attention weights for all positions need to be stored, the Transformer model consumes a lot of memory, especially when processing long sequences. Furthermore, the encoder and decoder structure used by the Transformer model requires step-by-step decoding, which results in slower inference speeds when predicting long sequences.
[0028] Based on the aforementioned shortcomings of the Transformer model, the Informer model was developed by improving upon them. The Informer model's self-attention mechanism selects important attention weights for calculation via a probability distribution method, effectively reducing computational effort and memory usage. Self-attention distillation emphasizes the importance of attention by halving the input to the cascade layer, effectively processing extremely long input sequences and improving the model's computational efficiency and predictive performance. Unlike the Transformer's step-by-step decoding method, the Informer's decoder can predict entire long time series at once, significantly improving the inference speed of long-sequence predictions.
[0029] like Figure 1 As shown in Figure 1, it is a schematic diagram of the network structure of the Informer model. The input data 101 is processed by the clear code multi-head probability distribution sparse self-attention layer 102 to obtain the first encoding matrix with attention weights. The distillation layer 103 uses a layer-by-layer dimensionality reduction method to reduce the time dimension of the self-attention mechanism. This process is achieved through the maximum pooling function in the convolutional network. The fully connected layer 104 is used to fuse the coded data after dimensionality reduction to obtain hidden state data. The decoder has two inputs, one for the hidden state data and the other for the mask data 105. The mask data 105 uses "0" as a mask for the data to be predicted. The mask data 105 is processed by the masked multi-head probability distribution sparse self-attention layer 106 to obtain the second encoding matrix with attention weights. The multi-head self-attention layer 107 calculates and encodes the attention weights based on the second encoding matrix and the fused encoding data, and outputs a third encoding matrix with attention weights. After the third encoding matrix is fused by the fully connected layer 108, the output 109 is predicted. The predicted sequence is the shaded part in the output 109.
[0030] It should be noted that Figure 1The figure shows that each layer of the Informer model is one. The actual Informer model includes multiple cascaded layers, such as: a sparse self-attention layer 102 with a clear code probability distribution is connected to a distillation layer 103, and then multiple sparse self-attention layers 102 with a clear code probability distribution are connected to a distillation layer 103 in cascade.
[0031] The self-attention mechanism is the core of the Informer model. The multi-head probability distribution sparse self-attention mechanism ( Figure 1 This mechanism is adopted by both the clear multi-head probability distribution sparse self-attention layer 102 and the masked multi-head probability distribution sparse self-attention layer 106 in the model, which is the main difference between the Informer model and the Transformer model.
[0032] The workflow of the multi-head probability distribution sparse self-attention mechanism includes the following steps:
[0033] Linear transformation: Perform linear transformation on the input data to generate a query matrix Q , key matrix K Sum Matrix V Three matrices, the parameter matrix for linear transformation is a learnable parameter.
[0034] Sparse representation of the query matrix: The following formula (1) is used to represent Perform downsampling processing, and the number of sampling points is expressed as:
[0035] (1)
[0036] in, For the original length, The constant sampling coefficient is generally set to 5. is a rounding function; for example, when The vector length is 96, then , that is, after sampling 71 sampling points were randomly discarded;
[0037] For any row of the query matrix q j ,calculate q j After downsampling K The product of the query matrix is determined based on the difference between the maximum value and the average value of the product. q j , after screening, we get the sparse query matrix.
[0038] Calculate the attention score: Calculate the attention score of each position to other positions by performing a dot product operation on the sparse query matrix and the key. For numerical stability, it is usually divided by a scaling factor (usually the square root of the dimension of the key vector).
[0039] Normalization: Use the Softmax function to normalize the attention scores to obtain attention weights, which represent the importance of each position to other positions.
[0040] Weighted summation: Multiply the attention weights by the value matrix and perform weighted summation to obtain the final output. This step realizes the extraction and aggregation of important information.
[0041] The workflow of the multi-head probability distribution sparse self-attention mechanism in the above Informer model shows that when sparsely representing the query matrix, some sampling points are randomly discarded. Although this reduces the computational dimension, it is also prone to discarding key features, resulting in a decrease in the model's predictive ability.
[0042] Based on the above problems, the present disclosure aims to provide a method for detecting anomalies of satellite momentum wheels that can reduce computational complexity and memory usage without losing key features. The method for detecting anomalies of satellite momentum wheels provided by the present disclosure is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0043] like Figure 2 As shown, a method for detecting anomalies of a satellite momentum wheel provided by the present disclosure may include the following steps S201 to S205.
[0044] In step S201 , input data of the satellite momentum wheel is obtained.
[0045] The input data includes: the time series telemetry data of the first period of the satellite momentum wheel and the mask time series data, the time series data of the second period in the mask time series data is the mask, and the second period is a period of preset length after the first period.
[0046] The time-series telemetry data of the first period is used to represent the operating data of the satellite momentum wheel during the first period. For example, the operating data may include the speed of the momentum wheel, the shaft temperature of the momentum wheel, the shell temperature of the momentum wheel, the friction torque, the motor current, the control voltage, etc. During the first period, the operating data of the satellite momentum wheel is collected at a preset sampling frequency to obtain the time-series telemetry data of the first period. The time-series telemetry data of the first period is discrete time series data of a certain length.
[0047] Specifically, the input data is preprocessed. This includes at least normalization to normalize the input data to a uniform range, denoising to reduce noise in the input data, and segmenting the input data into fixed-length segments based on a set time step. The preprocessed input data is divided into time index data and engineering data. The time index data represents global time series information, while the engineering data is telemetry values or masks. The time index data and engineering data are then embedded and projected. The purpose of embedding and projection is to project the data from a single sampling point (time point) into data of a preset dimension. The embedded and projected engineering data and time index data serve as the input data.
[0048] Exemplarily, the input data is time series data of 96 time points, each time point includes six engineering values: the speed of the momentum wheel, the shaft temperature of the momentum wheel, the shell temperature of the momentum wheel, the friction torque, the motor current, and the control voltage. The time index is: year, month, day, hour, and minute. The input data is divided into a time index data with a dimension of 96×4 and an engineering data with a dimension of 96×6. The preset dimension of the embedded projection is 512. The dimension of the time index data after embedded projection is 96×512, and the dimension of the engineering data is 96×512.
[0049] In step S202, the time series telemetry data of the first time period is input into the momentum wheel health model, and the input data is mean sampled by the multi-head sparse self-attention layer included in the momentum wheel health model to obtain the sampled input data.
[0050] Among them, the momentum wheel health model includes a multi-head sparse self-attention layer, mean sampling is used to reduce the calculation dimension, and the use of mean sampling can retain the characteristics of each sampling point.
[0051] Different from the multi-head probability distribution sparse self-attention mechanism in the Informer model, the sampling method for the query matrix and the key matrix disclosed in this invention is mean sampling, which retains the characteristics of each row vector in the query matrix and the key matrix, avoids the loss of key features, and reduces the computational dimension.
[0052] In step S203, based on the sampled input data, the waveform features of the input data are extracted through a dynamic time warping algorithm to obtain an attention weight matrix.
[0053] The dynamic time warping algorithm can filter out vectors in the query matrix and the key matrix with similar shapes, that is, it can extract the waveform characteristics of the input data, ensuring that the final feature expression contains more information, thereby improving the accuracy of the model prediction.
[0054] In step S204, the output prediction data for the second time period is obtained based on the attention weight matrix and the input data.
[0055] In step S205 , it is determined whether the satellite momentum wheel is abnormal based on the prediction data of the second period and the collected telemetry data of the satellite momentum wheel of the second period.
[0056] When the difference between the predicted data of the second time period and the corresponding telemetry data of the second time period is large, it is determined that the satellite momentum wheel is about to have an abnormality. When the difference between the predicted data of the second time period and the corresponding telemetry data of the second time period is small, it is determined that the satellite momentum wheel can operate normally.
[0057] In some embodiments, whether the satellite momentum wheel is abnormal is determined based on the predicted data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period. Specifically, it can be: based on the similarity between the waveforms of the predicted data of the second time period and the telemetry data of the second time period, if the similarity is less than a similarity threshold, it is determined that the momentum wheel is abnormal.
[0058] Since the predicted data of the second time period and the telemetry data of the second time period are both discrete time series data, any algorithm in the prior art that can calculate the waveform similarity of discrete time series data can be used, such as: Mahalanobis distance, correlation-based similarity measurement method, etc., and this disclosure does not make specific limitations.
[0059] In some embodiments, whether the satellite momentum wheel is abnormal is determined based on the predicted data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period, including: determining the abnormality threshold based on the predicted data of the second time period; when the difference between each sampling point of the telemetry data of the second time period and the corresponding sampling point of the predicted data of the second time period is greater than the abnormality threshold, the abnormality number is increased by 1; when the abnormality number is greater than the abnormality number threshold within the preset alarm time period, the satellite momentum wheel is confirmed to be abnormal.
[0060] The forecast data for the second period includes different types of engineering data, and an abnormality threshold is determined for each type of engineering data. For example, the abnormality threshold corresponding to the speed of the momentum wheel in the forecast data for the second period is determined, and the abnormality threshold corresponding to the shaft temperature of the momentum wheel in the forecast data for the second period is determined. The abnormality threshold is determined based on the forecast data for the second period. Specifically, the abnormality threshold can be determined by taking the maximum value in the forecast data for the second period as the abnormality threshold, or by using the quantile in the forecast data for the second period as the abnormality threshold.
[0061] The initial value of the anomaly number is 0. The anomaly number can be one for all engineering data, that is, if any engineering data is abnormal, the anomaly number is increased by 1. At this time, the accumulated anomalies of all engineering data are greater than the anomaly number threshold, and the momentum wheel is determined to be abnormal. It can also be one for each engineering data. If a certain engineering data is abnormal, the corresponding anomaly number is increased by 1. If the number of anomalies of any engineering data is greater than the anomaly number threshold, the momentum wheel is determined to be abnormal.
[0062] For example, the abnormal threshold is determined based on the quartiles of the forecast data of the second period, and the difference between the third quartile value and the first quartile value is multiplied by a coefficient to determine the abnormal threshold. Figure 3 The figure shows a waveform comparison diagram of the actual value of the momentum wheel shell temperature and the predicted value of the momentum wheel shell temperature. The horizontal axis is the time axis and the vertical axis is the temperature axis. The unit is Celsius. The healthy number 0 indicates that the difference between the predicted value and the true value is less than or equal to the abnormal threshold. The healthy number 1 indicates that the difference between the predicted value and the true value is greater than the abnormal threshold. Figure 3 ,like Figure 4 As shown, the statistical Figure 3 Schematic diagram of the health number in Figure 4 It can be seen that for the three consecutive parts with healthy numbers of 1, if the abnormal number threshold is greater than or equal to 3, it is determined that there is no abnormality in the momentum wheel during this period. If the abnormal number threshold is less than 3, it is determined that there is no abnormality in the momentum wheel during this period. According to the healthy number of the 2016-06 part, it can be determined that the momentum wheel is abnormal.
[0063] Since the sampling frequency is fixed, the accumulation of abnormal numbers is the accumulation of time. When the abnormal number changes from 0 to 1, the time accumulation begins. When the cumulative alarm time of each engineering parameter exceeds 100s, the momentum wheel is determined to be abnormal. Figure 5 As shown in FIG, it is an abnormal confirmation line chart. The abnormal engineering data above the dotted line corresponding to the cumulative alarm time of 100s all indicate abnormality of the momentum wheel.
[0064] For determining whether the satellite momentum wheel is abnormal based on the predicted data of the second period and the corresponding telemetry data of the second period, one of the two methods mentioned above can be flexibly selected. According to the results of the actual application process, it is found that the method of confirming whether the momentum wheel is abnormal based on similarity consumes less computational effort and is more efficient; while the method of first adaptively determining the abnormality threshold and then determining whether the momentum wheel is abnormal based on the number of anomalies has a higher accuracy rate in abnormality confirmation.
[0065] In some embodiments, as Figure 6As shown, the momentum wheel health model is to change the clear code multi-head probability distribution sparse self-attention layer 102 in the Informer model to the clear code multi-head sparse self-attention layer 110, and change the masked multi-head probability distribution sparse self-attention layer 106 to the masked multi-head sparse self-attention layer 111. The input data of the clear code multi-head sparse self-attention layer 110 is the time series telemetry data of the first period, and the input data of the masked multi-head sparse self-attention layer 111 is the masked time series data.
[0066] The above-mentioned method is based on the sampled input data, and the waveform features of the input data are extracted through the dynamic time warping algorithm to obtain the attention weight matrix, including: based on the sampled input data, through the clear code multi-head sparse self-attention layer 110, to obtain the first self-attention encoding matrix; based on the sampled input data, through the masked multi-head sparse self-attention layer 111, to obtain the second self-attention encoding matrix; based on the first self-attention encoding matrix and the second self-attention encoding matrix, through the multi-head self-attention layer 107, to extract the context features of the input data to obtain the attention weight matrix.
[0067] The description of other layers of the above momentum wheel health model refers to the description of the Informer model and will not be repeated here.
[0068] The clear code multi-head sparse self-attention layer 110 and the masked multi-head sparse self-attention layer 111 in the momentum wheel health model have the same data processing flow, only the input data is different. The two are collectively referred to as multi-head sparse self-attention layers.
[0069] In some embodiments, combined Figure 7 , the multi-head sparse self-attention layer is used to linearly change the input data to obtain the initial key matrix, initial query matrix and initial value matrix corresponding to the input data, Figure 7 The dotted box indicated by the number 70 is the linear transformation of the input data X to obtain the initial key matrix K , the initial query matrix Q and the initial value matrix V ,like K, Q and V The dimensions of are all 96×6, so K, Q and V Then perform the following step S1:
[0070] Wherein, step S1 includes:
[0071] Step S11 : performing mean sampling on the initial key matrix and the initial query matrix to obtain a first key matrix and a first query matrix of preset dimensions.
[0072] Figure 7The reference numeral 71 indicates that the initial key matrix and the initial query matrix are sampled by the mean, and the preset dimension is determined to be 4×6, because Q and V The dimensions of are all 96×6, and 96×6 is sampled to get 4×6, that is, every 24 consecutive vectors need to be averaged to get a vector, and the 96×6 dimension Q and V Sampling is 4×6 dimension Q' and K' .
[0073] Step S12: Delete the vector corresponding to the vector to be deleted from the first key matrix and the first query matrix to obtain a second query matrix and a second key matrix.
[0074] In the first loop, there is no vector to be deleted.
[0075] Step S13: Determine, by using a dynamic time warping algorithm, a vector to be deleted whose sum of distances between any vector in the second query matrix and each vector in the second key matrix is greater than a distance threshold.
[0076] (2)
[0077] in, represents any row in the second query matrix The sum of the DTW distances to each vector in the second key matrix, represents the dimension of the second bond matrix, Represents the second query matrix row vector, Indicates the second bond matrix Row vector.
[0078] Figure 7 The number 71 indicates that the sampling is 4×6 dimensions. Q' and K' Then, the formula (2) is used to determine Q' Any row vector of K' After calculating the DTW distance sum for each row vector of , a 4×4 dimension attention weight matrix is obtained. The distance sum of the last row vector of the attention weight matrix is greater than the distance threshold and is determined to be the vector to be deleted. Figure 7 Shown with a cross.
[0079] In step S14, the product of the preset dimension multiplied by the preset multiple is recorded as the preset dimension, and step S1 is repeated until the preset dimension is larger than the dimension of the initial query matrix and the initial key matrix, and the vector corresponding to the vector to be deleted is deleted from the second query matrix and the second key matrix to obtain the third query matrix and the third key matrix.
[0080] The preset multiple can be set as needed. For example, the preset multiple is 2. Figure 7 The part indicated by the number 72 has the preset dimension updated from 4×6 to 8×6. Q and V The dimension of is sampled from 96×6 to 8×6, that is, it is necessary to average every 12 consecutive vectors to obtain a vector. In the 4×4 attention weight matrix, the last row of vectors is the vector to be deleted, and the corresponding dimension is 8×6 obtained after sampling. Q The vectors to be deleted in are the last two rows, and the corresponding dimensions are 8×6 obtained after sampling. K The vectors to be deleted in the last two rows are obtained. When step S12 is executed, the 6×6 vector with the last two rows deleted is obtained. Q'' and K'' .
[0081] Continue according to Q'' and K'' Calculate the vector to be deleted and repeat step S1. When the preset dimensions are the dimensions of the initial query matrix and the initial key matrix, continue to execute step S1 to obtain the sampling result. Q and K, from Q and K After deleting the vector corresponding to the vector to be deleted, a second query matrix and a second key matrix are obtained. The vector to be deleted is calculated again based on the second query matrix and the second key matrix. After the calculation is completed, the preset dimension after the next update is greater than the dimension of the initial query matrix and the initial key matrix. At this time, the vector corresponding to the vector to be deleted is deleted from the second query matrix and the second key matrix to obtain a third query matrix and a third key matrix.
[0082] Step S15: Obtain a sparse attention weight matrix based on the third key matrix and the third query matrix.
[0083] Figure 7 The number 73 indicates the final attention weight matrix.
[0084] Step S11, weighted summation of the initial value matrix through the sparse attention weight matrix to obtain the self-attention encoding matrix.
[0085] Among them, when the multi-head sparse self-attention layer is the clear code multi-head sparse self-attention layer 110, the self-attention encoding matrix is the first self-attention encoding matrix; when the multi-head sparse self-attention layer is the masked multi-head sparse self-attention layer 111, the self-attention encoding matrix is the second self-attention encoding matrix.
[0086] Figure 7 The reference numeral 74 indicates the self-attention encoding matrix obtained by weighted summation of the initial value matrix by the attention weight matrix Z .
[0087] Through the DTW distance, vectors with similar shapes are screened out from the query matrix and the key matrix, and the waveform features of the input data are extracted, so that the model prediction can combine more features and improve the prediction accuracy.
[0088] Informer time coding usually divides the time dimension into six dimensions in the order of year, month, day, hour, minute, and second to learn the periodic characteristics contained in the date. However, for satellites, the satellite revolution period and mission period are also key factors affecting the periodic changes in satellite telemetry. Therefore, the usual Informer time coding rules are not applicable to the expression of the periodic characteristics of the satellite momentum wheel. In some embodiments, the above-mentioned acquisition of the input data of the satellite momentum wheel includes: collecting the initial input data of the satellite momentum wheel; encoding the time index in the initial input data according to the satellite time rule to obtain the position code of the input data. The time tags of the satellite time rule include: the earth's revolution period (years), satellite revolution period (the duration of a satellite's revolution), the lunar revolution period (month), Earth's rotation period (Daily), one mission cycle (The duration of a task).
[0089] The initial input data includes: time series telemetry data of the initial first period of the satellite momentum wheel, and initial masked time series data. The initial masked time series data is the spliced time series telemetry data of the initial first period of time of the first length and the mask of the preset length. The time series telemetry data of the initial first period of time of the first length includes the last sampling point in the time series telemetry data of the initial first period of time. For example, if the initial masked time series data includes sampling points 1-100 of the time series, the first length is 20, and the length of the initial masked time series data is 70, then the initial masked time series data is: data of sampling points 21-100 of the initial masked time series data and 50 masks.
[0090] The initial input data includes time index data and engineering data. The time index data is encoded and then converted into corresponding position code, which is used to indicate the global timing information of the encoded data after the engineering data is encoded.
[0091] Specifically, position encoding can be performed by limiting the range of position values to [0, 1], where 0 represents the first sampling point and 1 represents the last sampling point. For example, if there are three sampling points, the position information is represented as [0, 0.5, 1]; if there are four sampling points, the position information is represented as [0, 0.33, 0.69, 1]. However, the problem with this method is that the relative distances between sampling points are different when the sequence length is different. For example, when the sequence length is 3, the relative distance between sampling points is 0.5; when the sequence length is 4, the relative distance between sampling points becomes 0.33. Binary representation of position values can also be used, but the position vector encoded in this way is in a discrete space, and the changes between different positions are discontinuous.
[0092] Therefore, in some embodiments, encoding the time index of the initial input data according to the satellite time rule to obtain the position code of the input data includes: encoding the initial input data through sine and cosine coding according to the satellite time rule to obtain the input data.
[0093] Specifically, the initial input data is encoded using the following formulas (3) and (4):
[0094] (3)
[0095] (4)
[0096] in, POS represents the sampling point position in the time series, PE (˙) represents the position vector of the sampling point, .
[0097] Sin-cosine encoding ensures that the vector of each sampling point is unique, and the value of the position vector is bounded and located in a continuous space. This makes the model more generalizable when processing position vectors, meaning it can better handle sequences whose lengths do not match the distribution of the training data (a property of the sin-cosine function itself).
[0098] Figure 8 This is a structural block diagram of a satellite momentum wheel anomaly detection device shown in the present disclosure, such as Figure 8 As shown, the device includes: an acquisition part 801, an input and output part 802, a feature extraction part 803 and a determination part 804;
[0099] The acquisition section 801 is configured to acquire input data for a momentum wheel health model, the input data including: time series telemetry data and masked time series data of a first period of the satellite momentum wheel, the time series data of a second period in the masked time series data being a mask, and the second period being a period of a preset length after the first period;
[0100] The input and output part 802 is configured to input the time series telemetry data of the first period into the momentum wheel health model, and perform mean sampling on the input data through the multi-head sparse self-attention layer included in the momentum wheel health model to obtain sampled input data;
[0101] The feature extraction part 803 is configured to extract waveform features of the input data based on the sampled input data using a dynamic time warping algorithm to obtain an attention weight matrix;
[0102] The input-output part 802 is further configured to obtain output prediction data for the second time period based on the attention weight matrix and the input data;
[0103] The determining part 804 is configured to determine whether the satellite momentum wheel is abnormal based on the prediction data of the second period and the collected telemetry data of the satellite momentum wheel of the second period.
[0104] In some embodiments, the momentum wheel health model includes: an encoder and a decoder, the multi-head sparse self-attention layer includes a clear code multi-head sparse self-attention layer in the encoder and a masked multi-head sparse self-attention layer in the decoder, and the decoder also includes a multi-head self-attention layer; the input data of the clear code multi-head sparse self-attention layer is the time series telemetry data of the first period, and the input data of the masked multi-head sparse self-attention layer is the masked time series data; the feature extraction part 803 is specifically configured as: based on the sampled input data, through the clear code multi-head sparse self-attention layer, a first self-attention encoding matrix is obtained; based on the sampled input data, through the masked multi-head sparse self-attention layer, a second self-attention encoding matrix is obtained; based on the first self-attention encoding matrix and the second self-attention encoding matrix, the context features of the input data are extracted through the multi-head self-attention layer to obtain an attention weight matrix.
[0105] In some embodiments, a multi-head sparse self-attention layer is used to perform linear changes on the input data, obtain an initial key matrix, an initial query matrix and an initial value matrix corresponding to the input data, and then execute the following step S1; wherein, step S1 includes: performing mean sampling on the initial key matrix and the initial query matrix to obtain a first key matrix and a first query matrix of preset dimensions; deleting the vector corresponding to the vector to be deleted from the first key matrix and the first query matrix to obtain a second query matrix and a second key matrix; determining, through a dynamic time warping algorithm, the vector to be deleted whose sum of distances between any vector in the second query matrix and each vector in the second key matrix is greater than a distance threshold; recording the product of the preset dimension multiplied by a preset multiple as the preset dimension, repeating step S1 until the preset dimension is greater than the dimension of the initial query matrix and the initial key matrix, deleting the vector corresponding to the vector to be deleted from the second query matrix and the second key matrix to obtain a third query matrix and a third key matrix; obtaining a sparse attention weight matrix based on the third key matrix and the third query matrix; weighted summing the initial value matrix through the sparse attention weight matrix to obtain a self-attention encoding matrix, the self-attention encoding matrix including the first self-attention encoding matrix and the second self-attention encoding matrix.
[0106] In some embodiments, the acquisition part 801 is specifically configured to acquire the initial input data of the satellite momentum wheel, the initial input data including: the time series telemetry data of the initial first time period of the collected satellite momentum wheel, and the initial mask time series data, the initial mask time series data being the spliced time series telemetry data of the initial first time period of the first length and the mask of the preset length; according to the satellite time rule, the time index of the initial input data is encoded to obtain the position code of the input data, and the time mark of the satellite time rule includes: the earth's revolution period, the satellite's revolution period, the moon's revolution period, the earth's rotation period, and one mission period.
[0107] In some embodiments, the acquisition part 801 is specifically configured to encode the time index in the initial input data through sine and cosine coding according to the satellite time rule to obtain the position code of the input data.
[0108] In some embodiments, the determining portion 803 is specifically configured to determine whether the momentum wheel is abnormal based on the similarity between the predicted data of the second period and the waveforms of the collected telemetry data of the satellite momentum wheel of the second period.
[0109] In some embodiments, the determination part 803 is specifically configured to determine the abnormality threshold based on the predicted data of the second time period; when the difference between each sampling point of the telemetry data of the second time period and the corresponding sampling point of the predicted data of the second time period is greater than the abnormality threshold, the abnormality number is increased by 1; when the abnormality number is greater than the abnormality number threshold within the preset alarm duration, the satellite momentum wheel is confirmed to be abnormal.
[0110] It should be noted that the above-mentioned satellite momentum wheel abnormality detection device can be the electronic device in the above-mentioned method embodiment of the present application, or it can be a functional module and / or functional entity in the electronic device that can realize the functions of the device embodiment, and the embodiment of the present application is not limited.
[0111] In the embodiment of the present application, each module can implement the satellite momentum wheel anomaly detection method provided by the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0112] Please refer to Figure 9 , which shows a schematic diagram of the hardware structure of an electronic device provided by an exemplary embodiment of the present disclosure. In some examples, the electronic device can be at least one of a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop computer. The electronic device has a communication function and can access a wired network or a wireless network. The electronic device can generally refer to one of a plurality of terminals. Those skilled in the art will appreciate that the number of the above-mentioned terminals can be more or less. It can be understood that the electronic device undertakes the calculation and processing work of the technical solution of the present disclosure, and the present disclosure does not limit this.
[0113] like Figure 9 As shown, the electronic device in the present disclosure may include one or more of the following components: a processor 910 and a memory 920 .
[0114] Optionally, the processor 910 utilizes various interfaces and circuits to connect various components within the electronic device. It executes instructions, programs, code sets, or instruction sets stored in the memory 920, as well as accesses data stored in the memory 920, to perform various functions and process data within the electronic device. Optionally, the processor 910 can be implemented in at least one hardware form: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 910 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and a baseband chip. The CPU primarily handles the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the touchscreen display; the NPU implements artificial intelligence (AI) functions; and the baseband chip handles wireless communications. It is understandable that the above-mentioned baseband chip may not be integrated into the processor 910, but may be implemented by a separate chip.
[0115] Memory 920 may include random access memory (RAM) or read-only memory (ROM). Optionally, memory 920 includes non-transitory computer-readable storage medium. Memory 920 may be used to store instructions, programs, code, code sets, or instruction sets. Memory 920 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), and instructions for implementing each of the above method embodiments. The data storage area may store data generated based on the use of the electronic device.
[0116] In addition, those skilled in the art will understand that the structures of the electronic devices shown in the above figures do not limit the electronic devices. The electronic devices may include more or fewer components than shown, or may combine certain components or arrange the components differently. For example, the electronic devices may also include a display screen, a camera assembly, a microphone, a speaker, a radio frequency circuit, an input unit, sensors (such as an accelerometer, an angular velocity sensor, a light sensor, etc.), an audio circuit, a WiFi module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.
[0117] The present disclosure also provides a computer-readable storage medium storing at least one instruction, wherein the at least one instruction is used to be executed by a processor to implement the satellite momentum wheel abnormality detection method as described in the above embodiments.
[0118] The present disclosure also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium; a processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes to implement the satellite momentum wheel anomaly detection method described in each of the above embodiments.
[0119] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned satellite momentum wheel abnormality detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0120] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0121] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, servers and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0122] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0123] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.
[0125] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in this disclosure can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0126] It should be noted that the technical solutions described in this disclosure can be combined arbitrarily without conflict.
[0127] The above description is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed by the present invention, which should be covered by the scope of protection of the present invention.
Claims
1. A method for detecting anomalies of a satellite momentum wheel, characterized in that: The method comprises: Obtaining input data for a momentum wheel health model, the input data comprising: time series telemetry data and masked time series data of a first period of the satellite momentum wheel, where time series data of a second period of the masked time series data is a mask, and the second period is a period of a preset length following the first period; Inputting the time series telemetry data of the first period into the momentum wheel health model, and performing mean sampling on the input data through a multi-head sparse self-attention layer included in the momentum wheel health model to obtain sampled input data; Based on the sampled input data, the waveform features of the input data are extracted through the dynamic time warping algorithm to obtain the attention weight matrix; Obtaining output prediction data for a second time period based on the attention weight matrix and the input data; determining whether the satellite momentum wheel is abnormal based on the predicted data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period; The momentum wheel health model includes: an encoder and a decoder, the multi-head sparse self-attention layer includes a clear code multi-head sparse self-attention layer in the encoder and a masked multi-head sparse self-attention layer in the decoder, and the decoder also includes a multi-head self-attention layer; the input data of the clear code multi-head sparse self-attention layer is the time series telemetry data of the first time period, and the input data of the masked multi-head sparse self-attention layer is the masked time series data; The waveform features of the input data are extracted based on the sampled input data through the dynamic time warping algorithm to obtain the attention weight matrix, including: Based on the sampled input data, a first self-attention encoding matrix is obtained through the clear code multi-head sparse self-attention layer; Based on the sampled input data, a second self-attention encoding matrix is obtained through the masked multi-head sparse self-attention layer; Based on the first self-attention encoding matrix and the second self-attention encoding matrix, extracting context features of the input data through a multi-head self-attention layer to obtain an attention weight matrix; The multi-head sparse self-attention layer is used to perform linear changes on the input data to obtain the initial key matrix, initial query matrix and initial value matrix corresponding to the input data, and then perform the following step S1; Wherein, step S1 includes: Performing mean sampling on the initial key matrix and the initial query matrix to obtain a first key matrix and a first query matrix of preset dimensions; Deleting a vector corresponding to the to-be-deleted vector from the first key matrix and the first query matrix to obtain a second query matrix and a second key matrix; Determine, by a dynamic time warping algorithm, vectors to be deleted whose sum of distances between any vector in the second query matrix and each vector in the second key matrix is greater than a distance threshold; The product of the preset dimension multiplied by the preset multiple is recorded as the preset dimension, and step S1 is repeated until the preset dimension is larger than the dimensions of the initial query matrix and the initial key matrix, and the vector corresponding to the to-be-deleted vector is deleted from the second query matrix and the second key matrix to obtain a third query matrix and a third key matrix; According to the third key matrix and the third query matrix, a sparse attention weight matrix is obtained; The initial value matrix is weighted and summed by the sparse attention weight matrix to obtain a self-attention encoding matrix, where the self-attention encoding matrix includes the first self-attention encoding matrix and the second self-attention encoding matrix.
2. The method according to claim 1, characterized in that The step of obtaining input data of the momentum wheel health model includes: Acquiring initial input data of the satellite momentum wheel, the initial input data comprising: time series telemetry data of an initial first period of the satellite momentum wheel, and initial mask time series data, the initial mask time series data being a concatenation of the time series telemetry data of the initial first period of time of a first length and a mask of a preset length; According to the satellite time rule, the time index of the initial input data is encoded to obtain the position code of the input data. The time tags of the satellite time rule include: the earth's revolution period, the satellite's revolution period, the moon's revolution period, the earth's rotation period, and a mission period.
3. The method according to claim 2, characterized in that The step of encoding the time index of the initial input data according to the satellite time rule to obtain the position code of the input data includes: According to satellite time rules, the time index in the initial input data is encoded by sine and cosine coding to obtain the position code of the input data.
4. The method according to any one of claims 1 to 3, characterized in that The determining whether the satellite momentum wheel is abnormal based on the prediction data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period includes: Whether the momentum wheel is abnormal is determined based on the similarity between the predicted data of the second period and the waveforms of the collected telemetry data of the satellite momentum wheel of the second period.
5. The method according to any one of claims 1 to 3, characterized in that The determining whether the satellite momentum wheel is abnormal based on the prediction data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period includes: determining an abnormality threshold based on the forecast data for the second period; When the difference between each sampling point of the telemetry data of the second period and the corresponding sampling point of the prediction data of the second period is greater than the abnormality threshold, the abnormality number is increased by 1; When the number of anomalies is greater than the anomaly threshold within the preset alarm duration, it is confirmed that the satellite momentum wheel is abnormal.
6. A satellite momentum wheel anomaly detection device, characterized in that: The device comprises: an acquisition part, an input and output part, a feature extraction part and a determination part; The acquisition part is configured to acquire input data of the momentum wheel health model, the input data including: time series telemetry data of a first period of the satellite momentum wheel and masked time series data, the time series data of a second period in the masked time series data being a mask, and the second period being a period of a preset length after the first period; The input-output part is configured to input the time series telemetry data of the first period into the momentum wheel health model, and perform mean sampling on the input data through the multi-head sparse self-attention layer included in the momentum wheel health model to obtain sampled input data; The feature extraction part is configured to extract waveform features of the input data based on the sampled input data through a dynamic time warping algorithm to obtain an attention weight matrix; The input-output part is further configured to obtain output prediction data for the second time period based on the attention weight matrix and the input data; The determining part is configured to determine whether the satellite momentum wheel is abnormal based on the prediction data of the second period and the collected telemetry data of the satellite momentum wheel in the second period; The momentum wheel health model includes: an encoder and a decoder, the multi-head sparse self-attention layer includes a clear code multi-head sparse self-attention layer in the encoder and a masked multi-head sparse self-attention layer in the decoder, and the decoder also includes a multi-head self-attention layer; the input data of the clear code multi-head sparse self-attention layer is the time series telemetry data of the first time period, and the input data of the masked multi-head sparse self-attention layer is the masked time series data; The waveform features of the input data are extracted based on the sampled input data through the dynamic time warping algorithm to obtain the attention weight matrix, including: Based on the sampled input data, a first self-attention encoding matrix is obtained through the clear code multi-head sparse self-attention layer; Based on the sampled input data, a second self-attention encoding matrix is obtained through the masked multi-head sparse self-attention layer; Based on the first self-attention encoding matrix and the second self-attention encoding matrix, extracting context features of the input data through a multi-head self-attention layer to obtain an attention weight matrix; The multi-head sparse self-attention layer is used to perform linear changes on the input data to obtain the initial key matrix, initial query matrix and initial value matrix corresponding to the input data, and then perform the following step S1; Wherein, step S1 includes: Performing mean sampling on the initial key matrix and the initial query matrix to obtain a first key matrix and a first query matrix of preset dimensions; Deleting a vector corresponding to the to-be-deleted vector from the first key matrix and the first query matrix to obtain a second query matrix and a second key matrix; Determine, by a dynamic time warping algorithm, vectors to be deleted whose sum of distances between any vector in the second query matrix and each vector in the second key matrix is greater than a distance threshold; The product of the preset dimension multiplied by the preset multiple is recorded as the preset dimension, and step S1 is repeated until the preset dimension is larger than the dimensions of the initial query matrix and the initial key matrix, and the vector corresponding to the to-be-deleted vector is deleted from the second query matrix and the second key matrix to obtain a third query matrix and a third key matrix; According to the third key matrix and the third query matrix, a sparse attention weight matrix is obtained; The initial value matrix is weighted and summed by the sparse attention weight matrix to obtain a self-attention encoding matrix, where the self-attention encoding matrix includes the first self-attention encoding matrix and the second self-attention encoding matrix.
7. An electronic device, characterized in that: The invention comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method for detecting anomaly of a satellite momentum wheel according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the satellite momentum wheel abnormality detection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Video target segmentation method based on time sequence content perception attention mechanism
CN113744306A
Water quality prediction method based on Transform sparse attention mechanism
CN116050571A