IIR Procedure Analog Filters

DESIGNOF ANALOG IIRFILTERS

By Arun A. Balakrishnan Asst. Professor Dept. of AE&I, RSET

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Infinite Impulse Response(IIR) IIR filters are computationally more efficient It has feedback or poles and require fewer coefficients Feedback can result in unstable filters, if coefficients deviate from their true value due to coefficient scaling or quantization In general, IIR filter can be expressed as −1 −N b0+b1z +...+bN z H(z) = −1 −M 1+a1z +...+aM z N P −k bk z k=0 = M P −k 1+ ak z k=1

where ak and bk are filter coefficient can be factorized as H(z) = k (z−z1)(z−z2)...(z−zN ) (z−p1)(z−p2)...(z−pM ) N M P P y(n) = bk x(n − k) − ak y(n − k) k=0 k=1

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Design Procedure Filter specification Coefficients calculation Appropriate structure selection Simulation(optional) Filter implementation

Analog low pass filters Chebyshev Filter Type I Chebyshev Filter Type II Chebyshev Filter

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Filter specifications

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Filter specification

ωp, ωs, ωc = digital passband, , 3-dB cut off frequency in radians

Ωp, Ωs, Ωc = analog passband, stopband, 3-dB cut off frequency in radians  = parameter specifying allowable passband λ = parameter specifying allowable stopband

δp = tolerance of magnitude response in passband

δs = tolerance of magnitude response in stopband

p δp  = 2 1 − δp q 2 2 (1 + δp) − δs λ = δs

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Analog Low Pass Butterworth Filter Magnitude function |H(Ω)| = 1 = 1 N = 1, 2, 3, ... 2N 1/2 2 2N 1/2 [1+(Ω/Ωc ) ] [1+ (Ω/Ωp) ]

where N = order of filter and Ωc =

Function is monotonically decreasing magnitude response approaches ideal LPF as N increases

Ω < Ωc; |H(jΩ)| ≈ 1 and Ω > Ωc; |H(jΩ)| decreases rapidly

At Ω = Ωc; |H(jΩ)| = 0.707 = −3dB

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Transfer function of a stable filter magnitude square function of a normalized Butterworth filter |H(Ω)|2 = 1 N = 1, 2, 3, ... 1+(Ω)2N s To obtain transfer function, put Ω = j since H(s)H(−s) evaluated at s = jΩ is equal to |H(Ω2)| H(s)H(−s) = 1 = 1 = 1 s 2N 1+(−1)N s2N 1+(−s2)N 1+( j ) function has poles in left half and right half of s-plane due to H(s) and H(−s) If H(s) has root in left half, H(−s) has root in right half of s-plane N roots are given by 1 + −s2 = 0

2N j2kπ jπk/N for N odd, s = 1 = e =⇒ sk = e ; k = 1, 2,..., 2N for N even, 2N j(2k−1)π jπ(2k−1)/2N s = −1 = e =⇒ sk = e ; k = 1, 2,..., 2N

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Transfer function of a stable filter all poles lie on a unit circle 360◦ poles are located at an angular separation 2N To ensure stability, only left half poles are considered

jφk π (2k−1)π sk = e where φk = 2 + 2N ; k = 1, 2,..., N

Table: List of Butterworth Polynomials

N Denominator of H(s) 1 s√+ 1 2 s2 + 2s + 1 3 (s + 1)(s2 + s + 1) 4 (s2 + 0.76537s + 1)(s2 + 1.8477s + 1)

0 unnormalized poles are sk = sk Ωc

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Order N of a Butterworth Filter 2 1 Magnitude squared function |H(Ω)| = 2 2N N = 1, 2, 3, ... 1+ (Ω/Ωp) Taking logarithm on both sides 2 h 2 2N i 10 log |H(Ω)| = 10 log 1 − 10 log 1 +  (Ω/Ωp)

At Ω = Ωp attenuation is αp 2 2 20 log |H(Ωp)| = −αp = −10 log(1 +  ) =⇒ αp = 10 log(1 +  )  = (100.1αp − 1)1/2

At Ω = Ωs attenuation is αs 2 2N 20 log |H(Ωs)| = −αs = −10 log(1 +  (Ωs/Ωp) )

r 0.1α log 10 s −1  2N 0.1αp 2 Ωs 0.1α 10 −1 =⇒  = 10 s − 1=⇒ N ≥   Ωp log Ωs Ωp

