Satellite momentum wheel anomaly detection method and device, electronic equipment and storage medium
By extracting the shape characteristics in the sequence telemetry data of the satellite momentum wheel and using the multi-head sparse self-attention layer for mean sampling, combined with the dynamic time regularization algorithm, the satellite momentum wheel abnormal detection efficiency and low reliability in the prior art are solved. The problem is to achieve higher prediction accuracy and computational efficiency.
Patent Information
- Application Number
- CN202411509674.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-28
AI Technical Summary
The prior art is inefficient, low reliability and poor migration in the abnormal detection of satellite momentum wheels, and mainly relies on expert experience to set alarm thresholds.
By extracting the shape characteristics in the sequence telemetry data of the satellite momentum wheel, using a multi-head sparse self-attention layer for mean sampling, and combining a dynamic time regularization algorithm to extract waveform features, and then perform abnormal detection.
It reduces the computational complexity, improves prediction accuracy, avoids the loss of key features, and improves the computing efficiency and prediction performance of the model.
Smart Images

Figure CN119416115A_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 equipment and storage medium for detecting anomalies of a satellite momentum wheel. Background Art
[0002] The momentum wheel is a common attitude control actuator for satellites and plays a vital role in ensuring the satellite's attitude. The multi-dimensional telemetry values of the momentum wheel, such as speed, control voltage, and motor current, not only reflect its own working conditions and working status, but also include the performance, life, and reliability information of the momentum wheel. When the multi-dimensional telemetry values related to the satellite's momentum wheel are abnormal, it means that the momentum wheel may have structural aging or other faults. Therefore, the working status and health status of the momentum wheel can be detected and warned based on the multi-dimensional telemetry values.
[0003] The relevant technologies are mainly based on expert knowledge methods. Experts in the field of satellite momentum wheels set different alarm thresholds for momentum wheel speed, motor current, control voltage, friction torque, shaft temperature, shell temperature, drive line shell temperature, etc. based on their experience to form a fault tree. For example, when the shaft temperature exceeds 40°C for 5 consecutive hours, a shaft temperature alarm is issued.
[0004] However, setting different early warning strategies for different telemetry values based on expert experience is inefficient, unreliable and has poor transferability. 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: In a first aspect, the present disclosure provides a method for detecting anomalies of a satellite momentum wheel, the method comprising: The input data of the momentum wheel health model is obtained, and the input data includes: time series telemetry data and mask time series data of the first time period of the satellite momentum wheel, the time series data of the second time period in the mask time series data is the mask, and the second time period is a time period of preset length after the first time period; 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 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 time period is obtained; 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, it is determined whether the satellite momentum wheel is abnormal.
[0007] In a second aspect, the present disclosure provides an abnormality detection device for a satellite momentum wheel, the device comprising: 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 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; the input-output part is configured to input the time series telemetry data of the first time 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 waveform features of the input data through a dynamic time warping algorithm based on the sampled input data to obtain an attention weight matrix; the input-output part is further configured to obtain output prediction data of the second time period according to the attention weight matrix and the input data; the determination part is configured to determine 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.
[0008] 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 abnormality detection method as described in the first aspect.
[0009] In a fourth aspect, the present disclosure provides a computer-readable storage medium storing a program or instruction, which, when executed by a processor, implements the steps of the satellite momentum wheel anomaly detection method as described in the first aspect.
[0010] 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.
[0011] 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 a program or instruction to implement the satellite momentum wheel anomaly detection method as described in the first aspect.
[0012] 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 of a first time period of the satellite momentum wheel and masked time series data, 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, and obtaining sampled input data; based on the sampled input data, extracting waveform features of the input data through a dynamic time warping algorithm, and obtaining an attention weight matrix; obtaining output prediction data of a second time period according to the attention weight matrix and the input data; 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 contribute, 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
[0013] Figure 1 A schematic diagram of the network structure of an Informer model provided by the present disclosure; Figure 2 A schematic diagram of a flow chart of a method for detecting anomalies of a satellite momentum wheel provided by the present disclosure; Figure 3 A schematic diagram showing a comparison between a waveform of a real value of the momentum wheel housing temperature and a waveform of a predicted value of the momentum wheel housing temperature provided by the present disclosure; Figure 4 A schematic diagram of the statistical health numbers provided for the present disclosure; Figure 5 Anomaly confirmation line chart provided for this disclosure; Figure 6 A schematic diagram of the network structure of the momentum wheel health model provided by the present disclosure; Figure 7 A schematic diagram of the processing process of input data by the multi-head sparse self-attention layer provided in the present disclosure; Figure 8 A structural block diagram of a satellite momentum wheel anomaly detection device provided by the present disclosure; Fig. 9 A schematic diagram of the hardware structure of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the present disclosure to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of the present application.
[0015] The terms "first", "second", etc. in the specification of this application are used to distinguish similar objects, rather than to describe a specific order or precedence. It should be understood that the terms used in this way can be interchangeable where appropriate, so that the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more.
[0016] 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 usually not only checks the telemetry value of a sampling point, but also comprehensively considers whether there is any abnormality in the momentum wheel 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.
[0017] For time series prediction, the existing Transformer model and Informer model have good time series prediction capabilities. However, the self-attention mechanism of the Transformer model has quadratic time complexity, that is, the amount of calculation increases quadratically with the increase of sequence length. For long sequence data, this will lead to very high computational costs; and because the attention weights of all positions need to be stored, the Transformer model consumes a lot of memory, especially when processing long sequences, the memory consumption problem is more prominent; in addition, the encoder and decoder structure used by the Transformer model needs to be performed step by step during decoding, which leads to slower reasoning speed when predicting long sequences.
[0018] Based on the above shortcomings of the Transformer model, the Informer model is obtained by improving the above shortcomings. The self-attention mechanism of the Informer model selects important attention weights for calculation through the probability distribution method, which effectively reduces the amount of calculation and memory usage; self-attention distillation reduces the cascade layer input by half, highlights the importance of attention, effectively processes extremely long input sequences, and improves the computational efficiency and prediction performance of the model; unlike the step-by-step decoding method of the Transformer, the decoder of the Informer can predict the entire long time series at one time, significantly improving the reasoning speed of long sequence prediction.
[0019] like Figure 1As shown in FIG. 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 coding matrix with attention weights. The distillation layer 103 uses layer-by-layer dimensionality reduction to reduce the time dimension of the self-attention mechanism. This process is achieved by 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 hidden state data and the other for mask data 105. In the mask data 105, "0" is used as a mask for the data to be predicted. The mask data 105 is processed by the mask multi-head probability distribution sparse self-attention layer 106 to obtain the second coding matrix with attention weights. The multi-head self-attention layer 107 calculates and encodes the attention weights according to the second coding matrix and the fused coding data, and outputs the third coding matrix with attention weights. After the third coding matrix is fused by the fully connected layer 108, the output 109 is predicted, and the predicted sequence is the shaded part in the output 109.
[0020] It should be noted that Figure 1 It is shown that each layer of the Informer model is one, and the actual Informer model includes multiple cascaded layers, such as: a sparse self-attention layer 102 with plain code probability distribution is connected to a distillation layer 103, and then multiple sparse self-attention layers 102 with plain code probability distribution are cascaded and connected to a distillation layer 103.
[0021] The self-attention mechanism is the core of the Informer model. The multi-head probability distribution sparse self-attention mechanism ( Figure 1 The clear multi-head probability distribution sparse self-attention layer 102 and the masked multi-head probability distribution sparse self-attention layer 106 both adopt this mechanism) which is the main difference between the Informer model and the Transformer model.
[0022] The workflow of the multi-head probability distribution sparse self-attention mechanism includes the following steps: Linear transformation: Perform linear transformation on the input data to generate a query matrix Q , key matrix K Sum Matrix V The three matrices, the parameter matrices for linear transformation are learnable parameters.
[0023] Sparsely represent the query matrix: Use the following formula (1) to Downsampling is performed, and the number of sampling points is expressed as: (1) in, For the original Length, The constant sampling factor is usually set to 5. is a round-up function; for example, when The vector length is 96, then , that is, after sampling 71 sampling points were randomly discarded; 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 and average values of the product. q j , after screening, we get the sparse query matrix.
[0024] 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).
[0025] Normalization: The attention scores are normalized using the Softmax function to obtain attention weights, which represent the importance of each position to other positions.
[0026] 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.
[0027] From the workflow of the multi-head probability distribution sparse self-attention mechanism in the above Informer model, it can be seen that when the query matrix is sparsely represented, some sampling points are randomly discarded. Although this reduces the calculation dimension, it is also easy to discard key features, resulting in a decrease in the model's prediction ability.
[0028] 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 following, in combination with the accompanying drawings, the method for detecting anomalies of satellite momentum wheels provided by the present disclosure is described in detail through specific embodiments and their application scenarios.
[0029] 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.
[0030] In step S201, the input data of the satellite momentum wheel is obtained.
[0031] 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.
[0032] The time series telemetry data of the first period is used to characterize the working data of the satellite momentum wheel in the first period, such as: the working 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. In the first period, the working data of the satellite momentum wheel is collected according to the preset sampling frequency to obtain the time series telemetry data of the first period, and the time series telemetry data of the first period is a discrete time series data of a certain length.
[0033] Specifically, the input data is preprocessed. The preprocessing includes at least normalization processing for normalizing the input data to a uniform range, denoising processing for reducing noise in the input data, and dividing the input data into fixed-length segments according to a set time step. The preprocessed input data is divided into time index data and engineering data. The time index data is used to characterize global time series information, and the engineering data is the telemetry value or mask. The time index data and engineering data are embedded and projected. The purpose of the embedded projection is to project the data of the original sampling point (time point) into data of a preset dimension. The embedded and projected engineering data and time index data are the input data.
[0034] Exemplarily, the input data is time series data of 96 time points, each time point includes six engineering values: the rotational 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 time index data with a dimension of 96×4 and engineering data with a dimension of 96×6. The preset dimension of 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.
[0035] 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 through the multi-head sparse self-attention layer included in the momentum wheel health model to obtain the sampled input data.
[0036] 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 mean sampling can retain the characteristics of each sampling point.
[0037] 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 the present 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 calculation dimension.
[0038] 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.
[0039] 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.
[0040] In step S204, output prediction data for the second time period is obtained based on the attention weight matrix and the input data.
[0041] 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.
[0042] 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.
[0043] 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, when the similarity is less than a similarity threshold, it is determined that the momentum wheel is abnormal.
[0044] 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, such as Mahalanobis distance, correlation-based similarity measurement method, etc., is not specifically limited in this disclosure.
[0045] 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 an 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 a preset alarm duration, the satellite momentum wheel is confirmed to be abnormal.
[0046] The forecast data of the second period includes different types of engineering data, and an abnormal threshold is determined for each type of engineering data, such as: determining the abnormal threshold corresponding to the speed according to the speed of the momentum wheel in the forecast data of the second period, and determining the abnormal threshold corresponding to the shaft temperature according to the shaft temperature of the momentum wheel in the forecast data of the second period. The abnormal threshold is determined according to the forecast data of the second period, specifically, the maximum value in the forecast data of the second period can be determined as the abnormal threshold, or the abnormal threshold can be determined according to the quantile in the forecast data of the second period.
[0047] 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, if the accumulated anomalies of all engineering data are greater than the anomaly number threshold, 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.
[0048] Exemplarily, the abnormal threshold is determined according to the quartiles of the predicted data of the second period, and the difference between the value of the third quartile and the value of the first quartile is multiplied by a coefficient to determine the abnormal threshold. Figure 3 The figure shows the waveform comparison 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 actual value is less than or equal to the abnormal threshold. The healthy number 1 indicates that the difference between the predicted value and the actual 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 part with three consecutive 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, and the momentum wheel abnormality can be determined based on the healthy number of the 2016-06 part.
[0049] 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 accumulated alarm time of each engineering parameter exceeds 100s, the momentum wheel is determined to be abnormal. Figure 5 As shown, 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 that the momentum wheel is abnormal.
[0050] For determining whether the satellite momentum wheel is abnormal based on the predicted data of the second time period and the corresponding telemetry data of the second time 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 the 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 abnormalities has a higher accuracy rate in abnormality confirmation.
[0051] In some embodiments, Figure 6 As 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.
[0052] 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.
[0053] 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.
[0054] 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.
[0055] In some embodiments, in combination Figure 7 , the multi-head sparse self-attention layer is used to linearly transform the input data to obtain the initial key matrix, initial query matrix and initial value matrix corresponding to the input data, Figure 7 The dashed box indicated by the reference numeral 70 is a 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 VThen perform the following step S1: Wherein, step S1 comprises: 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.
[0056] Figure 7 The reference numeral 71 indicates that the initial key matrix and the initial query matrix are averaged and the preset dimension is determined to be 4×6, because Q and V The dimensions of are all 96×6. 96×6 is sampled to get 4×6, that is, every 24 consecutive vectors need to be averaged to get a vector. Q and V The sampling is 4×6 dimensions Q' and K' .
[0057] Step S12: 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.
[0058] In the first loop, there is no vector to be deleted.
[0059] Step S13, using a dynamic time warping algorithm, determine 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.
[0060] (2) 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 key matrix Row vector.
[0061] Figure 7 The number 71 indicates that the sampling is 4×6 dimensional. Q' and K' Then, the formula (2) is used to determine Q' Any row vector of K' After calculating the sum of the DTW distances for each row vector of , a 4×4 dimensional attention weight matrix is obtained. The sum of the distances of the last row vector of the attention weight matrix is greater than the distance threshold, and it is determined to be the vector to be deleted. Figure 7 Shown in crossbars.
[0062] Step S14, record the product of the preset dimension multiplied by the preset multiple as the preset dimension, repeat step S1 until the preset dimension is larger than the dimension of the initial query matrix and the initial key matrix, delete the vector corresponding to the vector to be deleted from the second query matrix and the second key matrix, and obtain the third query matrix and the third key matrix.
[0063] The preset multiple can be set as needed. For example, the preset multiple is 2. Figure 7 The part indicated by the label 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, every 12 consecutive vectors need to be averaged 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 vectors to delete the last two rows are obtained. Q'' and K'' .
[0064] 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, the second query matrix and the second key matrix are obtained. The vector to be deleted is calculated again according to 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 the third query matrix and the third key matrix.
[0065] Step S15, obtaining a sparse attention weight matrix according to the third key matrix and the third query matrix.
[0066] Figure 7 The number 73 indicates the final attention weight matrix.
[0067] Step S11, weighted summation of the initial value matrix is performed through the sparse attention weight matrix to obtain the self-attention encoding matrix.
[0068] Among them, when the multi-head sparse self-attention layer is a 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 a masked multi-head sparse self-attention layer 111, the self-attention encoding matrix is the second self-attention encoding matrix.
[0069] Figure 7 The reference numeral 74 indicates the self-attention encoding matrix obtained by weighting the initial value matrix through the attention weight matrix Z .
[0070] 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 the prediction accuracy is improved.
[0071] 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 of 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; according to the satellite time rule, encoding the time index in the initial input data 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).
[0072] The initial input data includes: the time series telemetry data of the initial first period of the satellite momentum wheel collected, and the initial mask time series data, the initial mask time series data is the time series telemetry data of the initial first period of the first length and the mask of the preset length. The time series telemetry data of the initial first period of the first length includes the last sampling point in the time series telemetry data of the initial first period, such as: the initial mask time series data includes 1-100 sampling points of the time series, the first length is 20, the length of the initial mask time series data is 70, then the initial mask time series data is: the data of the 21-100 sampling points of the initial mask time series data and 50 masks.
[0073] The initial input data includes time index data and engineering data. The time index data is encoded and then the corresponding position code is used to indicate the global timing information of the encoded data after the engineering data is encoded.
[0074] Specifically, the position encoding method can be: limit the range of the position value to [0, 1], where 0 represents the first sampling point and 1 represents the last sampling point. For example, if there are 3 sampling points, the position information is expressed as [0, 0.5, 1]; if there are four sampling points, the position information is expressed as [0, 0.33, 0.69, 1]. However, the problem with this method is that when the sequence length is different, the relative distance between the sampling points is different. For example, when the sequence length is 3, the relative distance between the sampling points is 0.5; when the sequence length is 4, the relative distance between the sampling points becomes 0.33. Binary representation of the position value 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.
[0075] Therefore, in some embodiments, 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, including: according to the satellite time rule, the initial input data is encoded by sine and cosine coding to obtain the input data.
[0076] Specifically, the initial input data is encoded using the following formulas (3) and (4): (3) (4) in, POS represents the sampling point position in the time series, PE (˙) represents the position vector of the sampling point, .
[0077] Through sine and cosine encoding, it is ensured that the vector of each sampling point is unique, and the value of the position vector is bounded and located in a continuous space. The model is easier to generalize when processing position vectors, that is, it can better handle sequences with lengths inconsistent with the distribution of training data (the properties of the sine and cosine functions themselves).
[0078] Figure 8 FIG. 1 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; The acquisition part 801 is configured to acquire input data of the momentum wheel health model, the input data including: time series telemetry data and mask time series data of a first period of the satellite momentum wheel, the time series data of a second period in the mask time series data is a mask, and the second period is a period of a preset length after the first period; The input-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 the sampled input data; The feature extraction part 803 is configured to extract the waveform features of the input data through a dynamic time warping algorithm based on the sampled input data to obtain an attention weight matrix; The input-output part 802 is further configured to obtain output prediction data of the second time period according to the attention weight matrix and the input data; The determination 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.
[0079] In some embodiments, the momentum wheel health model includes: an encoder and a decoder, the multi-head sparse self-attention layer includes a clear 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 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 feature extraction part 803 is specifically configured as: based on the sampled input data, through the clear 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.
[0080] 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: mean sampling 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 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 through a dynamic time warping algorithm; 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, and the self-attention encoding matrix includes a first self-attention encoding matrix and a second self-attention encoding matrix.
[0081] 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 satellite momentum wheel collected, and the initial mask time series data, the initial mask time series data is 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 a mission cycle.
[0082] 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.
[0083] In some embodiments, the determination part 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 waveform of the collected telemetry data of the satellite momentum wheel of the second period.
[0084] 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.
[0085] 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 function of the device embodiment, and the embodiment of the present application is not limited.
[0086] In the embodiments of the present application, each module can implement the satellite momentum wheel anomaly detection method provided in the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described here.
[0087] Please refer to Fig. 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 may be at least one of a smart phone, a smart watch, a desktop computer, a laptop, 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 may generally refer to one of a plurality of terminals, and those skilled in the art may know that the number of the above terminals may 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.
[0088] like Fig. 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 .
[0089] Optionally, the processor 910 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 920, and calling data stored in the memory 920. Optionally, the processor 910 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and 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 processor (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content that needs to be displayed on the touch display; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communications. It is understandable that the above baseband chip may not be integrated into the processor 910, but may be implemented by a separate chip.
[0090] The memory 920 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 920 includes a non-transitory computer-readable storage medium. The memory 920 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 920 may include a program storage area and a data storage area, wherein 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.), instructions for implementing the above various method embodiments, etc.; the data storage area may store data created according to the use of the electronic device, etc.
[0091] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a display screen, a camera assembly, a microphone, a speaker, a radio frequency circuit, an input unit, a sensor (such as an acceleration sensor, 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.
[0092] 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 anomaly detection method as described in the above embodiments.
[0093] The present disclosure also provides a computer program product, which includes computer instructions, which are 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 abnormality detection method described in the above-mentioned embodiments.
[0094] 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.
[0095] 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.
[0096] 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 only 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.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] 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 is essentially 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, including several instructions to enable 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.
[0100] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present 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. Storage media can be any available media that can be accessed by a general or special-purpose computer.
[0101] It should be noted that the technical solutions described in the present disclosure can be combined arbitrarily without conflict.
[0102] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for detecting anomalies of a satellite momentum wheel, characterized in that: The method comprises: Acquire input data of a momentum wheel health model, the input data comprising: time series telemetry data of a first period of the satellite momentum wheel and mask time series data, the time series data of a second period in the mask time series data being a mask, and the second period being a period of a preset length after the first period; Inputting the time series telemetry data of the first period into the momentum wheel health model, performing mean sampling on the input data through the multi-head sparse self-attention layer included in the momentum wheel health model, and obtaining 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; Obtain output prediction data for a second time period according to the attention weight matrix and the input data; 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.
2. The method according to claim 1, characterized in that 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; Based on the sampled input data, the waveform features of the input data are extracted by a dynamic time warping algorithm to obtain an 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, the context features of the input data are extracted through a multi-head self-attention layer to obtain an attention weight matrix.
3. The method according to claim 2, characterized in that The multi-head sparse self-attention layer is used to perform linear changes on the input data, and after obtaining the initial key matrix, the initial query matrix and the initial value matrix corresponding to the input data, the following step S1 is performed; Wherein, step S1 comprises: 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 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 means of 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; The product of the preset dimension multiplied by the preset multiple is recorded as the preset dimension, and step S1 is repeatedly performed 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 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.
4. The method according to claim 1, characterized in that The step of obtaining input data of the momentum wheel health model includes: Acquire 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 collected, and initial mask time series data, the initial mask time series data being the spliced 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.
5. The method according to claim 4, 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 comprises: According to the satellite time rule, the time index in the initial input data is encoded by sine and cosine coding to obtain the position code of the input data.
6. The method according to any one of claims 1 to 5, characterized in that: The 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 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 time period and the waveform of the collected telemetry data of the satellite momentum wheel of the second time period.
7. The method according to any one of claims 1 to 5, characterized in that: The 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 satellite momentum wheel of the second time period includes: determining an abnormal threshold value according to the forecast data of the second time 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 number threshold within the preset alarm duration, the satellite momentum wheel is confirmed to be abnormal.
8. A satellite momentum wheel abnormality 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 comprising: time series telemetry data of a first period of the satellite momentum wheel and mask time series data, the time series data of a second period in the mask 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 the sampled input data; The feature extraction part is configured to extract the waveform features of the input data through a dynamic time warping algorithm based on the sampled input data to obtain an attention weight matrix; The input-output part is further configured to obtain output prediction data for the second time period according to 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 predicted data of the second time period and the collected telemetry data of the satellite momentum wheel of the second time period.
9. An electronic device, characterized in that: The method 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 as described in any one of claims 1 to 7.
10. 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 anomaly detection method according to any one of claims 1 to 7 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
Abnormity detection method based on SimAM-LSTM-AE
CN117668649A
Abnormity diagnosis method, system and equipment for satellite telemetering multi-dimensional time series data
CN117688496A
Abnormity detection method and device for satellite telemetering multi-dimensional time series data, medium and product
CN118094425A