Bab 02 Simulasi AM

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Bab 02 Simulasi Modulasi AM

Dasar Telekomunikasi, TE-1A/1B/1D/1E

1. Simulasi Sinyal Modulasi AM :


a. Jalankan Kode Simulasi Modulasi AM terlampir menggunakan aplikasi Matlab atau Octave
b. Capture hasil plot program tersebut
c. Modifikasi program dengan mengubah nilai modulation index m
d. Capture hasil simulasi anda
e. Modifikasi mengubah nilai frekuensi sinyal carrier dan frekuensi sinyal informasi

2. Hasil gambar dimuat dalam file pdf dan diupload ke elnino sesuai skedul

Pengampu

Amin Suharjono
Program Matlab/Octave simulasi Modulator AM
%>>>>>>>>>>>>>>>>>>>> Tutorial on AM Modulation <<<<<<<<<<<<<<<<<<<<<<<<<<
clc;
close all;
clear all;

%XXXXXXXXXXXXXXXXXXXXXXXXXXX Define AM modulation Index XXXXXXXXXXXXXXXXXXX


disp(' example: m=1 means 100% modulation');
%m=input(' Enter the value of modulation index (m) = ');
m=1; % for 100% modulation
if (0>m||m>1)
error('m may be less than or equal to one and geter than to zero');
end

%XXXXXXXXXXXXXXXXX modulating signal generation XXXXXXXXXXXXXXXXXXXXXXXXXX


Am=5; % Amplitude of modulating signal
fa=2000; % Frequency of modulating signal
Ta=1/fa; % Time period of modulating signal
t=0:Ta/999:6*Ta; % Total time for simulation
ym=Am*sin(2*pi*fa*t); % Eqation of modulating signal
figure(1)
subplot(3,1,1);
plot(t,ym), grid on;% Graphical representation of Modulating signal
title ( ' Modulating Signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');

%XXXXXXXXXXXXXXXXXXXXX carrier signal generation XXXXXXXXXXXXXXXXXXXXXXXXXX


Ac=Am/m;% Amplitude of carrier signal [ where, modulation Index (m)=Am/Ac ]
fc=fa*10;% Frequency of carrier signal
Tc=1/fc;% Time period of carrier signal
yc=Ac*sin(2*pi*fc*t);% Eqation of carrier signal
subplot(3,1,2);
plot(t,yc), grid on;% Graphical representation of carrier signal
title ( ' Carrier Signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');

%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX AM Modulation XXXXXXXXXXXXXXXXXXXXXXXXXXXXX


y=Ac*(1+m*sin(2*pi*fa*t)).*sin(2*pi*fc*t); % Equation of Amplitude
%modulated signal
subplot(3,1,3);
plot(t,y);% Graphical representation of AM signal
title ( ' Amplitude Modulated signal ');
xlabel ( ' time(sec) ');
ylabel (' Amplitud(volt) ');
grid on;

%>>>>>>>>>>>>>>>>>>>>>> end of program <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

You might also like