Exploration of Generator Noise Cancelling Using Least Mean Square Algorithm

– Generator noise can be categorized as monotonous noise, which is very annoying and needs to be eliminated. However, noise-cancelling is not easy to do because the algorithm used is not necessarily suitable for each noise. In this study, generator noise was obtained by recording near the generator (outdoor signal) and from the room (indoor signal). Noise generator exploration is carried out to determine whether the noise signal can be removed using the Adaptive LMS method. Exploration was carried out by analyzing statistical signals, spectrum with Fast Fourier Transform (FFT) and Inverse FFT (IFFT), and analyzing the frequency distribution of the remaining noise. The results showed that the correlation coefficients were close to each other. Outdoor and indoor signals are at low frequency. The behavior of FFT and IFFT if described in two dimensions, namely real and imaginary axes, formed a circle with a zero center and has parts that come out of the circle. It confirms that noise-cancelling with adaptive LMS can be realized well even though some noise is still left. The residual noise has formed an impulse that showed normally distributed with mean  =-0.0000735 and standard deviation  =0.000735. This indicates that the residual noise was no longer disturbing.


I. Introduction
Many jobs need more concentration to get an optimal result. In many big cities, noise occurs from transportation activity, factory machines, building construction, road construction, and others. Many efforts have been made to reduce noise pollution, but not all noise pollution can be reduced. In other words, noise can not be eliminated 100%. This is because the noise style constantly changes quickly.
This research was an exploration to eliminate noise from the generator, which is monotonous so that it can be repeated periodically or at random stationery in a reasonably long-time interval. It was very annoying, especially if the sound was loud enough and lasted continuously. To overcome this, the exploration of generator noise is essential. Previous research about noise cancelling will also be explained in this chapter.
The research discussed the Least Mean-Square (LMS) adaptive filtering approach formulated to remove the deleterious effects of additive noise on the speech signal. Unlike the classical LMS adaptive filtering scheme, the proposed method is designed to cancel out the clean speech signal. This method takes advantage of the quasi-periodic nature of the speech signal to estimate the clean speech signal at time t from the value of the signal at time t minus the estimated pitch period. For additive white noise distortion, preliminary tests indicate that the method improves the perceived speech quality and increases the signal-to-noise ratio (SNR) by 7 dB in a 0 dB environment [1].
Another work on noise cancelling was research that investigated the innovative concept of adaptive noise cancellation (ANC) using feedback connection of least-mean-square (LMS) adaptive filters for the sake of hardware reduction. The concept of cascading and feedback for real-time LMS-ANC were also described. The simulation model gave variation in the distinct signals of LMS-ANC like error signal, output signal, and weights at various LMS filter parameters. An attempt has been made to provide a solution in order to improve the performance of cascaded LMS adaptive noise canceller in terms of filter parameters [2].
This research, the generator noise cancellation, was carried out using signals from outside the room as a reference signal and signals from the room to be silenced. For signal pickup, two microphones were installed to obtain a reference signal at the noise source and in the room where the noise would be canceled. The main algorithm used was Adaptive Least Mean Square (LMS). Fig 1 shows the configuration scheme of the generator noise canceling.

II. Methods
Before starting exploration and then doing noise cancelling, it was necessary to do research on the characteristics of the generator noise. Research was conducted on correlation, spectrum, and Fast Fourier Transform (FFT) of generator noise signals. It was important to confirm whether or not the generator noise can be eliminated. The steps of exploration for eliminating noise from the generator were recording the signal, observing the correlation of the signal in the room to be silenced and the reference signal, observing the spectrum of both signals and finally doing noise attenuation using the Adaptive LMS algorithm. The flowchart of this research was explained in Fig 2.

II.1. Recording the signals
Recording was done from inside and outside the room and must be done at the same time. There should be no time difference between taking the two signals. Because it will difficult to anticipate delays that arise.   It was clear that the signal recorded from outside or from near a noise source had a much higher amplitude. The signal from the outside was used as a reference. For further, the signal recorded from outside would be called the outdoor signal, while the signal recorded in the room to be silenced was called the indoor signal.

II.2. Correlation of the noise
Correlation would show the relationship between two data. To determine the behavior of each noise signal, autocorrelation and cross-correlation were performed. Correlation was divided into autocorrelation or self-correlation and crosscorrelation.
Autocorrelation or self-correlation was the comparison of data with itself at different times. It aimed to detect repeating patterns between data at certain intervals and other intervals. Crosscorrelation was a tool to predict a relationship between two data in a system. Correlation used a measure called the correlation coefficient, whose calculation formula was written in equation (1).
The values of X and Y were different, in this case, X was the indoor signal and Y was outdoor signal. For self-correlation (autocorrelation), the X and Y data were the same, but there were shifts made every time. The results of the correlation coefficient will be analyzed for both the autocorrelation of each signal and the crosscorrelation of the two signals. In this case, the calculation of the correlation coefficient was calculated by Matlab software [3]- [4].

