+ All Categories
Home > Education > Dsp 2554 5

Dsp 2554 5

Date post: 26-Jun-2015
Category:
Upload: peerapol-yuvapoositanon
View: 866 times
Download: 1 times
Share this document with a friend
Popular Tags:
31
DSP 5 The Discrete Fourier Transform (DFT) การแปลงฟูริเยร์แบบไม่ต่อเนื ่อง รศ.ดร. พีระพล ยุวภูษิตานนท์ ภาควิชา วิศวกรรมอิเล็กทรอนิกส DSP5-1 CESdSP EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Assoc. Prof. Dr. P.Yuvapoositanon
Transcript
Page 1: Dsp 2554 5

DSP 5

The Discrete

Fourier Transform (DFT)

การแปลงฟูริเยร์แบบไม่ต่อเน่ือง

รศ.ดร. พรีะพล ยวุภษิูตานนท์

ภาควชิา วศิวกรรมอเิล็กทรอนกิส์

DSP5-1CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 2: Dsp 2554 5

เป้าหมาย

• นศ รูจ้กัความหมายของ อนุกรมฟูรเิยร์แบบไมต่อ่เน่ือง

(Discrete Fourier Series :DFS) และผลการแปลงจาก

สญัญาณในโดเมนเวลา

• นศ เขา้ใจความสมัพนัธ์ของ การแปลงฟูรเิยร์แบบไม่

ตอ่เน่ือง (Discrete Fourier Transform: DFT) และ

DFS

• นศ สามารถท าการแปลง DFT กบัสญัญาณเชงิเวลาใดๆ

ได ้

DSP5-2CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 3: Dsp 2554 5

DSP5-3

ท าไมต้อง DFT ?

( ) ( )j j n

n

X e x n e

แต่ หากจะค านวณ DTFT ด้วย โปรเซสเซอร ์หรอื คอมพิวเตอร ์จะต้องจดัการให้ล าดบั n มีค่าท่ีจ ากดั

แต่จากเรือ่งของ DTFT สงัเกตว่า n มีค่าไม่จ ากดั

หากตอ้งการใชค้อมพวิเตอรห์รอืตวัประมวลผลมาชว่ยค านวณผลเราตอ้งการจ านวนล าดบัท่ีจ ากดั

ดงันัน้จึงต้องใช้ การแปลงฟริูเยรแ์บบไม่ต่อเน่ือง Discrete Fourier Transform (DFT)

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 4: Dsp 2554 5

DSP5-4

อนุกรมฟูริเยร์แบบไม่ต่อเน่ืองThe Discrete Fourier Series (DFS)

( ) ( ), ,x n x n kN n N ใหส้ญัญาณทีเ่ป็นรายคาบ2

N

ความถีม่ลูฐาน เป็น เรเดยีน2

, 0,1,..., 1k k NN

ความถีฮ่ารม์อนิก เป็น

21

0

1( ) ( ) , 0, 1,...

N j knN

k

x n X k e nN

21

0

( ) ( ) , 0, 1,...N j nk

N

k

X k x k e k

( )X k คอื คา่สมัประสทิธิ ์ฟูรเิยรไ์มต่่อเน่ือง โดยที ่

แสดง ไดเ้ป็น( )x n

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

ทลิด ์=สญัญานที่เป็นรายคาบ

For All n and N

Page 5: Dsp 2554 5

DSP5-5

( ) ( )X k N X k

2j

NNW e

1

0

1

0

( ) DFS[ ( )] ( )

1( ) IDFS[ ( )] ( )

Nnk

Nk

Nnk

Nk

X k x k x k W

x k X k X k WN

Analysis (DFS) equation:

Synthesis (IDFS) equation:

เราแทน

( )X k กเ็ป็นสญัญาณรายคาบ

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

เลขเชงิซอ้น

Page 6: Dsp 2554 5

DSP5-6

( ) ...,0,1,2,3,0,1,2,3,0,...x k

ตวัอยา่ง

วธิที า

หา DFS ของสญัญาณรายคาบ

ดจูากลกัษณะสญัญาณ จะได ้คาบเวลา = 4 (N=4 ) 2 2

4j j

NNW e e j

3

40

( ) ( ) , 0, 1,...nk

n

X k x n W k

3 30

40 0

