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.

Need help on my work...FSK modulator by using MATLAB

Status
Not open for further replies.

coolkwc

Newbie level 3
Joined
Aug 31, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,313
matlab program for fsk

i have been requested to simulate the FSK modulator by using MATLAB...i have no idea how to start the work...

OK, i have study about the ASK and FSK....i know the FSK can produce by combined the ASK waveform and added together with summing amplifier, how true is my statement?

Below is the sketch of the model..
94_1220192023.jpg


Any idea how i should start the work? build the model from scratch or just got others alternative? i'm totally noob about the matlab, please help me, thanks alot...
 

fsk matlab

Bro, i figured out what should i do adi...

Actually my work quite easy only, let say if i assigned bit 0 as 1000hz and 1 assigned as 1400hz, if detect 1, output sine wave of 1000hz, else if detect 0, output sinewave of 1400hz, and then just add this two wave then the FSK is done...but i'm totally noob on MATLAB code...

i found this code over internet..

%FSK Modulation
bit = round(rand(1,10)); % bit stream of random 1's and 0's
bitperiod = 0.01; %bit period
fs = 15000; %sampling frequency
fc = [3000 5000]; % carrier frequency
% create the FSK signal
L=length(0:(bitperiod/1500):bitperiod);
transmitted = zeros(1,L);
for k = 1:length(bit)
f = fc(bit(k) + 1);
transmitted((k-1)*L+1: k*L) = cos(2*pi*f*(0:(bitperiod/1500):bitperiod));
%transmitted()=transmitted()+2*randn(size(0.01));
%stem(transmitted);%fsk verified
%y = filter(b,a,transmitted);
end
plot(transmitted);

what means by let say Wave=X(a:b:c)? what the parameter inside meant?
 

Re: fsk matlab

Bro, i figured out what should i do adi...

Actually my work quite easy only, let say if i assigned bit 0 as 1000hz and 1 assigned as 1400hz, if detect 1, output sine wave of 1000hz, else if detect 0, output sinewave of 1400hz, and then just add this two wave then the FSK is done...but i'm totally noob on MATLAB code...

i found this code over internet..

%FSK Modulation
bit = round(rand(1,10)); % bit stream of random 1's and 0's
bitperiod = 0.01; %bit period
fs = 15000; %sampling frequency
fc = [3000 5000]; % carrier frequency
% create the FSK signal
L=length(0:(bitperiod/1500):bitperiod);
transmitted = zeros(1,L);
for k = 1:length(bit)
f = fc(bit(k) + 1);
transmitted((k-1)*L+1: k*L) = cos(2*pi*f*(0:(bitperiod/1500):bitperiod));
%transmitted()=transmitted()+2*randn(size(0.01));
%stem(transmitted);%fsk verified
%y = filter(b,a,transmitted);
end
plot(transmitted);

what means by let say Wave=X(a:b:c)? what the parameter inside meant?

Hi ;

x(a:b:c) means that the loop will start from a to c with a interval of b..like 1:100 with 2 as interval can be written as (1:2:100).

I hope that is clear
 

Re: fsk matlab

it means take values of X starting from element number a all the way to element number c with a step of b, for eg, 1:2:9 will give you odd numbers and 2:2:10 will give you even
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top