<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029</link>
    <title>MATLAB Central Newsreader - Normalization for DFT (fft in MATLAB)</title>
    <description>Feed for thread: Normalization for DFT (fft in MATLAB)</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 10 Jul 2007 15:40:15 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382193</link>
      <author>Tim Wescott</author>
      <description>A.E lover wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; is it correct that to normalize the output of fft such that a unit&lt;br&gt;
&amp;gt; sinusoid in the time domain corresponds to unit amplitude in the&lt;br&gt;
&amp;gt; frequency domain, I simply divide the DFT by the length of data.&lt;br&gt;
&amp;gt; for example data is x(n), I take N point DFT so the normalized output&lt;br&gt;
&amp;gt; is  abs(fft(x,N))/N.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can you please tell me how to prove this?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; AELOVER&lt;br&gt;
&amp;gt; &lt;br&gt;
Not in general.  It seems like everyone and his brother has a different &lt;br&gt;
way of normalizing the FFT and IFFT internally -- you need to check to &lt;br&gt;
see what your software package does and go with the flow.&lt;br&gt;
&lt;br&gt;
Do an FFT on a vector of ones.  Your result should be non-zero for the &lt;br&gt;
first bin, and darn close to zero everywhere else.  Use the value of the &lt;br&gt;
non-zero bin to scale your results.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&lt;br&gt;
Tim Wescott&lt;br&gt;
Wescott Design Services&lt;br&gt;
&lt;a href=&quot;http://www.wescottdesign.com&quot;&gt;http://www.wescottdesign.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Do you need to implement control loops in software?&lt;br&gt;
&quot;Applied Control Theory for Embedded Systems&quot; gives you just what it says.&lt;br&gt;
See details at &lt;a href=&quot;http://www.wescottdesign.com/actfes/actfes.html&quot;&gt;http://www.wescottdesign.com/actfes/actfes.html&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 15:21:09 -0400</pubDate>
      <title>Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382192</link>
      <author> &quot;A.E lover</author>
      <description>Hi all,&lt;br&gt;
&lt;br&gt;
is it correct that to normalize the output of fft such that a unit&lt;br&gt;
sinusoid in the time domain corresponds to unit amplitude in the&lt;br&gt;
frequency domain, I simply divide the DFT by the length of data.&lt;br&gt;
for example data is x(n), I take N point DFT so the normalized output&lt;br&gt;
is  abs(fft(x,N))/N.&lt;br&gt;
&lt;br&gt;
Can you please tell me how to prove this?&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
&lt;br&gt;
AELOVER</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 15:36:47 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382194</link>
      <author> Clay</author>
      <description>On Jul 10, 6:21 pm, &quot;A.E lover&quot; &amp;lt;aelove...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; is it correct that to normalize the output of fft such that a unit&lt;br&gt;
&amp;gt; sinusoid in the time domain corresponds to unit amplitude in the&lt;br&gt;
&amp;gt; frequency domain, I simply divide the DFT by the length of data.&lt;br&gt;
&amp;gt; for example data is x(n), I take N point DFT so the normalized output&lt;br&gt;
&amp;gt; is  abs(fft(x,N))/N.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can you please tell me how to prove this?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; AELOVER&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Actually there are several ways discrete fourier transforms may be&lt;br&gt;
normalized. Essentialy you like for DFT_inverse (  DFT ( f(x) ) ) to&lt;br&gt;
be f(x) without any extra scaling. Two common ways are:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
DFT                 inverse DFT&lt;br&gt;
&lt;br&gt;
1                         1/N&lt;br&gt;
&lt;br&gt;
---------------------------------------------&lt;br&gt;
1/sqrt(N)             1/sqrt(N)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
(There are some adjustments needed for the DC term and for the &quot;half&lt;br&gt;
sampling rate term&quot; if the length is even)&lt;br&gt;
&lt;br&gt;
Try finding Rick Lyons' book and looking up the specific details.&lt;br&gt;
&lt;br&gt;
Clay</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 15:55:27 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382197</link>
      <author> &quot;A.E lover</author>
      <description>Thanks Wescott,  however I have a specific requirement to normalize&lt;br&gt;
