FFT DSP
FFT DSP
Lab Report
Experiment
Implementation of a Linear N points FFT on Dsp Kit(DSK 6713)
Group Members Registration Number Syndicate
M.Ashiq Rasool 414361
Ali Iqbal 415290 A
Adnan Ishaq 413582
Shehrooz Akram 423739
Tools:
>DSP KIT
#include "dsk6713_aic23.h"
#include <math.h>
#include <stdio.h>
#define PTS 64
#define PI 3.14159265358979
typedef struct {
float real;
float imag;
} COMPLEX;
int num_stages = 0;
i = 1;
num_stages++;
EE-330 DSP Experiment DSP KIT Lab Report
2
leg_diff = N / 2;
step = (PTS * 2) / N;
index = 0;
Y[upper_leg].real = temp1.real;
Y[upper_leg].imag = temp1.imag;
index += step;
leg_diff /= 2;
step *= 2;
void main() {
int i;
samples[i].real = iobuffer[i];
samples[i].imag = 0.0;
// Perform FFT
FFT(samples, PTS);
Code Explanation:
This program performs an FFT (Fast Fourier Transform) on a 10 Hz sine wave using the DSK6713 DSP kit. It begins
by including necessary headers and defining constants for the FFT size (64 points) and PI. It sets up data structures
to handle complex numbers and arrays to hold the input signal, FFT results, twiddle factors, and output
magnitudes. The input signal, a 10 Hz sine wave sampled at 64 Hz, is generated and stored in a buffer with
imaginary parts set to zero. The FFT function is then called, which performs the transformation using butterfly
operations and precomputed twiddle factors (sine and cosine values). After the FFT is complete, the program
calculates the magnitude of each frequency bin from the real and imaginary parts. These magnitudes represent the
strength of each frequency component in the input signal. Finally, the program prints the magnitudes of all 64 FFT
bins, allowing the user to analyze the frequency content of the original sine wave.
EE-330 DSP Experiment DSP KIT Lab Report
4
Library Settings:
Compiler Settings:
General Settings:
EE-330 DSP Experiment DSP KIT Lab Report
5
Output:
When the code is executed on the DSK6713, it performs an FFT on a 10 Hz sine wave sampled
at 64 Hz. The result is a set of 64 frequency bins, each representing 1 Hz. Since the input is a
pure 10 Hz tone, the output shows a strong magnitude peak at bin 10, which corresponds to 10
Hz. Due to the symmetry of the FFT for real-valued signals, another peak appears at bin 54 (64 -
10). All other bins show very small or near-zero magnitudes, indicating that no other frequency
components are present in the input. The program prints the magnitude of each bin to the
console, clearly showing the dominant frequency at 10 Hz.