Multirate and Adaptive Filters
Multirate and Adaptive Filters
Multirate and Adaptive Filters
Contents
Time-Domain Characterization
• An down-sampler with a down-sampling
factor M, where M is a positive integer,
develops an output sequence y[n] with a
sampling rate that is (1/M)-th of that of
the input sequence x[n]
• Block-diagram representation
x[n] M y[n]
Down-Sampler
• Down-sampling operation is
implemented by keeping every M-th
sample of x[n] and removing M − 1 in-
between samples to generate y[n]
• Input-output relation
y[n] = x[nM]
Down-Sampler
• Figure below shows the down-sampling
by a factor of 3 of a sinusoidal
sequence of frequency 0.042 Hz
obtained using Program 10_2
Input Sequence Output sequence down-sampled by 3
1 1
0.5 0.5
Amplitude
Amplitude
0 0
-0.5 -0.5
-1 -1
0 10 20 30 40 50 0 10 20 30 40 50
Time index n Time index n
Decimation by a factor D
xd (n) = x( Dn )
x(n) D xd (n)
fs
fs
D
Decimation by a factor D
x p ( n) = x( n) p( n)
D −1 2 D −1 2
1 −j
p( n) = P ( k )e P ( k ) = p( n)e
j kn kn
D D
,
D k =0 n=0
2 2
D −1
−j D −1 −j
P ( k ) = ( n − iD) e = ( n)e
kn kn
D D
=1
n = 0 i = − n= 0
C
1 D −1 2
kn
p(n)e = P ( k )e
j
j − j n − j n
P (e ) = D
e
n = − n = − D k = 0
2
1 D −1
2 D −1
2
= e
j kn
− j n
D
e = ( − k)
D k = 0 n= − D k =0 D
D −1
1
X p (e j ) = X (e j ( − k s ) ) 2
s =
D k =0 D
X d (e ) = j
x
m = −
d ( m )e − j m
= x
m = −
p ( mD )e − j m
n n
− j − j
x p (n)e x p (n)e
j
= D
= D
= X p (e D
)
n = mD n = −
let n = mD
C
Decimation by a factor D
1, 0 |ω | π
H (e j ) = D
0, otherwise
INTERPOLATION
INTERPOLATION
Up-Sampler
Time-Domain Characterization
• An up-sampler with an up-sampling
factor L, where L is a positive integer,
develops an output sequence xu [n] with
a sampling rate that is L times larger
than that of the input sequence x[n]
• Block-diagram representation
x[n] L xu [n]
Up-Sampler
• Up-sampling operation is implemented
by inserting L − 1 equidistant zero-
valued samples between two
consecutive samples of x[n]
• Input-output relation
0.5 0.5
Amplitude
Amplitude
0 0
-0.5 -0.5
-1 -1
0 10 20 30 40 50 0 10 20 30 40 50
Time index n
Time index n
Up-Sampler
• In practice, the zero-valued samples
inserted by the up-sampler are replaced
with appropriate nonzero values using
some type of filtering process
• Process is called interpolation and will
be discussed later
Interpolation by a factor I
In up-sampling by an integer factor I >1, I -1
equidistant zeros-valued samples are inserted
between each two consecutive samples of the
input sequence. Then a digital low-pass filter is
applied.
n
x( ), n = 0, I , 2 I
x p ( n) = I
0, otherwise
x(n) I h(n) x I (n)
x p (n)
fs If s
Interpolation by a factor I
− j n
X p (e ) = x( k ) ( n − kI ) e
j
n = − k = −
= x (
k = −
k )e − j Ik
= X ( e j I
)
I , 0 |ω | π
j
H (e ) = I
0, otherwise
Sampling rate conversion by a rational factor I/D
I
If R = is a rational number
D
I , 0 |ω | min( π , π )
H (e j ) = I D
0, otherwise
D=4
x(n)
2
0
-15 -10 -5 0 5 10 15 n
1
p(n)
0.5
0
-15 -10 -5 0 5 10 15 n
x p (n)
2
0
-15 -10 -5 0 5 10 15 n
xd (n)
2
0
-15 -10 -5 0 5 10 15 n
X ( e j )
− 2 − − h 0 h 2
P ( e j ) 2
D
− 2 − 3 s − −s 0 s 3 s 2
X p ( e j ) 1
D
− 2 − 3 s − − s − h 0 h s 3 s 2
X d ( e j ) 1
D
− 2 − − D h 0 D h 2
4
I =4
x(n)
2
0
0 4 8 12 16 20 24 28 32 36 40 44 48 n
4
x p (n)
2
0
0 4 8 12 16 20 24 28 32 36 40 44 48 n
4
x I (n)
2
0
0 4 8 12 16 20 24 28 32 36 40 44 48 n
X ( e j )
− 2 − − h 0 h 2
X p ( e j )
− 2 − h 0 h 2 6 2
−
I I I I
X I ( e j )
− 2 − h 0 h 2
−
I I
INTRODUCTION
TO
ADAPTIVE FILTER
Adaptive filter
• the signal and/or noise characteristics are often
nonstationary and the statistical parameters vary
with time
When processing
analog signals,
the adaptive filter
is then preceded
by A/D and D/A
convertors.
• Adaptive filters differ from other filters
such as FIR and IIR in the sense that:
– The coefficients are not determined by a
set of desired specifications.
– The coefficients are not fixed.
• With adaptive filters the specifications
are not known and change with time.
• Applications include: process control,
medical instrumentation, speech
processing, echo and noise calculation
and channel equalisation.
Introduction
-
+ d[n] (desired signal)
+
43
LMS Algorithm
• Most popular adaptation algorithm is LMS
Define cost function as mean-squared error
45
Stability of LMS
• The LMS algorithm is convergent in the mean square
if and only if the step-size parameter satisfy 0 2
max
46
Applications of Adaptive Filters:
Identification
• Used to provide a linear model of an unknown plant
• Applications:
– System identification
47
Applications of Adaptive Filters:
Inverse Modeling
• Used to provide an inverse model of an unknown
plant
• Applications:
– Equalization (communications channels)
48
Applications of Adaptive Filters:
Prediction
• Used to provide a prediction of the present value of a
random signal
• Applications:
– Linear predictive coding
49
Applications of Adaptive Filters:
Interference Cancellation
• Used to cancel unknown interference from a primary
signal
• Applications:
– Echo / Noise cancellation
hands-free carphone, aircraft headphones etc
50
Example:
Acoustic Echo Cancellation
51