Slide 1
Gerhard Schmidt
Christian-Albrechts-Universität zu KielFaculty of Engineering Electrical Engineering and Information TechnologyDigital Signal Processing and System Theory
Adaptive Filters – Processing Structures
Slide 2Slide 2Digital 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 3Slide 3Digital 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)bd(n)
Echocancellationfilter
y(n)
+
x(n)
y(n)
+ +
s(n)
b(n)
Application example:
Ansatz:
d(n)
Objective:Reduction of the computational complexitywith nearly the same convergence propertiesby at least 75 %. If an additional delay is necessary, it should be lower than 30 ms.
h(n)
bh(n)
x(n)
e(n)
bd¹(n)
y¹(n)e¹(n)
bh¹ (n)
Slide 4Slide 4Digital 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 5Slide 5Digital 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+1n n+2
Fullbandprocessing
SubbandprocessingSy
nth
esis
An
alys
is
Syn
thes
is
An
alys
is
Slide 6Slide 6Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Ansatz – Part 2
Application Example – Echo Cancellation
r1
Anti-aliasingfilters
Anti-imagingfilters
Sub-sampling
Up-sampling
Subbandprocessing
Slide 7Slide 7Digital 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 8Slide 8Digital 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 9Slide 9Digital 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 10Slide 10Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Up- and Downsampling – Part 1
Basics
(Derivation on the blackboard)
Slide 11Slide 11Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Up- and Downsampling – Part 2
Basics
Downsampling (r = 2) Upsampling (r = 2)
Slide 12Slide 12Digital 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 13Slide 13Digital 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 alsoan additional delay)
Slide 14Slide 14Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Basic Structure
Subband Systems
+
Analysisfilterbank
Echocancellation
Analysisfilterbank
Control of thesubband adaptive
filters
Loudspeaker-enclosure-microphonesystem
Residual echoand noise suppression
Synthesisfilterbank
Slide 15Slide 15Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Basic Structure of the Analysis Filterbank
Subband Systems
Lowpass, bandpass andhighpass filters
Sub-sampling
Slide 16Slide 16Digital 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 17Slide 17Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Structure of the Analysis Filterbank (with Restrictions)
Subband Systems
Lowpass, bandpass andhighpass filters
Sub-sampling
Slide 18Slide 18Digital 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 19Slide 19Digital 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 ofthe sums
Resolving the exponentialterm
Simplification
Slide 20Slide 20Digital 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 realizedefficiently as an inverse FFT!
Slide 21Slide 21Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
DFT-Modulated Polyphase Analysis Filterbank
Subband Systems
IDFT
Slide 22Slide 22Digital 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
Windowfunction
Windowed frame
Transform
Slide 23Slide 23Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Filterbank Versus DFT – Part 2
Subband Systems
Both filterswere
designed for a DFT order
of 256.
Impulse responses Magnitude frequency responsesHann window
Coefficient index
Hann window
Prototype lowpass filter Prototype lowpass filter
Slide 24Slide 24Digital 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 25Slide 25Digital 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 andhighpass filters
Up-sampling
Slide 26Slide 26Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Synthesis Filterbanks – Part 2
Subband Systems
IDFT
Slide 27Slide 27Digital 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 alsoan additional delay)
Slide 28Slide 28Digital 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 insertmore than 20 … 40 ms delay. For a sampling rate of 8 kHz this means less than 160 to320 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. Thealiasing components should be about 40 dB smaller than the desired signal components.
Slide 29Slide 29Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Aliasing Components
Subband Systems
+
x(n)
d(n)
h(n)
e(n)
bd¹(n)
e¹(n)
bh¹ (n)
Echo spectrum (broadband):
d¹(n)
Echo spectrum (subband):
Estimated echo spectrum (subband):
Slide 30Slide 30Digital 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 31Slide 31Digital 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 32Slide 32Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Analysis-Synthesis Structure – Part 1
Subband Systems
Slide 33Slide 33Digital 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 lowpass2. subsampling
1. upsampling2. convolution with a frequency shifted lowpass
Slide 34Slide 34Digital 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 35Slide 35Digital 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 36Slide 36Digital 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 37Slide 37Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Analysis-Synthesis Structure – Part 6
Subband Systems
Previous result:
Ansatz:
with
Slide 38Slide 38Digital 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 39Slide 39Digital 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 passbandwidth, e.g. a Dolph-Chebyshev window of length 2N-1:
Slide 40Slide 40Digital 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 of the filter, we have to take care about sufficient stopbandattenuation (twice as much as usual).
Magnitude response of a Dolph-Chebyshev lowpass filter
Slide 41Slide 41Digital 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 42Slide 42Digital 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-phasedecomposition.
(Details in Hänsler/Schmidt: Acoustic Echo and Noise Control, Wiley, 2004).
Slide 43Slide 43Digital 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 PrototyptiefpassfiltersImpulse response of the lowpass filter
Magnitude response
Coefficient index
Slide 44Slide 44Digital 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 alsoan additional delay)
Slide 45Slide 45Digital 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 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 = 13Analysis of the aliasing components
for different subsampling rates (excitation with a
Kronecker impulseat n = 0)
Aliasing components for r = 11
Aliasing components for r = 12
Aliasing components for r = 13
Slide 46Slide 46Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Verification – Magnitude and Phase Response (Group Delay)
Subband Systems
-0.02
-0.01
0
0.01
0.02
0.03
0.04
0.05
0.06
dB
Betragsfrequenzgang
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1127.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 delayGroup delay
Magnitude response
Slide 47Slide 47Digital 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 signalError signal (fullband)Error signal (subband)
Slide 48Slide 48Digital 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 alsoan additional delay)
Slide 49Slide 49Digital 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 50Slide 50Digital Signal Processing and System Theory| Adaptive Filters | Processing Structures
Results – Part 2
Subband Systems
Results:
Reduction of the computational complexity down to about 17 % of 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 about40 dB lower compared to the desired signal components. This leads toa maximum echo reduction of about 40 dB.
The distortions of the magnitude frequency response of the entire filterbanksystems were below 0.1 dB.
The distortions of the group delay of the entire filterbank were below0.5 samples.
The design objectives were met!
Slide 51Slide 51Digital 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