Determination of Weak Knock Characteristics for Two-Stroke Spark Ignition UAV Engines Based on Mallat Decomposition Algorithm

Two-stroke spark ignition (SI) unmanned aerial vehicle (UAV) engines do not allow heavy knock and require a certain knock safety margin. However, weak knock can help the engine increase power output and reduce fuel consumption. To accurately extract the knock characteristics of engine vibration signals under the condition of weak knock, a signal feature extraction method based on the Mallat decomposition algorithm was proposed. Mallat decomposition algorithm can decompose the signal into two parts: a low-frequency signal and a high-frequency noise signal. The decomposed high-frequency noise is eliminated, and the low-frequency signal is retained as the characteristic domain signal. Simulation results show the effectiveness of the proposed algorithm. The engine vibration signal of a two-stroke SI UAV engine was decomposed into the low-frequency signal and the high-frequency signal by the Mallat decomposition algorithm. The low-frequency signal is taken as the knock characteristic domain signal component, and the wavelet packet energy method is used to verify the correctness of the obtained signal component. The relative energy parameter is calculated by using the knock characteristic domain signal component, which can be used as the determination index of knock intensity. This method provides a reference for the weak knock control of two-stroke SI UAV engines.


Introduction
Fuel-powered UAVs have been widely applied in agricultural, forestry, plant operations, and military due to their simple structure, easy control, steady running, and landform independence [1]. Two-stroke SI engines are widely used in the field of UAVs because of the advantages of high specific power, simple structure, small size, low manufacturing cost, and easy maintenance [2].
For SI engines, knock is a characteristic abnormal combustion phenomenon. In the heavy knock study using highspeed photography, it was found that the unburned mixture away from the spark plug would be compressed due to the expansion of the burning mixture during the flame propagation. As a result, due to the action of thermal radiation, the local temperature exceeds the spontaneous combustion temperature of the fuel, which causes the spontaneous combustion reaction to occur, thus forming one or more flame cores. Flame propagation speed exceeds 200-1000 m/s. e pressure shock waves generated by high-speed knock combustion in the cylinder reflect and repeatedly impact the cylinder wall, causing forced vibration and high-frequency noise. e impact of pressure wave thins the air film and increases the heat loss to the cylinder wall. As a result, power decreases, fuel consumption increases, the engine block overheats, and the temperature of the cooling water and oil rises. Heavy knock will damage the oil film on the cylinder wall, aggravate the wear of the cylinder wall, and even damage the parts [3,4]. Two-stroke SI UAV engines are not allowed to have the heavy knock and need to set a certain knock safety margin. erefore, heavy knock has become one of the major obstacles to the development of two-stroke SI UAV engines.
When the SI engine works in the weak knock state, the combustion process is close to the constant volume process, and the engine's power and economy are improved [5]. erefore, knock control aims to make the engine work in the weak knock state. And the accurate detection and identification of knock state is the precondition of knock control for two-stroke SI UAV engines. At present, the main method to detect knock is to measure cylinder pressure or engine vibration.
In the process of knock, pressure waves bounce back and forth within the combustion boundary at the speed of sound and thus oscillate in the combustion chamber [6]. Finally, the oscillation is transmitted to the combustion chamber wall, causing the engine cylinder to vibrate at a certain frequency. Measuring cylinder pressure signal with a cylinder pressure sensor is the most direct monitoring method of knock state, which can accurately and sensitively identify engine knock. However, cylinder pressure sensors are very expensive and not suitable for practical engineering applications.
e indirect knock detection method uses the vibration acceleration sensor to measure the response of the engine body under knock excitation and processes the measured vibration signals to highlight the knock characteristics. Compared with the direct method, this detection method does not need to invade the cylinder and does not affect the combustion. e vibration acceleration sensor is easy to install and does not need to modify the engine structure. e sensor has a long life and is relatively cheap. erefore, this method has become a research hotspot [7].
However, the disadvantage of the indirect method is also obvious. ere is a lot of noise interference in the engine vibration signals collected by the vibration acceleration sensor because these signals come from the superposition of multiple excitations. ese noises will interfere with the engine knock detection process and affect the accuracy of the results, especially for weak knock conditions. Because the knock excitation signal is weak in energy, it is easy to be covered by the noise signal, resulting in errors in the detection process. erefore, how to improve the signal-tonoise ratio (SNR) and reduce the influence of noise signal on the detection accuracy is the first problem to be solved when using engine vibration signals for knock detection. erefore, it is of great significance in engineering to effectively utilize the signal processing method and analyze engine vibration signals to distinguish the knock state, especially the weak knock state [8][9][10][11][12].
Signal transform technology is a useful tool for knock feature extraction methods, such as short-time Fourier transform (STFT [13]), Wigner-Ville distribution (WVD [14]), and wavelet transform [15][16][17], which have been applied to analyze engine vibration signals for knock detection in the past decades.
Considering the resonance vibration of the engine caused by knock shock, the vibration signal obtained has the characteristics of nonstationary and nonlinear in nature. STFT and WVD can process nonstationary signals. However, the computational intensity of their time-frequency representation in two-dimensional space limits their implementation in real-time applications. Wavelet transform is a popular time-frequency analysis tool. It is widely concerned with the extraction of transient features from complex signal backgrounds and the identification of mechanical faults at the initial stage.
In recent years, wavelet transform has been widely used in knock feature extraction due to its multiresolution characteristics and its ability to represent local features of signals in both time and frequency domains [18,19]. Mallat algorithm is a fast algorithm for decomposition and reconstruction of the wavelet transform, which is based on the theory of multiresolution analysis. Mallat algorithm is as important in wavelet transform as FFT is in Fourier transform. It can greatly reduce the computation of wavelet transform and is beneficial to the processing of nonstationary signals with low SNR. By selecting the appropriate decomposition coefficient, more useful signal information can be retained, noise component can be reduced, and timefrequency resolution can be effectively improved [20]. Mallat algorithm includes Mallat decomposition algorithm and Mallat reconstruction algorithm.
In this paper, the Mallat decomposition algorithm is used to separate the engine vibration signals of the twostroke SI UAV engine, and the knock characteristic domain signal component is extracted effectively. is component can be used to calculate the relative energy parameter as an index to evaluate the knock intensity, which lays a foundation for knock identification.

