Single-Sensor Engine Multi-Type Fault Detection

Engine fault detection is conducive to improving equipment reliability and reducing maintenance costs. In practical scenarios, high-quality data is difficult to obtain. Usually, only single-sensor data is available. This paper proposes a fault detection method combining Variational Mode Decomposition (VMD) and Random Forest (RF). At first, the spectral energy distribution is obtained by decomposing and statistic the engine data of multiple working conditions. Based on the spectral energy distribution, the overall optimal mode number was identified, and the quadratic penalty term was optimized using SNR. The improved VMD (IVMD) improves mode aliasing and iterative efficiency and unifies feature dimensions. Decomposition of real signals demonstrates the effectiveness. The paper designs a feature vector composed of seven types of attributes, including unit bandwidth energy, center frequency, maximum singular value and so on. The feature vector is then fed to RF for classification. Features are selected in order of importance to classification to improve the training efficiency. By comparing with various algorithms, the proposed method has higher accuracy and faster training efficiency in single-speed, multi-speed and cross-speed single-sensor data diagnosis. The results show that the method has application prospects with little training data and low hardware requirements.


Introduction
As one of the critical power sources, the reliability of engines has received more attention in recent years. In time, engine fault detection can detect weak faults, which is conducive to fault prevention and repair. Data-driven approaches usually require large amounts of high-quality data for training. However, engine labelled-data is challenging to obtain and mostly comes from a single sensor due to cost constraints. Research on singlesensor engine fault detection based on small data amounts and low hardware requirements is necessary [1].
Vibration acceleration signals are widely used in fault detection research because of their rich component condition information and ease of measurement [2,3]. Ma et al. proposed a multi-channel Lanczos quaternion singular spectrum analysis to extract fault characteristic frequencies from multiple vibration sensor signals [4]. Ribeiro et al. proposed a multi-head one-dimensional convolutional neural network to diagnose six motor faults using vibration signals from two directions [5]. However, the engine vibration signal has a wide frequency band (up to about 12,000 Hz), and sensors with high sampling accuracy and a wide frequency band with good stability are usually costly. Moreover, the hardware conditions of the engine control system are ordinary, so the research on single-sensor fault detection under low hardware requirements is gradually gaining attention. Basuraj et al. proposed a single-sensor online filtering method for recursive singular spectrum analysis based on the concept of first-order feature perturbation, which proved its effectiveness in several data sets. [6]. Ayati et al. used KNN for single-sensor fault classification after The paper aims to propose a single-sensor, cross-speed fault detection method that is applicable to low hardware requirements and small data amounts. The work has resulted in the following contributions.
(1) A new overall K and α optimization method based on spectral energy distribution and SNR is proposed for VMD, avoiding IMF screening and unifying the feature dimension to prepare for quick diagnosis. (2) The center frequencies are preset based on spectral energy distribution, which reduces the number of VMD iterations and mode aliasing. (3) A feature set was designed for IVMD-RF to achieve single-sensor fault diagnosis. Further filtering of features by feature importance ranking improves efficiency. Different single-sensor datasets demonstrate the effectiveness of the method.
The rest of the article is organized as follows. Section 2 introduces the basic principles of the methods used in the paper. In Section 3, the fault data collection experiment of the diesel engine is presented. Section 4 introduces the optimization of the VMD method and the verification of its decomposition effect. In Section 5, IVMD-RF is presented and compared with various DNN methods on two diagnostic cases.

Variational Mode Decomposition
The purpose of VMD is to decompose an actual signal into several ideal narrowband signals while satisfying the constraint that the sum of their bandwidths is the smallest. Assume that each IMF closely surrounds its center frequency in the frequency domain. Therefore, the objective can be summarized as the following constrained variational problem: where {u k (t)} = {u 1 (t), u 1 (t), . . . , u k (t)} and {ω k } = {ω 1 , ω 2 , . . . , ω k } represent the decomposed IMFs and the corresponding center frequencies, respectively. δ(t) is the shock function. The reconstruction constraint can be addressed by introducing a quadratic penalty α and Lagrange multipliers λ. The constrained variational problem of (1) is transformed into an unconstrained one by introducing these two parameters. The obtained augmented Lagrangian is shown in (2): This problem can be solved by Parseval/Plancherel Fourier isometry under the norm.

