how to calculate central frequency from fft of wave function

조회 수: 1 (최근 30일)
kavya saxena
kavya saxena 2012년 5월 24일
hi all, is there any difference between central freq and maximum freq of a wave function. how i can calculate central frequency of this function using fft in matlab y=0.5(1-cos(2*pi*f*t)*sin(2*pi*f*t)

답변 (2개)

Wayne King
Wayne King 2012년 5월 24일
Are you trying to show us an AM signal? If so, are the two f's really the same frequency, or did you mean something like this:
t = 0:1e-4:1-1e-4;
f0 = 50;
fc = 1e3;
y=0.5*(1-cos(2*pi*f0*t)).*sin(2*pi*fc*t);
ydft = fft(y);
ydft = ydft(1:length(y)/2+1);
freq = 0:1e4/length(y):1e4/2;
plot(freq,abs(ydft))
  댓글 수: 1
kavya saxena
kavya saxena 2012년 5월 24일
these two are same frequency. let it wiil be 20Khz then i did
f=20e3;
fs=f*100;
ts=1/fs;
n=3;
t=0:ts:n/f;
y=0.5*(1-cos(2*pi*f*t)).*sin(2*pi*f*t);
ydft = fft(y);
now how i get central freq?

댓글을 달려면 로그인하십시오.


Wayne King
Wayne King 2012년 5월 24일
It appears to me that just rewriting that using trigonometric identities you see that it equals
1/2*sin(2*pi*f*t)-1/4*sin(2*pi*2*f*t)
So you get a line component at 20 kHz and one at 40 kHz with 1/2 the amplitude of the component at 20 kHz.
freq = 0:fs/length(y):fs/2;
ydft = fft(y);
ydft = ydft(1:ceil(length(y)/2));
plot(freq,abs(ydft))
So I'm guessing you call the center frequency 30 kHz.

카테고리

Help CenterFile Exchange에서 Direction of Arrival Estimation에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by