Top Banner
DSP 5 The Discrete Fourier Transform (DFT) กกกกกกกกกกกกกกกกกกกกกกกก กกกกกก ผผ.ผผ. ผผผผผผ ผผผผผผผผผ ผผผผ ผผผผผผผ ผผผผผผผผ ผผผผผผผผผผผผผผ EEET0485 Digital Signal Processing Asst.Prof. Peerapol DSP5-1
31

DSP 5 The Discrete Fourier Transform ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

Jan 01, 2016

Download

Documents

mckenzie-joyce

DSP 5 The Discrete Fourier Transform ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง. ผศ.ดร. พีระพล ยุวภูษิ ตานนท์ ภาควิชา วิศวกรรมอิเล็กทรอนิกส์. เป้าหมาย. นศ รู้จักความหมายของ อนุกรมฟูริ เยร์ แบบไม่ต่อเนื่อง (Discrete Fourier Series :DFS) และผลการแปลงจากสัญญาณในโดเมนเวลา - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

DSP 5 The Discrete

Fourier Transform (DFT)การแปลงฟูรเยร แบบไม่�ต่�อเนื่��อง

ผศ.ดร. พี�ระพีล ยุ�วภู�ษิ�ตานนท์�ภูาคว�ชา ว�ศวกรรมอิ�เล�กท์รอิน�กส์�

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-1

Page 2: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

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

เน)*อิง (Discrete Fourier Series :DFS) และผลการแปลงจัากส์ ญญาณในโดเมนเวลา

• นศ เข�าใจัความส์ มพี นธ์�ขอิง การแปลงฟู�ร�เยุร�แบบไม(ต(อิเน)*อิง (Discrete Fourier Transform: DFT) และ DFS

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

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-2

Page 3: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-3

ทำ�าไม่ต่�อง DFT ?

( ) ( )j j n

n

X e x n e

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

แต(จัากเร)*อิงขอิง DTFT ส'งเกต่ว�า n ม่)คำ�าไม่�จ�าก'ด้

หากต�อิงการใช�คอิมพี�วเตอิร�หร)อิต วประมวลผลมาช(วยุค2านวณผลเราต�อิงการจั2านวนล2าด บทำ)�จ�าก'ด้

ด้'งนื่'*นื่จ+งต่�องใช้� การแปลงฟูรเยร แบบไม่�ต่�อเนื่��อง Discrete Fourier Transform (DFT)

Page 4: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-4

อนื่-กรม่ฟูรเยร แบบไม่�ต่�อเนื่��องThe Discrete Fourier Series

(DFS) ( ) ( ), ,x n x n kN n N ให�ส์ ญญาณท์�*เป4นรายุคาบ

2

N

ความถ�*ม�ลฐาน เป4น เรเด�ยุน2

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

