Signals and Systems - Electrical Engineering

(avery) #1
11.4 IIR Filter Design 665

Since the sample period is


Ts= 1 /fs=( 1 / 9 )× 10 −^3 sec/sample ⇒ Kb=cot(πfhpTs)= 1

Given that the half-power frequency is known, only the minimal order of the filter is needed. The
loss function for the Butterworth filter is then


α(ejω)=10 log 10

(

1 +

[

tan(0.5ω)
tan(0.5ωhp)

] 2 N)

=10 log 10 ( 1 +(tan(0.5ω))^2 N)

since 0.5ωhp=π/4. Forω=ωst, lettingα(ejωst)=αmin, solving forNwe get


N=

log 10 ( 10 0.1αmin− 1 )
2 log 10 (tan(0.5ωst))

Replacingαminandωstwe obtain that the minimal order isN=4. The MATLAB script used in the
design is as follows.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Example 11.8---filtering of analog signal
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
wh = 0.5∗pi; ws = 0.6∗pi; alphamin = 9; Fs = 9000; % filter specifications
N = log10((10ˆ(0.1∗alphamin)-1))/(2∗log10(tan(ws/2)/tan(wh/2)));N = ceil(N)
[b,a] = butter(N,wh/pi);
[H,w] = freqz(b,a);w = w/pi;N = length(H);f = w∗Fs/2;
alpha0 = -18;
G = 10ˆ(-alpha0/20);H = H∗G;
spec2 = alpha0 + alphamin∗ones(1,N);
hpf = alpha0 + 3.01∗ones(1,N);
disp(‘poles’); p = roots(a)
disp(‘zeros’); z = roots(b)
alpha = -20∗log10(abs(H));

The transfer function of the discrete filter is found as


H(z)=H 1 (z)H 2 (z)

where eachH (^4) i(z),i=1, 2 is the result of applying the bilinear transformation toHi(s),i=1, 2
formed by pairs of complex-conjugate poles of the analog low-pass Butterworth. To ensure that the
loss is−18 dB atω=0, we included a gainGin the numerator so that
H′(z)=GH(z)=
G(z+ 1 )^4
10.61(z^2 +0.45)(z^2 +0.04)
satisfies the loss specifications. Notice that whenKb=1, the poles are imaginary. The dc gainGof
the filter is found from the dc lossα(ej^0 )=− 18 =−20 log 10 GasG=7.94.

Free download pdf