Next Article in Journal
Review of Partial Discharge Activity Considering Very-Low Frequency and Damped Applied Voltage
Previous Article in Journal
Passive Heating and Cooling of Photovoltaic Greenhouses Including Thermochromic Materials
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Detection of Knocking Combustion Using the Continuous Wavelet Transformation and a Convolutional Neural Network

1
Institute of Internal Combustion Engines and Thermodynamics, Graz University of Technology, 8010 Graz, Austria
2
Know-Center GmbH, Research Center for Data-Driven Business & Big Data Analytics, 8010 Graz, Austria
3
LEC GmbH, Large Engine Competence Center, 8010 Graz, Austria
*
Author to whom correspondence should be addressed.
Energies 2021, 14(2), 439; https://doi.org/10.3390/en14020439
Submission received: 21 December 2020 / Revised: 11 January 2021 / Accepted: 12 January 2021 / Published: 15 January 2021

Abstract

:
The phenomenon of knock is an abnormal combustion occurring in spark-ignition (SI) engines and forms a barrier that prevents an increase in thermal efficiency while simultaneously reducing CO 2 emissions. Since knocking combustion is highly stochastic, a cyclic analysis of in-cylinder pressure is necessary. In this study we propose an approach for efficient and robust detection and identification of knocking combustion in three different internal combustion engines. The proposed methodology includes a signal processing technique, called continuous wavelet transformation (CWT), which provides a simultaneous analysis of the in-cylinder pressure traces in the time and frequency domains with coefficients. These coefficients serve as input for a convolutional neural network (CNN) which extracts distinctive features and performs an image recognition task in order to distinguish between non-knock and knock. The results revealed the following: (i) The CWT delivered a stable and effective feature space with the coefficients that represents the unique time-frequency pattern of each individual in-cylinder pressure cycle; (ii) the proposed approach was superior to the state-of-the-art threshold value exceeded (TVE) method with a maximum amplitude pressure oscillation (MAPO) criterion improving the overall accuracy by 6.15 percentage points (up to 92.62%); and (iii) The CWT + CNN method does not require calibrating threshold values for different engines or operating conditions as long as enough and diverse data is used to train the neural network.

1. Introduction

An important topic related to spark-ignition (SI) engine combustion has been the characterization of engine knock. Increasing efficiency, reducing exhaust emissions and decreasing fuel are the primary objectives of all current engine development and optimization processes. Two ways of achieving these objectives are to downsize and pressure charge the engine or to increase the compression ratio. Both approaches provoke engine knock [1]. Chemical reactions and subsequent heat release create a shock wave called detonation. These detonations have high velocity flame propagation which can reach or even exceed values of 1000 m/s due to the high speed of sound of the gas. In SI-engine combustion, such detonations are referred to as knock. Knock occurs inside the combustion chamber due to auto-ignition of the end gas that the flame front has not yet reached. The sudden release of high amounts of chemical energy results in an increase in pressure and temperature with high amplitude shock waves. This causes the high-frequency noise after which the phenomenon is named. The result is structural damage capable of destroying the engine, under certain circumstances within a short period of time [2,3]. Further potential problems from knocking combustion include damage such as the breaking of piston rings, erosion of the cylinder head and the melting of pistons [4]. Limitations of the combustion process that may occur are a lower engine compression ratio or a later ignition timing. As a result, an increase in air pollution, a decrease in efficiency, a rise in fuel consumption and a source of noise can be expected [4].
The nature of engine knock is highly stochastic. Therefore, the time and place the phenomenon occurs persistently vary, even at steady-state operation with constrained operating parameters [5]. This is the reason why a cyclic approach is required in order to retrieve information about combustion conditions. Conventional methods like the threshold value exceeded (TVE) method applied with maximum amplitude pressure oscillation (MAPO) or a signal energy pressure oscillation (SEPO) criterion were able to achieve reasonable results for determining heavy knock cycles weak knocking cycles however, could not be identified with these criteria [5]. Furthermore, these approaches depend on parameters and operating conditions of the engine and therefore require calibration of a threshold in order to detect knocking combustion successfully. This is necessary for every engine measured in order to satisfactorily detect engine knock.
In recent years, the implementation of supervised, deep learning algorithms such as CNNs have yielded convincing results in various fields. In many cases, it has been shown to be superior compared to the state-of-the-art methods. These networks are particularly effective for computer vision tasks with the general objective of feature extraction and classification [6]. Enormous progress has been made with implemented CNNs in the fields of sensor fault diagnosis [7], object detection [8], classification [9,10], rejecting noise [11] and change detection [12]. In these studies convolutions were applied in both spatial directions ( x , y ) to find potential features hidden in the data.
To the best of our knowledge, numerous studies have been conducted to detect features of knocking combustion by applying the CWT or the discrete wavelet transformation (DWT) on either signals of pressure sensors or signals of acceleration sensors [13,14,15]; one study even combined it with artificial intelligence such as fuzzy logic [16], but this is the first time that this approach has been applied to pressure traces for knock detection. The advantage this method has over the state-of-the-art approaches such as TVE is that there is no need to calibrate a threshold for every engine measured. The algorithm can deal with various engines and configurations automatically learn a dynamic threshold representation simply by seeing samples of cycle in-cylinder pressure traces from a similar combustion chamber. As the database is extended, the generalization property is expected to improve, thereby the tendency of the neural network to overfit trained data will be reduced. The proposed approach can be implemented in real-time and is therefore an interesting tool for an engine control strategy.
This research article is organized in the following way: After this introduction in Section 1, the dataset of the cyclic in-cylinder pressure measurements and the corresponding generation of the subjective assessment used to label of the individual cycles are explained in Section 2. Section 3 presents a detailed illustration of the applied approaches and is followed by a report of the results in Section 4. Finally, Section 5 and Section 6 present a discussion and the conclusions, respectively.

