Anda di halaman 1dari 6

Nama : Muhammad Firdaus

NIM : G1B018040

Tugas 2

1. Menetukan system linier dan nonlinier


Jawab:

t = 0:0.001:2; % 2 secs @ 1kHz sample rate


ylin = chirp(t,0,1,150); % Start @ DC, cross 150Hz at t=1sec
t = -2:0.001:2; % +/-2 secs @ 1kHz sample rate
yq = chirp(t,100,1,200,'q'); % Start @ 100Hz, cross 200Hz at t=1sec
figure
subplot(2,1,1)
spectrogram(ylin,256,250,256,1E3,'yaxis')
title('sistem linear')

subplot(2,1,2)
spectrogram(yq,128,120,128,1E3,'yaxis')
title('sistem nonlinear kuadrat')

Hasil Gambar :
2. Korelasi dan konvolusi
Jawab :

t = 0:1/100:10-1/100; % Time vector


x = sin(2*pi*15*t) + sin(2*pi*40*t); % Signal
n = 512;
y = fft(x,n);
m = abs(y);
p = unwrap(angle(y));
f = (0:length(y)-1)*100/length(y);

subplot(2,1,1)
plot(f,m)
title('Jarak')
ax = gca;
ax.XTick = [15 40 60 85];

subplot(2,1,2)
plot(f,p*180/pi)
title('Fase')
ax = gca;
ax.XTick = [15 40 60 85];
hasil gambar :

3. DTFT
Jawab :

% Menentukan grafik DTFT


pembilang = input('Pembilang X(jw) = ');
penyebut = input ('Penyebut X ( jw) = ');
w = -10 : 0.1 : 10;
H = freqz (pembilang, penyebut, w);
subplot (2,1,1)
plot (w, abs (H) )
xlabel ( 'omega' )
subplot (2,1,2)
plot (w, angle (H) )
xlabel ('omeqa' )

Hasil Gambar :
4. Menentukan posisi zero dan pole dari fungsi Z
Jawab :

pembilang = [2 16 44 56 32];
penyebut = [3 3 -15 18 -12];
[z,p,k] = tf2zp (pembilang, penyebut);
zplane (z,p)
zplane (pembi1ang, penyebut)
penyebut = [3 3 -15 18 -12];
[z,p,k] = tf2zp (pembilang,penyebut);
disp('Zero pada posisi = ');disp(z)
disp('Pole pada posisi =');disp(p)
disp ('Konstanta gain adalah = ');disp (k)
%Menggambar zero dan pole pada bidang z
zplane (z,p)
xlabel ('real')
ylabel ('imajiner')

Hasil Gambar:
5. Desain filter FIR maupun IIR
fs = 1e4;
t = 0:1/fs:1;

x = 2.5 + cos(2*pi*203*t) + sin(2*pi*721*t) + cos(2*pi*1001*t);

y = hilbert(x);

plot(t,real(y),t,imag(y))
xlim([0.01 0.03])
legend('real','imajiner')
title('fungsi Hilbert')
hasil gambar :

Anda mungkin juga menyukai