+ All Categories
Home > Documents > Dsp320 Experimental Manual

Dsp320 Experimental Manual

Date post: 10-Feb-2018
Category:
Upload: ksrinivas-rao
View: 212 times
Download: 0 times
Share this document with a friend

of 236

Transcript
  • 7/22/2019 Dsp320 Experimental Manual

    1/236

    DSP320

    TMS 320XXXX DSP TRAINER

    EXPERIMENTAL & SERVICEMANUAL

  • 7/22/2019 Dsp320 Experimental Manual

    2/236

  • 7/22/2019 Dsp320 Experimental Manual

    3/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 1 - Embedded & DSP

    . A MESSAGE FROM

    Todays system designers are faced with tomorrows problems. EMBEDEDSYSTEM is one of the important subject need to teach while learning electronics.It is our vision to provide you with the product you need for training ensuringlasting reliability & quality.

    OUR MOTTO;- Light years ahead refers to leadership.

    As leaders in our industry in India, We are totally committed to servicing as thestandard against which all are measured in the areas of

    Design Quality Value Delivery Support.We are truly light years ahead of our competition in this area. That means thatyou our valued customers are guaranteed satisfaction.

    As you will move through this manual you will quickly discover that We have acomplete, truly innovative & superior training products we are so committed toquality that we back our products with a complete comprehensive warranty.

  • 7/22/2019 Dsp320 Experimental Manual

    4/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 2 - Embedded & DSP

    SAFETY RULES

    Read carefully and follow the instructions mentioned in this manual. This

    user manual includes all the important points about the installation, use andthe maintenance of the product. Keep this manual always with you, for quickreference.

    After unpacking the product, arrange all the accessories in proper order, sothat their integrity is checked with the packing list. Also, ensure that theaccessories have no visible damage.

    Before connecting the power supply to the kit, be sure that the jumpers andthe connecting chords are connected correctly, as per the experiment.

    This kit must be employed only for the use for which it has been conceived,i.e. as educational kit and must be used under the direct survey of expertpersonnel. Any other use is inadvisable and dangerous too. Themanufacturer cannot be considered responsible for eventual damages dueto improper, wrong or unreasonable uses.

    In case of any fault or malfunctioning in the trainer kit, turn off the powersupply. Please do not tamper the kit. If you require our service, kindlycontact the service centre for technical assistance.

    The kits are liable to malfunction/under-perform if they are not operatedunder standard environmental conditions of temperature and humidity.

  • 7/22/2019 Dsp320 Experimental Manual

    5/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 3 - Embedded & DSP

    WARRANTY

    This kit is warranted against defects in workmanship and materials. Any failure

    due to defect in either workmanship or material should occur under normal usewithin a year from the original date of purchase, such failure will be corrected freeof charge to the purchaser by repair or replacement of defective part or parts.When the failure is result of users neglect, natural disaster or accident, we wouldcharge for repairs, regardless of the warranty period. The warranty does notcover include perishable items like connecting chords, crystals, etc. and otherimported items.

    Conditions and LimitationsThe warranty is void and inapplicable if the defective product is not brought orsent to our authorized service center or sales outlet within the warranty period.

    Defective product will be Falcon Electro Tek. Pvt. Ltds sole judgment. Thedefective product will be replaced with a new one or repaired, without charge orwith charge.

    In the warranty period if the service is needed, the purchaser should get in touchwith the service center or the sales outlet. The purchaser should return theproduct to the service center or the sales outlet at his or her sole expense. Theloss and damage in transit will be outside the preview of this warranty. A returnedproduct must be accompanied by a written description of the defects. Type andModel No. of the kit has to be mentioned specifically. We return the product to thepurchaser at our expense. In case the warranty does not cover the product on

    Falcon Electro-Tek Pvt. Ltd.s judgment, we would repair the product afterobtaining prior permission from purchaser who would receive an estimatestatement about the repairing charges. In such cases, Falcon Electro-Tek Pvt.Ltd. bares the transporting expenses required to send back all the repairedproducts for the moment, and then repairs and transporting expenses will becharged against the purchaser by the statement of accounts.

    When the authorized sales agents sell our products, they must notify thepurchaser of the warranty contents, but they have no rights to stretch themeaning of original warranty contents or to offer an additional warranty. FalconElectro-Tek Pvt. Ltd. does not provide any other promise or suggestive warrantyand hold no liability for the damage caused by negligence, abnormal use ornatural disaster. Falcon Electro-Tek Pvt. Ltd. is not responsible for the damageseven if it is notified of above dangers in advance as well.

    For more special service or overall repairs, maintenance and up gradation ofproducts, be sure to contact our service center or the sales outlet.

  • 7/22/2019 Dsp320 Experimental Manual

    6/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 4 - Embedded & DSP

    INDEX

    01. Technical Specifications 09

    02. Functional Block 10

    03. Introduction 11

    04. Circuit Diagram 12

    05. Packing List 18

    06. Software Installation 19

    07. Start with CCSTUDIO v5 27A. How to create new project and Run that program.B. How to import existing project.

    08. Experiment No: 1Linear convolution. 41

    09. Experiment No: 2Circular convolution. 45

    10. Experiment No: 3N- Point DFT of a given sequence. 49

    11. Experiment No: 4N- Point IDFT of a given sequence 53

    12. Experiment No: 5Impulse response 57a)first order systemb)second order system

    13. Experiment No: 6Frequency response of system 61

    a)Given in Transfer function formb)Given in differential equation form

    14. Experiment No: 7FIR filter 671)To design FIR Low pass filter using windows

    a) Using rectangular windowb) Using triangular windowc) Using Kaiser window

    2)To design FIR High pass filter using windowsa) Using rectangular window

    b) Using triangular windowc) Using Kaiser window

  • 7/22/2019 Dsp320 Experimental Manual

    7/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 5 - Embedded & DSP

    3)To design FIR Band pass filter using windowsa) Using rectangular windowb) Using triangular windowc) Using Kaiser window

    15. Experiment No: 8IIR filter 731)To design IIR Low pass filter

    a) Butterworth filterb) chebyshev

    2)To design IIR High pass filtera) Butterworth filterb) chebyshev

    3)To design IIR Low pass filter

    a) Butterworth filterb) chebyshev

    16. Experiment No: 9Noise remove from sine wave using adaptive filter. 81

    17. Experiment No: 10Power spectrum density. 85

    18. Experiment No: 11Generation of sinusoidal wave. 91

    a)Generation of sinusoidal wave based on recursivedifferential equationb)Generation of sinusoidal through filtering

    19. Experiment No: 12DFT of given sequence using DIT & DIF FFT. 97a)To find DFT (8-POINTS) of given sequence using DIT FFTb)To find DFT (8-POINTS) of given sequence using DIF FFT

    20. Experiment No: 13IFFT of given sequence using DIT & DIF FFT. 103

    a)To find IFFT (8-POINTS) of given sequence using DIT FFTb)To find IFFT (8-POINTS) of given sequence using DIF FFT

    21. Experiment No: 14Interpolation process. 107

    22. Experiment No: 15Decimation process. 113

    23. Experiment No: 16I/D sampling rate converter. 119

  • 7/22/2019 Dsp320 Experimental Manual

    8/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 6 - Embedded & DSP

    24. Experiment No: 17a)Autocorrelation. 127b)Auto_correlation_summation_property

    25. Experiment No: 18Cross-correlation. 133

    26. Experiment No: 19To find the FFT of given signal. 139

    27. Experiment No: 20N-Point FFT. 143

    28. Experiment No: 21Sampling at 4KHz sampling rate 147

    29. Experiment No: 22Amplitude modulation 151

    30. Experiment No: 23FSK modulation 159

    31. Experiment No: 24Generation of square wave 169

    32. Experiment No: 25Frequency modulation 173

    33. Experiment No: 26FIR filter using Fourier series expanstion method 181

    34. Experiment No: 27Blackman & hamming window filter 183

    35. Experiment No: 28Digital Image fundamental 187

    36. Experiment No: 29

    Image Enhancement 191

    37. Experiment No: 30Image reconstruction 197

    38. Experiment No: 31Color Image processing 203

    39. Experiment No: 32Image compression 209

    40. Experiment No: 33Image segmentation 215

  • 7/22/2019 Dsp320 Experimental Manual

    9/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 7 - Embedded & DSP

    41. Experiment No: 34Morphology Image processing 223

    42. Experiment No: 35DTMF signal of phone keys 227

  • 7/22/2019 Dsp320 Experimental Manual

    10/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 8 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    11/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 9 - Embedded & DSP

    TECHNICAL SPECIFICATIONS

    TMS320C6745 DSP320 Features

    The DSP features the TMS320C6745 DSP320, a 375 MHz device delivering up

    to 3648 million instructions per second (MIPs) and 2736 MFLOPS. This DSPgeneration is designed for applications that require high precision accuracy. TheC6745 is based on the TMS320C6000 DSP platform designed to needs of high-performing high-precision applications such as pro-audio, medical anddiagnostic. Other hardware features of the TMS320C6745 DSK board include:

    Embedded JTAG supported via USB

    TLV320AIC23B programmable stereo codec

    Two 3.5mm audio jacks for microphone and speaker

    Expansion for port connector for plug-in modules

    Power supply : +5V, 12V, GND 8 DIP switches for inputs

    8 LED indication for output

    Provision for manual Reset

    4*4 LED matrix

    Noise generator : White noise generator

    : Amplitude 0 ~ 5Vpp

    20*2 character LCD display.

    2 No. 7 segment displays.

    RTC interface : I2C based RTC section Phone keypad : 0 to 9 digits and *, # characters

    Software - Designers can readily target the TMS32C6745 DSP320 through TIsrobust and comprehensive Code Composer Studio v5 DSP320 developmentplatform. The tools, which run on Windows 98, Windows 2000 ,Windows XPand Windows 7, allow developers to seamlessly manage projects of anycomplexity. Code Composer Studio features for the TMS320C6745 DSP320include:

    A complete Integrated Development Environment (IDE), an efficientoptimizing C/C++ compiler assembler, linker, debugger, an a advancededitor with Code Maestro technology for faster code creation, datavisualization, a profiler and a flexible project manager

    DSP/BIOS real-time kernel Target error recovery software DSP320 diagnostic tool "Plug-in" ability for third-party software for additional functionality

  • 7/22/2019 Dsp320 Experimental Manual

    12/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 10 - Embedded & DSP

    FUNCTIONAL BLOCK

    FALCON

    DSP320-TMS320XXXXDSPTRAINER

    7SEGMENTDISPLAY

    SWITCHES

    O/PLEDS

    NOISEGENERATO

    R&ADDER

    DSP

    CODEC

    KEYPAD

    FREE

    I/OsJ

    TAG

    LEDMATRIX

    RTC

    LCD

    POWERSUPPLY

    GND

    !"

    #2"

    -#2"

    HEADPHONE

    OUT

    MICIN

    LINE

    OUT

    LINE

    IN

    IN#

    NOISE

    OUT

    OUT#

    #

    2

    3 $

    !

    % 7

    '

    0

    (

    L#

    L!

    L'

    L#3

    L2

    L$

    L#0

    L#%

    L3

    L7

    L##

    L#!

    L%

    L

    L#2

    L#$

    L#7

    L#

    L#'

    L20

    L2#

    L22

    L23

    L2%

    PR%

    SW#

    RESET

  • 7/22/2019 Dsp320 Experimental Manual

    13/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 11 - Embedded & DSP

    INTRODUCTION

    The 6745 DSP320 is a low-cost standalone development platform that enablesusers to evaluate and develop applications for the TI C67XX DSP family. The

    DSP also serves as a hardware reference design for the TMS320C6745 DSP.Schematics, logic equations and application notes are available to easehardware development and reduce time to market.

    An on-board AIC23 codec allows the DSP to transmit and receive analog signals.SPI is used for the codec control interface and McASP0 is used for data. Analogaudio I/O is done through two 3.5mm audio jacks that correspond to microphoneinput, and headphone output and also line input, line output. The codec canselect the microphone or the line input as the active input. The analog output isdriven to both the line out (fixed gain) and headphone (adjustable gain)connectors.

    The DSP320 includes 8 LEDs, 8 DIP switches, 4*4 LED matrix, LCD and Sevensegment as a simple way to provide the user with interactive feedback. It alsoinclude phone keypad to study DTMF signals.

    The DSP320 includes Real time clock displayed on LCD to learn RTC and I2Cprotocol.

    Code Composer communicates with the DSP through an embedded JTAGemulator with a USB host interface.

  • 7/22/2019 Dsp320 Experimental Manual

    14/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 12 - Embedded & DSP

    CIRCUIT DIAGRAM & DESCRIPTION

    1. POWER SUPPLY

    FalconElectroTekPvtLtd

    DSP320

    12.0 1

  • 7/22/2019 Dsp320 Experimental Manual

    15/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 13 - Embedded & DSP

    2. LEDs, LED MATRIX, SWITCHs, KEYPAD, SEVEN SEGMENT AND LCD

    FalconElectroTe

    kPvtLtd

    DSP320

    12.0 2

  • 7/22/2019 Dsp320 Experimental Manual

    16/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 14 - Embedded & DSP

    3. DSPTMS320C6745

    FalconElectroTe

    kPvtLtd

    DSP320

    12.0 3

  • 7/22/2019 Dsp320 Experimental Manual

    17/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 15 - Embedded & DSP

    4. CODEC, RTC AND FREE I/Os

    FalconElectroTek

    PvtLtd

    DSP320

    12.0 4

  • 7/22/2019 Dsp320 Experimental Manual

    18/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 16 - Embedded & DSP

    5. NOISE ADDER

    FalconElectroTe

    kPvtLtd

    DSP320

    12.0 5

  • 7/22/2019 Dsp320 Experimental Manual

    19/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 17 - Embedded & DSP

    6. DSP-Vcc

    Falcon

    ElectroTekPvtLtd

    DSP320

    12.0 6

  • 7/22/2019 Dsp320 Experimental Manual

    20/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 18 - Embedded & DSP

    Packing list:

    DSP320 Development board 1 no.

    Power supply with Power cord 1 no.

    USB to JTAG emulator 1 no.

    MIC and Head Phone set 1 no.

    Patch cords 6 no.

    CD containing documents 1 no

    Experimental manual. 1 no.

  • 7/22/2019 Dsp320 Experimental Manual

    21/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 19 - Embedded & DSP

    SOFTWARE INSTALLATION

    SYSTEM REQUIREMENTS:

    Higher Pentium and above CPU

    6750MB of free hard disk space 1GB of RAM

    SVGA (800 x 600 ) display

    Internet Explorer (4.0 or later) or

    Netscape Navigator (4.7 or later)

    Local DVD drive

    Supported Operating Systems:

    Windows 98 Windows 2000 Service Pack 1

    Windows Me Windows XP

    Windows 7

    Install Code Composer Studio V5 from DVD :

    NOTE:Before you install the CCS software, please make sure you are usingAdministrator privileges and any virus checking software is turned off.The DSP320 board should not be plugged in at this point.

    1. Simply insert the DVD into your drive.2. Double click on ccs_setup_5.2.1.00018.exe from the DVD

    The following window should appear.

  • 7/22/2019 Dsp320 Experimental Manual

    22/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 20 - Embedded & DSP

    Click on I accept the terms of the license agreement button to accept thelicense. And proceed with Next button for further installation of the software.

    The following window should appear

    You must install software in C drive only, as shown above.Click on Next button. The following window should get

  • 7/22/2019 Dsp320 Experimental Manual

    23/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 21 - Embedded & DSP

    Select complete feature set as a type of setup and then click on Next button.The following Emulator selection window should appear.

    Here, simply confirm that XDS100v2 usb emulator must be selected. And otherby default selection of emulators keep as it is. Click on Next. The followingwindow shold appear.

    Click on Next button to proceed further installation. The following window shouldget

  • 7/22/2019 Dsp320 Experimental Manual

    24/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 22 - Embedded & DSP

    Installation is in process. It takes minimum half an hour for installation.

    After completing the installation successfully, following window will popup.

    Now click on Finish button. The next window should appear.

  • 7/22/2019 Dsp320 Experimental Manual

    25/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 23 - Embedded & DSP

    Next the workspace window should appear. Code Composer Studio stores yourprojects in a folder called a workspace.

    Click on Browse button to select the directory where you wish to create yourworkspace folder. Click on OK button.The following window should appear.

  • 7/22/2019 Dsp320 Experimental Manual

    26/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 24 - Embedded & DSP

    The next is License setup window will popup as shown below

    Here, you have to select license option as a Free LICENSE as shown in thefollowing window.

    Click on Finish button. The following window should appear

  • 7/22/2019 Dsp320 Experimental Manual

    27/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 25 - Embedded & DSP

    To verify that the license has installed correctly, simply check the wordLicensed at the left side bottom of the above window.

    After completing above installation successesfully, the following six iconswill appear on desktop.

    NOTE :- After completing installation and before going to use CCSv5 studioenvironment just copy and replace the original evmc6747_dsp.gelfile with thegel file provided in DVD into the CCS install folder location given below

    C:\ti\ccsv5\ccs_base\emulation\boards\evmc6747\gel

  • 7/22/2019 Dsp320 Experimental Manual

    28/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 26 - Embedded & DSP

    HARDWARE SETTING

    Connect the DSP- 320 to Your PC1. Connect the supplied USB cable to your PC or laptop.

    2. If you plan to connect a microphone, speaker, function generator,DSO, or expansion card these must be plugged in properly before youconnect power to the DSP320 board.

    3. JTAG cable must be connected to PC and kit before power ON theDSP320 board. The required driver for the emulator is automaticallyinstall by computer.

    4. Connect the power supply to DSP320 and switch it ON

  • 7/22/2019 Dsp320 Experimental Manual

    29/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 27 - Embedded & DSP

    START WITH CCSTUDIO v5

    INTRODUCTION TO CODE COMPOSER STUDIO:

    Code Composer is the DSP industry's first fully integrated developmentenvironment (IDE) with DSP-specific functionality. With a familiar environmentliked MS-based C++TM, Code Composer lets you edit, build, debug, profile andmanage projects from a single unified environment. Other unique featuresinclude graphical signal analysis, injection/extraction of data signals via file I/O,multi-processor debugging, automated testing and customization via a C-interpretive scripting language and much more.

    CODE COMPOSER FEATURES INCLUDE:

    IDE

    Debug IDE Advanced watch windows

    Integrated editor

    File I/O, Probe Points, and graphical algorithm scope probes

    Advanced graphical signal analysis

    Interactive profiling

    Automated testing and customization via scripting

    Visual project management system

    Compile in the background while editing and debugging

    Multi-processor debugging

    Help on the target DSP

    A. PROCEDURE TO WORK ON CODE COMPOSER STUDIO:

    1. Double click on Code Composer Studio v5 icon which is on desktop.

    2. It will open the workspace window as follows.

  • 7/22/2019 Dsp320 Experimental Manual

    30/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 28 - Embedded & DSP

    Simply close the above window, now you will get following window.

  • 7/22/2019 Dsp320 Experimental Manual

    31/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 29 - Embedded & DSP

    3. To create a new project, go to ProjectNew CCS Project.Give name toproject with location to save project or use default location. Project type mustbe Executable. Following window should apper.Device family is C6000. TheVariant is C674x Floating-point DSP and next to this you have to selectEVMC6747. In device connection, select Texas Instruments XDS100v2USB Emulator. In project templates and example section, you have to selectan Empty project. As per shown in below window.

    Click on Finish button. It starts creating an empty project.

    4. After finishing project creation. Empty Project will appear in left window ofsoftware, as shown below.

  • 7/22/2019 Dsp320 Experimental Manual

    32/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 30 - Embedded & DSP

    5. To create a source file. Go to FileNewsource file.

  • 7/22/2019 Dsp320 Experimental Manual

    33/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 31 - Embedded & DSP

    The new sorce file popup window should appear contaning source folder, InSource filesection save the file name with extension.c, Select template as aDefault C++ source templateas shown below:

    Click on Finish button. It will create a new source file.

    6. The next window will appear where you can write your code and save it. Oryou can add existing source file. As per shown below:

  • 7/22/2019 Dsp320 Experimental Manual

    34/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 32 - Embedded & DSP

    7. Now write your c program, as follows

    8. For testing your connection with board, bouble click on EVMC6747.ccxml sofollowing window winn appear.

  • 7/22/2019 Dsp320 Experimental Manual

    35/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 33 - Embedded & DSP

    9. Then click on Test connection in above window, so testing window willappear as follows

    If above window will appear with this message then your connection iscorrect, than you can close this window and proceed further.

    If following window will appear, than than connection may get incorrect. Sopower off DSP320 board and power it again, and do all processes again till

    scan-test will be succeeded.

  • 7/22/2019 Dsp320 Experimental Manual

    36/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 34 - Embedded & DSP

    10. After that build your program from ProjectBuild ALL. Following consolewindow will appear. It shows if any error present or not.

    11. After that Debug the program. For that double click on Debug icon shown inabove window or press F11. So debug process starts as follows.

  • 7/22/2019 Dsp320 Experimental Manual

    37/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 35 - Embedded & DSP

    12. After few second, loading of program is completed that is shown in followingwindow

    13. Run program by clicking on RUN icon in above window, program will runcompletely and give output in colsole window as follows.

  • 7/22/2019 Dsp320 Experimental Manual

    38/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 36 - Embedded & DSP

    14. After completion all program, close debug session by clicking on disconnecticon shown in above window. It will come to previous edit window.

    15. After completion of one program close project by, right click on project nameand delete as shown below.

    16. It will ask for conformation as follows

    17. Only click on ok. It will delete project from project exploser only. Dont tickon Delete project content on disk, it will delete all program from computer.

  • 7/22/2019 Dsp320 Experimental Manual

    39/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 37 - Embedded & DSP

    How to import existing project18. Open CCStudio V5 , as follows

    19. Then Go to ProjectImort Existing CCS Eclipse Project as per shownbelow.

  • 7/22/2019 Dsp320 Experimental Manual

    40/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 38 - Embedded & DSP

    Selection of Existing CCS Eclipse project window should appear . As shownbelow.

    Browse to select directory. Selected project will appear in discovered projectssection. As per shown below

  • 7/22/2019 Dsp320 Experimental Manual

    41/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 39 - Embedded & DSP

    Select and click on ok, in above window, so following window will appear

    Click on Finish button. Selected project will automatically imopt into projectexplorer window present at the left side of software window. As shown below

  • 7/22/2019 Dsp320 Experimental Manual

    42/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 40 - Embedded & DSP

    For debugging and downloading follow the procedure from 10 to 13.

  • 7/22/2019 Dsp320 Experimental Manual

    43/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 41 - Embedded & DSP

    EXPERIMENT

    NO.1

  • 7/22/2019 Dsp320 Experimental Manual

    44/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 42 - Embedded & DSP

    EXPERIMENT NO: 1

    NAME

    LINEAR CONVOLUTION

    OBJECTIVE

    To perform linear convolution for the given sequences

    THEORY

    Linear Convolution involves the following operations.1. Folding2. Multiplication3. Addition4. Shifting

    These operations can be represented by a Mathematical Expression as follows:

    x[ ]= Input signal Samplesh[ ]= Impulse response co-efficient.

    y[ ]= Convolution output.n = No. of Input samplesh = No. of Impulse response co-efficient.

    Algorithm to implement C or Assembly program for Convolution:

    Eg: x[n] = {1, 2, 3, 4}h[k] = {1, 2, 3, 4}

    Where: n=4, k=4. ; Values of n & k should be a multiple of 4.If n & k are not multiples of 4, pad with zeros to make

    multiples of 4r= n+k-1 ; Size of output sequence.= 4+4-1= 7.

    r= 0 1 2 3 4 5 6n= 0 x[0]h[0] x[0]h[1] x[0]h[2] x[0]h[3]

    1 x[1]h[0] x[1]h[1] x[1]h[2] x[1]h[3]2 x[2]h[0] x[2]h[1] x[2]h[2] x[2]h[3]3 x[3]h[0] x[3]h[1] x[3]h[2] x[3]h[3]

    Output: y[r] = { 1, 4, 10, 20, 25, 24, 16}.NOTE: At the end of input sequences pad n and k no. of zeros

  • 7/22/2019 Dsp320 Experimental Manual

    45/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 43 - Embedded & DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    PATH: DSP320_PROGRAMS\LINEAR_CONVOLUTIONThen debug and run the program.

    OUTPUT

    In this program x[n]={1,2,3,4,5,6}, & h[n]={1,2,3,4}.

    So output of linear convolution is y[k]={1,4,10,20,30,40,43,38,24};

    To view output graphically,Toolsgraphsingle time.Graph setting & graph as follows.

  • 7/22/2019 Dsp320 Experimental Manual

    46/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 44 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    47/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 45 - Embedded & DSP

    EXPERIMENT

    NO.2

  • 7/22/2019 Dsp320 Experimental Manual

    48/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 46 - Embedded & DSP

    EXPERIMENT NO: 2

    NAME

    CIRCULATION CONVOLUTION

    OBJECTIVE

    To perform circular convolution for the given sequences

    THEORY

    Steps for Cyclic Convolution:Steps for cyclic convolution are the same as the usual convolution, except allindex calculations are done "mod N" = "on the wheel" .Step1: Plot f[m] and h[m]

    Subfigure 1.1 Subfigure 1.2Step 2: "Spin" h[m]ntimes Anti Clock Wise (counter-clockwise) to get h[n-m]

    (i.e. Simply rotate the sequence, h[n], clockwise by nsteps)

    Figure 2: Step 2

    Step 3: Pointwise multiply the f[m] wheel and the h[n-m] wheel. Sum=y[n]Step 4: Repeat for all 0

  • 7/22/2019 Dsp320 Experimental Manual

    49/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 47 - Embedded & DSP

    h[m] =

    Figure 4Multiply f[m] and sum to yield: y[0] =3

    h[1m]

    Figure 5Multiply f[m] and sum to yield: y[1] =5

    h[2m]

    Figure 6Multiply f[m] and sum to yield: y[2] =3

    h[3m]

    Figure 7Multiply f[m] and sum to yield: y[3] =1

  • 7/22/2019 Dsp320 Experimental Manual

    50/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 48 - Embedded & DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    PATH: DSP320_PROGRAMS\CIRCULAR_CONVOLUTIONThen debug and run the program. Program ask for input length of 1stsequence, so enter the length of sequence,

    eg. 4.

    Program ask for input length of 2ndsequence, so enter the length of sequence,eg. 4.

    Program ask to enter the first sequence.Eg. 3,2,1,0

    Program ask to enter the second sequence.Eg. 1,1,0,0

    OUTPUT

    In this program x[4]={3,2,1,0}, & h[4]={1,1.0.0} as you enter.

    So output of circular convolution is y[k]={3,5,3,1};

  • 7/22/2019 Dsp320 Experimental Manual

    51/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 49 - Embedded & DSP

    EXPERIMENT

    NO.3

  • 7/22/2019 Dsp320 Experimental Manual

    52/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 50 - Embedded & DSP

    EXPERIMENT NO: 3

    NAME

    N- Point DFT of a given sequence

    OBJECTIVE

    Computation of N- Point DFT of a given sequence

    THEORY

    The N point DFT of discrete time signal x[n] is given by the equation

    1-N0,1,2,....k;][1)(

    1-N

    0n

    2

    == =

    N

    knj

    enxN

    kX

    Where N is chosen such that LN , where L=length of x[n]. To implement using

    C program we use the expression

    =

    N

    knj

    N

    kne N

    knj

    2sin

    2cos

    2

    and allot

    memory space for real and imaginary parts of the DFT X(k)

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project. Which is

    saved in DVD at following locationPATH: DSP320_PROGRAMS\N_POINT_DFTThen debug and run the program.

    Program ask for no of points of DFT.Eg. 8(for 8 points DFT)

    Program ask for values of x[N], you have to enter values as 1 st real & 2ndimaginary for all N no of values.Eg. x[N]={1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.

    It enter in program as

    1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

    OUTPUT

    Input x[n]= {1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.

    Output X[K]={2.8+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,0.0+j0.0,0.0+j0.0}.

  • 7/22/2019 Dsp320 Experimental Manual

    53/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 51 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    54/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 52 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    55/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 53 - Embedded & DSP

    EXPERIMENT

    NO.4

  • 7/22/2019 Dsp320 Experimental Manual

    56/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 54 - Embedded & DSP

    EXPERIMENT NO: 4

    NAME

    N- Point IDFT of a given sequence

    OBJECTIVE

    Computation of N- Point IDFT of a given sequence

    THEORY

    The N point DFT of discrete time signal x[n] is given by the equation

    1-N0,1,2,....n;][1)(

    1-N

    0k

    2

    == =N

    knj

    ekXN

    nx

    Where N is chosen such that LN , where L=length of x[n]. To implement using

    C program we use the expression

    +

    =

    N

    knj

    N

    kne N

    knj

    2sin

    2cos

    2

    and allot

    memory space for real and imaginary parts of the IDFT x(n)

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project. Which is

    saved in DVD at following locationPATH: DSP320_PROGRAMS\N_POINT_IDFTThen debug and run the program.

    Program ask for no of points of IDFT.Eg. 8(for 8 points IDFT)

    Program ask for values of X[k], you have to enter values as 1 st real & 2ndimaginary for all N no of values.Eg. X[k]={2.8+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j}.

    It enter in program as

    2.8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    OUTPUT

    Input x[n]= {2.8+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j, 0+0j}.

    Output X[K]={1.0+j0.0, 1.0+j0.0, 1.0+j0.0, 1.0+j0.0, 1.0+j0.0, 1.0+j0.0,1.0+j0.0, 1.0+j0.0}.

  • 7/22/2019 Dsp320 Experimental Manual

    57/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 55 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    58/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 56 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    59/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 57 - Embedded & DSP

    EXPERIMENTNO.5

  • 7/22/2019 Dsp320 Experimental Manual

    60/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 58 - Embedded & DSP

    EXPERIMENT NO:5

    NAME

    Impulse response.

    OBJECTIVE

    To find the Impulse response of the given

    a. First order system.

    b. Second order system.

    THEORY

    In signal processing, the impulse response, or impulse response function(IRF), of a dynamic system is its output when presented with a brief input signal,called an impulse. More generally, an impulse response refers to the reaction ofany dynamic system in response to some external change. In both cases, theimpulse response describes the reaction of the system as a function of time (orpossibly as a function of some other independent variable that parameterizes thedynamic behavior of the system).

    For example, the dynamic system might be a planetary system in orbitaround a star; the external influence in this case might be another massive objectarriving from elsewhere in the galaxy; the impulse response is the change in themotion of the planetary system caused by interaction with the new object.

    A linear constant coefficient difference equation representing a first order systemis given by

    ]1[][]1[][ 101 +=+ nxbnxbnyany .

    A linear constant coefficient difference equation representing a second order

    system is given by ];2[]1[][]2[]1[][ 21021 ++=++ nxanxanxanybnybny

    .PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. For 1storder impulse response.PATH: DSP320_PROGRAMS\IMPLUSE_RES_OF_1ST_ORDER_SYSTEMThen debug and run the program.

  • 7/22/2019 Dsp320 Experimental Manual

    61/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 59 - Embedded & DSP

    b. For 2ndorder impulse response.PATH: DSP320_PROGRAMS\ IMPLUSE_RES_OF_2ST_ORDER_SYSTEMThen debug and run the program.

    OUTPUT

    a. For 1storder impulse response.

    Hear we assume value of a1=2, b0=2, b1=3,

    Impulse points are as {1, -1, 3, -9, 27},

    b. For 2ndorder impulse response.

    Hear we assume value of a0=0.1311, a1=0.2622, a2=0.1311, b1=-0.7478,b2=0.2722.

    Impulse points are as {0.131100, 0.360237, 0.364799, 0.174741, 0.031373, -0.024104, -0.026565, -0.013304, -0.002718, 0.001589},

  • 7/22/2019 Dsp320 Experimental Manual

    62/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 60 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    63/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 61 - Embedded & DSP

    EXPERIMENT

    NO.6

  • 7/22/2019 Dsp320 Experimental Manual

    64/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 62 - Embedded & DSP

    EXPERIMENT NO:6

    NAME

    Frequency response of system

    OBJECTIVE

    To find frequency response of system which is given ina. Transfer function formb. Differential equation form.

    THEORY

    Frequency response:Frequency response is the quantitative measure of the output spectrum of

    a system or device in response to a stimulus, and is used to characterize thedynamics of the system. It is a measure of magnitude and phase of the output asa function of frequency, in comparison to the input. In simplest terms, if a sinewave is injected into a system at a given frequency, a linear system will respondat that same frequency with a certain magnitude and a certain phase anglerelative to the input. Also for a linear system, doubling the amplitude of the input

    will double the amplitude of the output. In addition, if the system is time-invariant,then the frequency response also will not vary with time.Two applications of frequency response analysis are related but have

    different objectives. For an audio system, the objective may be to reproduce theinput signal with no distortion. That would require a uniform (flat) magnitude ofresponse up to the bandwidth limitation of the system, with the signal delayed byprecisely the same amount of time at all frequencies. That amount of time couldbe seconds, or weeks or months in the case of recorded media. In contrast, for afeedback apparatus used to control a dynamical system, the objective is to givethe closed-loop system improved response as compared to the uncompensatedsystem. The feedback generally needs to respond to system dynamics within a

    very small number of cycles of oscillation (usually less than one full cycle), andwith a definite phase angle relative to the commanded control input. Forfeedback of sufficient amplification, getting the phase angle wrong can lead toinstability for an open-loop stable system, or failure to stabilize a system that isopen-loop unstable. Digital filters may be used for both audio systems andfeedback control systems, but since the objectives are different, generally thephase characteristics of the filters will be significantly different for the twoapplications.

    Transfer function:A mathematical statement that describes the transfer characteristics of a

    system, subsystem, or equipment.

  • 7/22/2019 Dsp320 Experimental Manual

    65/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 63 - Embedded & DSP

    General transfer function define as

    There are two forms of transfer function representation in Matlab. The mostobvious is the polynomial form where

    G(s) =b(s)

    a(s)=

    s + 2 s + 3

    s3+ 4 s2+ 5 s + 6

    is entered as two row vectors with the polynomial coefficients entered in theorder of ascending powers of s.

    Differential equation:

    A differential equation is a mathematical equation for an unknown functionof one or several variables that relates the values of the function itself and itsderivatives of various orders. Differential equations play a prominent role inengineering, physics, economics, and other disciplines.

    Differential equation example as follows:

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. For frequency response of transfer function:PATH: DSP320_PROGRAMS\FREQ_RESPONCE_OF_TRANSFER_FUNCTIONThen debug and run the program

    b. For frequency response of differential equation:PATH:DSP_320PROGRAMS\FREQ_RESPONCE_OF_DIFFERENTIAL_EQUThen debug and run the program

    OUTPUT

    a. For frequency response of transfer function

    Hear assume transfer function as G(s)=1/3*(1+2cos(s)), that can be expose

    as y(n)=1/3*x(n) + 1/3*x(n-1) + 1/3*x(n+1), assume initial conditions to 0. We generated sample sine wave as a input named as iobuffer.

  • 7/22/2019 Dsp320 Experimental Manual

    66/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 64 - Embedded & DSP

    The frequency resonance of that function named as x1.

    To view input graphically,Select Toolsgraph Dual time.

    Input Iobuffer graph

  • 7/22/2019 Dsp320 Experimental Manual

    67/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 65 - Embedded & DSP

    Fft graph

    b. For frequency response of differential equation: Hear assume differential equation y(n)=x(n)-0.072*x(n-1)-y(n-1)-

    1.109*y(n-2).

    Assume initial conditions to 0.

    We generated sample sine wave as a input named as iobuffer.

    The frequency resonance of that function named as x1.

    To view input graphically,Select Toolsgraph Dual time.

  • 7/22/2019 Dsp320 Experimental Manual

    68/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 66 - Embedded & DSP

    Input iobuffer graph

    Frequency resonsnce graph

  • 7/22/2019 Dsp320 Experimental Manual

    69/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 67 - Embedded & DSP

    EXPERIMENT

    NO.7

  • 7/22/2019 Dsp320 Experimental Manual

    70/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 68 - Embedded & DSP

    EXPERIMENT NO:7

    NAME

    FIR filter.

    OBJECTIVE

    1. FIR Low pass filter using:-a. Rectangular windowb. Triangular windowc. Kaiser window

    2. FIR High pass filter using:-a. Rectangular window

    b. Triangular windowc. Kaiser window

    3. FIR Band pass filter using:-a. Rectangular windowb. Triangular windowc. Kaiser window

    THEORY

    Fir filter:

    The output yof a linear time invariant system is determined by convolving itsinput signal xwith its impulse response b.

    For a discrete-time FIR filter, the output is a weighted sum of the current and afinite number of previous values of the input. The operation is described by thefollowing equation, which defines the output sequence y[n]in terms of its inputsequence x[n]:

    where:

    x[n] is the input signal,

    y[n] is the output signal,

  • 7/22/2019 Dsp320 Experimental Manual

    71/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 69 - Embedded & DSP

    biare the filter coefficients, also known as tap weights, that make up theimpulse response,

    Nis the filter order; an Nth-order filter has (N+ 1) terms on the right-handside. The x[n i] in these terms are commonly referred to as taps, basedon the structure of a tapped delay line that in many implementations orblock diagrams provides the delayed inputs to the multiplication

    operations. One may speak of a "5th order/6-tap filter", for instance.

    Flow chart to find FIR filter:

  • 7/22/2019 Dsp320 Experimental Manual

    72/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 70 - Embedded & DSP

    Window design method

    In the Window Design Method, one designs an ideal IIR filter, then applies awindow function to it in the time domain, multiplying the infinite impulse by thewindow function. This results in the frequency response of the IIR beingconvolved with the frequency response of the window function. If the idealresponse is sufficiently simple, such as rectangular, the result of the convolutioncan be relatively easy to determine. In fact one usually specifies the desiredresult first and works backward to determine the appropriate window functionparameter(s). Kaiser windows are particularly well-suited for this methodbecause of their closed form specifications.

    a. Rectangular window.

    The rectangular window is sometimes known as a Dirichlet window. It isthe simplest window, equivalent to replacing all but N values of a datasequence by zeros, making it appear as though the waveform suddenlyturns on and off. Other windows are designed to moderate the suddenchanges because discontinuities have undesirable effects on the discrete-time Fourier transform (DTFT) and/or the algorithms that produce samplesof the DTFT

    b. Triangular windowTriangular window; B=1.33

    Triangular window with zero-valued end-points:

    With non-zero end-points:

    c. Kaiser window

    A simple approximation of the DPSS window using Bessel functions,discovered by Jim Kaiser.

    where I0is the zero-th order modified Bessel function of the first kind, andusually = 3.

  • 7/22/2019 Dsp320 Experimental Manual

    73/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 71 - Embedded & DSP

    Note that:

    PROCEDURE:

    Connect CRO to the LINE OUT.

    Connect a Signal Generator to the LINE IN.

    Switch on the Signal Generator with a sine wave of frequency 100 Hz. andVp-p=1.0v & vary the frequency.

    1. FOR LOW PASS FILTER:a. For fir low pass rectangular window (cutoff 500Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\FIR_LP_RECT_500HzThen debug and run the program

    b. For fir low pass triangular window (cutoff 1000Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\FIR_LP_TRIAN_1000HzThen debug and run the program

    C. For fir low pass kaiser window (cutoff 1500Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\FIR_LP_KAISER_1500HzThen debug and run the program

    2. FOR HIGH PASS FILTER:a. For fir high pass rectangular window (cufoff 400Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project.Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\FIR_HP_RECT_400HzThen debug and run the program

    b. For fir high pass triangular window (cutoff 800Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Project

    import Existing ccs Eclipe project.Which issaved in DVD at following location

  • 7/22/2019 Dsp320 Experimental Manual

    74/236

  • 7/22/2019 Dsp320 Experimental Manual

    75/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 73 - Embedded & DSP

    EXPERIMENT

    NO.8

  • 7/22/2019 Dsp320 Experimental Manual

    76/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 74 - Embedded & DSP

    EXPERIMENT NO:8

    NAME

    IIR filter.

    OBJECTIVE

    1. IIR Low pass filter using:-a. Butterworth filterb. Chebyshev

    2. IIR High pass filter using:-a. Butterworth filter

    b. Chebyshev

    3. IIR Band pass filter using:-a. Butterworth filterb. Chebyshev

    THEORY

    Infinite impulse response (IIR) is a property of signal processing systems.

    Systems with this property are known as IIR systemsor, when dealing with filtersystems, as IIR filters. IIR systems have an impulse response function that isnon-zero over an infinite length of time. This is in contrast to finite impulseresponse (FIR) filters, which have fixed-duration impulse responses. Thesimplest analog IIR filter is an RC filter made up of a single resistor (R) feedinginto a node shared with a single capacitor (C). This filter has an exponentialimpulse response characterized by an RC time constant.

    IIR filters may be implemented as either analog or digital filters. In digital IIRfilters, the output feedback is immediately apparent in the equations defining theoutput. Note that unlike FIR filters, in designing IIR filters it is necessary to

    carefully consider the "time zero" case[citation needed]in which the outputs of the filterhave not yet been clearly defined.

    Design of digital IIR filters is heavily dependent on that of their analogcounterparts because there are plenty of resources, works and straightforwarddesign methods concerning analog feedback filter design while there are hardlyany for digital IIR filters. As a result, usually, when a digital IIR filter is going to beimplemented, an analog filter (e.g. Chebyshev filter, Butterworth filter, Ellipticfilter) is first designed and then is converted to a digital filter by applyingdiscretization techniques such as Bilinear transform or Impulse invariance.

    Digital filters are often described and implemented in terms of the differenceequation that defines how the output signal is related to the input signal:

  • 7/22/2019 Dsp320 Experimental Manual

    77/236

  • 7/22/2019 Dsp320 Experimental Manual

    78/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 76 - Embedded & DSP

    Simple IIR filter block diagram

    a. Butterworth filter

    The Butterworth filter is a type of signal processing filter designed to haveas flat a frequency response as possible in the passband so that it is alsotermed a maximally flat magnitude filter. It was first described in 1930 bythe British engineer Stephen Butterworth in his paper entitled "On theTheory of Filter Amplifiers".

  • 7/22/2019 Dsp320 Experimental Manual

    79/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 77 - Embedded & DSP

    Butterworth stated that:

    "An ideal electrical filter should not only completely reject theunwanted frequencies but should also have uniform sensitivity for thewanted frequencies".

    Such an ideal filter cannot be achieved but Butterworth showed thatsuccessively closer approximations were obtained with increasingnumbers of filter elements of the right values. At the time, filters generatedsubstantial ripple in the passband, and the choice of component valueswas highly interactive. Butterworth showed that a low pass filter could bedesigned whose cutoff frequency was normalized to 1 radian per secondand whose frequency response (gain) was

    where is the angular frequency in radians per second and nisthe number of reactive elements (poles) in the filter

    b. Chebyshev

    Chebyshev filters are analog or digital filters having a steeper roll-off andmore passband ripple (type I) or stopband ripple (type II) than Butterworthfilters. Chebyshev filters have the property that they minimize the errorbetween the idealized and the actual filter characteristic over the range of

    the filter, but with ripples in the passband. This type of filter is named inhonor of Pafnuty Chebyshev because its mathematical characteristics arederived from Chebyshev polynomials.

    Because of the passband ripple inherent in Chebyshev filters, the onesthat have a smoother response in the passband but a more irregularresponse in the stopband are preferred for some applications.

    These are the most common Chebyshev filters. The gain (or amplitude)response as a function of angular frequency of the nth-order low-passfilter is

    where is the ripple factor, 0is the cutoff frequency and Tn() is aChebyshev polynomial of the nth order.

    PROCEDURE:

    Connect CRO to LINE OUT. Connect a Signal Generator to the LINE IN.

  • 7/22/2019 Dsp320 Experimental Manual

    80/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 78 - Embedded & DSP

    Switch on the Signal Generator with a sine wave of frequency 100 Hz. andVp-p=1.0V & vary frequency.

    1. FOR IIR LOW PASS FILTERa. For IIR low pass Butterworth filter (cutoff 800Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_LP_BUTTER_800Hz.Then debug and run the program

    b. For IIR low pass chebyshev filter (cutoff 1000Hz) Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_LP_CHEBY_1000Hz.

    Then debug and run the program

    2. FOR IIR HIGH PASS FILTERa. For IIR high pass Butterworth filter (cutoff 2500Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project.Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_HP_BUTTER_2500Hz.Then debug and run the program

    b. For IIR high pass chebyshev filter (cutoff 1000Hz)

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_HP_CHEBY_1000Hz.Then debug and run the program

    3. FOR IIR BAND PASS FILTERa. For IIR band pass Butterworth filter (band of 1k-2.5kHz )

    Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_BP_BUTTER_1K_2_5KHzThen debug and run the program

    b. For IIR band pass chebyshev filter (band of 2k-3kHz) Open Code Composer Studio, make sure the DSP kit is turned on. Import program using Projectimport Existing ccs Eclipe project.

    Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\IIR_BP_CHEBY_2K_3KHz.Then debug and run the program

  • 7/22/2019 Dsp320 Experimental Manual

    81/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 79 - Embedded & DSP

    OUTPUT

    As we giving applied sine input through line in, the output will appear asper the filter type on DSO.

    Output will decreasing after the cutoff frequency for low pass filter.

    Output will appear at the cutoff frequency for high pass filter. Output will appear in between specificfied band.

  • 7/22/2019 Dsp320 Experimental Manual

    82/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 80 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    83/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 81 - Embedded & DSP

    EXPERIMENT

    NO.9

  • 7/22/2019 Dsp320 Experimental Manual

    84/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 82 - Embedded & DSP

    EXPERIMENT NO:9

    NAME

    Noise remove from sine wave using adaptive filter.

    OBJECTIVE

    Noise removal programs:

    (i) Add noise above 3kHz and then remove (using adaptive filters)

    (ii) Interference suppression using 400 Hz tone

    THEORYIn the previous experiments involving IIR & FIR filters, the filter coefficientswere determined before the start of the experiment and they remained constant.Whereas Adaptive filters are filters whose transfer function coefficients or tapschange over time in response to an external error signal. Typical applications ofthese filters are Equalization, Linear Prediction, Noise Cancellation, Time-DelayEstimation, Non-stationary Channel Estimation, etc. Different types of adaptivefilter algorithms are the Kalman adaptive filter algorithm, LMS adaptive filteralgorithm and RLS adaptive filter algorithm

    where E() is the expected value.

    Fig.7.1.Adaptive structure for noise cancellation

    In the below program, two signals - a desired sinusoidal signal (can be theoutput of the PC speaker/ signal generator of square/ sine wave of frequency not

    correlated to 3kHz and not above the fsample/2 of the codec) into the Left

  • 7/22/2019 Dsp320 Experimental Manual

    85/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 83 - Embedded & DSP

    channel and Noise signal of 3KHz into the Right channel of the Line In are given(generally using two signal generators with common ground is sufficient).

    PROCEDURE:

    Connect CRO to LINE OUT Connect a Signal Generator to IN1with signal input 400Hz, 1Vpp. Noise added signal will be appear at OUT1. Connect that noisey signal to

    LINE IN. Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project.Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\NOISE_REMOVE_FROM_SINE_WAVE.Then debug and run the program

    OUTPUT As we giving applied noisey sine input through line in, the output will

    appear as noise free on DSO as follows.

  • 7/22/2019 Dsp320 Experimental Manual

    86/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 84 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    87/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 85 - Embedded & DSP

    EXPERIMENT

    NO.10

  • 7/22/2019 Dsp320 Experimental Manual

    88/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 86 - Embedded & DSP

    EXPERIMENT NO:10

    NAME

    Power spectrum density

    OBJECTIVE

    Determination of power spectrum of a given signal

    THEORY

    ALGORITHM TO IMPLEMENT PSD:Step 1 - Select no. of points for FFT(Eg: 64)Step 2 Generate a sine wave of frequency f (eg: 10 Hz with a sampling rate =

    No. of Points of FFT(eg. 64)) using math library function.Step 3 - Compute the Auto Correlation of Sine waveStep 4 - Take output of auto correlation, apply FFT algorithm .

    Step 4 - Use Graph option to view the PSD.Step 5 - Repeat Step-1 to 4 for different no. of points & frequencies.

  • 7/22/2019 Dsp320 Experimental Manual

    89/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 87 - Embedded & DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    PATH: DSP320_PROGRAMS\POWER_SPECTRUM_DENSITYThen debug and run the program.

    OUTPUT

    We generated sample sine wave as a input named as x & auto-correlation ofinput signal as a iobuffer.

    The frequency resonance of that iobuffer named as x1.

    To view input & PSD of graphically,Select Toolgraph Dual time

  • 7/22/2019 Dsp320 Experimental Manual

    90/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 88 - Embedded & DSP

    Sine wave as a input X

    Autocorrelation of input signal as a iobuffer

    To view power spectrum graphically,Select Toolgraphsingle time.

  • 7/22/2019 Dsp320 Experimental Manual

    91/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 89 - Embedded & DSP

    Frequency resonance of iobuffer X1

  • 7/22/2019 Dsp320 Experimental Manual

    92/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 90 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    93/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 91 - Embedded & DSP

    EXPERIMENT

    NO.11

  • 7/22/2019 Dsp320 Experimental Manual

    94/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 92 - Embedded & DSP

    EXPERIMENT NO:11

    NAME

    Generation of sinusoidal wave

    OBJECTIVE

    a. Generation of sinusoidal wave based on recursive differential equation.b. Generation of sinusoidal through filtering

    THEORY

    Differential equation;

    Filtering method:One efficient technique is using an IIR filter, making it oscillating

    by locating its poles in the unit circle of the Argand diagram. A typical 2nd orderIIR filter can be established as illustrated in Figure 1.

  • 7/22/2019 Dsp320 Experimental Manual

    95/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 93 - Embedded & DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. Using diff equation :PATH: DSP320_PROGRAMS \SINE_USING_DIFF_EQUb. Using filter:

    PATH: DSP320_PROGRAMS \ SINE_USING_FILTERThen debug and run the program.

    OUTPUT

    FOR SINE GENARATION USING DIFF EQUATION:

    We generated sample sine wave as a input named as m

    Sine wave generated through diff equation is x.

    To view input & output graphically,Select Toolgraph Dual time

  • 7/22/2019 Dsp320 Experimental Manual

    96/236

  • 7/22/2019 Dsp320 Experimental Manual

    97/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 95 - Embedded & DSP

    Sine wave generated through filter

  • 7/22/2019 Dsp320 Experimental Manual

    98/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 96 - Embedded & DSP

  • 7/22/2019 Dsp320 Experimental Manual

    99/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 97 - Embedded & DSP

    EXPERIMENTNO.12

  • 7/22/2019 Dsp320 Experimental Manual

    100/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 98 - Embedded & DSP

    EXPERIMENT NO:12

    NAME

    DFT of given sequence using DIT & DIF FFT

    OBJECTIVE

    a. To find DFT (8-POINTS) of given sequence using DIT FFT.b. To find DFT (8 POINTS) of given sequence using DIF FFT.

    THEORY

    Computing the DFTReviewing the basic DFT formula:

    DFT using DIT FFT method:

  • 7/22/2019 Dsp320 Experimental Manual

    101/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 99 - Embedded & DSP

    Butterfly diagram of DFT using DIT FFT method

    DFT using DIF FFT method:

  • 7/22/2019 Dsp320 Experimental Manual

    102/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 100 - Embedded &DSP

    Butterfly diagram of DFT using DIF FFT method

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. For DFT using DIT FFT :PATH: DSP320_PROGRAMS\ DFT_USING_DIT_FFT

    Then debug and run the program.

    Program ask for values of x[N], you have to enter values as 1 streal & 2ndimaginary for all N no of values.Eg. x[N]={1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.It enter in program as 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

    b. For DFT using DIF FFT :PATH: DSP320_PROGRAMS\ DFT_USING_DIF_FFT

    Then debug and run the program.

    Program ask for values of x[N], you have to enter values as 1 streal & 2ndimaginary for all N no of values.Eg. x[N]={1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.

    It enter in program as 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

  • 7/22/2019 Dsp320 Experimental Manual

    103/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 101 - Embedded &DSP

    OUTPUT

    Input x[n]= {1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}; for both DIT & DIF FFT algorithm.

    Output X[K]={8+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,

    0.0+j0.0, 0.0+j0.0}; for both DIT & DIF-FFT algorithm.

    Result of DFT using DIT-FFT methode

    Result of DFT using DIF-FFT methode

  • 7/22/2019 Dsp320 Experimental Manual

    104/236

  • 7/22/2019 Dsp320 Experimental Manual

    105/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 103 - Embedded &DSP

    EXPERIMENT

    NO.13

  • 7/22/2019 Dsp320 Experimental Manual

    106/236

  • 7/22/2019 Dsp320 Experimental Manual

    107/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 105 - Embedded &DSP

    IFFT using DIT FFT method:Butter fly diagram

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. For IFFT using DIT FFT :PATH: DSP320_PROGRAMS\ IFFT_USING_DIT_FFT

    Then debug and run the program.

    Program ask for values of x[N], you have to enter values as 1 streal & 2ndimaginary for all N no of values.

    Eg. x[N]= { 8.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,0.0+j0.0, 0.0+j0.0}.

    It enter in program as 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

    b. For IFFT using DIF FFT :PATH: DSP320_PROGRAMS\ IFFT_USING_DIF_FFT

    Then debug and run the program.

    Program ask for values of x[N], you have to enter values as 1 streal & 2ndimaginary for all N no of values.

    Eg. x[N]= { 8.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,

    0.0+j0.0, 0.0+j0.0}.It enter in program as 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  • 7/22/2019 Dsp320 Experimental Manual

    108/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 106 - Embedded &DSP

    OUTPUT

    Input x[n]= {8.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,0.0+j0.0}; for both DIT & DIFFFT algorithm.

    Output X[K]={ 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j }; for both DIT &

    DIF-FFT algorithm.

  • 7/22/2019 Dsp320 Experimental Manual

    109/236

  • 7/22/2019 Dsp320 Experimental Manual

    110/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 108 - Embedded &DSP

    EXPERIMENT NO:14

    NAME

    Interpolation process

    OBJECTIVE

    Implementation of Interpolation process

    THEORY

    In this section the increase of the sample rate by an integer factor L is described.

    In the following we refer to this process as interpolation.

    If we increase the sample rate of a signal we can preserve the full signalcontent according to the sampling theorem. After the interpolation the signalspectrum repeats only at multiples of the new sample rate L. fs. The interpolationis accomplished by inserting L-1 zeros between successive samples (zero-padding) and using an (ideal) lowpass filter with

    The multiplication of a signal with spectrum X(f) with a transfer function H(f)in frequency domain Y(f)=H(f).X(f) corresponds to convolution of the signal in thetime domain y(t)=h(t)*x(t). for the zero-padded discrete-time signal x[.] we get

  • 7/22/2019 Dsp320 Experimental Manual

    111/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 109 - Embedded &DSP

    if we substitute k by (m div L).L-n.L we get

    where m div L is the integer portion of the division m/l, and m mod L denotes theremainder.For each output value y[m] we therefore multiply and accumulate n samples ofthe impulse response hL[.] by the corresponding input sample x[.]. note that thesamples of the impulse resonance hL[.] are equidistant with spacing L

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\ INTERPOLATION_BY_LThen debug and run the program.

    OUTPUT

    We generated sample sine wave as a input named as x

    Then it pass through interpolation process, that output named as z To view input graphically,

    Select Toolgraphsingle time

  • 7/22/2019 Dsp320 Experimental Manual

    112/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 110 - Embedded &DSP

    Sample sine wave as a input X

    To view interpolation graphically,Select Toolgraphsingle timeGraph setting & graph

  • 7/22/2019 Dsp320 Experimental Manual

    113/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 111 - Embedded &DSP

    Interpolation graph

  • 7/22/2019 Dsp320 Experimental Manual

    114/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 112 - Embedded &DSP

  • 7/22/2019 Dsp320 Experimental Manual

    115/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 113 - Embedded &DSP

    EXPERIMENT

    NO.15

  • 7/22/2019 Dsp320 Experimental Manual

    116/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 114 - Embedded &DSP

    EXPERIMENT NO:15

    NAME

    Decimation process

    OBJECTIVE

    Implementation of Decimation process

    THEORY

    To decrease the sample rate by an integer factor M (decimation) we mustfirst band-limit the signal to fs/(2.M) by the lowpass filter Hm to comply withsampling theorem and keep only every Mth sample. As a result, we loose allsignal content above half the target sampling frequency fs/M.

    Decimation by factor M

    to get the decimated signal we start from an initial phase , which can be chosenarbitrarily, keep every Mth sample and skip all other samples. There exist

    therefore M different sets of samples, which all represent the same signal

  • 7/22/2019 Dsp320 Experimental Manual

    117/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 115 - Embedded &DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    PATH: DSP320_PROGRAMS\ DECIMATION_BY_MThen debug and run the program.

    OUTPUT

    We generated sample interpolated input named as z1

    Then it pass through decimation process, that output named as y1

    To view input graphically,Select Toolgraphsingle time.

  • 7/22/2019 Dsp320 Experimental Manual

    118/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 116 - Embedded &DSP

    Graph of interpolated input

    To view output graphically,Select Toolgraphsingle time.

  • 7/22/2019 Dsp320 Experimental Manual

    119/236

  • 7/22/2019 Dsp320 Experimental Manual

    120/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 118 - Embedded &DSP

  • 7/22/2019 Dsp320 Experimental Manual

    121/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 119 - Embedded &DSP

    EXPERIMENT

    NO.16

  • 7/22/2019 Dsp320 Experimental Manual

    122/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 120 - Embedded &DSP

    EXPERIMENT NO:16

    NAME

    I/D sampling rate converter.

    OBJECTIVE

    Implementation of I/D sampling rate converter

    THEORY

  • 7/22/2019 Dsp320 Experimental Manual

    123/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 121 - Embedded &DSP

  • 7/22/2019 Dsp320 Experimental Manual

    124/236

  • 7/22/2019 Dsp320 Experimental Manual

    125/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 123 - Embedded &DSP

    Graph of sample input

  • 7/22/2019 Dsp320 Experimental Manual

    126/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 124 - Embedded &DSP

    To view interpolation process graphically,Select Toolgraphsingle time

    Graph of interpolation

  • 7/22/2019 Dsp320 Experimental Manual

    127/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 125 - Embedded &DSP

    To view decimation process graphically,Select Toolgraphsingle time

    .

    Graph of decimation process

  • 7/22/2019 Dsp320 Experimental Manual

    128/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 126 - Embedded &DSP

    To view final output graphically,Select Toolgraphsingle time

    Graph of final output

  • 7/22/2019 Dsp320 Experimental Manual

    129/236

  • 7/22/2019 Dsp320 Experimental Manual

    130/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 128 - Embedded &DSP

    EXPERIMENT NO:17

    NAME

    Autocorrelation .

    OBJECTIVE

    Autocorrelation of a given sequence and verification of its properties.

    THEORY

    AUTO-CORRELATION

    Correlation is mathematical technique which indicates whether 2 signals arerelated and in a precise quantitative way how much they are related. Ameasure of similarity between a pair of energy signals x[n] and y[n] is givenby the cross correlation sequence rxy[l] defined by

    =

    ==

    n

    xy llnynxlr ,...2,1,0];[][][ .

    The parameter l called lag indicates the time shift between the pair.

    Autocorrelation sequence of x[n] is given by

    =

    ==

    n

    xx llnxnxlr ,...2,1,0];[][][

    PROPERTIES OF AUTO CORRELATION1. Maximum Value:

    The magnitude of the autocorrelation function of a wide sensestationary random process at lag m is upper bounded by its value atlag m=0

    2. Periodicity:If the autocorrelation function of a WSS random process is such that:

    Rxx (m0 ) =Rxx ( 0 ) _ for some m0 , then Rxx (m) is periodic with periodm0 .Furthermore E[ |x( n ) _ x( n _ m )|^2 ]=0 and x(n) is said to be mean-square periodic.

    3. The autocorrelation function of a periodic signal is also periodic:

  • 7/22/2019 Dsp320 Experimental Manual

    131/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 129 - Embedded &DSP

    4. Symmetry:The autocorrelation function of WSS process is a conjugate symmetricfunction of m:

    For a real process, the autocorrelation sunction is symmetric:

    Rxx (m) =Rxx ( m)5. Mean Square Value:The autocorrelation function of a WSS process at lag, m=0, is equal to themeansquare value of the process:

    6. If two random processes x(n) and y(n) are uncorrelated, then theautocorrelation of the sum x(n)=s(n)+w(n) is equal to the sum of theautocorrelations of s(n) and w(n):

    7. The mean value:

    The mean or average value (or d.c.) value of a WSS process is given by:

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    a. Auto correlation of sample sine wave

    PATH: DSP320_PROGRAMS\ AUTO_CORRELATIONThen debug and run the program.

    b. Auto correlation summation propertyPATH: DSP320_PROGRAMS\ AUTO_CORRELATION_SUM_PROPERTYThen debug and run the program.

    OUTPUT

    1. For auto correlation We generated sample sine wave as a input named as x.

    Final output of auto correlation named as z.

    To view input / output graphically,Select ToolgraphDual time

  • 7/22/2019 Dsp320 Experimental Manual

    132/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 130 - Embedded &DSP

    Graph of Input sine wae named as X

    Graph of Auto correlation named as Z

  • 7/22/2019 Dsp320 Experimental Manual

    133/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 131 - Embedded &DSP

    2. For auto correlation summation property. We generated two sample sine waves as a input named as a & b.

    Summation of a & b stored in c.

    Auto correlation of a & b named as axx & bxx resp.

    Auto correlation of summation named as cxx.

    Sum of Auto correlation axx & bxx stored in sum. So as per property sum of auto correlation is equal to auto correlation

    of sum, as follows.

    To view comparison graphically,Select ToolgraphDual timeGraph setting & Graph

    Graph of autocorrelation of summation of two signals

  • 7/22/2019 Dsp320 Experimental Manual

    134/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 132 - Embedded &DSP

    Graph of summation of autocorrectaion of two signals

  • 7/22/2019 Dsp320 Experimental Manual

    135/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 133 - Embedded &DSP

    EXPERIMENT

    NO.18

  • 7/22/2019 Dsp320 Experimental Manual

    136/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 134 - Embedded &DSP

    EXPERIMENT NO:18

    NAME

    Cross-correlation .

    OBJECTIVE

    Cross-correlation of a given sequence and verification of its properties.

    THEORY

    CROSS-CORRELATION

    Cross Correlation has been introduced in the last experiment. Comparingthe equations for the linear convolution and cross correlation we find that

    ][][)]([][][][][ lylxnlynxlnynxlrnn

    xy ===

    =

    =

    . i.e., convolving the

    reference signal with a folded version of sequence to be shifted (y[n])results in cross correlation output. (Use fliplr function for folding thesequence for correlation).

    CROSS-CORRELATION PROPERTIES

  • 7/22/2019 Dsp320 Experimental Manual

    137/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 135 - Embedded &DSP

    PROCEDURE Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\ CROSS_CORRELATION

    Then debug and run the program.

    OUTPUT We generated sample sine wave as a input named as x.

    Then generate noise signal using random function and added with originalsignal, that is denoted as n

    Cross-correlation output saved in z variable.

    To view input graphically,Select ToolgraphDual timeGraph setting & Graph

  • 7/22/2019 Dsp320 Experimental Manual

    138/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 136 - Embedded &DSP

    Sample sine wave named as X

    Sample noise signal as n.

    To view cross corelation graphically,Select Toolgraphsingle time

  • 7/22/2019 Dsp320 Experimental Manual

    139/236

  • 7/22/2019 Dsp320 Experimental Manual

    140/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 138 - Embedded &DSP

  • 7/22/2019 Dsp320 Experimental Manual

    141/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 139 - Embedded &DSP

    EXPERIMENT

    NO.19

  • 7/22/2019 Dsp320 Experimental Manual

    142/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 140 - Embedded &DSP

    EXPERIMENT NO:19

    NAME

    To find the FFT of given signal.

    OBJECTIVE

    To find the FFT of given signal and plot.

    THEORY

    A fast Fourier transform(FFT) is an efficient algorithm to compute the discreteFourier transform (DFT) and its inverse. There are many distinct FFT algorithmsinvolving a wide range of mathematics, from simple complex-number arithmeticto group theory and number theory; this article gives an overview of the availabletechniques and some of their general properties, while the specific algorithms aredescribed in subsidiary articles linked below.

    A DFT decomposes a sequence of values into components of differentfrequencies. This operation is useful in many fields (see discrete Fouriertransform for properties and applications of the transform) but computing itdirectly from the definition is often too slow to be practical. An FFT is a way to

    compute the same result more quickly: computing a DFT of Npoints in the naiveway, using the definition, takes O(N2) arithmetical operations, while an FFT cancompute the same result in only O(Nlog N) operations. The difference in speedcan be substantial, especially for long data sets where Nmay be in thethousands or millionsin practice, the computation time can be reduced byseveral orders of magnitude in such cases, and the improvement is roughlyproportional to N/ log(N). This huge improvement made many DFT-basedalgorithms practical; FFTs are of great importance to a wide variety ofapplications, from digital signal processing and solving partial differentialequations to algorithms for quick multiplication of large integers.

    The most well known FFT algorithms depend upon the factorization of N, butthere are FFTs with O(Nlog N) complexity for all N, even for prime N. Many FFT

    algorithms only depend on the fact that is an Nth primitive root of unity, andthus can be applied to analogous transforms over any finite field, such asnumber-theoretic transforms. Since the inverse DFT is the same as the DFT, butwith the opposite sign in the exponent and a 1/Nfactor, any FFT algorithm caneasily be adapted for it.

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

  • 7/22/2019 Dsp320 Experimental Manual

    143/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 141 - Embedded &DSP

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\ FFT_OF_GIVEN_1D_SIGNALThen debug and run the program.

    OUTPUT

    We generated sample sine wave as a input named as iobuffer.

    FFT of that signal stored in x1 variable.

    To view input graphically,Select ToolgraphDual time.

  • 7/22/2019 Dsp320 Experimental Manual

    144/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 142 - Embedded &DSP

    Input graph named as iobuffer

    Graph of FFT named as X1

  • 7/22/2019 Dsp320 Experimental Manual

    145/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 143 - Embedded &DSP

    EXPERIMENT

    NO.20

  • 7/22/2019 Dsp320 Experimental Manual

    146/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 144 - Embedded &DSP

    EXPERIMENT NO:20

    NAME

    N-Point FFT.

    OBJECTIVE

    To find the FFT of given (8 points)..

    THEORY

    A fast Fourier transform(FFT) is an efficient algorithm to compute the discreteFourier transform (DFT) and its inverse. There are many distinct FFT algorithmsinvolving a wide range of mathematics, from simple complex-number arithmeticto group theory and number theory; this article gives an overview of the availabletechniques and some of their general properties, while the specific algorithms aredescribed in subsidiary articles linked below.

    A DFT decomposes a sequence of values into components of differentfrequencies. This operation is useful in many fields (see discrete Fouriertransform for properties and applications of the transform) but computing itdirectly from the definition is often too slow to be practical. An FFT is a way to

    compute the same result more quickly: computing a DFT of Npoints in the naiveway, using the definition, takes O(N2) arithmetical operations, while an FFT cancompute the same result in only O(Nlog N) operations. The difference in speedcan be substantial, especially for long data sets where Nmay be in thethousands or millionsin practice, the computation time can be reduced byseveral orders of magnitude in such cases, and the improvement is roughlyproportional to N/ log(N). This huge improvement made many DFT-basedalgorithms practical; FFTs are of great importance to a wide variety ofapplications, from digital signal processing and solving partial differentialequations to algorithms for quick multiplication of large integers.

    The most well known FFT algorithms depend upon the factorization of N, butthere are FFTs with O(Nlog N) complexity for all N, even for prime N. Many FFT

    algorithms only depend on the fact that is an Nth primitive root of unity, andthus can be applied to analogous transforms over any finite field, such asnumber-theoretic transforms. Since the inverse DFT is the same as the DFT, butwith the opposite sign in the exponent and a 1/Nfactor, any FFT algorithm caneasily be adapted for it.

  • 7/22/2019 Dsp320 Experimental Manual

    147/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 145 - Embedded &DSP

    PROCEDURE

    Open Code Composer Studio, make sure the DSP kit is turned on.

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following location

    PATH: DSP320_PROGRAMS\ N_PIONT_FFTThen debug and run the program. Program ask for values of x[N], you have to enter values as 1 st real & 2nd

    imaginary for all N no of values.Eg. x[N]={1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.It enter in program as 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0

    OUTPUT

    Input x[n]= {1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j, 1+0j}.

    Output X[K]={8.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0, 0.0+j0.0,0.0+j0.0, 0.0+j0.0}.

  • 7/22/2019 Dsp320 Experimental Manual

    148/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 146 - Embedded &DSP

  • 7/22/2019 Dsp320 Experimental Manual

    149/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 147 - Embedded &DSP

    EXPERIMENT

    NO.21

  • 7/22/2019 Dsp320 Experimental Manual

    150/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 148 - Embedded &DSP

    EXPERIMENT NO:21

    NAME

    Sampling

    OBJECTIVE

    Sampling of given signal at 1KHz sampling rate.

    THEORY

    Sampling can be done for functions varying in space, time, or any otherdimension, and similar results are obtained in two or more dimensions.

    For functions that vary with time, let s(t) be a continuous function to be sampled,and let sampling be performed by measuring the value of the continuous functionevery Tseconds, which is called the sampling interval. Thus, the sampledfunction is given by the sequence:

    s(nT), for integer values of n.

    The sampling frequency or sampling rate fsis defined as the number of samples

    obtained in one second (samples per second), thus fs= 1/T.

    Although most of the signal is discarded by the sampling process, it is stillgenerally possible to accurately reconstruct s(t) from the samples if the signal isband-limited. A sufficient condition is that the non-zero portion of its Fouriertransform, S(f), be contained within a known frequency region of length fs. Whenthat interval is [-fs/2, fs/2], the applicable reconstruction formula is the WhittakerShannon interpolation formula. In most sampling systems, that condition isapproximated by placing an appropriate low-pass filter (anti-aliasing filter) aheadof the sampler.

    The frequency fs/2 is called the Nyquist frequency of the sampling system.Without an anti-aliasing filter, frequencies higher than the Nyquist frequency willinfluence the samples in a way that is misinterpreted by the WhittakerShannoninterpolation formula or any similar approximation.

    PROCEDURE:

    Connect CRO to LINE OUT

    Connect a Signal Generator to the LINE IN. Switch on the Signal Generator with a sine wave of frequency 100 Hz. and

    Vp-p=1.0v Open Code Composer Studio, make sure the DSP kit is turned on.

  • 7/22/2019 Dsp320 Experimental Manual

    151/236

    DSP320 : TMS 320XXXX DSP Trainer V-12.0

    - 149 - Embedded &DSP

    Import program using Projectimport Existing ccs Eclipe project. Which issaved in DVD at following locationPATH: DSP320_PROGRAMS\SAMPLING_AT_1KHzThen debug and run the program.

    OUTPUT As we giving applied sine input through line in, the output will appear as

    per the sampling rate on DSO.

    Grajually increase frequency and see the output on DSO.Following sample wave form shown below.1


Recommended