International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) LEAST MEAN SQUARE (LMS) ADAPTIVE FILTER FOR NOISE CANCELLATION 1 Prof. Vaishali M. Karne G.N.I.E.T, Nagpur, India v.karne03@gmail.com 2 Prof. Akhilesh Singh Thakur M.TECH [ Electronics and communication] G.G.I.T.M, Bhopal, India akhilesh.thematrix@gmail.com 3 Dr. Vibha Tiwari Ph.D [ Electronics and communication] ecggitm@gmail.com Abstract In the field of Digital Communication & signal processing, signals are associated with noise and distortions. This is due to the fact that system undergoes the time varying physical process which are unknown sometime. These variations can be eliminated using adaptive filtering as it senses the unknown variation in the signal properties. Finite impulse response (FIR) and Infinite impulse response (IIR) filters are available for adaptation process. amongst both of them FIR is widely used adaptive filter. The approaches of adaptation can be achieved by least mean square (LMS), wiener filter, recursive least squares filter (RLS) etc. LMS is the best suited filter for adaptive filter in noise cancellation and many other applications. Noise cancellation can be achieved by using proper value of the parameters. In this paper the performance of LMS filter is used for noise cancellation in voice signal. The step size (µ) is considered to be the parameter where we can make the changes. Keywords: LMS adaptive filter (least mean square), FIR (finite impulse response), IIR (infinite impulse response), Step size. 1. INTRODUCTION In number of applications, including biomedical engineering, radar, sonar and digital communications, the main aim is to identify and separate a useful signal corrupted due to interference and noise. The most familiar method of figuring and computing a signal corrupted by additive noise’ is to allow it to pass through the filter which will aim to suppress the noise without changing the signal. Filters that can be used for the following purpose are fixed or adaptive. Fixed filters are designed with the knowledge of signal as well as noise. On the other hand Adaptive filters, are capable of adjusting automatically the parameters, and the design does not requires knowledge of previous signal or noise characteristics. Noise cancellation is a contrast of optimal filtering which is advantageous in many other applications. The reference input which is derived from the noise field are used where the signal is poor or unpredictable. This extracted input is then filtered and deducted from the initial input containing signal and noise both. The resulting initial noise is extenuate or discard by noise cancellation As compared to the conventional filter design techniques, adaptive filters does not consist of constant filter coefficients and previous information is also unknown. Thus the filter with adjustable parameters is known as adaptive filter. Adaptive filter self adjusts their coefficients to minimize the error signal, which can be accomplished as finite impulse response (FIR), infinite impulse response (IIR), lattice and transform domain filter. LMS filter is the simplest one as it minimizes the instantaneous square error and simple gradient-based optimization method [5]. Among all the other algorithms, the Least Mean Square (LMS) algorithm is most suitable for the adaptation of the Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) filter coefficients. Thus, the objective of operating under changing conditions and readjust itself continuously to minimize the error is fulfilled by the LMS algorithm [8]. There are various parameters related to signal processing including step size, hopping parameter and proper use of random noise signal, etc. Further working on this parameter we can minimize noise and proper use of such parameters helps in noise cancellation. Adaptive filtering is now being used in many signal processing application areas such as: 1. System Identification 2. Signal control 3. Echo cancellation 4. Signal prediction 5. Adaptive feedback cancellation 6. Noise cancellation 7. Communications, etc. [6] [9]. In this paper we are more concentrated on noise cancellation which will be achieved by the Adaptive filter using LMS algorithm. The distinct values cannot be expected from LMS algorithm, but it does promise for the mean convergence. Thus even if the weights are varied by a small amount, optimal weights are affected. However mean would be inaccurate, if the variance is large. It is because of not choosing the proper value of step size µ.step size can decrease the steady-state error, but the convergence rate will be poor. A larger step size can speed up the convergence rate, but at the same time it increases the steady-state error [4]. Step adjustment strategy of the algorithm is advanced to some extent, but the step changes sharply when the algorithm error approximate zero, as may increase the steady-state error [10] but further variation in the step size can improve the above mentioned error. Conclusively it will result in reduction of noise. This paper is organized as follows, in section (2) explains about the LMS Adaptive Filter. Section (3) explains about the Noise Cancellation, (4) proposed LMS adaptive filter for noise cancellation, (5) Provides the simulation results, (6) gives software simulation of design, (7) the future scope is discussed and (8) provides the conclusion. 2.LMS ADAPTIVE FILTER LMS adaptive filter is used world wide because of its easy computation and flexibility. This algorithm [2] is a member of stochastic gradient algorithm , and because of its robustness and low computational complexity it is used worldwide. The algorithm using the steepest distance [2] is as given below. W (n+1) =w (n)-µ J (W (n)) (1) J (W (n)) =-2pdx+2Rxw (n) (2) Where Rx and pdx are the instantaneous estimates and are defined as Rx x (n) xT (n), pdx d (n) x (n) (3) Substituting equation (1) and (2) in the above equation we get W (n+1) = w (n)+2µe(n)x(n) (4) Where Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) Y (n) =WT (n) x (n) . (5) E (n) = d (n)-y (n) (6) The above two equations are required output of LMS algorithm where y (n) is the filter output and e (n) is the error. Figure below shows the block diagram of [12] adaptive filter Figure (1) A Typical Adaptive filter block diagram If the values of d (n) and y (n) will become equal we will get zero error. This filter could be used in combination of various other applications discussed above but our main focus is on noise cancellation. There are number of parameters related to LMS adaptive filter, which could differently play an important role in order to reduce the error. Various applications are also there, which are already discussed above can also be analyzed using LMS filter. In this paper noise cancellation is achieved by variation in LMS algorithm, i.e. step size. LMS adaptive filter also deals with the problem of Adaptive Noise Cancellation (ANC) for signal corrupted with an additive white Gaussian noise. 3. NOISE CANCELLATION Noise cancellation is a scheme of figuring out signals corrupted by additive noise or interference. From the figure [13] given below it is clear that this system is comprised of primary as well as reference input. Input to the primary one is Signal source and indirectly noise source as well, Input to the reference one is Noise source. Figure (2) Adaptive Noise Canceller From [13] the output (z) can be analyzed which is a combination signal and noise with adaptive filter. This can be analyzed from the following equations [13]. Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) z = s + n0-y (1) Squaring both the side we get z2= s2 + (n0- y)2 + 2s (n0- y) (2) Taking expectations (3) of both sides and realizing that s is uncorrelated with n0 and with y, yields E[z2]=E[s2]+E[(n0-y)2]+2E[s(n0-y)] =E [s2] +E [(n0-y)2 ] The signal power E [s2] will be unaffected as the filter is adjusted to minimize E [z2]. Accordingly, the minimum output power is min E [z2]= E[s2]+min E[(n0-y)2] (4) Thus When the filter is adjusted so that E [z2] is minimized, E [(n0-y)2 ] is, therefore, also minimized. The filter output y is then a best least squares estimate of the primary noise no. Moreover, when E [(n0-y)2] is minimized, [(z -s)2] is also minimized, Therefore (z -s) = (n0- y). (5) Adjusting or adapting the filter to minimize the total output power is thus tantamount to causing the output z to be a best least squares estimate of the signal s for the given structure and adjustability of the adaptive filter and for the given reference input. The output z will contain the signal s plus noise. The output noise is given by (n0 -y). Since minimizing E [z2] minimizes E [(no - y)2] minimizing the total output power minimizes the output noise power. Since the signal in the output remains constant, minimizing the total output power maximizes the output signal-tonoise ratio. Noise cancellation can be achieved by various other methods, as we have reviewed that step size variation plays an important role for noise cancellation. Other parameters are also associated which can be adjusted in order to achieve noise cancellation. Next we will discuss proposed methods for the same. 4.PROPOSED LMS ADAPTIVE FILTER FOR NOISE CANCELLATION In this paper we have proposed generated voice signal with voice=cos2Πf1t. This voice is corrupted by noise & noise = cos (2Πf1t. ^2). This signal is mixed with noise and need to be repaired while reception but we are familiar with AWGN (Additive white Gaussians noise) which is a random known noise. We will again mix our signal with random noise with random noise ref=noise+.25*rand. Now the signal seems to be corrupted with noise as well as noise is random in nature. Such type of uncertainty and variation can be sensed by LMS adaptive filter . The LMS filter can work in many different ways by working on different parameters. In this paper we are concentrating on step size µ. In our proposed paper value of µ is selected to be ( 0.006) and the changes we made is by corrupting the signal not only with noise but the random noise is also introduced and the signal nearest to the original signal is generated. The simulated results are shown below. Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) 5.SIMULATION RESULT The program in this proposed paper is written on MATLAB. Figure below shows the simulation results and various waveforms of associated signals. The first waveform shows the voice signal generated of amplitude (A=1) and time period (T=2). Second waveform shows the noise generated i.e. noise wits voice of same time period and amplitude (A=2). Again the same signal is mixed with random noise which is shown in third waveform. After applying LMS algorithm the resultant signal is produced which is close to the original signal. voice signal 1 0 -1 0 0.2 0.4 0.6 0.8 1 1.2 1.4 primary = voice + noise (input1) 1.6 1.8 2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 reference (noisy noise) (input2) 1.6 1.8 2 0 0.2 0.4 0.6 1.4 1.6 1.8 2 0 0.2 0.4 0.6 1.4 1.6 1.8 2 2 0 -2 2 0 -2 0.8 1 1.2 Adaptive output voice 2 0 -2 0.8 1 1.2 Figure (3) Simulation result. 6. SOFTWARE SIMULATION OF DESIGN In order to work on Noise cancellation with less error, the Adaptive filter must be designed with proper Digital Signal Processing. It will be achieved using MATLAB. It gives an easy approach for designing and help throughout the programming for the beginners as well. MATLAB software is the best suited software for filters. Programming in the proposed paper as well as the simulation is done on MATLAB. 7. FUTURE SCOPE For proper functioning of the filter we can make the changes in the filter itself, by choosing the type of filter and the order of the Filter. As the noise cancellation is done on voice signal, it can also be achieved in various applications where the pure form of signal is required. ECG and EEG are such examples. In the proposed paper the value of step Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) size is (µ=0.006), which can also be changed but the result be different from the nearest value of the original signal. We can even make the changes in order of step size rather than making changes in step size which can reduce the steady state error as it is always observed while changing the step size. 8. CONCLUSSION Based on the mathematical solutions and the Adaptive filter theory we have proposed adaptive filter design and an algorithms for noise cancellation. With the variation in step size as in noise are reduced but steady state error increases. At the same time in the Algorithm itself we can make changes, by changing the values of parameters separately or combine. After getting required simulation results the values are finalized. The value of step size chosen to be best suited for the original signal to be generated. REFFERENCES [1] Asit Kumar Subudhi1, Biswajit Mishra 2, Mihir Narayan Mohanty3*, “VLSI Design and Implementation for Adaptive Filter using LMS Algorithm” (IJCCT), Volume-2, Issue-VI, 2011 [2] Alexander D. Poularikas, and Zayed M. Ramadan, "Adaptive filtering primer with matlab," CRC, 2006.. [3] Haiquan Zhao, “Novel adaptive VSS-NLMS Algorithm for System Identification 2013 Fourth International Conference on Intelligent Control and Information Processing” (ICICIP) June 9 – 11, 2013, Beijing, China [4] A Radhakrishna y and T. ravi Kumar naidu” Improving the Convergence Rate Based On Extend Variable Step Size CMA” International Journal of Engineering Trends and Technology (IJETT) - Volume4Issue5- May 2013. [5] Deepika and K.K saini “Review of methods of Adaptive Noise Cancellation Using LMS and NLMS Algorithms” IJSR , Volume : 2 | Issue : 6 | June 2013 • ISSN No 2277 - 8179. [6] s.Hykin, Adaptive filter Theory, 4th ed, upper sadle river, NJ:prentice-Hall, 2001 [7] J.Jenitta, Dr.A.Rajeswari “Denoising ofECG Signal based on Improved Adaptive filter with EMD and EEMD” 2013 IEEE Conference on Information and Communication Technologies [8] Hazel Alwin Philbert, Prof. S.P.Deshpande “An Effective Implementation of Noise Cancellation for Audio Enhancement using Adaptive Filtering Algorithm” (IJLTET) 2013. [9 Widrow, Bernard; Stearns, Samuel D. (1985). Adaptive Signal Processing. Englewood Cliffs, NJ: Prentice Hall. ISBN 0-13-004029-0. [10] Jingfan QIN, Jingzheng OUYANG, ”A new variable step size adaptive filtering algorithm”, Journal of Data Acquisition &Processing, 1997,12(3):171-194 [11]Aboul Ella Hassanien, Amr Badr, "A Comparative Study of Digital Mamography Enhancement Algorithms based on Fuzzy Logic". [12] Farzad Nekouei*, Neda Zargar Talebi*, Yousef S. Kavian*, Ali Mahani**”FPGA Implementation of LMS Self Correcting Adaptive Filter (SCAF) and Hardware Analysis”2012 IEEE [13] Mamta M. Mahajan, S. S. Godbole “Design of Least Mean Square Algorithm for Adaptive Noise Cancelle"r” (IJAEST) 2011 Vol No. 5, Issue No. 2, 172 – 176 [14] B. Widrow, Adaptive filters 1: Fundamentals,‖ Stanford Electronics Lab., Stanford Univ., Rep. SUSEL-66126, Dec. 1966 Organized By: GNI Nagpur, India International Journal of Application or Innovation in Engineering & Management (IJAIEM) Web Site: www.ijaiem.org Email: editor@ijaiem.org, editorijaiem@gmail.com ISSN 2319 - 4847 Special Issue for National Conference On Recent Advances in Technology and Management for Integrated Growth 2013 (RATMIG 2013) [15] Yonggang Yan, Junwei Zhao (lCCASM 2010) “An Novel Variable Step Size LMS Adaptive Filtering Algorithm Based on Hyperbolic Tangent Function” (lCCASM 2010) Organized By: GNI Nagpur, India