fft: &quot; normalize the FFT output such that a sinusoid with amplitude 1&lt;br&gt;
will correspond to an FFT magnitude of unity&quot;. I think for this&lt;br&gt;
specific requirement we will have unique way to do that, right? So in&lt;br&gt;
your opinion, in this case, how should I do to normalize FFT output?&lt;br&gt;
&lt;br&gt;
Thank you very much.&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; Not in general.  It seems like everyone and his brother has a different&lt;br&gt;
&amp;gt; way of normalizing the FFT and IFFT internally -- you need to check to&lt;br&gt;
&amp;gt; see what your software package does and go with the flow.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Tim Wescott&lt;br&gt;
&amp;gt; Wescott Design Services&lt;a href=&quot;http://www.wescottdesign.com&quot;&gt;http://www.wescottdesign.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
v</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 23:01:52 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382216</link>
      <author>Jerry Avins</author>
      <description>A.E lover wrote:&lt;br&gt;
&amp;gt; Thanks Wescott,  however I have a specific requirement to normalize&lt;br&gt;
&amp;gt; fft: &quot; normalize the FFT output such that a sinusoid with amplitude 1&lt;br&gt;
&amp;gt; will correspond to an FFT magnitude of unity&quot;. I think for this&lt;br&gt;
&amp;gt; specific requirement we will have unique way to do that, right? So in&lt;br&gt;
&amp;gt; your opinion, in this case, how should I do to normalize FFT output?&lt;br&gt;
&lt;br&gt;
That depends on the details of the FFT routine you use. Write your own &lt;br&gt;
and know, or use Tim's approach to find out.&lt;br&gt;
&lt;br&gt;
Jerry&lt;br&gt;
-- &lt;br&gt;
Engineering is the art of making what you want from things you can get.&lt;br&gt;
&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;&#194;&#175;</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 21:31:32 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382222</link>
      <author> &quot;A.E lover</author>
      <description>On Jul 10, 11:01 pm, Jerry Avins &amp;lt;j...@ieee.org&amp;gt; wrote:&lt;br&gt;
&amp;gt; A.E lover wrote:&lt;br&gt;
I am using fft of MATLAB,  I am still confused with Tim's method.&lt;br&gt;
In Tim 's method, the testing input is a vector of ones. I am&lt;br&gt;
confused,  I guess it should  be a sinusoidal with amplitude of 1&lt;br&gt;
because my objective is to normalize fft such that the sinusoidal with&lt;br&gt;
applitude of 1 in time domain will correspond with fft amplitude of&lt;br&gt;
unity.&lt;br&gt;
I have tested two cases, using Tim's method, the scale value is the&lt;br&gt;
length of the input vector. while if  the input is a sinusoidal&lt;br&gt;
signal, the scale value is half of signal length. So which one is&lt;br&gt;
correct for my case?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanks&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;gt; &amp;gt; Thanks Wescott,  however I have a specific requirement to normalize&lt;br&gt;
&amp;gt; &amp;gt; fft: &quot; normalize the FFT output such that a sinusoid with amplitude 1&lt;br&gt;
&amp;gt; &amp;gt; will correspond to an FFT magnitude of unity&quot;. I think for this&lt;br&gt;
&amp;gt; &amp;gt; specific requirement we will have unique way to do that, right? So in&lt;br&gt;
&amp;gt; &amp;gt; your opinion, in this case, how should I do to normalize FFT output?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; That depends on the details of the FFT routine you use. Write your own&lt;br&gt;
&amp;gt; and know, or use Tim's approach to find out.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Jerry&lt;br&gt;
&amp;gt; --&lt;br&gt;
&amp;gt; Engineering is the art of making what you want from things you can get.&lt;br&gt;
&amp;gt; =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=&lt;br&gt;
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=&lt;br&gt;
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF</description>
    </item>
    <item>
      <pubDate>Tue, 10 Jul 2007 22:47:41 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382228</link>
      <author> NZTideMan</author>
      <description>On Jul 11, 4:31 pm, &quot;A.E lover&quot; &amp;lt;aelove...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; On Jul 10, 11:01 pm, Jerry Avins &amp;lt;j...@ieee.org&amp;gt; wrote:&amp;gt; A.E lover wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I am using fft of MATLAB,  I am still confused with Tim's method.&lt;br&gt;
