Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FFT window, Quantization and Noise Floor

Status
Not open for further replies.

smalandr

Newbie level 4
Joined
Oct 29, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,328
Hi,
would it be possible for somebody to explain the best way to distinguish the n points of my signal and the points of my fft window ?
I have a simple sinusoidal (as analog as Matlab can give me). I want to see the fft response in different kind of fft points.

I use the following code.
fs=44100;
nsignal=44100;
t=[0:nsignal-1]/fs;
y=0.7*sin(2*1000*pi*t);
n1=4096;
Y=fft(y,4096);
Y=abs(Y);
Y=Y(1:round(end/2));
Y=20*log10(Y);
freq=(0:fs/(n1-1):22050);
semilogx(freq,Y)

I don't like my result - doesn't seem like a good 4096 window for an "analog" signal. My noise floor is too high. Any ideas ?
 

If you do not use "coherent sampling" you need to apply a window function to your signal before the fft, see below.
Code:
nsignal=4096;
fs=44100;
f=1001*fs/nsignal; % coherent sampling i.e. integer number of cycles (1001) in nsignal samples
%f=1000; %non-coherent sampling. Use hann window below
t=[0:nsignal-1]/fs;
y=1*sin(2*pi*f*t);

w=ones(nsignal,1);%hann(nsignal);
Y=fft(y(1:nsignal).*w',n1);
Y=2*abs(Y)/sum(w);
Y=Y(1:round(end/2));
Y=20*log10(Y);
freq=(0:fs/(n1-1):22050);
semilogx(freq,Y)
Please note that the "2/sum(w)" is normalizing the window power.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top