V IBRATION - BASED IDENTIFICATION OF ENGINE VALVE CLEARANCE USING A CONVOLUTIONAL NEURAL NETWORK

: Contemporary operation-related requirements for combustion engines force the necessity of ongoing assessment of their in operation technical condition (e.g. marine engines). The engine efficiency and durability depend on a variety of parameters. One of them is valve clearance. As has been proven in the paper, the assessment of the valve clearance can be based on vibration signals, which is not a problem in terms of signal measurement and processing and is not invasive into the engine structure. The authors described the experimental research aiming at providing information necessary to develop and validate the proposed method. Active experiments were used with the task of valve clearance and registration of vibrations using a three-axis transducer placed on the engine cylinder head. The tests were carried out during various operating conditions of the engine set by 5 rotational speeds and 5 load conditions. In order to extract the training examples, fragments of the signal related to the closing of individual valves were divided into 11 shorter portions. From each of them, an effective value of the signal was determined. Obtained total 32054 training vectors for each valve related to 4 classes of valve clearance including very sensitive clearance above 0.8 mm associated with high dynamic interactions in cylinder head. In the paper, the authors propose to use a convolutional network CNN to assess the correct engine valve clearance. The obtained results were compared with other methods of machine learning (pattern recognition network, random forest). Finally, using CNN the valve clearance class identification error was less than 1% for the intake valve and less than 3.5% for the exhaust valve. Developed method replaces the existing standard methods based on FFT and STFT combined with regression calculation where approximation error is up to 10%. Such results are more useful for further studies related not only to classification, but also to the prediction of the valve clearance condition in real engine operations.


Introduction
In machine diagnostics, including combustion engines, the following are important: high probability of correct diagnosis, independence of the effects of the diagnosis from the predisposition of the diagnostician (objectiveness), using diagnostic parameters in the assessment of the condition ensuring minimum invasiveness into the engine structure (no need to disassemble the object components), using diagnostic parameters containing maximum information on the technical condition of the diagnosed object.The said criteria are met by signals based on vibroacoustic processes.Based on the analyzed literature, one can state that acoustic signals (noise) cannot be used as a source of data related to the technical condition of an engine.The reason for this is the problematic attribution of individual components of the spectrum of the acoustic signal to the process of object deterioration.This is related to the external distortion (unrelated to the process of deterioration) of the noise signal.Vibration signal is a different case.The question of influence of the engine technical condition on the vibration signal has not yet been fully explored, but the research to date is promising in terms of the potential for use of this signal in engine diagnostics.Therefore, continuation of the research on the use of vibration signals in assessing the technical condition of engines and their tune-up appears to be the right path.Deterioration of the engine structure and incorrectly tuned engine parameters may lead to the following adverse phenomena in the engine: degradation of the engine efficiency (reduced mechanical thermal and volumetric efficiency), reduced engine power, increased exhaust emissions, risk of damage to the engine components.Figure 1 presents the changes in the velocity of the impact of the valve on the valve seat (allowing for the cam lift s).From the data presented in (Grzegorz M. Szymański and Tomaszewski, 2016; Grzegorz M Szymański and Tabaszewski, 2020) it results that the changes in the valve clearance may lead to increased fuel consumption by approx.9%, while the analysis of Figure 1 allows a conclusion that along with the increased valve clearance grows the velocity of the impact of the valve on the valve seat, resulting in additional undesired dynamic loads of the cylinder head components.The purpose of this paper is to develop a method for estimating valve clearance for 4 defined clearance classes using vibration measurements on the engine cylinder head.The priority was to use machine learning to obtain a prediction error below 10%, as in current methods such as FFT and STFT.The paper presents the state of knowledge and the problems of valve clearance diagnosis.The author's research methodology with the boundary conditions of an active diagnostic experiment is described.Then, the methods of data analysis and interpretation of the results were presented.

