Implementation of Noise Cancellation Using Adaptive Algorithms in GNU Radio
Implementation of Noise Cancellation Using Adaptive Algorithms in GNU Radio
Implementation of Noise Cancellation Using Adaptive Algorithms in GNU Radio
Abstract—The demand for wireless communication system useful data. As a result, processing of signals is frequently
design is on the rise recent days. When data is transferred tailored with a given application [8]. Filters that adaptto
through a wireless channel, the noise on the channel has a larger the situation, unlike traditional usage of constant filter
probability of affecting the information. The suggested project coefficients is not used in filter design procedures and do not
attempts to aid in the reduction of noise through the use of an require prior knowledge.
adaptive filter in order to ensure reliable communication. In this
way noise cancellation plays an important role in digital An adaptive filter is a filter with adjustable settings.
communication. GNU Radio is an open framework for building Finite impulse response (FIR), infinite impulse response
real-time signal processing applications on low-cost single-board (IIR), lattice, and transform domain filters are adaptive
computers. C++ and Python language is suitable for backend in filters that change the coefficients of their coefficients to
GNU radio. MATLAB and python simulation for different decrease an erroneous signal [9]. The transversal filter,
algorithms helps in analysing reduced noise and rate of which employs the least mean square (LMS) and
convergence. normalized least mean square (NLMS) algorithms, is the
most frequent form of adaptive filter. Any undesired
Keywords—Adaptive Noise cancellation (ANC), Adaptive signal, whether created by electrical, acoustic, vibration, or
filtering, GNU Radio, LMS Algorithm, NLMS algorithm, RLS any other medium, is defined as noise in this work.
algorithm.
Adaptive algorithms are used in this project to reduce or
I. INTRODUCTION reframe the original signal several types of noise to get the
desired signal [10]. An adaptive noise cancellation
In wireless communication systems, unwanted generated technique works by sending the corrupted signal via a
signals can corrupt the signals, which must be eliminated to noise-suppression filterwhile leaving the signal alone [11].
restore the original signal. Adaptive filters like LMS, NLMS, No prior knowledge of signal or noise characteristics is
and RLS have been used to do this [1]. Depending on the required because this is a flexible method [12]. Adaptive
frequency, noise may appear randomly or as a frequency- filtering is done using both FIR and IIR filters, but the FIR
dependent distribution. Noise encompasses all disturbances filter is significantly more practical and extensively
including those caused by the environment or by the parts of utilized filter compared to IIR filter [13-15].
sensors and circuits, in addition to thermal noise. A wide range
of internal and external sources can provide noisy data [2]. In II. ADAPTIVE ALGORITHMS
the measurement application, the signal of interest becomes
contaminated by noise occupying the same band of frequency A. LMS Algorithm
[3], consequently overlapping occurs among the desired The Least Mean Square (LMS) method is considered as a
narrow band signal and the broad band noise. The use of linear member of most basic and extensively used adaptive filtering
filters is insufficient if the signal statistics are not known over algorithms. To find a cost function optimal coefficient vector,
time, as this prevents the filter coefficients from being the LMS algorithm uses the stochastic gradient descent
determined in advance [4]. Utilizing filter algorithms that approach. If the step-size parameter is appropriately adjusted,
converge more quickly to the unknown environment is the tap-weight vector computed using the steepest descent
necessary due to the real-time changes in signal and noise technique will converge to the optimal wiener solution.
characteristics [5]. Exact measurements ofthe gradient vector are not achievable
since the optimum wiener solution requires prior knowledge
As the amount of engines, transformers, compressors, and of the autocorrelation matrix and cross correlation vector of
blowers are examples of industrial equipment that are rising the tap inputswith the expected response. As a result, while
in price worries about acoustic noise become more evident operating in an unknown environment, the gradient vector
[6]. To remove the undesirable noise signal, the classic must be computed using the data supplied. After
method to noise cancellation via acoustics involves estimating the vectorof gradient, recursively updating the tap
enclosures, barriers, and silencers are examples of passive weight vector is possible using the following relation (1) [16]
approaches [7]. Signal processing can be used to extract or
enhance information that is relevant from a cacophony of
conflicting input which is more accurate. Signal processing w(n + 1) = w(n) + µE{e(n)x(n)} (1)
is a method of gathering, enhancing, storing, and transmitting
Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:31 UTC from IEEE Xplore. Restrictions apply.
After estimating the vector gradient, recursively g(n). Finally, combining the equations leads to the
updating the tap weight vector is possible using the exponentially weighted Recursive Least Squares RLS
following relation. Where u is the step size, w(n) is the algorithm [17].
weight value estimate vector at time n, x(n) is the vector of
the input signal, e(n) is the vector of the filter error, and
µ is the step-size, which controls the rate of filter
convergence. And the general behavior of the filter,
E{e(n)x(n)} is a commonly unknown expectation.
Step-size selection is the first stage in the LMS
adaptive filter implementation. This parameter must be
within a certain range. In order to converge the LMS
algorithm, the following conditions must satisfy equation
(2):
2
0µ 2
(2)
λ max
Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:31 UTC from IEEE Xplore. Restrictions apply.
IV. RESULTS AND DISCUSSION
This project is implemented using various adaptive
algorithms like LMS, NLMS and RLS for comparing and
verifying the noise cancellation. These algorithms are
compared in various softwares like MATLAB, python
IDE and GNU Radio for same input. The performance of
the algorithms is compared using audio files. Noise
cancellation depends onthe Mean Square Error (MSE). By
comparing all the three algorithms, it is observed that RLS
has very fast convergence rate compared to NLMS and
RLS algorithms, but LMSis better in cancelling the noise
because the LMS adaptive filter doesn’t require the prior
coefficient.
A. GNU Radio Results
In this section, output of GNU radio is shown in
Figure 4. Initially, noise cancellation is done by providing
an audio signal along with noise as an input which is then
undergone through various forms of settings like beam
forming and coherent processing. Thereafter, whenever
Fig. 2. Flow chart of LMS adaptive filter algorithm. interference filter key is on, noise is removed and
recovered back the original signal.
B. NLMS algorithm implementation
The normalized version of the LMS algorithm is NLMS
algorithm. NLMS algorithm overcomes the issue present in
the LMS by means of computing maximum step size value.
Both the loop variable (i) and the weight parameter (w) are
initially set to zero. The filter output is computed in the
following step, and it is then utilized to calculate the error
estimate signal. In accordance with the determined step size
value (µ), the filter weights are changed until the loop
parameter matches the buffer size, this process is repeated.
C. RLS algorithm implementation
Non-recursive filters use the most recent and prior input
samples to determine its output.The fact that non-recursive
filters are quite stable in characteristic. Since FIR filters
are often non-recursive, they are also consistently stable.
The recursive filter is one whose output samples may
depend on earlier output samples as well as the present and
earlierinput samples. Fig. 4. Filtered outputs.
Figure 3 Block diagram of RLS adaptive filter algorithm, B. Comparison of Adaptive algorithms in Matlab.
x(n) is the input reference signal and w(n) is the variable In this section, simulation results of adaptive algorithms and
filter, these two undergoes summation and the error is
co is displayed. By looking into the comparison simulation
reduced by updating the algorithm. Here, regularization
results we compared.
parameter is indicated by ∆. This regularization parameter
value is measured with the help of SNR of the signals. The C. LMS Algorithm
resultant multiplication is summed up with the weight The Figure 5 represents the output of LMS algorithm
vector in order to restore the value of weights to its correct which represents different wave forms for various step
value. size. X-axis and Y-axis represents the average squared
error and number of iterations respectively. Noise can be
reduced by varying the step-size of the filter. The
simulation using the LMS adaptive filter algorithm
attenuates the noise from the noise corrupted speech
signal. The optimized result of the designed algorithm is
determined in the range of step size µ.
Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:31 UTC from IEEE Xplore. Restrictions apply.
Fig. 5. Output of LMS algorithm.
E. RLS Algorithm
Figure 8 and 9 represents the output before and after
applying the RLS algorithm for speech signal respectively.
This algorithm is proved to be very effective in noise Fig. 10. Output before applying algorithms.
cancellation as it gives more attenuation than any other
algorithms and possess high convergence rate. This
performance comes at the cost of computational complexity
and large filter order is required for noise cancellation, this is
not feasible for implementation which is clearly observed in
the waveform. By using this algorithm, it is unable to predict
the noise free signal in each iterations due to its fast
convergence rate. Prediction of signal is much difficulty in
RLS algorithm.
Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:31 UTC from IEEE Xplore. Restrictions apply.
V. CONCLUSION Conference on Bio-engineering for Smart Technologies (BioSMART),
2019, pp. 1-4, doi: 10.1109/BIOSMART.2019.8734211.
On comparison of all three algorithms, it is observed that [15] W. Loedwassana, "A Variable Step Size Algorithm of LMS Algorithm
LMS is the best algorithm for noise cancellation because of its based on Squared Autocorrelation Criterion," 2019 7th International
slow convergence rate. Due to its less complexity and more Electrical Engineering Congress (iEECON), 2019, pp. 1-4, doi:
stability it is proved to be a better algorithm in cancelling the 10.1109/iEECON45304.2019.8938891.
noise other than NLMS and RLS. The filters designed are [16] W. Loedwassana, "A Variable Step Size Algorithm of LMS Algorithm
capable of providing adaptability, low output noise, and based on Squared Autocorrelation Criterion," 2019 7th International
Electrical Engineering Congress (iEECON), 2019, pp. 1-4, doi:
minimal signal distortion. To minimize noise in the required 10.1109/iEECON45304.2019.8938891.
signal, optimal filter designs are applied. The designed [17] W. Loedwassana, "A Variable Step Size Algorithm of LMS Algorithm
adaptive algorithms on noise-corrupted speech signals can based on Squared Autocorrelation Criterion," 2019 7th International
successfully eliminate the noise signal. Hence comparison of Electrical Engineering Congress (iEECON), 2019, pp. 1-4, doi:
different adaptive algorithms is validated by the simulation. 10.1109/iEECON45304.2019.8938891.
Authorized licensed use limited to: SRM Institute of Science and Technology. Downloaded on January 24,2024 at 08:51:31 UTC from IEEE Xplore. Restrictions apply.