How to get FFT of a siganl accurately?

2 ビュー (過去 30 日間)
Siva Mohan Sundara
Siva Mohan Sundara 2012 年 7 月 15 日
This is a fundamental question. Suppose I have a signal of multiple frequency components, is it possible to get frequency distributions by FFT? Will the output by FFT gives the signal or the signal's power? Kindly describe.
For example, I have a signal
y(t)=A1*sin(2*pi*f1*t)+A2*sin(2*pi*f2*t).
Will my FFT output gives components of magnitude A1 at frequency f1 and amplitude A2 at frequency f2 or something different.
What should I do to get the components as above?
  2 件のコメント
Walter Roberson
Walter Roberson 2012 年 7 月 15 日
Are you discussing the symbolic fourier transform, or the discrete fourier transform? The discrete fourier transform can only give results for f1 and f2 if those frequencies are certain rational multiples of the sampling frequency.
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 7 月 15 日
no, the Ck given bu fft, is related to the complex Coefficient X(w) of the continu Fourier transform of your signa (considering it's continu). To Find the relation you have to discritise a Fourier Transform with your sample time. you will obtain X(wk) related to Ck. aftr, you will calculate Ak and Bk using this relation Ck=(Ak-jBk)/2 C-k=(Ak+jBk)/2 for more details: my website www.azzimalik.com

サインインしてコメントする。

採用された回答

Wayne King
Wayne King 2012 年 7 月 15 日
As Walter suggests, if your signal length is such that the Fourier frequencies correspond with the frequencies you are looking for, you can get the least squares amplitude estimates by scaling the output of fft() -- the implementation of the DFT.
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = 1.5*cos(2*pi*100*t)+2*sin(2*pi*200*t);
xdft = fft(x);
A1 = 2/length(x)*xdft(101);
A2 = 2/length(x)*xdft(201);
abs(A1)
abs(A2)
A1 is a complex number, the real part is the estimate of cosine amplitude at the frequency corresponding to the DFT bin (DFT bin 101 here corresponds to 100 Hz). The imaginary part corresponds to the amplitude of a sine at 100 Hz.
The same is true of A2, except that is for a frequency of 200 Hz.
  1 件のコメント
Walter Roberson
Walter Roberson 2012 年 7 月 30 日
Azzi commented
we are not supposed to know the expression of a signal x= 1.5*cos(2*pi*100*t)+2*sin(2*pi*200*t); then we can't know how many consistants coefficient ak, bk, exist

サインインしてコメントする。

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 7 月 30 日

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by