DSP C5000 Chapter 16 Adaptive Filter Implementation Copyright © 2003 Texas Instruments. All rights reserved.

Slides:



Advertisements
Similar presentations
Chapter 15 Infinite Impulse Response (IIR) Filter Implementation
Advertisements

Polyphase FIR Filter Implementation for Communication Systems
Chapter 19 Fast Fourier Transform
Copyright © 2003 Texas Instruments. All rights reserved. DSP C5000 Chapter 18 Image Compression and Hardware Extensions.
Chapter 5 Assembly Language
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 3.1 Chapter 3.
Discrete Controller Design
25 July, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
5 August, 2014 Martijn v/d Horst, TU/e Computer Science, System Architecture and Networking 1 Martijn v/d Horst
© 2003 Xilinx, Inc. All Rights Reserved Course Wrap Up DSP Design Flow.
Chapter 16 Adaptive Filters
Enhanced Single-Loop Control Strategies
Adaptive Filters S.B.Rabet In the Name of GOD Class Presentation For The Course : Custom Implementation of DSP Systems University of Tehran 2010 Pages.
Adaptive IIR Filter Terry Lee EE 491D May 13, 2005.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: The FIR Adaptive Filter The LMS Adaptive Filter Stability and Convergence.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Newton’s Method Application to LMS Recursive Least Squares Exponentially-Weighted.
Widrow-Hoff Learning. Outline 1 Introduction 2 ADALINE Network 3 Mean Square Error 4 LMS Algorithm 5 Analysis of Converge 6 Adaptive Filtering.
Performance Optimization
Goals of Adaptive Signal Processing Design algorithms that learn from training data Algorithms must have good properties: attain good solutions, simple.
VLSI DSP 2008Y.T. Hwang3-1 Chapter 3 Algorithm Representation & Iteration Bound.
Adaptive FIR Filter Algorithms D.K. Wise ECEN4002/5002 DSP Laboratory Spring 2003.
Adaptive Signal Processing
Normalised Least Mean-Square Adaptive Filtering
Dept. E.E./ESAT-STADIUS, KU Leuven homes.esat.kuleuven.be/~moonen/
Chapter 5ELE Adaptive Signal Processing 1 Least Mean-Square Adaptive Filtering.
Yuan Chen Advisor: Professor Paul Cuff. Introduction Goal: Remove reverberation of far-end input from near –end input by forming an estimation of the.
Acoustic Echo Cancellation Using Digital Signal Processing. Presented by :- A.Manigandan( ) B.Naveen Raj ( ) Parikshit Dujari ( )
Equalization in a wideband TDMA system
Dr. Hala Moushir Ebied Faculty of Computers & Information Sciences
Algorithm Taxonomy Thus far we have focused on:
Introduction to Adaptive Digital Filters Algorithms
By Asst.Prof.Dr.Thamer M.Jamel Department of Electrical Engineering University of Technology Baghdad – Iraq.
Acoustic Noise Cancellation
Name : Arum Tri Iswari Purwanti NPM :
EE 426 DIGITAL SIGNAL PROCESSING TERM PROJECT Objective: Adaptive Noise Cancellation.
Jessica Arbona & Christopher Brady Dr. In Soo Ahn & Dr. Yufeng Lu, Advisors.
VADA Lab.SungKyunKwan Univ. 1 L40: Lower Power Equalizer J. W. Kim and J.D.Cho 성균관대학교
CHAPTER 4 Adaptive Tapped-delay-line Filters Using the Least Squares Adaptive Filtering.
Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational.
DSP C5000 Chapter 16 Adaptive Filter Implementation Copyright © 2003 Texas Instruments. All rights reserved.
Active Noise Cancellation System
LEAST MEAN-SQUARE (LMS) ADAPTIVE FILTERING. Steepest Descent The update rule for SD is where or SD is a deterministic algorithm, in the sense that p and.
ECE 8443 – Pattern Recognition ECE 8423 – Adaptive Signal Processing Objectives: Derivation Computational Simplifications Stability Lattice Structures.
CHAPTER 10 Widrow-Hoff Learning Ming-Feng Yeh.
DSP-CIS Chapter-13: Least Mean Squares (LMS) Algorithm Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
Professors: Eng. Diego Barral Eng. Mariano Llamedo Soria Julian Bruno
Frequency Domain Adaptive Filtering Project Supervisor Dr. Edward Jones Myles Ó Fríl.
Lecture 10b Adaptive Filters. 2 Learning Objectives  Introduction to adaptive filtering.  LMS update algorithm.  Implementation of an adaptive filter.
DSP-CIS Part-IV : Filter Banks & Subband Systems Chapter-12 : Frequency Domain Filtering Marc Moonen Dept. E.E./ESAT-STADIUS, KU Leuven
Overview of Adaptive Filters Quote of the Day When you look at yourself from a universal standpoint, something inside always reminds or informs you that.
METHOD OF STEEPEST DESCENT ELE Adaptive Signal Processing1 Week 5.
 Adaptive filter based on LMS Algorithm used in different fields  Equalization, Noise Cancellation, Channel Estimation...  Easy implementation in embedded.