Algorithm 1: VMD
Input: A signal f, mode number K and quadratic penalty α. Output: A set of IMFs Update ω k by (4) end for Dual ascent for all ω ≥ 0:

Random Forests
The random forest algorithm was proposed by Breiman [33], which is suitable for solving data prediction and classification. A random forest is a combination of decision tree classifiers. Each tree depends on the value of an independently sampled random vector and has the same distribution for all trees in the forest.
where root(h t ) is the root node of the decision tree. d(x 1 , x 2 , . . . , x n , h t ) is the division criterion of the decision tree. The segmentation criterion consists of segmentation variables and predictions measured by the impurity function. The Gini coefficient is proportional to the impurity level. The optimal split is to find the largest split of the Gini coefficient as follows: where p(j|t) is the probability of the jth category in node t, that is, the ratio of the jth category to the total number of sample labels J. Before selecting attributes for each non-leaf node, randomly select m attributes from M attributes as the set of categorical attributes for the current node. Take m = int( √ M), where int is the rounding function. The nodes are divided according to the optimal division method of m attributes, and a complete decision tree is established. The growth of each decision tree is not pruned until the leaf node grows.
A random forest generated from T decision trees is used to classify the test samples. Each tree has voting power to decide the classification result. Summarize the output categories of the decision tree, and the category with the most votes is the final classification result. The classification decision model H(x) is shown in (8).
where γ is the label variable of the output and I is the indicator function.

Diesel Engine Faults Simulation Experiment
To verify the effectiveness of the proposed method, our team conducted a fault simulation experiment on an in-line 6-cylinder diesel engine. The specific parameters of the engine are shown in Table 1. The experiment was performed on a bench base supported by an air spring. The engine and the dynamic dynamometer adopt a flexible connection. The photoelectric pulse speed sensor is placed at the position of the vertical connecting shaft to measure the engine speed. The vibration acceleration sensors are arranged on the cylinder head and block as shown in Figure 1. The data used in this paper are vibration acceleration signals in the Y-direction in Figure 1. The signal is input to the computer for processing and recording after passing through the acquisition front end. The models of the instruments used in the experiment are shown in Table 2.   Components with the highest failure probability are fuel injection and oil supply equipment (25.1%), water leakage (13.1%), and valves and sealing (17.4%) [34]. Generally, leak failure is easy to detect by water temperature sensors. The paper focuses on two other types of failures. The paper simulates three faults for the fuel supply equipment: abnormal common rail pressure, abnormal fuel supply, and abnormal injection advance angle. Abnormal rail pressure is set to simulate the fault of the common rail system, and the insufficient fuel supply is to simulate injector failure. The weak power combustion abnormality is simulated by slightly changing the injection advance angle. In addition, the abnormal valve clearance is simulated by adjusting the opening of intake and exhaust valves with a plug gauge. The abnormal valve clearance conditions all occurred on the first cylinder only. Experiments were performed at the following rotational speeds: 700 rpm, 1300 rpm, 1600 rpm, 2000 rpm, and 2300 rpm. The parameters of normal working conditions under each speed condition are shown in Table 3. The fault settings at rated speed (2300 rpm) are shown in Table 4, where the Roman numerals represent different fault conditions. The fault conditions of other speeds are also adjusted to the same extent as those in Table 4 on the basis of the normal parameters in Table 3. The abnormal advance angle failure simulation is not carried out under 700 rpm idling conditions. The load range of the engine includes 100% and 50%.

