0% found this document useful (0 votes)
34 views2 pages

FSK Modulation Matlab Programming: All All

This document describes a MATLAB program that implements frequency shift keying (FSK) modulation. The program generates a random binary data sequence, maps 1s and 0s to two different carrier frequencies, combines the modulated signals, and plots the output signals. It generates an 8-bit random data sequence, modulates chunks of the sequence onto sinusoids at 10Hz and 25Hz to produce the FSK signal, and displays the binary data, message signal, carrier signal, and FSK output signal.

Uploaded by

Ranjabati Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

FSK Modulation Matlab Programming: All All

This document describes a MATLAB program that implements frequency shift keying (FSK) modulation. The program generates a random binary data sequence, maps 1s and 0s to two different carrier frequencies, combines the modulated signals, and plots the output signals. It generates an 8-bit random data sequence, modulates chunks of the sequence onto sinusoids at 10Hz and 25Hz to produce the FSK signal, and displays the binary data, message signal, carrier signal, and FSK output signal.

Uploaded by

Ranjabati Ghosh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

FSK MODULATION MATLAB PROGRAMMING

clc;
clear all;
close all;

T=1;fc=10;fs=25;
t=0:T/100:1;
c=sqrt(2/T)*sin(2*pi*fc*t);
d=sqrt(2/T)*sin(2*pi*fs*t);

N=8;
m=rand(1,N);
t1=0;t2=T;

for i=1:N
t=[t1:.01:t2]

if m(i)>0.5
m(i)=1;
m_s=ones(1,length(t));
fsk_sig(i,:)=c;

else
m(i)=0;
m_s=zeros(1,length(t));
fsk_sig(i,:)=d;
end

message(i,:)=m_s;
t1=t1+(T+.01);
t2=t2+(T+.01);
subplot(5,1,2);
axis([0 N -2 2]);
plot(t,message(i,:),'r');
title('message signal');
xlabel('t--->');
ylabel('m(t)');
grid on
hold on

subplot(5,1,4);
plot(t,fsk_sig(i,:));
title('FSK SIGNAL');
xlabel('t--->');
ylabel('s(t)');
grid on
hold on
end
hold off

subplot(5,1,3);
plot(t,c);
title('carrier signal');
xlabel('t--->');
ylabel('c(t)');
grid on

subplot(5,1,1);
stem(m);
title('binary data bits');
xlabel('n--->');
ylabel('b(n)');
grid on

OUTPUT :

binary data bits


1
b(n)

0.5
0
1 2 3 4 5 6 7 8
n--->
message signal
2
m(t)

0
-2
0 1 2 3 4 5 6 7 8
t--->
carrier signal
2
c(t)

-2
7 7.2 7.4 7.6 7.8 8 8.2
t--->
FSK SIGNAL
2
s(t)

-2
0 1 2 3 4 5 6 7 8 9
t--->

You might also like