[email protected] (Saumyajit) wrote in message news:<
[email protected] com>...
> HI All,
> I am an engg student doing a project on FFT. Now I am in the process
> of learning DSP.I am stuck with a problem related to the calculation
> of PSD. Could anybody please help me out ??
> I have got a 16 point FFT Processor.Now after FFT Processiing I do
> have 16 complex o/ps which are in the frequency domain.I have to
> calculate the PSD over these points. How do i do that ? I should not
> use MATLAB for this. I have to write the code in VHDL.
> I downloaded some material which says that After FFT processing I have
> to calculate the Power which is the square of the samples, then divide
> it by the sampling freuency.
> Some other documents says that If I take the squre of the o/p samples,
> I will get the PSD. So I am confused over this.
First, you have to find the documentation of your FFT routine. Formally,
the Discrete Fourier Transform (DFT) is defined as something like
1 N-1 2pi nk
X(k) = ------- sum x(n) exp(-j-------- )
sqrt(N) n=0 N
and the Inverse DFT as
1 N-1 2pi nk
x(n) = ------- sum X(k) exp( j-------- ).
sqrt(N) k=0 N
Note the 1/sqrt(N) factor that pops out in both formulas.
The FFT/IFFT routines usually "simplify" the transforms by dividing
by N in either the forward or inverse transform. Matlab does, for
instance, not scale the sum at all in the forward transform but
divides by N in the inverse transform.
You have to make sure that you skale the DFT with 1/sqrt(N).
As for scaling with the frequency, we usually want the PSD estimate
in terms of physichal, not normalized, frequency. So when you have
an N-point DFT, it spans a physical bandwidth of Fs Hz (Fs is sampling
frequency) and its frequency bins are dF= Fs/N wide.
You want a power spectral *density* estimate that relates to the
physical world, so you want to know how much power each frequency
bin represents. Remember, power spectral density relates to how
much power is found inside a given bandwidt, so you need to multiply
the coefficient in each bin with the bandwidth of the bin, dF.
These scaling factors are often skipped (or treated very sloppy)
since people often are content with finding an estimate for the
shape of the spectrum, and do not necessarily care too much about
the numbers.
Rune