Method
Since the scale and time migration of the wavelet transform is continuous, it is necessary to discretize the decomposition scale and migration of wavelet transform for the convenience of software implementation and engineering application. To reduce the amount of computation, Mallat decomposition algorithm is adopted in this paper to separate the vibration signals of the two-stroke SI UAV engine, and the signal components in the weak knock characteristic domain are obtained. e multiresolution analysis (MRA) was proposed by Stéphane Mallat and Yves Meyer. MRA not only provides a simple method for constructing orthogonal wavelet basis but also provides a theoretical basis for Mallat algorithm, a fast algorithm for orthogonal wavelet transform. Mallat decomposition algorithm can decompose signals at multiple levels. Its basic principle is that the decomposed high-frequency signal components are convolved with the wavelet coefficients and the high-pass filter, and the remaining lowfrequency signal components are transmitted to the next horizontal similar decomposition. e basic idea of the Mallat decomposition algorithm is as follows.
It is assumed that the signal f(t) is the engine vibration signal under the weak knock state to be processed. e signal f(t) ∈ L 2 (R) under resolution 2 j is decomposed into A j f(t) and D j f(t), where j is the number of decomposition layers. e discrete approximation of f(t) under resolution 2 j to A j f(t) is the wavelet coefficient of the low-frequency part of the engine vibration signal. e detailed part of f(t) under resolution 2 j to D j f(t) is the wavelet coefficient of the engine vibration signal in the high-frequency part of layer j.
e discrete approximation of f(t) under resolution 2 j− 1 to A j−1 f(t) can be obtained by filtering A j f(t) with a discrete low-pass filter H. e detailed part of f(t) under resolution 2 j− 1 to D j−1 f(t) can be obtained by filtering D j f(t) with discrete high-pass filter G. After removing the high-frequency coefficient of layer j decomposed from f(t), the lowfrequency coefficient is retained. Mallat decomposition algorithm is used to reconstruct the low-frequency coefficients to obtain the characteristic signal components containing weak knock information.
When the scale function ∅(t) of multiresolution analysis is determined, the wavelet function φ(t) can be constructed. If the scaling function is orthogonal, the multiresolution analysis is orthogonal multiresolution. en, the discrete approximation A j f(t) and the detailed part D j f(t) can be expressed as [21] In equations (1) and (2), c j,k and d j,k are rough coefficient and detail coefficient under 2 j resolution, respectively.
According to the decomposition principle of the Mallat decomposition algorithm, According to the biscale equation of scale function, the following equation can be obtained: By substituting m ′ � 2k + i, equation (7) can be written as According to the orthonormal property of ∅ j,k (t), the inner product of both sides with ∅ j,m (t) can be obtained: Take the complex conjugate to get Similarly, from the two-scale equation of the wavelet function, the following equation can be obtained: e inner product of both sides of equation (11) Take the complex conjugate to get Take the inner product of both sides of equation (6) with the relevant function. According to orthogonality, the following important conclusions can be drawn: (1) Take the inner product with ∅ j−1,k (t) on both sides of equation (6) and combine it with equation (10) to get (2) Take the inner product with ∅ j−1,k (t) on both sides of equation (6) and combine with equation (13) to obtain (3) Take the inner product with ∅ j,k (t) on both sides of equation (6) and combine with equations (10) and (13) to obtain Mathematical Problems in Engineering en, equations (14)- (16) can be abbreviated as In equation (17), j � 0, 1, . . . , J.