&amp;gt; In Tim 's method, the testing input is a vector of ones. I am&lt;br&gt;
&amp;gt; confused,  I guess it should  be a sinusoidal with amplitude of 1&lt;br&gt;
&amp;gt; because my objective is to normalize fft such that the sinusoidal with&lt;br&gt;
&amp;gt; applitude of 1 in time domain will correspond with fft amplitude of&lt;br&gt;
&amp;gt; unity.&lt;br&gt;
&amp;gt; I have tested two cases, using Tim's method, the scale value is the&lt;br&gt;
&amp;gt; length of the input vector. while if  the input is a sinusoidal&lt;br&gt;
&amp;gt; signal, the scale value is half of signal length. So which one is&lt;br&gt;
&amp;gt; correct for my case?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; Thanks Wescott,  however I have a specific requirement to normalize&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; fft: &quot; normalize the FFT output such that a sinusoid with amplitude 1&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; will correspond to an FFT magnitude of unity&quot;. I think for this&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; specific requirement we will have unique way to do that, right? So in&lt;br&gt;
&amp;gt; &amp;gt; &amp;gt; your opinion, in this case, how should I do to normalize FFT output?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; That depends on the details of the FFT routine you use. Write your own&lt;br&gt;
&amp;gt; &amp;gt; and know, or use Tim's approach to find out.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Jerry&lt;br&gt;
&amp;gt; &amp;gt; --&lt;br&gt;
&amp;gt; &amp;gt; Engineering is the art of making what you want from things you can get.&lt;br&gt;
&amp;gt; &amp;gt; =AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=&lt;br&gt;
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=&lt;br&gt;
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF- Hide=&lt;br&gt;
&amp;nbsp;quoted text -&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; - Show quoted text -&lt;br&gt;
&lt;br&gt;
You can scale the FFT to be whatever you like.&lt;br&gt;
For a power spectral density (PSD) spectrum, the convention is for the&lt;br&gt;
area under the spectrum to be the variance of the time series, but for&lt;br&gt;
a normalised spectrum the area is unity, by convention.&lt;br&gt;
If you have to divide by N/2 to get unit amplitude, so be it.&lt;br&gt;
Different strokes for different folks.</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jul 2007 02:35:25 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382253</link>
      <author> dbd</author>
      <description>On Jul 10, 3:21 pm, &quot;A.E lover&quot; &amp;lt;aelove...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; is it correct that to normalize the output of fft such that a unit&lt;br&gt;
