Adaptive Filters Processing Structures Gerhard Schmidt - - PowerPoint PPT Presentation

adaptive filters processing structures
SMART_READER_LITE
LIVE PREVIEW

Adaptive Filters Processing Structures Gerhard Schmidt - - PowerPoint PPT Presentation

Adaptive Filters Processing Structures Gerhard Schmidt Christian-Albrechts-Universitt zu Kiel Faculty of Engineering Electrical Engineering and Information Technology Digital Signal Processing and System Theory Slide 1 Contents of the


slide-1
SLIDE 1

Slide 1

Gerhard Schmidt

Christian-Albrechts-Universität zu Kiel Faculty of Engineering Electrical Engineering and Information Technology Digital Signal Processing and System Theory

Adaptive Filters – Processing Structures

slide-2
SLIDE 2

Slide 2 Slide 2 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Today:

Contents of the Lecture

 Introduction and Motivation  Adaptive Filters Operating in Subbands  Filter Design for Prototype Lowpass Filters  Examples

slide-3
SLIDE 3

Slide 3 Slide 3 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Problem and Objective

Application Example – Echo Cancellation

e(n) +

x(n) d(n) s(n) b(n) b d(n)

Echo cancellation filter

y(n) +

x(n)

y(n) + +

s(n) b(n)

Application example: Ansatz:

d(n)

Objective:

Reduction of the computational complexity with nearly the same convergence properties by at least 75 %. If an additional delay is necessary, it should be lower than 30 ms.

h(n) b h(n) x(n)

e(n)

b d¹(n)

y¹(n) e¹(n)

b h¹(n)

slide-4
SLIDE 4

Slide 4 Slide 4 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Boundary Conditions

Application Example – Echo Cancellation

A convolution and an adaptation with 4000 elements has to be performed 8000 times per second. Assuming that a multiplication and an addition can be performed in one cycle on the target hardware, about million instructions per second (MIPS) are required.

Boundary conditions:

The loudspeaker-enclosure-microphone system is modeled by an adaptive Filter with 4000 coefficients at a sampling rate of 8000 Hz. The filter should be adapted using the NLMS algorithm.

Computational complexity: Pros and cons:

Rather simple and efficient algorithmic realization, only very little program memory is required. A very good temporal resolution (for control purposes) is achieved. Very high computational complexity. Frequency selective control is not possible. + + _ _

slide-5
SLIDE 5

Slide 5 Slide 5 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Ansatz – Part 1

Application Example – Echo Cancellation

x(n + 2) x(n + 2) x(n + 3) y(n + 1) y(n + 1) y(n) x(n) x(n) x(n + 1) x(n+1) y(n) y(n ¡ 1) y(n ¡ 1) y(n ¡ 2) n + 1

n

n + 2

Fullband processing Subband processing

Synthesis Analysis Synthesis Analysis

slide-6
SLIDE 6

Slide 6 Slide 6 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Ansatz – Part 2

Application Example – Echo Cancellation

r1

Anti-aliasing filters Anti-imaging filters Sub- sampling Up- sampling Subband processing

slide-7
SLIDE 7

Slide 7 Slide 7 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Computational Complexity

Application Example – Echo Cancellation

Boundary conditions:

Design of a subband system with the following parameters:

subbands (with equal bandwidth)

(same subsampling rate for all subbands)

(average complexity ratio of complex and real operations)

Computational complexity:

MIPS (fullband)

MIPS (subband)

Reduction of about 83 %

slide-8
SLIDE 8

Slide 8 Slide 8 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Books

Literature Hints

 E. Hänsler / G. Schmidt: Acoustic Echo and Noise Control – Chapter 9

(Echo Cancellation), Wiley, 2004

 E. Hänsler / G. Schmidt: Acoustic Echo and Noise Control – Appendix B

(Filterbank Design), Wiley, 2004

Basic text: Further details:

 P. P. Vaidyanathan: Multirate Systems and Filter Banks, Prentice-Hall, 1993  R. E. Crochiere, L. R. Rabiner: Multirate Digital Signal Processing, Prentice-Hall, 1983  H. G. Göckler, A. Groth: Multiratensysteme, Schlembach-Verlag, 2003/2004 (in German)

slide-9
SLIDE 9

Slide 9 Slide 9 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Repetition …

Basic Elements of Filterbanks and Multirate Systems

Known elements:

 Addition (signal + signal)  Multiplication (signal * constant)  Multiplication (signal * exponential series)  Delay

Further necessary elements:

 Subsampling  Upsampling

slide-10
SLIDE 10

Slide 10 Slide 10 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Up- and Downsampling – Part 1

