Frequency Measurement Method of Signals with Low Signal-to-Noise-Ratio Using Cross-Correlation

: Precise frequency measurement plays an essential role in many industrial and robotic systems. However, different effects in the application’s environment cause signal noises, which make frequency measurement more difﬁcult. In small signals or rough environments, even negative Signal-to-Noise Ratios (SNRs) are possible. Thus, frequency measuring methods, which are suited for low SNR signals, are in great demand. While denoising methods such as autocorrelation do not sufﬁce for small signal with low SNR, frequency measurement methods such as Fast-Fourier Transformation or Continuous Wavelet Transformation suffer from Heisenberg’s uncertainty principle, which makes simultaneous high frequency and time resolutions impossible. In this paper, the cross-correlation spectrum is presented as a new frequency measuring method. It can be used in any frequency domain, and provides greater denoising than autocorrelation. Furthermore, frequency and time resolutions are independent from one another, and can be set separately by the user. In simulations, it achieves an average deviation of less than 0.1% on sinusoidal signals with a SNR of − 10 dB and a signal length of 1000 data points. When applied to “self-mixing”-interferometry signals, the method can reach a normalized root-mean square error of 0.2% with the aid of an estimation method and an averaging algorithm. Therefore, further research of the method is recommended.


Introduction
Measurement technology is an essential part of many industrial and robotic systems. By precisely measuring physical parameters, robots are capable of perceiving their environment and fulfilling their purpose correctly. Many sensors generate signals, whose frequency depends on certain input stimulus [1,2]. These include accelerometers [3] or piezoelectric sensors [4,5]. Interferometers such as Laser Doppler Velocimeters or "selfmixing" interferometers use signal frequencies for the measurement of physical parameters such as vibration or velocity [6,7]. Therefore, precise frequency measurement is of the utmost importance in measurement technologies [8].
However, different effects in practical applications cause signal noises, which make frequency measurement significantly more difficult. In the case of small signals under rough environment conditions, even negative Signal-to-Noise Ratios (SNRs) are possible. Thus, methods which can measure frequencies of low SNR signals are in great demand [9].
One very common frequency determination method is the Fast-Fourier-Transformation (FFT). It generates a frequency spectrum of the signal that specifies which frequencies the signal consists of. However, the FFT does not provide information regarding frequency changes in the viewed signal part. The Short-Time Fourier Transformation (STFT) can solve this problem [10]. The signal is divided into small signal parts and the frequency spectrum of each part is generated. However, the signal partition deteriorates the frequency resolution significantly. That is due to Heisenberg's uncertainty principle. It says that an improvement in time resolution leads to the deterioration of frequency resolution, and vice versa [10,11].
The Continuous Wavelet Transformation (CWT) has been developed to solve the resolution problems of STFT. However, the method is also limited by Heisenberg's uncertainty principle [12], and only suitable for long-duration frequency signals containing short-duration high frequency events [10]. CWT is based on the dilation of the window function, which results in a high time and low frequency resolution for high frequencies, and vice versa. In situations, where high frequency and time resolutions are required at the same time, the usage of CWT is not recommended.
For denoising tasks, autocorrelation has established itself as a reliable method. This is a signal processing method in which the correlation of a signal with a delayed copy of itself is described. Due to its characteristics, autocorrelation makes it possible to denoise a signal without losing information about the signal frequency [13]. However, in the case of small signals with low SNR, autocorrelation is not suited to denoise the signal while also preserving frequency information (see Chapter 3).
This study presents a new method based on cross-correlation to measure the frequencies of low SNR signals with high accuracy. The method can be used in any frequency domain and preserves frequency information better than denoising methods such as autocorrelation. Furthermore, the frequency and time resolution are independent from one another and can be set separately by the user.
The rest of the paper is organized as follows: Section 2 describes cross-correlation and its relevant characteristics as fundamentals. Furthermore, it presents the new signal processing method, its working principle, as well as its characteristics and benefits. In Section 3, the new method's ability to measure frequencies and to denoise signals is analyzed in simulations and compared with the performance of autocorrelation. In Section 4, the presented method is validated by applying it to "self-mixing" interferometry (SMI) signals, which are explained in detail as well.

