Upload
linus-antonio
View
760
Download
10
Tags:
Embed Size (px)
Citation preview
All nations’ university collegeP. O. Box kf-1908, koforidua, Ghana
DEPARTMENT
OF
ELECTRONICS AND COMMUNICATION ENGINEERING
DIGITAL COMMUNICATION LABORATORY OBSERVATION
MANUAL
BY
LINUS ANTONIO OFORI AGYEKUM
All nations’ university college
P. O. Box kf-1908, koforidua, Ghana
DEPARTMENT
OF
ELECTRONICS AND COMMUNICATION ENGINEERING
Certified that this is the bonafide record of the work done by
Mr./Miss..…………………………………………………………………………………………….of the
…………….…………………………..level/semester in ELECTRONICS AND COMMUNICATION
ENGINEERING of this college, in the ..………………………………….. Laboratory during the year
…………………….………………,in partial fulfillment of the requirements of the B.E Degree of the
All Nations University College, Koforidua.
Lab-in-charge Head of Department
INDEX NO: …………………………….
End of Semester Examination held in the month of …………………………
NO TITLEEXPERIMENT
DATESUBMISION
DATEMARK
LABORATORY OBSERVATION
Experiment One
Amplitude Mudualation
AIM
To perform Amplitude Modulation using Matlab programming and Simulink.
APPARATUS/SOFTWARE
Matlab
ALGORITHM
1. Create the vector “t”- time that varies from zero to two or three cycles with intervals 1/1000.
2. Create a message signal with single sine amplitude EmSin(2πfmt).3. Create a carrier signal, EcSin(2πfct).4. Create the modulated signal using the AM equation.5. Simulate for input and output graphs.
PROGRAM
clc;clear all;close all;t=0:0.001:2; % time generationEc=10; % carrier signal voltageEm=5; % message signal voltagefm=2; % message signal frequencyfc=15; % carrier signal frequencyec=Ec*sin(2*pi*fc*t); %carrier Signalem=Em*sin(2*pi*fm*t); %Modulating Signalecm=(Ec+em);am=ecm.*sin(2*pi*fc*t); % amplitude modulated signalsubplot(311);plot(t,ec);gridxlabel('time-->');ylabel('amplitude-->');title('CARRIER SIGNAL');subplot(312);plot(t,em);gridxlabel('time-->');ylabel('amplitude-->');title('MESSAGE SIGNAL');subplot(313);plot(t,am);gridxlabel('time-->');ylabel('amplitude-->');title('MODULATION');
GRAPHICAL OUTPUT
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-10
0
10
time-->
ampli
tude--
>CARRIER SIGNAL
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-5
0
5
time-->
ampli
tude--
>
MESSAGE SIGNAL
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2-20
0
20
time-->
ampli
tude--
>
MODULATION
Figure 1: Amplitude Modulation
SIMULINK BLOCK OF AMPLITUDE MODULATION
Scope
Product
1
Constant
Carrier Signal
BaseBand Signal
Add
GRAPHICAL OUTPUT
RESULTS
Amplitude Modulation was successfully simulated using matlab and simulink.
Experiment Two
Frequency Modulation
AIM
To perform Frequency Modulation using Matlab programming and Simulink.
APPARATUS/SOFTWARE
Matlab
ALGORITHM
1. Create the vector “t”- time that varies from zero to two or three cycles with intervals 1/1000.
2. Create a message signal with single sine frequency. All the frequency used in the message should be less that the carrier frequency likewise amplitude of message signal should be less than carrier amplitude. [AmSin(2πfmt)].
3. Create a carrier signal, [AcCos(2πfct)].4. Create the modulated signal using the FM equation. AcCos(2πfct)
+BSin(2πfmt). B stands for modulation index. Chose value more than 1.
5. Simulate for input and output graphs.
PROGRAM
clc;clear all;close all;t=0:0.001:1; % creation of timeAm=10; % message signal voltageAc=5; % carrier signal voltage B=2; % modulation indexfm=2; % message signal frequencyfc=10; % carrier signal frequencyfa=Am*sin(2*pi*fm*t); % message signalfb=Ac*cos(2*pi*fc*t); % carrier signalFM=Ac*cos(2*pi*fc*t+B*sin(2*pi*fm*t)); % modulated output signalsubplot(3,1,1);plot(t,fa);gridxlabel('time-->');ylabel('amplitude-->');title('MESSAGE SIGNAL');
subplot(3,1,2);plot(t,fb);gridxlabel('time-->');ylabel('amplitude-->');title('CARRIER SIGNAL');subplot(3,1,3);plot(t,FM);gridxlabel('time-->');ylabel('amplitude-->');title('MODULATED SIGNAL');
GRAPHICAL OUTPUT
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-10
0
10
time-->
ampli
tude
-->MESSAGE SIGNAL
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-5
0
5
time-->
ampli
tude
-->
CARRIER SIGNAL
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-5
0
5
time-->
ampli
tude
-->
MODULATED SIGNAL
Figure 2: Frequency Modulation
SIMULINK BLOCK OF FREQUENCY MODULATION
Sine Wave Scope
FM
FMModulatorPassband
GRAPHICAL OUTPUT
RESULTS
Frequency Modulation was successfully simulated using matlab and simulink.
Experiment Three
Amplitude Shift Keying
AIM
To perform Amplitude Shift Keying using Matlab programming and Simulink.
APPARATUS/SOFTWARE
Matlab
ALGORITHM
1. Create the vector “t”- time that varies from zero to two or three cycles with intervals 1/100.
2. Create a message signal using bit streams of 0s and 1s.3. Create a carrier signal, [Sin(2πft)].4. Create the modulated signal using the matlab programming involving
for, if, else and elseif statements.5. Simulate for input and output graphs.
PROGRAM
clc;clear all;close all;m=[1 0 1 0 1 0 1 0]; %initialize the messagem_len=length(m); %initialize the length of mt=0:0.01:0.99; %initialize the timex=length(t); %initialize the length of tone=sin(2*pi*t); %carrier signalzero=zeros([1,x]); %generation of zeros to the length of task=0;subplot(3,1,1);plot(t,one);grid xlabel('time-->');ylabel('amplitude-->');title('CARRIER SIGNAL');subplot(3,1,2);stem(m);gridxlabel('time-->');ylabel('amplitude-->');title('MESSAGE SIGNAL');for i=1:1:m_len if(m(i)==1) %modulating signal ask=[ask one]; elseif(m(i)==0)
ask=[ask zero]; endendsubplot(3,1,3);plot(ask);gridxlabel('time-->');ylabel('amplitude-->');title('MODULATED SIGNAL');
GRAPHICAL OUTPUT
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1
0
1
time-->
ampli
tude
-->
CARRIER SIGNAL
1 2 3 4 5 6 7 80
0.5
1
time-->
ampli
tude
-->
MESSAGE SIGNAL
0 100 200 300 400 500 600 700 800 900-1
0
1
time-->
ampli
tude
-->
MODULATED SIGNAL
Figure 3: Amplitude Shift Keying
SIMULINK BLOCK OF AMPLITUDE SHIFT KEYING
Switch
Sine Wave
Scope
BernoulliBinary
Bernoulli BinaryGenerator
GRAPHICAL OUTPUT
RESULTS
Amplitude Shift Keying was successfully simulated using matlab and simulink.
Experiment Four
Frequency Shift Keying
AIM
To perform Frequency Shift Keying using Matlab programming.
APPARATUS/SOFTWARE
Matlab
ALGORITHM
1. Create the vector “t”- time that varies from zero to two or three cycles with intervals 1/100.
2. Create a message signal using bit streams of 0s and 1s.3. Create a carrier signals, [Sin(2πft)] and [Sin(4πft)].4. Create the modulated signal using the matlab programming involving
for, if, else and elseif statements.5. Simulate for input and output graphs.
PROGRAM
clear all;close all;m=[1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0]; % initialize the message signalm_len=length(m); % initialize the length of mt=0:0.01:0.99; % initialize timex=length(t); % initialize the length of tf1=sin(4*pi*t); % carrier signal1f2=sin(2*pi*t); % carrier signal2fsk=0;for i=1:m_len if(m(i)==0) %start the modulation fsk=[fsk,f1]; elseif(m(i)==1) fsk=[fsk,f2]; endend
subplot(3,1,1);stem(m);xlabel('time-->');ylabel('amplitude-->');title('MESSAGE SIGNAL');subplot(3,1,2);plot(t,f1,t,f2);xlabel('time-->');ylabel('amplitude-->');title('CARRIER SIGNAL');subplot(3,1,3);plot(fsk); % plot the fskxlabel('time-->');ylabel('amplitude-->');title('MODULATED SIGNAL');
GRAPHICAL OUTPUT
0 5 10 15 20 25 300
0.5
1
time-->
ampl
itude
-->
MESSAGE SIGNAL
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1
0
1
time-->
ampl
itude
-->
CARRIER SIGNAL
0 500 1000 1500 2000 2500 3000-1
0
1
time-->
ampl
itude
-->
MODULATED SIGNAL
Figure 4: Frequency Shift Keying
RESULTS
Frequency Shift Keying was successfully simulated using matlab.
Experiment Five
Phase Shift Keying
AIM
To perform Phase Shift Keying using Matlab programming.
APPARATUS/SOFTWARE
Matlab
ALGORITHM
1. Create the vector “t”- time that varies from zero to two or three cycles with intervals 1/100.
2. Create a message signal using bit streams of 0s and 1s.3. Create a carrier signals, [Sin(2πft)] and [Sin(4πft)+pi].4. Create the modulated signal using the matlab programming involving
for, if, else and elseif statements.5. Simulate for input and output graphs.
PROGRAM
clc;clc;clear all;close all;m=[1 0 1 1 0 1 0 1]; %initialize message signalm_len=length(m); %initialize the length of mt=0:0.01:0.99; %initialize timex=length(t); %initialize length of tone=sin(2*pi*t); %carrier signal 1zero=sin((2*pi*t)+pi); %carrier sinal 2psk=0;for i=1:m_len if(m(i)==1) %start modulation psk=[psk,one]; elseif(m(i)==0)
psk=[psk,zero]; endendsubplot(3,1,1);plot(t,one,t,zero);xlabel('time-->');ylabel('amplitude-->');title('CARRIER SIGNAL');subplot(3,1,2);stem(m);xlabel('time-->');ylabel('amplitude-->');title('MESSAGE SIGNAL');subplot(3,1,3);plot(psk); %plot the pskxlabel('time-->');ylabel('amplitude-->');title('MODULATED SIGNAL');
GRAPHICAL OUTPUT
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1-1
0
1
time-->
ampl
itude
-->
CARRIER SIGNAL
1 2 3 4 5 6 7 80
0.5
1
time-->
ampl
itude
-->
MESSAGE SIGNAL
0 100 200 300 400 500 600 700 800 900-1
0
1
time-->
ampl
itude
-->
MODULATED SIGNAL
Figure 5: Phase Shift Keying
RESULTS
Phase Shift Keying was successfully simulated using matlab.