DSPCIS PartIII Optimal Adaptive Filters Chapter8 Adaptive Filters

  • Slides: 40
Download presentation
DSP-CIS Part-III : Optimal & Adaptive Filters Chapter-8 : Adaptive Filters – LMS &

DSP-CIS Part-III : Optimal & Adaptive Filters Chapter-8 : Adaptive Filters – LMS & RLS Marc Moonen Dept. E. E. /ESAT-STADIUS, KU Leuven marc. moonen@kuleuven. be www. esat. kuleuven. be/stadius/

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction : General Set-Up & Applications • Wiener Filters Chapter-8 Adaptive Filters - LMS & RLS • Least Means Squares (LMS) Algorithm • Recursive Least Squares (RLS) Algorithm Chapter-9 Square Root & Fast RLS Algorithms • Square Root Algorithms • Fast Algorithms Chapter-10 Kalman Filters • Introduction – Least Squares Parameter Estimation • Standard Kalman Filter • Square-Root Kalman Filter DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 2 / 40

Norbert Wiener (1894 -1964) Recap 1/5 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters –

Norbert Wiener (1894 -1964) Recap 1/5 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 3 / 40

1 Will use u[k] e[k] DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS

1 Will use u[k] e[k] DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS y[k] d[k] PS: Shorthand notation uk=u[k], yk=y[k], dk=d[k], ek=e[k], Filter coefficients (‘weights’) are wl (replacing bl of previous chapters) For adaptive filters wl also have a time index wl[k] Recap 2/5 4 / 40

Recap 3/5 2 Will use = minimize DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters

Recap 3/5 2 Will use = minimize DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 5 / 40

Recap 4/5 MMSE cost function can be expanded as…(continued) This is the ‘Wiener Filter’

Recap 4/5 MMSE cost function can be expanded as…(continued) This is the ‘Wiener Filter’ solution DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 6 / 40

Recap 5/5 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 7

Recap 5/5 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 7 / 40

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction : General Set-Up & Applications • Wiener Filters Chapter-8 Adaptive Filters - LMS & RLS • Least Means Squares (LMS) Algorithm • Recursive Least Squares (RLS) Algorithm Chapter-9 Square Root & Fast RLS Algorithms • Square Root Algorithms • Fast Algorithms Chapter-10 Kalman Filters • Introduction – Least Squares Parameter Estimation • Standard Kalman Filter • Square-Root Kalman Filter DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 8 / 40

Adaptive Filters: LMS How do we solve the Wiener–Hopf equations? Alternatively, an iterative steepest

Adaptive Filters: LMS How do we solve the Wiener–Hopf equations? Alternatively, an iterative steepest descent algorithm can be used This will be the basis for the derivation of the Least Mean Squares (LMS) adaptive filtering algorithm… Bernard Widrow 1965 (https: //www. youtube. com/watch? v=hc 2 Zj 55 j 1 z. U) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 9 / 40

Adaptive Filters: LMS How do we compute the Wiener filter? 1) Cfr supra: By

Adaptive Filters: LMS How do we compute the Wiener filter? 1) Cfr supra: By solving Wiener-Hopf equations (L+1 equations in L+1 unknowns) 2) Can also apply iterative procedure to minimize MMSE criterion, e. g. here n is iteration index μ is ‘stepsize’ (to be tuned. . ) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 10 / 40

Adaptive Filters: LMS Bound on stepsize ? DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters

Adaptive Filters: LMS Bound on stepsize ? DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 11 / 40

Adaptive Filters: LMS Convergence speed? small λi implies slow convergence (1 -μλi close to

Adaptive Filters: LMS Convergence speed? small λi implies slow convergence (1 -μλi close to 1) for mode i DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 12 / 40

Adaptive Filters: LMS Convergence speed? Hence slowest convergence for λi=λmin With upper bound for

Adaptive Filters: LMS Convergence speed? Hence slowest convergence for λi=λmin With upper bound for μ (see p 11) : 1 -2(λmin/λmax) ≤ 1 -μλi ≤ 1 Hence λmin<<λmax (i. e. large ‘eigenvalue spread’) implies very slow convergence λmin<<λmax whenever input signal u[k] is very ‘colored’ (λmin=λmax for ‘white’ input signal (i. e. autocorrelation matrix = I)) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 13 / 40

Adaptive Filters: LMS as follows Replace n+1 by n for convenience… Then replace iteration

Adaptive Filters: LMS as follows Replace n+1 by n for convenience… Then replace iteration index n by time index k k (i. e. perform 1 iteration per sampling interval) Then leave out expectation operators (i. e. replace expected values by instantaneous estimates) ‘a priori error’ DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 14 / 40

Adaptive Filters: LMS ‘a priori error’ Note that this matches with the prototype adaptive

Adaptive Filters: LMS ‘a priori error’ Note that this matches with the prototype adaptive filter set-up (p 7) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 15 / 40

Adaptive Filters: LMS Simple & cheap algorithm: complexity is ≈2 L multiplications per time

Adaptive Filters: LMS Simple & cheap algorithm: complexity is ≈2 L multiplications per time update (i. e. per sampling period) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 16 / 40

Adaptive Filters: LMS Simple algorithm, can even draw signal flow graph (=realization)… DSP-CIS 2019

Adaptive Filters: LMS Simple algorithm, can even draw signal flow graph (=realization)… DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 17 / 40

Adaptive Filters: LMS DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS

Adaptive Filters: LMS DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 18 / 40

Adaptive Filters: LMS ‘Noisy gradients’ Whenever LMS has reached the WF solution the expected

Adaptive Filters: LMS ‘Noisy gradients’ Whenever LMS has reached the WF solution the expected value of (=estimated gradient in update formula) is zero but the instantaneous value is generally non-zero (=noisy), and hence LMS will again move away from the WF solution! DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 19 / 40

Adaptive Filters: LMS L L means step size has to be much smaller…! DSP-CIS

Adaptive Filters: LMS L L means step size has to be much smaller…! DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 20 / 40

Adaptive Filters: LMS is an extremely popular algorithm many LMS-variants have been developed (cheaper/faster/…)…

Adaptive Filters: LMS is an extremely popular algorithm many LMS-variants have been developed (cheaper/faster/…)… (see p 19 -20) K is block index, LB is block size (see Chapter-13 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 21 / 40

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) Computational

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) Computational complexity is larger ≈3 L instead of ≈2 L multiplications per time update (except when uk. T. uk is computed recursively) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 22 / 40

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) Step

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) Step size tuning for NLMS is much easier… DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 23 / 40

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) ‘a

