Name : Aditya Bonnerjee
Reg No. : 21BEC0384
Course Name : Digital
Communication Systems Lab
Course Code : BECE306P
Faculty Name : Dr. Nandakumar S
Experiment 3
Bandpass Coherent Single-Bit Modulation Techniques
Aim
To simulate Binary ASK, Binary FSK and Binary PSK using
MATLAB
Algorithm
BASK:
• Representation of message signal:
b = [1 0 1 0]
• Representation of Carrier signal:
x(t) = Asin2πft
• Representation of modulated signal using for
and if loop.
• Representation of Demodulated signal.
• Reconstruction of binary sequence.
Model Graph
BFSK:
• Representation of message signal:
b = [1 0 1 0]
• Representation of Carrier signal:
x(t) = Asin2πt
y(t) = Asin2πt
• Representation of modulated signal using for
and if loop.
• Representation of Demodulated signal.
• Reconstruction of binary sequence.
Model Graph
BPSK:
• Representation of message signal
b = [1 0 1 0]
• Representation of Carrier signal
x(t)= Asin2πft
y(t)= -Asin2πft
• Representation of modulated signal using for
and if loop.
• Representation of Demodulated signal.
• Reconstruction of binary sequence.
Model Graph
MATLAB Code
BASK:
clc;
clear all;
close all;
a=1;
f=7;
n=[1 0 1 1 0 0 0];
t=0:0.01:length(n);
t2=0:6;
%Plot Message Signal
subplot(4,1,1);
stairs(t2,n);
title('Message Signal');
xlabel('Time');
ylabel('Amplitude');
y=a*sin(2*pi*f*t);
%Plot Carrier Signal
subplot(4,1,2);
plot(t,y);
title('Carrier Signal ');
xlabel('Time');
ylabel('Amplitude');
%Modulation Process
for i=1:7
for j=(i-1)*100:i*100
if(n(i)==1)
s(j+1)=y(j+1);
else
s(j+1)=0;
end
end
end
%Plot ASK Signal
subplot(4,1,3);
plot(t,s);
title('ASK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
%Demodulation Process
for i=1:7
for j=(i-1)*100:i*100
if(s(j+1)==y(j+1))
x(j+1)=1;
else
x(j+1)=0;
end
end
end
%Plot Demodulated Signal
subplot(4,1,4);
plot(t,x);
title('ASK Demodulated Signal');
xlabel('Time');
ylabel('Amplitude');
Output Graph
BFSK:
clc;
clear all;
close all;
a=1;
f1=1;
f2=10;
n=[1 0 1 1 0 1 1];
t=0:0.01:length(n);
t2=0:6;
%Plot Message Signal
subplot(5,1,1);
stairs(t2,n);
title('Message Signal');
xlabel('Time');
ylabel('Amplitude');
c1=a*sin(2*pi*f1*t);
c2=a*sin(2*pi*f2*t);
%Plot Carrier Signal
subplot(5,1,2);
plot(t,c1);
title('Carrier Signal 1');
xlabel('Time');
ylabel('Amplitude');
subplot(5,1,3);
plot(t,c2);
title('Carrier Signal 2');
xlabel('Time');
ylabel('Amplitude');
%Modulation Process
for i=1:7
for j=(i-1)*100:i*100
if(n(i)==1)
s(j+1)=c1(j+1);
else
s(j+1)=c2(j+1);
end
end
end
%Plot FSK Signal
subplot(5,1,4);
plot(t,s);
title('FSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
%Demodulation Process
for i=1:7
for j=(i-1)*100:i*100
if(s(j+1)==c1(j+1))
x(j+1)=1;
else
x(j+1)=0;
end
end
end
%Plot Demodulated Signal
subplot(5,1,5);
plot(t,x);
title('FSK Demodulated Signal');
xlabel('Time');
ylabel('Amplitude');
Output Graph
BPSK:
clc;
clear all;
close all;
a=1;
f=3;
n=[1 0 1 1 0 1 1];
t=0:0.01:length(n);
t2=0:6;
%Plot Message Signal
subplot(5,1,1);
stairs(t2,n);
title('Message Signal');
xlabel('Time');
ylabel('Amplitude');
c1=a*sin(2*pi*f*t);
c2=-a*sin(2*pi*f*t);
%Plot Carrier Signal
subplot(5,1,2);
plot(t,c1);
title('Carrier Signal 1');
xlabel('Time');
ylabel('Amplitude');
subplot(5,1,3);
plot(t,c2);
title('Carrier Signal 2');
xlabel('Time');
ylabel('Amplitude');
%Modulation Process
for i=1:7
for j=(i-1)*100:i*100
if(n(i)==1)
s(j+1)=c1(j+1);
else
s(j+1)=c2(j+1);
end
end
end
%Plot FSK Signal
subplot(5,1,4);
plot(t,s);
title('PSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
%Demodulation Process
for i=1:7
for j=(i-1)*100:i*100
if(s(j+1)==c1(j+1))
x(j+1)=1;
else
x(j+1)=0;
end
end
end
%Plot Demodulated Signal
subplot(5,1,5);
plot(t,x);
title('PSK Demodulated Signal');
xlabel('Time');
ylabel('Amplitude');
Output Graph
Block Diagrams
BASK:
Transmitter:
Receiver:
BFSK:
Transmitter:
Receiver:
BPSK:
Transmitter:
Receiver:
Result and inference
The modulated and demodulated output waves for each of the
coherent single bit modulation techniques is obtained i.e. BASK,
BPSK and BFSK.
From their respective output graphs we infer the following:
→ For BASK, as per the modulating signal the amplitude of the
analog carrier changes. Phase and frequency continue to be
constant.
When there is high logic at any time intervals it can be said logic 1,
the same amplitude to be transmitted to the output as in those
intervals switch is being closed.
Now when the logic is low i.e. logic 0, No output would be
generated,
→ For BFSK, the frequency of the modulated output decreases for
logic 0 and goes back to initial frequency for logic 1
→ For BPSK, the phase changes by 180 degree for logic 0 and
changes again (goes back to same phase) for logic 1.

Experiment3_DCS-21BEC0384Adityabonnerjee

  • 1.
    Name : AdityaBonnerjee Reg No. : 21BEC0384 Course Name : Digital Communication Systems Lab Course Code : BECE306P Faculty Name : Dr. Nandakumar S Experiment 3
  • 2.
    Bandpass Coherent Single-BitModulation Techniques Aim To simulate Binary ASK, Binary FSK and Binary PSK using MATLAB Algorithm BASK: • Representation of message signal: b = [1 0 1 0] • Representation of Carrier signal: x(t) = Asin2πft • Representation of modulated signal using for and if loop. • Representation of Demodulated signal. • Reconstruction of binary sequence.
  • 3.
    Model Graph BFSK: • Representationof message signal: b = [1 0 1 0] • Representation of Carrier signal: x(t) = Asin2πt y(t) = Asin2πt • Representation of modulated signal using for and if loop. • Representation of Demodulated signal. • Reconstruction of binary sequence.
  • 4.
    Model Graph BPSK: • Representationof message signal b = [1 0 1 0] • Representation of Carrier signal x(t)= Asin2πft y(t)= -Asin2πft • Representation of modulated signal using for and if loop. • Representation of Demodulated signal.
  • 5.
    • Reconstruction ofbinary sequence. Model Graph MATLAB Code BASK: clc; clear all; close all; a=1; f=7; n=[1 0 1 1 0 0 0]; t=0:0.01:length(n); t2=0:6; %Plot Message Signal subplot(4,1,1); stairs(t2,n); title('Message Signal'); xlabel('Time'); ylabel('Amplitude');
  • 6.
    y=a*sin(2*pi*f*t); %Plot Carrier Signal subplot(4,1,2); plot(t,y); title('CarrierSignal '); xlabel('Time'); ylabel('Amplitude'); %Modulation Process for i=1:7 for j=(i-1)*100:i*100 if(n(i)==1) s(j+1)=y(j+1); else s(j+1)=0; end end end %Plot ASK Signal subplot(4,1,3); plot(t,s); title('ASK Modulated Signal'); xlabel('Time'); ylabel('Amplitude'); %Demodulation Process for i=1:7 for j=(i-1)*100:i*100 if(s(j+1)==y(j+1)) x(j+1)=1; else x(j+1)=0; end end end %Plot Demodulated Signal subplot(4,1,4); plot(t,x); title('ASK Demodulated Signal');
  • 7.
    xlabel('Time'); ylabel('Amplitude'); Output Graph BFSK: clc; clear all; closeall; a=1; f1=1; f2=10; n=[1 0 1 1 0 1 1]; t=0:0.01:length(n); t2=0:6; %Plot Message Signal
  • 8.
    subplot(5,1,1); stairs(t2,n); title('Message Signal'); xlabel('Time'); ylabel('Amplitude'); c1=a*sin(2*pi*f1*t); c2=a*sin(2*pi*f2*t); %Plot CarrierSignal subplot(5,1,2); plot(t,c1); title('Carrier Signal 1'); xlabel('Time'); ylabel('Amplitude'); subplot(5,1,3); plot(t,c2); title('Carrier Signal 2'); xlabel('Time'); ylabel('Amplitude'); %Modulation Process for i=1:7 for j=(i-1)*100:i*100 if(n(i)==1) s(j+1)=c1(j+1); else s(j+1)=c2(j+1); end end end %Plot FSK Signal subplot(5,1,4); plot(t,s); title('FSK Modulated Signal'); xlabel('Time'); ylabel('Amplitude'); %Demodulation Process for i=1:7 for j=(i-1)*100:i*100
  • 9.
  • 10.
    BPSK: clc; clear all; close all; a=1; f=3; n=[10 1 1 0 1 1]; t=0:0.01:length(n); t2=0:6; %Plot Message Signal subplot(5,1,1); stairs(t2,n); title('Message Signal'); xlabel('Time'); ylabel('Amplitude'); c1=a*sin(2*pi*f*t); c2=-a*sin(2*pi*f*t); %Plot Carrier Signal subplot(5,1,2); plot(t,c1); title('Carrier Signal 1'); xlabel('Time'); ylabel('Amplitude'); subplot(5,1,3); plot(t,c2); title('Carrier Signal 2'); xlabel('Time'); ylabel('Amplitude'); %Modulation Process for i=1:7 for j=(i-1)*100:i*100 if(n(i)==1) s(j+1)=c1(j+1); else s(j+1)=c2(j+1); end end
  • 11.
    end %Plot FSK Signal subplot(5,1,4); plot(t,s); title('PSKModulated Signal'); xlabel('Time'); ylabel('Amplitude'); %Demodulation Process for i=1:7 for j=(i-1)*100:i*100 if(s(j+1)==c1(j+1)) x(j+1)=1; else x(j+1)=0; end end end %Plot Demodulated Signal subplot(5,1,5); plot(t,x); title('PSK Demodulated Signal'); xlabel('Time'); ylabel('Amplitude');
  • 12.
  • 13.
  • 14.
  • 15.
    Result and inference Themodulated and demodulated output waves for each of the coherent single bit modulation techniques is obtained i.e. BASK, BPSK and BFSK. From their respective output graphs we infer the following: → For BASK, as per the modulating signal the amplitude of the analog carrier changes. Phase and frequency continue to be constant. When there is high logic at any time intervals it can be said logic 1, the same amplitude to be transmitted to the output as in those intervals switch is being closed. Now when the logic is low i.e. logic 0, No output would be generated, → For BFSK, the frequency of the modulated output decreases for logic 0 and goes back to initial frequency for logic 1 → For BPSK, the phase changes by 180 degree for logic 0 and changes again (goes back to same phase) for logic 1.