log A λ q 100.1αs −1 Ωp N ≥ where A = = 0.1α and k = 1  p − Ωs log( k ) 10 1

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Ω Prove that Ω = p = Ωs c (100.1αp −1)1/2N (100.1αs −1)1/2N 2 1 1 |H(Ω)| = 2N = 2 2N 1+(Ω/Ωc ) 1+ (Ω/Ωp)  2N  2N  2N Ω = 2 Ω =⇒ Ωp = 2 Ωc Ωp Ωc  2N Ωp 0.1αp Ωp = 10 − 1 =⇒ Ωc = 0.1α Ωc (10 p −1)1/2N 2N 1/2N   0.1αs  0.1αs  Ωs 10 −1 10 −1 We know = 0.1α =⇒ Ωs = Ωp 0.1α Ωp 10 p −1 10 p −1 1/2N 1/2N  0.1αs  Ω = Ω 100.1αp − 1 10 −1 s c 100.1αp −1 Ω = Ωs c (100.1αs −1)1/2N

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Steps to design an analog Butterworth lowpass filter From the given specification find the order of filter N Round of it to the next higher integer

Find the transfer function H(s) for Ωc = 1 rad/sec for value of N

Calculate the value of cut off frequency Ωc

Find the required transfer function for above value of Ωc by substituting s → s in H(s) Ωc

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Butterworth Filters

Problem Design an analog Butterworth filter that has - 2dB passband attenuation at a frequency of 20 rad/sec and atleast -10dB stopband attenuation at 30 rad/sec.

Answer N ≥ 3.37 =⇒ N = 4 1 H(s) = (s2+0.76537s+1)(s2+1.8477s+1)

Ωc = 21.3868

Transfer function for Ωc = 21.3868 rad/sec is obtained by s s → 21.3868 0.20921×106 H(s) = (s2+16.3686s+457.394)(s2+39.5176s+457.394)

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Analog Low Pass Chebyshev Filter Type I - all pole filter that exhibits equiripple behavior in pass band and monotonic characteristics in stopband Type II - contains both poles and zeros and exhibits monotonic behavior in pass band and equiripple behavior in stopband

Magnitude squared function Design of Analog IIR Filters, Sep 4, 5 2 1 |H(Ω)| =   N = 1, 2, 3, ... 1+2C2 Ω N Ωp th where CN (x) = N order Chebyshev polynomial IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Chebyshev Polynomial Nth order Chebyshev polynomial is

 cos(N cos−1(x)), |x| < 1 (Passband) C (x) = N cosh(N cosh−1(x)), |x| > 1 (Stopband)

CN (x) = 2xCN−1(x) − CN−2(x), N > 1

C0(x) = 1, C1(x) = x and CN (1) = 1

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Order N of a Chebyshev Filter Magnitude squared function 2 1 |H(Ω)| = 2 2 N = 1, 2, 3, ... 1+ CN (Ω/Ωp) Taking logarithm on both sides 2  2 2  10 log |H(Ω)| = 10 log 1 − 10 log 1 +  CN (Ω/Ωp) At Ω = Ωp attenuation is αp 2 20 log |H(Ωp)| = −αp = −10 log(1 +  )[∵ CN (1) = 1] 2 0.1αp 1/2 =⇒ αp = 10 log(1 +  ) =⇒  = (10 − 1)

At Ω = Ωs attenuation is αs 2 2 20 log |H(Ωs)| = −αs = −10 log(1 +  CN (Ωs/Ωp)) r 0.1α cosh−1 10 s −1   0.1αp 2 2 Ωs 0.1α 10 −1 =⇒  C = 10 s − 1=⇒ N ≥   N Ωp cosh−1 Ωs Ωp

−1 cosh A λ q 100.1αs −1 Ωp N ≥ where A = = 0.1α and k = −1 1  p − Ωs cosh ( k ) 10 1

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Pole Locations of a Chebyshev Filter   roots are 1 + 2C2 −js = 0 N Ωp   h  i C −js = ±j/ = cos N cos−1 −js N Ωp Ωp   Defining cos−1 −js = φ − jθ Ωp

±j/ = cos [Nφ − jNθ] = cos(Nφ) cos(jNθ) + sin(Nφ) sin(jNθ) = cos(Nφ) cosh(Nθ) + j sin(Nφ) sinh(Nθ)