Optimization of Variational Mode Decomposition
VMD's denoising ability is better than EMD [35], and the decomposed IMFs have a better signal-to-noise ratio (SNR). However, the decomposition effect of VMD is greatly affected by parameter settings, especially the mode number K and the quadratic penalty term α. Improper K value setting will lead to over-decomposition or under-decomposition. In addition, as K increases, the efficiency of the original VMD decreases drastically. Figure 2 shows the effect of different K values on the decomposition time of each IMF. The results show that the efficiency of VMD is much higher when K ≤ 3. From Figure 2, traversing K to find the optimal value and using various swarm intelligence optimization algorithms are both inefficient. Therefore, Ref. [36] proposes an adaptive recursive variational mode decomposition (ARVMD) that dynamically selects the K in recursive loops. ARVMD effectively improves efficiency and reduces recursive mode aliasing. The process of ARVMD is shown in Algorithm 2.
. . , F n }← Corresponding frequencies of maxima points; Complex types and working conditions characterize engine faults. However, the component number obtained by ARVMD is variable, resulting in inconsistent feature vector dimensions, which is not conducive to diagnosing multi-speed engine vibration data. A K-value optimization method based on the energy distribution in the frequency domain is proposed to unify the feature dimension. First, ARVMD decomposes the signals of various engine working conditions and obtains many IMFs. These conditions contain data for different speeds and faults (I to XII, as shown in Table 4). Then, the unit bandwidth energy [36] of each IMFs is calculated, and the center frequency of the IMFs is recorded. The unit bandwidth energy is shown in (9): where e I MFi is the energy of IMF and B I MFi is the bandwidth of IMF. The bandwidth is the width of the spectrum when the amplitude of the power spectral density is reduced by 99%. The frequency band [0 Hz, 12,800 Hz] is divided into 128 segments, and the width of each segment is 100 Hz. The unit bandwidth energy of the components located in each segment is counted and averaged. Figure 3 shows the unit bandwidth energy spectrum displayed on divided frequency bands. The results show that there are six prominent energy frequencies: 150 Hz, 1450 Hz, 1950 Hz, 2450 Hz, 4950 Hz, and 7050 Hz. Here, each frequency segment uses the frequency in the middle as the value of the abscissa. Therefore, the engine data will be uniformly decomposed using K equal to 6. This approach can improve the consistency of data processing and help reduce the randomness caused by adaptive decomposition. It also ensures that the dimension of the feature vectors at different speeds is uniform. Furthermore, the iterations of the center frequency of the original VMD are zero-based. It is beneficial for decomposing low-frequency components, but the decomposition time for high-frequency components is longer. Presetting suitable initial center frequencies can significantly improve the efficiency of the VMD [18]. Therefore, the six significant frequencies in Figure 3 are used as the initial center frequencies to iterate.
The quadratic penalty term α is a parameter introduced to improve the convergence when solving the variational model. The role of α in the decomposition is reflected in the noise reduction of the signal. The SNR is the best criterion for choosing a suitable α. However, it is difficult to obtain the SNR of the actual signal after decomposition. Therefore, a set of simulated signals is constructed according to the spectral energy distribution of Figure 3. The expression of the simulated signal is as (10). {s 1 , s 2 , . . . , s 6 } are singlefrequency components, which restore the amplitude ratio and frequency of each component in Figure 3. The amplitude of s 3 is set to 100, and the other components are reduced proportionally. s 7 is the noise component with a power of 25 dbW. S 1 is decomposed using VMD, where K is six, and the initial center frequency is preset. Set the variation range of α to [1000, 20,000], and the step size is 100. Calculate the SNR between IMFs and {s 1 , s 2 , . . . , s 6 }, and the results are shown in Figure 4. With the increase of α, the SNR has a trend of increasing first and then decreasing. Summing the SNR of each component, it is found that the total SNR does not change much when α is 6000 to 8000. The value of α used in the paper is 6800, and the inset of Figure 4 shows that the SNR reaches the maximum at this value. After the optimized α is obtained, it is used in the mode number optimization for reverse verification, and the results show that it does not affect the results in Figure 3. The optimization of K, α and the iterative optimization of the center frequency have been completed. Next, decompose an actual signal using the improved VMD (IVMD) to verify the effect. A signal of valve clearance increase at 1600 rpm (Condition III in Table 4) was randomly selected for decomposition. The signal's time and frequency domain are shown in Figure 5a,b. Decompose this signal using VMD and IVMD. Figure 6 shows the frequency domain image of the decomposed IMFs. VMD decomposes four components in the [2000 Hz, 3000 Hz] while IVMD decomposes three. The results show that using the same K, VMD focuses on decomposing low-frequency components, while IVMD is more balanced. The average bandwidth aliasing ratio R ABA is introduced to measure the effect of suppressing mode aliasing [36]. The expression of R ABA is shown in (11): where K is the mode number, B A is the aliasing bandwidth of the IMFi and other components, and B IMFi is the bandwidth of IMFi. The smaller the R ABA , the better the effect of suppressing mode aliasing. The R ABA for VMD and IVMD results is 0.13 and 0.05, respectively. IVMD suppresses mode aliasing better than VMD. In addition, the center frequency iteration curves of IMFs are shown in Figure 7. Figure 7 shows that IVMD performs 87 iterations, less than VMD's 194 iterations, effectively improving efficiency. The results show that the presetting center frequency can significantly improve the iteration efficiency.

