Digital Signal Processing Reference
In-Depth Information
and elliptic implementations is included below. In each case, M
ATLAB
auto-
matically designs the highpass filter. No explicit transformations are needed.
>> % Matlab code for designing highpass filter
>> wp
=
100; ws
=
50; Rp
=
1; Rs
=
15;
% design
% specifications
>>
% for Butterworth
% filter
>> [N, wc]
=
buttord(wp,ws,Rp,Rs,'s');
% determine order
% and cut off
>> [num1,den1]
=
butter(N,wc,'high','s');
% determine
% transfer
% function
>> H1
=
tf(num1,den1);
>> %%%%%
% Type I Chebyshev
% filter
>> [N, wn]
=
cheb1ord(wp,ws,Rp,Rs,'s');
>> [num2,den2]
=
cheby1(N,Rp,wn,'high','s');
>> H2
=
tf(num2,den2);
>> %%%%%
% Type II Chebyshev
% filter
>> [N,wn]
=
cheb2ord(wp,ws,Rp,Rs,'s') ;
>> [num3,den3]
=
cheby2(N,Rs,wn,'high','s') ;
>> H3
=
tf(num3,den3);
>> %%%%% % Elliptic filter
>> [N,wn]
=
ellipord(wp,ws,Rp,Rs,'s') ;
>> [num4,den4]
=
ellip(N,Rp,Rs,wn,'high','s') ;
>> H4
=
tf(num4,den4);
In the above code, note that
wp>ws
. Also, an additional argument of
'high'
is included in the design statements for different filters, which is used to specify
a highpass filter. The aforementioned M
ATLAB
code results in the following
transfer functions for the different implementations:
Butterworth
s
4
s
4
+
2
.
004
10
2
s
3
+
2
.
008
10
4
s
2
+
1
.
179
10
6
s
+
3
.
459
10
7
;
H
(
s
)
=
s
3
s
3
+
252
.
1
s
2
+
2
.
012
10
4
s
+
2
.
035
10
6
;
Type I Chebyshev
H
(
s
)
=
s
3
+
3
.
027
10
3
s
s
3
+
113
.
5
s
2
+
9
.
473
10
3
s
+
3
.
548
10
5
;
Type II Chebyshev
H
(
s
)
=
0
.
8903
s
2
+
1501
s
2
+
81
.
68
s
+
8441
.
elliptic
H
(
s
)
=
Search WWH ::
Custom Search