electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

how to calculate the frequency of a signal ...


Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> how to calculate the frequency of a signal ...
Author Message
savage67



Joined: 25 Sep 2006
Posts: 18


Post01 Dec 2007 19:33   

pxx = x.*conj(x)/512;


i m writing a program in matlab to make the fft analysis of the signal which the user determine
but i dont know how to measure the period of tha signal..

how to calculate the frequency or period of a signal which has two component with different frequencies
like A.sin(w1.t)+B.cos(w2.t)
plz help meee
Back to top
DMan



Joined: 20 Oct 2005
Posts: 41
Helped: 6
Location: Slovenia


Post01 Dec 2007 21:13   

how to calculate the frequency of a signal ...


It strongly depends upon coeficients A,B,w1, w2.
But in most cases signal would not be periodical but pseudoperiodical if not even nonperidical.
f(t)=A.sin(w1.t)+B.cos(w2.t)

The definition for peridical signals says:
f(t)=f(t+T), where t is time and T period.
so you should solve the equation:
A.sin(w1.t)+B.cos(w2.t) =A.sin(w1(t+T))+B.cos(w2(t+T))
and get T if f(t) would be periodical but I don't thik it is since it has boath frequencies w1 and w2
Back to top
ebook123456789



Joined: 09 Mar 2007
Posts: 50
Helped: 1


Post05 Dec 2007 8:39   

how to calculate the frequency of a signal ...


as long as w1 and w2 are far enough, you should see 2 peaks after fft analysis.
Back to top
Google
AdSense
Google Adsense




Post05 Dec 2007 8:39   

Ads




Back to top
mudrik



Joined: 05 Mar 2005
Posts: 123
Helped: 13


Post05 Dec 2007 13:07   

Re: how to calculate the frequency of a signal ...


In help of Matlab you can find an example:

t = 0:0.001:0.6;
x = sin(2*pi*50*t)+sin(2*pi*120*t);
y = x + 2*randn(size(t));
plot(1000*t(1:50),y(1:50))
title('Signal Corrupted with Zero-Mean Random Noise')
xlabel('time (milliseconds)')

X = fft(x,512);
Y = fft(y,512);
Pxx = X.* conj(X) / 512;
Pyy = Y.* conj(Y) / 512;

f = 1000*(0:256)/512;
plot(f,Pyy(1:257))
title('Frequency content of y')
xlabel('frequency (Hz)')

x : periodical signal
y ; with additional noise

Visualisation of Pyy or Pxx reveals the frequency content of the signals y and x
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital Signal Processing -> how to calculate the frequency of a signal ...
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
How to calculate the Frequency ....... (2)
how to calculate the frequency (1)
how to calculate the cutoff frequency of the filter circuit (7)
How can i calculate the frequency of RC Osc. (2)
How can I calculate the sampling frequency? (2)
How does the Hspice calculate the DFT of a signal ? (4)
How to calculate the power of high frequency signals? (3)
how to calculate the natural frequency for PLL? (4)
How to calculate the track length of a signal? (4)
How can I calculate the period of this signal? (23)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS