My projects is to write or find Matlab code for 4FSK(frequency shift keying) with simulation pictures...

Free

50.1K

Verified Solution

Question

Electrical Engineering

My projects is to write or find Matlab code for 4FSK(frequencyshift keying) with simulation pictures and create the signal afterthat add noise to it and finally demodulate it ..

Please help me to do this project.

Answer & Explanation Solved by verified expert
4.4 Ratings (939 Votes)

FOR FSK MODULATION:


%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);

FOR FSK DEMODULATION:

%FSK Demodulation
demod_output=zeros(1,10);
A=zeros(L,1);
%B=zeros(L,1);
Decision=0;
%Logic_0=0;
A=transpose(cos(2*pi*5000*(0:(bitperiod/1500):bitperiod))-cos(2*pi*300
0*(0:(bitperiod/1500):bitperiod)));
%B=transpose(cos(2*pi*5000*(0:(bitperiod/1500):bitperiod)));
for x = 1:length(bit)
Decision= transmitted((x-1)*L+1: x*L)*A;
%Logic_0= transmitted((x-1)*L+1: x*L)*A;
if Decision>0
demod_output(x)=1;
else
demod_output(x)=0;
end
stem(demod_output);
end


Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students