ความถ�*ฮาร ม่อนื่ก เป4น

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ค)อิ ค(าส์ มประส์�ท์ธ์�6 ฟู�ร�เยุร�ไม(ต(อิเน)*อิง โดยุท์�*

แส์ดง ได�เป4น( )x n

Page 5: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-5

( ) ( )X k N X k

2jN

NW e

1

0

1

0

( ) DFS[ ( )] ( )

1( ) IDFS[ ( )] ( )

NnkN

k

Nnk

Nk

X k x k x k W

x k X k X k WN

Analysis (DFS) equation:

Synthesis (IDFS) equation:

เราแท์น

( )X k ก�เป4นส์ ญญาณรายุคาบ

Page 6: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP6-6

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

ต วอิยุ(าง

ว�ธ์�ท์2า

หา DFS ขอิงส์ ญญาณรายุคาบ

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

4j jN

NW 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

14

0 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=3

Page 7: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-7

ต วอิยุ(าง

ว�ธ์�ท์2า

dsp_5_1.eps

L

N

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

Page 8: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-8

2 21 1

0 0

( ) ( )N Lj nk j nk

N N

n n

X k x n e e

แปลง DFT

หร)อิใช�ต วช(วยุจัาก ผลรวม่เรขาคำณต่แบบจ�าก'ด้ จัะด�กว(าไหม?เราจัะน *งค2านวณด�วยุม)อิก�ได� …

1

0

1, 1

1

LLn

n

aa a

a

221

20

1( ) ( )

1

Lj kNL j k nNk

jn N

eX k e

e

ท์2าให�ได�

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

Page 9: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-9

ช้�วงพิ'ลส บวก L=5 และคำาบเป1นื่ N=20

Page 10: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-10

ช้�วงพิ'ลส บวก L=5 และคำาบเป1นื่ N=40

Page 11: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-11

ช้�วงพิ'ลส บวก L=5 และคำาบเป1นื่ N=60

Page 12: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-12

ช้�วงพิ'ลส บวก L=7 และคำาบเป1นื่ N=60

Page 13: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-13

ข�อส'งเกต่-• ช(วงระยุะพี ลส์�บวก ส์ มพี นธ์�ก บ คาบเวลาและขนาด

ขอิงผลการแปลง DFS ด งน�8

L

L

L

L

( )x n

( )X k

Page 14: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-14

DFS ก'บ z-transform และ DTFT

ส์2าหร บส์ ญญาณจั2านวนจั2าก ดใดๆ , 0 1

( )0,

nonzero n Nx n

otherwise

จั ดให�เป4น ส์ ญญาณท์�*เป4นคาบได�โดยุใช�ส์ ญญาณเฉพีาะ n = 0 ถ9ง 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

Page 15: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

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( ) ( )jk

N

X k X e

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

Page 16: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-16

DFT ก'บ DFS

• DFS เป4นการแปลงส์ ญญาณเช�งเวลาไม(ต(อิเน)*อิงและเป4นคาบ ให�เป4นส์ ญญาณเช�งความถ�*แบบไม(ต(อิเน)*อิงและเป4นคาบ

• แต(ส์ ญญาณบางอิยุ(างท์ *วๆไป อิาจัจัะไม(เป4นคาบก�ได�

• ในการว�เคราะห�จั9งต�อิงต ดส์ ญญาณน 8นมาหน9*งช(วงและหา DFS ขอิงช(วงส์ ญญาณน 8น ซึ่9*งเราส์มมต�ให�เป4นช(วงหน9*งคาบ

• และเราเร�ยุกการแปลง DFS ก บส์ ญญาณเพี�ยุงหน9*งคาบน 8นว(าการแปลง DFT

DFT เป1นื่การแปลงทำ)� ใช้�การหา DFS ของส'ญญาณเพิ)ยงหนื่+�งคำาบ

Page 17: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol 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 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-18

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

1, 0 3( )

0,

nx n

otherwise

ต วอิยุ(าง เป4นส์ ญญาณท์�*ม�ค(าเป4นหน9*งเฉพีาะยุ(าน

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

4

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

x n

น *นค)อิต วอิยุ(างเม)*อิเพี�*มศ�นยุ� 4 ต ว

Page 19: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-19

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

dsp_5_6.eps

Page 20: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-20

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

4j jN

NW e e j

3

40

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

n

X k x n W k

3 3

04

0 0

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

n n

X x n W x n x x x x

k=0

k=13 3

14

0 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

Page 21: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-21

N=4

dsp_5_7.eps

Page 22: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-22

N=8

dsp_5_8.eps

Page 23: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-23dsp_5_9.eps

N=16

Page 24: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-24dsp_5_10.eps

N=32

Page 25: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-25

คำวาม่ละเอ)ยด้ (Resolution) ของการคำ�านื่วณสเปคำต่ร'ม่

• การเพี�*มศ�นยุ� Zero padding เป4นการเต�มจั�ดค2านวณให�มากข98น เพี)*อิช(วยุในการเพี�*ม ความหนาแน(น (density) ขอิงการแส์ดงส์เปคตร ม

• แต(ไม(ได�เป4นการเพี�*มความละเอิ�ยุด (resolution) ในการว�เคราะห�ส์เปคตร ม ต�อิงเพี�*มจั2านวนจั�ด (point) ในการค2านวณ DFT

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

ต วอิยุ(าง ล2าด บ x(n) ม�อิงค�ประกอิบความถ�* อิยุ�(ส์อิงความถ�*

Page 26: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-26

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

Page 27: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-27

เพิ�ม่ศูนื่ย อ)ก 40 ต่'ว

Page 28: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-28

แม่�เพิ�ม่ศูนื่ย อ)ก 90 ต่'ว ก5ไม่�เพิ�ม่คำวาม่ละเอ)ยด้

Page 29: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-29

ใช้�ส'ญญาณ x(n) จ�านื่วนื่ 100 ล�าด้'บ จะเห5นื่รายละเอ)ยด้ของสองคำวาม่ถึ)�

Page 30: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-30

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

Page 31: DSP 5 The Discrete  Fourier Transform  ( DFT ) การแปลงฟูริ เยร์ แบบไม่ต่อเนื่อง

EEET0485 Digital Signal Processing

Asst.Prof. Peerapol Yuvapoositanon

DSP5-31

สร-ป• DFT ใช�ในการค2านวณการแปลงฟู�ร�เยุร� ด�วยุต ว

ประมวลผล (คอิมพี�วเตอิร� หร)อิ โปรเซึ่ส์เซึ่อิร�) • DFT ก�ค)อิ DFS ส์2าหร บส์ ญญาณเพิ)ยงหนื่+�งคำาบ• DFT (DFS) ม�ความเช)*อิมโยุงก บการแปลงแซึ่ด

และ DTFT• การเพี�*มศ�นยุ� Zero padding เป4นการเต�มจั�ด

ค2านวณให�หนาแน(นมากข98นแต่�ไม่�ช้�วยเร��องคำวาม่ละเอ)ยด้ของสเปคำต่ร'ม่