Upload
yessica-ratri-wiguna
View
44
Download
9
Embed Size (px)
Citation preview
LAPORAN PROYEK SINYAL DAN SISTEM
ELLIPTIC FILTER
KELOMPOK 22
RIRY RIZKY ARUMDINA (0906632695)
YESSICA RATRI WIGUNA (0906632751)
ZESYARA MELATI AUZRIANI G. (0906512753)
BAB I
TEORI
Sebuah filter eliptik (juga dikenal sebagai Cauer filter, dinamai
Wilhelm Cauer ) adalah pemrosesan sinyal filter dengan menyamakan
kedudukan equiripple baik di passband maupun stopband. Jumlah
equiripple dalam band masing-masing secara independen disesuaikan,
dan tidak ada filter sama lain agar dapat memiliki transisi lebih cepat
dalam keuntungan antara passband dan stopband , nilai-nilai tertentu
ripple apakah yang disamakan atau tidak.
Keuntungan dari lowpass filter eliptik sebagai fungsi frekuensi
sudut ω diberikan oleh:
dimana n R adalah n-order ke fungsi rasional eliptik (kadang-
kadang dikenal sebagai fungsi rasional Chebyshev) dan
ω 0 adalah frekuensi cutoff
ε adalah faktor ripple
ξ adalah faktor selektivitas
Nilai dari faktor ripple menentukan ripple passband, sedangkan
kombinasi faktor ripple dan faktor selektifitas menentukan ripple
stopband.
Dalam passband, fungsi rasional eliptik bervariasi antara nol dan
kesatuan. Keuntungan yang demikian akan bervariasi antara 1 dan
.
Dalam stopband, fungsi rasional eliptik bervariasi antara tak terhingga
dan faktor diskriminasi n L yang didefinisikan sebagai:
Keuntungan dari stopband tersebut sehingga akan bervariasi antara 0
dan
Paramete
r
Deskripsi
Wp Passband corner frequency (Wp), cut off frekuensi, adalah
sebuah skalar atau vektor 2 element dengan nilai antara 0
dan 1, dimana 1 sesuai untuk Nyquist normalized frekuensi,
π radians per sample
Ws Stopband corner frekuensi (Ws), adalah skalar atau vektor 2
elemen dengan nilai antara 0 dan 1, dimana 1 sesuai untuk
Nyquist normalized frekuensi
Rp Passband Ripple, dalam decibel. Rp adalah nilai maksimum
yang diperboleh pada pasband loss, dalam decibel
Rs Stopband attenuation, dalam decibel. Rs adalah jumlah
decibel pada stopband yang terattenuasi dengan melihat ke
passband response
Berikut adalah tipe filter dan spesifikasi/syarat pada elliptic filter
Tipe
Filter
Stopband dan Passband
Condition
Stopband Passband
Lowpass Wp < Wn, keduanya skalar (Wn , 1) (0 , Wp)
Highpass Wp > Wn, keduanya skalar (0 , Wn) (Wp ,1)
Bandpass Wn (1) < Wp (1) < Wp (2) <
Wn(2)
(0,Wn(1))
dan
(Wn(2),1)
(Wp(1),
Wp(2))
Bandstop Wp (1) < Wn (1) < Wn (2) <
Wp (2)
(0, Wp(1))
dan
(Wp(2),1)
(Wn(1),
Wn(2))
Pada filter elliptic ini diperlukan input data berupa orde filternya
lalu ripple pada passband lalu stopband attenuation , passband
frequency. Itu merupakan input utama untuk tipe filter lowpass dan
highpass. Untuk filter tipe bandpass dan bansstop maka diperlukan
stopband frequency karena seperti yang kita ketahui bahwa pada tipe
tersebut frekuensi cut off nya ada dua. Kemudian pada semua jenis
tersebut dibutuhkan input frekuensi sampling yang nantinya digunakan
untuk mendapatkan normalisasi frekuensinya.
Bab II
PROGRAM
function varargout = coba(varargin)% COBA M-file for coba.fig% COBA, by itself, creates a new COBA or raises the existing% singleton*.%% H = COBA returns the handle to a new COBA or the handle to% the existing singleton*.%% COBA('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in COBA.M with the given input arguments.%% COBA('Property','Value',...) creates a new COBA or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before coba_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to coba_OpeningFcn via varargin.%% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instance to run (singleton)".%% See also: GUIDE, GUIDATA, GUIHANDLES % Edit the above text to modify the response to help coba % Last Modified by GUIDE v2.5 04-May-2011 07:23:05 % Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @coba_OpeningFcn, ... 'gui_OutputFcn', @coba_OutputFcn, ... 'gui_LayoutFcn', [] , ...
'gui_Callback', []);if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});end if nargout [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});else gui_mainfcn(gui_State, varargin{:});end% End initialization code - DO NOT EDIT % --- Executes just before coba is made visible.function coba_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to coba (see VARARGIN) % Choose default command line output for cobahandles.output = hObject; % Update handles structureguidata(hObject, handles); % UIWAIT makes coba wait for user response (see UIRESUME)% uiwait(handles.figure1); % --- Outputs from this function are returned to the command line.function varargout = coba_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structurevarargout{1} = handles.output; function edit1_Callback(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit1 as text% str2double(get(hObject,'String')) returns contents of edit1 as a doubleuser_string = get(hObject,'String'); function edit2_Callback(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
Untuk ambil data input pada bagian enter order
% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit2 as text% str2double(get(hObject,'String')) returns contents of edit2 as a double % --- Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit3 as text% str2double(get(hObject,'String')) returns contents of edit3 as a double % --- Executes during object creation, after setting all properties.function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end function edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit4 as text% str2double(get(hObject,'String')) returns contents of edit4 as a double
Untuk ambil data input pada bagian enter ripple [dB]
Untuk ambil data input pada bagian enter stopband attenuation (dalam dB)
FUNGSI TRANSFER
% --- Executes during object creation, after setting all properties.function edit4_CreateFcn(hObject, eventdata, handles)% hObject handle to edit4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit5 as text% str2double(get(hObject,'String')) returns contents of edit5 as a double % --- Executes during object creation, after setting all properties.function edit5_CreateFcn(hObject, eventdata, handles)% hObject handle to edit5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end % --- Executes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles)% hObject handle to pushbutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)select=get(handles.popupmenu1,'Value'); n =str2double(get(handles.edit2,'String'))Rp =str2double(get(handles.edit3,'String'))Rs =str2double(get(handles.edit4,'String')) if select == 2 Wp =str2double(get(handles.edit5,'String'))[z,p,k] = ellip(n,Rp,Rs,Wp,'low');[sos,g] = zp2sos (z,p,k);Hd= dfilt.df2tsos (sos,g);
h = fvtool (Hd);set (h, 'analysis', 'freq')
Untuk ambil data program ke GUI pada pilihan tipe filter
Untuk ambil data input pada bagian enter passband edge frequency[0 -1]
Pilihan LOWPASS
Pilihan HIGHPASS
Pemunculan grafik
FUNGSI TRANSFER
FUNGSI TRANSFER
FUNGSI TRANSFER
Pemunculan grafik
elseif select == 3 Wp =str2double(get(handles.edit5,'String')) [z,p,k] = ellip(n,Rp,Rs,Wp,'high');
[sos,g] = zp2sos (z,p,k); Hd= dfilt.df2tsos (sos,g);
h = fvtool (Hd);set (h, 'analysis', 'freq') elseif select == 5 Wn1 =str2double(get(handles.edit5,'String')) Wn2 =str2double(get(handles.edit6,'String')) Wn=[Wn1 Wn2];ftype= 'bandpass'; [z,p,k]=ellip(n, Rp, Rs, Wn, ftype);[sos,g]=zp2sos(z,p,k);Hd=dfilt.df2sos(sos,g); h = fvtool (Hd);set (h, 'analysis', 'freq') elseif select == 4 Wn1 =str2double(get(handles.edit5,'String')) Wn2 =str2double(get(handles.edit6,'String')) Wn=[Wn1 Wn2];ftype= 'stop'; [z,p,k]=ellip(n, Rp, Rs, Wn, ftype);[sos,g]=zp2sos(z,p,k);Hd=dfilt.df2sos(sos,g); h = fvtool (Hd);set (h, 'analysis', 'freq') end function edit6_Callback(hObject, eventdata, handles)
% hObject handle to edit6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit6 as text% str2double(get(hObject,'String')) returns contents of edit6 as a double % --- Executes during object creation, after setting all properties.function edit6_CreateFcn(hObject, eventdata, handles)% hObject handle to edit6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows.
Untuk ambil data input pada bagian enter stopband edge frequency[0 -1]
Pilihan BANDSTOP
Pilihan BANDPASS
Pemunculan grafik
Pemunculan grafik
% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end % --- Executes on selection change in popupmenu1.function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) % Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array% contents{get(hObject,'Value')} returns selected item from popupmenu1 % --- Executes during object creation, after setting all properties. % --- If Enable == 'on', executes on mouse press in 5 pixel border.% --- Otherwise, executes on mouse press in 5 pixel border or over edit2.function edit2_ButtonDownFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) sel_typ = get(gcbf,'SelectionType') if sel_type == 'normal' set(hObject,'String','') end % --- Executes during object creation, after setting all properties.function popupmenu1_CreateFcn(hObject, eventdata, handles)% hObject handle to popupmenu1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end
Memanggil pilihan select filter type yang didalamnya terdapat 4 tipe
Untuk LOWPASS FILTER
Untuk HIGHPASS FILTER
Untuk BANDPASS FILTER
Untuk BANDSTOP FILTER
BAB III
PENUTUP
Demikianlah laporan ini, penulis berharap laporan ini dapat
menjelaskan apa saja yang tertera pada program filter elliptic. Penulis
juga memohon maaf apabila ada kesalahan-kesalahan yang terjadi baik
itu sengaja maupun tidak sengaja. Atas segala dukungannya penulis
mengucapkan terima kasih. Dalam program ini terdapat beberapa
kekurangan dan kelebihan. Berikut penjelasan kelebihan dan kekurangan
program.
KEKURANGAN
1. Program ini terkadang error dan tidak mau menampilkan grafik ke
user apabila menggunakan file copy dari program asli.
2. Program ini tidak menyediakan menu menampilkan fungsi transfer
(H(jω)), walaupun dalam program ini memanfaatkan fungsi transfer
hingga terbentuk grafik.
KELEBIHAN
Program ini sudah memanfaatkan GUI sehingga lebih memudahkan
user.