II.3. Fast fourier transform (FFT) analysis
In performing a frequency analysis for a discrete time signal x(n) it was necessary to obtain a frequency domain representation of the signal which was usually expressed in the time domain. Discrete Fourier Transform (DFT) was used to perform frequency analysis of discrete time signals. DFT was calculated using equations (2) until (4).
Fast Fourier Transform, commonly abbreviated as FFT was an algorithm to calculate discrete Fourier transform (DFT) quickly and efficiently. The Fast Fourier Transform was applied in a wide variety of fields, from digital signal processing, solving partial differential equations, and algorithms for multiplying large integers. The time needed to calculate DFT becomes faster with the FFT. The FFT method works recursively by dividing the original vector into two parts, calculating the FFT of each part, and then combining them. This indicates that the FFT will be very efficient if the length of the vector was a number to the power of two [5]- [6].  The values of d and x were target and input respectively. Both were the same data but input x was a target that was delayed by one sample [4]- [5]. The adaptive LMS algorithm usually used with the linear combiner shown in Fig.6. With the input vector xk = [x1kx2k ··· xLk] T and the desired response is dk ∈ R. The weight, output and error equations were expressed in the equation, respectively (5), (6) and (7) the following [7]- [8].

II.4. Adaptive least mean square (LMS) algorithm
where wk was the weight vector and yk is the output. Mean Square Error (MSE) defined as Optimum Weight w* was where was a autocorrelation matrix, whereas was a cross-correlation matrix and the weight formula was stated simply in equation (12).
The value of the step size µ and the initial weight w0 could be determined first. The MSE value series ξk corresponds to wk forming a learning curve. The adaptive linear combiner as shown in Fig 6. [8].

III. Results and Discussion
The analysis of the research results would be explained in several sub-chapters, starting with observing the correlation and spectrum, followed by observing the LMS adaptive process and the remaining errors that occur.

III.1. Correlation result
The results of the autocorrelation and crosscorrelation research were shown in Fig 7 and   Looking at the coefficients for the polynomial terms x n (n integers), where the coefficients a n were very small for n greater than one. For that condition, in the graphical analysis it was sufficient to present the coefficients a 0 and a 1 for the terms x 0 and x 1 in cartesian coordinates and they will be very close. This condition confirms that these two noise have similarities, so that the percentage of successful removal of indoor signal with the outdoor signal as a reference was very large. Furthermore, the cross-correlation between the indoor and outdoor signals was showed in Fig 9. The results of the curve fitting for the crosscorrelation were significantly different from the autocorrelation results for each noise signal (outdoor and indoor). Table 1. showed the position of two coefficients of the fitting curve of the autocorrelation and the cross-correlation of the two signals and were depicted in Fig. 10.   Fig. 10 showed that the coordinate for autocorrelation of the outdoor signal closed to the coordinate for autocorrelation of the indoor signal, (-0.5;1) and (-0.6;1) respectively, while the crosscorrelation was quite far at (0;0.01). This explained that the two signals had the same effect from time t to t-1. However, the correlation between outdoor and indoor signals was small because there were delays and different distances in recording caused differences in amplitude.
Only using correlation was not enough to decide on the use of the LMS algorithm. This is because the correlation between indoor and outdoor signals was too small. Then the results of the fitting curve were analyzed from the auto-correlation and cross-correlation of the two signals. The auto correlation results show that the two signals had the same pattern. While the cross-correlation did not show the similarity. This was due to the delay which was quite disturbing and makes the two signals less correlated. This was what made this noise cancellation choose a robust LMS algorithm for noise removal for signals containing fairly large but monotonous random components. Because LMS works slowly but carefully.
The NLMS and RLS algorithms have been tried, but the results were increasing the noise. The NLMS algorithm used normalization in its calculations, so the imperfection of the normalization process in the first level became a problem for the next normalization [7]. The RLS algorithm requires quite heavy computations because it involved a large matrix size, so that the adaptation results were not optimal. The noisy RLS algorithm was replaced by the appearance of a hiss which was quite loud and disturbing [9].

