PSO-RF intelligent diagnosis method and system for thermal faults of marine diesel engine
Through the PSO-RF intelligent diagnosis method, simulation data and particle swarm optimization algorithm are used to solve the problem of complexity in the fault diagnosis process of marine diesel engines and relying on expert experience, achieving high-precision and high-reliability automated fault diagnosis.
Patent Information
- Application Number
- CN202411575296.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-28
AI Technical Summary
The fault diagnosis process of existing marine diesel engines is complex, has low accuracy and is overly dependent on expert experience.
Using PSO-RF intelligent diagnostic method, the diesel engine simulation model is designed through simulation software, fault data is generated, key features are extracted, random forest model is constructed, and model parameters are optimized using particle swarm optimization algorithm to realize automated fault diagnosis.
It significantly improves the accuracy and reliability of thermal fault diagnosis of diesel engines, reduces dependence on expert experience, and simplifies the diagnosis process.
Smart Images

Figure CN119538534A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of intelligent diagnosis of four-stroke diesel engines, and in particular relates to a PSO-RF intelligent diagnosis method and system for thermal faults of marine diesel engines. Background Art
[0002] As a reciprocating internal combustion engine widely used in ship power systems, marine diesel engines play a vital role in power supply. Marine diesel engines frequently experience various thermal faults during long-term continuous operation. The existence of these faults will not only cause a significant decline in the performance of the diesel engine, but also very likely induce serious safety hazards, posing a great threat to the normal operation of the ship. The structure of the diesel engine is complex, and some of its moving parts are subject to huge mechanical and thermal loads. At the same time, they are also affected by changes in operating conditions, resulting in extremely complex causal relationships of fault symptoms.
[0003] At present, there are three main methods for fault diagnosis of marine diesel engines: diagnosis based on mechanism models, qualitative analysis relying on expert experience, and intelligent diagnosis based on data-driven. The core of the mechanism model diagnosis method is to achieve real-time fault diagnosis by deeply modeling the operating mechanism of mechanical equipment. However, due to the possible deviation between the model and the real system in actual operation and the complex modeling process, the implementation of this method is quite challenging. As the performance of the equipment deteriorates, the diagnostic accuracy and effectiveness of the mechanism model may decrease. Therefore, how to maintain the effectiveness of the model when the model is not completely consistent with the actual situation has become an important research topic. Experience-based model methods such as fault tree analysis and expert systems rely on experts' in-depth analysis of diesel engine faults, but their effectiveness is highly dependent on the experts' personal experience and expertise. Once the experts make a misjudgment during the analysis process, the final diagnostic results may be negatively affected. Therefore, ensuring that experts have rich experience and professional skills is particularly critical to reducing diagnostic errors. Summary of the invention
[0004] The invention solves the problems that the existing ship diesel engine fault diagnosis process is complicated, the accuracy is low and the over-reliance on expert experience, and provides a PSO-RF intelligent diagnosis method and system for thermal faults of ship diesel engines.
[0005] The technical solution claimed in the present invention is as follows:
[0006] A PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines comprises the following steps:
[0007] S1: Use simulation software to design a diesel engine simulation model, calibrate it, verify the effectiveness of fault simulation, set faults after verification, simulate different faults of diesel engines under various working conditions, and generate diesel engine fault data;
[0008] S2: Collect the diesel engine fault data generated by S1, build a data set, and randomly divide the data set into a training set and a test set;
[0009] S3: Perform noise removal and normalization on the data in the training set and test set obtained in S2 respectively;
[0010] S4: extract the features that best represent the diesel engine fault from each data of the training set and the test set obtained in S3 to form a new training set and test set;
[0011] S5: construct a random forest fault diagnosis model, then import the training set data obtained in S4 into MATLAB software, use the particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtain the PSO-RF intelligent diagnosis model; input the test set data obtained in S4 into the PSO-RF intelligent diagnosis model, use the PSO-RF intelligent diagnosis model to classify and analyze the data to perform fault diagnosis, and obtain the fault diagnosis results therefrom; specifically includes the following steps:
[0012] S51: Data reading and preprocessing: reading the data of the training set and the test set; separating the features and the label data; checking the overlap of the data sets; separating the features and the label data means extracting the input and output for the machine learning model from the original data set, wherein the input is the feature and the output is the label; checking the overlap of the data sets means performing a comparative analysis on the two sets of the test set and the training set to measure the degree of difference between them;
[0013] S52: particle swarm optimization parameter setting;
[0014] S53: Optimize the objective function: Evaluate the performance of the random forest model under different parameter combinations by cross-validation, and search for the best parameter combination by minimizing the negative cross-validation accuracy;
[0015] S54: Model training and evaluation: Use the optimal parameters found in S53 to train the final random forest model. After the model training is completed, use the training set and test set obtained in S4 to test the model performance, calculate the diagnostic accuracy of the training set and test set respectively, and output the classification accuracy of the training set and test set;
[0016] S55: Model performance display: Based on the classification accuracy of the training set and test set output in S54, the confusion matrix of the training set and test set is output.
[0017] Preferably, AVL-BOOST professional simulation software is selected in S1 to simulate diesel engine faults; the faults in S1 include: injection lag, excessive exhaust valve clearance, uneven single-cylinder fuel supply, supercharger failure, air cooler failure, and single-cylinder fuel stoppage.
[0018] Preferably, the diesel engine simulation model in S1 is run under different working conditions and the thermal parameters of the actual machine are compared. If the error is kept within 3%, the fault simulation is effective. The method for verifying the effectiveness of the fault simulation is: taking the thermal parameters under normal conditions as a benchmark, qualitatively analyzing the deviation rate of the monitoring data under different fault degrees; the deviation rate is used to evaluate the degree of change of the fault characteristic parameters compared to the normal state, and the specific calculation method is as follows:
[0019] δ=(x i -x) / x·100% (1)
[0020] Where: x i and x represent the monitoring point values under fault and normal conditions respectively.
[0021] Preferably, the ratio of the number of training sets to the number of test sets in S2 is 7:3.
[0022] Preferably, the formula for the noise processing in S3 is:
[0023] X(i,j)=X(i,j)+meanX(j)·a·(2·rand-1) (2)
[0024] Where: i = 1, 2…200 is the number of samples; j = 1, 2…13 represents the number of fault features; meanX(j) is the average value of the j-th dimension fault feature diagnosis; a is the noise intensity, which is 0.01; (2*rand-1) is a random number with an amplitude of -1 to 1; X(i, j) is the j-th eigenvalue of the i-th sample in the original fault data matrix;
[0025] The specific formula of the normalization process is as follows:
[0026]
[0027] Where: Xnorm is the data after linear normalization; X is the original data; X max and X min are the maximum and minimum values of a feature in the original data, respectively.
[0028] Preferably, the features in S4 that best characterize diesel engine failure include: diesel engine effective power (Ne), mean effective pressure (Pe), fuel consumption rate (G), maximum combustion pressure (Pz), compressor outlet pressure (Pt), compressor outlet temperature (Tt), intake air flow (F), intercooler intake temperature (Tint), intercooler outlet temperature (Tout), cylinder exhaust temperature (Tc), intake manifold pressure (Pint), exhaust manifold pressure (Pout) and maximum pressure rise ratio.
[0029] In the above method, the process of S53 is: the particle swarm optimization algorithm repeatedly adjusts the model parameters to find the parameter combination that minimizes the objective function or optimizes the fitness value. When the preset stop condition is reached, the parameter optimization process ends, and the optimal RF model parameter combination is obtained. Specifically, the particle swarm optimization searches for the optimal parameter combination through multiple iterations, and the process of each iteration is as follows:
[0030] (1) Speed update: Update the speed of the particle based on the current particle position, speed, individual historical best position and global best position;
[0031] (2) Position update: adjust the particle position according to the updated velocity, that is, the value of the current parameter;
[0032] (3) Fitness calculation: The position of each particle corresponds to a random forest parameter combination. The random forest model is trained using this parameter combination, and the accuracy of the model is evaluated through 5-fold cross validation, which is used as the fitness, i.e., the objective function value. The objective is to maximize the average accuracy of the model, i.e., to find the parameter combination that can maximize the cross validation accuracy of the random forest model through the particle swarm optimization algorithm.
[0033] (4) Iterative optimization: The particle swarm optimization algorithm updates the speed and position of the particles in each generation, and continuously records and updates the global optimal position. After multiple iterations, the optimal parameter combination is found;
[0034] The S52 specifically includes the following steps:
[0035] S521: Setting the particle swarm optimization algorithm parameters, the parameters including: the number of particles and the maximum number of iterations;
[0036] S522: define the range of random forest parameters that need to be optimized;
[0037] S523: Searching for optimal random forest model parameters within the parameter range defined in S522 by using a particle swarm optimization (PSO) algorithm.
[0038] Preferably, the number of particles and the maximum number of iterations in S521 are 20 and 50 respectively; the random forest parameters in S522 include: the number of trees, the minimum number of leaf node samples and the maximum number of splits, and the boundary conditions of these three parameters are: the number of trees ranges from 10 to 200; the minimum number of leaf node samples ranges from 1 to 50; the maximum number of splits ranges from 10 to 200.
[0039] The present invention also provides a PSO-RF intelligent diagnosis system for thermal faults of marine diesel engines, comprising a diesel engine simulation unit for designing a diesel engine simulation model using simulation software, a data acquisition unit for collecting diesel engine fault data to construct a data set and divide the data set, a data processing unit for performing noise removal and normalization processing on the data in the data set, a feature extraction unit for extracting the most representative diesel engine fault features, and a fault diagnosis unit for constructing a PSO-RF intelligent diagnosis model and performing fault diagnosis using the constructed model to obtain a fault diagnosis result; the diesel engine simulation unit uses the simulation software to design a diesel engine simulation model, calibrates the model, verifies the validity of the fault simulation, performs fault setting after verification, simulates different faults of the diesel engine under various working conditions, and generates diesel engine fault data; the data acquisition unit collects the diesel engine generated by the diesel engine simulation unit The diesel engine fault data is used to form a data set, and the data set is randomly divided into a training set and a test set; the data processing unit performs noise removal and normalization processing on the data in the training set and the test set obtained by the data acquisition unit respectively; the feature extraction unit extracts the feature that best represents the diesel engine fault from each data in the training set and the test set obtained by the data processing unit to form a new training set and a test set; the fault diagnosis unit constructs a random forest fault diagnosis model, and then imports the training set data obtained by the feature extraction unit into MATLAB software, uses the particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtains the PSO-RF intelligent diagnosis model; the test set data obtained by the feature extraction unit is input into the PSO-RF intelligent diagnosis model, and the PSO-RF intelligent diagnosis model is used to classify and analyze the data to perform fault diagnosis, and obtain the fault diagnosis result therefrom.
[0040] Beneficial effects:
[0041] The present invention provides a PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines. The simulation software is used to design a diesel engine simulation model, and the model is calibrated to verify the validity of the fault simulation. After verification, the fault setting is performed to simulate different faults of the diesel engine under various working conditions, and the diesel engine fault data is generated. With the help of the simulation software, various fault states of the diesel engine can be accurately simulated under the premise of ensuring that the equipment is intact, thereby providing solid and reliable data support for fault diagnosis research. The data obtained through the simulation approach lays an important foundation for the training and testing of subsequent fault diagnosis models, and plays a positive role in promoting the accuracy and reliability of the diagnosis system. For the acquired marine diesel engine fault data, noise processing is performed to simulate the real ship data collection environment, thereby significantly improving the authenticity of the data, and then the data is normalized to eliminate the order of magnitude and dimension of each diagnostic parameter, ensuring the objectivity and consistency of the analysis. Random forest (RF) has attracted much attention because it improves the diagnostic accuracy and effectively reduces the possibility of overfitting by integrating multiple decision trees. RF performs well in processing high-dimensional data. It can not only automatically select features and reduce the influence of redundant features, but also is particularly effective in capturing complex nonlinear relationships. RF supports parallel computing, greatly improving the efficiency of training and prediction, and has a certain degree of interpretability; in the feature extraction and learning links, the random forest (RF) algorithm is adopted to fully explore the potential information in the data, reduce the need for artificial feature engineering, and significantly improve the efficiency and accuracy of fault diagnosis. The introduction of the particle swarm optimization (PSO) algorithm enables the automatic optimization of the parameters of the random forest. This adaptability enables the diagnosis method to better adapt to a variety of fault modes and working conditions, further improves the accuracy and stability of the diagnosis, and solves the problem of low accuracy of fault diagnosis of existing ship diesel engines; the PSO-RF intelligent diagnosis model can automatically detect the thermal faults of the diesel engine, help the crew to locate the fault point more quickly and accurately, reduce the dependence on expert experience, and solve the problem of excessive reliance on expert experience in the existing ship diesel engine fault diagnosis. After the optimization of the parameters of the PSO-RF intelligent diagnosis model is completed, the PSO-RF intelligent diagnosis model is directly used to diagnose the fault of the diesel engine, and the process is simple, which solves the complex process of the existing ship diesel engine fault diagnosis. Compared with the use of RF alone, the PSO-RF model shows higher advantages in diagnostic accuracy and reliability, and has become an important development direction in the field of ship diesel engine fault diagnosis. In summary, the PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines provided by the present invention can realize automatic fault location and diagnosis, which not only helps the crew to quickly and accurately identify the problem, but also reduces the dependence on expert experience and significantly improves the diagnostic accuracy. With its outstanding performance, this method has a wide range of promotion and application prospects in the field of marine engine engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a 9L34DF diesel engine model in the AVL-BOOST environment of an embodiment of the present invention.
[0043] Figure 2 This is a flow chart of the PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to an embodiment of the present invention.
[0044] Figure 3 This is part of the original sample data set data of the embodiment of the present invention.
[0045] Figure 4 This is a diagnostic flow chart of the PSO-RF fault diagnosis model according to an embodiment of the present invention.
[0046] Figure 5 This is the confusion matrix of the RF diagnosis result of the embodiment of the present invention.
[0047] Figure 6 This is the confusion matrix of the PSO-RF diagnosis result of the embodiment of the present invention.
[0048] Figure 7 This is a smooth curve comparing the prediction results of the PSO-RF test set in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] With the rapid development of machine learning technology, data-driven intelligent fault diagnosis methods have made significant progress in the field of mechanical equipment in recent years. This type of method uses the data of the condition monitoring system to simulate the judgment and decision-making process of experts, thereby reducing the need for complex model construction and reducing the dependence on expert experience. Random forest (RF) has attracted much attention because it integrates multiple decision trees to improve diagnostic accuracy and effectively reduce the possibility of overfitting. RF performs well in processing high-dimensional data. It can not only automatically select features and reduce the impact of redundant features, but also is particularly effective in capturing complex nonlinear relationships. RF supports parallel computing, greatly improves the efficiency of training and prediction, and has a certain degree of interpretability, making it an ideal tool for diesel engine fault diagnosis and gradually becoming a mainstream technology. On this basis, the present invention optimizes the parameters of the RF model by combining the particle swarm optimization (PSO) algorithm to form a PSO-RF model for intelligent diagnosis of ship diesel engine faults. The model can automatically detect thermal faults of diesel engines, help crew members locate fault points more quickly and accurately, and reduce dependence on expert experience. Compared with the use of RF alone, the PSO-RF model shows higher advantages in diagnostic accuracy and reliability, and has become an important development direction in the field of marine diesel engine fault diagnosis. The present invention is described in detail below with reference to the accompanying drawings:
[0050] The first group of embodiments: PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines
[0051] This group of embodiments provides a PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines, such as Figure 2 As shown, the following steps are included:
[0052] S1: Use simulation software to design a diesel engine simulation model, calibrate it, verify the effectiveness of the fault simulation, set the fault after verification, simulate different faults of the diesel engine under various working conditions, and generate diesel engine fault data; the diesel engine simulation model is run under different working conditions and the thermal parameter performance of the actual machine is compared. If the error is kept within 3%, the fault simulation is valid.
[0053] In a specific embodiment of the invention, a Wärtsilä 9L34DF marine diesel engine is simulated to construct a marine 9L34DF diesel engine model ( Figure 1 ). The acquisition of diesel engine operation data is an indispensable step in the model calibration process. By collecting these actual data, the performance of the diesel engine under different working conditions can be more accurately reflected. Therefore, the bench test data, sea trial data and structural parameter instructions of the marine 9L34DF diesel engine have become an important basis for the present invention. These data are used to accurately calibrate the 9L34DF diesel engine model so that it can better simulate the actual operating state. To this end, the present invention uses AVL-BOOST simulation software to accurately reproduce the dynamic behavior of the diesel engine. During the simulation process, various working conditions can be simulated by setting global simulation conditions (global case), thereby generating operating data under different fault conditions. These data are of great significance to the analysis of diesel engine performance and potential faults, and lay a solid foundation for subsequent fault diagnosis and optimization. First, the constructed 9L34DF diesel engine model is subjected to accurate calibration operations to ensure that the model is in different operating conditions, such as 25%, 50%, 75% and 100% load states, and the generated 9L34DF diesel engine model error is controlled within 3%, thereby meeting the stringent requirements of practical applications for accuracy. After the model calibration was completed, a global case was set up in the AVL-BOOST simulation software, and a lot of diesel engine fault data was successfully created. These data obtained through simulation laid an important foundation for the subsequent training and testing of fault diagnosis models, and played a positive role in improving the accuracy and reliability of the diagnosis system.
[0054] Since simulating faults on actual ships will incur high costs and is potentially dangerous and destructive, AVL-BOOST professional simulation software was chosen to simulate diesel engine faults. With the help of this simulation software, various fault states of diesel engines can be accurately simulated under the premise of ensuring that the equipment is intact, thus providing solid and reliable data support for fault diagnosis research. The main technical parameters of the diesel engine are shown in Table 1. These parameters contribute basic data for the construction of the simulation model and fault simulation, and effectively guarantee the accuracy and representativeness of the simulation results.
[0055] Table 1. Diesel engine technical parameters
[0056] parameter Numeric Engine Type Inline 9 cylinder stroke 4 Cylinder diameter 340mm Piston stroke 400mm Speed 750r / min Firing order 1-7-4-2-8-6-3-9-5 Rated Power 4050kW Average piston speed 10m / s Fuel consumption 191g / kW·h
[0057] In the 9L34DF diesel engine model, the descriptions of various symbols are shown in Table 2.
[0058] Table 2. Symbols
[0059] symbol definition SB1 Inlet Boundary SB2 Exhaust Boundary E1 engine TC1 Turbocharger CO1 Cooler MP1-24 Measuring point CL1 Air filter PL1 Intake manifold PL2 Exhaust manifold C1-9 cylinder 1-24 Pipeline
[0060] Reliability verification of the simulation model: The simulated operating parameters of the diesel engine under the calibrated operating conditions were compared with the actual sea trial data. The results are shown in Table 3.
[0061] Table 3. Comparison results between model simulation data and measured data
[0062] parameter Measured value Simulation value error / % Effective power / kW 4060 4045.760 -0.35 Effective pressure / bar 19.960 19.805 -0.77 Fuel consumption / (g / cycle) 4.12 4.14 0.45 Maximum explosion pressure / bar 175 171.37 -2.07 Boost pressure / bar 4.528 4.576 1.06 Pressurization temperature / ℃ 47 46.85 -0.32 Intake air flow / (g / s) 8300 8288 -0.15 Exhaust temperature / ℃ 520 533.75 2.64
[0063] In a specific embodiment of the present invention, the parameter accuracy of the 9L34DF diesel engine model is strictly controlled within 3%, which can fully meet the needs of marine diesel engine fault simulation. For the Wärtsilä 9L34DF marine diesel engine, the present invention carries out fault simulation, and the simulated states cover seven situations, namely, injection lag (F1), excessive exhaust valve clearance (F2), uneven single cylinder fuel supply (F3), supercharger failure (F4), air cooler failure (F5), single cylinder oil stop (F6) and normal operation (F7). In order to be able to analyze each fault state more deeply and meticulously, four different levels are specially set for each fault to simulate the difference in fault degree.
[0064] Specifically, the normal value of injection lag is -13.0 degrees, and its fault levels are set to -12.5 degrees, -12.0 degrees, -10.0 degrees, and -7.0 degrees respectively; the normal value of the exhaust valve clearance is 0.8 mm, and the fault levels are set to 1.1 mm, 1.4 mm, 1.7 mm, and 2.1 mm respectively; the normal value of single-cylinder fuel supply is 4.12 grams, and the fault levels are set to 3.89 grams, 3.64 grams, 3.39 grams, and 3.14 grams; the normal efficiency of the supercharger is 100%, and the fault levels are set to 97%, 95%, 90%, and 85%; the normal efficiency of the air cooler is 100%, and the fault levels are set to 97%, 95%, 90%, and 85%; the single-cylinder oil stop fault is directly set to shut down cylinder No. 3.
[0065] In order to verify the effectiveness of fault simulation, the thermal parameters under normal conditions were used as the benchmark, and the deviation rate of monitoring data under different fault degrees was qualitatively analyzed. The deviation rate analysis refers to comparing the diesel engine under different fault conditions with the diesel engine under normal conditions to verify whether the law of the thermal parameters of the diesel engine under different faults is consistent with experience. The calculation method of the deviation rate is shown in formula (1), which is used to evaluate the degree of change of the fault characteristic parameters compared with the normal state, which is of great significance for accurately identifying the fault type and its severity.
[0066] δ=(x i -x) / x·100% (1)
[0067] Where: x i and x represent the values of monitoring points under fault and normal conditions, respectively. The qualitative analysis of monitoring parameters of different fault levels can be seen in Figure 6 below. It can be seen from the figure that the fault simulation results are consistent with the expert experience analysis, indicating the accuracy and rationality of the fault simulation data.
[0068] S2: Collect the diesel engine fault data generated by S1 to form a data set, and randomly divide the data set into a training set and a test set;
[0069] In the process of collecting diesel engine fault data sets, by placing the diesel engine model in different fault level states from F1 to F6 for simulation operations and applying corresponding disturbances, 900 sets of data were collected under each fault state, and finally a 13-dimensional data set totaling 5400 sets was constructed. The data set was then further randomly divided into training and test sets at a ratio of 70% and 30%, that is, there were 3780 sets in the training set and 1620 sets in the test set.
[0070] S3: respectively perform noise reduction and normalization processing on the data in the training set and the test set obtained in S2; in a specific embodiment of the present invention, since the sample data obtained by fault simulation is not affected by the environment and has small fluctuations, in order to enhance the practicality of the research and make the collected data more consistent with the distribution of actual data, in order to simulate the real ship data collection environment, and perform noise reduction processing on the acquired ship diesel engine fault data, this process adds appropriate random noise to make the fault sample data closer to the complex situation in actual operation, thereby enhancing the adaptability of the model to the real environment. In addition, the data is also normalized to eliminate the possible impact of different diagnostic parameters due to differences in order of magnitude and dimension, so that they are converted to the same scale range. This series of processing steps not only improves the consistency and comparability of the data, but also more accurately reflects the real state and performance of the diesel engine in subsequent analysis and fault diagnosis.
[0071] The formula for the noise processing is:
[0072] X(i,j)=X(i,j)+meanX(j)·a·(2·rand-1) (2)
[0073] Where: i = 1, 2…200 is the number of samples; j = 1, 2…13 represents the number of fault features; meanX(j) is the average value of the j-th dimension fault feature; a is the noise intensity, which is 0.01; (2*rand-1) is a random number with an amplitude of -1 to 1; X(i, j) represents the j-th eigenvalue of the i-th sample in the original fault data matrix.
[0074] The specific formula of the normalization process is as follows:
[0075]
[0076] Where: Xnorm is the data after linear normalization; X is the original data; X max and X min are the maximum and minimum values of a feature in the original data, respectively.
[0077] S4: extract the features that best represent the diesel engine fault from each data of the training set and the test set obtained in S3 to form a new training set and test set;
[0078] For each data of the training set and test set obtained by S3, 13 key thermal parameter monitoring points were selected to reflect the operating status and fault characteristics of the diesel engine. These monitoring points include diesel engine effective power (Ne), mean effective pressure (Pe), fuel consumption rate (G), maximum combustion pressure (Pz), compressor outlet pressure (Pt), compressor outlet temperature (Tt), intake air flow (F), intercooler intake temperature (Tint), intercooler outlet temperature (Tout), cylinder exhaust temperature (Tc), intake manifold pressure (Pint), exhaust manifold pressure (Pout) and maximum pressure rise ratio.
[0079] S5: construct a random forest fault diagnosis model, then import the training set data obtained in S4 into MATLAB software, use the particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtain the PSO-RF intelligent diagnosis model; input the test set data obtained in S4 into the PSO-RF intelligent diagnosis model, and use the PSO-RF intelligent diagnosis model to classify and analyze the data to perform fault diagnosis, and obtain the fault diagnosis results therefrom;
[0080] The training set data obtained by S4 was imported into MATLAB software, and the particle swarm optimization (PSO) algorithm was used to optimize the parameters of the random forest model. During the optimization process, the PSO algorithm repeatedly adjusted the model parameters to find the parameter combination that minimizes the objective function or optimizes the fitness value. When the preset stop condition is reached, the optimization process ends, and the optimal RF model parameter combination is obtained. Finally, the best RF fault diagnosis model optimized by PSO is saved for subsequent fault diagnosis tasks. The test set data obtained by S4 is input into the trained PSO-RF model, and the model is used to classify and analyze the data to achieve fault diagnosis. Through this process, the model can identify the fault features in the data and output the corresponding diagnosis results. This not only helps to evaluate the performance of the model in practical applications, but also verifies its ability to identify various fault conditions and the accuracy of diagnosis. Finally, the output of the model provides detailed fault diagnosis results, which provides a key reference for subsequent decision-making and maintenance work.
[0081] Random Forest (RF) is an ensemble learning algorithm that combines multiple decision trees for classification or regression to improve the prediction accuracy and stability of the model. Its main principles include bootstrap sampling and random feature selection. The basic principles of RF are as follows:
[0082] Bootstrap Sampling: Sampling is an important technique in random forests. It generates multiple different sub-datasets by randomly sampling the training dataset with replacement. Each sub-dataset is used to train a decision tree. The specific process is as follows: Given a training dataset containing N samples, randomly sample N samples with replacement from it to form a new sub-dataset. Repeat the above process B times to obtain B different sub-datasets (each sub-dataset has the same size as the original dataset, but the samples it contains may be repeated).
[0083] Random Feature Selection: When building each decision tree, the random forest algorithm does not consider all features when selecting the splitting feature at each node. Instead, it randomly selects a subset of features from all features, and then selects the best splitting feature from this subset. This approach increases the difference between the trees and further improves the generalization ability of the model. The specific process is as follows: For each node, randomly select m features from all features (m < M, where M is the total number of features). Among the selected m features, select the best feature for splitting. The role of this step is to reduce the overfitting risk: By introducing randomness, the complexity of the model and the overfitting risk are reduced. Increase the diversity of the model: Different trees use different combinations of features, increasing the diversity of the model, thus improving the generalization ability of the ensemble model.
[0084] Construction of Decision Trees: Use the sub-datasets generated by bootstrap sampling and the randomly selected subset of features to construct each decision tree. Each decision tree grows independently until a stopping condition is met (such as maximum depth, minimum number of samples, etc.). In a random forest, the construction steps of each decision tree are as follows: Start training from the sub-dataset generated by bootstrap sampling. When splitting each node, randomly select m features from the candidate features of the current node (where m is usually much smaller than the total number of features M), and then select the best feature among these m features for node splitting. The tree construction process continues until a certain stopping condition is reached (such as maximum depth or minimum number of samples in a node).
[0085] Ensemble and Prediction: When all decision trees are trained, the random forest obtains the final output by integrating the prediction results of these decision trees. Classification problem: For classification tasks, each decision tree gives a predicted class, and the final classification result is the majority class of the voting results of all decision trees.
[0086]
[0087] Regression problem: The output of the random forest is the average of the prediction results of all decision trees:
[0088]
[0089] Among them, h i (x) represents the prediction result of the i-th decision tree for sample x, and B is the total number of decision trees. Finally, combined with PSO to optimize RF parameters, in the PSO-RF-based marine four-stroke medium-speed engine thermal fault diagnosis method, using PSO to optimize RF parameters can significantly improve the performance of the diagnosis model.
[0090] The details of PSO are as follows: Particle Swarm Optimization (PSO) is a global optimization algorithm based on swarm intelligence, proposed by Kennedy and Eberhart in 1995. PSO simulates natural phenomena such as bird flocks foraging or fish schools swimming, and searches for the global optimal solution through information sharing between individuals. In PSO, each possible solution is called a particle, and these particles search for the optimal solution in the solution space. Each particle in the particle swarm has two important properties: position and velocity. The movement of particles is affected by three factors: their own experience (individual optimal position), group experience (global optimal position) and inertia.
[0091] Update formula of position and velocity: In PSO, the state of a particle is described by two variables: position and velocity. Position represents the position of the current solution in the solution space, and velocity represents the rate of change of position. The update formula of position and velocity is as follows:
[0092] Speed update formula:
[0093] v i (t+1)=w·v i (t)+c1·r1·(p i,best -x i (t))+c2·r2·(g best -x i (t)) (6)
[0094] Among them, v i (t) is the velocity x of particle i in generation t i (t) is the position of particle i in generation t, p i,best is the best position of particle i in history (individual optimality), g best is the best position in the history of the entire particle swarm (global optimum), w is the inertia weight, which is used to control the influence of the previous velocity of the particle on the current velocity, c1 and c2 are learning factors, which represent the acceleration constants of the particle learning to its own best position and the group's best position, respectively, and r1 and r2 are random numbers between [0,1], which are used to increase the randomness of the search.
[0095] Position update formula:
[0096] xi (t+1)=x i (t)+v i (t+1) (7)
[0097] Through this formula, the position of the particle in the solution space is updated according to its velocity.
[0098] Inertia weight w: Inertia weight w is a key parameter in PSO, which is used to balance global exploration ability and local development ability. Larger w values help to enhance global search ability, and smaller w values help to enhance local search ability. Usually w will gradually decrease to strengthen global search in the early stage of search and focus more on local optimization in the later stage.
[0099] The specific working process of PSO is as follows:
[0100] Initialize the particle swarm: Initialize the position and velocity of the particle: In feature selection or fault diagnosis tasks, each particle represents a specific feature combination or a combination of diagnostic parameters. Initialize the particle's position (i.e., a solution in the solution space) and velocity (i.e., the change trend of the solution).
[0101] Initialize the optimal position p of the individual i,best and the global optimal position g best : The initial position of each particle is considered to be its individual optimal position, and the initial position of the particle with the best performance in the entire group is considered to be the global optimal position.
[0102] Iterative search process: Speed and position update: According to the speed and position update formula above, iteratively update the speed and position of each particle to make it move in the solution space. Individual optimal position update: If the new position of a particle performs better than its historical optimal position in terms of the objective function, then update the individual optimal position p of the particle i,best Global optimal position update: If the new position of a particle performs better than the current global optimal position g in terms of the objective function best , then update the global optimal position.
[0103] Termination condition: Iteration stop: When the predetermined number of iterations is reached or the global optimal position no longer changes significantly in multiple iterations, the algorithm stops. Output optimal solution: After termination, the global optimal position g is output best , as the optimal solution to the problem. In fault diagnosis, this may be the optimal feature combination or the best diagnostic model parameters.
[0104] Application in fault diagnosis: Feature selection: PSO can be used to select the feature combination that best characterizes diesel engine faults. Through PSO optimization, a feature subset that maximizes diagnostic accuracy is selected and input into the random forest model for fault diagnosis. Optimizing the diagnostic model: PSO can also be used to optimize the hyperparameters in the random forest, such as the number of trees, maximum depth, etc., to improve the performance of the fault diagnosis model. In this study, the latter was selected.
[0105] like Figure 4 As shown, step S5 specifically includes the following steps:
[0106] S51: Data reading and preprocessing: read the data of the training set and the test set, separate the features and the label data, and check the overlap of the data sets; the separation of the features and the label data refers to extracting the input and output for the machine learning model from the original data set, the input is the feature, and the output is the label; the checking of the overlap of the data set refers to comparative analysis of the two sets of the test set and the training set to measure the degree of their difference.
[0107] In a specific embodiment of the present invention, the separation features and label data are specifically: thirteen reference thermal parameters are selected as input features, and the input features can fully reflect the working state of the engine. The output label is determined according to the actual working condition of the engine, such as normal or abnormal state. In this way, the data set is divided into two parts: one part contains all the input features, and the other part records the corresponding output labels. This division is helpful for subsequent model training and evaluation.
[0108] Checking for overlap in datasets involves comparing the two sets to ensure that there is not too much overlap between the training set and the test set. Specifically, the similarity between the two sets of data can be calculated to measure how different they are. If some samples in the training set and the test set are found to be too close, these samples need to be adjusted to ensure their independence. This prevents the model from overfitting to specific data points, thereby improving its ability to generalize to unknown data.
[0109] S52: Particle swarm optimization parameter settings: including:
[0110] S521: Setting the particle swarm optimization (PSO) algorithm parameters, including: the number of particles (numParticles=20) and the maximum number of iterations (maxIter=50), which determine the search scale and the number of iterative optimization of the PSO algorithm.
[0111] S522: define the range of random forest parameters to be optimized, where: the number of trees (NumTrees) is between 10 and 200; the minimum number of leaf node samples (MinLeafSize) is between 1 and 50; the maximum number of splits (MaxNumSplits) is between 10 and 200;
[0112] S523: Searching for optimal random forest model parameters within the parameter range defined in S522 by using a particle swarm optimization (PSO) algorithm to improve the classification performance of the model.
[0113] S53: Optimize the objective function: Evaluate the performance of the random forest model under different parameter combinations by cross-validation; use 5-fold cross-validation to calculate the classification accuracy of the model on the validation set for each set of parameters; the goal is to maximize the classification accuracy, so the optimization process searches for the optimal parameter combination by minimizing the negative cross-validation accuracy; the optimal parameter combination is: the optimal number of trees (optNumTrees), the minimum number of leaf node samples (optMinLeafSize) and the maximum number of splits (optMaxNumSplits).
[0114] S54: Model training and evaluation: Use the optimal parameters found in S53 to train the final random forest model (TreeBagger). After the model training is completed, test the model performance on a data set with random noise, and calculate the diagnostic accuracy of the training set and test set (train_accuracy and test_accuracy) respectively; then, output the classification accuracy of the training set and test set to help evaluate the overall performance of the model.
[0115] S55: Model performance display: In order to intuitively display the performance of the model, the code generates confusion matrices for the training set and the test set, and displays them in the form of graphs; these confusion matrices show the classification effect of the model, and can analyze the classification accuracy, misclassification and other specific information by row normalization and column normalization. The confusion matrix helps to understand the specific performance of the model between different classifications and further verify the diagnostic ability of the model. The code optimizes the model parameters through the PSO-RF method, and combines cross-validation and confusion matrix analysis to demonstrate the effect of thermal fault diagnosis of marine diesel engines, and fully realizes the experimental objectives of the present invention. Finally, the optimal parameters are obtained: NumTrees = 174, MinLeafSize = 1, MaxNumSplits = 174, and the model running time is 0.0001231 seconds.
[0116] The following is an introduction to the creation and verification process of the PSO-RF intelligent diagnosis model in combination with specific experiments. Specifically, the 9L34DF ship diesel engine model is built using the AVL-BOOST simulation software to provide the required data source. After verification, the data generated by the simulation model is compared with the data reported by the actual tower test, and the error is kept within 5%, which fully meets the accuracy requirements, proving that the model can truly reflect the actual operating status of the ship diesel engine. Based on this model, a global case is set in the AVL-BOOST simulation software, and the fault sample data of the ship diesel engine in six different states are successfully collected. Considering the particularity of the ship's working environment, the data collection process is susceptible to external factors such as noise, high temperature and vibration. Therefore, random noise is deliberately added to the sample data set to be closer to the actual ship data collection environment. This noise processing helps to improve the robustness of the model and its adaptability to actual operating conditions. In addition, in order to prevent the difference in data type and value range from causing slow data convergence, the collected ship diesel engine operation data is normalized, and all diagnostic coefficients are mapped to the [0-1] interval. This step ensures the consistency and efficiency of the data in subsequent analysis and processing, thereby improving the accuracy and response speed of the fault diagnosis model.
[0117] This example selects six fault states for diagnostic experiments, namely: delayed injection timing, excessive exhaust valve clearance, uneven single-cylinder fuel supply, low turbocharger efficiency, reduced air cooler efficiency, and single-cylinder fuel stop. As shown in Table 4, the monitoring point distribution of each diagnostic parameter is listed in Table 5, with a total of 13 diagnostic parameters.
[0118] 1. Data source and preprocessing
[0119] (1) Sample data extraction
[0120] During the experiment, in order to effectively diagnose the six fault conditions, corresponding sample data were collected respectively. The specific fault conditions and their corresponding state numbers are shown in Table 1, which lists the detailed description and identification of each fault condition. 900 sets of experimental samples were collected under each fault condition. For ease of analysis, the detailed information of the 13 fault diagnosis feature parameters used in the experiment are listed in Table 2. These parameters are used to accurately describe and identify the operating state of the diesel engine and its fault characteristics. In general, a total of 5400 sets of experimental samples were collected, each set of samples consisted of 13 feature parameters, and the size of the data set was 5400×13. Examples of some sample data sets can be found in Figure 2 These sample data will be used in subsequent fault diagnosis analysis to verify the accuracy and reliability of the model.
[0121] (2) Noise removal and normalization of sample data:
[0122] For the acquired ship diesel engine fault data, it is necessary to first perform noise processing to simulate the real ship data collection environment, as shown in formula (2):
[0123] X(i,j)=X(i,j)+meanX(j)·a·(2·rand-1) (2)
[0124] Where: i=1, 2…200 is the number of samples, j=1, 2…13 represents the number of fault features, meanX(j) is the average value of the j-th dimension fault feature, a is the noise intensity, which is 0.01 here, and (2·rand-1) is a random number with an amplitude of -1 to 1.
[0125] Then, the data is normalized to eliminate the influence of the magnitude and dimension of each diagnostic parameter, as shown in formula (3):
[0126]
[0127] Where: X norm is the linearly normalized data, X is the original data, and X max and X min are the maximum and minimum values of a feature in the original data, respectively.
[0128] Table 4. Diagnostic status numbers and status
[0129] Status Number state F1 Injection timing lag F2 Exhaust valve clearance is too large F3 Uneven oil supply to a single cylinder F4 Supercharger inefficiency F5 Air cooler efficiency decreases F6 Single cylinder oil stop
[0130] Table 5. Marine diesel engine fault diagnosis characteristic parameters
[0131]
[0132]
[0133] Some of the original sample data sets are as follows Figure 3 shown.
[0134] 2. Establish PSO-RF diagnostic model
[0135] In the MATLAB script, the preprocessed data set is first imported from the Excel file into the workspace using the `xlsread` command, which contains 5400 sets of 13-dimensional data. Subsequently, the data set is divided into a training set and a test set at a ratio of 70% and 30%, respectively.
[0136] In the research on thermal fault diagnosis of marine diesel engines based on PSO-RF, the particle swarm optimization (PSO) algorithm is used to optimize the parameters of random forest (RF) to improve the accuracy of fault diagnosis. Combined with MATLAB experiments, this process can be divided into the following steps for detailed description:
[0137] Define the optimization goal: First, determine the random forest (RF) parameters that need to be optimized. Three parameters were selected for optimization in the experiment: Number of trees (NumTrees): affects the complexity of the random forest and the accuracy of the model. Minimum number of leaf node samples (MinLeafSize): controls the depth of the tree to prevent overfitting. Maximum number of splits (MaxNumSplits): limits the maximum number of splits of the tree to further control the complexity of the model. The boundary conditions of these parameters are defined as follows: NumTrees: from 10 to 200 (i.e. [10,200]). MinLeafSize: from 1 to 50 (i.e. [1,50]). MaxNumSplits: from 10 to 200 (i.e. [10,200]).
[0138] Initialize the particle swarm: In the PSO algorithm, the number of particle swarms and the maximum number of iterations are key parameters. The experiment was set up with: Number of particles (numParticles): 20. Maximum number of iterations (maxIter): 50. Each particle represents a parameter combination. The position and velocity of the particle are initialized in the optimization space and will be adjusted continuously in subsequent iterations.
[0139] Optimization process: PSO searches for the optimal parameter combination through multiple iterations. The process of each iteration is as follows: Speed update: Update the particle's speed based on the current particle's position, speed, individual historical best position, and global best position. Position update: Adjust the particle's position, that is, the value of the current parameter, based on the updated speed. Fitness calculation: Each particle's position corresponds to a random forest parameter combination. This parameter combination is used to train the random forest model. The accuracy of the model is evaluated through 5-fold cross-validation and used as the fitness (i.e., the objective function value). The goal here is to maximize the average accuracy of the model.
[0140] Iterative optimization: The PSO algorithm updates the speed and position of the particles in each generation, and continuously records and updates the global optimal position. After multiple iterations, the optimal parameter combination is found. The optimal parameters finally found are: NumTrees: the number of optimized trees. MinLeafSize: the minimum number of leaf node samples after optimization. MaxNumSplits: the maximum number of splits after optimization.
[0141] Training the final model with optimal parameters: Finally, the final random forest model is trained using the optimal parameter combination found by PSO. This model is used to diagnose faults of ship diesel engines and evaluate its accuracy on the training set and test set.
[0142] Through the above steps, the PSO algorithm successfully optimized the key parameters of the random forest model and improved the accuracy and robustness of fault diagnosis, thereby better coping with the complex operating conditions and fault types of ship diesel engines.
[0143] 3. Experiment and result analysis
[0144] (1) Analysis of RF model diagnosis results
[0145] After the construction of the random forest (RF) model was completed, the 3780 sets of preprocessed data were input into the model for training. The training process continued until the model reached the predetermined maximum number of iterations. After the training, the remaining 1620 sets of test samples were used to evaluate the diagnostic performance of the RF model. The test results generated a confusion matrix (such as Figure 5 The model has shown a certain ability in fault diagnosis and provides a high accuracy rate, but the diagnosis results show that there is still room for further improvement. In order to achieve better diagnostic results, the model needs to be optimized to improve its recognition accuracy and overall performance under different fault conditions.
[0146] (2) Analysis of PSO-RF model diagnosis results
[0147] In the process of optimizing the parameters of the random forest (RF) model, the particle swarm optimization (PSO) algorithm was applied to improve the diagnostic performance of the model. After the parameters were optimized by the PSO algorithm, the optimized model was trained using the same 3780 sets of processed data until the preset maximum number of iterations was reached. After the training was completed, 1620 sets of test samples were input into the optimized PSO-RF diagnostic model for fault diagnosis. The resulting confusion matrix is shown in Figure 2. Figure 6 The average diagnostic accuracy of the RF model after PSO optimization was increased to 99.75% (Table 6 and Figure 7 ), which is significantly better than the unoptimized RF model.
[0148] Compared with the unoptimized model, the PSO-optimized RF model showed higher fault identification accuracy, which indicates that it has stronger diagnostic capability in marine diesel engine fault diagnosis. This high-precision fault identification plays an important role in timely maintenance and prevention of diesel engine failures, and further verifies the advantages of PSO optimization in improving the performance of diagnostic models.
[0149] Table 6. Comparison of model diagnosis results
[0150]
[0151]
[0152] Second Group of Embodiments: PSO-RF Intelligent Diagnosis System for Thermal Faults of Marine Diesel Engines
[0153] The present group of embodiments provides a PSO-RF intelligent diagnosis system for thermal faults of marine diesel engines, comprising a diesel engine simulation unit connected in sequence for designing a diesel engine simulation model using simulation software, a data acquisition unit for collecting diesel engine fault data to construct a data set and divide the data set, a data processing unit for performing noise removal and normalization processing on the data in the data set, a feature extraction unit for extracting the features that best characterize the diesel engine fault features, and a fault diagnosis unit for constructing a PSO-RF intelligent diagnosis model and using the constructed model to perform fault diagnosis to obtain a fault diagnosis result; the diesel engine simulation unit uses simulation software to design a diesel engine simulation model, calibrates it, verifies the validity of the fault simulation, performs fault setting after verification, simulates different faults of the diesel engine under various working conditions, and generates diesel engine fault data; the data acquisition unit collects the data generated by the diesel engine simulation unit Diesel engine fault data constitutes a data set, and the data set is randomly divided into a training set and a test set; the data processing unit performs noise removal and normalization processing on the data in the training set and the test set obtained by the data acquisition unit respectively; the feature extraction unit extracts the feature that best represents the diesel engine fault from each data of the training set and the test set obtained by the data processing unit to form a new training set and a test set; the fault diagnosis unit constructs a random forest fault diagnosis model, and then imports the training set data obtained by the feature extraction unit into MATLAB software, uses a particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtains a PSO-RF intelligent diagnosis model; the test set data obtained by the feature extraction unit is input into the PSO-RF intelligent diagnosis model, and the PSO-RF intelligent diagnosis model is used to classify and analyze the data to perform fault diagnosis, and obtain a fault diagnosis result therefrom.
[0154] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the present invention. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made in form and details without departing from the scope defined by the claims of the present invention.
Claims
1. A PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines, characterized in that: The steps include: S1: Use simulation software to design a diesel engine simulation model, calibrate it, verify the effectiveness of fault simulation, set faults after verification, simulate different faults of diesel engines under various working conditions, and generate diesel engine fault data; S2: Collect the diesel engine fault data generated by S1, build a data set, and randomly divide the data set into a training set and a test set; S3: Perform noise removal and normalization on the data in the training set and test set obtained in S2 respectively; S4: extract the features that best represent the diesel engine fault from each data of the training set and the test set obtained in S3 to form a new training set and test set; S5: construct a random forest fault diagnosis model, then import the training set data obtained in S4 into MATLAB software, use the particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtain the PSO-RF intelligent diagnosis model; input the test set data obtained in S4 into the PSO-RF intelligent diagnosis model, use the PSO-RF intelligent diagnosis model to classify and analyze the data to perform fault diagnosis, and obtain the fault diagnosis results therefrom; specifically includes the following steps: S51: Data reading and preprocessing: Read the data of the training set and the test set; Separating features and label data; checking data set overlap; separating features and label data refers to extracting inputs and outputs for machine learning models from the original data set, where the inputs are features and the outputs are labels; checking data set overlap refers to performing comparative analysis on the test set and the training set to measure the degree of difference between them; S52: particle swarm optimization parameter setting; S53: Optimize the objective function: Evaluate the performance of the random forest model under different parameter combinations by cross-validation, and search for the best parameter combination by minimizing the negative cross-validation accuracy; S54: Model training and evaluation: Use the optimal parameters found in S53 to train the final random forest model. After the model training is completed, use the training set and test set obtained in S4 to test the model performance, calculate the diagnostic accuracy of the training set and test set respectively, and output the classification accuracy of the training set and test set; S55: Model performance display: Based on the classification accuracy of the training set and test set output in S54, the confusion matrix of the training set and test set is output.
2. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 1 is characterized in that: In S1, AVL-BOOST professional simulation software is selected to simulate diesel engine faults; the faults described in S1 include: injection lag, excessive exhaust valve clearance, uneven fuel supply to a single cylinder, supercharger failure, air cooler failure, and single cylinder fuel stoppage.
3. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 1 or 2, characterized in that: The diesel engine simulation model described in S1 is run under different working conditions and the thermal parameters of the actual machine are compared. If the error is kept within 3%, the fault simulation is effective. The method for verifying the effectiveness of the fault simulation is: taking the thermal parameters under normal conditions as a benchmark, qualitatively analyzing the deviation rate of the monitoring data under different fault degrees; the deviation rate is used to evaluate the degree of change of the fault characteristic parameters compared to the normal state, and the specific calculation method is as follows: δ =(xi-x) / x 100 % (1) Where: x i and x represent the monitoring point values under fault and normal conditions respectively.
4. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 3 is characterized in that: The ratio of the number of training sets and test sets described in S2 is 7:
3.
5. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 4 is characterized in that: The formula for the noise processing in S3 is: X(i,j)=X(i,j)+meanX(a·(2·rand-1)(2) Where: i = 1, 2…200 is the number of samples; j = 1, 2…13 represents the number of fault features; meanX(j) is the average value of the j-th dimension fault feature diagnosis; a is the noise intensity, which is 0.01; (2*rand-1) is a random number with an amplitude of -1 to 1; X(i, j) is the j-th eigenvalue of the i-th sample in the original fault data matrix; The specific formula of the normalization process is as follows: Among them: Xnorm is the data after linear normalization; X is the original data; Xma x and Xmi n are the maximum and minimum values of a feature in the original data, respectively.
6. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 1 is characterized in that: The most representative features of diesel engine failure in S4 include: diesel engine effective power (Ne), mean effective pressure (Pe), fuel consumption rate (G), maximum combustion pressure (Pz), compressor outlet pressure (Pt), compressor outlet temperature (Tt), intake air flow (F), intercooler intake temperature (Tint), intercooler outlet temperature (Tout), cylinder exhaust temperature (T c ), intake manifold pressure (Pint), exhaust manifold pressure (Pout) and maximum pressure rise ratio.
7. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 1 is characterized in that: The process of S53 is as follows: the particle swarm optimization algorithm repeatedly adjusts the model parameters to find the parameter combination that minimizes the objective function or optimizes the fitness value. When the preset stop condition is reached, the parameter optimization process ends, and the optimal RF model parameter combination is obtained. Specifically, the particle swarm optimization algorithm finds the optimal parameter combination through multiple iterations, and the process of each iteration is as follows: (1) Speed update: Update the speed of the particle based on the current particle position, speed, individual historical best position and global best position; (2) Position update: adjust the particle position according to the updated velocity, that is, the value of the current parameter; (3) Fitness calculation: The position of each particle corresponds to a random forest parameter combination. The random forest model is trained using this parameter combination, and the accuracy of the model is evaluated through 5-fold cross validation, which is used as the fitness, i.e., the objective function value. The objective is to maximize the average accuracy of the model, i.e., to find the parameter combination that can maximize the cross validation accuracy of the random forest model through the particle swarm optimization algorithm. (4) Iterative optimization: The particle swarm optimization algorithm updates the speed and position of the particles in each generation, and continuously records and updates the global optimal position. After multiple iterations, the optimal parameter combination is found.
8. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 1 is characterized in that: The S52 specifically includes the following steps: S521: Setting the particle swarm optimization algorithm parameters, the parameters including: the number of particles and the maximum number of iterations; S522: define the range of random forest parameters that need to be optimized; S523: Searching for optimal random forest model parameters within the parameter range defined in S522 by using a particle swarm optimization (PSO) algorithm.
9. The PSO-RF intelligent diagnosis method for thermal faults of marine diesel engines according to claim 8 is characterized in that: The number of particles and the maximum number of iterations in S521 are 20 and 50 respectively; the random forest parameters in S522 include: the number of trees, the minimum number of leaf node samples and the maximum number of splits, and the boundary conditions of these three parameters are: the number of trees ranges from 10 to 200; the minimum number of leaf node samples ranges from 1 to 50; the maximum number of splits ranges from 10 to 200.
10. A PSO-RF intelligent diagnosis system for thermal faults of marine diesel engines, characterized in that: The invention comprises a diesel engine simulation unit for designing a diesel engine simulation model using simulation software, a data acquisition unit for collecting diesel engine fault data, constructing a data set and dividing the data set, a data processing unit for performing noise removal and normalization processing on the data in the data set, a feature extraction unit for extracting the feature that best characterizes the diesel engine fault, and a fault diagnosis unit for constructing a PSO-RF intelligent diagnosis model and using the constructed model to perform fault diagnosis to obtain a fault diagnosis result; the diesel engine simulation unit uses the simulation software to design a diesel engine simulation model, calibrates it, verifies the validity of the fault simulation, performs fault setting after verification, simulates different faults of the diesel engine under various working conditions, and generates diesel engine fault data; the data acquisition unit collects the diesel engine fault data generated by the diesel engine simulation unit to construct a data set, and converts the data into a data set. The data set is randomly divided into a training set and a test set; the data processing unit performs noise removal and normalization processing on the data in the training set and the test set obtained by the data acquisition unit respectively; the feature extraction unit extracts the feature that best represents the diesel engine fault from each data of the training set and the test set obtained by the data processing unit to form a new training set and a test set; the fault diagnosis unit constructs a random forest fault diagnosis model, and then imports the training set data obtained by the feature extraction unit into MATLAB software, uses a particle swarm optimization algorithm to optimize the parameters of the random forest model, and finally obtains a PSO-RF intelligent diagnosis model; the test set data obtained by the feature extraction unit is input into the PSO-RF intelligent diagnosis model, and the PSO-RF intelligent diagnosis model is used to classify and analyze the data to perform fault diagnosis, and obtain a fault diagnosis result therefrom.
Citation Information
Patent Citations
Transformer fault diagnosis method for optimizing random forest model based on particle swarm algorithm
CN110596492A
Ship working condition online identification method and system based on random forest algorithm
CN117892230A
A method for prediction of key performance parameter of an aero-engine transition state acceleration process based on space reconstruction
US20200184131A1
Cited By
Digital factory operation data intelligent analysis method and system
CN121188699A
Diesel engine destructive damage monitoring and early warning method based on thermotechnical data driving
CN121207553A