Chapter 6 Slides
Chapter 6 Slides
Filters
1
Conventional Filter
3
Adaptive Filter
• Adaptive filters are used for
• adaptation of signal-changing environments
• unknown or time-varying noise
• spectral overlap between noise and signal
• Applications:
• Signal enhancement
• Active noise control
• Noise cancellation
• Telephone echo cancellation
4
Adaptive Filter
• Adaptive filters used for
– Spectral overlap between noise and signal
5
Adaptive Filter
• Advantages
• Able to operate satisfactorily in unknown and
possibly time-varying environments without user
intervention.
• Able to improve the performance during
operation by learning statistical characteristics
from current signal observations.
• Able to track variations in the signal operating
environment.
• Able to handle spectral overlap between noise
and useful signal.
6
Noise Canceller
• Use 2 microphones
• Microphone 1 detects useful signal and noise
• Microphone 2 detects pure noise from a
different source
• Adaptive filter predicts the noise
detected in microphone 1 based on
measured noise in microphone 2
7
Noise Canceller
Microphone with ADC Noise is cancelled;
used to capture The signal is contaminated; error signal e(n) approximates s(n)
the desired speech s(n) channel produces d(n) when noise estimate y(n)≈≈n(n)
(signal with the noise)
Channel captured
noise x(n)
Adaptive filter
y(n) is the estimate of n(n)
wn: adjustable coefficient
Coming from the same noise source, x(n) is correlated with n(n)
Both n(n) and x(n) are not correlated to desired signal s(n) 8
Adaptive FIR filter with a simple and popular least mean square (LMS) algorithm
Filtering Operation
y(n): noise estimate
wn: coefficient used for the current sample
wn+1: coefficient obtained from LMS algorithm, to be used for the next coming input sample
9
Filtering Operation
The first 16 processed values for corrupted signal, reference noise, clean signal,
original signal and adaptive filter coefficients
wn
10
The processed output is close to the original signal.
Filtering Operation
The processed
output e(n) is close
to the original
signal s(n).
The adaptative
coeff. converges
close to the optimal
value of 0.5.
After 7 adaptations, the adaptive filter learns noise characteristics
11
and cancels the noise in the corrupted signal.
Filtering Operation
• The simple noise canceller shown used a simple one-
tap adaptive filter.
• In general, an FIR filter with N multiple taps is used.
= −
= + −1 +…+ − +1
• C
• N
13
Wiener Filter
• Taking the statistical expectation of squared error signal
• Using notations
14
Wiener Filter
Example 1:
15
Wiener Filter
• The optimal solution (Wiener solution) is w * = R -1P
• Note that:
– Optimal coefficient(s) can be different for every block of data.
The autocorrelation and cross-correlation may vary.
– If a larger number of coefficients (weights) are used, the inverse
matrix R -1 may require a larger number of computations.
– The optimal solution is based on statistics; this assumes that the
size of data block is sufficiently long => long processing delay.
• Solving the Wiener solution w * = R -1P requires many
computations, including matrix inversion for a general
multiple-tap FIR filter.
• Steepest descent method: minimize the MSE sample by
sample to locate the filter coefficient(s), without matrix
inversion.
16
Steepest Descent Method
• Update w step by step to incrementally reduce J
The new coefficient wn+1 will The new coefficient wn+1 will
be increased to approach be decreased to approach
the optimal value w*. the optimal value w*.
• Iteration 1 (n=0)
• Iteration 2 (n=1)
18
Steepest Descent Method
• Iteration 3 (n=2)
• Substituting
• As we can see, after three iterations, the filter coefficient and minimum MSE
values are very close to the theoretical values obtained in Example 1.
19
Least Mean Square (LMS) Algorithm
• Application of steepest-descent method ( = − ) still needs
an estimation of the derivative of the MSE function that could include
statistical calculation of a block data.
• To change the algorithm to do sample-based processing, LMS algorithm
is used.
• For sample-based processing, take the statistical expectation out of J
and then take the derivative to obtain an approximation of ;
• Substituting into steepest descent method, we achieve the LMS algorithm for
updating a single-weight case:
= +2 ( )
20
Least Mean Square (LMS) Algorithm
• Input: Input signal corrupted by noise d(n) and noise signal
x(n), initial weight 0( = 0), step-size µ
• Repeat
• Compute output of adaptive filter
= 0( ) ( )
Note: 1-tap => N=1
• Compute error or filtered signal
= −
• Update the filter weight for next iteration
0( + 1) = 0( ) + 2
Note: The step size µ
- If too large, the weights may change by a large value so that gradient which
was negative at the first instant may now become positive. And at the second
instant, the weight may change in the opposite direction by a large amount
because of the negative gradient and would thus keep oscillating with a large
variance about the optimal weights.
- If too small, time to converge to the optimal weights will be too large. 21
Application 1: Noise Canceller
Microphone with ADC Noise is cancelled;
used to capture The signal is contaminated; error signal e(n) approximates s(n)
the desired speech s(n) channel produces d(n) when noise estimate y(n)≈≈n(n)
(signal with the noise)
Channel captured
noise x(n)
Adaptive filter
y(n) is the estimate of n(n)
wn: adjustable coefficient
Coming from the same noise source, x(n) is correlated to n(n) The step-size is 0.005
Both n(n) and x(n) are not correlated to desired signal s(n)
22
Application 1: Noise Canceller
• Adaptive FIR filter used to remove the noise
• Specifications:
• Sample rate: 8 kHz
• Noise reference:
Gaussian noise with a
power of 1
• Original speech
corrupted by the noise
reference delayed by 5
samples
• Adaptive FIR filter used
to remove the noise
• No. filter taps: 21
• Convergence factor
(LMS algo.): 0.01
24
Application 2: System Modelling
• The adaptive filter can keep tracking the behaviour of an unknown system
by using the unknown system input and output.
• Both the unknown system and the adaptive filter respond to the same
input.
• The transfer function of the adaptive filter approximates the transfer
function of the unknown system.
25
Application 2: System Modelling
• Single tap (w0) adaptive filter, with initial weight w0(0) = 0
• LMS step-size µ = 0.5
• Given: input signal x(n), and signal d(n) of an unknown system
n 0 1 2 3 A digital amplifier
d(n) 1 2 -2 2 with a gain of 2
x(n) 0.5 1 -1 1
26
Application 3: ECG
Electrocardiography (ECG) Interference Cancellation
– There often exists unwanted 60-Hz interference, along with its
harmonics, in the recorded data.
Digital interference x(n) Adaptive filter uses x(n) to produce an estimate,
is acquired by the which approximates the 60-Hz interference n(n)
digital signal processor sensed from the ECG amplifier => y(n)≈ n(n)
After convergence
of the adaptive
filter, the
estimated
interference is
60-Hz reference input substracted from
from a wall outlet the primary signal
of the ECG
preamplifier to
produce e(n), in
which the 60-Hz
Primary input from interference is
the ECG preamplifier cancelled
27
Application 4: Fetal Monitoring
ECG acquired from the mother’s abdomen is contaminated by noise from
muscle activity, fetal motion, mother’s own ECG.
Output will be
the fetal ECG
with the reduced
mother’s ECG
Chest leads: acquire => signal (d)
the reference inputs xk(n)
(assume to contain only
the mother’s ECG)
=> signal (b)
Abdominal lead:
capture the fetal info. Adaptive filter
d(n), which may be predicts the
corrupted by the mother’s ECG,
mother’s ECG which will be
=> signal (c) substracted from
the corrupted fetal
signal d(n)
28