(0) ( ) ( ) (0) (1) (2) (3) 6n

n n

X x n W x n x x x x

k=0

k=13 3

1

40 0

3 32 2

40 0

3 33 3

40 0

(1) ( ) ( )( ) ( 2 2 )

(2) ( ) ( )( ) 2

(3) ( ) ( )( ) 2 2

n n

n n

n n

n n

n n

n n

X x n W x n j j

X x n W x n j

X x n W x n j j

k=2

k=3CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 7: Dsp 2554 5

DSP5-7

ตวัอยา่ง

วิธีท า

dsp_5_1.eps

L

N

มสีญัญาณพลัส ์(pulse) เป็น รายคาบดงัรปู จงหาอนุกรม DFS

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 8: Dsp 2554 5

DSP5-8

2 21 1

0 0

( ) ( )N Lj nk j nk

N N

n n

X k x n e e

แปลง DFT

หรอืใชต้วัชว่ยจาก ผลรวมเรขาคณิตแบบจ ากดั จะดกีวา่ไหม?เราจะนัง่ค านวณดว้ยมอืกไ็ด…้

1

0

1, 1

1

LLn

n

aa a

a

221

20

1( ) ( )

1

Lj k

NL j knN

kjn

N

eX k e

e

ท าใหไ้ด้

( ) , 0, , 2 ...X k L k N N แต่เฉพาะที่ 0, , 2 ..k N N

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 9: Dsp 2554 5

DSP5-9

ช่วงพลัส์บวก L=5 และคาบเป็น N=20

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 10: Dsp 2554 5

DSP5-10

ช่วงพลัส์บวก L=5 และคาบเป็น N=40

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 11: Dsp 2554 5

DSP5-11

ชว่งพลัส์บวก L=5 และคาบเป็น N=60

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 12: Dsp 2554 5

DSP5-12

ชว่งพลัส์บวก L=7 และคาบเป็น N=60

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 13: Dsp 2554 5

DSP5-13

ข้อสังเกตุ

• ชว่งระยะพลัส์บวก สมัพนัธ์กบั คาบเวลาและขนาดของ

ผลการแปลง DFS ดงัน้ี

L

L

L

L

( )x n

( )X k

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 14: Dsp 2554 5

DSP5-14

DFS กับ z-transform และ DTFT

ส าหรบัสญัญาณจ านวนจ ากดัใดๆ

, 0 1( )

0,

nonzero n Nx n

otherwise

จดัใหเ้ป็น สญัญาณทีเ่ป็นคาบไดโ้ดยใชส้ญัญาณเฉพาะ n = 0 ถงึ N-1

( ), 0 1( )

0,

x n n Nx n

otherwise

0 5

N=6

0 5

( )x n

( )x n

และบวกรวม ( ) ( )

r

x n x n rN

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 15: Dsp 2554 5

DSP5-15

DFS กับ z-transform และ DTFT (ต่อ)

21

0

21

0

( ) ( )

( )

N j nkN

n

nN j k

N

n

X k x n e

x n e

2( ) ( ) j kNz e

X k X z

ความสมัพนัธ ์DFS และ z-transform

2( ) ( )j

kN

X k X e

ความสมัพนัธ ์DFS และ DTFT

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 16: Dsp 2554 5

DSP5-16

DFT กับ DFS

• DFS เป็นการแปลงสญัญาณเชงิเวลาไมต่อ่เน่ืองและเป็นคาบ ให้

เป็นสญัญาณเชงิความถีแ่บบไมต่อ่เน่ืองและเป็นคาบ

• แตส่ญัญาณบางอยา่งท ั่วๆไป อาจจะไมเ่ป็นคาบก็ได้

• ในการวเิคราะหจ์งึตอ้งตดัสญัญาณนัน้มาหน่ึงชว่งและหา DFS

ของชว่งสญัญาณนัน้ ซึง่เราสมมตใิหเ้ป็นชว่งหน่ึงคาบ

• และเราเรียกการแปลง DFS กบัสญัญาณเพียงหน่ึงคาบนัน้วา่การ

แปลง DFT

DFT เป็นการแปลงท่ี ใช้การหา DFS ของสญัญาณเพียงหน่ึงคาบ

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 17: Dsp 2554 5

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

DSP5-17

CTFT