VMD-RF Fault Detection Method
After the IVMD decomposition of the engine signal, calculating proper features is beneficial to improve the diagnostic accuracy. The RF method can automatically select a subset of features for classification by bootstrap sampling with return. Instead of considering the feature dimension, features are required to describe the data information as comprehensively as possible. Therefore, the used features include overall features and local features. Finally, seven types of local features are selected. Namely, maximum singular value, energy, unit bandwidth energy, kurtosis, variance, root mean square value (RMS), and center frequency. The seven types of features are calculated for the six IMFs obtained by IVMD. In addition, maximum singular value, energy, RMS, and variance are calculated for the original signal. Feature names and symbols are shown in Table 5.

Case 1: Diesel Engine Fault Diagnosis
Once the complete feature set is obtained, the feature set can be fed into the RF for classification. The whole flow of fault diagnosis is shown in Figure 8. The data of the first cylinder head (1H), the third cylinder head (3H), and the first cylinder block (1B) at 2300 rpm and the data of the first cylinder head at 2000 rpm were selected for preliminary verification of the algorithm's validity. Each dataset contains four types of faults in Table 4, with a total of 12 fault conditions. Each fault condition includes 200 samples, and the training/test ratio is 4:1. The number of decision trees in RF is 100. The depth of the decision tree is not limited. Then, the training samples are used to generate a random forest. The results of the diagnostic accuracy are shown in Table 6. The proposed method is compared with sequential minimum optimization for support vector machines (SMO-SVM), Multilayer Perceptron (MLP) [31], one-dimensional convolutional neural networks (1DCNN) [29], long and short term memory recurrent neural networks (LSTM-RNN) [30], and residual neural networks (ResNet) [31]. The 1DCNN and LSTM-RNN ran for 200 epochs, while ResNet ran for 30 epochs. The parameters of each algorithm are as follows: (1) SVM: The RBF kernel is chosen, and the penalty term C is set to 1. The inverse of the radius of influence of the support vector gamma is set to 0.1. SMO-SVM, MLP, 1DCNN, and IVMD-RF achieved high accuracy from the results of single-speed data. The LSTM-RNN had the lowest accuracy, which shows its poor classification ability for non-time series. Compared to the 1H data set, the diagnostic accuracy of the 1B and 3H datasets decreased significantly due to the increased distance of the sensor location from the combustion chamber and valve. The vibration signal may be distorted or coupled with other disturbances when it is transmitted.
The next step is to use these methods to diagnose multiple speed conditions. All types of failure data for the first cylinder head (1H) at 700 rpm, 1300 rpm, 1600 rpm, 2000 rpm, and 2300 rpm were made into one dataset. Since there are no abnormal injection advance angle faults in the 700 rpm data, a total of 56 labeled categories of data are included. The diagnostic results are shown in Table 6. Compared to the single-speed dataset for the first cylinder head (1H), the accuracy of each method decreases to varying degrees as the number of failure types increases. The accuracy of SMO-SVM dropped the most. SMO-SVM method is suitable for single-speed data classification but not as effective as other methods for multi-speed and multi-class data. The proposed method still maintains high accuracy. The results show that IVMD-RF has advantages for multi-speed and multi-type fault diagnosis scenarios.  Note: "3H" represents the third cylinder head, "1B" represents the first cylinder block.
In addition, the proposed method requires less training time to achieve high accuracy. For comparison, all algorithms are run in the same environment (Python 3.8, Windows 11, Intel Core i7-10700 CPU @ 2.9 GHz), and the running time is recorded in Table 7 The results show that SMO-SVM has the highest training efficiency, followed closely by IVMD-RF. ResNet has the longest training time due to the deep network layers. Therefore, the proposed method has high efficiency and high accuracy. It is worth noting that deep learning may provide better diagnostic results for the original raw signal. However, the significant increase in data dimensionality leads to an increase in computation time and higher hardware requirements, which deviates from the purpose of this paper. No diagnostics were performed on the original raw data to keep the variables consistent.
Next, the 1300 rpm, 1600 rpm, 2000 rpm, and 2300 rpm data were mixed into one dataset. The data were labeled into 12 categories according to Table 4, regardless of the speed change. The cross-speed datasets include the 1H dataset, 1B dataset, and 3H dataset. The above methods are still used for classification, and the results are shown in Table 8. The results show that the accuracy of each algorithm has a certain drop compared to Table 6, especially the SMO-SVM. The 1DCNN and IVMD-RF still maintain a relatively high accuracy rate. The overall accuracy of the 3H dataset is low because the sensor in the third cylinder head is far from the cylinder where some failures occurred. The proposed method still has some advantages over other algorithms. Table 8 also shows the classification precision, recall, and f1-score. These indicators are weighted averages, where the weights are determined by the proportion of each class sample distribution. The results show that the proposed method also performs well on these metrics. For the 3H dataset with relatively poor diagnostic results, Figure 9 shows the comparison of recall and precision of each algorithm for the 12 classes. The results showed low recall and accuracy for reduced valve clearance (condition II) and abnormal injection advance angles (condition IX to XII). The reason for the low precision and recall of Fault II is the slight increase in valve clearance and the long distance of the sensor from the cylinder where the fault occurred. Faults IX to XII, on the other hand, are due to small changes in injection advance angle, causing only minor differences in combustion conditions. The training efficiency of the proposed method is much higher than that of the deep learning method and slightly lower than that of SMO-SVM. Figure 10 shows the confusion matrix for the 1H dataset, indicating that most of the misclassified samples are data of the same type but with different failure levels, which proves the effectiveness of the proposed method. Note: "3H" represents the third cylinder head, "1B" represents the first cylinder block. The datasets with different training/testing ratios are set up for classification to verify the diagnostic effectiveness of various methods for the small sample case. Figure 11 shows each algorithm's accuracy and time consumption curves for the 1H dataset at different training test ratios (0.1 to 4). When the training test ratio <0.25, the accuracy of 1DCNN, RNN, and MLP significantly decrease, while SMO-SVM and IVMD-RF decrease more smoothly. When the training test ratio is 0.1, IVMD-RF has the highest accuracy of 88.77%. Figure 11b shows that the training efficiency of each algorithm increases as the training/test ratio decreases. The efficiency of IVMD-RF and SMO-SVM remains higher than the other methods. The results illustrate the good diagnostic effect of the proposed method for small samples of single-sensor data. Figure 12 shows the accuracy and training loss curves when the three deep learning methods are applied to the 1H dataset. Figure 12 indicates that the 1DCNN has converged while the RNN clearly shows over-fitting, which is the reason for its low accuracy. Continuing to train ResNet may improve the accuracy, but the training efficiency is too low compared to other methods. Therefore, IVMD-RF has a high fault diagnosis accuracy and high efficiency for cross-speed data. It is worth noting that deep learning methods still have more advantages and potential when the amount of labeled data and computational resources are sufficient.    The study of feature importance can further improve the performance of the method. Using the RF to rank the importance of features, the results for the 1H dataset are shown in Figure 13. Singular values, energy, and center frequency contributed more to the classification, followed by variance and unit bandwidth energy. However, kurtosis has little contribution to the classification results. Figure 13 shows that features with suffixes 1 and 4 contribute significantly to the classification, i.e., IMF1 and IMF4 contribute the most to the classification, followed by IMF5 and IMF6. For different working conditions, the difference in the body surface vibration is mainly reflected in the low-frequency (IMF1) and high-frequency components (IMF4~6). IMF2 and IMF3 have high energy but weak contribution. This conclusion is valuable for the study of unsupervised engine fault diagnosis. Figure 14 shows the impact of using different numbers of features in order of importance on training time and accuracy. Finally, we found an optimal point. When using fifteen features, it only takes 1.23 s to train and can achieve 97% diagnostic accuracy as marked in Figure 14. The selected fifteen categories of features are marked in Figure 13. Feature selection significantly improves training time with little change in accuracy.