Cross-Correlation
Cross-correlation is a function used in signal processing. It describes the similarity of two signals which have the time shift τ between one another. In general, it is defined as follows [13]: For simplicity, we will call x(t) the reference signal and y(t) the test signal under analysis. The discrete cross-correlation is calculated with the following Equation, where N is the number of discrete data points and k represents the data shift: Lee et al., (1949) has identified the cross-correlation as a sufficient denoising method [14]. Similar to autocorrelation, the cross-correlation of stochastic offset-free noise signals are delta impulses, which converge to zero with increasing time (or data) shift τ (or k). Crosscorrelation between a test signal and a reference signal with the same frequency, amplitude, and phase reduces noise significantly, without losing frequency information of the test signal. While autocorrelation describes the correlation of two noisy signals, cross-correlation describes one between a noisy test signal and a noise-free reference signal. Therefore, denoising with cross-correlation is more effective [14].
In context of its practical use, the following question is stated: What does the crosscorrelation look like, when characteristics of tests and reference signals differ from one another? Therefore, the cross-correlation of the following signals is analyzed: According to [14], the signal noise s(t) converges against zero in the cross-correlation. Thus, it can be neglected in the analysis. In total, the cross-correlation is: The cross-correlation is the sum of two cosine functions. They both have the frequency of the test signal, but differ in amplitude and phase. With increasing T, the amplitude of both cosines' functions converges against zero.
The pace with which the amplitudes decrease depends on different factors. With increasing T and a high value of ( f N + f M ), the second cosine function converges against zero very quickly. The convergence speed of the first cosine function depends on the frequency difference between the test and reference signal. The smaller the difference is, the lower the convergence speed becomes. This results in two conclusions: Most of the time, the second cosine function will converge faster than the first one. Therefore, the second function can be neglected, and thus the cross-correlation can be simplified to Equation (8): Furthermore, the amplitude of the cross-correlation is at its largest, when f N = f M is fulfilled. In this case, the parameter K has the following value: The amplitude is constant and is not influenced by the parameter T. The crosscorrelation function shows the same behavior as an autocorrelation function [13] and has its greatest amplitude.
If the test signal consists of multiple sinusoid functions (see Equation (10)), the crosscorrelation function can be described by Equation (11). with The cross-correlation function φ xy N (τ) is the superposition of the cross-correlations between the reference signal and each component of the test signal. Each cross-correlation function φ xy i (τ) has its greatest amplitude when f N equals their frequency f Mi .
Based on this property, and the fact from the Fourier analysis, that a signal can be approximated with a linear combination of trigonometric functions, one can assume that the frequencies of a test signal y(t) can be identified by determining values of the frequency f N , which result in the largest amplitude of the cross-correlation function φ xy (τ). Thus, a new discrete signal processing method called the "cross-correlation spectrum" is described in this article.

Cross-Correlation Spectrum
The cross-correlation spectrum K( f w ) can be calculated with the Equations from (13) to (17). There, f s is the sampling frequency. K( f w ) represents the amplitude of the cross-correlation function between the test signal y(n), which is abstracted according to Equation (15), and the sinusoid function x f w (n) (see Equation (13)) as a function of the frequency f w , which is set according to Equation (14).
The cross-correlation spectrum can be generated as follows (see Figure 1): 1.
The viewed frequency range [ f a ; f e ] and the frequency resolution ∆ f are defined by the user. To analyze the test signal's frequency efficiently, a rough frequency estimation is performed beforehand, to set the frequency range in a way that it is minimized as much as possible, while ensuring that the signal's frequencies are included in the defined range. ∆ f is set according to the accuracy requirements. If, for example, the signal's frequencies are around 1 kHz and an accuracy of 0.5% is required, ∆ f should be set to 1 Hz at most; 2.
f w is initialized to f a ; 3.
The sinusoid function x f W (n) is generated according to Equation (13);