State of knowledge and fundamentals of the problem
Methods of diagnostics of the technical condition of combustion engines can be divided into those that utilize the operating processes (indication, changes in the engine torque as a function of crankshaft angle, measurements of the engine pressure and temperature, measurement of the pressure beneath and above the piston, fueling parameters, exhaust opacity, etc.) and those that apply the residual processes (vibration, noise, thermal, electrical and other processes).Based on the research into the operating processes, one may infer the general technical condition of an engine, while the residual processes provide information on the condition of individual components and kinematic pairs.Therefore, the residual processes are used as autonomous or auxiliary diagnostic methods.One of the fundamental mechanisms in piston combustion engines is the valve timing system.As a matter of its principle of operation, it is a source of a vibroacoustic signal.The operation of a valve timing system including the opening and closing of valves, mating of the cam with the pusher, canceling the play in the bearings of the rocker arms is accompanied by series of impacts of the mating components, which, in turn, generates vibration.The valve clearance change engine volumetric efficiency what could affect to exhaust emission especially under real drive test (Merkisz-Guranowska and Pielecha, 2014;Merkisz et al., 2014).For this reason, should be reduced before testing to obtain constant boundary conditions.In addition, incorrect valve clearance can increase fuel consumption by up to 10% (Grzegorz M. Szymański and Tomaszewski, 2016).As a result, unit costs of transportation can increase, disrupting the efficient logistics systems (Galkin, 2017).The application of vibration signals in engine diagnostics has been described in (Cai et  Based on the analysis of the achievements of the researchers in vibroacoustic diagnostics of engine aggregates to date, it has been concluded that the conducted research focused on the application of vibroacoustic signals in the assessment of the technical condition of the engine aggregates or the processing occurring therein.The research concentrated on the problems of modeling (development of diagnostic models and their validation) and methodology-related aspects (e.g.determination of the operating conditions during the vibration measurements or selection of the measurement points).In the described research, both simple methods of signal description (e.g. point measures) and highly advanced techniques of signals professing (e.g.artificial neural networks, time-spectrum analysis) were used.When it comes to the analysis of the achievements in engine diagnostics, the authors have found very few publications related to the application of classifiers in the assessment of the technical condition of valve timing systems of combustion engines, which is why in the paper they propose a system for the identification of the valve clearance class during engine operation.In order to generalize the results, the engine operated at different speeds and loads.The set valve clearance values were associated with the recordings of the vibration signalabsolute vibration acceleration.A methodology of identification of the valve clearance class was proposed based on the absolute vibration acceleration measured on the cylinder head and the supervised learning systema classifier.Such a solution allows assessing the correctness of the valve clearance on the operating engine without the need of shutting it down.This solution does not require seeking a mathematical model describing the relation between the measures of the vibration signal and the valve clearance.
where: l-network layer,d-th feature vector in layer l-1,j-th feature vector in layer l, ka convolutional kernel, bbias vector and factivation function.
In CNN networks, a ReLU type of layer is also applied for fulfilling the ReLU (Rectified Linear Unit) function for each input value, which allows solving the problem of the disappearing gradient and accelerates the learning process compared to sigmoid activation functions (Géron, 2017).This function has a form: Another layer that often occurs in such a network is the pooling layer.Its aim is to subsample the input image in order to limit the risk of overtraining and reduce the computing load.This happens thanks to the process of collection of the input data through a given aggregating function (e.g.max or medium).
Similarly to the convolutional layer, each neuron connects with the outputs of a small number of neurons from the previous layer.Between the convolutional and the ReLU layers normalization often takes place, which accelerates the training and reduces the sensitivity to the values that initialize the network weights.To this end, batch normalization is applied, in which, based on the empirical values (average and standard deviation), one obtains centered and normalized data that are later rescaled and dis-placed.
The said layers can be used in the network more than once.The last layers of the CNN network are usually layers that are fully connected, forming a supervised learning classifier realized in the form of a neural network with the softmax function at the output.The output of a fully connected layer can be expressed as: where: lnetwork layer,layer output l-1,layer output l, wlfully connected layer weight matrix, b bias vector and gactivation function.
The softmax function calculates the probability of assignment of the input vector to a given category for each neuron of the last fully connected layer

Methodology of research
The experiment was conduct on a research engine type SB 3.1 (Figure 2), that was developed from the SW 680 engine.The main aim of constructions SB      As we can see, identification of the valve clearance based on one simple measure of the amplitude may turn out impossible.It should be noted that individual fragments vary, even for the same clearance value, which can be observed in Figure 6 and the trained examples are burdened with high parameter dispersity.Therefore, it was necessary to use the approach that would allow for the entire feature vector and that would additionally enable a correct identification of the valve clearance without the need to build an explicit model.The proposed approach is based on determining of the feature vector and then training the neural convolutional network commonly used in image analysis.In the proposed approach, the network input does not constitute an image in the literal sense of the word.
In order to extract the training examples, fragments of the signal related to the closing of individual valves were divided into 11 shorter portions.From each of them, an effective value of the signal was determined.Such a parameterization was applied to all the measurement directions (X, Y, Z).The case was similar for the rate of acceleration variation in time (jerk) from the signals recorded in the directions X, Y, Z. Additionally, the authors included in the input data the normalized engine speed (value referred to the maximum engine speed) and the load information.Since the information on the engine load may be difficult to obtain during regular operation, in the second version of the investigations the idea of including the engine load was dropped.Each training vector was thus described with 68 features (or 67 features if the engine load was not included).
It is noteworthy that various trials were made in terms of the input values and the input data organization described here rendered the best results.The available signal samples allowed generating 32054 training vectors (containing the previously mentioned features) for each of the valves related to 4 classes of valve clearance, as presented in Figure 7.
Fig. 6.The response signal to the shock resulting from the impact of the valve on the valve seat for one of the engine valves and different valve clearances Since the number of classes is not identical, for the assessment of the classification error a weighted error measure was selected, calculated according to the formula: where: Cnumber of classes, Cinumber of elements in the i-th class, aijelements of the class distribution matrix (confusion matrix) from outside of the diagonal.As mentioned earlier, for the identification of the class, a convolutional neural network was applied.Its structure was selected with the method of trial and error comparing the classification errors.Schematics of the proposed network has been shown in Figure 8.
Prior to the training process, the data were normalized by referring their values to the maximum value.
The first convolutional layer in the proposed network was built from 16 convolutional kernels.The kernel in the first convolutional layer was 1x12 and the stride, i.e. the distance between two receptive fields was 2. In order to normalize the network output, batch normalization was applied.This accelerated the training process and reduced the training sensitivity to the weight initializing parameters.Another layer (ReLU) was a non-linear activation function defined with the formula (2) and then came the max-pooling layer.Since one convolutional layer was insufficient, an additional one was applied.The convolutional kernel was in this case smaller (1x6), the number of the feature maps in the convolutional layer amounted to 32 and the stride was 2. The last network layer was a classic neural network (two fully connected layers and the softmax layer).
In order to determine the actual applicability of the CNN network in the problem under solution, the results were compared with other commonly applied methods.The investigations were carried out using a network for pattern recognition with a layer of sigmoid neurons and the softmax layer at the output, whose structure was also selected with the method of trial and error.Another compared method was random forests.They pass for one of the best methods of machine learning.They increase the efficiency of the classification obtained through single classification trees.It turns out that a numerous set of independent classifiers (each single one of which renders results no better than random classification) can produce decisions through majority voting (Géron, 2017).The idea of creating a family of classifiers and voting can be applied in various methods, yet, they are of particular importance to the classification trees.Random forests connect lightly dependent trees in a family.Classifiers are built based on vectors randomly selected with replacement.The size of the sample is equal to the size of the training set.
Additionally, in each node, a random selection without replacement is made of only a part of the input vector attributes and, based on the randomly selected attributes, an evaluation of the measure of data division in the node is made.The classification of data is made according to the principle of majority voting based on many independent trees built in such a way.The optimum values of algorithm hyper-parameters were determined based on the cross-validation test results.
The Table 2 indicates an advantage of the CNN network over other comparable methods.Significant differences between the CNN network and the classification network appear in the case of evaluation of the intake valve clearance.It should be stressed that when applying the CNN network and identifying the valve clearance based exclusively on a single portion of the signal (a single engine work cycle), the classification error, even when the engine load is unknown, is less than 1%.Given the fact that the final decision related to the valve clearance class can be made based on several consequent engine work cycles and several consequent examinations, this error will be much lower than 1%.CNN networks also show an advantage over optimized random forests that pass for some of the best methods of classification.From the analysis of the presented table, it also results that introducing the information on the engine load facilitates classification of the valve clearance, but lack of such information is not a critical obstacle in the detection of the incorrect valve clearance.Despite the fact that the clearance of both valves was set at the same value, the diagnosability of both valves, as regards the proposed methods, is significantly different.At this stage of the research, it is difficult to assess the cause of these differences.The Tables 3 and 4    The analysis of Table 4 shows that the "Tight" class is most often confused with the "Excess" class.The same is true for the "Optimum" and "Extreme" classes.However, the "Excess" class is most often confused with the "Extreme" class.While in the latter case it is understood (the difference between clearances in both classes is not so large) so much error associated with too small and too large clearance may indicate uniqueness of vibration phenomena or disturbances.However, these phenomena do not occur frequently (approx.0.15% of all real cases of too little clearance).A similar distribution of errors can be seen in Table 4 (the network has no information on the engine load).In this case, the accuracy of the diagnosis of the optimal state is particularly diminished.There is also an increasing number of mistakes between the "Excess" and "Extreme" states.Similar conclusions can be drawn for the exhaust valve.Assuming that each case of non-optimal valve clearance constitutes a failure, the probability of detecting the failure if the failure does actually occur and the probability of detecting the fit condition can be determined.For both the intake and exhaust valves, the probability of detecting a non-optimal condition in a single measurement is over 0.99 with or without load information.The probability of detecting the optimal state when it occurs is on the order of 0.99 for the intake valve and drops to 0.97 for the exhaust valve and no load information.In all cases, the results obtained on the separated test data prove the adequacy of the proposed method.

Conclusions
As a result of the performed analyses, the authors can propose a method of real time classification of valve clearance based on vibration signals measured on the cylinder head.For the correct operation of the system, it is sufficient to measure the effective value of the acceleration signals and the rate of their change in time determined in short time windows that include the process of valve closing.For the engine under analysis, the valve clearance class identification error is less than 1% for the intake valve and less than 3.5% for the exhaust valve.Given the many repetitions of the classification process in short time and the selection of the most frequently occurring class, this error is negligible.Obviously, in the case of other type of engines, the entire process of classifier construction must be repeated.Finally, in the new approach, increasing the level of classification details increased the classification error by a maximum of 2.5%.In the opinion of the authors, such results are more useful for further studies related not only to classification, but also to the prediction of the valve clearance condition in real engine operations.

Fig. 1 .
Fig. 1.Changes in the velocity of the impact of the valve on the valve seat in a combustion engine resulting from the change of the valve clearance, CAcrankshaft angle, scam lift, vvelocity of the point on the cam

(
Huang et al., 2021)(Huang et al., 2021):   = ( (   )   −1 )/ ∑ ( (   )   −1 )  =1 (4) where: pcprobability of assignment of a given example x to class c, Lthe last layer of the CNN network, x L-1layer output L-1, wweight vector, Cnumber of classes.The above expression allows determining the loss function LF: mthe number of training examples, yc,iequals 1 for the i-th example if c is the target class for the iexample and equals 0 if not.The learning algorithms of a network minimize the loss function.The network trained in that way allows the process of classification of the input feature vectors.Due to the low effectiveness of convolutional networks in image recognition, the authors decided to use it in the identification of the class of the valve clearance.
3.1 engine was to assess the process of combustion and other parameters of original SW 680 engines (producer British Leyland).The methodology of presented research is a development based on research (Grzegorz M Szymański and Tabaszewski, 2020).The main change in taking measurements concerns adding of engine rpm information to the input data.The research methodology is presented in full in the article (Grzegorz M Szymański and Tabaszewski, 2020).In this study, a new approach was presented in the time selection of signals and their analysis.

Fig. 3 .
Fig. 3. Diagram of the measurement system used in the measurement of the cylinder head vibration during engine operation

Fig. 4 .Fig. 5 .
Fig. 4. Measurement directions of the vibration on the cylinder head with the vibration accelerometer fitted on the cylinder head

Fig. 7 .
Fig. 7. Number of representatives of individual classes4.Data analysisThe construction of the classifier and its validation was carried out independently for the examples pertaining to the closing of the intake as well as exhaust valves.The testing was carried out based on the holdout test and for the training and testing 50% of examples were selected.Such an evaluation of the testing error may potentially exaggerate its value.Since the number of classes is not identical, for the assessment of the classification error a weighted error measure was selected, calculated according to the formula: below show the confusion matrices obtained by the CNN network for the intake valve.The share of individual results was related to the number of examples in real classes.

Fig. 8 .
Fig. 8. Structure of the convolutional network used in the recognition of the valve clearance (engine load not included) (Géron, 2017;Sarker, 2018)l., 2016;Zhao et al., 2017).One of the possibilities of class prediction is the application of methods of deep learning.A convolutional neural network (CNN) can be applied here.Convolutional neural networks are particularly applied in recognition of images and speech but are also used in the process of classification.Some ex-Ye and Zhai, 2019).They are a result of research on the visual cortex(Géron, 2017;Sarker, 2018).The most important component of this network is the convolutional layer.The idea behind this layer is that the neurons connect with only a small number of the neurons from the previous layer (receptive field).Thanks to this, training of such a network is much faster and more effective compared to a network whose neurons are fully connected.The weights of the neuron in the convolutional layer are the convolutional kernels (filters) augmenting the elementary data of the image.Thanks to the application of a given filter, we obtain a given feature map.Usually, one such map is insufficient; hence different filters are applied, forming an entire stack of feature maps.
(Nowakowski and Komorski, 2021)al diagnosis (Bilal et al., 2022; Lekha and M, 2018; Sannasi Chakravarthy et al., 2022)also in COVID-19 diagnosis (Aslan et al., 2022; Krishnaswamy Rangarajan and Ramachandran, 2022), assessment of urban development (Boulila et al., 2021), face recognition (Ben Fredj et al., 2021; Wang and Liu, 2022), recognition of sign language (Goswami and Javaji, 2021; Nakjai and Katanyukul, 2019), recognition of road signs (Devraj Mudgal, Rohit Nikam, Trupti Nikumbh, 2021), recognize serial numbers on banknotes (Ma and Yan, 2021), detection of ice on energy lines (Lu et al., 2019), application in non-invasive examinations of pipelines (Wu et al., 2019), identification of environment sounds (Ramaiyan et al., 2021), diagnostics of gear transmissions (Huang et al., 2021), identification and location of damage in transformer windings (Dey et al., 2017), machine diagnostics (Pham et al., 2021), detection of weld defects (Khumaidi et al., 2017), identification of cast defects (Lin et al., 2018), diagnostics of insulators in transmission networks (Liu et al., 2017), diagnostics of roller bearings and forecasting residual time before malfunction(Ren et al., 2018), recognition of a variety of structures and objects in images(Gao et al., 2017)etc.In the said applications, convolutional neural networks in a variety of their configurations in many cases beat other solutions.The use of CNN due to the greater accuracy of classification is justified, especially since simpler machine learning methods from the automotive industry are successfully used, for example decision tree to diagnosing the drive shaft bearings(Nowakowski and Komorski, 2021)or energy management strategy of diesel hybrid vehicle (Feature map layer l is calculated as(Dey etal., 2017; Khumaidi et al., 2017):

Table 1 .
Signal recordings parameters

Table 2 .
Collective classification error

Table 3 .
Confusion matrix obtained by the CNN network for the intake valveload included Share of recognized test examples [%]

Table 4 .
Confusion matrix obtained by the CNN network for the intake valveload not included min.error in all CNN results (without main diagonal) 50% max.error in all CNN results (without main diagonal) min.error in all CNN results (without main diagonal) 50% max.error in all CNN results (without main diagonal) Tabaszewski, M., Szymański, G. M., Nowakowski, T., Archives of Transport, 61(1), 117-131, 2022 It is noteworthy that the proposed method exhibits an advantage over classic methods of analysis of signals based on FFT and STFT analyses combined with regression calculations (approximation error up to 10%) (G.M. Szymański, 2005) as well as methods that do not use explicit equations of relation between the valve clearance values and the vibration signal parameters such as: Pattern recognition network and Random forest, in which the classification error is greater than that shown in the research analysis results.Comparing to previous research (Grzegorz M Szymański and Tabaszewski, 2020) the obtained results enable to classification of valve clearance using wider resolution with new, important extreme class.