2. Dataset and Labeling

Three measurement series of various large single-cylinder four-stroke SI gas engines were taken as the dataset for the present investigation into the occurrence of knock. The measurements of the in-cylinder pressure were performed by a pressure sensor that works according to a piezoelectric principle. In this process, a directional deformation of the monocrystalline quartz crystals emits a charge that is converted by a charge amplifier to a voltage proportional to the acting force [17]. For these measurements, no knock sensors were applied and engine speed was set to 1500 revolutions per minute. The configuration of the investigated single-cylinder engines differ (see Table 1), and for all of the measurements, it was ensured that knocking combustion occurred.
For measurement series one, 14 operating points (OPs) were gathered, each of which consisted of 60 cycles. The second measurement series has 15 OPs of 100 individual cycles each. The dataset is completed by the third series which consists of nine OPs of 60 cycles each. The boundary conditions for the OPs were defined as follows: Starting from a baseline value, variations of the ignition timing by 4 Crank Angle (CA) each, to early and to late ignition timing were performed for Engine 1 and Engine 2. For each ignition timing, the air/fuel ratio was varied to obtain different operating conditions with heavy knocking, at the knock limit and without knocking. In the measurements of Engine 3 the methane number was varied in the range from 60 to 80 and the charge air temperature was varied over a range of 20 C between minimum and maximum value, all at constant ignition timing. Yet again, for each operating point the air/fuel ratio was varied to obtain different operating conditions with heavy knocking, at the knock limit and without knocking. Table 2 provides an overview of the previously mentioned numbers and presents the fraction of knocking cycles within the three datasets.
Since all three engines are four-stroke engines, the pressure values for each cycle are recorded for 720 CA. The crank angle scaling ranges from −360 to 360 CA, with 0 CA representing the firing top dead center. The sampling time of pressure traces has to be short enough to capture characteristic high-frequency phenomena, that typically occur under knocking conditions. These features are important for the detection of knock. Therefore, a sampling of 0.1 CA was chosen to meet the requirement [18]. This yields 7200 measurement points for each individual cycle. In Figure 1, pressure traces of arbitrarily selected cycles of non-knocking and knocking condition are shown. When the two combustion conditions are compared, it can be seen that the peak pressure in the knocking cycle is always higher. In addition, the pressure traces are not as smooth as the non-knocking combustion with more fluctuations. These fluctuations start at approximately 10 CA.
This dataset of pressure traces was analyzed individually by five independent specialists with experience in combustion measurement interpretation. The specialists applied subjective criteria based on their own personal experiences to distinguish between knocking and non-knocking cycles. Thus, each specialist created a labeling for all of the 2880 cycles. With these human labels, it is now possible to apply a majority criterion that labels a cycle with 0 if at least 3 out of 5 experts labeled it as non-knocking and vice versa labels a cycle with 1 if at least 3 out of 5 experts decided that this cycle is a knocking one.

3. Methods

With this cyclic time series data from the in-cylinder pressure, trace features can be extracted for making the challenging identification of engine knock possible. The present approach consists of three major steps: Slicing the part of the pressure signal which contains the relevant information for detecting knock, applying the CWT to the slice of the signal generating the coefficients and finally using the CNN-based classifier to detect engine knock cycles by considering these coefficients as input. Profound knowledge which was provided by Taspinar [19] helped a lot for developing the initial stage of the approach proposed.
When the CWT is applied to the pressure trace, a multiscale analysis of the signal is made which is resolved simultaneously in time domain. The flowchart of the proposed approach is shown in Figure 2.

3.1. Slice Relevant Window of Pressure Traces

In this study the time range of the signals recorded from the pressure sensors is from −360 to 360 CA. To achieve the goal of reliable detection of knocking combustion cycles, it is not necessary to analyze the 7200 data points received from the sensor for each cycle. This would be computationally expensive yet not improve the classification result of the algorithm. The reason for this is a lack of distinctive features in early and late parts of the signals as far as the detection of knock is concerned. It is thus critical to slice the analyzed window for observation as small as possible while, retaining useful information and ensuring a robust solution with good generalization properties. In this way, other interfering factors within the signal can be excluded. Since knocking combustion normally starts close to the ignition timing, a window ranging from 5 to 35 CA was chosen for this study. With the available sampling period of 0.1 CA, 300 points are obtained for every individual cycle. The sliced part of the pressure traces is illustrated in Figure 3.

3.2. Continuous Wavelet Transformation