4.
The cross-correlation function φ x f w y (k) between the test signal y(n) and x f W (n) is calculated using Equation (16). The parameter Z (see Equation (16)) should be set to the signal period length of φ x f w y (k); 5.
The cross-correlation spectrum's value K( f w ) for the current frequency f w is determined by identifying the amplitude of the cross-correlation function φ x f w y (k). Here, it is accomplished by finding the function's maximum value; 6.
The steps from 3-6 are repeated, until K( f e ) has been determined. Figure 2 shows an exemplary cross-correlation spectrum. Here, a simple sinusoid function of the frequency 10 kHz is used as the test signal. The result resembles the absolute function of a sine cardinal, which is symmetrical and has its global maximum at the frequency of the test signal. Therefore, the creation of a cross-correlation spectrum is a valid method to generate information about the frequencies of the test signal. In Figure 3, the method's ability to determine frequencies of a signal, which consists of several frequencies, is tested. For this purpose, a harmonic with a frequency of 20 kHz is added to the signal from Figure 2. We can see two local maxima, which are at the test signal's frequencies. The value of the maxima seems to depend on the amplitude of the corresponding harmonic. Therefore, the method can recognize the different frequency components of the test signal, as well as their relative amplitude ratios. If the different frequencies of a signal are close to one another, the result resembles the superposition of the functions representing the respective frequencies. This can be seen in Figure 4. There, the cross-correlation spectra of two simple sinusoidal signals of different frequencies, as well as the spectrum of the two sinusoid functions' sum, are visualized. In contrast to FFT and CWT, the frequency and time resolution in the cross-correlation spectrum are independent from one another. Both can be set separately by the user, which means that resolution problems can be reduced to a minimum. With the help of this method, frequency determination with high time and frequency resolutions is possible. Therefore, many limitations associated with FFT and CWT can be circumvented with the cross-correlation spectrum.
However, it must be considered that the time resolution has an influence on the form of the functions, which describe individual frequencies in the cross-correlation spectrum. The longer the used time signal length is, the more compressed the sine cardinal in the crosscorrelation spectrum becomes. After a sufficient compression, the test signal's frequencies are represented as delta impulses, whereby the cross-correlation spectrum even corresponds to a frequency spectrum (see Figure 5). Furthermore, the cross-correlation spectrum must not be confused with the "cross power spectrum". While the "cross-power spectrum" describes the relationship between two time functions as a function of frequency, and thus shows which frequencies the two viewed time functions have in common [15], the cross-correlation spectrum analyzes only one practical time signal (=test signal), and provides frequency information of the test signal by describing its correlation with reference signals, which are generated by software. Thus, the purpose and working principle of both spectrums differ from one another.