III.2. Fast Fourier Transform Result
Before viewing the signal spectrum using FFT, we would first show the outdoor signal and indoor signal one by one ( Fig. 11 and Fig. 12). The outdoor signal or signal that will be the reference, was a signal that was close to the noise source, while the indoor signal was a signal that was in a room that would be silenced from the reference noise.
FFT results for outdoor and indoor signals, both were at low frequencies. This was quite beneficial when one signal becomes a reference for another signal. There was confirmation that from frequency observations, the reference signal (outdoor signal) and the input signal (Indoor signal) can cancel each other if the process was carried out in the frequency domain. It was explained in sub-section before that the two signals in Fig. 11 and Fig. 12 had the same pattern. Next, the spectrum of the two signals will be analyzed by describing the FFT of each signal, as shown in Fig. 13 and Fig. 14. For FFT results, it can be seen that both signals were at low frequencies around 0 to 0,5 hertz. This was quite beneficial when one signal becomes a reference for another signal.
Furthermore, the FFT of each signal was checked to see the pattern if the FFT was depicted on the real and imaginary axes. Fig. 15a were the real and imaginary values of the FFT outdoor signal, while Fig. 15.b is the real and imaginary value of the IFFT outdoor signal. The pattern of the two signals above was the same, but the coordinates of the two images were different. Fig. 16 explained the same thing as Fig. 15 for indoor signal. It can be concluded that the results of FFT and IFFT were centered on (0,0), which means that they had no DC component or zero frequency. The figures were circular but not perfect. From the analysis above, it can also be concluded that the perfect circle, which means that it was in the form of periodic harmonics, was the noise that can be removed, because the FFT or IFFT, which was a perfect circle, had a sine function which was easy to predict or adapt. While the rest, which was random (appears outside the circle were the impulsive components) was noise that cannot be eliminated (tends to be an error). For better comparison, the FFT and IFFT for the sine function were shown next. Given a sine function with k=1:0.01:50,000 and x = sin(2* *k) as shown in Fig. 17 and Fig. 18. [10]. From the results of the correlation analysis and the spectrum of the two signals, the percentage of successful cancelling the noise was very high. Furthermore, the noise cancelling process would be carried out using an adaptive LMS algorithm.

III.3. The Result of LMS Adaptive Noise Cancelling
Using the Adaptive LMS algorithm, the noise elimination process was carried out on indoor and outdoor signals. Outdoor signal as a reference signal, and indoor signal as an input signal. The µ value or step size was looked for, so that the error converged to a certain value, and the value was relatively small. In fact, after several experiments, the value of µ = 1.1 was the smallest µ value with a fixed average error, which was in the range of 0.00024962. Table 2 showed the µ and the average error obtained in the experiment with several µ values. In Table 2, it was explained that there were two mean error values. The first mean error value was the mean error value obtained from the error value as it was. The second mean error value were the mean error value obtained from the absolute error value. So, all errors were considered positive. In fact, that both values remained at a small µ value, but when the µ value reached 1.2 the absolute mean error changed, and the non-absolute mean error value was still quite small. So that the value of µ=1.2 was chosen as the optimal µ value.
Next, the output for various µ will be shown in Fig. 19. Hopefully that the output signal will be closed to indoor signal, so the error will be closed to zero.
If the signal in Fig. 12 compared to the output (Fig. 19), it can be seen that there was a difference in terms of oscillations. Fig. 12 quite a lot of oscillations were generated, but at the output signal shown in Fig. 19 for the value of µ=1.2, the oscillations were almost imperceptible, even Fig. 19 like the curve fitting of Fig. 12. Fig. 19 showed the output for µ=0.09; 0.15; 1.1 and 1.2. If the image for the values of µ=0.09 and µ = 0.15 was enlarged, it would be similar to the image with the output for µ=1.1 and and µ=0.2 as shown in Fig. 20 So it could be concluded that the signal pattern after adaptive LMS process for the µ values above were similar to the reference signal, so that the noise could be cancelled. To ensure the error that occur was really not disturbing, the frequency distribution of the errors that occur will be analyzed. Fig. 21 was the error obtained for the optimal µ value (µ=1.2).

III.4. Error Distribution After the LMS Adaptive Process
The frequency distribution of Fig. 21 can be shown in Table 3 and depicted in Fig. 22.  The curve fitting formed a quadratic equation .
If y was exponential, it will form a normal curve as shown in Fig 22 if the calculation was done mathematically, then the description was as follows: Normal Distribution: where,  was mean and  was variance. So that, if equations (13) and (14) were equivalent, it produced  =-0.0000735 and  =0.000735. These values were close to a normal distribution. In addition, the auto-correlation results (Fig. 23) formed an impulse, which indicated the presence of noise, so it can be concluded that the residual noise was white Gaussian noise that cannot be muffled anymore [11].

IV. Conclusion
The correlation coefficients of the curve fitting were closed to each other, outdoor signal (-0.05;1) and indoor signal (-0.064;1). Outdoor and indoor signals were in low frequency, around -10 to -80 Hz. The behavior of FFT and IFFT when described in two dimensions, namely real and imaginary axis, formed a circle with a zero center and had parts that come out of the circle. That part was a noise that can't be erased. All of them confirmed that noise cancellation with adaptive LMS can be realized well even though there was still residual noise. The residual noise was forming an impulse and was normally distributed with mean  =-0.0000735 and standard deviation  =0.000735. This indicates that the residual noise was no longer disturbing because the residual noise was white noise Gaussian