Basics

(Derivation on the blackboard)

slide-11
SLIDE 11

Slide 11 Slide 11 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Up- and Downsampling – Part 2

Basics

Downsampling (r = 2) Upsampling (r = 2)

slide-12
SLIDE 12

Slide 12 Slide 12 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Up- and Downsampling – Part 3

Basics

Signal components above the max. allowed (Nyquist) frequency

Downsampling (r = 2) Upsampling (r = 2)

slide-13
SLIDE 13

Slide 13 Slide 13 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

How We Will Proceed …

Subband Systems

Problem (Reducing the complexity of adaptive filters) Efficient Subband Structures (by inserting a few restrictions) Design of so-called „prototype lowpass filters“ Verification (Complexity reduction and adaptation performance) Solution (Complexity reduction but also an additional delay)

slide-14
SLIDE 14

Slide 14 Slide 14 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Basic Structure

Subband Systems

+ Analysis filterbank Echo cancellation Analysis filterbank Control of the subband adaptive filters Loudspeaker- enclosure- microphone system Residual echo and noise suppression Synthesis filterbank

slide-15
SLIDE 15

Slide 15 Slide 15 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Basic Structure of the Analysis Filterbank

Subband Systems

Lowpass, bandpass and highpass filters Sub- sampling

slide-16
SLIDE 16

Slide 16 Slide 16 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Restrictions That Lead to Efficient Implementations

Subband Systems

The same subsampling rate and the same prototype filter in all channels:

 Using the same subsampling rate for all channels/subbands:  Realizing the bandpass and the highpass filters as frequency shifted version of a lowpass filter:

slide-17
SLIDE 17

Slide 17 Slide 17 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Structure of the Analysis Filterbank (with Restrictions)

Subband Systems

Lowpass, bandpass and highpass filters Sub- sampling

slide-18
SLIDE 18

Slide 18 Slide 18 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis of the Filterbank Structure – Part 1

Subband Systems

Signal after subsampling: Assuming a causal prototype lowpass filter: Signal after anti-aliasing filtering: Inserting results in:

slide-19
SLIDE 19

Slide 19 Slide 19 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis of the Filterbank Structure – Part 2

Subband Systems

Previous result: Splitting the summation index: Inserting results in:

Exchanging the order of the sums Resolving the exponential term Simplification

slide-20
SLIDE 20

Slide 20 Slide 20 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis of the Filterbank Structure – Part 3

Subband Systems

Previous result: Specialties:

… does not depend on ! … is a weighted inverse DFT and can be realized efficiently as an inverse FFT!

slide-21
SLIDE 21

Slide 21 Slide 21 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

DFT-Modulated Polyphase Analysis Filterbank

Subband Systems

IDFT

slide-22
SLIDE 22

Slide 22 Slide 22 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Filterbank Versus DFT – Part 1

Subband Systems

Filterbanks allow for lengths of window functions larger than the DFT size. This can lead to improved frequency resolution.

Input signal Windowing Window function Windowed frame Transform

slide-23
SLIDE 23

Slide 23 Slide 23 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Filterbank Versus DFT – Part 2

Subband Systems

Both filters were designed for a DFT order

  • f 256.

Impulse responses Magnitude frequency responses

Hann window

Coefficient index

Hann window Prototype lowpass filter Prototype lowpass filter

slide-24
SLIDE 24

Slide 24 Slide 24 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Comparison of the Basic and the Efficient Structure

Subband Systems

Direct implementation:

We have to compute

(real-complex) convolutions with coefficients per input frame.

Efficient implementation:

We have to compute

 1 (real-real) convolution with coefficients and  1 IFFT of order

per input frame.

Example for M=16, r=12, N=128 2 r M N operations = 49152 operations N + M log2M operations = 192 operations Filterlength of the (FIR-) lowpass filter

slide-25
SLIDE 25

Slide 25 Slide 25 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Synthesis Filterbanks – Part 1

Subband Systems

A comparable structure can be derived for the synthesis filterbank (details e.g. in E. Hänsler, G. Schmidt: Acoustic Echo and Noise Control, Wiley, 2004) Lowpass, bandpass and highpass filters Up- sampling

slide-26
SLIDE 26

Slide 26 Slide 26 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Synthesis Filterbanks – Part 2

Subband Systems

IDFT

slide-27
SLIDE 27

Slide 27 Slide 27 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

What we have done so far …

Subband Systems

Problem (Reducing the complexity of adaptive filters) Efficient subband structures (by inserting a few restrictions) Design of so-called „prototype lowpass filters“ Verification (Complexity reduction and adaptation performance) Solution (Complexity reduction but also an additional delay)