The continuous wavelet transformation (CWT) converts one signal into another which either makes certain features more amenable than the original signal or enables the original dataset to be described more concisely [20]. The CWT has the ability to extract different components such as seasonality, trend and anomalies for time series, and it has been applied in numerous applications in different fields [21]. The advantages of the time–frequency analysis performed by the CWT over previously applied methods are that it can be entirely automated and does not require pre-processing. In addition, the CWT is scalable in time, so that it is able to extract period and phase information with appropriate temporal resolution and the dynamic measure of changes in output is suitable for non-stationary signal analysis [19,22].
The CWT of a signal p ( ϕ ) with respect to the wavelet function Ψ ( ϕ ) is defined as [20]:
T ( a , b ) = w ( a ) p ( ϕ ) ψ * ϕ b a d ϕ
where * denotes complex conjugation. The term w ( a ) is typically set to 1 / a for reasons of energy conservation. Thus, the normalized wavelet function is often written more compactly as [20]:
Ψ a , b ( ϕ ) = 1 a ψ ϕ b a
The relative contribution of the signal energy contained at a specific scale a and location b is given by the two dimensional wavelet energy density function [20]:
E ( a , b ) = T ( a , b ) 2
A plot of E ( a , b ) is known as a scalogram and highlights the location in scale and time of dominant energetic features within the signal coefficients. The scalogram can be integrated across a and b to recover the total energy in the signal using the admissibility constant, C g , as follows [20]:
E = 1 C g 0 T ( a , b ) 2 d a a 2 d b
The relative contribution to the total energy contained within the signal at a specific scale a is given by the scale dependent energy distribution [20]:
E ( a ) = 1 C g T ( a , b ) 2 d b
Since the term of frequency is reserved for the Fourier transform, the CWT is usually expressed in scales. It is possible to convert scales into frequencies via [20]:
f = f c a
where f is the characteristic or representative frequency associated with a wavelet of arbitrary scale a and where f c is the pass-band center of the mother wavelet.
Numerous families of wavelets exist; therefore, a trade-off is required with regard to how smooth and compact the appearance of a wavelet is with different time-frequency characteristics. The present study applies four of the most common continuous mother wavelets [23]:
  • Gaussian derivative wavelet (gaus):
    Ψ ( ϕ ) = C e ϕ 2
  • Mexican hat wavelet (mexh):
    Ψ ( ϕ ) = 2 3 π 4 e ϕ 2 2 ( 1 ϕ 2 )
  • Shannon wavelet (shan):
    Ψ ( ϕ ) = B sin ( π B ϕ ) π B ϕ e j 2 π C ϕ
  • Morlet wavelet (morl):
    Ψ ( ϕ ) = e ϕ 2 2 cos ( 5 ϕ )
After the scalograms obtained by applying the above mentioned wavelet families were compared, it appeared that the features of interest were best captured by the eighth Gaussian derivative wavelet (gaus8). The simplicity of this wavelet function also ensures a shorter computational time. The scale of the CWT varies from 0 to the maximum scale selected, and the specific maximum scale is expressed by the calculated entropy of the coefficients [24]:
H ( x ) = i = 1 n p i log p i
where H is the entropy of x, and p i is the probability of the ith class in x. Such quantities as presented in Equation (11) play a major role in information theory as measures of information, choice and uncertainty [24].

3.3. Knock Detection Based on CNN

This study uses a 2D CNN to detect the distinctive characteristics of engine knock with respect to both, time and scale dimensions in CWT coefficient data. This flexible approach is capable of approximating any type of linear or nonlinear transformation, including hard thresholding and scaling. Furthermore the filters do not have to be designed manually and are automatically learned by the algorithm [19]. Finally, inference in CNNs can be extremely fast thanks to parallel computing [10].
To detection knocking combustion, a CNN was applied that is similar to LeNet [25] and combines convolutional kernels with maximum pooling to learn high-level features. These convolution and pooling operations are simultaneously applied to time and scale (frequency) domains because the coefficients of each in-cylinder pressure trace contain patterns that are time- and frequency-related and essential for knock detection. Table 3 presents the CNN architecture with all the implemented convolutional, pooling, dropout and fully connected layers. The first convolutional layer has one input channel, eight output channels and a size of five. The first pooling layer has a kernel size of two and stride of two. A rectified linear activation function was chosen for all convolutional and fully connected layers apart from the last dense layer [26]. Here, a sigmoid activation function was defined. The last convolutional layer output is flattened into a one dimensional array and fed into a fully connected layer with 1024 units. After that a dropout layer is applied to better deal with overfitting and help to minimize binary cross-entropy loss. The output of this dense layer is fed into a second fully connected layer with 512 units after which a dropout layer is again introduced. The result is processed by the last dense layer, which decides whether it is a non-knocking or knocking cycle. For the set of coefficients, the b dimension is equal to the length of the slice window of the pressure trace represented in CA (here from 5 to 35 CA). A resolution of 0.1 means that 300 measurement points have been taken from time domain. Dimension a is defined by the maximum scale chosen for the CWT (100 for this study); this was obtained by analyzing the entropy of the coefficient scalograms. The input of the CNN, therefore, has a shape of 300 × 100 × 1. For all compiled models in this study the “Adam” optimizer [27] was implemented with a long-term memory option called “amsgrad” [28]. Keras and Tensorflow were used as backend to implement the CNN for this study [29,30].

4. Results

4.1. CWT Coefficients and Corresponding Scalogram

To determine an optimum value of scale, the relationship between the maximum scale and the entropy of the coefficients has to be analyzed. The following Figure 4 provides an example of the entropy plotted over a maximum scale ranging from 1 to 500 of the coefficients from the three pairs of cycles. Each pair was chosen from one measurement series, consisting of one non-knocking cycle and one knocking cycle. A uniform trend that shows a strong increase in entropy up to the scale of 100 is visible in all six diagrams. Even after this point, a continuing rise in entropy can be observed, though the characteristic of the curves is degressiv. After extensive testing, a maximum scale of 100 was determined to be appropriate for the current study and capable of ensuring good quality representation of the data.
Once the mother wavelet and the maximum scale are determined, the corresponding scalogram which represents the CWT coefficients simultaneously in the time and frequency domains, can be obtained. Figure 5, Figure A1 and Figure A2 show the two pressure traces and the resulting scalograms of two of the four nominated mother wavelets with a scale of 100. This two-dimensional feature space consists of a time measure on the x-axis in CA and a scale on the y-axis in kHz for the frequency domain where a power of two function plotted on a logarithmic axis was applied to yield a clearer visualization of the features [22]. The distinct features detected in the coefficients, that make a decisive contribution to the present classification task are located at higher frequency or low scale ranges. From approximately 3 kHz up to 20 kHz and above, the increased power within the scalogram becomes visible. This is in good agreement with the studies of Wang et al. [31,32]. Similar frequency ranges for various combustion modes were also reported by Vavra et al. [33]. We can see, that a non-knocking cycle has a different spectrum characteristic than a knocking cycle. Therefore, it is likely that an algorithm will be able to detect and learn these features and perform well with regard to classification. It can be observed that the distinct features are located in every scalogram of knocking combustion, independent from the applied mother wavelet. To maintain readability, the four other arbitrarily chosen signals of non-knock and knock with their corresponding scalograms were moved to Appendix A.