Simulation Experiment
To verify the effectiveness of the Mallat decomposition algorithm in extracting characteristic domain signals, a simulation experiment is designed. In the simulation experiment, Mallat decomposition algorithm decomposed a simulation signal S(t) into two layers. e simulation signal S(t) is composed of a source signal k(t) and noise signal N.
To intuitively analyze the decomposition results of the Mallat decomposition algorithm, the source signal k(t) used in this paper is a sinusoidal signal.
In equation (18), frequency f is 20 Hz and the sampling frequency is 2000 Hz. e time-domain diagram of the simulation signal component k(t) is shown in Figure 1.
k(t) is the sinusoidal signal with amplitude 4. Add the noise signal N to the simulation signal component k(t) to obtain the simulation signal S(t). e noise signal N is a normally distributed white noise, which has a mean of 0 and a variance of 0.4. e time-domain diagram of the noise signal N is shown in Figure 2. e time-domain diagram of the simulation signal S(t) is shown in Figure 3.
Mallat decomposition algorithm was used for the twolayer decomposition of the simulated signal S(t). e wavelet function db2 was used to decompose the simulated signal S(t), and the effective component k′(t) and the noise component N ′ were obtained, respectively. e time-domain diagram of the effective component k ′ (t) is shown in Figure 4. e time-domain diagram of the noise component N ′ is shown in Figure 5.
As can be seen from Figures 4 and 5, Mallat decomposition algorithm can decompose the simulated signal S(t) to obtain two signal components, namely, the low-frequency component k ′ (t) and the high-frequency component N ′ , among which the low-frequency component k ′ (t) is the sinusoidal signal. e magnitude of N ′ is between −0.2 and 0.2, which is consistent with the noise signal N. e magnitude of k ′ (t) is increased. e low-frequency component k ′ (t) is processed with FFT to obtain its frequency-domain diagram, as shown in Figure 6. As shown in Figure 6, the frequency of the separated sinusoidal signal is 20 Hz, consistent with that of the source signal.
e simulation results show that Mallat decomposition algorithm can be used to separate the simulation signal, which can filter out most of the noise components and get the characteristic signal components effectively.

Test Engine.
In this paper, an experimental study of a two-cylinder two-stroke SI piston engine has been carried out. e main structure of the engine includes the intake system, the fuel supply system, and the electronic control system. Table 1 shows the test engine specifications.

Test Bench.
e engine test bench layout and test bench image are shown in Figures 7 and 8, respectively. An acceleration sensor is used to collect engine vibration signals, and a spark plug cylinder pressure sensor is used to collect cylinder pressure signals. During the experiment, cylinder pressure signals and engine vibration signals are recorded by a high-speed data acquisition instrument. e sampling frequency is set to 200 kHz to maintain the high-frequency characteristics of signals.

Analysis of Test Results
e peak value of the cylinder pressure signal curve increases with the increase of knock intensity and is accompanied by obvious high-frequency oscillation. erefore, the highfrequency oscillation can indicate the knock intensity [22,23]. Figure 9 shows the cylinder pressure signals obtained by the cylinder pressure sensor when the engine has heavy knock or nonknock. Figure 9(a) shows the cylinder pressure signal obtained under the condition of heavy knock, and Figure 9(b) shows the cylinder pressure signal obtained under the condition of nonknock. In this paper, the high-frequency oscillation of the engine cylinder pressure signal is used to judge the knock intensity of the engine vibration signal. erefore, cylinder pressure signals and engine vibration signals are collected synchronously. e engine speed is 5000 rpm, and the inlet air temperature is 301 K when cylinder pressure signals and engine vibration signals are collected. A self-developed electronic control unit (ECU) is used to control the engine working parameters such as fuel injection pulse width, fuel injection timing angle, and ignition timing angle freely. e ignition timing angle is controlled to change the state of knock.

