0% found this document useful (0 votes)
27 views11 pages

Laporan IIR

This document describes experiments using different types of IIR digital filters on a signal, including Butterworth, Chebyshev Type II, and elliptic filters. It shows the original signal, filtered signal, and frequency spectrum for each filter type. The Butterworth filter used is 8th order, the Chebyshev is 6th order, and the elliptic is 5th order. The conclusion is that the order decreases with each filter method, but the coefficient values remain the same, and the order and coefficient values must match between the filter settings and the program listing to get the correct output signal.

Uploaded by

Maria Tokan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

Laporan IIR

This document describes experiments using different types of IIR digital filters on a signal, including Butterworth, Chebyshev Type II, and elliptic filters. It shows the original signal, filtered signal, and frequency spectrum for each filter type. The Butterworth filter used is 8th order, the Chebyshev is 6th order, and the elliptic is 5th order. The conclusion is that the order decreases with each filter method, but the coefficient values remain the same, and the order and coefficient values must match between the filter settings and the program listing to get the correct output signal.

Uploaded by

Maria Tokan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Nama : Maria H.S.

Hala Tokan
NIM : P27838123097
Kelas : AJ7
Matkul : Komunikasi Digital
 PERCOBAAN 5 DIGITAL FILTER IIR
1. Orde 8

Gambar 1 Settingan pada fdatool Butterworth

Gambar 2 sinyal original dengan filter IIR Butterworth


Gambar 3 Filter sinyal dengan Butterworth

Gambar 4 Frekuensi sinyal dengan Butterworth

 Listing Program

%---------------- Signal Generator ------------------------------------

Fsampling = 4000; % Sampling frequency

T = 1/Fsampling; % Sampling period

L = 1500; % Length of signal

t = (0:L-1)*T; % Time vector

x = 12*sin(2*pi*20*t)+8*sin(2*pi*100*t)+4*sin(2*pi*1000*t); % First row wave

figure;

plot(t,x);

title ('Original Signal');


%-----------------IIR Digital Filter (Fcutoff HPF 500 Hz)-------------

% Numerator

b0= 0.0028724756513808097; b1=-0.022979805211046478 ;

b2= 0.080429318238662673 ;

b3=-0.16085863647732535 ;

b4= 0.20107329559665671 ; b5=-0.16085863647732535 ; b6= 0.080429318238662673


;

b7=-0.022979805211046478 ; b8= 0.0028724756513808097 ;

% Denumerator

a1=1.3501361364487803 ; a2=1.7975905688855653 ;

a3=1.2177510636641604 ; a4=0.69341884928031972 ;

a5=0.24161277228930172 ; a6=0.062150179283697871 ;

a7=0.0089336956190665673 ; a8=0.00062783732521360053;

x7=0;x6=0;x5=0;x4=0;x3=0;x2=0;x1=0;x0=0;

y7=0;y6=0;y5=0;y4=0;y3=0;y2=0;y1=0;y=0;

for i=1:L

y8=y7;

y7=y6;

y6=y5;

y5=y4;

y4=y3;

y3=y2;

y2=y1;

y1=y;

x8=x7;

x7=x6;

x6=x5;
x5=x4;

x4=x3;

x3=x2;

x2=x1;

x1=x0;

x0=x(i);

y=b0*x0 + b1*x1 + b2*x2 + b3*x3 + b4*x4 + b5*x5 + b6*x6 + b7*x7 + b8*x8...

-a1*y1 - a2*y2 - a3*y3 - a4*y4 - a5*y5 - a6*y6 - a7*y7 - a8*y8;

yfilter(i)=y;

end

y = yfilter';

figure;

plot(t,y);

title ('Filtered Signal');

%-----------------Fast Fourier Transform (FFT) -------------------------

n = 2^nextpow2(L);

Yfft = fft(y,n);

P2 = abs(Yfft/L);

P1 = P2(1:n/2+1);

P1(1:end-1) = 2*P1(1:end-1);

figure;

plot(0:(Fsampling/n):(Fsampling/2-Fsampling/n),P1(1:n/2));

title ('Frequency of the signal');


2. Orde 6

Gambar 5 Setting FDATOOL Chebychef Type II

Gambar 6 Original sinyal dengan filter IIR Chebychef Type II

Gambar 7 sinyal filter dengan Chebychef Type II


Gambar 8 Frekuensi sinyal dengan Chebychef Type II

 Listing Program