( )x n

( )jX e t

( )X j

2 2n

( )X k

DTFT

0 N-10 N-1

DFS

DFT

0 N-10 N-1

( )X k

k

k

1 คาบ

( )x t

( )x n

( )x n

Page 18: Dsp 2554 5

DSP5-18

การเพิ่มจ านวนศูนย์ (zero padding)

1, 0 3( )

0,

nx n

otherwise

ตวัอยา่ง เป็นสญัญาณทีม่คีา่เป็นหนึ่งเฉพาะยา่น

( ) [1,1,1,1]x n

4

'( ) [1,1,1,1,0,0,0,0]

zeros

x n

นัน่คอื

ตวัอยา่งเมือ่เพิม่ศนูย ์4 ตวั

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 19: Dsp 2554 5

DSP5-19

ผลการแปลง DTFT ของ x(n)

dsp_5_6.epsCESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 20: Dsp 2554 5

DSP5-20

หา DFT ของ x(n) 2 2

4j j

NNW e e j

3

40

( ) ( ) , 0, 1,...nk

n

X k x n W k

3 30

40 0

(0) ( ) ( ) (0) (1) (2) (3) 4n

n n

X x n W x n x x x x

k=0

k=13 3

1

40 0

3 32 2

40 0

3 33 3

40 0

(1) ( ) ( )( ) 0

(2) ( ) ( )( ) 0

(3) ( ) ( )( ) 0

n n

n n

n n

n n

n n

n n

X x n W x n j

X x n W x n j

X x n W x n j

k=2

k=3

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 21: Dsp 2554 5

DSP5-21

N=4

dsp_5_7.epsCESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 22: Dsp 2554 5

DSP5-22

N=8

dsp_5_8.epsCESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 23: Dsp 2554 5

DSP5-23dsp_5_9.eps

N=16

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 24: Dsp 2554 5

DSP5-24dsp_5_10.eps

N=32

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 25: Dsp 2554 5

DSP5-25

ความละเอียด (Resolution) ของการค านวณสเปคตรัม

• การเพิม่ศนูย์ Zero padding เป็นการเตมิจุดค านวณให้

มากขึน้ เพือ่ชว่ยในการเพิม่ ความหนาแน่น (density)

ของการแสดงสเปคตรมั

• แตไ่มไ่ดเ้ป็นการเพิม่ความละเอยีด (resolution) ในการ

วเิคราะห์สเปคตรมั ตอ้งเพิม่จ านวนจุด (point) ในการ

ค านวณ DFT

( ) cos(0.48 ) sin(0.52 )x n n n

ตวัอยา่ง ล าดบั x(n) มอีงคป์ระกอบความถี ่อยูส่องความถี ่

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 26: Dsp 2554 5

DSP5-26

ส าหรับสัญญาณ x(n) n=0 ถงึ 9

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 27: Dsp 2554 5

DSP5-27

เพิ่มศูนย์อีก 40 ตัว

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 28: Dsp 2554 5

DSP5-28

แม้เพิ่มศูนย์อีก 90 ตัว กไ็ม่เพิ่มความละเอียด

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 29: Dsp 2554 5

DSP5-29

ใช้สัญญาณ x(n) จ านวน 100 ล าดับ จะเหน็รายละเอียดของสองความถี่

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 30: Dsp 2554 5

DSP5-30

ขนาด และ เฟสของ x(n)=[ … 0 1 0 … ]

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon

Page 31: Dsp 2554 5

DSP5-31

สรุป

• DFT ใชใ้นการค านวณการแปลงฟูรเิยร์ ดว้ยตวั

ประมวลผล (คอมพวิเตอร์ หรอื โปรเซสเซอร์)

• DFT ก็คอื DFS ส าหรบัสญัญาณเพียงหน่ึงคาบ

• DFT (DFS) มคีวามเชือ่มโยงกบัการแปลงแซด และ

DTFT

• การเพิม่ศนูย์ Zero padding เป็นการเตมิจุดค านวณให้

หนาแน่นมากขึน้แตไ่มช่ว่ยเรือ่งความละเอยีดของ

สเปคตรมั

CESdSP EEET0485 Digital Signal Processing

http://embedsigproc.wordpress.com

Assoc. Prof. Dr. P.Yuvapoositanon


Recommended