1. Introduction {#sec1-sensors-20-00683}
===============

The rapid development of the automobile industry has put forward higher requirements for efficient automobile inspection methods. The engine rotation speed is a key parameter for evaluating an automobile's condition. For example, when testing an automobile's emissions, it is necessary to keep the engine's rotation speed within a certain range. Thus, the fast and accurate measurement of the engine rotation speed is of great importance during the automobile inspection.

Different methods are used for the measurement of engine rotation speed, which can be divided into two types (i.e., the contact-type and noncontact-type). The contact-type measurement is usually applied to unarmed engines or some engines with pre-installed sensors \[[@B1-sensors-20-00683]\]. For example, in \[[@B2-sensors-20-00683]\] the authors propose a direct measurement system based on magnetoelectric transducers, which shows good performance in the accuracy and reliability of rotation speed measurement. This method requires the installation of a sensor into the internal structure of the engine. However, during automobile inspection, it is impossible to disassemble the engine and install sensors inside. So, the contact-type methods are impractical for automobile inspection.

In automobile inspection, noncontact-type measurement plays an important role \[[@B3-sensors-20-00683],[@B4-sensors-20-00683],[@B5-sensors-20-00683],[@B6-sensors-20-00683]\]. According to the structure and working principle of an engine, the traditional noncontact-type measurement is based on the inherent relationship between the frequency of vibration and rotation speed. The advantage of noncontact-type measurement is the simple operation process, because the signal can be easily acquired by arranging vibration or acoustic sensors \[[@B7-sensors-20-00683],[@B8-sensors-20-00683]\]. However, there are some limitations of noncontact-type measurements. In rotation speed measurement, embedded hardware devices are usually used, which means that the computing power of the hardware is limited. Therefore, a method with too great a computational cost is impractical. Among the mainstream frequency estimation methods, time-domain (parametric) methods \[[@B9-sensors-20-00683],[@B10-sensors-20-00683],[@B11-sensors-20-00683]\] require computationally intensive algorithms to achieve better performance \[[@B12-sensors-20-00683]\], while frequency-domain (non-parametric) methods \[[@B13-sensors-20-00683],[@B14-sensors-20-00683],[@B15-sensors-20-00683],[@B16-sensors-20-00683],[@B17-sensors-20-00683]\] provide an accurate estimation of frequency with relatively low computational burden and better anti-noise performance. Therefore, frequency-domain methods are more suitable for rotation speed measurement. However, the signals are not only affected by noise, harmonic interference is also a cause of large deviation in fundamental frequency estimation. Taking vibration-based methods as an example, during the idling stage and accelerating stage, when the energy of interference is stronger than the fundamental frequency component, vibration-based methods cannot provide reliable results \[[@B18-sensors-20-00683]\]. The same problem also occurs in methods based on acoustic signals. Thus, the reliability of the measurement result cannot be ensured if using only the vibration signal or the acoustic signal without eliminating interference.

The characteristic of vibration and acoustic signals was studied \[[@B19-sensors-20-00683]\], and the EMD (Empirical Mode Decomposition) method was applied to extract the common feature in vibration and acoustic signals; however, a joint analysis was not considered. Correlation methods are applied in various fields of mechanical engineering and the cross-correlation function has been applied to compare the surfaces of rotary elements \[[@B20-sensors-20-00683]\]. Cross-correlation is also used to measure the similarity of two sets of signals, and the correlation sequence contains the characteristics of two sets of signals \[[@B21-sensors-20-00683]\]. Taking into account the intrinsic connection between the vibration and acoustic signals, this paper proposes a noncontact method of measuring engine rotation speed based on cross-correlation. The rest of the paper is organized in three parts. The architecture of the proposed method is introduced in the first part, including the measurement principle, the cross-correlation of vibration and acoustic signals, and estimation of fundamental frequency. Then, an embedded hardware design is proposed, and the test results are compared with a vibration-based method. Conclusions are drawn in the last part.

2. Method {#sec2-sensors-20-00683}
=========

2.1. Measurement Principle {#sec2dot1-sensors-20-00683}
--------------------------

In general, a normally functioning engine generates a regular vibration which is closely related to the rotation speed \[[@B22-sensors-20-00683]\]. In the meantime, the fuel combustion in the engine cylinders causes a deterministic tone in the engine noise, and the frequency of the deterministic tone is equal to the fundamental frequency of vibration. The mathematical relationship between rotation speed and fundamental frequency is:$$RPM = 60\left( {T/2} \right)\left( {f_{0}/C} \right),$$ where *RPM* represents revolutions per minute, *T* is the number of strokes, *f*~0~ is the fundamental frequency of vibration and acoustic signals, and *C* is the number of cylinders \[[@B23-sensors-20-00683],[@B24-sensors-20-00683]\]. From Equation (1), it is clear that the ratio between *RPM* and *f*~0~ is constant when *T* and *C* are set; that is, for a four-stroke diesel engine with four cylinders, the rotation speed can be computed through:$$RPM = 30f_{0}.$$

The frame of the measurement system was designed as shown in [Figure 1](#sensors-20-00683-f001){ref-type="fig"}. The vibration and acoustic signals are picked up by sensors and a low-pass filter is applied to restrain the high-frequency interference. After that, cross-correlation is applied to the filtered vibration and acoustic signals. Then, a frequency estimation algorithm based on fast Fourier transform is applied to calculate the frequency of the obtained sequence and to get the rotation speed through Equation (1).

2.2. Cross-Correlation of Vibration and Acoustic Signals {#sec2dot2-sensors-20-00683}
--------------------------------------------------------

In addition to the fundamental frequency component, there are interference components existing in the vibration and acoustic signals which are generated by other parts of the vehicle. In order to restrain interferences and extract the fundamental frequency component of vibration and acoustic signals, a cross-correlation algorithm is applied.

In the process of sound and vibration propagation, the interferences in the two signals are usually not the same. Supposing that *v*(*t*) represents the vibration signal and *a*(*t*) represents the acoustic signal, the model of vibration and acoustic signals can be formulated as:$$v\left( t \right) = A_{0}\cos\left( {2\pi f_{0}t + \varphi_{0}} \right) + {\sum\limits_{i = 1}^{M}{A_{vi}\cos\left( {2\pi f_{vi}t + \varphi_{i}} \right)}} + n_{v}\left( t \right),$$ $$a\left( t \right) = A_{0}\cos\left( {2\pi f_{0}t + \varphi_{0}} \right) + {\sum\limits_{i = 1}^{N}{A_{ai}\cos\left( {2\pi f_{ai}t + \varphi_{i}} \right)}} + n_{a}\left( t \right),$$ where *f*~0~ is the common frequency of vibration and acoustic signals, which is closely related to the rotation speed; *f~vi~* and *f~ai~* represent the frequency of the interference signals of the vibration signal and acoustic signal respectively, *f~vi~* ≠ *f~ai~*. *n~v~*(*t*) and *n~a~*(*t*) are additive Gaussian white noise components of the vibration signal and acoustic signal, respectively.

Considering that the model of vibration and acoustic signals is the combination of sinusoids with different frequencies and noise, the correlation sequence of vibration and acoustic signals can be rearranged as a linear superposition of several parts \[[@B25-sensors-20-00683]\]. For simplicity, it is divided into three parts. The first part is the correlation of common frequency components. The second part is the correlation of different frequency components, and the third part is the correlation of noise components and frequency components, which are presented below:$$r_{1}\left( \tau \right) = \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{A_{0}^{2}\cos\left( {2\pi f_{0}t + \varphi_{0}} \right)\cos\left( {2\pi f_{0}\left( {t - \tau} \right) + \varphi_{0}} \right)}}dt$$ $$\begin{matrix}
{r_{2}\left( \tau \right)} & {= \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{A_{0}\cos\left( {2\pi f_{0}t + \varphi_{0}} \right){\sum\limits_{i = 1}^{N}A_{ai}}\cos\left( {2\pi f_{ai}\left( {t - \tau} \right) + \varphi_{i}} \right)}}dt} \\
 & {+ \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{A_{0}\cos\left( {2\pi f_{0}\left( {t - \tau} \right) + \varphi_{0}} \right){\sum\limits_{i = 1}^{M}A_{vi}}\cos\left( {2\pi f_{vi}t + \varphi_{i}} \right)}}dt} \\
\end{matrix}$$ $$\begin{array}{cl}
{r_{3}\left( \tau \right)} & {= \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{n_{v}\left( t \right)\left( {A_{0}\cos\left( {2\pi f_{0}\left( {t - \tau} \right) + \varphi_{0}} \right) + {\sum\limits_{i = 1}^{N}A_{ai}}\cos\left( {2\pi f_{ai}\left( {t - \tau} \right) + \varphi_{i}} \right)} \right)}}dt} \\
 & {+ \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{n_{a}\left( {t - \tau} \right)\left( {A_{0}\cos\left( {2\pi f_{0}\left( t \right) + \varphi_{0}} \right) + {\sum\limits_{i = 1}^{M}A_{vi}}\cos\left( {2\pi f_{vi}t + \varphi_{i}} \right)} \right)}}dt} \\
 & {+ \lim\limits_{T\rightarrow\infty}{\int_{- \frac{T}{2}}^{\frac{T}{2}}{n_{v}\left( t \right)n_{a}\left( {t - \tau} \right)}}dt} \\
