EL - 413 Digital Signal Processing: Experiment # 11 Discrete Fourier Transform Using D SK 6713
EL - 413 Digital Signal Processing: Experiment # 11 Discrete Fourier Transform Using D SK 6713
Experiment # 11
Performed on:
Student Name:
Roll Number: Section: E
Marks Obtained
Experiment evaluated by
Signature:
Required Equipment:
Software: Code Composer studio 3.1, 6713 DSK Diagnostic tool and MATLAB
Hardware: TMS320C6713 DSP starter Kit (DSK)
The real and imaginary parts of X (k) are computed by the program:
A structured data type COMPLEX is used by the program to represent the complex valued time -
and frequency - domain values of X (k) and x (n).
The function dft () has been written such that it replaces the input samples x (n), stored in array
samples with their frequency - domain representation X(k).
The time - domain sequence x (n) consists of exactly n=0: N-1 of a real - valued cosine wave
where N=100 (assuming a sampling frequency of 8 kHz, the frequency of the cosine wave is 800
Hz). The DFT of this sequence, X (k), is equal to zero for all k, except at k = 10 and at k = 90.
These two real values correspond to frequency components at ± 800 Hz. Different time - domain
input sequences can be used in the program, most readily by changing the value of the constant
TESTFREQ
Procedure:
1. Launch CCS by double - clicking on its desktop icon.
2. Create project dft.pjt
3. Add source files dft.c, c6713.cmd and library files csl6713.lib,rts6700.lib and dsk6713bsl.lib
in project
4. Build the project ( Adjust Build option as performed in previous lab)
5. Load the executable file dft.out
6. Select Debug→ Run.
7. Select View→ Graph → Time/Frequency and set the Graph Properties as shown in Figure).
Note that this will display only the real part of the complex values stored in array
samples. The Graph Property Data Plot Style is set to ‘bar’ in order to emphasize that
the DFT operates on discrete data.
8. After adjusting the properties, the graph shows the real part of X(k) and you should be
able to see two distinct spikes at k = 10 and k = 90, representing frequency components
at ± 800 Hz,
9. Select Profile → Clock → Enable.
10. Select Profile → Clock View. A small clock icon and the number of processor
instruction cycles that the Profile Clock has counted should appear in the bottom right
hand corner of the Code Composer window.
11. Run the program.
12. Reset the Profile Clock by double - clicking on its icon in the bottom right – hand corner
of the CCS window. The number of instruction cycles counted by the Profile Clock
gives an indication of the computational expense of executing function dft().
Lab Task:
Compute Discrete Fourier Transform of cosine function having fs=8000, f=800Hz and N=256 in
DSK 6713 and also verify the results in MATLAB.