4.2. CNN Classification Results

All three datasets were used to train and test the algorithm. The required parameters of the CNN were adapted to meet the conditions of the size of the present data set. In particular, the dataset of every measurement series was randomly shuffled to ensure a stratification, i.e., that the same amount of cycles from every measurement series was guaranteed for training and testing procedures. A train/test split of 70/30 percent was applied. Since the learning process of this applied deep neural network is stochastic, a cross-validation is needed. Therefore, the training and testing procedure was performed ten times. The network was trained for 20 epochs with a batch size of 32. Keras callbacks were used for adaptive regulation of the learning rate, which reduce it to half of the actual rate when a plateau of test loss value was reached with a patience of 2 epochs. An initial learning rate value of 0.0006 was determined. The results obtained with the proposed approach are shown in Table 4.
The well-established MAPO criterion was selected as the reference criterion to distinguish knocking combustion cycles from non-knocking ones. This criterion is applied in a method called TVE [1], where the pressure trace is filtered by a band-pass or a high-pass filter E in the combustion time window [ ϕ , ϕ + Δ ϕ ] and it is verified whether the defined threshold is exceeded [18].
M A P O = p f i l t , m a x | ϕ ϕ + Δ ϕ
The advantage of this method is its simplicity. Convincing results may be obtained if the transition from non-knocking to knocking combustion is abrupt, which is not always the case. Nevertheless, it requires a predefined threshold that must be calibrated according to the dependent operating parameters of the engine [18]. In this study, the pressure traces were high-pass filtered and the threshold was determined by the highest possible agreement in comparison to the subjective assessment. This was implemented with a logistic regression algorithm provided by the scikit learn package [34], which yielded the most suitable threshold for every training and testing split. Table 4 compares the result from the two applied methods.
The test accuracy of the CWT + CNN method ranges from 90.91 to 93.58% as the best performance. The mean accuracy reaches 92.62%, keeping in mind that especially in cases when three votes were given for or against knock the possibility of misclassification cannot be entirely excluded. When a comparison is made of the results of the TVE method accuracy that ranges from 85.62 to 87.50% as the best performance with a mean of 86.47%, the superiority of the proposed method becomes apparent. In addition, the training accuracy of the CWT + CNN method reaches a remarkable range from 95.81 to 97.30% as the best performance. In comparison to these values the TVE method achieved an accuracy ranging from 85.62 to 87.05% as the best score. The remaining difference between the train and test loss of the CWT + CNN method indicates that overfitting has not completely disappeared.

4.3. Generalization to Unseen Engine Data

For an investigation of the generalized classification potential of the implemented methodology smaller cases were set up by not using all available data. These cases use one part of the data for training the CNN and the remaining part for testing. The nine cases selected for this investigation are listed in Table 5. Such an approach is necessary in order to judge the generalization potential. After receiving the CWT coefficients of the in-cylinder pressure signals as input, the CNN continues to process the data with the same network architecture as described in Section 4.2. The number of epochs was set to 20 with a batch size of 32 and the learning rate was again adapted with a reduction on plateau function by a factor of 0.5 and a patience of 2 epochs. A higher dropout regularization of 0.5 was introduced due to the significantly smaller amount of data for training than in Section 4.2.
Every case mentioned in Table 5 was conducted ten times. The mean and standard deviation values obtained are shown in Table 6.
These results show that the proposed approach requires a certain amount of data to suppress overfitting. Despite the introduction of a dropout regularization of 0.5, in most of the above cases this was not achieved with the CWT + CNN method. The results of Table 4 show a clear tendency for better performance with more and diverse data. Case six has the smallest amount of data for training the neural network and has therefore the worst performance by far. In addition, the last two cases (eight and nine) in Table 6 prove the great potential for training the algorithm so it detects knocking combustion effectively in unseen data. It is noticeable that for all applied cases the training accuracy of the proposed CWT + CNN method was superior to the TVE (MAPO) method.
Shahlari et al. [1] state that oscillation modes are a characteristic of the combustion chamber geometry and not unique to the knocking condition. Thus, to effectively detect knocking combustion without knowledge of the corresponding cycle data from the particular engine, data coming from a similar combustion chamber geometry must be used to train the neural network. By closely looking at Table 6, we can assume that Engine 3 combustion chamber is a completely different size than those of Engine 1 and Engine 2. Therefore, all cases that do not include data from Series 3 in training the neural network are very poor in accuracy with a high loss because the pattern of the time–frequency analysis is not recognized. The unequal distribution of non-knocking and knocking cycles within the dataset as shown in Table 2 is another problem that arises and plays a major role in this experiment. If we use all three datasets as was done in Section 4.2, the distribution is almost balanced.

4.4. Detailed Analysis

To further investigate the potential of classification, a promising algorithm from Case 2, shown in Table 5, was selected for a more detailed analysis. For assessment on how well our approach is calibrated we compared the knock probability from the CNN’s final sigmoid layer to the proportion of the specialists that declared the cycle knocking. We thus obtained a mapping to six ranges as shown in Figure 6 with the corresponding probability interval given in Table 7.
The achieved results are shown in Figure 7 and Figure 8, which present a bar chart and its corresponding confusion matrix, respectively. It is noticeable, that in 69% of the cycles ( 389 + 9 + 1 + 4 + 10 + 163 = 576 ) , the algorithm produced the same number of votes as the subjective assessment and there was not a single case in which, the algorithm had five votes and the subjective assessment had no votes and vice versa. These numbers prove that the neural network is capable of a similar level performance in classification as the five individual subjective specialists with experience in recognizing abnormal combustion phenomena.

