Anda di halaman 1dari 56

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 Processing


Basic Sampling Rate Alteration Devices
Up-sampler - Used to increase the
sampling rate by an integer factor
Down-sampler - Used to decrease the
sampling rate by an integer factor

DECIMATION

DECIMATION

Down-Sampler
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]

y[n]

Down-Sampler
Down-sampling operation is
implemented by keeping every M-th
sample of x[n] and removing M 1 inbetween 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
InputSequence

1
0.5
Amplitude

Amplitude

0.5
0
0.5
1

Outputsequencedownsampledby3

0
0.5

10

20
30
Timeindexn

40

50

10

20
30
Timeindexn

40

50

Decimation by a factor D
In downsampling by an integer factor D>1,
every D-th samples of the input sequence are
kept and others are removed:

xd (n) x( Dn)
x(n)

fs

xd (n)
fs
D

Decimation by a factor D

x(n)

Relationship in time domain


Input sequence

p(n )=

(nkD )

Periodic train of impulses

k=

x p (n)=x (n ) p (n)
x d (n )= x p ( Dn)=x ( Dn)

Output sequence

Decimation by a factor D

Relationship in frequency domain

1 2
j
j ( )
X p (e )= 0 P (e ) X (e
)d
2
j

1
p(n )=
D

D1

D 1

P( k )=

P(k )e

2
kn
D

D1

P(k )= p(n )e

k =0

n=0 i=

2
kn
D

n=0

(niD ) e

2
kn
D

D 1

= (n )e
n=0

2
kn
D

=1

P(e )=

p( n)e

jn

n=

D1

2
kn
D
jn

k=0 n=

1
X p (e )=
D

X d (e j )=

n=

n=mD

D 1

X(e

2
=
D

j( k s )

1
D

D 1

D1

P(k )e

m=

x p (n)e

n
D

n=

jn

2
( k )
D

k =0

2
s=
D

x d ( m)e j m=

2
kn
D

k =0

k=0

m=

x p (mD )e j m

x p ( n)e

n
D

= X p (e

let
C

n=mD

Decimation by a factor D

Using a digital low-pass filter to prevent aliasing

x(n)

h(n)

x' (n)

1, 0
j
H (e )=
D
0, otherwise

x d (n )

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 x u [n ] with
a sampling rate that is L times larger
than that of the input sequence x[n]
Block-diagram representation
x[n]

x u [ n]

Up-Sampler
Up-sampling operation is implemented
by inserting L1 equidistant zerovalued samples between two
consecutive samples of x[n]
Input-output relation
x u [n ]=

x [ n/ L ],
0,

n=0, L , 2L ,
otherwise

Up-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
InputSequence

1
0.5
Amplitude

Amplitude

0.5
0
0.5
1

Outputsequenceupsampledby3

0
0.5

10

20
30
Timeindexn

40

50

1
0

10

20
30
Timeindexn

40

50

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 ( ),
x p (n)=
I
0,

x(n)
fs

n=0, I , 2I
otherwise
x p (n)

h(n)

x I (n )

If s

Interpolation by a factor I
Relationship in frequency domain

x(n)

X p (e )=

x p ( n)=

Input sequence

x(k )e

= X (e

j I

I , 0
j
H ( e )=
I
0, otherwise

x ( k ) ( nkI )

k =

k =

x( k) (nkI ) e

n= k =
j Ik

j n

Sampling rate conversion by a rational factor I/D


I
If R=
is a rational number
D

fs

h1(n
)
interpolation

Sampling period

x Id (n )

x I (n )

x(n)

T
I

If s

h2(n
D
)
decimation

T
I

T
I

I
fs
D

DT
I

Sampling Rate Conversion

x(n)

h (n)


I , 0min ( , )
j
H ( e )=
I D
0,
otherwise

x Id (n )

D =4

x(n)
2
0

-15

-10

-5

10

15 n

-15

-10

-5

10

15 n

-15

-10

-5

10

15 n

-15

-10

-5

10

15 n

p(n)

0.5
0

x p (n)
2
0

x d (n )
2
0

X (e )
h

P( e )
2

3 s

3 s

2
D
0

X p (e j )

3 s

3 s

1
D

s h 0 h
j
X d (e ) 1

Dh

Dh

x(n)

I =4

x p (n)

12

16

20

24

28

32

36

40

44

48 n

12

16

20

24

28

32

36

40

44

48 n

12

16

20

24

28

32

36

40

44

48 n

x I (n )

X(e )

X p (e )

h 0

h
I

2
I

6
I

X I (e )

h 0

h
I

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 (average) 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.

x [n ] ( in p u t s ig n a l)

y [n ] ( o u tp u t

D ig it a l
F ilt e r
-

d [ n ] ( d e s ir e

Adaptive filter
The generalization to adaptive IIR filters leads to
stability problems
Its common to use
a FIR digital filter
with adjustable
coefficients.
[1]
44

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
upd
a
t
e
v
a
l
u
e
of
t
a pw e i
g
t
h
ve c t
o
r

r i
gh

ol
d
va
l
ue
of
t
a pw e i
g
ht
ve c t
o
r

r i
gh

l
e a rni
ngra t
e
pa ra m
e t
e r

r i
gh

(
)

t ap
i np
ut
v e c
t
o
r

r i
gh

(
)

e r r
or
s
i gn
al

r i
gh

(
)
(
)

[2]

45

LMS Algorithm
W (n)=[ w 0 , w 1 , ... ,w N ], X ( n)=[ x(n ), x( n1),..., x(nN )]
e(n )=d (n ) y( n)
2 (n)
=e
W (n+1)=W (n ) e 2 (n), =StepSize
e 2 (n)
e(n)
y(n)

=2 e(n)
e( n )=d ( n ) y (n )=2 e(n)
W i
Wi
Wi
N 1

e 2 (n )
y= W (n) x(ni)
=2e(n ) x(ni)
W i
i=0
e 2 ( n)=2 e( n) X (n ) W (n+1)=W (n )+2e( n) X (n)

[2]
46

Stability of LMS
The LMS algorithm is convergent in the mean square
if and only if the step-size parameter satisfy 0< < 2

max

Here max is the largest eigenvalue of the correlation


matrix of the input data
2
0<

<
More practical test for stability is
input signal power
Larger values for step size
Increases adaptation rate (faster adaptation)
Increases residual mean-squared error

[2]
47

Applications of Adaptive Filters:


Identification
Used to provide a linear model of an unknown plant

Applications:
System identification

[2]
48

Applications of Adaptive Filters:


Inverse Modeling
Used to provide an inverse model of an unknown
plant

Applications:
Equalization (communications channels)

[2]
49

Applications of Adaptive Filters:


Prediction
Used to provide a prediction of the present value of a
random signal

Applications:
Linear predictive coding

[2]
50

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]
51

Example:
Acoustic Echo Cancellation

[1]
52

Anda mungkin juga menyukai