New York, NY IMG HI 58° LO 56° Home About Contact
IMG-LOGO
Home Electrical and Electronics Digital Communication To generate the waveform of Frequency Shift Keying (FSK) signal using MATLAB.
Digital Communication Lab Experiments

To generate the waveform of Frequency Shift Keying (FSK) signal using MATLAB.



Objective:

To generate the waveform of Frequency Shift Keying (FSK) signal using MATLAB.

Software required:

  1. MATLAB
  2. Computer installed with Windows XP or higher Version

Theory

Generation of FSK:Frequency-shift keying (FSK) is a frequency modulation scheme in which digital information is transmitted through discrete frequency changes of a carrier wave. The simplest FSK is binary FSK (BFSK). BFSK uses a pair of discrete frequencies to transmit binary (0s and 1s) information. With this scheme, the "1" is called the mark frequency and the "0" is called the space frequency.

In binary FSK system, symbol 1 & 0 are distinguished from each other by transmitting one of the two sinusoidal waves that differ in frequency by a fixed amount.

Si (t) = √2E/Tb cos 2πf1t

0≤ t ≤Tb

0 elsewhere

where i=1, 2 & Eb=Transmitted energy/bit

Transmitted freq= ƒi = (n c+i)/T b, and n = constant (integer), T b= bit interval

Symbol 1 is represented by S 1(t) and Symbol 0 is represented by S 0(t)

block-diagram-of-bfsk-transmitter

The input binary sequence is represented in its ON-OFF form, with symbol 1 represented by constant amplitude of √Eb with & symbol 0 represented by zero volts. By using inverter in the lower channel, we in effect make sure that when symbol 1is at the input, The two frequency f 1& f 2are chosen to be equal integer multiples of the bit rate 1/T b. By summing the upper & lower channel outputs, we get BFSK signal as shown in figure 8.1.

FSK modulation:

  1. Generate two carriers signal.
  2. Start for loop
  3. Generate binary data, message signal and inverted message signal
  4. Multiply carrier 1 with message signal and carrier 2 with inverted message signal
  5. Perform addition to get the FSK modulated signal
  6. Plot message signal and FSK modulated signal.
  7. End for loop.
  8. Plot the binary data and carriers

Program:

%FSK Modulation

clc;

clear all;

close all;

%Generate Carrier Signal

Tb=1;

fc1=2;fc2=5;

t=0:(Tb/100):Tb;

c1=sqrt(2/Tb)*sin(2*pi*fc1*t);

c2=sqrt(2/Tb)*sin(2*pi*fc2*t);

%generate message signal

N=8;

m=rand(1,N);

t1=0;t2=Tb

for i=1:N

t=[t1:(Tb/100):t2]

if m(i)>0.5

m(i)=1;

m_s=ones(1,length(t));

invm_s=zeros(1,length(t));

else

m(i)=0;

m_s=zeros(1,length(t));

invm_s=ones(1,length(t));

end

message(i,:)=m_s;

%Multiplier

fsk_sig1(i,:)=c1.*m_s;

fsk_sig2(i,:)=c2.*invm_s;

fsk=fsk_sig1+fsk_sig2;

%plotting the message signal and the modulated signal

subplot(3,2,2);

axis([0 N -2 2]);

plot(t,message(i,:),'r');

title('message signal');

xlabel('t--->');

ylabel('m(t)');

grid on;

hold on;

subplot(3,2,5);

plot(t,fsk(i,:));

title('FSK signal');

xlabel('t--->);

ylabel('s(t)');

grid on;

hold on;

t1=t1+(Tb+.01);

t2=t2+(Tb+.01);

end

hold off

%Plotting binary data bits and carrier signal

subplot(3,2,1);

stem(m);

title('binary data bits');

xlabel('n--->');

ylabel('b(n)');

grid on;

subplot(3,2,3);

plot(t,c1);

title('carrier signal-1');

xlabel('t--->');

yylabel('c1(t)');

grid on;

subplot(3,2,4);

plot(t,c2);

title('carrier signal-2');

xlabel('t--->');

yylabel('c2(t)');

grid on;

Observation:The desired BFSK waveforms i.e. binary data, message signal, carrier signal 1&2 and output waveforms are shown in figure 8.2.

diagram
bfsk-waveform

Conclusion:The program for binary FSK modulation has been simulated in MATLAB and observed the desired waveforms.

Questions:

  1. Determine the bandwidth and baud for BFSK signal with mark frequency of 49 KHz,a space frequency of 51 KHz, and a bit rate of 2 Kbps.
  2. Write a MATLAB program for finding the sum of series 1+ 2+ 3 +……+N.
  3. Sketch the FSK waveform for the input (a) 1010110 (b) 1100101.
  4. Write the advantages of FSK compared to ASK?