CHAPTER 6 Application to Control and Communications
6.5.3 Chebyshev Low-Pass Filter Design
The normalized magnitude-squared function for the Chebyshev low-pass filter is given by
|HN(0)|2= 1
1+ε2C2N(/p) 0=
p (6.46)
where the frequency is normalized with respect to the passband frequencyp so that0=/p, Nstands for the order of the filter, ε is a ripple factor, andCN(.)are the Chebyshev orthogonal4 polynomials of the first kind defined as
CN(0)=
cos(Ncos−1(0)) |0| ≤1
cosh(Ncosh−1(0)) |0|>1 (6.47) The definition of the Chebyshev polynomials depends on the value of0. Indeed, whenever|0|>1, the definition based in the cosine is not possible since the inverse would not exist; thus the cosh(.)
4Pafnuty Chebyshev (1821–1894), a brilliant Russian mathematician, was probably the first one to recognize the general concept of orthogonal polynomials.
6.5 Analog Filtering 397
definition is used. Likewise, whenever|0| ≤1, the definition based in the hyperbolic cosine would not be possible since the inverse of this function only exists for values of0bigger or equal to 1 and so the cos(.)definition is used. From the definition it is not clear thatCN(0)is anNth-order poly- nomial in0. However, if we letθ =cos−1(0)or0=cos(θ)when|0| ≤1, we have thatCN(0)= cos(Nθ)and
CN+1(0)=cos((N+1)θ)=cos(Nθ)cos(θ)−sin(Nθ)sin(θ) CN−1(0)=cos((N−1)θ)=cos(Nθ)cos(θ)+sin(Nθ)sin(θ) so that adding them we get
CN+1(0)+CN−1(0)=2 cos(θ)cos(Nθ)=20CN(0) This gives a three-term expression for computingCN(0), or a difference equation
CN+1(0)+CN−1(0)=20CN(0) N≥0 (6.48) with initial conditions
C0(0)=cos(0)=1
C1(0)=cos(cos−1(0))=0 We can then see that
C0(0)=1 C1(0)=0
C2(0)= −1+202 C3(0)= −30+403
...
which are polynomials in0of orderN=0, 1, 2, 3,. . .. In Chapter 0 we gave a script to compute and plot these polynomials using symbolic MATLAB.
Remarks
n Two fundamental characteristics of the CN(0)polynomials are: (1) they vary between 0and1 in the range0∈[−1, 1], and (2) they grow outside this range (according to their definition, the Chebyshev polynomials outside this range becomecosh(.)functions, which are functions always bigger than 1). The first characteristic generates ripples in the passband, while the second makes these filters have a magnitude response that goes to zero faster than Butterworth’s.
n There are other characteristics of interest for the Chebyshev polynomials. The Chebyshev polynomials are unity at 0=1 (i.e., CN(1)=1 for all N). In fact, C0(1)=1, C1(1)=1, and if we assume that CN−1(1)=CN(1)=1, we then have that CN+1(1)=1 according to the three-term recursion. This indicates that the magnitude-square function is|HN(j1)|2 =1/(1+ε2)for any N.
n Different from the Butterworth filter that has a unit dc gain, the dc gain of the Chebyshev filter depends on the order of the filter. This is due to the property of the Chebyshev polynomial of being|CN(0)| =0if N is odd and1if N is even. Thus, the dc gain is1when N is odd, but1/√
1+ε2 when N is even. This is due to the fact that the Chebyshev polynomials of odd order do not have a constant term, and those of even order have 1 or−1as the constant term.
n Finally, the polynomials CN(0)have N real roots between−1and1. Thus, the Chebyshev filter displays N/2ripples between1and√
1+ε2for normalized frequencies between0and1.
Design
The loss function for the Chebyshev filter is α(0)=10 log10
1+ε2C2N(0) 0=
p (6.49)
The design equations for the Chebyshev filter are obtained as follows:
n Ripple factor ε and ripple width (RW): From CN(1)=1, and letting the loss equal αmax at that normalized frequency, we have that
ε=p
100.1αmax−1
RW=1− 1
√1+ε2 (6.50)
n Minimum order: The loss function at0sis bigger or equal toαmin, so that solving for the Chebyshev polynomial we get after replacingε,
CN(0s)=cosh(Ncosh−1(0s))
≥
10.1αmin−1 10.1αmax −1
0.5
where we used the cosh(.)definition of the Chebyshev polynomials since0s>1. Solving forN we get
N≥ cosh−1
h
100.1αmin−1 100.1αmax−1
i0.5
cosh−1
ps
(6.51)
n Half-power frequency: Letting the loss at the half-power frequency equal 3 dB and using that 100.3≈ 2, we obtain from Equation 6.49 the Chebyshev polynomial at that normalized frequency to be
CN(0hp)= 1 ε
=cosh
Ncosh−1(0hp)
6.5 Analog Filtering 399
where the last term is the definition of the Chebyshev polynomial for0hp>1. Thus, we get
hp=pcosh 1
Ncosh−1 1
ε
(6.52) Factorization
The factorization of the magnitude-squared function is a lot more complicated for the Cheby- shev filter than for the Butterworth filter. If we let the normalized variableS=s/p equalj0, the magnitude-squared function can be written as
H(S)H(−S)= 1
1+ε2C2N(S/j)= 1 D(S)D(−S)
As before in the Butterworth case, the poles in the left-hands-plane gives H(S)=1/D(S), a stable filter.
The poles of theH(S)can be found to be in an ellipse. They can be connected with the poles of the corresponding order Butterworth filter by an algorithm due to Professor Ernst Guillemin. The poles ofH(S)are given by the following equations fork=1,. . .,N, withNthe minimal order of the filter:
a= 1 Nsinh−1
1 ε
σk= −sinh(a)cos(ψk) (real part)
0k= ±cosh(a)sin(ψk) (imaginary part) (6.53) where 0≤ψk< π/2 (refer to Equation 6.39) are the angles corresponding to the Butterworth filters (measured with respect to the negative real axis of thes-plane).
Remarks
n The dc gain of the Chebyshev filter is not easy to determine as in the Butterworth filter, as it depends on the order N. We can, however, set the desired dc value by choosing the appropriate value of a gain K so thatHˆ(S)=K/D(S)satisfies the dc gain specification.
n The poles of the Chebyshev filter depend now on the ripple factorεand so there is no simple way to find them as it was in the case of the Butterworth.
n The final step is to replace the normalized variable S=s/pin H(S)to get the desired filter H(s). nExample 6.8
Consider the low-pass filtering of an analog signalx(t)=[−2 cos(5t)+cos(10t)+4 sin(20t)]u(t) with MATLAB. The filter is a third-order low-pass Butterworth filter with a half-power frequency
hp=5 rad/sec—that is, we wish to attenuate the frequency components of the frequencies 10 and 20 rad/sec. Design the desired filter and show how to do the filtering.
The design of the filter is done using the MATLAB functionbutterwhere besides the specification of the desired order,N=3, and half-power frequency,hp=5 rad/sec, we also need to indicate that
the filter is analog by including an ’s’ as one of the arguments. Once the coefficients of the filter are obtained, we could then either solve the differential equation from these coefficients or use the Fourier transform, which we choose to do. Symbolic MATLAB is thus used to compute the Fourier transform of the inputX(), and after generating the frequency response functionH(j)from the filter coefficients, we multiply these two to getY(), which is inversely transformed to obtainy(t).
To obtain H(j) symbolically we multiply the coefficients of the numerator and denominator obtained from butter by variables (j)n where n corresponds to the order of the coefficient in the numerator or the denominator, and then add them. The poles of the designed filter and its magnitude response are shown in Figure 6.23, as well as the inputx(t)and the outputy(t). The following script was used for the filter design and the filtering of the given signal.
−6 −4 −2 0 2
−5
−4
−3
−2
−1 0 1 2 3 4 5
jΩ
0 10 20 30
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
|H(jΩ)|
σ Ω
0 5 10 15 20
−5 0 5
t
x(t)
0 5 10 15 20
−5 0 5
t
y(t)
cos(10t)−2cos(5t)+4sin(20t)
FIGURE 6.23
Filtering of an analog signalx(t)using a low-pass Butterworth filter. Notice that the output of the filter is approximately the sinusoid of 5 rad/sec inx(t), as the other two components have been attenuated.
%%%%%%%%%%%%%%%%%%%
% Example 6.8 -- Filtering with Butterworth filter
%%%%%%%%%%%%%%%%%%%
clear all; clf syms t w
x = cos(10∗t)−2∗cos(5∗t) + 4∗sin(20∗t); % input signal X = fourier(x);
N = 3; Whp = 5; % filter parameters [b, a] = butter(N, Whp, ’s’); % filter design
W = 0:0.01:30; Hm = abs(freqs(b, a, W)); % magnitude response in W
% filter output
n = N:−1:0; U = ( j∗w).ˆn
num = b−conj(U’); den = a−conj(U’);
6.5 Analog Filtering 401
H = num/den; % frequency response Y = X∗H; % convolution property
y = ifourier(Y, t); % inverse Fourier n
nExample 6.9
In this example we will compare the performance of Butterworth and Chebyshev low-pass filters in the filtering of an analog signalx(t)=[−2 cos(5t)+cos(10t)+4 sin(20t)]u(t)using MATLAB.
We would like the two filters to have the same half-power frequency.
The magnitude specifications for the low-pass Butterworth filter are
αmax=0.1dB,p=5rad/sec (6.54)
αmin=15dB,s=10 rad/sec (6.55)
and a dc loss of 0 dB. Once this filter is designed, we would like the Chebyshev filter to have the same half-power frequency. In order to obtain this, we need to change thepspecification for the Chebyshev filter. To do that we use the formulas for the half-power frequency of this type of filter to find the new value forp.
The Butterworth filter is designed by first determining the minimum orderNand the half-power frequencyhp using the functionbuttord, and then finding the filter coefficients by means of the function butter. Likewise, for the design of the Chebyshev filter we use the function cheb1ord to find the minimum order and the cut-off frequency (the new p is obtained from the half- power frequency). The filtering is implemented using the Fourier transform as before.
There are two significant differences between the designed Butterworth and Chebyshev filters.
Although both of them have the same half-power frequency, the transition band of the Cheby- shev filter is narrower, [6.88 10], than that of the Butterworth filter, [5 10], indicating that the Chebyshev is a better filter. The narrower transition band is compensated by a lower minimum order of five for the Chebyshev compared to the six-order Butterworth. Figure 6.24 displays the poles of the Butterworth and the Chebyshev filters, their magnitude responses, as well as the input signalx(t)and the outputy(t)for the two filters (the two perform very similarly).
%%%%%%%%%%%%%%%%%%%
% Example 6.9 -- Filtering with Butterworth and Chebyshev filters
%%%%%%%%%%%%%%%%%%%
clear all;clf syms t w
x = cos(10∗t)−2∗cos(5∗t) + 4∗sin(20∗t); X = fourier(x);
wp = 5;ws = 10;alphamax = 0.1;alphamin = 15; % filter parameters
% butterworth filter
[N, whp] = buttord(wp, ws, alphamax, alphamin, ’s’) [b, a] = butter(N, whp, ’s’)
% cheby1 filter
epsi = sqrt(10ˆ(alphamax/10)−1)
−8 −6 −4 −2 0 2
−5 0 5
Butterworth
σ
−4 −2 σ 0 2
−5 0 5
Chebyshev
jΩjΩ
0 10 20 30
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Ω
|H(jΩ)|
Butterworth Chebyshev
0 5 10 15 20
−5 0 5
t
y(t)
0 5 10 15 20
−5 0 5
t
x(t)
cos(10t)−2cos(5t)+4sin(20t)
FIGURE 6.24
Comparison of filtering of an analog signalx(t)using a low-pass Butterworth and Chebyshev filter with the same half-power frequency.
wp = whp/cosh(acosh(1/epsi)/N) % recomputing wp to get same whp [N1, wn] = cheb1ord(wp, ws, alphamax, alphamin, ’s’);
[b1, a1] = cheby1(N1, alphamax, wn, ’s’);
% frequency responses W = 0:0.01:30;
Hm = abs(freqs(b, a, W));
Hm1 = abs(freqs(b1, a1, W));
% generation of frequency response from coefficients n = N:−1:0; n1 = N1:−1:0;
U = ( j∗w).ˆn; U1 = ( j∗w).ˆn1 num = b∗conj(U’); den = a∗conj(U’);
num1 = b1∗conj(U1’); den1 = a1∗conj(U1’) H = num/den; % Butterworth LPF
H1 = num1/den1; % Chebyshev LPF
% output of filter Y = X∗H;
Y1 = X∗H1;
y = ifourier(Y, t)
y1 = ifourier(Y1, t) n