Forums

Calculating SNR using FFT

Started by hristo September 21, 2005
Hello,

I am trying to calculate the SNR of signal that has just a DC
component. Basically what I do is FFT with Kaiser window and I am not
sure what actually the FFT returns for the noise spectrum. Are those
numbers the noise in a certain bandwidth (1.5 Hz as seen below) or
this is the spectrum power density (1Hz)?

The actual question is how to calculate the noise in a certain
bandwith (let's say 3-18 Hz) - Should I just sum the powers of the
components or it is also needed to multiply them by the bandwidth?

Some example below:

assuming that the signal is called 'data'

WinData = data.*kaiser(length(data),13); % windowing the data

FFT_data= fft(WinData); %performing the FFT
f1 = linspace(0,50,length(FFT_data));
FFT_data_norm = abs(FFT_data)/max(abs(FFT_data)) %Normalizing the data

Assuming that we have the following correspondense
Is the result from FFT this: f1 FFT_data_norm
1 0 Hz -> 1
2 1.5 Hz -> 0.3
3 3 Hz -> 0.02
4 4.5 Hz -> 0.12
5 6 Hz -> 0.01
6 7.5 Hz -> 0.01
7 9 Hz -> 0.01
8 10.5 Hz-> 0.011
9 12 Hz -> 0.001
10 13.5 Hz-> 0.003
11 15 Hz -> 0.004
12 16.5 Hz-> 0.008
13 18 Hz -> 0.01

%So of course the SNR is ratio of powers, so the elements of
%FFT_data_norm should be squared

Data18Hz = FFT_data_norm(3:18)

Powers = Data18Hz.^2;

% So how to continue from here? Should just sum Powers

SNR = 1/sum(Powers);

% Or is hsould be also multilplied by the bandwidth (1.5Hz) SNR = 1/(1.5*sum(Powers);

%????