Simulations
In the following section, simulations are carried out to evaluate the method's performance on noisy signals. Firstly, cross-correlation spectra of sinusoidal signals, which have a frequency of 10 kHz, are created under different SNR. The sampling frequency f s and the number of data points N are set to 100 kHz and 1000 data points, i.e., f s = 100 kHz, N = 1000. While Figure 6 shows the discrete time signals in comparison to a noise-free one, Figure 7 visualizes the cross-correlation spectra.   Figure 7 shows that, even for signals with low SNR, the signal's frequency is clearly visible in the cross-correlation spectrum. Up to an SNR of −10 dB, the maximum of the spectrum is visibly at the frequency of the test signal. Only at an SNR of −20 dB can the correct frequency not be seen anymore.
In Figure 8a,b, the denoising of autocorrelation and the cross-correlation spectrum is compared with one another. Figure 8a visualizes the SNRs of noisy signals after processing by autocorrelation and cross-correlation spectrum as a function of their original SNRs, while Figure 8b presents the SNR improvements after processing by both methods as a function of their original SNRs. The figures indicate that whether autocorrelation or the cross-correlation spectrum is superior in terms of denoising depends on the signal's original SNR. While the SNR improvements of autocorrelation are better in the case of original SNRs which are higher than 2 dB, the cross-correlation spectrum is superior at lower original SNRs. The results imply that the cross-correlation spectrum is more suited to denoise signals of low SNR, while autocorrelation is the better option for signals with relatively high SNR. However, in context of this article, the method's ability to measure the frequencies of noisy signal is more relevant. If denoising results in the loss of frequency information, the method has missed its key point. Thus, the following simulation has been performed. The SNR has been gradually reduced from 20 dB to −20 dB. For each SNR, the frequency of 500 test signals has been determined with two methods. Firstly, an autocorrelation and a zero-crossing detection has been used for frequency measurement. Secondly, the frequency has been determined by generating their cross-correlation spectra and identifying the frequency with the highest spectrum value. The frequency range and resolution of the cross-correlation spectrum have been set to the range of 9 to 11 kHz, and 1 Hz. The sample frequency f s is the same as in Figures 6 and 7, while the signal frequency has been changed to 10,123.4 Hz to show the effects of asynchronous sampling. Furthermore, the same number of data points N has been used in both methods. Figure 9a,b compare the normalized root mean square error (=NRMSE) and average deviation of both methods with one another.
The cross-correlation spectrum shows superior performance in the frequency measurements of low SNR signals. While the error of the autocorrelation method starts to rise exponentially at an SNR of 5 dB, the error of the cross-correlation spectrum starts to behave this way at SNRs below −10 dB. Table 1 provides a closer look at the cross-correlation spectrum's accuracy in measuring frequencies. The results are very promising, as the average deviation is less than 0.02% for SNR higher than −3 dB. Even at an SNR of −10 dB, both deviations are still below 0.1%. Only at lower SNR do the deviations increase significantly.  The accuracy can be improved even further by using longer signal parts for the crosscorrelation spectrum. This relationship is illustrated in the following simulation. The method has been carried out with different signal lengths N on 500 test signals with a SNR of −10 dB. The NRMSE and average deviation of the results were determined for each N and visualized in Figure 10. As expected, the results' accuracy improves with increasing signal length. Beginning from a signal length of 1500 points, the NRMSE and average deviation is below 0.05% even at an SNR of −10 dB.

