# · pdf fileusing linear convolution yn( ) ... using dft&idft or circular con.(without zero...

Post on 18-Aug-2018

216 views

Category:

## Documents

Embed Size (px)

TRANSCRIPT

• 1

• LOGO

iugaza2010.blogspot.commelasmer@gmail.com

Discrete Fourier Transform

(DFT)

Part Two

• 3

Use the DFT in linear filter

Suppose thar we have a finite-duration sequence x(n) of length L ,

which excites an FIR filter ,with impulse response h(n) of length M

The output sequence y(n) of the FIR filter can be expressed in time

domain as the linear convolution of x(n) and h(n).

If size of x(n)=

If size of h(n)=

( ) ( ) ( )

To avoid aliasing , we need to take DFT of N points

where: N L+M 1

L

M

Y k X k H k

• 4

2

2

( ) ( ) |

( ) ( ) |

k

N

k

N

Y k Y k = 0,1,.......,N 1

X H k = 0,1,.......,N 1

• 5

• 6

Zero padding of analyzed sequence results in approximating

its DTFT better

• 7

• 8

• 9

• 10

Determine the response of

FIR filter with impulse response: h(n)={ ,2,3}

to the input x(n)={ ,2,

1

1 2,1}

Ex:

(a) Using linear convolution(chapter 2)

] ;

] ;

1221

0321

0000

03663

002442

0001221

038119411

• 11

h(n)={ ,2,3} , 1 1x(n)={ ,2,2,1}

(b) Using DFT&IDFT (without zero padding )

2 2

44

2 3

4 4 4

4 2 4 6

4 4 4

3 6 9

4 4 4

1 1 1 1 1 1 1 1

1 1

1

1

j jN

NW e W e j

W W WW

W W W

W W W

2 3

2 4 6

3 6 9

1 1 1 1

( ) ( ) 1 1

1 11 ( ) ( ) ( )

1 ( ) ( ) ( )

j j j j j

j j j

j j j

1 1

1 1

1 1

1 1 1 1

1 1

1 1 1 1

1 1

N N N

j j

j jX W x

j

1

1 6

2 2 2( )

3 2

0 2 2

jX k

j j

• 12

2 2 2

1 1 1 1 1 6

1 1 2 1 ( )

1 1 1 1 2 0

1 1 1 1

N N N

j j jX W x X k

j j j

1 2

1 2

( ) ( ) ( )

( 0) (0) (0) (6)(6) 36

( 1) ( 1 )( 2 2 ) 4

( 2) (0)(2) 0

( 1) ( 1 )( 2 2 ) 4

( ) {36,4 ,0, 4 }

Y k X k X k

Y k X X

Y k j j j

Y k

Y k j j j

Y k j j

• 13

1

1

4 4 ,4

1 1 1 1 36

1 1 4

1 1 1 1 0

1 1 4

m

j j jx W X

j j j

1/ 4 1/ 4 1/ 4 1/ 4

1/ 4 / 4 1/ 4 / 4 =

1/ 4 1/ 4 1/ 4 1/ 4

1/ 4 / 4 1/ 4 / 4

j j

j j

3 1 2

36 9

4 7

0 9

4 11

( ) ( ) ( ) {9,7,9,11}

j

j

x m x n x n

2

• 14

h(n)={ ,2,3} , 1 1x(n)={ ,2,2,1}

(c) Using circular convolution formula

1 * 1 2 2 1 1 2 2 1

2 * 1 1 2 2 2 2 4 4

3 * 2 1 1 2 6 3 3 6

0 * 2 2 1 1 0 0 0 0

9 7 9 11

3

• 15

1* 1 2 2 1 0 0 1 2 2 1 0 0

2* 0 1 2 2 1 0 0 2 4 4 2 0

3* 0 0 1 2 2 1 0 0 3 6 6 3

0* 1 0 0 1 2 2 0 0 0 0 0 0

0* 2 1 0 0 1 2 0 0 0 0 0 0

0* 2 2 1 0 0 1 0 0 0 0 0 0

1 4 9 11 8 3

(d) Using circular convolution (with zero padding)

4

• 16

L=3,M=4 N=3+4 1 6 N at least must be 6 take N=8

h(n)={ ,2,3,0,0,0} , x(n)={ ,2,2,11 1 ,0,0}

(e) Using DFT&IDFT (with zero padding)

27

8

0

3

4 2 4( ) 1 2 2 , k=0,1,2,...

: ( ) ( ) , k=0,1,2,.......,7

6 , 1 1.707 4.21

2 1 , 3 0.29 0.1

...

2132

4

.,7k k k

j j

nj

n

j

k

DFT X k x n e

X(k = 0) = X(k = ) = j

X(k = ) = j X

X k e e

(k = ) =

X )

e

j

(k =

0 , 5 0.29 0.12132

6 1 , 7 1.707 4.21

= X(k = ) = j

X(k = ) = j X(k = ) = j

• 17

27

8

4

0

2

: ( ) ( ) , k=0,1,2,.......,7

6 , 1 2.414 4.414

2 2 2 , 3 0.4

( ) 1 2 3 , k=0,1

14 1.585

,2,......

8

4

.

2

,7

nkj

n

k kj j

DFT H k h n e

H(k = 0) = H(k = ) = j

H(k = ) = j H(k = ) = j

X k e e

H(k = ) =

, 5 0.414 1.5858

6 2 2 , 7 2.414 4.414

H(k = ) = j

H(k = ) = j H(k = ) = j

• 18

( ) ( ) ( )

( 0) (0) (0) 36 , (1) 14.07 17.48

(2) 4 , (3) 0.07 0.515

(4) 0 , (5) 0.07 0.515

(6) 4

Y k X k H k

Y k X H Y j

Y j Y j

Y Y j

Y j

, (7) 14.07 17.48 Y j

27

8

0

1: y(n)= ( ) , n=0,1,2,.......,7

8

( ) {1, 4,9,11,8,3,0,0}

nkj

k

IDFT X k e

y n

5

• 19

Using linear convolution

( ) { ,4,9,11, }1 8,3y n

Using DFT&IDFT or circular Con.(without zero padding)

( ) { ,7,9 11}9 ,y n

Using DFT&IDFT or circular Con.(with zero padding)

( ) { ,4,9,11, }1 8,3y n

• (0) : (0) (4) 1 8 9

(1) : (1) (5) 4 3 7

(2) : (2) (6) 9 0 9

(3) : (3) (7) 11 0 11

index y y

index y y

index y y

index y y

( ) { ,7,9 11}9 ,y n

( ) { ,4,9,11,8,3,1 0,0}y n

Aliasing occurs when the size of DFTs is smaller than L+M-1

• 21

DFT repeats itself every N points (Period = N) but we usually display it for n = 0 ,, N-1

• 22

• 23

• 24

• 25