Therefore, since it was proposed, the VMD method has become a hot research issue and been successfully applied to the field of rotating machines [13; 14]. However, little research was carried out on the use of these techniques in reciprocating machines, such as diesel engines. In the research reported in this paper, the VMD method is studied to verify its ability to handle a cylinder head's vibration signals in diesel engines. Nevertheless, due to the complexity of diesel engines, it is difficult to identify the conditions or faults from a single feature obtained from the IMFs [15]. To better reflect the diesel engine's health states, features at different scales should be extracted from the original acceleration signal. Combining time domain and frequency domain feature parameters, 18-dimensional feature vectors are constructed in this paper. Commonly, a classification algorithm is used for fault identification after feature extraction. The Random forest (RF) algorithm is one of the widely used classifiers in data mining techniques. It is more accurate and efficient when working with large database. The RF classifier is a combination of many decision trees. Decision trees are grown by a binary partitioning method to make for easy interpretation [16]. Compared to single classifier such as decision tree, neural network, support vector machine, and so on, RF has better stability and generalization. It can not only perform multi-categorypattern recognition accurately, but also can sort multi-dimensional features according to the importance score. Proper reduction to features can keep the useful information to the maximum extent, eliminate useless information, and improve the efficiency of the algorithm. The RF supervised classifier has the above characteristics at the same time, so this algorithm is used to identify faults and reduce dimensions. This paper presented a new diesel engine valve fault diagnosis method based on the VMD and the RF algorithm. Based on the two-time decomposition strategy, the signal was decomposed by the VMD method, and the penalty function \(\alpha\) value was determined by the criterion for optimal selection. After acquiring several IMF signals, the spectral energy characteristics of the IMFs were extracted. In addition, we also combined the time domain features and frequency domain features of the original signals to form an 18-dimensional feature vector. With the RF used for feature selection and the low-dimensional features used as the input parameters of the RF classifier, the alarm of the abnormal valve state of the diesel engine and the identification of the three types of valve clearance faults were finally realized. The analysis of the actual data under the condition of variable speed indicated that the combination of VMD and RF was an effective method for the diagnosis of valve clearance faults. The main contribution of this work could be summarized as follows: (1) Based on reducing the energy leakage of the IMF component frequency spectrum and the minimum IMF component of power spectral entropy, the VMD penalty function \(\alpha\) was optimized; (2) The RF algorithm was adopted to rank the importance of all extracted features, so as to reduce dimensions and improve calculation efficiency; (3) The combined VMD and RF method improved the accuracy of fault identification. The organization of this paper is as follows: Section 2 introduces the diesel engine experimental test system. Section 3 introduces the principle of diagnosis based on optimized VMD-RF algorithm. The examples of application are described in Section 4. Finally, conclusions are given in Section 5.