Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

wrong frequencies using FFT in matlab?

Status
Not open for further replies.

Piierre

Newbie level 4
Joined
Mar 19, 2007
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I am new to signal processing and are trying to retrieve
the main frequency from a signal sampled with a samp.freq.
of 1kHz. I have been looking at a lot at different FFT:s
and I would like some help to understand them.

To find out how this stuff works I start with creating a
sinussignal in Matlab with the frequency of 1.029Hz

fs=1000;
length=20;
m=(1/fs:1/fs:length);
m=m';
f=1.5029;
signal=sin(2*pi*m*f);



If I perform an FFT on this signal the plot shows me a
frequency of 1.5Hz. What is the reason for this?

I have noticed that if I fix the edges of the signal so the
the sinus wave starts in the amplitude zero and end at
zero, then the FFT plot shows a frequency at 1.5027 which
is closer to what I set the sinussignal to be.
Can anyone explain this and what is the best way to get the
real frequency(1.5029)?
 

when u're using fft, use length= powers of 2

where is the fft part of code?

when u tell sin starts at 0 phase and ends with 0 phase, gives correct results? then whatz happening is called fft leakage(for the signal which is not this case).
google out the topic for fft leakage.

mon
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top