A data cleaning method for spacecraft flight timing parameters
By combining multiple methods in the data cleaning process, the problem of inefficient manual cleaning caused by irregular outliers in spacecraft flight test data was solved, achieving efficient and high-quality data cleaning results.
Patent Information
- Application Number
- CN202311771762.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-12-21
AI Technical Summary
Outliers in spacecraft flight test data are irregularly distributed, and manually removing them is time-consuming and labor-intensive, resulting in low data cleaning efficiency.
The data cleaning process employs a combination of methods, including preprocessing to remove null and infinite values, setting value ranges, using the 3σ criterion, exponential moving average (EWMA) method, and isolated forest method to remove discrete points, and combining manual verification.
It improved data cleaning efficiency, reduced manual workload, and significantly improved data quality and cleaning results.
Smart Images

Figure CN117807069B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of data processing, and in particular to a data cleaning method for spacecraft flight timing parameters. Background Technology
[0002] In spacecraft testing, the rapid development of data science has improved researchers' ability to analyze and mine flight test data. The analysis results enable researchers to better understand the flight performance and command response time of the product, as well as abnormal actions during flight, and also provide a basis for subsequent spacecraft improvements and fault diagnosis.
[0003] Spacecraft flight data contains parameters such as the spacecraft's velocities in all directions, engine pressure, and combustion chamber temperature. It is characterized by high sampling frequency, large sampling range, and fast data response. The raw data is generally quite messy and contains outliers. At the same time, due to sensor limitations, the obtained data often needs to be transformed before it can be used. Currently, due to the irregular and non-periodic distribution of outliers in spacecraft flight test data, outlier removal is mainly done manually. Since the amount of flight test data is huge, manual removal is time-consuming and labor-intensive. Therefore, this paper proposes a data cleaning method for spacecraft flight time series parameters. Summary of the Invention
[0004] The purpose of this invention is to provide a data cleaning method for spacecraft flight timing parameters. In response to the current problems of irregular distribution of discrete points in flight test data and the time-consuming and laborious process of manually removing discrete points one by one, a unified data cleaning method is used to quickly organize large amounts of data and improve the efficiency and quality of data cleaning.
[0005] To achieve the above objectives, the present invention provides a data cleaning method for spacecraft flight timing parameters, comprising the following steps:
[0006] S1: Collect several types of flight timing parameters as data to be processed, and store the data to be processed in DataFrame format;
[0007] S2: Preprocess the data stored in step S1 to remove outliers;
[0008] S3: Based on the corresponding value range set according to the flight timing parameters, remove the data that exceeds the value range after processing in step S2;
[0009] S4: Remove discrete points from the data processed in step S3;
[0010] S5: Use manual verification to check the data after removing discrete points, and complete the data cleaning.
[0011] Preferably, in step S1, during the storage of the data in DataFrame format, the data of a flight timing parameter is divided into two columns: one column is the time value and the other column is the signal value.
[0012] Preferably, in step S2, the specific process for removing outliers is as follows:
[0013] The data stored in step S1 is traversed, including the following cases:
[0014] When the found signal value is null, delete the row corresponding to the time point when the null value appeared;
[0015] When the found signal value is an infinite value or an infinitesimal value, delete the row corresponding to the time point when the infinite value or infinitesimal value appears;
[0016] When several rows of the same time value are found in the search, keep the first row that appears and delete the remaining rows.
[0017] When the found signal value is an indirect measurement value, the corresponding signal conversion formula is used to select the corresponding formula parameters based on the original data, and the data is converted point by point.
[0018] Preferably, in step S3, the specific process for removing data that exceeds the value range is as follows:
[0019] Based on the effective time range and value range of different signals, a value range is set, and signal values exceeding the value range are truncated within the time range, and points exceeding the value range are eliminated.
[0020] Preferably, in step S4, the step of removing discrete points is as follows:
[0021] S41: Use the 3σ criterion to eliminate discrete points;
[0022] S42: Use the Exponential Moving Average (EWMA) method to remove discrete points;
[0023] S43: Use the isolated forest method to remove discrete points.
[0024] Preferably, in step S41, the process of using the 3σ criterion to remove discrete points is as follows:
[0025] First, divide the signal values into several consecutive small windows, calculate the mean and variance of each window, and calculate the residual for each signal value. Values exceeding three times the standard deviation are considered outliers. The formula for discrete points is as follows:
[0026]
[0027] In the above formula, xi It is each signal value in the window, σ x It is the variance of the window signal values. It is the average of the signal values in the window.
[0028] Preferably, in step S42, the process of using the Exponential Moving Average (EWMA) method to remove discrete points is as follows:
[0029] Perform forward and backward EWMA calculations on the time series data, and combine the two results for a time series T = [t1, t2, ..., t...]. n and signal train The formula for forward EWMA is as follows:
[0030]
[0031] In the above formula, t i Indicates time value, This is the signal value, α is the smoothing coefficient, 0 < α < 1, EWMA forward (t i ) is a positive EWMA at t i The predicted value at any given time;
[0032] The formula for reversing a time column is as follows:
[0033]
[0034] The formula for reverse EWMA is as follows:
[0035]
[0036] The formula for obtaining the predicted value is as follows:
[0037]
[0038] The determination of discrete points is based on the moving average, the variance of the residuals, and the window size to establish a confidence boundary. Points exceeding the boundary are considered discrete and discarded. When the signal residuals follow a Gaussian distribution with a mean of 0, the following formula is used as the confidence boundary PCI:
[0039]
[0040] In the above formula, k is half the window length, α is the significance level of the confidence interval, and s is the standard deviation of the window residuals. Using predicted values and confidence intervals, the formula for identifying outliers is as follows:
[0041]
[0042] Use a decision formula to remove discrete points.
[0043] Preferably, in step S43, the specific process of using the isolated forest method to remove discrete points is as follows:
[0044] An isolated forest consists of several tree models, with the tree model values ranging from 100 to 300. During the construction of each tree model, a threshold for outlier scores is determined using time and signal values. Points exceeding this threshold are identified as outliers. The proportion of outliers is set between 0.0001 and 0.01. The isolated forest model is used to process the data, outputting the outlier detection results. Therefore, the data cleaning method for spacecraft flight time series parameters using the above method has the following advantages:
[0045] (1) In this invention, the data is preprocessed first, and outliers such as null and infinite values are removed first. The range of values is set according to the parameter characteristics, and values that exceed the range are removed. Indirect parameters are modified into direct parameters, which can effectively reduce the amount of computation in the later stage.
[0046] (2) In this invention, multiple methods are combined to remove discrete points. After machine removal, manual methods are used for inspection. Since most discrete points have been removed, the manual inspection process reduces the workload. At the same time, manual methods can effectively remove discrete points that are difficult to remove.
[0047] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0048] Figure 1 This is an overall cleaning flowchart of a data cleaning method for spacecraft flight timing parameters according to the present invention;
[0049] Figure 2 This refers to the raw data of the temperature signal in the data cleaning method for spacecraft flight timing parameters of the present invention;
[0050] Figure 3 This is a field warning diagram of the temperature signal 3σ criterion in a data cleaning method for spacecraft flight timing parameters according to the present invention;
[0051] Figure 4 The present invention relates to a data cleaning method for spacecraft flight timing parameters, which removes outliers from the temperature signal.
[0052] Figure 5 The temperature signal after selection and deletion in the data cleaning method for spacecraft flight timing parameters of the present invention;
[0053] Figure 6 This invention provides a data cleaning method for spacecraft flight timing parameters, including the original EWMA signal and its prediction diagram.
[0054] Figure 7 This is a field point warning map outside the confidence interval in a data cleaning method for spacecraft flight timing parameters according to the present invention;
[0055] Figure 8 This is a servo signal out-of-point identification and early warning diagram in a data cleaning method for spacecraft flight timing parameters according to the present invention;
[0056] Figure 9 This is a flowchart of the selection and deletion algorithm in a data cleaning method for spacecraft flight timing parameters according to the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Specific model specifications need to be selected and determined according to the actual specifications of the device, etc. The specific selection calculation method adopts existing technology in the art, and therefore will not be described in detail.
[0058] Example
[0059] like Figure 1 This invention discloses a data cleaning method for spacecraft flight timing parameters, comprising the following steps:
[0060] S1: Collect several flight timing parameters as data to be processed, and store the data to be processed in DataFrame format. During the storage of the data into DataFrame format, the data of one flight timing parameter is divided into two columns: one column is the time value and the other column is the signal value.
[0061] S2: Preprocess the data stored in step S1 to remove outliers;
[0062] The data stored in step S1 is traversed, including the following cases:
[0063] When the found signal value is null, delete the row corresponding to the time point when the null value appeared;
[0064] Due to reasons such as unidentified sensor sampling points or errors in recorded data, there may be missing values (i.e., null values) in the raw data, which may lead to misalignment of subsequent data formats. Check the DataFrame data. If null values are found, since the flight test data is huge and the overall proportion of null values is extremely low, the row where the null value appears can be deleted.
[0065] When the found signal value is an infinite value or an infinitesimal value, it is also caused by a constant value or a missing value. Delete the row corresponding to the time point when the infinite value or infinitesimal value appears.
[0066] During processing, the horizontal axis of the time series data needs to be expanded according to time. Due to errors in the sensor data entry, when several rows of time values are the same in the search, the first row that appears is retained and the remaining rows are deleted.
[0067] For some signals, since the sensor results are indirect measurements, it is necessary to use the corresponding signal conversion formula. When the found signal value is an indirect measurement, the corresponding formula parameters are selected based on the original data, and the data is converted point by point to obtain the corresponding direct measurement result.
[0068] S3: Set the value range according to the flight timing parameters. Based on the effective time range and value range of different signals, set the value range and remove data that exceeds the value range from the data processed in step S2. By truncating the signal values that exceed the value range in terms of time range and eliminating points that exceed the value range, the amount of subsequent data calculation can be reduced.
[0069] S4: Remove discrete points from the data processed in step S3;
[0070] S41: Use the 3σ criterion to eliminate discrete points;
[0071] Because different signals in flight data change within a short period after the command is issued, the statistical characteristics of the overall signal value are completely different in different time periods. The signal value is first divided into several parts, i.e., continuous small windows. The mean and variance of each window are calculated, and the residuals are calculated for each signal value. Values exceeding three times the standard deviation are considered outliers. The formula for the discrete points is as follows:
[0072]
[0073] In the above formula, x i It is each signal value in the window, σ x It is the variance of the window signal values. It is the average of the signal values in the window.
[0074] S42: Use the Exponential Moving Average (EWMA) method to remove discrete points;
[0075] The average value of each point is considered as a weighted average of all past data. Data points closer to the current point have higher weights, and the weights decrease exponentially with increasing distance. Since traditional EWMA algorithms have a chronological time series and are mainly used for prediction, this paper proposes a bidirectional exponentially weighted moving average model. The core idea is to perform forward and reverse EWMA calculations on the time series data and combine the results to obtain a more comprehensive view of the data trend. This method is particularly suitable for reducing unidirectional time dependence and enhancing outlier identification in time series analysis. When applied to outlier removal, it does not need to consider the influence of time sequence, while taking into account the influence of global points on the current point. The time axis is flipped while the signal value remains unchanged before performing EWMA. For a data time series T = [t1, t2, ..., t...], ... n and signal train The specific process is as follows:
[0076] The formula for forward EWMA is as follows:
[0077]
[0078] In the above formula, t i Indicates time value, Here, α is the signal value, and 0 < α < 1. Over time, the weight of older observations decreases exponentially. (EWMA) forward (t i ) is a positive EWMA at t i The predicted value at any given time;
[0079] The formula for reversing a time column is as follows:
[0080]
[0081] The formula for reverse EWMA is as follows:
[0082]
[0083] The formula for obtaining the predicted value is as follows:
[0084]
[0085] The determination of discrete points is based on the moving average, the variance of the residuals, and the window size to establish the confidence boundary. Points exceeding the boundary are considered discrete and discarded. When the signal residuals follow a Gaussian distribution with a mean of 0, the following formula is used as the prediction confidence interval:
[0086]
[0087] In the above formula, k is half the window length, α is the significance level of the confidence interval, and s is the standard deviation of the window residuals. With the predicted values and confidence intervals, outlier identification is as follows:
[0088]
[0089] Use a decision formula to remove discrete points.
[0090] S43: Use the Isolation Forest method to remove discrete points. The concept of Isolation Forest is to use a random hyperplane to divide the data space. Each division generates two subspaces. Then, another random hyperplane is used to divide each subspace, and this process continues until each subspace contains only one data point. High-density clusters are divided many times before the division stops, while low-density points are placed in a subspace much earlier and are considered discrete points.
[0091] Based on the signals to be cleaned, relevant parameters of the tree model are selected. An isolated forest consists of many tree models. Since outlier detection gradually converges with the number of trees, after debugging, to balance computational resource consumption and convergence effect, the number of trees is set to 100-300. The number of trees can be appropriately increased depending on the amount of data. Due to the high sampling frequency and long sampling period of flight data, the sample size of a single data point is very large. When constructing the tree, the original data can be downsampled without replacement to improve the model's computational efficiency. During the construction of each subtree, since flight data is two-dimensional data, one feature is randomly selected from the two features of time and data value. Then, a value is randomly selected between its minimum and maximum values, and the entire tree is recursively constructed. The termination condition is that the tree depth reaches the average depth of the tree size. The outlier score for each point in each tree depends on its location. Then, different outlier proportions are selected based on different data samples. The tree model determines an outlier score threshold based on this proportion; points exceeding this threshold are considered outliers. Due to the large sample size of the flight data, the proportion of outliers is very low, and its value is set between 0.0001 and 0.01. After training, the model iterates through each point in the original data once to output the outlier detection results.
[0092] The specific implementation method is as follows:
[0093] S5: As Figure 9 The data after removing discrete points was manually verified. By visualizing the data, the ginput function in the matplotlib package was used to read the user's mouse coordinates. When selecting to delete, clicking the upper left and lower right corners containing the points to be deleted would form a square area. The selection and deletion could then be completed based on the coordinates within the square area in the original data. This process involved manual verification and further removal of discrete points.
[0094] like Figure 2-8 In all coordinate graphs, the horizontal axis represents time values, and the vertical axis represents signal values. The specific data cleaning process is as follows: [Example: Raw temperature data...] Figure 2 As shown: Based on the sample size of this data set, a window size of 200 was selected. The window mean, variance, and residuals were calculated. Outlier removal was performed using the 3σ criterion. Figure 3-4 As shown, a small number of outliers have not been removed. In this case, manual inspection is used to remove them to obtain the final result.
[0095] like Figure 6-7 As shown in the figure, EWMA outlier removal is performed on a pressure curve: Points marked with '×' are predicted points, and points marked with '.' are the original data. The predicted points are the averaged results. Then, the confidence interval is calculated using the PCI formula. For each original data point, points exceeding the confidence interval are considered outliers. Figure 7 As shown, points marked with '×' are outliers, and points marked with '.' are normal points;
[0096] like Figure 8 As shown, the signal values of a certain servo signal are relatively concentrated, while the outliers are scattered. Using isolated forests for outlier removal, it can be seen that outliers, as well as individual cusps and inflection points, are identified because they are located in areas with relatively low point density. Figure 8 As shown.
[0097] Therefore, this invention employs a data cleaning method for spacecraft flight timing parameters. Addressing the current problem of irregular distribution of discrete points in flight test data and the time-consuming and laborious process of manually removing discrete points one by one, this invention uses a unified data cleaning method that can quickly organize large amounts of data and improve data cleaning efficiency and quality.
[0098] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A data cleaning method for spacecraft flight timing parameters, characterized in that: Includes the following steps: S1: Collect several types of flight timing parameters as data to be processed, and store the data to be processed in DataFrame format; In step S1, during the storage of data in DataFrame format, the data of a flight timing parameter is divided into two columns: one column is the time value and the other column is the signal value. S2: Preprocess the data stored in step S1 to remove outliers; S3: Based on the corresponding value range set according to the flight timing parameters, remove the data that exceeds the value range after processing in step S2; S4: Remove discrete points from the data processed in step S3; In step S4, the steps for removing discrete points are as follows: S41: Use The criteria are used to eliminate discrete points; S42: Use the Exponential Moving Average (EWMA) method to remove discrete points; In step S42, the process of using the Exponential Moving Average (EWMA) method to remove discrete points is as follows: Perform forward and backward EWMA calculations on time series data, and combine the two results for a single data point's time series. and signal columns The formula for forward EWMA is as follows: In the above formula, Indicates time value, It is a signal value. It is the smoothing coefficient. , For positive EWMA in The predicted value at any given time; The formula for reversing a time column is as follows: The formula for reverse EWMA is as follows: The formula for obtaining the predicted value is as follows: The determination of discrete points is based on the moving average, the variance of the residuals, and the window size to establish confidence boundaries. Points exceeding these boundaries are considered discrete and discarded. When the signal residuals follow a Gaussian distribution with a mean of 0, the following formula is used as the confidence boundary. PCI : In the above formula, Half the length of the window. The significance level of the confidence interval. Using the standard deviation of the window residuals, predicted values, and confidence intervals, the formula for identifying outliers is as follows: Use a decision formula to remove discrete points; S43: Use the isolated forest method to remove discrete points; S5: Use manual verification to check the data after removing discrete points, and complete the data cleaning.
2. The data cleaning method for spacecraft flight timing parameters according to claim 1, characterized in that: In step S2, the specific process for removing outliers is as follows: The data stored in step S1 is traversed, including the following cases: When the found signal value is null, delete the row corresponding to the time point when the null value appeared; When the found signal value is an infinite value or an infinitesimal value, delete the row corresponding to the time point when the infinite value or infinitesimal value appears; When several rows of the same time value are found, keep the first row that appears and delete the rest. When the found signal value is an indirect measurement value, the corresponding formula parameters are selected according to the corresponding signal conversion formula and the original data, and the data is converted point by point.
3. The data cleaning method for spacecraft flight timing parameters according to claim 2, characterized in that: In step S3, the specific process of removing data that exceeds the value range is as follows: Based on the effective time range and value range of different signals, a value range is set, and signal values exceeding the value range are truncated within the time range, while points exceeding the value range are eliminated.
4. The data cleaning method for spacecraft flight timing parameters according to claim 1, characterized in that: In step S41, using The process of eliminating discrete points using the criteria is as follows: First, divide the signal values into several consecutive small windows, calculate the mean and variance of each window, and calculate the residual for each signal value. Values exceeding three times the standard deviation are considered outliers. The formula for discrete points is as follows: In the above formula, It is each signal value in the window. It is the variance of the window signal values. It is the average of the signal values in the window.
5. The data cleaning method for spacecraft flight timing parameters according to claim 1, characterized in that: In step S43, the specific process of using the isolated forest method to remove discrete points is as follows: An isolated forest consists of several tree models, with the number of tree models ranging from 100 to 300. During the construction of each tree model, time and signal values are used to determine the threshold for outlier scores. Points exceeding this threshold are identified as outliers. The proportion of outliers is set between 0.0001 and 0.
01. The isolated forest model is used to process the data and output the outlier detection results.
Citation Information
Patent Citations
Server multi-performance index anomaly detection method and device based on time sequence
CN115412455A
System and method for outlier detection via estimating clusters
US9336484B1