%---------------- Signal Generator ------------------------------------
Fsampling = 4000; % Sampling frequency
T = 1/Fsampling; % Sampling period
L = 1500; % Length of signal
t = (0:L-1)*T; % Time vector
x = 12*sin(2*pi*20*t)+8*sin(2*pi*100*t)+4*sin(2*pi*1000*t); % First row wave
figure;
plot(t,x);
title ('Original Signal');
%-----------------IIR Digital Filter (Fcutoff HPF 500 Hz)-------------
% Numerator
b0= 0.030771479272431172; b1=-0.15652080036646746 ;
b2= 0.35572158002260579 ;
b3= -0.45970055199521503 ;
b4= 0.35572158002260579 ; b5=-0.15652080036646746 ; b6=
0.030771479272431172 ;
% Denumerator
a1=0.30884033103534397 ; a2= 0.85222412042395601 ;
a3=0.13106150365169317 ; a4= 0.13806933200256852 ;
a5= 0.0070633392736270759 ; a6= 0.0023999928523632964 ;

%
x6=0;x5=0;x4=0;x3=0;x2=0;x1=0;x0=0;
y6=0;y5=0;y4=0;y3=0;y2=0;y1=0;y=0;
for i=1:L

y6=y5;
y5=y4;
y4=y3;
y3=y2;
y2=y1;
y1=y;
%

x6=x5;
x5=x4;
x4=x3;
x3=x2;
x2=x1;
x1=x0;
x0=x(i);
y=b0*x0 + b1*x1 + b2*x2 + b3*x3 + b4*x4 + b5*x5 + b6*x6 ...
-a1*y1 - a2*y2 - a3*y3 - a4*y4 - a5*y5 - a6*y6 - a7*y7 ;
yfilter(i)=y;
end
y = yfilter';
figure;
plot(t,y);
title ('Filtered Signal');
%-----------------Fast Fourier Transform (FFT) -------------------------
n = 2^nextpow2(L);
Yfft = fft(y,n);
P2 = abs(Yfft/L);
P1 = P2(1:n/2+1);
P1(1:end-1) = 2*P1(1:end-1);
figure;
plot(0:(Fsampling/n):(Fsampling/2-Fsampling/n),P1(1:n/2));
title ('Frequency of the signal');
3. Orde 5

Gambar 9 Setting FDATOOL Eliptic

Gambar 10 Original sinyal dengan filter IIR Eliptic

Gambar 11 sinyal filter dengan Eliptic


Gambar 12 Frekuensi sinyal dengan Eliptic

 Listing Program

%---------------- Signal Generator ------------------------------------

Fsampling = 4000; % Sampling frequency

T = 1/Fsampling; % Sampling period

L = 1500; % Length of signal

t = (0:L-1)*T; % Time vector

x = 12*sin(2*pi*20*t)+8*sin(2*pi*100*t)+4*sin(2*pi*1000*t); % First row wave

figure;

plot(t,x);

title ('Original Signal');

%-----------------IIR Digital Filter (Fcutoff HPF 500 Hz)-------------

% Numerator

b0= 0.0074909098845689359; b1=-0.024939666312861833 ;

b2= 0.041954064312904264 ;

b3= -0.041954064312904264 ;

b4= 0.024939666312861833 ; b5= -0.0074909098845689359;

% Denumerator

a1= 2.677448793088633 ; a2=3.8083303551156718 ;


a3=3.1767832172611352 ; a4=1.5547078663147071 ;

a5= 0.36003693005994097 ;

x5=0;x4=0;x3=0;x2=0;x1=0;x0=0;

y5=0;y4=0;y3=0;y2=0;y1=0;y=0;

for i=1:L

y5=y4;

y4=y3;

y3=y2;

y2=y1;

y1=y;

x5=x4;

x4=x3;

x3=x2;

x2=x1;

x1=x0;

x0=x(i);

y=b0*x0 + b1*x1 + b2*x2 + b3*x3 + b4*x4 + b5*x5 + b6*x6 ...

-a1*y1 - a2*y2 - a3*y3 - a4*y4 - a5*y5 ;

yfilter(i)=y;

end

y = yfilter';

figure;

plot(t,y);

title ('Filtered Signal');

%-----------------Fast Fourier Transform (FFT) -------------------------

n = 2^nextpow2(L);
Yfft = fft(y,n);

P2 = abs(Yfft/L);

P1 = P2(1:n/2+1);

P1(1:end-1) = 2*P1(1:end-1);

figure;

plot(0:(Fsampling/n):(Fsampling/2-Fsampling/n),P1(1:n/2));

title ('Frequency of the signal');

 Kesimpulan

Dari percobaan diatas, dapat dilihat bahwa setiap pergantian metode filer
memiliki orde yang berbeda. Tetapi miliki nilai koefisien yang sama. Hal
ini dikarenakan setiap pemilihan metode filter terjadi penurunan orde.
Dalam pengisisan orde, harus memasukan nilai koefisien Numerator dan
Denominator yang sesuai dengan nilai koefisien yang disetting dan
ordenya ke dalam listing program dan hasil dari nilai dan orde tadi, akan
menghasilkan sinyal sesuai dengan telah disetting.

You might also like