&amp;gt; sinusoid in the time domain corresponds to unit amplitude in the&lt;br&gt;
&amp;gt; frequency domain, I simply divide the DFT by the length of data.&lt;br&gt;
&amp;gt; for example data is x(n), I take N point DFT so the normalized output&lt;br&gt;
&amp;gt; is  abs(fft(x,N))/N.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Can you please tell me how to prove this?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; AELOVER&lt;br&gt;
&lt;br&gt;
As often happens here, your question is underspecified, but that&lt;br&gt;
hasn't kept people from throwing out answers.&lt;br&gt;
&lt;br&gt;
If your 'unit sinusoid in the time domain' is a constant unit&lt;br&gt;
amplitude&lt;br&gt;
complex vector rotating at a bin centered frequency, the N-point FFT&lt;br&gt;
in&lt;br&gt;
Matlab will produce an output bin with amplitude N.&lt;br&gt;
&lt;br&gt;
If your 'unit sinusoid in the time domain' is a unit peak amplitude&lt;br&gt;
real sinusoid oscillating between positive and negative peaks at a&lt;br&gt;
bin centered frequency, the N-point FFT in&lt;br&gt;
Matlab will produce two output bins with amplitude N/2 at what&lt;br&gt;
can be interpreted as positive and negative frequency positions.&lt;br&gt;
&lt;br&gt;
Note that Tim Wescott's vector of 1's is in the complex vector case.&lt;br&gt;
&lt;br&gt;
If you are using real input and want to use only non-negative&lt;br&gt;
frequencies&lt;br&gt;
from the FFT, you will have to scale the DC bin differently from the&lt;br&gt;
positive frequency bins.&lt;br&gt;
&lt;br&gt;
Good Luck,&lt;br&gt;
&lt;br&gt;
Dale B. Dalrymple&lt;br&gt;
&lt;a href=&quot;http://dbdimages.com&quot;&gt;http://dbdimages.com&lt;/a&gt;</description>
    </item>
    <item>
      <pubDate>Wed, 11 Jul 2007 03:07:16 -0400</pubDate>
      <title>Re: Normalization for DFT (fft in MATLAB)</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/152029#382255</link>
      <author> NZTideMan</author>
      <description>On Jul 11, 9:35 pm, dbd &amp;lt;d...@ieee.org&amp;gt; wrote:&lt;br&gt;
&amp;gt; On Jul 10, 3:21 pm, &quot;A.E lover&quot; &amp;lt;aelove...@gmail.com&amp;gt; wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hi all,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; is it correct that to normalize the output of fft such that a unit&lt;br&gt;
&amp;gt; &amp;gt; sinusoid in the time domain corresponds to unit amplitude in the&lt;br&gt;
&amp;gt; &amp;gt; frequency domain, I simply divide the DFT by the length of data.&lt;br&gt;
&amp;gt; &amp;gt; for example data is x(n), I take N point DFT so the normalized output&lt;br&gt;
&amp;gt; &amp;gt; is  abs(fft(x,N))/N.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Can you please tell me how to prove this?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; AELOVER&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; As often happens here, your question is underspecified, but that&lt;br&gt;
&amp;gt; hasn't kept people from throwing out answers.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If your 'unit sinusoid in the time domain' is a constant unit&lt;br&gt;
&amp;gt; amplitude&lt;br&gt;
&amp;gt; complex vector rotating at a bin centered frequency, the N-point FFT&lt;br&gt;
&amp;gt; in&lt;br&gt;
&amp;gt; Matlab will produce an output bin with amplitude N.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If your 'unit sinusoid in the time domain' is a unit peak amplitude&lt;br&gt;
&amp;gt; real sinusoid oscillating between positive and negative peaks at a&lt;br&gt;
&amp;gt; bin centered frequency, the N-point FFT in&lt;br&gt;
&amp;gt; Matlab will produce two output bins with amplitude N/2 at what&lt;br&gt;
&amp;gt; can be interpreted as positive and negative frequency positions.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Note that Tim Wescott's vector of 1's is in the complex vector case.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; If you are using real input and want to use only non-negative&lt;br&gt;
&amp;gt; frequencies&lt;br&gt;
&amp;gt; from the FFT, you will have to scale the DC bin differently from the&lt;br&gt;
&amp;gt; positive frequency bins.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Good Luck,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Dale B. Dalrymple&lt;a href=&quot;http://dbdimages.com&quot;&gt;http://dbdimages.com&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Normalisation:&lt;br&gt;
When I use a word,' Humpty Dumpty said, in a rather scornful tone,' it&lt;br&gt;
means just what I choose it to mean, neither more nor less.</description>
    </item>
  </channel>
</rss>