Self-Mixing Interferometry
The simulations above have shown that the cross-correlation spectrum is able to measure frequencies of low SNR signals with high accuracy. However, the method's ability must be validated by practical application. Therefore, the method has been tested by using signals generated by "self-mixing" interferometry (SMI), as the precise frequency measurement of SMI signals with low SNR is of great relevance in the research of speed measurement technology [7].
SMI is a measurement technology of increasing popularity; a laser beam is reflected from a target object, back into the laser cavity. This results in interferences between the light generated inside the laser and the reflected one, which change the laser's frequency and amplitude. When a built-in photodiode senses the laser's output power, one can obtain a signal (=SMI signal), which can be used to measure physical properties such as displacement, vibration, or speed [16]. Figure 11 shows the schematic structure of the rotational speed measurement using SMI signals. If a turntable is used as the target object, a linear relationship between the frequency of the SMI signal (=Doppler frequency) and the turntable's rotational speed ω can be derived and written as follows [7]: where θ represents the incident angle between the laser and the target object's moving direction, while λ symbolizes the wavelength of the laser diode. The target's linear speed v can be calculated with the target's radius r and the rotational speed ω, i.e., v = rω. Due to Equation (18), SMI signals make the direct measurement of the target's rotational speed possible. As the method provides inherently high resolutions [17], which are independent from the target object's speed, there are no resolution problems in low-speed ranges. Thus, self-mixing interferometry has become a promising solution for rotational speed detections. This being said, many challenges are involved with the usage of self-mixing-interferometry. Spectral broadening is known as a major one. This results from different aspects such as the vibration, profile add uncertainty, speckle effect, change in surface or velocity distribution over the light spot region [19], and results in amplitude and frequency modulations of the SMI signal [20]. The authors of [21] have conducted a comprehensive analysis of factors influencing the spectrum of the SMI signal. The incident angle, the beam's numerical aperture (NA), the speed, and the fractional speed changes across the beam spot when the spot is close to the target's center have been identified as major factors. Laser nonzero linewidth, target surface profile, system vibrations, instabilities of the target's speed, and fractional speed changes across the beam spot, when the spot is distant from the target's center, influence the spectrum in a minor way as well. However besides spectral broadening, the SMI signal is often corrupted by dynamic offsets due to system instabilities environmental influences or by additive noises [17], which are caused by environmental aspects such as electromagnetic interferences, etc. Figure 12 visualizes a typical SMI signal. This is a sinusoidal signal disturbed by amplitude and frequency modulation, as well as additive noises. All these factors make it difficult to precisely measure the rotational speed with self-mixing interferometry. Therefore, there is a need for robust signal processing methods. To obtain SMI signals for the experiments, the same test system, which is based on the schematic structure of Figure 11, and the same settings as in [17] are used (see Figure 13). A laser driver transforms the output of the power supply into a constant current, which runs a sensor head consisting of a commercial 785 nm laser diode with an integrated photo diode and two lenses. The sensor head targets a turntable mounted on the shaft of a Yaskawa SGMJV-02A3E6S servo motor. Using the servo drive Yaskawa SGDV-1R6A01B002000, the motor is controlled by a computer and rotates the turntable with a constant rotational speed. The speed is measured by a 21-bit optical encoder to provide a good velocity reference [17]. The integrated photo diode detects the optical feedback, generated by self-mixing interferometry, and sends its output to a preprocessing circuit. The circuit extracts and amplifies the SMI-signal and sends it to an oscilloscope, which enables the extraction of SMI-signal data for further analysis. This test system uses an 8-bit DSO1024A oscilloscope of Agilent with a bandwidth of 200 MHz. Due to its bandwidth capability, the measuring device does not limit the measurement bandwidth. In the first experiment, the method's ability to detect signal frequencies is validated. Then, the cross-correlation spectrum is used on SMI signals to measure the rotational speed of a turntable. This is done by determining the frequency of the SMI signal (=Doppler frequency). However, due to spectral broadening, a frequency range has emerged from the Doppler frequency. Therefore, the original frequency of the SMI signal must be estimated from the frequency range.
In principle, the cross-correlation spectrum can be viewed as the absolute value function of a superposition of several sine cardinal. It is reasonable to assume that spectral broadening has divided one sine cardinal into several, and that, in the viewed frequency range, the integral of the cross-correlation spectrum remains the same in terms of amount. The following estimation method has been developed based on this assumption.
In the first step, the integral of the cross-correlation spectrum is formed. Afterwards, the cross-correlation spectrum is abstracted to the absolute value function of a single sine cardinal with the same maximum integral value as the original cross-correlation spectrum. The frequency, which the abstraction represents, is considered as the SMI signal's original frequency, and is searched accordingly. As the abstraction is y-symmetrical at the frequency that it represents, the sought frequency would be at the point at which the integral of the cross-correlation spectrum reaches half of its maximum value. Thus, the determination of this point is the aim of the estimation method (see Figure 14). Based on the cross-correlation spectrum of the viewed signal part, this method can provide a good estimation of the Doppler frequency. However, measurement errors, which are caused by frequency modulation due to different effects such as the speckle effect or system vibrations, can only be partly reduced with this method. To compensate these errors, the method is followed by the averaging algorithm shown in Figure 15.

