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.

fm demodulation in matlab (PLL)

Status
Not open for further replies.

locchamp

Member level 2
Joined
Nov 8, 2005
Messages
53
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,668
fm demodulation matlab

Hi guys can you please help me i am simulating an fm system here is the code below I am having a problem on the demodulation side I am trying to demodulate using PLL desgning (Phase Lock Loop). But it is giving me an error at last line R has to be positive number I think its R please help I am giving up

[Y,Fs,NBITS,OPTS] = mp3read('jem.mp3');
snd=Y(1:200000);
t = 0:1/Fs:(length(snd)-1)/Fs;

plot(t,snd);
%Modultaion
Ac=1;
fc=68000;
wc=2*pi*fc;
kf=1000;
spc=8;
R = (fc*spc)/Fs;

outfm = Ac * cos(wc.*t + 2 * pi * kf * cumsum(snd));
%noise

%demodulation

z = ademod(FMmodcarrier,fc,fc*spc,'fm'); % PLL-based FM demodulation
dd=decimate(z,R);
this is the problem her I think though it is somehting to do with R is has to be any idea please help thank you so much
 

demodulation matlab

there r ready made examples of FM in MATLAB
 
fm modulation matlab

DECIMATE function in Matlab reduce Data rate by 1/R
therefore negative R is Not Correct
 

frequency modulation matlab code

SO what is R how do I set it then R fro mwhat I made it is not negative.? Please help and the examples do not have pll. Please hel pso by looking at my code what is going on why am i geting an error at the last line? Thanks guys
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top