Assignment No 4 FFT

Embed Size (px)

Citation preview

  • 7/28/2019 Assignment No 4 FFT

    1/4

    ASSISGNMENT NO: 4

    Name:-

    Roll No:-

    Subject:-Advanced Digital Signal Processing

    Class:- M.E.(Signal Processing)

    Date of Conduction:-

    Date of Completion:-

    Signature of Staff Incharge:-

    _____________________________________________________________________________

    Aim:- To implement the 16-point FFT using the DIF-FFT algorithm.

    Theory:-

    INTRODUCTION TO CODE COMPOSER STUDIO

    Code composer is the DSP industry`s first fully integrated development environment(IDE) with

    DSP-specific functionality. With a familiar environment like MS-based C++TM, Code

    Composer lets you edit, build, debug, profile and manage projects from a single unifiedenvironment. Other unique features include 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 target DSP

  • 7/28/2019 Assignment No 4 FFT

    2/4

    Procedure to work on Code Composer Studio

    1. To create the New ProjectProject New (File Name.pjt,Ex:- Vectors.pjt)

    2. To Create a Source fileFileNewType the code (Save and give filename Ex:-sum.c)

    3. To add source files to projectProjectAdd files to projectsum.c

    4. To add rts.lib file &Hello.cmdProjectAdd files to projectrts6700.lib

    Library Files:rts6700.lib (Path:c:\ti\c6000\cgtools\lib\rts6700.lib)

    ProjectAdd files to projecthello.cmd

    CMD file-Which is common for all nonreal time programs.

    (Path :c\ti\tutorial\6711\hello1\hello.cmd)Note:- Select Linker command file(*.cmd)in type of files

    5. Reset CPU6. To Compile

    ProjectCompile

    7. To RebuildProjectrebuild,

    Which will create the final.out executable file(Ex:-Vectors.out)

    8. Procedure to Load and Run program:Load the program to DSK: File Load program Vectors.out9. To execute project:

    DebugRun

    Algorithm:-

    1. Open code composer studio, make sure the DSP kit turned on.2. Start new project using project new pull down menu, save it in a separate

    directory(c:\ti\my projects) with name lconv.pjt

    3. Add the source file conv.asm4. To the project using project -> add file to project pull down menu.5. Add the linker command file hello.cmd

    (path: c:\ti\tutorial\dsk6711\hello1\hello.cmd)

    6. Add the run time support library file rts6700.lib( path : c:\ti\c6000\cgtools\lib\rts6700.lib)

    7. Compile the program using the project-compile pull down menu orby clicking theshortcut icon on the left side of program window.

  • 7/28/2019 Assignment No 4 FFT

    3/4

    8. Compile the program using the project-compile pull down menu or by clicking theshortcut icon on the left side of program window.

    9. Build the program using the project-build pull down menu or by clicking the shortcuticon on the left side of program window.

    10.Load the program(lconv.out) in program memory of DSP chip using the file-loadprogram pull down menu.11.To view output graphically

    Select view - graph- time and frequency

    Configure the graphical window values

    Start address -- y

    DSP data type - 32-bit signed integer.

    Theory:-

    Fast Fourier Transform:-

    FFT algorithms are based on the fundamental principle of decomposing the computation

    of discrete Fourier transform of a sequence of length N into successively smaller discrete Fouriertransforms. There are basically two classes of FFT algorithms:-

    1. DIT-FFT [Decimation-in-Time]2. DIF-FFT[Decimation-in-Frequency]

    DIT-FFT Algorithm-

    In the decimation-in-frequency algorithm approach, the frequency samples of the DFTare decomposed into smaller and smaller subsequences and final sequence is obtained.

    The basic computational diagram as a Butterfly structure is given as:-

    Fig.1 Basic Computational Diagram for DIF-FFT

    Steps for Radix- 2 DIF-FFT Algorithm-

    1. The number of input samples , where, M is number of stages.2. The input sequence is in natural sequence.

  • 7/28/2019 Assignment No 4 FFT

    4/4

    3. The number of stages in the flow graph is given by .4. Each stage consists of

    butterflies.

    5. Inputs/outputs for each butterfly are separated by samples, where represents thestage index, i.e. for the 1

    ststage and for second stage and so on.

    6. The number of complex multiplications is given by

    .

    7. The number of complex additions is given by .8. The twiddle factor exponents are a function of the stage index and is given by

    9. The number of sets or sections of butterflies in each stage is given by the formula .10.The Exponent Repeat Factor (ERF), which is the number of times the exponent sequence

    associated with is repeated is given by .

    Conclusion:-