## 4 Biodiesel Fuels
In diesel engines, knocking mainly occurs due to (i) high ignition delay (i.e., long time gap between the fuel injection and combustion); and (ii) sudden impacts exerted on the cylinder head during opening-closure, imposed by large valve clearance. In a related effort, [PERSON] et al. [60] studied the correlation between biodiesel concentration and combustion, vibration, and knocking, in single- and six-cylinder diesel engines. Six biodiesel-diesel fuel blends were prepared using waste cooking oil, according to ASTM D6751-09 standard: D100 (pure petrodiesel), B20 (20% biodiesel + 80% diesel), B40, B60, B80, and B100 (pure biodiesel). The contents of saturated and unsaturated fatty acids were measured through gas chromatography (GC), and the cetane number of the fuel blends was determined using ASTM D613. The engine vibration signals were measured in vertical (\(z\)), lateral (\(y\)), and longitudinal (\(x\)) directions, using three accelerometers. Short-time Fourier transform (STFT) and Morlet scalogram (MSC) distribution algorithms were exploited for knocking and fault detection [61; 62; 63; 64; 65; 66; 67]. By using these signal transform techniques, a vibration signal was calculated for different fuel blends, at one combustion cycle, under idle- and full-load conditions. The spectrogram (energy density spectrum) of the STFT is calculated from  
\[STFT(\omega,\tau)\equiv|F(\omega,\tau)|^{2}=\bigg{|}\frac{1}{\sqrt{2\pi}}\int_ {-\infty}^{\infty}x(t)h(t-\tau)e^{-j\omega t}dt\bigg{|}^{2}. \tag{16}\]  
The MSC (square of wavelet transform) is calculated from the Morlet wavelet:  
\[\psi(t)=\pi^{-\frac{1}{4}}\Big{(}e^{-i\omega_{0}t}-e^{-\omega_{0}^{2}/2} \Big{)}e^{-t^{2}/2}, \tag{17}\]  
where \(\omega_{0}\) (\(\geq\)5) is modulation (central) frequency [68; 69; 70]. The Morlet wavelet is a complex function which can display both the amplitude and phase of the vibration signals. The windowing used in the Morlet wavelet is different from that in the STFT. The wavelet function for an input signal \(x(t)\) is defined as  
\[W_{x}(a,\ b;\ \psi)=\int x(t)\psi_{a,\ b}^{*}(t)dt, \tag{18}\]  
Figure 18: Total vibration acceleration (\(a_{l}\)) of different diesel–b biodiesel fuel blends, before and after the service engine [57]. Figure is reprinted with permission from publisher. where \(a\) is a scale factor, \(b\) is the wavelet windowing center or displacement along the time axis, and \(\psi^{*}(t)\) is the complex conjugate of \(\psi(t)\). Family of wavelet \(\psi_{a,\ b}(t)\) includes a series of child wavelets, and is produced by delaying and transferring the mother wavelet \(\psi(t)\):  
\[\psi_{a,\ b}(t)=\frac{1}{\sqrt{a}}\psi\bigg{(}\frac{t-b}{a}\bigg{)}. \tag{19}\]  
Wavelets are performed based on a narrow window at high frequencies and a wide window at low frequencies. The MSC is then calculated as  
\[SC_{x}(a,\ b;\ \psi)=\big{|}W_{x}(a,\ b;\ \psi)\big{|}^{2}, \tag{20}\]  
where \(SC_{x}(a,\ b;\ \psi)\) is the scalogram, and \(W_{x}(a,\ b;\ \psi)\) is wavelet transform of \(x(t)\). In general, the STFT is more efficient for quick real-time knocks/faults detection, while complex calculations of the MSC make it more suitable for offline applications where high accuracy is required. Time-frequency representation (TFR) analysis is another powerful tool for detecting injector faults, valve defects, and pressure changes during the combustion [65]. As shown in Figure 19, the STFT and TFR analyses under the full-load condition indicated that the vibration shock was uppermost, when the engine was fueled with B40 and B20 blends. On the other hand, D100 and B80 fuels successfully suppressed the uncontrolled vibration during knocking. The vibration signals were represented as low- (left) and high-frequency (right) regions. As can be seen, B40 induced large engine knocking and high-frequency vibrations due to unfavorable ignition inside the cylinder and, thus, lost a large amount of the released combustion energy.