Equating real and imaginary parts

cos(Nφ) cosh(Nθ) = 0 (1) sin(Nφ) sinh(Nθ) = ±1/ (2) Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Pole Locations of a Chebyshev Filter (2k−1)π since cosh(Nθ) > 0 for θ real =⇒ φ = 2N ; k = 1, 2,..., N 1 −1 1  substituting in (2) sin(Nφ) = ±1 ∴ θ = ± N sinh  Left half pole locations sk = jΩp cos(φ − jθ)

sk = jΩp [cos(φ) cosh(θ) + j sin(φ) sinh(θ)]

sk = Ωp [− sin(φ) sinh(θ) + j cos(φ) cosh(θ)]

Identity √ cosh−1(x) = ln(x + x 2 − 1) √ √ sinh−1(x) = ln(x+ x 2 + 1) =⇒ sinh−1(−1) = ln(−1+ −2 + 1) −1 −1 √ or µ = esinh ( ) = −1 + −2 + 1

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Pole Locations of a Chebyshev Filter

 1  sinh(θ) = sinh sinh−1(−1) N 1 sinh−1(−1) − 1 sinh−1(−1) e[ N ] − e [ N ] eθ − e−θ = sinh θ = 2 ∵ 2 1 1 h sinh−1(−1)i N h − sinh−1(−1)i N − 1 − 1 e e µ N − µ N = = 2 2

1 − 1 µ N +µ N similarly cosh(θ) = 2

" 1 − 1 ! 1 − 1 !# µ N − µ N µ N + µ N s = Ω − sin(φ) + j cos(φ) k p 2 2 = −a sin(φ) + jb cos(φ)

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

contd...

(2k − 1)π  (2k − 1)π  = −a sin + jb cos 2N 2N π (2k − 1)π  π (2k − 1)π  = a cos + + jb sin + 2 2N 2 2N

Pole Locations of a Chebyshev Filter - Summary

sk = a cos(φk ) + jb sin(φk )

 1 − 1  µ N −µ N where a = Ωp 2

 1 − 1  µ N +µ N b = Ωp 2

π (2k−1)π φk = 2 + 2N k = 1, 2,..., N

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Steps to design an analog Chebyshev lowpass filter From the given specification find the order of filter N Round of it to the next higher integer

 1 − 1  µ N −µ N Find values of a and b using a = Ωp 2 and

 1 − 1  √ µ N +µ N −1 −2 b = Ωp 2 where µ =  +  + 1,

0.1αp 1/2  = (10 − 1) , Ωp is passband frequency and αp is the maximum allowable attenuation in passband

Calculate the poles using sk = a cos(φk ) + jb sin(φk ) where π (2k−1)π φk = 2 + 2N k = 1, 2,..., N Find the denominator polynomial of transfer function H(s) using above poles. Numerator depends on the value of N N odd, substitute s = 0 in denominator. This value is equal to numerator N even, substitute s = 0 in denominator. Divide the value by √ 1 . This value is equal to numerator 1+2

Calculate the value of cut off frequencyDesign of AnalogΩc IIR Filters, Sep 4, 5

Find the required transfer function for above value of Ωc by substituting s → s in H(s) Ωc IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Problem Design an analog Chebyshev filter transfer function that satisfies the constraints √1 ≤ |H(ω)| ≤ 1; 0 ≤ Ω ≤ 2 and |H(ω)| < 0.1; 2 Ω ≥ 4

Answer  = 1andλ = 9.95 N ≥ 2.269 =⇒ N = 3 a = 0.596 and b = 2.087 ◦ ◦ ◦ φ1 = 120 , φ2 = 180 , φ3 = 240

s1 = −0.298 + j1.087, s2 = −0.596, s3 = −0.298 − j1.087 Denominator polynomial is (s + 0.596)(s2 + 0.596s + 3.354) Numerator of H(s) is 2 2 H(s) = (s+0.596)(s2+0.596s+3.354)

Design of Analog IIR Filters, Sep 4, 5 IIR Filter Design Procedure Analog Filters

Chebyshev Filters

Hyperbolic cos and sin

e jθ +e−jθ cos θ = 2 e−θ +eθ cos jθ = 2 = cosh θ e jθ −e−jθ sin θ = 2j e−θ −eθ sin jθ = 2j = j sinh θ

Design of Analog IIR Filters, Sep 4, 5