MODUL VI
PENGOLAHAN SEDERHANA PADA SINYAL
I. Tujuan Praktikum:
Praktikum diharapkan agar mahasiwa dapat:
1. Memahami konsep pengolahan pada sinyal kontinu dan sinyal diskrit
diskrit.
2. Memahami proses aritmatika pada sinyal kontinu dan sinyal diskrit
diskrit.
Data 1
Aritmatika Sinyal Diskrit
clear all;clc;clf
;clc;clf
x1 = [1 0 3 -2
2 2 3 1];
x2 = [2 3 0 1 -1
1 2 2];
n = 0:(length(x1)-1);
0:(length(x1)
y1 = x1+x2;
y2 = x1-x2;
figure(1)
subplot(221); stem(n,x1);
subplot(222); stem(n,x2);
subplot(223); stem(n,y1);
subplot(224); stem(n,y2);
x3 = fliplr(x1);
n1 = -(length(x3)
(length(x3)-1):0;
figure(2)
subplot(211), stem(n,x1)
subplot(212), stem(n1,x3)
figure(3)
subplot(311); stem(n,x1);axis([-2
stem(n,x1);axis([ 8 -2 3])
subplot(312); stem(n-2,x1);axis([-2
stem(n 8 -2 3])
subplot(313); stem(n+2,x1);axis([-2
stem(n+2,x1);axis([ 8 -2 3])
x = [2 1 2 3 2 5 2 3 2 1 2];
y = [];
for i = 1:length(x)/2;
y = [y x(2*i)];
end
z = [];
for i=1:length(x);
z = [z x(i) x(i) ];
end
figure(4)
subplot(311); stem(0:length(x)-1,x)
stem(0:length(x)
axis([0 21 0 5])
subplot(312); stem(0:length(y)-1,y)
stem(0:length(y)
axis([0 21 0 5])
KEMENTERIAN PENDIDIKAN NASIONAL
POLITEKNIK NEGERI PADANG
JURUSAN TEKNIK ELEKTRO
MODUL AJAR
PRAKTIKUM SINYAL DAN SISTEM
subplot(313); stem(0:length(z)-1,z)
stem(0:length(z)
axis([0 21 0 5])
Jelaskan proses pengolahan sinyal yang terjadi untuk masing-masing
masing subplot
pada setiap figure!
Data 2
Aritmatika Sinyal Kontinu
t =0:0.0001:1;
s1 = 2*sin(10*pi*t);
s2 = 0.5*sin(15*pi*t);
y1 = s1+s2;
y2 = s1-s2;
figure(1)
subplot(221); plot(t,s1);
subplot(222); plot(t,s2);
subplot(223); plot(t,y1);
subplot(224); plot(t,y2);
figure(2)
subplot(311); plot(t,s1);axis([-2
plot(t,s1);axis([ 3 -2 2]);
subplot(312); plot(t+2,s1);axis([-2
plot(t+2,s1);axis([ 3 -2 2]);
subplot(313); plot(t-2,s1);axis([-2
plot(t 3 -2 2]);
Jelaskan proses pengolahan sinyal yang terjadi untuk masing-masing
masing subplot
pada setiap figure!
Data 3
Pengolahan Sederhana Pada Sinyal Suara
a1 = audioread('S1.wav'
'S1.wav');
a2 = audioread('S2.wav'
'S2.wav');
a_plus = a1+a2;
a_minus = a1-a2;
a2;
figure(1)
subplot(221); plot(a1(1:200));
subplot(222); plot(a2(1:200));
subplot(223); plot(a_plus(1:200));
subplot(224); plot(a_minus(1:200));
noise = 0.1.*randn(size(a2));
a2_noise = a2+noise;
figure(2)
subplot(311);plot(a2(1:100));
subplot(312);plot(noise(1:100));
subplot(313);plot(a2_noise(1:100));
);plot(a2_noise(1:100));
%perkalian dengan konstanta
aa = 0.2*a2;
KEMENTERIAN PENDIDIKAN NASIONAL
POLITEKNIK NEGERI PADANG
JURUSAN TEKNIK ELEKTRO
MODUL AJAR
PRAKTIKUM SINYAL DAN SISTEM
ab = 0.5*a2;
ac = 2*a2;
ad = 5*a2;
ae = 10*a2;
figure(3)
subplot(321);plot(a(1:200));
subplot(322);plot(aa(1:200));
subplot(323);plot(ab(1:200));
subplot(324);plot(ac(1:200));
subplot(325);plot(ad(1:200));
subplot(326);plot(ae(1:200));
[A,Fs] = audioread('S2.wav');
audioread(
t1 = 0:1/Fs:(length(A)-1)/Fs;
0:1/Fs:(length(A)
t2 = 0:1/(0.5*Fs):(length(A)-1)/(0.5*Fs);
0:1/(0.5*Fs):(length(A)
t3 = 0:1/(2*Fs):(length(A)-1)/(2*Fs);
0:1/(2*Fs):(length(A)
figure(4)
subplot(311);plot(t1,A);axis([0 20 -1 1]);
subplot(312);plot(t2,A);axis([0 20 -1 1]);
subplot(313);plot(t3,A);axis([0 20 -1 1]);
Data 4
Pengolahan Sederhana
rhana Pada Sinyal Gambar
A = imread('cameraman.tif'
'cameraman.tif');
B = imread('rice.png'
'rice.png');
C = A+B;
D = A-B;
A = uint8(A);
B = uint8(B);
C = uint8(C);
D = uint8(D);
figure(1)
subplot(2,2,1),imshow(A)
subplot(2,2,2),imshow(B)
subplot(2,2,3),imshow(C)
KEMENTERIAN PENDIDIKAN NASIONAL
POLITEKNIK NEGERI PADANG
JURUSAN TEKNIK ELEKTRO
MODUL AJAR
PRAKTIKUM SINYAL DAN SISTEM
subplot(2,2,4),imshow(D)
E = fliplr(A);
F = flipud(A);
figure(2)
subplot(131),imshow(A)
subplot(132),imshow(E)
subplot(133),imshow(F)
Berikan penjelasannya untuk setiap subplot pada setiap figure dan setiap variable
matrik yang terbentuk.
Data 5
Pembesaran dan Pengecilan Pada Sinyal Gambar
TUGAS PENDAHULUAN.
PENDAHULUAN
1. Diketahui sinyal diskrit :
x(n) = {1, 2, 3, 4, 5,, 0, -1, -2, -3, -4,- 5}
Tentukan dan gambarkan grafik untuk :
a.
b.
c. 2
d. 2
e. /2
2
f.
g. 2
2
h. 2
2
i. 2
j. 2