e Result of One Engine Working Cycle of 25°CA Ignition
Advance Angle. Figure 10 shows the cylinder pressure signal and the engine vibration signal collected synchronously during a working cycle when the ignition advance angle of the test engine is 25°CA. In Figure 10(a), the intensity of high-frequency pressure oscillations is between nonknock and heavy knock, so it can be determined that the engine vibration signal in Figure 10(b) is the signal collected at the state of weak knock.
Mallat decomposition algorithm was used to separate the engine vibration signal shown in Figure 10(b). e two-layer decomposition of the signal is performed by using the wavelet function db2. e engine vibration signal is decomposed into the low-frequency signal component and the high-frequency noise signal component, as shown in Figures 11 and 12, respectively. As can be seen from Figure 11, the amplitude of the low-frequency signal component increases, and some noise in the engine vibration signal is reduced. FFT is used to process the low-frequency signal components, and the frequency-domain figure obtained is shown in Figure 13.
In Figure 13, the characteristic frequency of weak knock in one working cycle is 3027 Hz when the ignition advance angle is 25°CA at 5000 rpm.

e Result of One Engine Working Cycle of 27°CA Ignition
Advance Angle. At 5000 rpm, when the ignition advance angle is 27°CA, the cylinder pressure signal and the engine vibration signal of one working cycle are obtained   synchronously, as shown in Figures 14(a) and 14(b), respectively. According to the high-frequency oscillation of the cylinder pressure signal in Figure 14(a), it can be seen that the cylinder pressure signal is in the state of weak knock. erefore, it can be concluded that the engine vibration signal in Figure 14(b) is in the state of weak knock.
Mallat decomposition algorithm is used to decompose the engine vibration signal shown in Figure 14   e low-frequency signal component shown in Figure 15 was analyzed by FFT, and the frequency-domain figure was obtained as shown in Figure 17. As can be seen in Figure 17, the characteristic frequency of the engine is 3125 Hz when the ignition advance angle is 27°CA at 5000 rpm.

Verification of Algorithm.
To verify the validity of the Mallat decomposition algorithm, wavelet packet energy method was used to extract the characteristic domain signal from the engine vibration signal. e engine vibration signal in Figures 10(b) and 14(b) was decomposed to obtain 8 signal components, respectively, as shown in Figure 18. e energy percentages of 8 signal components in Figures 18(a) and 18(b) were calculated, respectively, and the results are shown in Figure 19.
As can be seen from Figures 19(a) and 19(b), S(3, 0) and S ′ (3, 0) have the largest energy percentage and are taken as the characteristic signal components. Using FFT to conduct analysis of S(3, 0) and S ′ (3, 0), frequency-domain diagrams are obtained as shown in Figure 20.
It can be seen from Figures 20(a) and 20(b) that the characteristic frequencies of engine vibration signals at the ignition advance angle of 25°CA and 27°CA are 3027 Hz and 3125 Hz, respectively, which are consistent with the characteristic frequencies in Figures 13 and 17. So, it can be proved that Mallat decomposition algorithm is correct to extract the knock characteristic domain signal.

Calculation of Knock Intensity.
e characteristic domain signals obtained by the Mallat decomposition algorithm at the ignition advance angle of 25°CA and 27°CA are shown in Figures 11 and 15, respectively. By means of the characteristic domain signal, the knock intensity can be calculated by using the relative energy parameter.
where a i is the engine vibration signal, x i is the characteristic domain signal, and n is the number of points of the signal. e knock intensity of the engine vibration signal in Figures 12(b) and 14  signal in the weak knock state. is component can be used to calculate the relative energy parameters, which can be used to describe the knock intensity and lay a foundation for the control of weak knock.

Conclusion
Mallat decomposition algorithm was used to separate the engine vibration signal, and the knock characteristic domain signal component was obtained. Wavelet packet energy method was used to verify the results. e knock characteristic domain signal component can be used to calculate the relative energy parameters of knock, which can provide the basis for knock control. In summary, Mallat decomposition algorithm can effectively extract the weak knock characteristics of engine vibration signals. is method is simple and efficient, which lays an important foundation for the weak knock control of two-stroke SI UAV engines.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare no conflicts of interest.