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.

FFT scale to frequency conversion!

Status
Not open for further replies.

ravitejaelx

Newbie level 2
Joined
Dec 20, 2010
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Hyderabad
Activity points
1,294
Hello All,

Please solve my problem,

I want to find fft plot for a 50 Hz and 5V sinusoidal signal. So I tried the following code..

fm=50;
fs=150;
N=512;
t=0:1/fs:100;

y=sin(2*pi*(fs/fm)*t);

F=fftshift(abs(fft(y,N)));

k=(-N/2:N/2-1)*(fs/N);

plot(k,F);
grid on;

But I tried something but, I never achieved peak at 10Hz..
Please tell me how to convert exactly from fft bin scale to frequency scale?

And tell me how to scale magnitude to 5.

Please use the above program for your explanation..
And and tell me where I am doing mistake?
Thank you!
 

Attachments

  • fft OP.png
    fft OP.png
    177.9 KB · Views: 100

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top