10 1 Widrow-Hoff Learning (LMS Algorithm) ADALINE Network  w i w i1  w i2  w iR  =
Chapter 16 Adaptive Filter Implementation
Adaptive Filters Common filter design methods assume that the characteristics of the signal remain constant in time. However, when the signal characteristics.
Pipelined Adaptive Filters
J. W. Kim and J.D.Cho 성균관대학교 Lower Power Equalizer J. W. Kim and J.D.Cho 성균관대학교 SungKyunKwan Univ.
Equalization in a wideband TDMA system
Widrow-Hoff Learning (LMS Algorithm).
Instructor :Dr. Aamer Iqbal Bhatti
Chapter 16 Adaptive Filters
DSP-CIS Chapter-8: Introduction to Optimal & Adaptive Filters
لجنة الهندسة الكهربائية
Equalization in a wideband TDMA system
Instructor :Dr. Aamer Iqbal Bhatti
Adaptive Filter A digital filter that automatically adjusts its coefficients to adapt input signal via an adaptive algorithm. Applications: Signal enhancement.
GSPT-AS-based Neural Network Design
Fixed-point Analysis of Digital Filters
Regression and Correlation of Data
DSP-CIS Chapter-12: Least Mean Squares (LMS) Algorithm
Presentation transcript:

DSP C5000 Chapter 16 Adaptive Filter Implementation Copyright © 2003 Texas Instruments. All rights reserved.

