Spectral Analysis Using FFT: Designed By: Dawar Awan

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Lab No.

10

Spectral analysis using FFT

Designed by : Dawar Awan


Oct 2012 – Feb 2013
CECOS College of Engineering and IT dawar@cecos.edu.pk
Fourier transform
 Fourier transform is used to view the spectral composition of
analog signals
 Discrete Fourier transform (DFT) is used to view the spectral
contents of digital signals

 N2 complex operations are needed to calculate the DFT


 DFT can be efficiently calculated using fast Fourier transform (FFT)

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform
 FFT make use of some clever algorithms to do the same thing as
DFT does, but in much less time
 FFT requires Nlog2 (N) computations
 In calculating FFT two parameters play very important role
1. The sampling frequency (fs)
2. The block size or the number of points (N)

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform
 For block size of N, N time domain samples are used to calculate N
frequency domain samples
 The 0th sample will represent 0 Hz and (N-1)th sample will represent
fs Hz
 The multiplication factor for the FFT should be fs/(N-1)
 For sampling frequency of fs Hz the highest frequency contained in
the signal can be fs/2 Hz
 This means that the useful information lye between 0 and (N/2)-1
samples

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform

CECOS College of Engineering and IT dawar@cecos.edu.pk


Fast Fourier Transform

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP

Embedded sine waveform

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 The graph showing the spectrum has no idea about the x-axis

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 Alter the graph properties using the multiplication factor

1000/127

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 Now the correct spectrum can be seen

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 You may limit the frequency axis to the significant portion of
spectrum

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 The useful portion of the spectrum

CECOS College of Engineering and IT dawar@cecos.edu.pk


FFT using DSP
 Windowing reduces the spectral leakage in calculating FFT using
DSPs

No window used Hanning window used

Spectral Leakage

CECOS College of Engineering and IT dawar@cecos.edu.pk


Task
1. Generate a 50Hz Embedded sine wave, sampled at 8000Hz and
plot its 128, 256, 512 and 1024 points FFT
2. Design a VI that acquires an audio signal from the analog input of
the kit, shows its spectrum and routes the audio to the analog
output of the kit

CECOS College of Engineering and IT dawar@cecos.edu.pk

You might also like