KNN-based engine residual life prediction method, system and device and computer readable storage medium
By combining the distance correlation coefficient and KNN model, optimizing data preprocessing and hyperparameter selection, the problem of KNN algorithm being sensitive to data quality and feature scale in engine residual life prediction is solved, and more accurate and reliable prediction results are achieved.
Patent Information
- Application Number
- CN202411968277.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-30
AI Technical Summary
The existing KNN algorithms are sensitive to data quality and feature scales in engine residual life prediction, resulting in difficulty in preprocessing and hyperparameter selection, affecting prediction accuracy.
By combining the distance correlation coefficient with the KNN model, data preprocessing and hyperparameter optimization are performed. The specific steps include preprocessing the engine sensor parameter data, calculating the correlation coefficient, building an optimal parameter set, traversing the hyperparameter grid to find the grid parameters, and determining the optimal hyperparameter combination.
It improves the classification accuracy and computing efficiency of the KNN model, realizes automated hyperparameter optimization, and improves the performance and reliability of the prediction model.
Smart Images

Figure CN119830751A_ABST
Abstract
Description
Background Art
[0002] In industrial fields such as aviation, engine performance and reliability are key factors in ensuring safety. Engine health management and predictive maintenance are of great significance in reducing operating costs and improving safety.
[0003] As an instance-based learning algorithm, KNN (K-Nearest Neighbors) algorithm has been widely used in many fields, especially in classification and regression problems. Its basic principle is to predict the category or attribute value of new data points by measuring the distance between different data points. For the problem of engine remaining life prediction, KNN algorithm can effectively analyze historical data, identify patterns and trends, and thus predict the remaining service life of the engine. Therefore, studying KNN algorithm in engine remaining life prediction has important engineering significance. By optimizing the hyperparameter configuration of KNN, the prediction accuracy can be improved, the maintenance cost can be reduced, and unexpected failures can be avoided, thereby improving the operating efficiency and safety of the engine.
[0004] In practical applications, the simplicity and intuitiveness of the KNN algorithm make it easy to implement and understand, but the KNN algorithm is very sensitive to the quality of the data and the scale of the features. Therefore, when using the KNN algorithm to predict the remaining life of the engine, how to appropriately preprocess the data and select hyperparameters to obtain a more accurate remaining life prediction value is the key issue of this prediction model. Summary of the invention
[0005] The present specification provides a KNN-based engine remaining life prediction method, system, device and computer-readable storage medium to solve the problem of how to perform appropriate preprocessing of data and hyperparameter selection to obtain a more accurate remaining life prediction value in the prior art, that is, the problem of optimizing the hyperparameter configuration of the existing KNN prediction model.
[0006] To achieve the above object, the present invention adopts the following technical solution:
[0007] In a first aspect of the present specification, a method for predicting the remaining life of an engine based on KNN is provided, the method comprising the following steps:
[0008] Step S1, acquiring sensor parameter data of the engine as training data to construct a training set; preprocessing the sensor parameter data of the engine in the training set to obtain preprocessed data;
[0009] Step S2, calculating the correlation coefficient between each pre-processed data and its corresponding remaining life data, and adding the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to the pre-constructed optimal parameter set;
[0010] Step S3, obtaining the hyperparameters corresponding to each preprocessed data in the optimal parameter set, and constructing a hyperparameter grid; the hyperparameters include K value, distance metric and weight function;
[0011] Step S4, traversing the hyperparameter grid, substituting each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization to obtain an optimal hyperparameter combination; substituting the optimal hyperparameter combination into the KNN model as the optimal KNN model;
[0012] Step S5, acquiring monitoring data of the engine for which remaining life prediction is to be performed; inputting the monitoring data of the engine for which remaining life prediction is to be performed into the optimal KNN model to obtain a prediction result of the remaining life of the engine.
[0013] In some preferred embodiments, the preprocessing includes normalizing the training set to map the data values of the engine sensor parameters to between [0, 1].
[0014] In some preferred embodiments, the correlation coefficient between each pre-processed data and its corresponding remaining life data is calculated by:
[0015] The distance correlation coefficient is used to calculate the correlation coefficient between each pre-processed data and its corresponding remaining life data.
[0016] In some preferred embodiments, the distance correlation coefficient is used for calculation, and the method is as follows:
[0017] Define the sensor parameter data X and the remaining life data Y as paired continuous variables of length n, and the distance between all paired elements is:
[0018] a j,k =‖X j -X k ‖,j,k=1,2,...,n
[0019] b j,k =‖Y j -Y k ‖,j,k=1,2,...,n
[0020] Among them, a j,k 、b j,k Respectively represent the distance matrix between the elements of X and Y;
[0021] Compute the center distance matrix:
[0022]
[0023] Among them, A j,k , B j,kRepresent the center distance matrix of X and Y respectively, is the mean of the jth row in the distance matrix of X, is the mean of the kth column in the distance matrix of X, is the grand mean of the distance matrix of X; is the mean of the jth row in the distance matrix of Y, is the mean value of the kth column in the distance matrix of Y, is the grand mean of the distance matrix of Y;
[0024] Calculate distance covariance
[0025]
[0026] Calculate the distance variance of X and Y respectively:
[0027]
[0028]
[0029] in, are the distance variances of X and Y respectively;
[0030] Finally, the distance correlation coefficient is calculated based on the distance variance and distance covariance.
[0031] In some preferred embodiments, the distance correlation coefficient is calculated as follows:
[0032]
[0033] in, is the distance correlation coefficient, is the distance covariance between X and Y, ) are the distance variances of X and Y respectively.
[0034] In some preferred embodiments, the weight function includes uniform weight or inverse distance weight, wherein the inverse distance weight selects Euclidean distance, Manhattan distance or Chebyshev distance as the distance metric.
[0035] In some preferred embodiments, the grid optimization method is as follows:
[0036] Traverse the defined hyperparameter grid, for each set of hyperparameters, use the cross-validation method to split the training set into multiple subsets, train the KNN model, and record the performance indicators of each model to obtain the best hyperparameter combination, determine the optimal K value, and establish the optimal KNN model.
[0037] In a second aspect of this specification, a KNN-based engine remaining life prediction system comprises the following modules:
[0038] The acquisition module is configured to obtain the sensor parameter data of the engine as training data and construct a training set; preprocess the sensor parameter data of the engine in the training set to obtain preprocessed data;
[0039] A construction module is configured to calculate a correlation coefficient between each pre-processed data and its corresponding remaining life data, and add the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to a pre-constructed optimal parameter set;
[0040] The optimization module is configured to obtain the hyperparameters corresponding to each preprocessed data in the optimal parameter set and construct a hyperparameter grid; traverse the hyperparameter grid, substitute each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization, obtain the optimal hyperparameter combination and substitute it into the KNN model as the optimal KNN model;
[0041] A prediction module, configured to obtain monitoring data of an engine for which remaining life prediction is to be performed and input the data into the optimal KNN model to obtain a prediction result of the remaining life of the engine;
[0042] A verification module is configured to evaluate the prediction result.
[0043] In a third aspect of this specification, a KNN-based engine remaining life prediction device comprises:
[0044] at least one processor; and
[0045] a memory communicatively connected to at least one of the processors; wherein,
[0046] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned KNN-based engine remaining life prediction method.
[0047] A fourth aspect of the present specification is a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to be executed by the processor to implement the above-mentioned KNN-based engine remaining life prediction method.
[0048] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0049] 1) By combining the distance correlation coefficient with the KNN model, a more accurate prediction of the remaining life of the engine is achieved, which improves the classification accuracy and calculation efficiency of the KNN model; it can find the optimal sensor parameter combination more quickly and realize the automatic hyperparameter optimization of the KNN model, thereby improving the performance and reliability of the prediction model in practical applications;
[0050] 2) By combining the distance correlation coefficient and the grid search-based automated hyperparameter optimization algorithm, the optimal K value and distance metric of the KNN model are determined, the hyperparameter configuration of KNN is optimized, and the selection efficiency and prediction accuracy of the KNN algorithm are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0052] Figure 1 A flowchart of a method for predicting the remaining life of an engine based on KNN provided in an embodiment of this specification. DETAILED DESCRIPTION
[0053] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0054] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0055] This manual combines the distance correlation coefficient with the KNN model to find the optimal sensor parameter combination more quickly, and realizes the automatic hyperparameter optimization of the KNN model, thereby improving the performance and reliability of the prediction model in practical applications. The details are as follows:
[0056] The first embodiment of this specification provides a KNN-based engine remaining life prediction method, including steps S1 to S5, see Figure 1 , each step is described in detail as follows:
[0057] Step S1, acquiring sensor parameter data of the engine as training data to construct a training set; preprocessing the sensor parameter data of the engine in the training set to obtain preprocessed data.
[0058] Preferably, the pretreatment method is:
[0059] The engine sensor parameter data in the training set are normalized, that is, deviation is standardized, and each sensor parameter data is linearly transformed to map its data value to [0, 1].
[0060] Furthermore, in this embodiment, the specific calculation formula for the normalization process is as follows:
[0061]
[0062] Among them, x i is the i-th sensor parameter, and max is the sensor parameter x i The maximum value of the sensor parameter x i The minimum value of .
[0063] Step S2, calculating the correlation coefficient between each pre-processed data and its corresponding remaining life data, and adding the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to the pre-constructed optimal parameter set;
[0064] The distance correlation coefficient is used to calculate the parameter data and remaining life data of each engine sensor. The method is as follows:
[0065] Define the sensor parameter data X and the remaining life data Y as paired continuous variables of length n, and the distance between all paired elements is:
[0066] a j,k =‖X j -X k ‖,j,k=1,2,...,n
[0067] b j,k =‖Y j -Y k ‖,j,k=1,2,...,n
[0068] Among them, a j,k 、b j,k Respectively represent the distance matrix between the elements of X and Y;
[0069] Compute the center distance matrix:
[0070]
[0071] Among them, A j,k , B j,k Represent the center distance matrix of X and Y respectively, is the mean of the jth row in the distance matrix of X, is the mean of the kth column in the distance matrix of X, is the grand mean of the distance matrix of X; is the mean of the jth row in the distance matrix of Y, is the mean value of the kth column in the distance matrix of Y, is the grand mean of the distance matrix of Y;
[0072] Calculate distance covariance
[0073]
[0074] Calculate the distance variance of X and Y respectively:
[0075]
[0076] in, are the distance variances of X and Y respectively;
[0077] Finally, the distance correlation coefficient is calculated based on the distance variance and distance covariance, and the distance correlation coefficient is:
[0078]
[0079] in, is the distance correlation coefficient, is the distance covariance between X and Y, (Y) are the distance variances of X and Y respectively.
[0080] In this embodiment, it is preferred to calculate the collected 20 sensor parameter data of a certain engine, such as the Mach number, throttle lever angle, fan inlet temperature, and the corresponding remaining life values, and the optimal parameter set obtained according to the calculation result of the distance correlation coefficient is {Mach number, throttle lever angle, fan inlet temperature, low-pressure turbine outlet temperature, fan inlet pressure, outer duct total pressure, engine pressure ratio, high-pressure compressor outlet static pressure, fuel flow and P30 ratio, core engine corrected speed, bleed air enthalpy}.
[0081] Step S3, obtaining the hyperparameters corresponding to each preprocessed data in the optimal parameter set, and constructing a hyperparameter grid; the hyperparameters include K value, distance metric and weight function;
[0082] In this embodiment, the preferred K value range is [1,6].
[0083] Preferably, the weight function comprises uniform weight or inverse distance weight, wherein the distance metric selected by the inverse distance weight is Euclidean distance, Manhattan distance or Chebyshev distance.
[0084] Step S4, traversing the hyperparameter grid, substituting each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization to obtain the optimal hyperparameter combination; substituting the optimal hyperparameter combination into the KNN model as the optimal KNN model.
[0085] Preferably, the grid optimization method is:
[0086] Traverse the defined hyperparameter grid, for each set of hyperparameters, use the cross-validation method to split the training set into multiple subsets, train the KNN model, and record the performance indicators of each model to obtain the best hyperparameter combination, determine the optimal K value, and establish the optimal KNN model.
[0087] Preferably, in this embodiment, the performance indicators are accuracy, recall and precision.
[0088] In this embodiment, according to the above optimal parameter set, K=2 is preferred, and the weight function is a uniform weight.
[0089] Step S5: construct a test set based on the monitoring data of the engine for which the remaining life prediction is to be performed; input the test set into the optimal KNN model to obtain a predicted value of the remaining life of the engine.
[0090] Preferably, after obtaining the predicted value, the prediction effect is evaluated based on the root mean square error RMSE.
[0091] The second embodiment of this specification provides a KNN-based engine remaining life prediction system, which includes the following modules:
[0092] The acquisition module is configured to obtain the sensor parameter data of the engine as training data and construct a training set; preprocess the sensor parameter data of the engine in the training set to obtain preprocessed data;
[0093] A construction module is configured to calculate the correlation coefficient between each pre-processed data and its corresponding remaining life data using the distance correlation coefficient, and add the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to the pre-constructed optimal parameter set;
[0094] The optimization module is configured to obtain the hyperparameters corresponding to each preprocessed data in the optimal parameter set and construct a hyperparameter grid; traverse the hyperparameter grid, substitute each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization, obtain the optimal hyperparameter combination and substitute it into the KNN model as the optimal KNN model;
[0095] A prediction module, configured to obtain monitoring data of an engine for which remaining life prediction is to be performed and input the data into the optimal KNN model to obtain a prediction result of the remaining life of the engine;
[0096] A verification module is used to evaluate the prediction result.
[0097] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the system described above can refer to the corresponding process in the method embodiment, and will not be repeated here.
[0098] It should be noted that the above embodiment provides an engine remaining life prediction system based on KNN, and only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be decomposed or combined. For example, the modules in the above embodiments can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules involved in the embodiments of the present invention are only for distinguishing the modules and are not regarded as improper limitations of the present invention.
[0099] The third embodiment of the present specification provides a KNN-based engine remaining life prediction device, comprising:
[0100] at least one processor; and
[0101] a memory communicatively connected to at least one of the processors; wherein,
[0102] The memory stores instructions that can be executed by the processor, and the instructions are used to be executed by the processor to implement the above-mentioned KNN-based engine remaining life prediction method.
[0103] The fourth embodiment of the present specification provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the processor to implement the above-mentioned KNN-based engine remaining life prediction method.
[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process and related instructions of the above-described devices and computer-readable storage media can refer to the corresponding processes in the aforementioned method examples and will not be repeated here.
[0105] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A KNN-based engine remaining life prediction method, characterized in that: The following steps are involved: Step S1, obtaining the sensor parameter data of the engine as training data, and constructing a training set; Preprocessing the sensor parameter data of the engine in the training set to obtain preprocessed data; Step S2, calculating the correlation coefficient between each pre-processed data and its corresponding remaining life data, and adding the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to the pre-constructed optimal parameter set; Step S3, obtaining the hyperparameters corresponding to each preprocessed data in the optimal parameter set, and constructing a hyperparameter grid; the hyperparameters include K value, distance metric and weight function; Step S4, traversing the hyperparameter grid, substituting each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization to obtain an optimal hyperparameter combination; substituting the optimal hyperparameter combination into the KNN model as the optimal KNN model; Step S5, acquiring monitoring data of the engine for which remaining life prediction is to be performed; inputting the monitoring data of the engine for which remaining life prediction is to be performed into the optimal KNN model to obtain a prediction result of the remaining life of the engine.
2. The method for predicting the remaining life of an engine based on KNN according to claim 1, characterized in that: The preprocessing includes normalizing the training set to map the data values of the sensor parameter data of the engine to between [0, 1].
3. The method for predicting the remaining life of an engine based on KNN according to claim 1, characterized in that: The correlation coefficient between each pre-processed data and its corresponding remaining life data is calculated as follows: The distance correlation coefficient is used to calculate the correlation coefficient between each pre-processed data and its corresponding remaining life data.
4. The KNN-based engine remaining life prediction method according to claim 3, characterized in that: The method for calculating the correlation coefficient using the distance correlation coefficient is as follows: Define the sensor parameter data X and the remaining life data Y as paired continuous variables of length n, and the distance between all paired elements is: a j,k =‖X j -X k ‖,j,k=1,2,...,n b j,k =‖Y j -Y k ‖,j,k=1,2,...,n Among them, a j,k 、b j,k Respectively represent the distance matrix between the elements of X and Y; Compute the center distance matrix: Among them, A j,k , B j,k Represent the center distance matrix of X and Y respectively, is the mean of the jth row in the distance matrix of X, is the mean of the kth column in the distance matrix of X, is the grand mean of the distance matrix of X; is the mean of the jth row in the distance matrix of Y, is the mean value of the kth column in the distance matrix of Y, is the grand mean of the distance matrix of Y; Calculate distance covariance Calculate the distance variance of X and Y respectively: in, are the distance variances of X and Y respectively; Finally, the distance correlation coefficient is calculated based on the distance variance and distance covariance.
5. The method for predicting the remaining life of an engine based on KNN according to claim 4, characterized in that: The method for calculating the distance correlation coefficient is as follows: in, is the distance correlation coefficient, is the distance covariance between X and Y, (Y) are the distance variances of X and Y respectively.
6. The method for predicting the remaining life of an engine based on KNN according to claim 1, characterized in that: The weight function includes uniform weight or inverse distance weight, wherein the inverse distance weight selects Euclidean distance, Manhattan distance or Chebyshev distance as the distance metric.
7. The KNN-based engine remaining life prediction method according to claim 1, characterized in that: The method for optimizing the grid parameters is as follows: Traverse the defined hyperparameter grid, for each set of hyperparameters, use the cross-validation method to split the training set into multiple subsets, train the KNN model, and record the performance indicators of each model to obtain the best hyperparameter combination and determine the optimal K value.
8. A KNN-based engine remaining life prediction system, characterized in that: Contains the following modules: The acquisition module is configured to obtain the sensor parameter data of the engine as training data and construct a training set; preprocess the sensor parameter data of the engine in the training set to obtain preprocessed data; A construction module is configured to calculate a correlation coefficient between each pre-processed data and its corresponding remaining life data, and add the pre-processed data with a correlation coefficient greater than a set correlation coefficient threshold to a pre-constructed optimal parameter set; The optimization module is configured to obtain the hyperparameters corresponding to each preprocessed data in the optimal parameter set and construct a hyperparameter grid; traverse the hyperparameter grid, substitute each group of hyperparameters in the hyperparameter grid into the pre-constructed KNN model to perform grid parameter optimization, obtain the optimal hyperparameter combination and substitute it into the KNN model as the optimal KNN model; A prediction module, configured to obtain monitoring data of an engine for which remaining life prediction is to be performed and input the data into the optimal KNN model to obtain a prediction result of the remaining life of the engine; A verification module is configured to evaluate the prediction result.
9. A KNN-based engine remaining life prediction device, characterized in that: include: at least one processor; as well as a memory communicatively connected to at least one of the processors; wherein, The memory stores instructions executable by the processor, and the instructions are used to be executed by the processor to implement the KNN-based engine remaining life prediction method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to be executed by the processor to implement the KNN-based engine remaining life prediction method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for predicting residual life of aero-engine
CN113111572A
Method for predicting runoff elements by using K-nearest neighbor method
CN113705931A
Training method and training device of classification model for asthenopia predictive prediction
CN115192043A
PEMFC residual life prediction method and system of improved ESN
CN118226272A
Lightning activity meteorological association rule mining method and device and electronic equipment
CN119090000A