Experiments on SMI-Signals
The first experiment aims to validate whether information regarding a signal's frequencies can be generated with the cross-correlation spectrum. For this purpose, the cross-correlation spectrum and the FFT of an SMI signal were created, normalized, and compared with one another (see Figure 16). A signal of the size of 10,240 data points has been used for this experiment. The sampling frequency has been 12.5 MHz. Generally, there is a match between the FFT and the cross-correlation spectrum. However a closer look at the spectra reveals that the cross-correlation spectrum turns out to be more accurate (see Table 2). While the frequency resolution for the FFT is approximately 1221 Hz, it has been set to ∆ f = 10 Hz for the cross-correlation spectrum. Therefore, the frequency spectrum of the FFT is much coarser and thus less precise. Using the experiment setup described in Section 4.1, the method's ability to measure rational speed is tested. According to Equation (18), the incident angle is required to calculate the rotational speed out of the Doppler frequency. However, if the laser's position, direction and thus the laser incident angle is fixed, the characteristic line between Doppler frequency and rotational speed can be obtained from the calibration of the measurement system. If the line is linear and its slope known, the rotational speed can be easily derived from the Doppler frequency. Therefore, the experiment aims to find the method's nonlinearity and its best possible accuracy in measuring frequencies. The first 3000 data points of each data set have been used for the cross-correlation spectrum. Furthermore, the size of the average window has been set to 20 values.
The frequency range of the cross-correlation spectrum has significant influence on the estimation method's results. It should contain all signal frequency components while excluding as many noises as possible. Thus, for each speed, the authors have visually evaluated the cross-correlation spectrums of the data sets to define spectrum borders, which fulfill the condition.
In the first step, the linearity between the results and the turntable's rotational speed has been validated. For this purpose, a characteristic line has been created using linear regression from the average values of 50 data sets for each rotational speed. Figure 17 and Table 3 describe the results. In the worst case, the linearity is at 0.4%. Thus, there is a linearity between the determined Doppler frequency and the rotational speed.   Table 4 shows the new method's accuracy as the normalized root mean square error (=NRMSE) of its results. To evaluate the results, the NRMSE from [18], where a method consisting of a signal selection, autocorrelation, zero-crossing detection, and averaging algorithm is used to measure the Doppler frequency, are also visualized. In both cases, the average Doppler frequency of the respective rotational speed has been used as the reference of the NRMSE.  Table 4 shows that both methods can measure the Doppler frequencies accurately, as the NRMSE stays below 0.2% in both methods. The results are very promising and show the cross-correlation spectrum's potential in frequency measurements in application fields such as robotics.

Discussions
In this paper, the cross-correlation spectrum is presented as an alternative to the Fast Fourier Transformation (FFT) and the Continuous Wavelet Transformation (CWT). The spectrum describes the amplitude of the cross-correlation function between the test signal and a reference sinusoid signal as the function of the set frequency f w . To generate the spectrum, the frequency f w is gradually increased from the spectrum border beginning f a to the border ending f e by a frequency interval of ∆ f . Then, the amplitude of the crosscorrelation function is determined for each value of f w . While FFT and CWT must make compromises between frequency and time resolution due to Heisenberg's uncertainty principle, the cross-correlation spectrum allows the user to set the time and frequency resolution separately from one another. Thus, the cross-correlation spectrum makes it possible to determine the frequencies of a signal with high time and frequency resolution at the same time. The processing of very noisy signals does not pose a problem either, as the method denoises signals as well. Simulations and experiments on SMI signals show promising results. On a sinusoidal signal with a SNR of −10 dB and a length of 1000 data points, the new method can achieve an average deviation of less than 0.1%. The deviation can be reduced even further by using signal parts with more data points. In the case of SMI signals, the cross-correlation spectrum can achieve a normalized root-mean square error below 0.2% and a non-linearity below 0.5% with the aid of an estimation method, where the integral of the cross-correlation spectrum is used for frequency estimations, as well as an averaging algorithm. Therefore, the cross-correlation spectrum is a very promising method, which could be used in many application areas such as robotics.
A lot of a signal's frequency information can be derived from the cross-correlation spectrum but, in most cases, it does not represent a frequency spectrum. Only when a sufficiently long signal part is used are frequencies visualized as delta pulses in the crosscorrelation spectrum. However, if the form of the functions, that represent the individual frequencies in the cross-correlation spectrum, can be predicted using the knowledge of necessary parameter values, the frequency spectrum could be derived from the crosscorrelation spectrum even with short signal parts. Therefore, a more detailed analysis of the cross-correlation spectrum is recommended. Furthermore, the creation of the crosscorrelation spectrum is currently computationally intensive. Thus, further research should be done to create methods reducing the calculation time.