Upload
vincent-chase
View
218
Download
2
Embed Size (px)
Citation preview
Unit-V
DSP APPLICATIONS
UNIT V -SYLLABUS DSP APPLICATIONS
• Multirate signal processing: • Decimation• Interpolation• Sampling rate conversion by a rational
factor • Adaptive Filters: • Introduction• Applications of adaptive filtering to
equalization.
Multirate Digital Signal ProcessingMultirate Digital Signal Processing
Basic Sampling Rate Alteration DevicesBasic Sampling Rate Alteration Devices
• Up-samplerUp-sampler - Used to increase the sampling rate by an integer factor
• Down-samplerDown-sampler - Used to decrease the sampling rate by an integer factor
DECIMATION
DECIMATION
Down-SamplerDown-Sampler
Time-Domain CharacterizationTime-Domain Characterization
• An down-sampler with a down-sampling down-sampling factorfactor 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
Mx[n] y[n]
Down-SamplerDown-Sampler
• Down-sampling operation is implemented by keeping every M-th sample of x[n] and removing in-between samples to generate y[n]
• Input-output relation
y[n] = x[nM]
1M
Down-SamplerDown-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
0 10 20 30 40 50-1
-0.5
0
0.5
1Input Sequence
Time index n
Am
plitu
de
0 10 20 30 40 50-1
-0.5
0
0.5
1Output sequence down-sampled by 3
Am
plitu
de
Time index n
In downsampling by an integer factor D>1, every D-th samples of the input sequence are kept and others are removed:
)()( Dnxnxd
D)(nx )(nxd
Decimation by a factor D
sfD
f s
Relationship in time domain
)()()( npnxnx p
)(nx Input sequence
k
kDnnp )()( Periodic train of impulses
)()()( DnxDnxnx pd Output sequence
Decimation by a factor D
C
Relationship in frequency domain
2
0
)( )()(2
1)( deXePeX jjj
p
1
0
21
0
2
)()( ,)(1
)(D
n
knD
jD
k
knD
jenpkPekP
Dnp
1)()()(1
0
21
0
2
D
n
knD
jD
n
knD
j
i
eneiDnkP
Decimation by a factor D
C
1
0
)( )(1
)(D
k
kjjp
seXD
eX
)()()(
)()()(
Dj
pn
D
nj
pmDn
D
nj
p
m
mjp
m
mjd
jd
eXenxenx
emDxemxeX
Ds
2
1
0
1
0
2
1
0
2
)2
(21
)(1
)()(
D
k
D
kn
njkn
Dj
n
njD
k
knD
j
n
njj
kDD
eeD
eekPD
enpeP
mDnlet
h(n))(nx )(nxd D)(' nx
otherwise ,0
|0 ,1)( Dπ|ωeH j
Using a digital low-pass filter to prevent aliasing
Decimation by a factor D
INTERPOLATION
INTERPOLATION
Up-SamplerUp-Sampler
Time-Domain CharacterizationTime-Domain Characterization
• An up-sampler with an up-sampling up-sampling factorfactor L, where L is a positive integer, develops an output sequence with a sampling rate that is L times larger than that of the input sequence x[n]
• Block-diagram representation
][nxu
Lx[n] ][nxu
Up-SamplerUp-Sampler
• Up-sampling operation is implemented by inserting equidistant zero-valued samples between two consecutive samples of x[n]
• Input-output relation
1L
otherwise,0,2,,0],/[
][LLnLnx
nxu
Up-SamplerUp-Sampler
• Figure below shows the up-sampling by a factor of 3 of a sinusoidal sequence with a frequency of 0.12 Hz obtained using Program 10_1
0 10 20 30 40 50-1
-0.5
0
0.5
1Input Sequence
Time index n
Am
plitu
de
0 10 20 30 40 50-1
-0.5
0
0.5
1Output sequence up-sampled by 3
Time index n
Am
plitu
de
Up-SamplerUp-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 interpolationinterpolation and will be discussed later
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.
otherwise ,0
2 , ,0 ),()( IInI
nxnx p
I)(nx )(nxIh(n))(nx p
Interpolation by a factor I
sf sIf
Relationship in frequency domain
k
p kInkxnx )()()( )(nx Input sequence
)()(
)()()(
Ij
k
Ikj
n
nj
k
jp
eXekx
ekInkxeX
otherwise ,0
|0 ,)( Iπ|ωIeH j
Interpolation by a factor I
If is a rational numberD
IR
h1(n)
h2(n)
I D)(nx
interpolation decimationsf
)(nxI
sIf
)(nxId
sfD
I
Sampling rate conversion by a rational factor I/D
Sampling period
T I
T
I
T
I
T
I
DT
h (n) I D)(nx )(nxId
otherwise ,0
),min(|0 ,)( Dπ
Iπ|ωIeH j
Sampling Rate Conversion
-15 -10 -5 0 5 10 150
2
n
-15 -10 -5 0 5 10 150
0.5
1
n
-15 -10 -5 0 5 10 150
2
n
-15 -10 -5 0 5 10 150
2
n
)(nx
)(np
)(nx p
)(nxd
4D
hh
)( jeX
0 22
)( jeP
0 22 ss s3s3
D
2
0 22 hh
D
1
ss s3s3
)( jp eX
0 22 hDhD
D
1)( jd eX
0 4 8 12 16 20 24 28 32 36 40 44 480
2
4
n
0 4 8 12 16 20 24 28 32 36 40 44 480
2
4
n
0 4 8 12 16 20 24 28 32 36 40 44 480
2
4
n
)(nx
)(nx p
)(nxI
4I
0 22 hh
)( jeX
0 22 I
hI
h
)( jI eX
0 22 I
hI
2I
6
)( jp eX
Ih
INTRODUCTION TO ADAPTIVE FILTER
Adaptive filter
• the signal and/or noise characteristics are often nonstationary and the statistical parameters vary with time
• An adaptive filter has an adaptation algorithm, that is meant to monitor the environment and vary the filter transfer function accordingly
• based in the actual signals received, attempts to find the optimum filter design
ADAPTIVE FILTER
• The basic operation now involves two processes :1. a filtering process, which produces an output signal
in response to a given input signal.2. an adaptation process, which aims to adjust the filter
parameters (filter transfer function) to the (possibly time-varying) environment
Often, the (avarage) square value of the error signal is used as the optimization criterion
Adaptive filter
• Because of complexity of the optimizing algorithms most adaptive filters are digital
filters that perform digital signal processing
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
• To construct an adaptive filter the following selections have to be made:
– Which method to use to update the coefficients of the selected filter.
– Whether to use an FIR or IIR filter.
D ig ita lF ilter
AdaptiveA lgorithm
-
+
e[n] (error s ignal)
d [n ] (des ired s ignal)
y[n] (output s ignal)x [n ] (input s ignal)
+
44
Adaptive filter
• The generalization to adaptive IIR filters leads to stability problems
• It’s common to use
a FIR digital filter
with adjustable
coefficients.
[1]
45
LMS Algorithm
• Most popular adaptation algorithm is LMS
Define cost function as mean-squared error
• Based on the method of steepest descent
Move towards the minimum on the error surface to get to minimum
gradient of the error surface estimated at every iteration
signal
error
vector
input
tap
parameter
rate
-learning
vector
weight- tapof
valueold
vector
weigth- tapof
valueupdate
[2]
46
LMS Algorithm
[2])()(2)()1()()(2)(
)()(2)(
)()(
)()(2
)()(2
)(
),()()1(
)(ˆ
)()()(
)](),...,1(),([)(],,...,,[)(
2
21
0
)()()(2
2
2
10
nXnenWnWnXnene
inxneW
neinxnWy
W
nyne
W
nene
W
ne
StepSizenenWnW
ne
nyndne
NnxnxnxnXwwwnW
i
N
i
i
nyndne
ii
N
47
Stability of LMS
• The LMS algorithm is convergent in the mean square if and only if the step-size parameter satisfy
• Here max is the largest eigenvalue of the correlation matrix of the input data
• More practical test for stability is
• Larger values for step size– Increases adaptation rate (faster adaptation)– Increases residual mean-squared error
max
20
power signal input2
0
[2]
48
Applications of Adaptive Filters: Identification• Used to provide a linear model of an unknown plant
• Applications: – System identification [2]
49
Applications of Adaptive Filters: Inverse Modeling• Used to provide an inverse model of an unknown
plant
• Applications: – Equalization (communications channels)
[2]
50
Applications of Adaptive Filters: Prediction• Used to provide a prediction of the present value of a
random signal
• Applications: – Linear predictive coding
[2]
51
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 [2]
Example:Acoustic Echo Cancellation
52
[1]