Skip to content Skip to navigation

Connexions

You are here: Home » Content » Multirate Filtering: Implementation on TI TMS320C54x (Thai Version)

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

      What are tags? tag icon

      Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

    • External bookmarks
  • E-mail the authors
  • Rate this module (How does the rating system work?)

    Rating system

    Ratings

    Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

    How to rate a module

    Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

    (0 ratings)

Recently Viewed

This feature requires Javascript to be enabled.

Multirate Filtering: Implementation on TI TMS320C54x (Thai Version)

Module by: Douglas L. Jones, Swaroop Appadwedula, Matthew Berry, Mark Haun, Jake Janovetz, Michael Kramer, Dima Moussa, Daniel Sachs, Brian Wade, Patrick Frantz, Kamolchanok Kriengchaipruck Based on: Multirate Filtering: Implementation on TI TMS320C54x by Douglas L. Jones, Swaroop Appadwedula, Matthew Berry, Mark Haun, Jake Janovetz, Michael Kramer, Dima Moussa, Daniel Sachs, Brian Wade

Summary: You will implement a multirate system that includes three fininte impulse response filters. The sample-rate compression and expansion factors can be controlled in real time using a MATLAB graphical user interface.

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

Implementation

ก่อนที่จะเริ่ม implementing ระบบทั้งหมดดังที่แสงอยู่ใน Multirate Processing: Introduction ขอให้คุณทำการออกแบบระบบที่มีชุดของ filters FIR 1 และ FIR 2 ที่ไม่มี sample-rate compressor หรือ expander ก่อน. จากนั้นให้ทำการ verify ว่าค่าที่ได้จาก two-filter system นั้นถูกต้องหรือไม่ เมื่อเรียบร้อยแล้ว ก้อให้เริ่มทำการ mplement ระบบ multirate ทั้งหมด แล้วทำการ verify ผลลัพธ์ ในตอนแรกให้ใช้ fixed compression และ expansion factors ของ D=U=4 D U 4 . ต่อไป คุณจะสามารถควบคุม factor ตัวนี้โดยช้ MATLAB interface; อย่าลืมเงื่อนไขข้อนี้ในขณะเขียน code ด้วย

Compressed-rate processing

ให้ทำการ implement counter ใน code เพื่อที่จะทำการ processing ที่ระดับ sample rate ที่ต่ำกว่าได้ counter จะเป็นตัวกำหนดว่า ompressed-rate processing จะเกิดขึ้นเมื่อไหร่ และยังสามารถใช้เป็นตัวกำหนดว่าจะเพิ่ม ศูนย์ ไปใน FIR 3 เพื่อ implement sample-rate expander อีกด้วย

คำสั่งบางอย่างที่อาจมีประโยชน์ ช่วยในการ implement โครงสร้างแบบ multirate structure คือ addm (add to memory) และ bc (branch conditional) คุณอาจจะลองใช้ banz (branch on auxiliary register not zero) และ b (branch)ได้เช่นกัน

Real-time rate change and MATLAB interface

Graphical user interface (GUI) อย่างง่ายมีอยู่ที่ (as mrategui.m, ซึ่งต้องมี ser_snd.m) จะทำหน้าที่ส่งตัวเลข ตั้งแต่ 1 ถึง 10 ไปยัง DSP ผ่าน serial port. ซึ่งสามรถใช้วิธีนี้ในการ เปลี่ยน ค่า compression และ expansion factor แบบ real time ได้

Run GUI โดยพิมพ์คำว่าmrategui ตรง MATLAB prompt. จากนั้นควรจะมี แถบเลื่อนปรากฏขึ้นมาอัติโนมัติ เพื่อไว้สำหรับปรับค่า compression และ expansion factor ที่จะส่งไป DSP

Assembly code ที่คุณได้รับไปนั้นจะเก็บค่าสุดท้ายที่ DSP ได้รับจากคอมพิวเตอร์ไว้ในหน่วยความจำตำแหน่ง ที่ระบุไว้ว่า hold. ถ้าหากคุณไม่ได้ทำการเปลี่ยน serial port สำหรับ code นั้น, คุณก็จะสามารถหาค่าสุดท้ายของ compression และ expansion factor ที่เกิดจาก GUI ได้ที่หน่วยความจำตำแหน่งนี้. คุณต้องทำการแก้ไข code เพื่อให้ทุกครั้งที่ได้รับค่าใหม่จาก serial port, compression และ expansion factor ถูกเปลี่ยนด้วย ถ้าได้รับค่า "1" ทั้งระบบควรจะทำงานที่ full rate; แต่ถ้าเป็น "10" ระบบ ควรจะต้องเลือก sample 9 ตัว จากแต่ละ sample ที่ถูกประมวลผลที่ lower rate ทิ้งไป

ให้สังเกตุว่า macro READSER และ WRITSER ซึ่งใช้ในการอ่ารและส่งค่าไปยัง serial port, ทำการ overwrite AR0, AR1, AR2, และ registerAR3 เช่นกัน BK และ condition flag TC. เพราะฉะนั้นให้ระวังว่า register เหล่านี้ไม่ได้ถูกใช้โดยส่วนอื่นใน code, หรือคุณควรจะต้องทำการ save และ restore ค่าในหน่วยความจำก่อนท่จะเรียกใช้ macro READSER และ WRITSER ซึ่งสามารถทำได้โดยใช้คำสั่ง mvdm และ mvmd โดยที่ macro เหล่านี้จะทำการ set up ค่า AR1 และ AR3 ทุกครั้งที่ถูกเรียกใช้ จึงไม่จำเป็นต้องเปลี่ยน register ก่อนที่จะเรียกใช้ macro

ข้อมูลเพิ่มเติมเกี่ยวกับ macro READSER และ WRITSER หาได้ที่ Core File: Serial Port Communication Between MATLAB and TI TMS320C54x.

Comments, questions, feedback, criticisms?

Send feedback