Engine fault warning method, device and storage medium based on pattern recognition
Through the design of the random forest-XGB-KNN integrated model and the dual probability state warning threshold, the problems of low engine fault warning accuracy and insufficient early warning time in the prior art are solved, and the effects of high accuracy and early warning are achieved.
Patent Information
- Application Number
- CN202211715434.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-12-29
AI Technical Summary
The prior art is difficult to achieve high-precision early warning of engine failures, and the advance amount of early warning time cannot be effectively considered, resulting in insufficient response time for users.
Using a pattern recognition-based method, feature selection and model training are performed through the random forest-XGB-KNN integrated model, an engine fault warning model is established, fault domain, normal domain and early warning domain are divided, and a dual probability state warning threshold is set to achieve early warning.
It improves the accuracy and efficiency of fault warning, and can conduct early warnings 440 minutes in advance on average, ensuring that users have enough time to deal with upcoming faults, and has high practical application value.
Smart Images

Figure CN116089817B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of engine failure warning, and in particular to an engine failure warning method, device and storage medium based on pattern recognition. Background Art
[0002] With the advancement of automotive sensor detection technology and automotive electronic software, vehicle fault warning technology is gaining increasing attention within the vehicle design industry. Traditional fault warning technology, based on expert systems, offers excellent stability and reliability, but suffers from long development cycles and requires extensive expertise and experience. Machine learning methods offer a more convenient and cost-effective approach to developing fault warning systems. By incorporating data science techniques, they uncover patterns hidden in the data and propose solutions to problems. For fault warning, three common approaches are classification, regression, and clustering.
[0003] Fault warning based on the classification principle is a supervised learning method. By manually labeling samples of various fault states and normal states, a classification model is used to build a fault recognition model that can determine the sample category based on the labeled samples. The abnormal value of the current state can be calculated based on the output results of the model, and an alarm signal can be output when the abnormal value is higher than the set threshold.
[0004] In the field of data science, classification tasks are often referred to as pattern recognition, which involves classifying patterns. For fault warning systems, this requires first determining the current system state and then predicting the subsequent state. A wide variety of classification algorithms exist, ranging from traditional machine learning methods like KNN, Logistic Regression, and Support Vector Machines to the recently resurgent artificial neural network technology. Classification technology is widely used in the development of automotive fault diagnosis systems.
[0005] The Chinese patent application "An Engine Fault Diagnosis Method Based on Feature Fusion" with application number 202110607282.1 discloses an engine fault diagnosis method based on feature fusion, which uses feature fusion and support vector machines to complete engine fault diagnosis and identify various engine faults more accurately. First, the research data is modally decomposed, and then the singular value, approximate entropy and sample entropy are selected as fault features. Finally, these three features are fused and input into the SVM classifier for training, testing and simulation, which greatly improves the accuracy of fault diagnosis. However, this method is difficult to implement training for large-scale samples, and does not take into account the advance warning time, resulting in users not having enough time to deal with upcoming faults, and its use value is greatly reduced. Summary of the Invention
[0006] The purpose of the present invention is to provide an engine fault warning method, device and storage medium based on pattern recognition, so as to improve the accuracy of fault warning and set the warning time advance to achieve effective early warning.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] An engine failure early warning method based on pattern recognition comprises the following steps:
[0009] S1: Get the original data of the engine;
[0010] S2: Preprocessing of engine raw data;
[0011] S3: Perform feature selection on the preprocessed data based on the random forest model to filter out useful features and use them as training data;
[0012] S4: Select multiple models from preconfigured classification models;
[0013] S5: Connect the selected multiple classification models based on the weights to form a fault recognition model, and use the training data to tune the hyperparameters of the fault recognition model, where the weights are the hyperparameters of the fault recognition model;
[0014] S6: Evaluate the performance of the trained fault recognition model. If it does not meet the requirements, reselect the classification model or readjust the hyperparameters, and retrain and re-evaluate the performance. If it meets the requirements, proceed to S7.
[0015] S7: Based on the trained fault recognition model, an engine fault warning model is established and trained, and the engine status is divided into a fault domain, a normal domain, and a warning domain to implement fault warning.
[0016] S8: Establish model evaluation indicators to evaluate the performance of the engine fault warning model. If the performance does not meet the standards, adjust the hyperparameters of the engine fault warning model. If the performance meets the standards, use the trained engine fault warning model for fault warning.
[0017] The preprocessing includes table linking processing, data cleaning, fault type filtering and normal time data extraction.
[0018] The data cleaning includes redundancy processing, missing value processing and outlier processing.
[0019] The classification models include random forest model, XGB model and KNN model.
[0020] The evaluation indicators for the performance evaluation of the trained fault recognition model include precision, recall rate, F1 score, accuracy, macro average and weighted average.
[0021] The engine failure warning model is a dual-probability state warning threshold model, and the specific warning method is:
[0022] The trained fault recognition model outputs the probabilities of different labels based on the input data. The top two probability data are recorded as the maximum probability state and the second probability state respectively.
[0023] Check whether the label corresponding to the maximum probability state is a fault label. If so, determine whether the maximum probability exceeds the pre-configured warning threshold. If so, an alarm is triggered. If not, or the label is not a fault label, the state is switched to the second probability state.
[0024] Check whether the label corresponding to the second probability state is a fault label. If so, determine whether the second probability exceeds the preconfigured warning threshold. If it exceeds the warning threshold, an alarm is issued. If it does not exceed the warning threshold or the label is not a fault label, no alarm is issued.
[0025] The hyperparameter of the engine fault warning model is the warning threshold. Specifically, the warning time advance is used as a parameter to determine the relationship between the recognition result of the fault recognition model and this parameter, thereby determining the parameter value corresponding to the highest recognition accuracy, and the failure probability corresponding to the warning time advance is used as the warning threshold.
[0026] The performance evaluation indicators of the engine fault warning model include warning time advance, warning accuracy, warning recall rate and warning false alarm frequency.
[0027] An engine failure warning device based on pattern recognition includes a memory, a processor, and a program stored in the memory. When the processor executes the program, the method described above is implemented.
[0028] A storage medium stores a program thereon, and when the program is executed, the method described above is implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] (1) The fault domain model designed by the present invention proposes to divide the engine status into fault domain, normal domain, and warning domain, thereby improving the accuracy of the model warning.
[0031] (2) The present invention uses the random forest-XGB-KNN integrated model as the kernel model of fault warning, which improves the accuracy and efficiency of warning.
[0032] (3) The present invention takes into account the advance warning time. While ensuring high warning accuracy, it can issue fault warnings 440 minutes in advance on average, reserving sufficient response time for users. The design is more humane and has high practical application value.
[0033] (4) The recognition model of the present invention can adopt other advanced neural network models and other models, which can also achieve the purpose of the present invention, maintain high recognition accuracy, have a wide range of applications, and are less restricted by the recognition model itself. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of the method of the present invention;
[0035] Figure 2 Schematic diagram of the distribution of groups whose categories are inseparable and separable;
[0036] Figure 3 Schematic diagram of continuous movement of engine status;
[0037] Figure 4 This is the alarm flow chart of the engine fault warning model. DETAILED DESCRIPTION
[0038] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0039] 1. Model Assumptions
[0040] The fault domain model (FDM) is an assumption about the distribution of fault states in a high-dimensional space and serves as the theoretical foundation for classification-based fault warning algorithms. This model describes the vehicle's state using n given input indicators, geometrically representing the vehicle's state as a point in n-dimensional space. The FDM, upon which classification-based warning algorithms are based, has two assumptions: separable clustering of faults and continuous movement of engine states.
[0041] A. Separability of Fault Cluster Distribution Assumption
[0042] The classification problem, from a geometric perspective, is to find a boundary line to separate groups of different categories. Therefore, it is required that the groups of different categories have an effectively separable distribution form. Figure 2 Taking two groups described by characteristics as an example, the distribution forms of inseparable groups (usually groups with similar or even identical distribution forms) and effectively separable groups in space are demonstrated.
[0043] When the groups represented by various labels satisfy the separable cluster distribution assumption in distribution, for the output results of the soft classification model, the probability value of each class of labels geometrically represents the distance of the input sample from each class of groups in the n-dimensional space described by the characteristics of n samples.
[0044] B. Continuous Motion Assumption of Engine State
[0045] When the various fault and normal states of a vehicle satisfy the separable cluster distribution assumption in an n-dimensional space described by n input indicators, the various vehicle states can be viewed as domains of varying location, shape, and size in this n-dimensional space. The vehicle's state at any moment can be represented as a point located in any domain within this space. The set of domains representing faults is called the fault domain, and the set of domains representing normal states is called the normal domain. Fault warning aims to output a warning signal when the vehicle's state shows a tendency to move from the normal domain to the fault domain, or approaches the fault domain. This can be achieved by defining a parcel area a certain distance outside the fault domain as the warning domain. When the engine status point enters the warning domain, a warning signal is output.
[0046] However, this warning idea has an important premise assumption, that is, the change of engine state is continuous, such as Figure 3 As shown, when the engine state transitions from one domain to another, it inevitably crosses the boundary between domains rather than jumping within the n-dimensional state space. This allows for the delineation of a warning domain encompassing the fault domain, enabling the output of a warning signal when the vehicle is about to transition from a normal state to a faulty state. As shown in the figure below, the dashed, light-colored areas represent warning domains encompassing different faults. When the engine state movement satisfies the continuity assumption, the engine state must first pass through the warning domain when transitioning from a normal state to a faulty state. Combined with the soft classification model's probability value representing the distance between a state point and each cluster, the engine state classification model can achieve fault warning goals.
[0047] 2. Fault warning method
[0048] This embodiment provides an engine failure warning method based on pattern recognition, such as Figure 1 As shown, the following steps are included:
[0049] S1: Obtain engine raw data.
[0050] The data in this embodiment is derived from real-time operational data collected by BOSCH for four freight trucks (numbered CAMC009, CAMC010, CAMC011, and CAMC012) under Valin Xingma Automobile (Group) Co., Ltd. over a 12-month period in 2020. The included driving data is recorded and stored on a daily basis. The data for each date is divided into two CSV files, one storing the real-time operational data (called the RE table) and the other storing the operational data collected at the time of the engine failure (called the FT table). In the RE (RealTime data) table and the FT (Fault data) table, the RE table contains 63 fields and the FT table contains 17 fields.
[0051] S2: Preprocess the engine raw data.
[0052] S21: Table link processing
[0053] Because the original data, including vehicle driving process sampling data and fault time data, is stored in the RE table and FT table respectively, a primary key is needed to link the information in the two tables. First, 12 unused fields in the original RE table are removed, retaining the remaining 51 fields; and 4 useful fields in the original FT table are retained.
[0054] The 'TM' column is selected as the primary key to connect the RE and FT tables. The data format of the TM column is 'year-month-day hour:minute:second:microsecond'. The microsecond data is discarded first. The information in the RE table is linked to the FT table through outer-join (that is, the information that does not correspond between the two tables is filled with Nan). The result of the linking is stored in the form of RE_FTjoin table. Each table contains 54 fields.
[0055] After linking, a total of 1,073 RE_FTjoin tables covering 12 months were generated, containing a total of 24,572 failure data items. At this point, the normal time data included in the samples was removed, retaining only the failure data for subsequent processing. The normal data was sampled using the adopted sampling method and then added to the training data.
[0056] S22: Data Cleaning
[0057] Redundancy processing: Since there are many redundant fault records in the original FT table, there are redundant fault time records in the generated RE_FTjoin table. These entries are removed through the deduplication instruction.
[0058] Missing value handling: The original FT and RE tables do not contain missing values in any of the fields. However, due to mismatched acquisition signals between the FT and RE data, some fault-time data cannot be matched to the corresponding FT data during the outer-join process. Entries with these incomplete time matches are directly removed.
[0059] Outlier processing: After inspection, there are no outlier values in the fields of the RE_FTjoin data generated by the link.
[0060] After the above three steps, 14,497 pieces of fault data were finally obtained.
[0061] S23: Fault type filtering
[0062] A fault identification model was established, with a sample size threshold of 100, to eliminate fault types with a sample size of less than 100. The 14,497 cleaned data items were classified and counted by fault type. The results showed that a total of 64 fault types occurred, but the sample size of 55 of them was less than 100.
[0063] Finally, the nine most common faults, '55|4', '5222|155', '5243|1', '91|19', '5557|2', '5266|4', '4399|11', '5268|4', and '5393|22', were retained, with a total of 13,627 fault records. Among them, the two types of faults, '55|4' and '5222|155', were collectively classified as '55|4'.
[0064] S24: Normal time data extraction
[0065] 12,000 normal moment data were selected from the normal data set by random sampling without replacement and added to the fault data set, thus obtaining 25,627 data as the training set.
[0066] The normal data set here is also specially screened: the normal data records with fault records within 1800 time steps above and below are removed from the original normal data set, and the remaining normal data are used as the population of random sampling without replacement.
[0067] S3: Perform feature selection on the preprocessed data based on the random forest model to filter out useful features and use them as training data.
[0068] The cleaned data contains 54 features. Excluding the time feature 'TM' and label features like 'FaultCode' and 'SPN|FMI', 50 features remain. Feature filtering can eliminate features that are not very discriminative for the sample, simplifying the model and saving computing power.
[0069] First, a random forest model framework was constructed. Considering the large number of data features (50), the number of classifier trees was set to 200. All 13,627 fault data items were added with 12,000 normal data items for modeling, and the feature influence was output.
[0070] The cleaned data was input into the random forest model, and the influence value of each feature was calculated as the influence ratio through code conversion. 20 features with an influence of less than 0.05% were eliminated, and the remaining 30 features were retained.
[0071] Finally, the training set contains 25,627 data items and 32 fields (including the field 'SPN|FMI' which will be used as y), including records of normal times and records of 8 types of faults. The fault recognition model will be trained based on this training set.
[0072] S4: Select multiple models from preconfigured classification models.
[0073] The classification models selected in this embodiment include random forest model, XGB model, and KNN model.
[0074] S5: Based on the weights, the selected multiple classification models are connected to form a fault identification model, and the hyperparameters of the fault identification model are tuned using the training data, where the weights are the hyperparameters of the fault identification model.
[0075] In this embodiment, the three models of random forest, XGB, and KNN are integrated through the integration function VotingClassifier() in the Python-sklearn library to form a random forest-XGB-KNN integration model and a fault identification model.
[0076] The hyperparameter settings for each classifier in this ensemble model are as follows: For the random forest model, set the number of subclassifier trees to 250, the maximum classifier depth to 60, and use information entropy as the splitting metric; for the KNN model, set the number of nearest neighbors k to 10, and the weight of each point to be inversely proportional to its distance to the point to be classified; for the XGB model, set the subclassifier to 'gbtree' and the maximum tree depth to 6. The weights of the three classifiers are set to 0.4 for the random forest, 0.4 for the XGB, and 0.2 for the KNN.
[0077] In supervised learning, training data is often divided into three sets: training set, validation set, and test set. These three datasets play different roles in model training and evaluation. The training set is used to adjust model parameters through gradient descent of the loss function; the validation set is used to manually adjust model hyperparameters. The data in the validation set must not overlap with the training set, otherwise the validated model performance will be biased upwards; the test set is used for the final evaluation of model performance. The data in the test set must not overlap with either the training set or the validation set, and the data in the test set should be completely independent of the model training process from beginning to end.
[0078] Due to the small amount of available data (the lower limit of the sample size for each fault is 100), the training data is divided into training and test sets in a 9:1 ratio through stratified sampling of various fault labels and normal data labels, resulting in 23,059 training sets and 2,563 test sets.
[0079] Since there is no validation set, we use 10-fold cross-validation for model training. N-fold cross-validation involves splitting the training set into n equal parts through stratified sampling, with n-1 parts used for model training and the remaining part used as the validation set. This process is repeated until every data point has served as a validation set. The average performance of these n training and validation runs is then used to assist in hyperparameter tuning. Cross-validation comprehensively examines the impact of model hyperparameters on model performance and helps avoid overfitting. Here, 10-fold cross-validation is performed on a training set of 23,059 data points, with 2,306 samples per data point.
[0080] S6: Evaluate the performance of the trained fault identification model. If it does not meet the standards, reselect the classification model or readjust the hyperparameters, and retrain and re-evaluate the performance. If it meets the standards, execute S7.
[0081] A performance benchmark is a minimum performance threshold established based on the structural characteristics of the training data to assess the effectiveness of a trained model. A. Random Power Benchmark: In a classification task, the baseline accuracy of a completely random classification model for each class label is called the random power benchmark, which is equal to 100% / number of labels. In this study's classification task, since there are nine labels, the random classification model's power is 1 / 9 = 0.11. The model's performance is considered effective when the trained classification model achieves a classification accuracy greater than this value on each task. B. Mode Power Benchmark: The mode label is the label with the largest sample size in the training data. When the model is unable to identify any label and simply identifies all examples as the mode label, the model's performance is considered effective. In this study's classification task, the label with the largest sample size is '55|4', accounting for 0.47% of the sample size. The model's performance is considered effective when the trained classification model achieves a classification accuracy greater than this value.
[0082] The classification performance indicators used in this embodiment include: Precision, Recall, F1Score, Accuracy, Macro Average, and Weighted Average.
[0083] The training and verification results of the fault identification model are shown in Table 1, and the test results are shown in Table 2.
[0084] Table 1 Fault identification model training and verification results
[0085] Accuracy Recall F1 score Support number 4339|11 97% 35% 52% 190 5243|1 89% 92% 91% 1032 5266|4 87% 69% 77% 209 5268|4 95% 69% 80% 167 5393|22 95% 78% 85% 135 5557|2 85% 77% 81% 509 55|4 98% 100% 99% 9397 91|19 99% 99% 99% 622 Normal|Normal 98% 98% 98% 10798 Accuracy 97% 23059 Macro average 94% 80% 85% 23059 Weighted average 97% 97% 97% 23059
[0086] Table 2 Fault identification model test results
[0087]
[0088]
[0089] It can be seen that the model integrated by random forest, XGB, and KNN with a weight ratio of 2:2:1 has an accuracy of 97%, a macro-average precision of 93%, a macro-average recall of 80%, a weighted average precision of 97%, and a weighted average recall of 97%.
[0090] Therefore, this fault identification model meets the requirements and there is no need to reselect the classification model or readjust the weight parameters. This embodiment constructs an engine fault warning model based on the above model.
[0091] S7: Based on the trained fault recognition model, an engine fault warning model is established and trained, and the engine status is divided into a fault domain, a normal domain, and a warning domain to achieve fault warning.
[0092] In this embodiment, the engine failure warning model is a dual-probability state warning threshold model. The specific warning method is as follows: Figure 4 As shown, the following steps are included:
[0093] The trained fault recognition model outputs the probabilities of different labels (including eight fault labels and one normal label) based on the input data. Taking into account the model's running speed and efficiency, the top two probability data are taken and recorded as the maximum probability state and the second probability state, respectively.
[0094] Check whether the label corresponding to the maximum probability state is a fault label. If so, determine whether the maximum probability exceeds the pre-configured warning threshold. If so, an alarm is triggered. If not, or the label is not a fault label, the state is switched to the second probability state.
[0095] Check whether the label corresponding to the second probability state is a fault label. If so, determine whether the second probability exceeds the preconfigured warning threshold. If it exceeds the warning threshold, an alarm is issued. If it does not exceed the warning threshold or the label is not a fault label, no alarm is issued.
[0096] The hyperparameter of the engine fault warning model is the warning threshold. Specifically, the warning time advance is used as a parameter to determine the relationship between the recognition result of the fault recognition model and this parameter, thereby determining the parameter value corresponding to the highest recognition accuracy, and the failure probability corresponding to the warning time advance is used as the warning threshold.
[0097] S8: Establish model evaluation indicators to evaluate the performance of the engine fault warning model. If the performance does not meet the standards, adjust the hyperparameters of the engine fault warning model. If the performance meets the standards, use the trained engine fault warning model for fault warning.
[0098] In this embodiment, the model evaluation indicators include:
[0099] A. Advance warning time
[0100] Fault warning algorithms require advanced warning of impending faults. The warning lead time measures the time difference between the initial receipt of a specific fault warning and the actual occurrence of that fault. The greater the warning lead time, the more time passengers have to react, and the greater the actual value of the warning.
[0101] B. Early warning accuracy
[0102] Warning accuracy is defined as the probability that a vehicle will experience a specific fault on the day a warning is received. The accuracy of a warning reflects its credibility.
[0103] C. Warning recall rate
[0104] The early warning recall rate is defined as the probability that a fault that will actually occur will be warned in advance. The early warning recall rate reflects the sensitivity of the early warning system.
[0105] D. Frequency of false alarms
[0106] The false alarm frequency is defined as the number of times a vehicle receives a warning about a fault that did not actually occur during the day's driving. This false alarm rate reflects the frequency of warnings received for faults that will not actually occur during the vehicle's driving, reflecting the extent to which the warning system is ineffectively disrupting passengers. In this study, to account for daily variations in driving time, the proportion of false alarms received during the total driving time was used as a proxy.
[0107] The model evaluation method of this embodiment is to screen the warning results by setting different warning thresholds, and calculate four evaluation indicators under different thresholds to assist in adjusting the hyperparameters of the warning thresholds.
[0108] A. Traverse the RE_FTjoin table to obtain the warning result table
[0109] The strategy is to use the early warning model to process all entries in RE_FTjoin without setting an early warning threshold. The early warning model structure is shown in the figure below. The model will alert for the state with the highest probability of failure at each moment. Because when the state with the highest probability is normal, the state with the second probability is definitely a failure, the model will directly alert for the state with the second probability when the state with the highest probability is not a failure.
[0110] The time information, the maximum probability fault state, and the corresponding probability value are stored in the CautionTimepoint table. Furthermore, the time information of the fault occurrence in the RE_FTjoin table is also recorded and stored in the FaultTimepoint table for subsequent verification of warning results. After processing, a total of 663 CautionTimepoint and FaultTimepoint records were obtained. The date information is annotated in each table name for easy pairing.
[0111] B. Traverse the CautionTimepoint and FaultTimepoint tables and calculate the four indicators under each warning threshold
[0112] The purpose of this performance evaluation is to understand the changes in the four evaluation metrics for different faults at different warning thresholds, so as to select the most appropriate warning threshold for each fault. Therefore, the proposed evaluation result data structure should be a dictionary type, with each fault name as the key and the four evaluation metrics at each warning threshold as the value. By traversing the CautionTimepoint and FaultTimepoint tables, rows in the FaultProba field in the CautionTimepoint table are filtered using different warning thresholds. Based on the filtered records, the mean of the four evaluation metrics for each fault at different warning thresholds is calculated and saved. Here, 19 warning thresholds (0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, and 0.95) are selected. The metrics for these thresholds are calculated for eight fault types, taking approximately 24 hours.
[0113] The evaluation program organizes the results into four metrics. Each metric's result container is a dictionary, with the fault name as the key and the four evaluation metrics at each warning threshold as the value. Each dictionary contains eight key-value pairs for eight types of faults, and each key contains evaluation results at 19 warning thresholds. Visualizing these evaluation results clearly shows how each metric changes as the warning threshold increases, leading to the following conclusions:
[0114] A. Advance warning time
[0115] As the warning threshold increases, the overall warning time shows a downward trend. It's worth noting that the model performs exceptionally well on this metric. Even at a very high warning threshold (0.95), the average lead time for each fault remains over 200 minutes. This performance gives passengers ample time to prepare for impending faults, demonstrating its high practical value.
[0116] B. Early warning accuracy
[0117] As the warning threshold increases, the overall warning accuracy shows an upward trend. This is because the greater the probability that a state at a certain moment is under the fault label, the closer the state at that moment is to the actual fault domain in space, and the more recognizable it is.
[0118] C. Warning recall rate
[0119] As the warning threshold increases, the overall warning recall rate shows a downward trend. This is because the increased warning threshold filters out states that are farther from the fault domain, resulting in more instances where the engine state is moving rapidly toward the fault domain being missed.
[0120] It can be seen that recall rate and precision are performance indicators that increase and decrease at the same time. When adjusting the warning threshold, we must pay attention to the balance between the two to ensure that both are maintained at a high level.
[0121] D. Frequency of false alarms
[0122] As the warning threshold increases, the overall frequency of false alarms decreases. Because faults rarely occur during a vehicle's entire driving period, the majority of the time the vehicle is in the normal range. The percentage of times the engine enters or approaches the fault warning range is very low, resulting in a low false alarm rate overall (most faults are within the 0-3% range). However, even a false alarm rate of 1% is unacceptable to passengers, meaning a false alarm occurs once every 100 moments on average. Therefore, when adjusting the warning threshold, the false alarm frequency should be minimized while ensuring system safety.
[0123] To determine the hyperparameters of the fault warning model, this embodiment plots the four indicators of eight types of faults together, and selects the most appropriate warning thresholds for the eight types of faults based on how the four indicators of each fault change with the warning threshold.
[0124] The fault warning thresholds are shown in Table 3:
[0125] Table 3 Fault warning thresholds
[0126] Fault type Warning threshold ‘4399|11’ 0.35 ‘5243|1’ 0.95 ‘5266|4’ 0.85 ‘5268|4’ 0.55 ‘5393|22’ 0.6 ‘5557|2’ 0.95 ‘55|4’ 0.95 ‘91|9’ 0.95
[0127] Judging from the four early warning performance indicators for each fault at each threshold (as shown in Table 4), the present invention has very good performance in the fault early warning task, being able to warn of possible faults an average of 440 minutes in advance. The accuracy and recall rate for most fault types also reached a very high level of over 90%. The performance of each fault is shown in the table below, showing high practical value.
[0128] Table 4 Various fault warning performances
[0129] Fault type Early warning accuracy Warning recall rate Early warning time Warning false alarm frequency ‘4399|11’ 0.94 0.94 488 minutes 0.881078% ‘5243|1’ 0.96 0.96 525 minutes 0.008634% ‘5266|4’ 0.91 0.78 453min 0.129269% ‘5268|4’ 0.98 0.90 418 minutes 0.099155% ‘5393|22’ 0.99 0.96 304 minutes 0.006078% ‘5557|2’ 0.72 0.95 467 minutes 0.024249% ‘55|4’ 0.71 0.99 655min 0.983239% ‘91|9’ 0.99 0.98 206 minutes <0.000001% average value 0.90 0.93 440 minutes 0.266462%
[0130] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0131] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. An engine failure early warning method based on pattern recognition, characterized in that: The following steps are involved: S1: Get the original data of the engine; S2: Preprocessing of engine raw data; S3: Perform feature selection on the preprocessed data based on the random forest model to filter out useful features and use them as training data; S4: Select multiple models from preconfigured classification models; S5: Connect the selected multiple classification models based on the weights to form a fault recognition model, and use the training data to tune the hyperparameters of the fault recognition model, where the weights are the hyperparameters of the fault recognition model; S6: Evaluate the performance of the trained fault recognition model. If it does not meet the requirements, reselect the classification model or readjust the hyperparameters, and retrain and re-evaluate the performance. If it meets the requirements, proceed to S7. S7: Based on the trained fault recognition model, an engine fault warning model is established and trained, and the engine status is divided into a fault domain, a normal domain, and a warning domain to implement fault warning. S8: Establish model evaluation indicators to evaluate the performance of the engine fault warning model. If the performance does not meet the standards, adjust the hyperparameters of the engine fault warning model. If the performance meets the standards, use the trained engine fault warning model for fault warning. The engine failure warning model is a dual-probability state warning threshold model, and the specific warning method is: The trained fault recognition model outputs the probabilities of different labels based on the input data. The top two probability data are recorded as the maximum probability state and the second probability state respectively. Check whether the label corresponding to the maximum probability state is a fault label. If so, determine whether the maximum probability exceeds the pre-configured warning threshold. If so, an alarm is triggered. If not, or the label is not a fault label, the state is switched to the second probability state. Check whether the label corresponding to the second probability state is a fault label. If so, determine whether the second probability exceeds the preconfigured warning threshold. If it exceeds the warning threshold, an alarm is issued. If it does not exceed the warning threshold or the label is not a fault label, no alarm is issued.
2. The engine failure early warning method based on pattern recognition according to claim 1, characterized in that: The preprocessing includes table linking processing, data cleaning, fault type filtering and normal time data extraction.
3. The engine failure early warning method based on pattern recognition according to claim 2, characterized in that: The data cleaning includes redundancy processing, missing value processing and outlier processing.
4. The engine failure early warning method based on pattern recognition according to claim 1, characterized in that: The classification models include random forest model, XGB model and KNN model.
5. The engine failure early warning method based on pattern recognition according to claim 1, characterized in that: The evaluation indicators for the performance evaluation of the trained fault recognition model include precision, recall rate, F1 score, accuracy, macro average and weighted average.
6. The engine failure early warning method based on pattern recognition according to claim 1, characterized in that: The hyperparameter of the engine fault warning model is the warning threshold. Specifically, the warning time advance is used as a parameter to determine the relationship between the recognition result of the fault recognition model and this parameter, thereby determining the parameter value corresponding to the highest recognition accuracy, and the failure probability corresponding to the warning time advance is used as the warning threshold.
7. The engine failure early warning method based on pattern recognition according to claim 1, characterized in that: The performance evaluation indicators of the engine fault warning model include warning time advance, warning accuracy, warning recall rate and warning false alarm frequency.
8. An engine failure warning device based on pattern recognition, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
9. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Engine fault diagnosis method based on feature fusion
CN113435255A
Method and device for obtaining early warning threshold value and storage medium
CN107861915A
Wind turbine generator main shaft temperature early warning method and device based on multi-dimensional early warning strategy
CN112576454A