1 / 48

DSP 7 Digital Filter Structures โครงสร้างตัวกรองดิจิตอล

DSP 7 Digital Filter Structures โครงสร้างตัวกรองดิจิตอล. ผศ.ดร. พีระพล ยุวภูษิตานนท์ ภาควิชา วิศวกรรมอิเล็กทรอนิกส์. เป้าหมาย. นศ รู้จักความหมายของตัวกรองดิจิตอล และ โครงสร้างแบบต่างๆ

suzy
Download Presentation

DSP 7 Digital Filter Structures โครงสร้างตัวกรองดิจิตอล

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DSP 7Digital Filter Structures โครงสร้างตัวกรองดิจิตอล ผศ.ดร. พีระพล ยุวภูษิตานนท์ ภาควิชา วิศวกรรมอิเล็กทรอนิกส์ EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  2. เป้าหมาย • นศ รู้จักความหมายของตัวกรองดิจิตอล และ โครงสร้างแบบต่างๆ • นศ รู้จักวิธีการสร้างตัวกรองดิจิตอล ที่แสดงในรูปของกราฟการไหลสัญญาณ (signal flow graph) จากฟังก์ชันถ่ายโอน (transfer function) EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  3. Aircraft control motor control special effects ดนตรี เครื่องเสียง Digital Controller CD/ DAT Digital Filters โทรคมนาคม การแพทย์ Mobile Receivers X-rays Bluetooth Digital TV ECG monitoring 3-D reconstruction EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  4. การใช้งานตัวกรองดิจิตอลการใช้งานตัวกรองดิจิตอล • ตัวกรองดิจิตอลคือการประมวลผลสัญญาณในโดเมนเวลาเพื่อดัดแปลงผลตอบสนองทางความถี่ในทางขนาด และ/หรือ เฟส ตัวอย่าง 1: เพื่อกรองสัญญาณรบกวน ออกจาก สัญญาณที่ต้องการ เช่นสัญญาณเสียงที่มีการรบกวนจากสภาวะรอบข้าง ตัวกรองดิจิตอล Digital Filter สัญญาณเสียง + สัญญาณรบกวน สัญญาณเสียง EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  5. การใช้งานตัวกรองดิจิตอล (ต่อ) ตัวอย่าง 2: แยกสัญญาณที่ปะปนกัน เช่นในการวัดสัญญาณคลื่นไฟฟ้า หัวใจ (ECG) ของแม่และทารกในครรภ์ ที่จะมีการปะปนของสอง สัญญาณ สัญญาณ ECG แม่ ตัวกรองดิจิตอล Digital Filter สัญญาณ ECG แม่ + สัญญาณ ECG ทารก สัญญาณ ECG ทารก EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  6. ECG ที่ไม่มีสัญญาณรบกวน EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  7. ECG ที่มีสัญญาณรบกวน 50 Hz EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  8. ECG ที่ถูกกำจัดสัญญาณ 50 Hz EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  9. GSM Downconverter Block Diagram EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  10. Spectral Mask EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  11. A cascaded integrated comb (CIC) decimation filter EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  12. ชนิดของตัวกรองดิจิตอลชนิดของตัวกรองดิจิตอล ตัวกรองดิจิตอลอาจจะแสดงในรูปสมการความแตกต่าง ซึ่งเป็น สมการความแตกต่างอันดับที่หนึ่ง หรืออยู่ในรูป ฟังก์ชันถ่ายโอน (Transfer function) EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  13. ชนิดของตัวกรองดิจิตอล (ต่อ) ตัวกรองอิมพัลส์จำกัด (Finite Impulse Response: FIR) h(n) ตัวกรองอิมพัลส์ไม่จำกัด (Infinite Impulse Response: IIR) h(n) … EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  14. บล็อกย่อยของตัวกรองดิจิตอลบล็อกย่อยของตัวกรองดิจิตอล • หน่วยพื้นฐาน (Basic Elements) • ตัวบวก • ตัวคูณ • ตัวหน่วงเวลา A หมายเหตุ: ลูกศรที่ไม่เขียนค่ากำกับไว้ จะเท่ากับการคูณด้วย “1” EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  15. ตัวกรองดิจิตอลและผลตอบสนองความถี่ สมการความแตกต่างหนึ่งแสดงได้เป็น ตัวอย่าง ให้ ได้ผลตอบสนองความถี่ เมื่อใช้การแปลง z เราจะได้ฟังก์ชันถ่ายโอน หรือ ตัวกรองดิจิตอล EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  16. ผลตอบสนองความถี่ของ MATLAB code w = [0:0.01:pi];% frequency points H = 0.5+0.5*exp(- i * w); subplot(2,1,1);plot(w, abs(H)) subplot(2,1,2);plot(w, angle(H)) เราได้ ตัวกรองดิจิตอล แบบ วงจรกรองต่ำผ่าน (Low pass filter) dsp_7_1.eps EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  17. IIR Direct form I and II Cascade form Parallel form โครงสร้างของตัวกรองดิจิตอล • FIR • Direct form • Cascade form • Linear-phase form • Frequency-sampling EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  18. FIR Direct Form เนื่องจากตัวกรอง FIR มีสมการเป็น องค์ประกอบของตัวหน่วงเวลาและตัวคูณ จึงตรงไปตรงมา ตัวอย่างกรณี q=3 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  19. FIR: Cascade Form โครงสร้าง นี้จะแบ่ง ออกเป็น ตัวกรองแบบออเดอร์ที่สอง หลายๆ ตัว โดยที่ ซึ่งหมายถึงการปัด “ลง” เลขจำนวนต็ม EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  20. FIR: Cascade Form (ต่อ) กรณี M=5 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  21. FIR: Linear-phase Form ตัวกรองที่มีเฟสเชิงเส้น นั้นสามารถมีผลตอบสนองอิมพัลส์ได้ทั้งแบบ: 1 สมมาตร (symmetric) 2.สมมาตรตรงกันข้าม (Anti-symmetric) ถ้า N เป็น เลขคู่ และ h(n) เป็นสมมาตร (1) ตัวอย่าง กรณี N=6 0 1 2 3 4 5 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  22. 0 1 2 3 4 5 การรวบเทอมช่วยให้ลดการคูณลงไป 50 % !! EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  23. FIR: Linear-phase FormTYPE I (กรณี N= เลขคู่) ... ... EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  24. FIR: Linear-phase FormTYPE II (กรณี N = เลขคี่) ... ... EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  25. FIR: Frequency Sampling (1) เป็นการสร้างตัวกรองโดยใช้ สัมประสิทธิ์ จาก DFT จาก DFT EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  26. FIR: Frequency Sampling (2) เทียบเท่ากับ การ cascade ของ วงจรกรอง และตัวกรองแบบหนึ่งโพล จำนวน N ตัว EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  27. FIR: Frequency Sampling (3) EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  28. IIR: Direct Forms ตัวกรองแบบ IIR มีฟังก์ชันถ่ายโอนเป็น เขียนเป็นสมการความแตกต่าง (difference eq.) จะพบว่า ส่วนของตัวกรอง FIR คือส่วนตัวเศษ nominator FIR ดังนั้น รูปแบบแรกของตัวกรอง IIR จึงเป็น Direct form EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  29. IIR: Direct Form I EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  30. สลับลำดับของ “เศษ”และ “ส่วน” ส่วน เศษ EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  31. IIR: Direct Form II EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  32. IIR: Cascade เราสามารถใช้โครงสร้างcascade ของ FIR กับตัวกรอง IIR ได้ ซึ่งเป็นตัวกรองอันดับที่ 1 แต่หาก สปส เป็นเลขเชิงซ้อน เราได้ ซึ่งมีโครงสร้างเป็นตัวกรองอันดับที่สอง EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  33. IIR: Cascade (ต่อ) EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  34. IIR: Parallel Form เรายังสามารถ แยกส่วนประกอบออกเป็นผลคูณของเทอมย่อยๆ ใช้วิธี Partial Fraction Expansion ในการแยก factor ได้ โดยที และ เป็นเลขเชิงซ้อน EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  35. IIR: Parallel Form (ต่อ) กรณี N =4 ( Ns=2) EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  36. ตัวอย่างโจทย์ FIR 1 จงหาผลตอบสนองความถี่ ของตัวกรองดิจิตอลแบบ FIR -0.1 0.2 เป็นตัวกรองที่มีโครงสร้างแบบ linear phase type II EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  37. ตัวอย่างโจทย์ FIR 1 หาสัญญาณ ณ แต่ละ “node” -0.1 0.2 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  38. ตัวอย่างโจทย์ FIR 1 รวมสัญญาณ ที่ node -0.1 0.2 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  39. ตัวอย่างโจทย์ FIR 1 คูณสัญญาณ -0.1 0.2 EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  40. ตัวอย่างโจทย์ FIR 1 ได้ เอาท์พุทเมื่ออินพุทเป็นอิมพัลส์ แปลงDTFT ซึ่งทำให้ได้ ผลตอบสนองความถี่ EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  41. ตัวอย่างโจทย์ IIR 1 จาก ฟังก์ชันถ่ายโอนข้างล่าง จงสร้างตัวกรองดิจิตอลในแบบ direct form I และ direct form II หาผลคูณของเทอมส่วน EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  42. ตัวอย่างโจทย์ IIR 1 Direct form I EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  43. ตัวอย่างโจทย์ IIR 1 Direct form II EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  44. ตัวอย่างโจทย์ IIR 2 จงหา ฟังก์ชันถ่ายโอน H(z) จาก โครงสร้าง direct form II ข้างล่างนี้ EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  45. EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  46. EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  47. ได้ฟังก์ชันถ่ายโอนเป็นได้ฟังก์ชันถ่ายโอนเป็น EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

  48. สรุป • ตัวกรองดิจิตอลมีสองแบบ คือ FIR และ IIR • เราสร้างตัวกรองดิจิตอลได้จากทั้งฟังก์ชันถ่ายโอน หรือจาก สมการความแตกต่าง • หรือ ในทางกลับกันเราสามารถหาฟังก์ชันถ่ายโอน และ ผลตอบสนองความถี่ จากตัวกรองดิจิตอลได้ EEET0485 Digital Signal Processing http://embedsigproc.wordpress.com Asst. Prof. Dr. P.Yuvapoositanon

More Related