Forums

Signal amplitude and FFT's

Started by Amir Give'on October 16, 2001
I have a very simple problem. The answer might be complicated... :)

I define a signal as:

dx = 1000;
x = -pi:dx:pi;
y = A * sin(freq * x);

now, I would like to look at the FFT of the signal:

padding = 1000;
ffty = fft(y,padding);

If I plot:

plot(abs(ffty).^2)

I get two peaks (as I expected). Now, my problem is how to go from
the HIGHT of the peaks in the Fourier domain back to the AMPLITUDE of
my sinusoidal ("A" in this case). I can assume I know everything
(number of points, limits, frequency) but the amplitude.




Amir-

On Tue, 16 Oct 2001, "Amir Give'on" <> wrote:
>I have a very simple problem. The answer might be complicated... :)
>
>I define a signal as:
>
>dx = 1000;
>x = -pi:dx:pi;
>y = A * sin(freq * x);
>
>now, I would like to look at the FFT of the signal:
>
>padding = 1000;
>ffty = fft(y,padding);
>
>If I plot:
>
>plot(abs(ffty).^2)
>
>I get two peaks (as I expected). Now, my problem is how to go from
>the HIGHT of the peaks in the Fourier domain back to the AMPLITUDE of
>my sinusoidal ("A" in this case). I can assume I know everything
>(number of points, limits, frequency) but the amplitude.

Divide linear magnitude values in FFT result by framesize, where framesize is
actual number of input points to FFT, not counting zero-filled points (i.e. if
there is no zero-filling, then framesize = FFT size). Also, if you apply a
window to the frame in time-domain prior to FFT, then you need to further divide

linear magnitude values by "window factor", which is calculated as

sum w[n] for n=0 .. N-1
wf = -----------------------
N

For a rectangular window (no window), wf = 1, for Hamming, Gaussian, Blackman,
etc. wf < 1.

Jeff Brower
DSP sw/hw engineer
Signalogic


hi amir
i think the amplitude of the peak is the absolute sum of the amplitudes of
the input sampled signal.
by plotting just y .u can see the amplitude of your input signal.
sunil

----- Original Message -----
From: Amir Give'on <>
To: <>
Sent: Tuesday, October 16, 2001 9:55 PM
Subject: [matlab] Signal amplitude and FFT's > I have a very simple problem. The answer might be complicated... :)
>
> I define a signal as:
>
> dx = 1000;
> x = -pi:dx:pi;
> y = A * sin(freq * x);
>
> now, I would like to look at the FFT of the signal:
>
> padding = 1000;
> ffty = fft(y,padding);
>
> If I plot:
>
> plot(abs(ffty).^2)
>
> I get two peaks (as I expected). Now, my problem is how to go from
> the HIGHT of the peaks in the Fourier domain back to the AMPLITUDE of
> my sinusoidal ("A" in this case). I can assume I know everything
> (number of points, limits, frequency) but the amplitude. >
>
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all" if
you want your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join:
>
> To Post:
>
> To Leave:
>
> Archives: http://www.yahoogroups.com/group/matlab
>
> More DSP-Related Groups: http://www.dsprelated.com/groups.php3
>
> ">http://docs.yahoo.com/info/terms/
>