Forum Discussion
Altera_Forum
Honored Contributor
16 years agoA question regarding fft
Hi, I'm kind of new to everything related to fourier transforms. What I want to do is ultimately create some kind of computer-based spectrum analyzer. To do that I have an Altera Cyclone ...
Altera_Forum
Honored Contributor
16 years agoThe idea is you take fft outputs(Re/Im) and plot its magintude value against frequency axis.The amplitude value is usually expressed as power in dB.
power(p) = 20*log10(abs(Re,Im)); The frequency axis(f) starts from 0 to 1 * Fs(sampling frequency) for non dc centred fft output and extends from -.5 * Fs ~ 0.5* Fs for dc centred. i.e. for a vector that extends from sample 1 to sample 128 ,(f) practically, can be expressed as follows: f = linspace(0,1*Fs,128); %non dc centered, or f = linspace(-.5*Fs,.5*Fs,128); %dc centered dc centred means you swap the vector output values from last half to become first half of your new vector. Then plot(f,p) Above is basic fft display. Other displays such as spectrum analyser do more averaging of real signal power per subbands then display.