5. Discussion

This study provides an appropriate case for applying new deep learning techniques and investigating whether these neural networks are capable of grasping human criteria for detecting knocking combustion.

5.1. Conditions of Dataset and Label Quality

With data-driven approaches, certain demands on the dataset have to be met to ensure satisfactory performance. In Section 4.3, it was shown that the amount of data used to train the neural network must be sufficiently large. In addition, the composition of data has to be balanced and include all possible classes desired in the classification task. The composition of data in this study is shown in Table 2. When all available cycles are used, as in Section 4.2, the ratio of non-knocking cycles to knocking ones is relatively balanced. When only fractions of the dataset are used as in Section 4.3, it can be observed that the method works best for cases where a larger amount of the data was used for training the neural network. On the contrary, the worst performance was obtained with the case with the smallest training set.
The labeling of the five individual specialists, described in Section 2 was fundamental for all research done in this study and provides a higher quality label that the ones usually applied.

5.2. Influence of Mother Wavelet and Scale Range

All four mother wavelets nominated for the CWT resulted in coefficient scalograms that showed a similar concentrated power representation in the areas of the expected dominant frequencies of the engines. The main difference between the scalograms is that for the “gaus8” and the “morl” wavelets the representative frequencies reach higher values, which means that the emphasis is on higher frequency bands. This is promising for analysis of high-frequency phenomena. On the other hand, the “mexh” and “shan” wavelet coefficients represent lower frequency bands with higher accuracy. Therefore, it is expected that the performance of the CNN varies depending on which type of wavelet family is implemented. Table 8 shows the obtained accuracies and losses for training and testing with exactly the same configuration of the CNN but a different mother wavelet.
The “gaus8” wavelet yielded the best results followed closely by the “morl” wavelet. The performances of the two other wavelet functions are far behind. This proves the assumption that was made and shows that for the analysis of knocking combustion, a clearer representation of high-frequency bands is necessary.
The entropy of the CWT coefficients changes with the mother wavelet. Figure 9 shows the curves of entropy obtained from the CWT with the same arbitrarily chosen cycle signal. The curve of the “gaus8” entropy reaches a respectable level of 4.5 at a maximum scale of 100 and after this point the increase of the curve is degressive. The “mexh” wavelet produce an entropy curve that reaches the comparable value at 150 maximum scale with a degressive curve from an earlier point on. When the “shan” wavelet is applied, a curve is obtained that reaches a point of entropy of 5 at a maximum scale of 200. After this, the curve continues also degressive. The “morl” wavelet has an entropy curve similar to that of the “shan” wavelet. Figure 9 shows that the entropy curves of all four mother wavelets that were tested vary within a small range. A similar distribution can be seen when a scale of 100 is chosen; all wavelets reached a respectable level of potential entropy by choosing a scale of 100. Therefore, this scale was used for the entire study.
With a maximum scale of 100 for obtaining the coefficients of the CWT, the proposed approach is computationally efficient enough to be implemented in real-time.

6. Conclusions

Two of the main research objectives of engine developers are increasing the efficiency of internal combustion engines and reducing CO 2 emissions. As a result, high-load operating points with higher compression ratios are becoming increasingly interesting in engine development. These conditions promote knocking combustion, which is especially challenging in large gas engines when they are operated close to stability margins. A better understanding and handling of this phenomenon significantly reduces CO 2 emissions. With an effective approach for detecting knocking combustion for a range of engines, a control strategy that handles this phenomenon is feasible. In this study, an approach was designed to detect knocking combustion by slicing the pressure trace to obtain relevant information from the signal, applying the CWT and using the resulting coefficients as input for a CNN, which extracts features and classifies the combustion as non-knocking and knocking. The obtained results demonstrated the following: (i) The CWT provided a feature space that is not sensitive to a particular mother wavelet with time- and frequency-related information as input for the CNN, making successful detection of knocking combustion possible; (ii) the classification of non-knocking and knocking combustion performed by the CWT and the CNN yielded an overall accuracy of 92.62% in comparison to 86.47% obtained from the TVE method with an applied, optimized MAPO criterion derived from a logistic regression algorithm. Thus, great progress was made as the overall accuracy improved by 6.15 percentage points; and (iii) the necessity of an operation-based parameter calibration to determine a suitable threshold is no longer mandatory as long as enough and diverse training data are used.
Future work on the proposed approach will consist of training the neural network on a large amount of measurement data from various configurations and engine types in order to produce a trained neural network capable of universally detecting knocking combustion in numerous cases. Real-time implementation on a test rig is also of interest. In addition, the possibility of optimizing the neural networks and their parameters by Automated Machine Learning (AutoML) methods will be considered.
A further investigation should be conducted of the combustion events as a time series to determine the possibility of forecasting future events by looking at present cycle data.

Author Contributions

Conceptualization, A.K.; data curation, G.P.; funding acquisition, A.W.; investigation, A.K.; methodology, A.K., A.B.O. and B.C.G.; supervision, G.P., S.P., B.C.G.; validation, A.K. and B.C.G.; writing—original draft preparation, A.K.; writing—review and editing, A.K., A.B.O., B.C.G. and G.P. All authors have read and agreed to the published version of the manuscript.

Funding

Open Access Funding by the Graz University of Technology.

Acknowledgments