\end{array}$$

The frequency domain characteristic of each part can be obtained by Fourier transform. According to the characteristics of cross-correlation and Fourier transform, the frequency spectrum of each part is expressed as below:$$\begin{array}{ll}
{R_{1}\left( {j\omega} \right)} & {= F\left( r_{1} \right)} \\
 & {= \left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right)} \right)\left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right)} \right)^{*}} \\
\end{array}$$ $$\begin{array}{l}
{R_{2}\left( {j\omega} \right) = F\left( r_{2} \right)} \\
{= \left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right)} \right)\left( {\sum\limits_{i = 1}^{M}{A_{ai}\pi\left( {e^{j\varphi_{i}}\delta\left( {\omega + 2\pi f_{ai}} \right) + e^{- j\varphi_{i}}\delta\left( {\omega - 2\pi f_{ai}} \right)} \right)}} \right)^{*}} \\
{+ \left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right)} \right)^{*}\left( {\sum\limits_{i = 1}^{N}{A_{vi}\pi\left( {e^{j\varphi_{i}}\delta\left( {\omega + 2\pi f_{vi}} \right) + e^{- j\varphi_{i}}\delta\left( {\omega - 2\pi f_{vi}} \right)} \right)}} \right)} \\
\end{array}$$ $$\begin{array}{l}
{R_{3}\left( {j\omega} \right) = F\left( r_{3} \right)} \\
{= N_{v}\left( {j\omega} \right)\left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right) + {\sum\limits_{i = 1}^{M}{A_{ai}\pi\left( {e^{j\varphi_{i}}\delta\left( {\omega + 2\pi f_{ai}} \right) + e^{- j\varphi_{i}}\delta\left( {\omega - 2\pi f_{ai}} \right)} \right)}}} \right)^{*}} \\
{+ N_{a}\left( {j\omega} \right)^{*}\left( {A_{0}\pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + 2\pi f_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - 2\pi f_{0}} \right)} \right) + {\sum\limits_{i = 1}^{N}{A_{vi}\pi\left( {e^{j\varphi_{i}}\delta\left( {\omega + 2\pi f_{vi}} \right) + e^{- j\varphi_{i}}\delta\left( {\omega - 2\pi f_{vi}} \right)} \right)}}} \right)} \\
\end{array}$$