slide-28
SLIDE 28

Slide 28 Slide 28 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

The Following Steps …

Subband Systems

Our steps up to now:

 Derivation of an efficient analysis structure using the filter .  Derivation of an efficient synthesis structure using the filter .

What is still missing:

 Derivation of the requirements on the entire analysis-synthesis structure.  Design of the filters and .  The entire system, consisting of the analysis and the synthesis part, should not insert

more than 20 … 40 ms delay. For a sampling rate of 8 kHz this means less than 160 to 320 samples delay.

 The magnitude frequency response should not deviate by more than 0.5 dB from the

desired 0 dB value.

 The group delay should not fluctuate more than 0.5 samples.  The subsampling rate should be chosen as large as possible in order to reduce the

computational complexity as much as possible.

 The aliasing components should be kept as small as possible in order to allow fast

convergence and a good steady-state performance of the adaptive subband filters. The aliasing components should be about 40 dB smaller than the desired signal components.

slide-29
SLIDE 29

Slide 29 Slide 29 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Aliasing Components

Subband Systems

+

x(n)

d(n)

h(n)

e(n)

b d¹(n)

e¹(n)

b h¹(n)

Echo spectrum (broadband):

d¹(n)

Echo spectrum (subband): Estimated echo spectrum (subband):

slide-30
SLIDE 30

Slide 30 Slide 30 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Restrictions for the Synthesis Filter – Part 1

Subband Systems

Analysis and synthesis filters have the same requirements for the magnitude frequency response. The phase (and thus also the group delay) can be chosen differently. We will make the following ansatz:

Frequency response of the analysis filter: For the synthesis filter we obtain:

The synthesis filter has the same magnitude response but a different phase response!

slide-31
SLIDE 31

Slide 31 Slide 31 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Restrictions for the Synthesis Filter – Part 2

Subband Systems

Previous result: Connecting the analysis and synthesis filters: If the filter length is chosen as a multiple of the subband number , we get:

Linear phase filter (with constant group delay of N samples, independent of the subband index)

slide-32
SLIDE 32

Slide 32 Slide 32 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 1

Subband Systems

slide-33
SLIDE 33

Slide 33 Slide 33 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 2

Subband Systems

Output spectrum of one channel of the analysis filter bank (after subsampling): Output spectrum of a synthesis channel:

  • 1. convolution with a frequency shifted lowpass
  • 2. subsampling
  • 1. upsampling
  • 2. convolution with a frequency shifted lowpass
slide-34
SLIDE 34

Slide 34 Slide 34 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 3

Subband Systems

Separation into a linear part and aliasing components: Previous result: Neglecting the aliasing components:

slide-35
SLIDE 35

Slide 35 Slide 35 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 4

Subband Systems

Previous result: Synthesis of the broadband spectrum: Inserting the restrictions for the synthesis filter:

slide-36
SLIDE 36

Slide 36 Slide 36 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 5

Subband Systems

Previous result: Requirements for the analysis-synthesis system: This results in:

Design approach for the filters

Transformation into the time domain:

with

slide-37
SLIDE 37

Slide 37 Slide 37 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 6

Subband Systems

Previous result: Ansatz: with

slide-38
SLIDE 38

Slide 38 Slide 38 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 7

Subband Systems

Previous result: Finite geometrical series: Applied to our problem: Requirements for the autocorrelation function of the lowpass filter:

slide-39
SLIDE 39

Slide 39 Slide 39 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 8

Subband Systems

The first part of the autocorrelation function can be an ideal lowpass filter:

Ideal lowpass filter with the desired width for the passband.

The multiplication (in the time domain) with a window function (corresponds to a convolution in the frequency domain) will widen the passband of the resulting filter. For that reason the window function should be a lowpass filter with minimal passband width, e.g. a Dolph-Chebyshev window of length 2N-1:

slide-40
SLIDE 40

Slide 40 Slide 40 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 9

Subband Systems

Dolph-Chebyshev lowpass filter:

Since we are designing the magnitude square

  • f the filter, we have to

take care about sufficient stopband attenuation (twice as much as usual).

Magnitude response of a Dolph-Chebyshev lowpass filter

slide-41
SLIDE 41

Slide 41 Slide 41 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 10

Subband Systems

Previous result:

with What is missing finally is the decomposition of the autocorrelation function in an impulse response of the analysis filter and an impulse response of the synthesis

  • filter. The solution of this problem is not unique.

Transformation into the z-domain:

This means: for each pair of zeros of G(z), a pair with inverse magnitude belongs to G(z-1).

slide-42
SLIDE 42