The authors acknowledge the financial support of the Austrian COMET—Competence Centers for Excellent Technologies—Programme of the Austrian Federal Ministry for Climate Action, Environment, Energy, Mobility, Innovation and Technology, the Austrian Federal Ministry for Digital and Economic Affairs, and the States of Styria, Upper Austria, Tyrol, and Vienna for the COMET Centers Know-Center and LEC EvoLET, respectively. The COMET Programme is managed by the Austrian Research Promotion Agency (FFG).

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
CACrank angle
CNNConvolutional neural network
CWTContinuous wavelet transformation
DWTDiscrete wavelet transformation
MAPOMaximum amplitude of pressure oscillation
OPOperating points
SISpark-ignition
SDStandard deviation

Appendix A

Figure A1. Pressure traces with ‘gaus8’ and ‘mexh’ scalograms.
Figure A1. Pressure traces with ‘gaus8’ and ‘mexh’ scalograms.
Energies 14 00439 g0a1
Figure A2. Pressure traces with ‘gaus8’ and ‘mexh’ scalograms.
Figure A2. Pressure traces with ‘gaus8’ and ‘mexh’ scalograms.
Energies 14 00439 g0a2

References

  1. Shahlari, A.J.; Ghandhi, J.B. A Comparison of Engine Knock Metrics; SAE Technical Paper 2012320007; SAE International: Warrendale, PA, USA, 2012. [Google Scholar]
  2. Pischinger, R.; Klell, M.; Sams, T. Thermodynamik der Verbrennungskraftmaschine; Springer: NewYork, NY, USA; Wien, Austria, 2009; pp. 110–112. [Google Scholar]
  3. Heywood, J.B. Internal Combustion Engine Fundamentals; McGraw-Hill: New York, NY, USA, 1988. [Google Scholar]
  4. Zhen, X.; Wang, Y.; Xu, S.; Zhu, Y.; Tao, C.; Xu, T.; Song, M. The engine knock analysis—An overview. Appl. Energy 2012, 92, 628–636. [Google Scholar] [CrossRef]
  5. Cho, S.; Park, J.; Song, C.; Oh, S.; Lee, S.; Kim, M.; Min, K. Prediction Modeling and Analysis of Knocking Combustion using an Improved 0D RGF Model and Supervised Deep Learning. Energies 2019, 12, 844. [Google Scholar] [CrossRef] [Green Version]
  6. Chollet, F. Deep Learning with Python; Manning Publications Co.: Shelter Island, NY, USA, 2018; pp. 119–177. [Google Scholar]
  7. Gou, L.; Li, H.; Zheng, H.; Li, H.; Pei, X. Aeroengine Control System Sensor Fault Diagnosis Based on CWT and CNN. Math. Probl. Eng. 2020, 2020, 5357146. [Google Scholar] [CrossRef] [Green Version]
  8. He, R.; Wang, K.; Zhao, N.; Liu, Y.; Yuan, Y.; Li, Q.; Zhang, H. Automatic Detection of Atrial Fibrillation Based on Continuous Wavelet Transform and 2D Convolutional Neural Networks. Front. Physiol. 2018, 9, 1206. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  9. Lee, H.K.; Choi, Y.-S. A convolution neural networks scheme for classification of motor imagery EEG based on wavelet time-frequecy image. In Proceedings of the 2018 International Conference on Information Networking (ICOIN), Chiang Mai, Thailand, 10–12 January 2018; pp. 906–909. [Google Scholar] [CrossRef]
  10. Zhao, L.; Li, Q.; Zhang, Y.; Wang, H.; Du, X. Integrating the Continuous Wavelet Transform and a Convolutional Neural Network to Identify Vineyard Using Time Series Satellite Images. Remote Sens. 2019, 11, 2641. [Google Scholar] [CrossRef] [Green Version]
  11. Zhao, Z.; Liu, C.; Li, Y.; Li, Y.; Wang, J.; Lin, B.; Li, J. Noise Rejection for Wearable ECGs Using Modified Frequency Slice Wavelet Transform and Convolutional Neural Networks. IEEE Access 2019, 7, 34060–34067. [Google Scholar] [CrossRef]
  12. Gong, M.; Yang, H.; Zhang, P. Feature Learning and Change Feature Classification Based on Deep Learning for Ternary Change Detection in SAR Images. ISPRS J. Photogramm. Remote Sens. 2017, 129, 212–225. [Google Scholar] [CrossRef]
  13. Borg, J.; Cheok, K.; Saikalis, G.; Oho, S. Knock Signal Analysis Using the Discrete Wavelet Transform; SAE Technical Paper, 2006-01-0226; SAE International: Warrendale, PA, USA, 2006. [Google Scholar] [CrossRef]
  14. Zhang, Z.; Tomota, E. A New Diagnostic Method of Knocking in a Spark-Ignition Engine Using the Wavelet Transform; SAE Technical Paper 2000-01-1801; SAE International: Warrendale, PA, USA, 2000. [Google Scholar] [CrossRef]
  15. Noubari, H.; Dumont, G. Towards an Improved Knock Detection and Quantification Using Wavelets and Entropy-Based Noise Compensation; SAE Technical Paper 2005-01-2269; SAE International: Warrendale, PA, USA, 2005. [Google Scholar] [CrossRef]
  16. Borg, J.; Cheok, K.; Saikalis, G.; Oho, S. Wavelet-based knock detection with fuzzy logic. In Proceedings of the CIMSA—2005 IEEE International Conference on Computational Intelligence for Measurement Systems and Applications, Giardini Naxos, Italy, 20–22 July 2005. [Google Scholar]
  17. Merker, G.; Schwarz, C. Grundlagen Verbrennungsmotoren: Simulation der Gemischbildung, Verbrennung, Schadstoffbildung und Aufladung; Springer Nature: Wiesbaden, Germany, 2009; pp. 864–865. [Google Scholar]
  18. Kirsten, M. Detektion Klopfender Verbrennung in Diesel/Erdgas-Dual-Fuel-Motoren. Ph.D. Thesis, Technische Universität Graz, Institut für Verbrennungskraktmaschinen und Thermodynamik, Graz, Austria, 2016; pp. 9–45. [Google Scholar]
  19. Taspinar, A. A Guide for Using the Wavelet Transform in Machine Learning. December 2018. Available online: http://ataspinar.com/2018/12/21/a-guide-for-using-the-wavelet-transform-in-machine-learning/ (accessed on 7 December 2020).
  20. Addison, P.S. The Illustrated Wavelet Transform Handbook: Introductory Theory and Applications in Science, Engineering, Medicine and Finance; CRC Press: Boca Raton, FL, USA, 2017; pp. 6–63. [Google Scholar]
  21. Rhif, M.; Ben Abbes, A.; Farah, I.R.; Martínez, B.; Sang, Y. Wavelet Transform Application for/in Non-Stationary Time-Series Analysis: A Review. Appl. Sci. 2019, 9, 1345. [Google Scholar] [CrossRef] [Green Version]
  22. Gallarda, B.; Sharpee, T.; Pfaff, S.; Alaynick, W. Defining rhythmic locomotor burst patterns using a continuous wavelet transform. Ann. N. Y. Acad. Sci. 2010, 1198, 0077–8923. [Google Scholar] [CrossRef] [PubMed]
  23. Lee, G.; Gommers, R.; Wasilewski, F.; Wohlfahrt, K.; O’Leary, A. PyWavelets: A Python package for wavelet analysis. J. Open Source Softw. 2019, 4, 1237. [Google Scholar] [CrossRef]
  24. Shannon, C. A Mathematical Theory of Communication, 1963; MD Comput; Board of Trustees of the University of Illinois Manufactured in the United States of America: Urbana, IL, USA, 1998; Volume 14, pp. 306–317. [Google Scholar]
  25. Lecun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef] [Green Version]
  26. Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet Classification with Deep Convolutional Neural Networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
  27. Kingma, D.; Ba, A. A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
  28. Reddi, S.; Kale, S.; Kumar, S. On the Convergence of Adam and Beyond. arXiv 2019, arXiv:1904.09237. [Google Scholar]
  29. Chollet, F. Others Keras. 2015. Available online: https://keras.io (accessed on 12 December 2020).
  30. Abadi, M.; Barham, P.; Chen, J.; Chen, Z.; Davis, A.; Dean, J.; Devin, M.; Ghemawat, S.; Irving, G.; Isard, M.; et al. TensorFlow: A system for large-scale machine learning. In Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), Savannah, GA, USA, 2–4 November 2016; pp. 265–283. Available online: https://www.usenix.org/system/files/conference/osdi16/osdi16-abadi.pdf (accessed on 7 May 2020).
  31. Wang, Z.; Liu, H.; Reitz, R.D. Knocking combustion in spark-ignition engines. Prog. Energy Combust. Sci. 2017, 61, 78–112. [Google Scholar] [CrossRef]
  32. Wang, Z.; Wang, Y.; Reitz, R.D. Pressure oscillation and chemical kinetics coupling during knock processes in gasoline engine combustion. Energy Fuels 2012, 26, 7107–7119. [Google Scholar] [CrossRef]
  33. Vavra, J.; Bohac, S.V.; Manofsky, L.; Lavoie, G.; Assanis, D.N. Knock in Various Combustion Modes in a Gasoline-Fueled Automotive Engine. In Proceedings of the ASME 2011 Internal Combustion Engine Division Fall Technical Conference, Morgantown, WV, USA, 2–5 October 2011; pp. 441–450. [Google Scholar] [CrossRef]
  34. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