ESIEE, Slide 2Outline Adaptive filters and LMS algorithm Adaptive filters and LMS algorithm Implementation of FIR filters on C54x Implementation of FIR filters on C54x Implementation of FIR filters on C55x Implementation of FIR filters on C55x

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 3 Generalities of Adaptive Filters The coefficients of Adaptive filters are variable with time in order to optimize a given criterion. The coefficients of Adaptive filters are variable with time in order to optimize a given criterion. The most commonly used algorithm to adapt the coefficients is the LMS (Least Mean Square) algorithm. The most commonly used algorithm to adapt the coefficients is the LMS (Least Mean Square) algorithm. Most adaptive filters are implemented as FIR filters, because they are inherently stable. Most adaptive filters are implemented as FIR filters, because they are inherently stable. They are widely used in digital communications: They are widely used in digital communications: Echo cancellation, equalizers... Echo cancellation, equalizers...

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 4 Diagram and Notations of Adaptive Filters

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 5 Mean Square Error Solution

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 6 Gradient Algorithm Gradient of criterion J vs b: Gradient of criterion J vs b: Gradient algorithm: iterative solution Gradient algorithm: iterative solution Converges if: Converges if: Adaptation step Max Eigenvalue of R x

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 7 Stochastic Gradient Algorithm: LMS The mean values E(e(n)x(n-i)) are not known. The mean values E(e(n)x(n-i)) are not known. In the stochastic gradient algorithm, they are replaced by e(n)x(n-i). In the stochastic gradient algorithm, they are replaced by e(n)x(n-i). The algorithm converges if the adaptation step is small enough. The algorithm converges if the adaptation step is small enough. Algorithm named: LMS (Least Mean Square) or Widrow algorithm: Algorithm named: LMS (Least Mean Square) or Widrow algorithm:

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 8 LMS Algorithm For each sample, the LMS algorithm: For each sample, the LMS algorithm: Filters the input using b i Filters the input using b i Updates the b i coefficients. Updates the b i coefficients.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 9 LMS Algorithm at Each Sample Time FIR Filtering equation: FIR Filtering equation: Coefficient updating equation: Coefficient updating equation:

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 10 Fixed Point Implementation When LMS adaptive filter is implemented on a fixed point DSP: When LMS adaptive filter is implemented on a fixed point DSP: The precision of calculation is important: The precision of calculation is important: If rnd(e i *x n-i ) is smaller than the used precision, no adaptation is performed. If rnd(e i *x n-i ) is smaller than the used precision, no adaptation is performed. The precision of convergence depends on: The precision of convergence depends on: Adaptation step : the largest, the fastest convergence but the worst precision. Adaptation step : the largest, the fastest convergence but the worst precision. The number of coefficients N: the residual error is proportional to N. The number of coefficients N: the residual error is proportional to N. When N is too large, it may be worth considering using block adaptive filtering. When N is too large, it may be worth considering using block adaptive filtering.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 11 LMS steps Each time iteration (only once): Each time iteration (only once): Calculates error e n =r n -y n Calculates error e n =r n -y n Scale error by adaptation step : e n = e n. Scale error by adaptation step : e n = e n. Each time iteration, for each coefficient: Each time iteration, for each coefficient: Multiply error with signal: e i = e n x n-i Multiply error with signal: e i = e n x n-i Multiply x n-i b i and accumulate Multiply x n-i b i and accumulate Calculate new coefficients: newb i = b i +e i Calculate new coefficients: newb i = b i +e i Update coefficients: b i = newb i. Update coefficients: b i = newb i.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 12 Implementing LMS Algorithm on C54x LMS specific instruction to realize: LMS specific instruction to realize: Filter and coefficient updating. Filter and coefficient updating. B = B + (b i *x n-i ); A = rnd(e i +b i ) B = B + (b i *x n-i ); A = rnd(e i +b i ) Rounding is important because may be very small. Rounding is important because may be very small. Filter and coefficients updating equations: Filter and coefficients updating equations: To be done at each sample time n: To be done at each sample time n:

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 13 LMS instruction With LMS instruction, LMS FIR: With LMS instruction, LMS FIR: 2N Cycles per tap. 2N Cycles per tap. LMS Xmem, Ymem LMS Xmem, Ymem (A) + (Xmem)<< A (A) + (Xmem)<< A (B) + (Xmem) x (Ymem) B (B) + (Xmem) x (Ymem) B Uses both ACCUs A and B. Uses both ACCUs A and B. This instruction does not modify T. This instruction does not modify T. Xmem points on b i, Ymem on x n-i Xmem points on b i, Ymem on x n-i Data x are stored in a circular buffer. Data x are stored in a circular buffer.

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 14 Example of LMS adaptive filter on C54x Defines 2 sections for data and coefficients Defines 2 sections for data and coefficients

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 15 Implementing LMS Algorithm on C54x Initializations Initializations

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 16 Implementing LMS Algorithm on C54x LMS adaptive filter program: LMS adaptive filter program:

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 17 Implementating LMS algorithm on C55x LMS specific instruction to realize: LMS specific instruction to realize: Filter and coefficicent updating. Filter and coefficicent updating. ACy = ACy + (b i *x n-i ); ACx = rnd(e i +b i ) ACy = ACy + (b i *x n-i ); ACx = rnd(e i +b i ) Rounding is important because may be very small. Rounding is important because may be very small. Filter and coefficients updating equations: Filter and coefficients updating equations: To be done at each sample time n: To be done at each sample time n:

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 18 Example of LMS adaptive filter on C55X Pre-calculate *e(n).... AR3 pts to coeff table: a[n] AR4 pts to data table: x[n] T3 holds error step amount... while loading BRCO AC0=error*oldestsample: x(n-N) …while clearing AC1 (run FIR) Overwrite x(n-N) with x(n) Start FIR, update oldest coef… … and start repeat block Store update coefficient......while calc. next update term Calc FIR, update coefficient Store final coefficient... …while storing FIR output

Copyright © 2003 Texas Instruments. All rights reserved. ESIEE, Slide 19 Follow on Activities Application 10 for TMS320C5416 DSK Application 10 for TMS320C5416 DSK Implements a guitar tuner using an adaptive filter. Here the desired note is used as the reference. The LEDs on the DSK indicate when the guitar is tune. Implements a guitar tuner using an adaptive filter. Here the desired note is used as the reference. The LEDs on the DSK indicate when the guitar is tune.