Anda di halaman 1dari 7

TUGAS ANALISIS DATA GEOFISIKA 1

SUPERPOSISI GELOMBANG DAN TIME SAMPLING


DENGAN MENGGUNAKAN MATLAB

Oleh :
I Nyoman Krisna Adi Saputra
1106050866

FAKULTAS MATEMATIKA DAN ILMU PENGETAHUAN ALAM


UNIVERSITAS INDONESIA
2014

A. Superposisi dari Dua Buah Gelombang


I.

Script Matlab

clc
clear
close
%======================Superposisi Dua Gelombang=========================%
recl=1; %record lenght
int = 0.001; %interval
tt = 0:int:recl; % t_awal = 0; t_akhir = record lenght; interval =
A=1;
fss1 = 30; % frekuensi gelombang 1
theta1 = 0; % sudut fase gelombang 1

fss2 = 50; % frekuensi gelombang 2


theta2 = pi/4; % sudut fase gelombang 2
y1 = A*sin(2*pi*fss1*tt + theta1); % persamaan gelombang 1
y2 = A*sin(2*pi*fss2*tt + theta2); % persamaan gelombang 2
y3 = y1 + y2; % superposisi gelombang
figure
subplot(3,1,1)
plot(tt,y1) % menggambar grafik persamaan gelombang 1
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Gelombang berfrekuensi 30 Hz');
subplot(3,1,2)
plot(tt,y2) % menggambar grafik persamaan gelombang 2
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Gelombang berfrekuensi 50 Hz, fase pi/4');
subplot(3,1,3)
plot(tt,y3) % menggambar grafik superposisi gelombang
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Superposisi gelombang 30 Hz dan 50 Hz');

II.

Hasil Superposisi

B. Sampling
I.

Script Matlab

%=============================Sampling===================================%
Ts = 0.002; % periode sampling
t = 0:Ts:recl; % waktu sampling
yy1 = A*sin(2*pi*fss1*t + theta1); % persamaan gelombang 1
yy2 = A*sin(2*pi*fss2*t + theta2); % persamaan gelombang 2
x = yy1 + yy2; % superposisi gelombang
subplot(4,1,1)
plot(tt,y3) % menggambar grafik superposisi gelombang
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Superposisi gelombang 30 Hz dan 50 Hz');
subplot(4,1,2)
stem(t,x,'or','LineWidth',2), grid on % plot nomor sampling vs waktu
xlabel('Data sampling dalam waktu, (detik)');
ylabel('Amplitudo');
subplot(4,1,3)
stem(x,'or','LineWidth',2), grid on % plot nomor sampling
axis([1 length(t) -A A])
xlabel('Nomor sampling');
ylabel('Amplitudo');
subplot(4,1,4)
plot(t,x,'LineWidth',2), grid on % plot gelombang & panjang rekaman
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Hasil rekonstruksi dengan sampling 2ms');

II.

Hasil Sampling

C. Perbandingan Waktu Samping


I.

Script Matlab

%==========================Perbandingan Sampling=========================%
Ts1 = 0.002; % periode sampling
t1 = 0:Ts1:recl; % waktu sampling
yy11 = A*sin(2*pi*fss1*t1 + theta1); % persamaan gelombang 1 sampling 2ms
yy21 = A*sin(2*pi*fss2*t1 + theta2); % persamaan gelombang 2 sampling 2ms
x1 = yy11 + yy21; % superposisi gelombang sampling 2ms
Ts2 = 0.004; % periode sampling
t2 = 0:Ts2:recl; % waktu sampling
yy12 = A*sin(2*pi*fss1*t2 + theta1); % persamaan gelombang 1 sampling 4ms
yy22 = A*sin(2*pi*fss2*t2 + theta2); % persamaan gelombang 2 sampling 4ms
x2 = yy12 + yy22; % superposisi gelombang sampling 4ms

subplot(3,1,1)
plot(tt,y3) % menggambar grafik superposisi gelombang
xlabel('Waktu, t (detik)');
ylabel('Amplitudo');
title('\fontsize{14} Superposisi gelombang 30 Hz dan 50 Hz');
subplot(3,1,2)
plot(t1,x1,'LineWidth',2), grid on % plot rekonstruksi sampling 2ms
xlabel('Waktu, t(detik)');
ylabel('Amplitudo');
title('\fontsize{14} Hasil rekonstruksi dengan sampling 2ms');
subplot(3,1,3)
plot(t2,x2,'LineWidth',2), grid on % plot rekonstruksi sampling 4ms
xlabel('Waktu, t(detik)');
ylabel('Amplitudo');
title('\fontsize{14} Hasil rekonstruksi dengan sampling 4ms');

II.

Hasil Perbandingan

Anda mungkin juga menyukai