Vous êtes sur la page 1sur 21

# All nAtions university college

## DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

DIGITAL COMMUNICATION LABORATORY OBSERVATION MANUAL BY LINUS ANTONIO OFORI AGYEKUM linusntn59@gmail.com

## All nAtions university college

P. O. Box kf-1908, koforidua, Ghana

## DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

LABORATORY OBSERVATION 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

Lab-in-charge

## INDEX NO: . End of Semester Examination held in the month of

NO

TITLE

EXPERIMENT DATE

SUBMISION DATE

MARK

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(2fmt). 3. Create a carrier signal, EcSin(2fct). 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 generation Ec=10; % carrier signal voltage Em=5; % message signal voltage fm=2; % message signal frequency fc=15; % carrier signal frequency ec=Ec*sin(2*pi*fc*t); %carrier Signal em=Em*sin(2*pi*fm*t); %Modulating Signal ecm=(Ec+em); am=ecm.*sin(2*pi*fc*t); % amplitude modulated signal

subplot(311);plot(t,ec);grid xlabel('time-->');ylabel('amplitude-->'); title('CARRIER SIGNAL'); subplot(312);plot(t,em);grid xlabel('time-->');ylabel('amplitude-->'); title('MESSAGE SIGNAL'); subplot(313);plot(t,am);grid xlabel('time-->');ylabel('amplitude-->'); title('MODULATION');

GRAPHICAL OUTPUT

CARRIER SIGNAL
amplitude-->

10 0 -10 0 0.2 0.4 0.6 1 1.2 1.4 time--> MESSAGE SIGNAL 0.8 1.6 1.8 2

amplitude-->

5 0 -5 0 0.2 0.4 0.6 0.8 1 1.2 time--> MODULATION 1.4 1.6 1.8 2

amplitude-->

20 0 -20 0 0.2 0.4 0.6 0.8 1 1.2 time--> 1.4 1.6 1.8 2

BaseBand Signal

## 1 Constant Add Product Scope

Carrier Signal

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(2fmt)]. 3. Create a carrier signal, [AcCos(2fct)]. 4. Create the modulated signal using the FM equation.

AcCos(2fct)+BSin(2fmt). 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 time Am=10; % message signal voltage Ac=5; % carrier signal voltage B=2; % modulation index fm=2; % message signal frequency fc=10; % carrier signal frequency fa=Am*sin(2*pi*fm*t); % message signal fb=Ac*cos(2*pi*fc*t); % carrier signal FM=Ac*cos(2*pi*fc*t+B*sin(2*pi*fm*t)); % modulated output signal subplot(3,1,1);plot(t,fa);grid xlabel('time-->'); ylabel('amplitude-->'); title('MESSAGE SIGNAL'); subplot(3,1,2);plot(t,fb);grid xlabel('time-->'); ylabel('amplitude-->'); title('CARRIER SIGNAL'); subplot(3,1,3);plot(t,FM);grid xlabel('time-->'); ylabel('amplitude-->'); title('MODULATED SIGNAL');

GRAPHICAL OUTPUT

MESSAGE SIGNAL
amplitude-->

10 0 -10 0 0.1 0.2 0.3 0.5 0.6 time--> CARRIER SIGNAL 0.4 0.7 0.8 0.9 1

amplitude-->

5 0 -5 0 0.1 0.2 0.3 0.5 0.6 0.7 time--> MODULATED SIGNAL 0.4 0.8 0.9 1

amplitude-->

5 0 -5 0 0.1 0.2 0.3 0.4 0.5 0.6 time--> 0.7 0.8 0.9 1

## FM Sine Wave FM Modulator Passband Scope

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(2ft)]. 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 message m_len=length(m); %initialize the length of m t=0:0.01:0.99; %initialize the time x=length(t); %initialize the length of t one=sin(2*pi*t); %carrier signal zero=zeros([1,x]); %generation of zeros to the length of t ask=0; subplot(3,1,1);plot(t,one);grid xlabel('time-->'); ylabel('amplitude-->'); title('CARRIER SIGNAL'); subplot(3,1,2);stem(m);grid xlabel('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]; end end subplot(3,1,3);plot(ask);grid xlabel('time-->'); ylabel('amplitude-->'); title('MODULATED SIGNAL');

GRAPHICAL OUTPUT

CARRIER SIGNAL
amplitude-->

1 0 -1 0 0.1 0.2 0.3 0.5 0.6 time--> MESSAGE SIGNAL 0.4 0.7 0.8 0.9 1

amplitude-->

1 0.5 0 1 2 3 4 5 6 7 8

## time--> MODULATED SIGNAL

amplitude-->

1 0 -1 0 100 200 300 400 500 time--> 600 700 800 900

## Bernoulli Binary Bernoulli Binary Generator Scope Switch

Sine Wave

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(2ft)] and [Sin(4ft)]. 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 signal m_len=length(m); % initialize the length of m t=0:0.01:0.99; % initialize time x=length(t); % initialize the length of t f1=sin(4*pi*t); % carrier signal1 f2=sin(2*pi*t); % carrier signal2 fsk=0; for i=1:m_len if(m(i)==0) %start the modulation fsk=[fsk,f1]; elseif(m(i)==1) fsk=[fsk,f2]; end end 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 fsk xlabel('time-->'); ylabel('amplitude-->'); title('MODULATED SIGNAL');

GRAPHICAL OUTPUT

MESSAGE SIGNAL
amplitude-->

## 1 0.5 0 0 5 10 15 20 time--> CARRIER SIGNAL 25 30

amplitude-->

1 0 -1 0 0.1 0.2 0.3 0.5 0.6 0.7 time--> MODULATED SIGNAL 0.4 0.8 0.9 1

amplitude-->

## 1 0 -1 0 500 1000 1500 time--> 2000 2500 3000

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(2ft)] and [Sin(4ft)+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 signal m_len=length(m); %initialize the length of m t=0:0.01:0.99; %initialize time x=length(t); %initialize length of t one=sin(2*pi*t); %carrier signal 1 zero=sin((2*pi*t)+pi); %carrier sinal 2 psk=0; for i=1:m_len if(m(i)==1) %start modulation

psk=[psk,one]; elseif(m(i)==0) psk=[psk,zero]; end end subplot(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 psk xlabel('time-->'); ylabel('amplitude-->'); title('MODULATED SIGNAL');

GRAPHICAL OUTPUT

CARRIER SIGNAL
amplitude-->

1 0 -1 0 0.1 0.2 0.3 0.5 0.6 time--> MESSAGE SIGNAL 0.4 0.7 0.8 0.9 1

amplitude-->

1 0.5 0 1 2 3 4 5 6 7 8

## time--> MODULATED SIGNAL

amplitude-->

1 0 -1 0 100 200 300 400 500 time--> 600 700 800 900

Figure 5: Phase Shift Keying RESULTS Phase Shift Keying was successfully simulated using matlab.