Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Normalization for DFT (fft in MATLAB)

1,288 views
Skip to first unread message

A.E lover

unread,
Jul 10, 2007, 6:21:09 PM7/10/07
to
Hi all,

is it correct that to normalize the output of fft such that a unit
sinusoid in the time domain corresponds to unit amplitude in the
frequency domain, I simply divide the DFT by the length of data.
for example data is x(n), I take N point DFT so the normalized output
is abs(fft(x,N))/N.

Can you please tell me how to prove this?

Thanks

AELOVER

Tim Wescott

unread,
Jul 10, 2007, 6:40:15 PM7/10/07
to
Not in general. It seems like everyone and his brother has a different
way of normalizing the FFT and IFFT internally -- you need to check to
see what your software package does and go with the flow.

Do an FFT on a vector of ones. Your result should be non-zero for the
first bin, and darn close to zero everywhere else. Use the value of the
non-zero bin to scale your results.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html

Clay

unread,
Jul 10, 2007, 6:36:47 PM7/10/07
to


Actually there are several ways discrete fourier transforms may be
normalized. Essentialy you like for DFT_inverse ( DFT ( f(x) ) ) to
be f(x) without any extra scaling. Two common ways are:


DFT inverse DFT

1 1/N

---------------------------------------------
1/sqrt(N) 1/sqrt(N)


(There are some adjustments needed for the DC term and for the "half
sampling rate term" if the length is even)

Try finding Rick Lyons' book and looking up the specific details.

Clay


A.E lover

unread,
Jul 10, 2007, 6:55:27 PM7/10/07
to
Thanks Wescott, however I have a specific requirement to normalize
fft: " normalize the FFT output such that a sinusoid with amplitude 1
will correspond to an FFT magnitude of unity". I think for this
specific requirement we will have unique way to do that, right? So in
your opinion, in this case, how should I do to normalize FFT output?

Thank you very much.

Regards,


> Not in general. It seems like everyone and his brother has a different
> way of normalizing the FFT and IFFT internally -- you need to check to
> see what your software package does and go with the flow.
>
>

> Tim Wescott
> Wescott Design Serviceshttp://www.wescottdesign.com


v

Jerry Avins

unread,
Jul 10, 2007, 11:01:52 PM7/10/07
to
A.E lover wrote:
> Thanks Wescott, however I have a specific requirement to normalize
> fft: " normalize the FFT output such that a sinusoid with amplitude 1
> will correspond to an FFT magnitude of unity". I think for this
> specific requirement we will have unique way to do that, right? So in
> your opinion, in this case, how should I do to normalize FFT output?

That depends on the details of the FFT routine you use. Write your own
and know, or use Tim's approach to find out.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

A.E lover

unread,
Jul 11, 2007, 12:31:32 AM7/11/07
to
On Jul 10, 11:01 pm, Jerry Avins <j...@ieee.org> wrote:
> A.E lover wrote:
I am using fft of MATLAB, I am still confused with Tim's method.
In Tim 's method, the testing input is a vector of ones. I am
confused, I guess it should be a sinusoidal with amplitude of 1
because my objective is to normalize fft such that the sinusoidal with
applitude of 1 in time domain will correspond with fft amplitude of
unity.
I have tested two cases, using Tim's method, the scale value is the
length of the input vector. while if the input is a sinusoidal
signal, the scale value is half of signal length. So which one is
correct for my case?

Thanks

NZTideMan

unread,
Jul 11, 2007, 1:47:41 AM7/11/07
to
> > ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯- Hide quoted text -
>
> - Show quoted text -

You can scale the FFT to be whatever you like.
For a power spectral density (PSD) spectrum, the convention is for the
area under the spectrum to be the variance of the time series, but for
a normalised spectrum the area is unity, by convention.
If you have to divide by N/2 to get unit amplitude, so be it.
Different strokes for different folks.

dbd

unread,
Jul 11, 2007, 5:35:25 AM7/11/07
to

As often happens here, your question is underspecified, but that
hasn't kept people from throwing out answers.

If your 'unit sinusoid in the time domain' is a constant unit
amplitude
complex vector rotating at a bin centered frequency, the N-point FFT
in
Matlab will produce an output bin with amplitude N.

If your 'unit sinusoid in the time domain' is a unit peak amplitude
real sinusoid oscillating between positive and negative peaks at a
bin centered frequency, the N-point FFT in
Matlab will produce two output bins with amplitude N/2 at what
can be interpreted as positive and negative frequency positions.

Note that Tim Wescott's vector of 1's is in the complex vector case.

If you are using real input and want to use only non-negative
frequencies
from the FFT, you will have to scale the DC bin differently from the
positive frequency bins.

Good Luck,

Dale B. Dalrymple
http://dbdimages.com


NZTideMan

unread,
Jul 11, 2007, 6:07:16 AM7/11/07
to

Normalisation:
When I use a word,' Humpty Dumpty said, in a rather scornful tone,' it
means just what I choose it to mean, neither more nor less.

0 new messages