56
Unit-V DSP APPLICATIONS

Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

Embed Size (px)

Citation preview

Page 1: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

Unit-V

DSP APPLICATIONS

Page 2: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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.

Page 3: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 4: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 5: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 6: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 7: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 8: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 9: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

DECIMATION

Page 10: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

DECIMATION

Page 11: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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]

Page 12: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 13: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 14: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 15: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

Relationship in time domain

)()()( npnxnx p

)(nx Input sequence

k

kDnnp )()( Periodic train of impulses

)()()( DnxDnxnx pd Output sequence

Decimation by a factor D

Page 16: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 17: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 18: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 19: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

INTERPOLATION

Page 20: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

INTERPOLATION

Page 21: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 22: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 23: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 24: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 25: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 26: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 27: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 28: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

h (n) I D)(nx )(nxId

otherwise ,0

),min(|0 ,)( Dπ

Iπ|ωIeH j

Sampling Rate Conversion

Page 29: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

-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

Page 30: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 31: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 32: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

0 22 hh

)( jeX

0 22 I

hI

h

)( jI eX

0 22 I

hI

2I

6

)( jp eX

Ih

Page 33: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 34: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 35: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 36: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 37: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 38: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

INTRODUCTION TO ADAPTIVE FILTER

Page 39: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 40: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 41: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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.

Page 42: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

• 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.

Page 43: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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)

+

Page 44: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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]

Page 45: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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]

Page 46: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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

Page 47: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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]

Page 48: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

48

Applications of Adaptive Filters: Identification• Used to provide a linear model of an unknown plant

• Applications: – System identification [2]

Page 49: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

49

Applications of Adaptive Filters: Inverse Modeling• Used to provide an inverse model of an unknown

plant

• Applications: – Equalization (communications channels)

[2]

Page 50: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

50

Applications of Adaptive Filters: Prediction• Used to provide a prediction of the present value of a

random signal

• Applications: – Linear predictive coding

[2]

Page 51: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

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]

Page 52: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational

Example:Acoustic Echo Cancellation

52

[1]

Page 53: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 54: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 55: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational
Page 56: Unit-V DSP APPLICATIONS. UNIT V -SYLLABUS DSP APPLICATIONS Multirate signal processing: Decimation Interpolation Sampling rate conversion by a rational