24 pages from adaptive noise cansellation by lms algorithm

Upload: -

Post on 04-Jun-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    1/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    2/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    3/24

    KOLE] UNIVERSITI TEKNOLOGI TUN HUSSEIN ONNBORANG PENGESAHAN STATUS TESIS

    JUDUL: ADAPTIVE NOISE CANCELLATION BY LMSALGORITHMSESI PENGAJIAN: 2003/2004

    Saya SHARIF H BINTI SAON(HURUF BESAR)mengaku membenarkan tesis (PSM/Sarjana/ Doktor Falsafah)* ini disimpan diPerpustakaan dengan syarat-syarat kegunaan seperti berikut:I. Tesi s ini adalah hakmilik Kolej Universiti Teknologi Tun Husse in Onn2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.3. Perpustakaan dibenarkan membuat salinan tesis ini sebagai bahan pertukaran

    antara institusi pengajian tinggi.4 **Sila tandakan (v )o SULIT

    TERHAD

    (Mengandungi maklumat yang berdarjah keselamatan ataukepentingan Malaysia seperti yang terma ktub di dalamAKTA RAHSIA RASMI1972)(Mengandungi maklumat TERHAD yang telah ditentukanoleh organisasi/badan di mana penyelid ikan dijalankan)

    TIDAK TERHAD

    TANDATAlamat Tetap:NO 52, JALAN MAHMOODPARIT JAWA PM HJ MOHD IMRAN BIN GHAZALI

    Nama Penyelia4150 MUAR, JOHORTarikh: _ I . . . J . / _ O . . . . : . l . . . J . / ~ Q . : : . . O = O ~ Tarikh: ---..:. l.=-ft_CJ1.=---:.......l/:-.-CJ\f-- -

    CATATAN: Potong yang tidak berkenaan. Jika tesis ini SULIT atau TERHAD. sila lampirkan surat daripada pihak

    berkuasalorganisasi berkenaan dengan menyatakan sekali sebab dan tem poh tesisini perJu dikelaskan sebagai SULIT atau TERHAD. Tesis dimaksudkan sebagai tesis bagi Ijazah Doktor Falsafah dan Saciana secarapenyelidikan, atau disertasi bagi pengajian secara kerja kursus dan penyelidikan,atau Laporan Projek Sarjana Muda (PSM).

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    4/24

    Wedeclare that I have read this thesis and in our opinion,it is suitable in terms of scope and quality for the purpose of

    awarding a Master Degree of Electrical Engineering .

    SignatureSupervisor IDate

    SignatureSupervisor IIDate

    Assoc. Prof. Hj Mohd Imran B Ghazali~ o=t /0t

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    5/24

    D PTIVE NOISE C NCELL TION BY LMS LGORITHM

    SH RIF H BINTI S ON

    project report submitted as partial fulfillmentof the requirements for the award of theMaster Degree of Electrical Engineering

    Department of Electrical EngineeringFaculty of Engineering

    Kolej Universit i Teknologi Tun Hussein nn

    APRIL 2 4

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    6/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    7/24

    To y husband Abd Kadir Bin Mahamad,My child s,Mohamad Azri and Nur Aliah

    11l

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    8/24

    V

    ACKNOWLEDGEMENTS

    I would like to express my appreciation t my thesis supervisors Assoc. Prof.Hj. Mohd Irnran Bin Ghazali and Prof. Dr. Hashim Bin Saim for their excellentguidance suggestions contributions and encouragement throughout this study.

    I would like to thank all my friends for supporting and standing by methrough this year.

    This work would not have been possible without the support and love ofmyfamily. I would also like to thank my family.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    9/24

    v

    ABSTRACT

    The research on controlling the noise level in an environment has been thefocus o many researchers over the last f w years. Adaptive noise cancellationANC) is one such approach that has been proposed for reduction o steady state

    noise. In this research, the least mean square LMS) algorithm using MATLAB wasimplemented. Step size determination was done to determine the best step size andeffects o the rate o convergence. Sound recorder was used to record sound andsaved as .wav file. Graphical user interface GUI) was created to make it userfriendly. The output o the analysis showed that the best step size was 0.008.Smaller step size o 0.001 tend to lower the speed o convergence, and too big a stepsize, 0.8 tend to cause the system to diverge. Analysis on synthesized data showedthat the noise reduction did not eliminate the original signal. The implementation onactual data showed slight difference between the output and input level. In realsituation, as in theory, this technique can be used to reduce noise level from noisysignal without reducing the characteristic o the signal.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    10/24

    V

    BSTR K

    Penyelidikan terhadap pengawalan paras kebisingan dalam persekitaran telahmenjadi fokus penyelidikan beberapa tahun kebelakangan ini. Penyesuaianpenghapusan kebisingan ANC) adalah salah satu pendekatan yang dapatmengurangkan keadaan tetap kebisingan. Dalam penyelidikan ini, algoritma puratakuasa dua terkecil LMS) menggunakan MATLAB digunakan. Penentuan saizlangkah dilakukan untuk menentukan saiz langkah yang terbaik dan kesannyaterhadap kadar penumpuan. Perakam bunyi digunakan untuk merakam bunyi dandisimpan sebagai .wav fail. Antaramuka pengguna bergambar GUI) direka bagimenjadikannya mesra pengguna. Hasil analisis yang diperolehi, didapati saizlangkah yang terbaik adalah 0.008. Saiz langkah yang lebih kecil, 0.001menyebabkan kadar penumpuan menjadi perlahan dan bagi saiz langkah yang terlalubesar, 0.8 sistem akan mencapah. Analisis keatas data yang direka menunjukkanpengurangan bising tanpa menjejaskan isyarat asal. Perlaksanaan data sebenarmenunjukkan hanya sedikit perbezaaan diantara paras isyarat keluaran dan masukan.Dalam situasi sebenar, secara teorinya teknik ini mampu untuk mengurangkan parasbising dari isyarat tanpa mengubah ciri isyarat tersebut.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    11/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    12/24

    V

    THEORY3 1 Application ofAdaptive Filter 11

    3 2 Stochastic Gradient Approach 153 3 Adaptive Fil ter with LMS algorithm 16

    3 3 1 Digital Filter 173 3 2 Adaptive Algorithm LMS 19

    algorithm)3 3 2 1 Summary of the LMS 23

    3 3 3 Property of the LMS 243 3 3 1 Stability Constraint 243.3.3.2 Convergence rate 253 3 3 3 Time Constant 263.3.3.4 Excess Mean Square Error 27

    3.4 Adaptive Noise Cancellation ANC) 273 5 Signal To Noise Ratio 28

    IV RESEARCH METHODOLOGY4 1 Review 294.2 Algorithm 30

    4 2 1 Step size determination 304 2 2 Simulation for Sinusoidal Input 344 2 3 Simulation for Synthesized Data 344.2.4 Simulation for Actual Data 34

    V RESULT AND DISCUSSION5 1 Step Size Determination 38

    5 1 1 Summary of the step size programme 395 1 2 Result for step size determination 40

    5 2 Sinusoidal Simulation 475 2 1 Summary of the sinusoidal 48

    programme5 2 2 Result for sinusoidal simulation 49

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    13/24

    5 3

    5 4

    Synthesized Data Simulation5 3 1 Summary of the synthesized data

    programme5 3 2 Result for synthesized dataActual ata Simulation5 4 1 Summary of the actual data

    programme5 4 2 Result for actual data

    VI CONCLUSION7 17 2

    Conclusion of the ResearchRecommendation for Future Research

    REFERENCESAPPENDIX

    5253

    555959

    IX

    61

    6364

    6568

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    14/24

    x

    LIST OF TABLES

    NO OF T BLE TITLE PAGE

    2 1 Opposition and similarity oftime domain and frequencydomain adaptive noise cancellation 8

    3 1 Application of adaptive filter 143.2 Summary of the LMS algorithm 235 1 a) MSE for step size = 0.001 415 1 b) MSE for step size = 0.008 425 1 c) MSE for step size = 0.8 435.2 Number of iterations for step size test 445.3 Number of iteration for filter order test 46

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    15/24

    Xl

    LIST OF FIGURES

    NO OF FIGUR TITLE PAGE

    2 1 The split noise canceller 73.1 Four basic classes of adaptive filter application 143.2 General block diagram of adaptive filter 173.3 Block diagram ofdigital filter 193.4 Block diagram ofLMS adaptive filter 224 1 Step size detennination 314.2 Simulation for sinusoidal input 324.3 Simulation for synthesized data 334.4 Block diagram for simulate actual data 354.5 Experimental setup 354.6 Actual data simulation 365.1 GUI for step size detennination 385.2 a) Learning curves with step size = 0.001 415.2 b) Learning curves with step size = 0.008 425.2 c) Learning curves with step size = 0.8 435.3 Step size detennination with different filter order L) 455.4 GUI for sinusoidal simulation 475.5 Simulation result for sinusoidal input with several step 49

    size5.6 Filtered signal for sinusoidal data with different filter 51

    order L)5.7 GUI for synthesized simulation 52

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    16/24

    NO OF FIGUR TITL

    5.85.9

    5.10

    5.115.12

    Pop up windows to load the fileSimulation result for synthesized data with different stepsizeFiltered signal for synthesized data with different filterorder L)GUl for actual data simulationSimulation result for actual data

    Xll

    PAGE

    5456

    58

    596

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    17/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    18/24

    LIST OF APPENDICES

    APPANDIX TITLE

    A

    B

    Table A-I: MSE for 4 8 and 16 filter orderTable A-2: MSE for 32 64 and 128 filter orderMATLAB code for sinusoidal programme

    xiv

    PAGE

    689

    70

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    19/24

    CH PTER I

    INTRODUCTION

    1 1 Background

    Acoustic problems in an environment has gained more attention due to thetremendous growth of technology that lead to noisy engines, heavy machineries,pumps, air condition, music and other noise sources. These acoustic problemssometime can disturb the neighbours next door. Normally human ears are verysensitive at audio range lower frequency) from 20 Hz to 20 kHz, even though itdepends on the age and physical condition of a person. So, any sound within thesefrequencies has the tending to disturb human hearing and can be classified as noise.

    The reduction of acoustic noise in speech has been investigated for manyyears [3]. The major application of noise reduction is by improving voicecommunication at noisy sites using noise cancelling microphones [1]. In thesemicrophones, the near-field response is independent of frequency and the far-fieldresponse is similar to high-pass frequency. Another technique is by using a singleinput that exploits the noise model. The noise model is estimated when speech isabsent.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    20/24

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    21/24

    from its abil ity to perfonn well for both static and dynamic noise disturbances, easyto implement and effective to use. This adaptive process, mean it does not requireknowledge of signal or noise characteristic.

    To record the sound recording of an air condition in a ~ o producIngunwanted noise , the sound recorder must filter out other disturbances. n adaptivefilter can trace that noise, and reduce it so that it can produce suitable soundrecording.

    3

    Base on this situation, a filter code with least means square LMS) algorithmusing MATLAB was through to be able to eliminate or reduce periodic noise fromaudio signal and was implement in this project. The filtered audio signal wasrecorded and so the clean signal could be played back.

    1 3 Research Objectives

    The project was to implement the least means square LMS) algori thm usingM TLAB for noise reduction level in audio signal.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    22/24

    1 4 Scope of Research

    The scopes of the research:-I. Writing LMS algorithm using MATLAB.2 Generate model for system identification to determine the suitable

    step size.3 Data is an audio signal collected in closed room using sound

    recorder.4 Data will be simulated using LMS algorithm to reduce noise in an

    audio signal.5 Implement an existing code to reduce periodic noise in audio signal.

    1.5 Report rganization

    The next chapter will discuss on reviews of different approaches to the noisecancellation problem. Chapter i l l will discuss the theoretical parts of adaptive noisecancellation adaptive filter and algorithm used in this project the derivation andequations involved in LMS algorithm. Then proposed adaptive noise cancellation byLMS algorithm scheme will be discussed and the methodology of this proposed willbe elaborated in Chapter IV.

    The main objective of this project is to implement LMS algorithm usingMATLAB that can reduce the noise from the noisy signals. Chapter V discusses thegraphical user interface that was created for the research and results of thesimulation. The conclusion of this project and the recommendation for future workare highlighted in the last Chapter of this report.

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    23/24

    CHAPTER II

    LITERATURE REVIEW

    2 1 Review

    The initial work on adaptive echo cancellers started around 1965[10]. Itappears that Kelly of Bell Telephone Laboratories proposed the echo cancellationusing adaptive filter, where the speech signal itself was utilized in perfonning theadaptation [12]. In 1975, Widrow et al has originated the adaptive line enhancer tocancel60-Hz interference at the output of n electrocardiography amplifier andrecorder. The adaptive echo cancellers and adaptive line enhancer is an example ofthe adaptive noise cancellation.

    Research on adaptive filter started earlier than adaptive noise cancellation,that is around 1950s. The least mean square LMS) algorithm was one of theadaptive filter devised by Windrow and Holf in their study of pattern-recognitionscheme, known as the adaptive linear element. Robbins and Monro 1951)highlighted that the LMS algorithm was closely related to the concept of stochasticapproximation. The difference between LMS and the stochastic approximation wasthe usage of step size. The LMS algorithm uses a fixed step-size parameter tocontrol the correction applied to each tap weight for each iteration, but in stochastic

  • 8/13/2019 24 Pages From Adaptive Noise Cansellation by Lms Algorithm

    24/24

    approximation methods the step size parameter is inversely proportional to time n orto a power of n.

    2.2 Related Research

    6

    Adaptive noise cancellation with the LMS algorithm has become a popularsolution to the noise canceller. Orgen A.C., et at [1] proposed two algorithms toimprove steady state residual noise. These two algorithms are LMS algorithm withaugmented predictor LMS-AP) and modified LMS-AP MLMS-AP). Both thealgorithms depend on strictly positive real SPR) whitening filter. SPR conditionuses error filtering to ensure stability and convergence. SPR is a new approach of awhitening mechanism, and it manifests the signal processing task in a number. f thewhitening filter is SPR, the residual variance provided by MLMS-AP is larger thanthat given by LMS-AP, although lower than the LMS. For non-SPR whitening filter,LMS-AP is divergence and MLMS-AP performs at least as well as LMS algorithm.

    Ho K C. and Ching P C [2] introduced the new structure for adaptive noisecancellation to improve the convergence characteristics. They have devised the splitpath adaptive filters split canceller) as illustrated in Figure 2.1 by splitting theoriginal finite impulse respond FIR) into two linear phase filter connected in parallel[2]. Both filter uses LMS algorithm to minimize the system output error and adaptedindependently to obtain the performance of the overall system. This method hassuccessfully improved the convergences speed by almost two times. It requiredaround 500 iterations compared to 1000 iterations done by LMS algorithm.