Slide 42 Slide 42 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 11

Subband Systems

Splitting the pairs of zeroes [half for G(z), half for G(z-1)]:

Since finding the zeros of high-order polynoms leads to numerical problems it is beneficial to use approaches that avoid the explicit computation of the zeros. These approaches split the polynom into two of lower order: one containing all zeros that are located within the unit circle, the other containing all outside the unit circle. This is called a minimum-phase/maximum-phase decomposition. (Details in Hänsler/Schmidt: Acoustic Echo and Noise Control, Wiley, 2004).

slide-43
SLIDE 43

Slide 43 Slide 43 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Analysis-Synthesis Structure – Part 12

Subband Systems

Result after minimum phase splitting of the zeros

Impulsantwort des Prototyptiefpassfilters

Impulse response of the lowpass filter Magnitude response Coefficient index

slide-44
SLIDE 44

Slide 44 Slide 44 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

What we have done so far …

Subband Systems

Problem (Reducing the complexity of adaptive filters) Efficient subband structures (by inserting a few restrictions) Design of so-called „prototype lowpass filters“ Verification (Complexity reduction and adaptation performance) Solution (Complexity reduction but also an additional delay)

slide-45
SLIDE 45

Slide 45 Slide 45 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Verification - Aliasing

Subband Systems

  • 80
  • 70
  • 60
  • 50
  • 40
  • 30
  • 20
  • 10

dB

  • 80
  • 70
  • 60
  • 50
  • 40
  • 30
  • 20
  • 10

dB 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

  • 80
  • 70
  • 60
  • 50
  • 40
  • 30
  • 20
  • 10

 /  dB Aliasingkomponenten für r = 11 Aliasingkomponenten für r = 12 Aliasingkomponenten für r = 13

Analysis of the aliasing components for different subsampling rates (excitation with a Kronecker impulse at n = 0)

Aliasing components for r = 11 Aliasing components for r = 12 Aliasing components for r = 13

slide-46
SLIDE 46

Slide 46 Slide 46 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Verification – Magnitude and Phase Response (Group Delay)

Subband Systems

  • 0.02
  • 0.01

0.01 0.02 0.03 0.04 0.05 0.06 dB Betragsfrequenzgang 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 127.7 127.8 127.9 128 128.1 128.2 128.3 128.4  / pi Gruppenlaufzeit Betragsfrequenzgang Gruppenlaufzeit

Analysis of the magnitude frequency response and of the group delay for r = 12 (excitation with a Kronecker impulse at n = 0)

Magnitude frequency response Group delay

Group delay Magnitude response

slide-47
SLIDE 47

Slide 47 Slide 47 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Verification – Convergence Analysis

Subband Systems

Comparison of two convergence runs (excitation: speech, no local distortion, all step sizes = 1, fixed first-order prediction error filter for improving the speed of convergence in the fullband structure) Time in seconds

Microphone signal Error signal (fullband) Error signal (subband)

slide-48
SLIDE 48

Slide 48 Slide 48 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

What we have done so far …

Subband Systems

Problem (Reducing the complexity of adaptive filters) Efficient subband structures (by inserting a few restrictions) Design of so-called „prototype lowpass filters“ Verification (Complexity reduction and adaptation performance) Solution (Complexity reduction but also an additional delay)

slide-49
SLIDE 49

Slide 49 Slide 49 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Results – Part 1

Subband Systems

Boundary conditions:

Design of a subband system with the following parameters:

subbands (with equal bandwidth)

(same subsampling rate for all subbands)

(average complexity ration of complex and real operations)

(length of the prototype lowpass filter)

Computational complexity:

MIPS (fullband)

MIPS (subband)

Reduction of about 83 %

slide-50
SLIDE 50

Slide 50 Slide 50 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Results – Part 2

Subband Systems

Results:

 Reduction of the computational complexity down to about 17 %

  • f the starting value.

 A delay of about 16 ms was necessary to achieve this (before it has

been zero).

 The filterbanks were designed such that the aliasing components are about

40 dB lower compared to the desired signal components. This leads to a maximum echo reduction of about 40 dB.

 The distortions of the magnitude frequency response of the entire filterbank

systems were below 0.1 dB.

 The distortions of the group delay of the entire filterbank were below

0.5 samples.

The design objectives were met!

slide-51
SLIDE 51

Slide 51 Slide 51 Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures

Summary and Outlook

Adaptive Filters – Processing Structures

This week:

 Introduction and Motivation  Adaptive Filters Operating in Subbands  Filter Design for Prototype Lowpass Filters  Examples

Next weeks:

 Applications of Linear Prediction