According to [Appendix A](#app1-sensors-20-00683){ref-type="app"} and characteristic of correlation \[[@B26-sensors-20-00683],[@B27-sensors-20-00683]\], *R*~1~ \>\> *R*~2~ + *R*~3~, the frequency spectrum function of the correlation sequence is simplified as below:$$\begin{array}{ll}
{R_{va}\left( {j\omega} \right)} & {{= F}\left( {r_{va}\left( \tau \right)} \right)} \\
 & {\approx A_{0}^{2}\pi^{2}\left( {\delta^{2}\left( {\omega + 2\pi f_{0}} \right) + \delta^{2}\left( {\omega - 2\pi f_{0}} \right)} \right)} \\
\end{array}$$ where *r~va~*(*τ*) is the correlation sequence of *v*(*t*) and *a*(*t*), and *R~va~*(*jω*) is the Fourier transform of *r~va~*(*τ*). According to the characteristic of cross-correlation, the frequency spectrum of the *r~va~*(*τ*) contains only *f*~0~, which is the fundamental frequency of vibration and acoustic signals, and the interference frequencies *f~vi~* and *f~aj~* are both eliminated. As the fundamental frequency information remains in the correlation sequence of vibration and acoustic signals while interference and noise are restrained, the estimation of fundamental frequency can be achieved by applying frequency-domain methods to the correlation sequence.

2.3. Estimation of Fundamental Frequency {#sec2dot3-sensors-20-00683}
----------------------------------------

In order to estimate the fundamental frequency of the correlation sequence obtained by the cross-correlation algorithm, a frequency-domain method is applied. The flowchart of the frequency estimation algorithm is shown in [Figure 2](#sensors-20-00683-f002){ref-type="fig"}.

As shown in [Figure 2](#sensors-20-00683-f002){ref-type="fig"}, the discrete Fourier transform is first applied to the correlation sequence of vibration and acoustic signals. As the fundamental frequency component is enhanced while interference components are restrained by the cross-correlation algorithm, the spectral line with the largest amplitude represents the fundamental frequency component. The second step is to find the spectral line with the largest amplitude and four extra spectral lines surrounding it. Then, to improve the accuracy of the result, the energy centrobaric correction method \[[@B28-sensors-20-00683]\] is applied. In this paper, five spectral lines are utilized. Assuming that *G~j~* is a peak value of the spectral line, and the subscript *j* indicates the index of the spectral line, *f~s~* is the sampling frequency and *L* is the number of samples, the estimated frequency *f* can be obtained as:$$f = \frac{\sum\limits_{j = - m}^{m}{\left( {j_{0} + j} \right)G_{j_{0} + j}}}{\sum\limits_{j = - m}^{m}G_{j_{0} + j}}\frac{f_{s}}{L}\begin{matrix}
, & {m = 2} \\
\end{matrix}.$$

3. Hardware Design and Test Results {#sec3-sensors-20-00683}
===================================

In order to evaluate the performance of the proposed method, an embedded hardware for rotation speed measurement was designed, and a test was carried out in an automobile inspection station. Considering the application scenario and reliability, the sensors were assembled in the form of a magnetic suction probe. Signals were transmitted through the coaxial line. Vibration and acoustic signals were sampled from the engine hood of an automobile, and a comparison of results was made between the proposed method and a traditional method based only on the vibration signal.

3.1. Hardware Design {#sec3dot1-sensors-20-00683}
--------------------

A diagram of the hardware structure is shown in [Figure 3](#sensors-20-00683-f003){ref-type="fig"}, and a photo of the device is shown in [Figure 4](#sensors-20-00683-f004){ref-type="fig"}. According to the measurement principle, the vibration and acoustic signals related to the rotation speed were mainly distributed in the low-frequency range, so the frequency response of the sensor was set to the range from 0 to 250 Hz. In this paper, an MMA1220KEG micro-machined accelerometer was used as a vibration sensor. This chip features signal conditioning, a 4-pole low-pass filter, and temperature compensation. The acoustic sensor consisted of an electret microphone and a second-order Butterworth low-pass filter circuit.

An LPC1768 processor was deployed to implement the algorithm of rotation speed measurement. The LPC1768 operates at CPU frequencies of up to 100 MHz, which completely fulfilled the demands of the measurement task.

3.2. Test Results {#sec3dot2-sensors-20-00683}
-----------------

The experiment was carried out in an automobile inspection station, the device was tested under a practical situation, and the automobile was randomly chosen. The sensors were assembled in the form of a magnetic suction probe and they were attached on the engine hood of the tested automobile. For comparison, a traditional method for rotation speed measurement based on the vibration signal was also tested. All data was recorded with a data acquisition card for comparison. The test scenario and device are shown in [Figure 5](#sensors-20-00683-f005){ref-type="fig"}.

The sample rate was set to 512 Hz. The time frequency analysis results are presented in [Figure 6](#sensors-20-00683-f006){ref-type="fig"}. [Figure 6](#sensors-20-00683-f006){ref-type="fig"}a presents the results based on vibration signals and [Figure 6](#sensors-20-00683-f006){ref-type="fig"}b the results based on the cross-correlation of vibration and acoustic signals. To achieve a joint time-frequency analysis of vibration and acoustic signals synchronously, a sliding discrete Fourier transform and cross-correlation were combined. The window length was set to be 256 points with a 240-point overlap, and in each frame a discrete Fourier transform was applied on the correlation sequence of vibration and acoustic signals obtained by cross-correlation. The difference between [Figure 6](#sensors-20-00683-f006){ref-type="fig"}a and [Figure 6](#sensors-20-00683-f006){ref-type="fig"}b is evident. There was a difference between the frequencies of the vibration and acoustic signals, and the cross-correlation method was able to suppress the interference frequency components and enhanced the fundamental frequency, related to the rotation speed. This result indicates that cross-correlation analysis of acoustic and vibration signals provided a better performance in extracting the fundamental frequency component.

The results of rotation speed measurement based on the proposed method and the method solely based on the vibration signal are shown in [Figure 7](#sensors-20-00683-f007){ref-type="fig"}. It is obvious that the difference was mainly distributed in the idling stage and accelerating stage, and those two stages were the most disturbed stages in rotation speed measurement. Zoomed-in figures of boxes A and B in [Figure 7](#sensors-20-00683-f007){ref-type="fig"} are shown in [Figure 8](#sensors-20-00683-f008){ref-type="fig"}a and [Figure 8](#sensors-20-00683-f008){ref-type="fig"}b, respectively.

From [Figure 8](#sensors-20-00683-f008){ref-type="fig"}a, in the idling stage, the interference resulted in a large deviation in the vibration method. Meanwhile, the proposed method showed a more reliable performance in the idling stage. [Figure 8](#sensors-20-00683-f008){ref-type="fig"}b shows the measurement results during the accelerating stage. In this stage, the results of vibration method showed a large deviation, while the proposed method provided a correct and robust measurement result. The comparison shows that the proposed method had a better ability to attenuate interferences than the vibration method.

4. Conclusions {#sec4-sensors-20-00683}
==============

Noncontact measurements are of great significance to improve the efficiency of automobile inspection. Unfortunately, a robustness against external interference is a flaw of this method, which means that measurement results are no longer reliable in the presence of intense interference. This paper proposed a method based on cross-correlation to measure the rotation speed of an engine by utilizing the correlation of vibration and acoustic signals. By taking into consideration an acoustic signal and applying cross-correlation with a vibration signal, the interference signal was restrained and the fundamental frequency component, which is closely related to rotation speed, was enhanced. The proposed method could provide a reliable result with good anti-interference efficiency. Test results showed that the proposed method had a better performance than the vibration-based method in measuring the rotation speed of an engine. Embedded hardware was designed to implement the method, and the test results showed good reliability in an exemplary practical application. Further work will focus on how to realize the auto-recognition of the cylinder numbers, as the present work required prior knowledge of the cylinder numbers.

Funding acquisition, R.M.; Methodology, L.T. and H.W.; Writing--original draft, X.S.; Writing--review & editing, L.T., H.W., R.M. and J.S. All authors have read and agree to the published version of the manuscript.

This work was supported in part by the National Natural Science Foundation of China under Grant 61771190, in part by the Natural Science Foundation of Hunan Province under Grant 2019JJ20001, and in part by the European Regional Development Fund in the Research Centre of Advanced Mechatronic Systems project, project number CZ.02.1.01/0.0/0.0/16_019/0000867 within the Operational Programme Research, Development and Education.

The authors declare no conflict of interest

According to the definition of Fourier transform, the Fourier transform of sinusoids can be expressed as:$$F\left( {\cos(\omega_{0}t + \varphi_{0})} \right) = \pi\left( {e^{j\varphi_{0}}\delta\left( {\omega + \omega_{0}} \right) + e^{- j\varphi_{0}}\delta\left( {\omega - \omega_{0}} \right)} \right).$$

Assuming that *s*~1~(*t*) and *s*~2~(*t*) are two sinusoids with different angular frequency, the Fourier transform of the cross-correlation of *s*~1~(*t*) and *s*~2~(*t*) can be expressed as:$$s_{1}\left( t \right) = \cos(\omega_{1}t + \varphi_{1}),s_{2}\left( t \right) = \cos(\omega_{2}t + \varphi_{2})$$ $$\begin{array}{cl}
{F\left( {s_{1}\left( t \right) \odot s_{2}\left( t \right)} \right)} & {= F\left( {s_{1}\left( t \right)} \right)\left( {F\left( {s_{1}\left( t \right)} \right)} \right)^{\ast}} \\
 & {= \left( {\pi\left( {e^{j\varphi_{1}}\delta\left( {\omega + \omega_{1}} \right) + e^{- j\varphi_{1}}\delta\left( {\omega - \omega_{1}} \right)} \right)} \right)\left( {\pi\left( {e^{j\varphi_{2}}\delta\left( {\omega + \omega_{2}} \right) + e^{- j\varphi_{2}}\delta\left( {\omega - \omega_{2}} \right)} \right)^{\ast}} \right)} \\
 & {= \pi^{2}\left( {e^{j\varphi_{1}}\delta\left( {\omega + \omega_{1}} \right) + e^{- j\varphi_{1}}\delta\left( {\omega - \omega_{1}} \right)} \right)\left( {e^{- j\varphi_{2}}\delta\left( {\omega + \omega_{2}} \right) + e^{j\varphi_{2}}\delta\left( {\omega - \omega_{2}} \right)} \right)} \\
\end{array}$$ where ⊙ denotes cross-correlation and \* denotes conjugate. According to the characteristic of impulse function, the result is zero and it means that signals of different frequencies are suppressed by cross-correlation.

![Principle of the measurement system. *RPM*: revolutions per minute.](sensors-20-00683-g001){#sensors-20-00683-f001}

![Flowchart of *RPM* measurement. DFT: discrete Fourier transform.](sensors-20-00683-g002){#sensors-20-00683-f002}

![Diagram of the hardware structure. JTAG: Joint Test Action Group](sensors-20-00683-g003){#sensors-20-00683-f003}

![Photo of the device.](sensors-20-00683-g004){#sensors-20-00683-f004}

![Photo of test scenario and device.](sensors-20-00683-g005){#sensors-20-00683-f005}

![(**a**) Time-frequency analysis of the vibration signal; (**b**) Time-frequency analysis of vibration and acoustic signals.](sensors-20-00683-g006){#sensors-20-00683-f006}

![Test results of rotation speed measurement.](sensors-20-00683-g007){#sensors-20-00683-f007}

![(**a**) Zoomed-in figure of box A in [Figure 7](#sensors-20-00683-f007){ref-type="fig"}; (**b**) Zoomed-in figure of box B in [Figure 7](#sensors-20-00683-f007){ref-type="fig"}.](sensors-20-00683-g008){#sensors-20-00683-f008}