Case 2: Gasoline Engine Fault Diagnosis
To verify the effectiveness of the proposed method on different engines, the gasoline engine fault data will be diagnosed in the following. The fault data came from a twocylinder, two-stroke gasoline engine with the specific engine parameters shown in Table 9. The sensor locations and coordinate system for the engine are shown in Figure 15. The data used are from the Y-direction of cylinder 1 and the X-direction of cylinder 2 (the two sensors connected by the white wire in Figure 15). Three common faults were simulated: abnormal injection advance angle, abnormal air-fuel ratio, and misfire. Among them, the abnormal injection advance angle occurs in both cylinders, while the other two failures occur only in cylinder 1. The specific fault level settings are shown in Table 10. Use Roman numerals I through VII to indicate individual faults. Signals from 5000 rpm and 7000 rpm were collected. Each working condition contains 200 samples, each containing data from one working cycle.   The 5000 and 7000 rpm data were mixed to form the cross-speed dataset. Various algorithms diagnose the fault data of 1Y and 2X sensors separately. The settings of each algorithm are shown in Section 5.1. A comparison of the diagnostic results for each algorithm is shown in Table 11. The results show an overall decrease in the diagnostic accuracy of each algorithm due to the increase in signal noise as the two-cylinder, twostroke engine vibrates more than the diesel engine. The higher speed is also one of the reasons. SMO-SVM is still the fastest, but its accuracy is low. The proposed method works best for fault diagnosis of 1Y data, and 1DCNN works best for 2X data. The difference in accuracy between the two is not significant. The proposed method is more efficient and suitable for low hardware conditions. The results show that IVMD-RF can be used for gasoline engine fault diagnosis.

Conclusions and Discussion
This article proposes an IVMD-RF for single-sensor multi-fault detection of the engine. In IVMD, the engine data spectral energy distribution is obtained through multiple decompositions and statistics. The alpha value was chosen based on the spectral distribution and the SNR. By presetting the center frequency and the optimal K and α values, the efficiency is improved, the mode aliasing is reduced, and the feature size is unified. The effectiveness of IVMD is proved by decomposing the engine signals. Seven types of attributes are calculated to form a feature group for IMFs, which is input into RF for classification. Compared with various machine learning and deep learning algorithms, it is proved that the proposed method has advantages in training efficiency and accuracy. Through the feature importance study, it is found that the high-frequency and low-frequency IMFs contribute more to the classification. Fifteen optimal features have been selected to improve the efficiency of RF. The IVMD-RF method has application prospects in engine single-sensor multi-class fault detection.

Data Availability Statement:
The data presented in this study are not publicly available at this time but may be obtained upon reasonable request from the authors.

Conflicts of Interest:
The authors declare no conflict of interest.