Adaptive Filters: LMS = LMS with normalized step size (mostly used in practice) ‘a posteriori error’ For instance with (normalized step size=1 and) α 0, the NLMS solution at time k sets the a posteriori error to zero, with minimal change with respect to previous NLMS solution at time k-1 DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 24 / 40

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction

Part-III : Optimal & Adaptive Filters Chapter-7 Optimal Filters - Wiener Filters • Introduction : General Set-Up & Applications • Wiener Filters Chapter-8 Adaptive Filters - LMS & RLS • Least Means Squares (LMS) Algorithm Chapter-9 • Recursive Least Squares (RLS) Algorithm Square Root & Fast RLS Algorithms • Square Root Algorithms • Fast Algorithms Chapter-10 Kalman Filters • Introduction – Least Squares Parameter Estimation • Standard Kalman Filter • Square-Root Kalman Filter DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 25 / 40

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 26 / 40

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 27 / 40

Least Squares & RLS Estimation uk dk ek dk u k. T DSP-CIS 2019

Least Squares & RLS Estimation uk dk ek dk u k. T DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 28 / 40

Least Squares & RLS Estimation ‘Normal equations’ (L+1 equations in L+1 unknowns) DSP-CIS 2019

Least Squares & RLS Estimation ‘Normal equations’ (L+1 equations in L+1 unknowns) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS This is the ‘Least Squares Solution’ 29 / 40

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 30 / 40

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS

Least Squares & RLS Estimation DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 31 / 40

Least Squares (LS) Estimation In words: Whenever statistical info (autocorrelation and crosscorrelation) is missing,

Least Squares (LS) Estimation In words: Whenever statistical info (autocorrelation and crosscorrelation) is missing, this can be estimated from observed data (assuming ergodicity) The Wiener filter solution, with true statistical quantities replaced by estimated quantities, then turns out to be the same as the LS solution LS approach in itself optimizes a different (LS) criterion, without any need for statistical assumptions (e. g. ergodicity. . ) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 32 / 40

Least Squares & RLS Estimation Matrices and vectors now with time index added k

Least Squares & RLS Estimation Matrices and vectors now with time index added k Can LS solution @ time k be computed from solution @ time k-1 ? DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 33 / 40

Least Squares & RLS Estimation-1 nk s a R ate d up (check ‘matrix

Least Squares & RLS Estimation-1 nk s a R ate d up (check ‘matrix inversion lemma’ in Wikipedia) With this it is proved that: DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 34 / 40

Next to a mechanism for adding new observations, also need a mechanism for removing

Next to a mechanism for adding new observations, also need a mechanism for removing old observations. First approach is as follows… Least Squares & RLS Estimation i k S s i h e d i l s t p DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 35 / 40

Least Squares & RLS Estimation i k S s i h e d i

Least Squares & RLS Estimation i k S s i h e d i l s t p DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 36 / 40

Next to a mechanism for adding new observations, also need a mechanism for removing

Next to a mechanism for adding new observations, also need a mechanism for removing old observations. Simpler approach is as follows… Least Squares & RLS Estimation : Goal is to give a smaller weight to ‘older’ data, i. e. Which leads to… DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 37 / 40

Least Squares & RLS Estimation i. e. exponential weighting hardly changes RLS formulas. .

Least Squares & RLS Estimation i. e. exponential weighting hardly changes RLS formulas. . (easy!) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 38 / 40

Recursive Least Squares (RLS) Algorithm Computational Complexity: Standard RLS algorithm (with exponential weighting) has

Recursive Least Squares (RLS) Algorithm Computational Complexity: Standard RLS algorithm (with exponential weighting) has O(L 2) computational complexity per time update Compare to O(L) for LMS (=cheaper, but slow convergence) In Chapter-9, will present ‘Fast RLS’ algorithms with O(L) computational complexity (and without compromising convergence properties) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 39 / 40

Recursive Least Squares (RLS) Algorithm Numerical Analysis/Stability: Standard RLS algorithm (even with exponential weighting)

Recursive Least Squares (RLS) Algorithm Numerical Analysis/Stability: Standard RLS algorithm (even with exponential weighting) has been shown to have unstable quantization error propagation (in low-precision implementation) In Chapter-9, will present ‘Square Root RLS’ algorithms which are shown to be perfectly stable numerically (without compromising complexity & convergence properties) DSP-CIS 2019 -2020 / Chapter-8: Adaptive Filters – LMS & RLS 40 / 40