Figure 1. Examples of six arbitrarily chosen in-cylinder pressure traces.
Figure 1. Examples of six arbitrarily chosen in-cylinder pressure traces.
Energies 14 00439 g001
Figure 2. Flowchart of continuous wavelet transformation (CWT) + CNN approach.
Figure 2. Flowchart of continuous wavelet transformation (CWT) + CNN approach.
Energies 14 00439 g002
Figure 3. Pressure trace slice.
Figure 3. Pressure trace slice.
Energies 14 00439 g003
Figure 4. Entropies determined by applying “gaus8” mother wavelet on the six arbitrary signals.
Figure 4. Entropies determined by applying “gaus8” mother wavelet on the six arbitrary signals.
Energies 14 00439 g004
Figure 5. Pressure traces with “gaus8” and “mexh” CWTs.
Figure 5. Pressure traces with “gaus8” and “mexh” CWTs.
Energies 14 00439 g005
Figure 6. Decision mapping for comparison of votes given by algorithm and subjective assessment.
Figure 6. Decision mapping for comparison of votes given by algorithm and subjective assessment.
Energies 14 00439 g006
Figure 7. Bar chart of disagreement on number of votes given from algorithm in comparison to subjective assessment.
Figure 7. Bar chart of disagreement on number of votes given from algorithm in comparison to subjective assessment.
Energies 14 00439 g007
Figure 8. Confusion matrix showing the number of votes.
Figure 8. Confusion matrix showing the number of votes.
Energies 14 00439 g008
Figure 9. Entropies obtained from CWT for one cycle with different mother wavelets.
Figure 9. Entropies obtained from CWT for one cycle with different mother wavelets.
Energies 14 00439 g009
Table 1. Confidential, characteristic engine data.
Table 1. Confidential, characteristic engine data.
CharacteristicsEngine 1Engine 2Engine 3
Cylinder HeadHead AHead BHead C
PistonPiston APiston APiston C
Compression RatioRatio ARatio BRatio C
IgnitionIgnition AIgnition AIgnition B
Spark PlugSpark Plug ASpark Plug BSpark Plug C
Ignition TimeVariationVariationVariation
Electrode DistanceDistance ADistance ADistance A
Pre-ChambernoPre-chamber APre-chamber B
Table 2. Dataset structure and distribution of knocking cycles.
Table 2. Dataset structure and distribution of knocking cycles.
Measurement SeriesEngineOPCycles per OP# Cycles# Knock% Knock
Series 1Engine 1146084030636.43
Series 2Engine 2151001500107771.80
Series 3Engine 396054020237.41
Sum-38-2880158555.04
Table 3. CNN architecture.
Table 3. CNN architecture.
Layer (Type)Output ShapeKernel SizeParam
Input Layer(None, 300, 100, 1)-0
Conv2D(None, 296, 96, 8)(5,5)208
Max_Pooling2D(None, 148, 48, 8)(2,2)0
Conv2D(None, 144, 44, 16)(5,5)3216
Max_Pooling2D(None, 72, 22, 16)(2,2)0
Flatten(None, 25,344)-0
Dense(None, 1024)-25,953,280
Dropout(None, 1024)-0
Dense(None, 512)-524,800
Dropout(None, 512)-0
Dense(None, 2)-1026
Total params: 26,482,530; trainable params: 26,482,530; non-trainable params: 0.
Table 4. Repeated random sub-sampling validation of CWT + CNN and threshold value exceeded (TVE) (MAPO) methods.
Table 4. Repeated random sub-sampling validation of CWT + CNN and threshold value exceeded (TVE) (MAPO) methods.
CWT + CNNTVE (MAPO)
Model No.Train LossTrain Acc.Test LossTest Acc.Train Acc.Test Acc.
10.07960.97250.19260.93580.86510.8669
20.07720.96880.18320.92880.87050.8611
30.08340.96450.18070.93520.85620.8623
40.06740.97300.21250.92480.85660.8704
50.09840.96630.21560.90910.86360.8738
60.07270.97150.19760.93170.86060.8680
70.10080.95980.19210.90970.86210.8704
80.10300.95810.18100.92770.86310.8646
90.06340.97820.16280.93290.85520.8657
100.10090.96010.18820.92590.87500.8438
Mean0.08470.96730.19060.92620.86280.8647
SD0.01500.00670.01560.00950.00630.0083
Table 5. Cases for investigation of generalization.
Table 5. Cases for investigation of generalization.
CaseTrainTest
1Series 1Series 2
2Series 2Series 1
3Series 1Series 3
4Series 3Series 1
5Series 2Series 3
6Series 3Series 2
7Series 1 and Series 2Series 3
8Series 1 and Series 3Series 2
9Series 2 and Series 3Series 1
Table 6. Comparison of repeated learning for CWT + CNN and TVE (MAPO) methods.
Table 6. Comparison of repeated learning for CWT + CNN and TVE (MAPO) methods.
CWT + CNNTVE (MAPO)
CaseTrain LossTrain Acc.Test LossTest Acc.Train Acc.Test Acc.
MeanSDMeanSDMeanSDMeanSDMeanMean
10.12130.01750.94900.00770.28190.04890.88570.01460.92140.9140
20.06960.02090.97310.00990.24140.02190.91590.00840.93530.9131
30.13730.01090.94310.00541.75010.48310.59730.07680.92140.6148
40.11310.01170.94780.00750.80750.16670.73100.01670.93330.7131
50.12110.00680.95000.00472.94490.60420.47270.03790.93530.6741
60.11610.01960.94830.01093.38660.85410.36980.03830.93330.4253
70.12610.01170.94860.00662.48930.64170.49080.04460.93160.6481
80.08400.02200.96820.01170.66490.06230.78790.01960.81590.6380
90.05120.01640.98170.00680.26080.03540.91800.00540.84410.8738
Table 7. Number of votes in favor of knock with corresponding probability ranges.
Table 7. Number of votes in favor of knock with corresponding probability ranges.
# Votes in Favor KnockProbability Range
0 p 0.1
1 0.1 < p 0.3
2 0.3 < p 0.5
3 0.5 < p 0.7
4 0.7 < p 0.9
5 0.9 p
Table 8. Comparison of results using different wavelet families for training and testing the CNN.
Table 8. Comparison of results using different wavelet families for training and testing the CNN.
Wavelet FamilyTrain LossTrain AccuracyTest LossTest Accuracy
gaus80.07770.96870.20230.9310
mexh0.08750.96230.42670.8416
morl0.08190.96870.22520.9190
shan0.08630.96630.44310.8345
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kefalas, A.; Ofner, A.B.; Pirker, G.; Posch, S.; Geiger, B.C.; Wimmer, A. Detection of Knocking Combustion Using the Continuous Wavelet Transformation and a Convolutional Neural Network. Energies 2021, 14, 439. https://doi.org/10.3390/en14020439

AMA Style

Kefalas A, Ofner AB, Pirker G, Posch S, Geiger BC, Wimmer A. Detection of Knocking Combustion Using the Continuous Wavelet Transformation and a Convolutional Neural Network. Energies. 2021; 14(2):439. https://doi.org/10.3390/en14020439

Chicago/Turabian Style

Kefalas, Achilles, Andreas B. Ofner, Gerhard Pirker, Stefan Posch, Bernhard C. Geiger, and Andreas Wimmer. 2021. "Detection of Knocking Combustion Using the Continuous Wavelet Transformation and a Convolutional Neural Network" Energies 14, no. 2: 439. https://doi.org/10.3390/en14020439

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop