Presentation is loading. Please wait.

Presentation is loading. Please wait.

Analog Filters: The Approximation Franco Maloberti.

Similar presentations


Presentation on theme: "Analog Filters: The Approximation Franco Maloberti."— Presentation transcript:

1 Analog Filters: The Approximation Franco Maloberti

2 Analog Filters: The Approximation2 Introduction The first step of the normalized filter design is to find a magnitude characteristics, |H(j  )|, that fulfills the specifications Handling |H(j  )| it is difficult. It is better to deal with |H(j  )| 2. |H(j  )| 2 is a rationale function in  2

3 Franco MalobertiAnalog Filters: The Approximation3 Example Consider the transfer function Much easier to deal than

4 Franco MalobertiAnalog Filters: The Approximation4 Methodology The approximation phase is based on the following: Find a real rationale function in  2 capable to met the magnitude specifications (pass-band and stop-band) Live with the resulting phase response Correct (if necessary) the phase response (or delay) with a cascaded network Work on low-pass characteristics (we will se shortly how to achieve high-pass, band-pass, … from a low-pass TF)

5 Franco MalobertiAnalog Filters: The Approximation5 Generic Low-Pass TF A generic form of a low-pass TF is: In the pass-band H(  )=A 0 pp A0A0

6 Franco MalobertiAnalog Filters: The Approximation6 Butterworth Characteristics A very simple form for F(  2 ) is n is the order of the Butterworth filter Properties:

7 Franco MalobertiAnalog Filters: The Approximation7 Maximally Flat The magnitude response of the Butterworth filter is said to be maximally flat. If we take the first 2n-1 derivatives of H(j  ), they are all zero at  =0 n=8  =0,…,2

8 Franco MalobertiAnalog Filters: The Approximation8 Butterworth Plots; |H(j  )| 2 clear all; omega=linspace(0,2,100); for k=1:6 n=k; for i=1:100 Butter(i,k)=1/(1+omega(i)^(2*n)); end plot(omega,Butter); All curves cross 0.5 For  =1

9 Franco MalobertiAnalog Filters: The Approximation9 Butterworth Plots For  >>1 |H(i  )| 2 ≈ 1/(  2n ) H(j  )| dB = -20 n log  clear all; omega=linspace(0,100,100); for k=1:4 n=k; for i=1:100 Butter(i,k)=1/(1+omega(i)^(2*n)); ButdB(i,k) = 20* log10(Butter(i,k)); end semilogx(omega,ButdB);

10 Franco MalobertiAnalog Filters: The Approximation10 Design of Butterworth filters Specifications The values of  s,  p and the ratio  s /  p determine the order n of the filter.

11 Franco MalobertiAnalog Filters: The Approximation11 Chebyshev Characteristics The Chebishev filters are based on the Chebishev polynomials n is the order It is a polynomial!

12 Franco MalobertiAnalog Filters: The Approximation12 Chebyshev Polynomials

13 Franco MalobertiAnalog Filters: The Approximation13 Chebyshev Polynomials

14 Franco MalobertiAnalog Filters: The Approximation14 Chebyshev Polynomials Features If  varies in the range -1 +1 C n (  )=cos(n  +  ) limited to the range -1 +1 If |  |  is larger than 1 C n (  )=cosh(n cosh -1  ) increases monotonically with  n. clear all; n=7 xmax=1+5/n^2; w=linspace(-xmax,xmax,200); for i=1:200 C(i)=cos(n*acos(w(i))); end plot(w,C);

15 Franco MalobertiAnalog Filters: The Approximation15 Chebyshev low-pass Choose a small number  and let the low-pass transfer function is Normalize  p = 1 Maximum attenuation in the pass-band

16 Franco MalobertiAnalog Filters: The Approximation16 Chebyshev low-pass Plots clear all; n = input('what is the order? '); eps = input('what is the value of epsilon? '); xmax=2; w=linspace(0,xmax,200); for i=1:200 C(i)=cos(n*acos(w(i))); H(i)=1/(1+(eps*C(i))^2); end plot(w,H); Order 4 Eps=0.4 Order 7 Eps=0.2

17 Franco MalobertiAnalog Filters: The Approximation17 Start from specifications Determine  The order of the filter must be such that Remember that Chebyshev Filter Design

18 Franco MalobertiAnalog Filters: The Approximation18 Other Chebyshev Responses Define another function Use in the Matlab program H(i)=1-1/(1+(eps*C(i))^2);

19 Franco MalobertiAnalog Filters: The Approximation19 Inverse Chebyshev High-pass clear all; n = input('what is the order? '); eps = input('what is epsilon? '); xmax=2; w=linspace(0,xmax,200); for i=1:200 C(i)=cos(n*acos((1/w(i)))); H(i)=1/(1+(eps*C(i))^2); end plot(w,H);

20 Franco MalobertiAnalog Filters: The Approximation20 Inverse Chebyshev Low-pass

21 Franco MalobertiAnalog Filters: The Approximation21 Elliptic-Function Butterworth and Chebyshev don’t have finite zeros All-pole functions Finite zeros help in the pass-band stop-band transition (see inverse Chebyshev) Elliptic functions are a special category of zero- pole transfer functions

22 Franco MalobertiAnalog Filters: The Approximation22 Elliptic-Function (ii) Define R N (  ) or Poles and zeros are reciprocal of one another If  1,  2,… are in the range 0 ≤  ≤1 |R(  )| 2 is zero at  1,  2,… and infinite at 1/  1, 1/  2,…

23 Franco MalobertiAnalog Filters: The Approximation23 Elliptic-Function (iii) The elliptic characteristics is

24 Franco MalobertiAnalog Filters: The Approximation24 Plot of the Elliptic Function clear all; n=5; eps=8; xmax=0.91; om1sq=0.1; om2sq=0.4; om3sq=0.65; om4sq=0.8; omega=linspace(0,xmax,200); for i=1:200 w=omega(i); Num=w*(om1sq-w*w)*(om2sq-w*w)*(om3sq-w*w)*(om4sq-w*w); Den=(1-om1sq*w*w)*(1-om2sq*w*w)*(1-om3sq*w*w)*(1-om4sq*w*w); R(i)=Num/Den; Ellip(i)=1/(1+(eps*R(i))^2); end plot(omega,Ellip); Pass Stop

25 Franco MalobertiAnalog Filters: The Approximation25 Determine the order of a Filter BUTTORD Butterworth filter order selection. [N, Wn] = BUTTORD(Wp, Ws, Rp, Rs) returns the order N of the lowest order digital Butterworth filter that loses no more than Rp dB in the passband and has at least Rs dB of attenuation in the stopband. Wp and Ws are the passband and stopband edge frequencies, normalized from 0 to 1 (where 1 corresponds to pi radians). For example, Lowpass: Wp =.1, Ws =.2 Highpass: Wp =.2, Ws =.1 Bandpass: Wp = [.1.8], Ws = [.2.7] Bandstop: Wp = [.2.7], Ws = [.1.8] BUTTORD also returns Wn, the Butterworth natural frequency (or, the "3 dB frequency") to use with BUTTER to achieve the specifications. [N, Wn] = BUTTORD(Wp, Ws, Rp, Rs, 's') does the computation for an analog filter, in which case Wp and Ws are in radians/second. »help buttord

26 Franco MalobertiAnalog Filters: The Approximation26 Verification »Butterorder N = 12 Wn = 166.7598 clear all; omega=linspace(0,1.2,200); n=12; for i=1:200 Butterw(i)=1/(1+omega(i)^(2*n)); end plot(omega,Butterw); Wp=80; Rp=10*log10(Butterw(Wp+1)); Ws=180; Rs=10*log10(Butterw(Ws)); [N, Wn] = buttord(Wp, Ws, Rp, Rs, 's') Butterorder

27 Franco MalobertiAnalog Filters: The Approximation27 Order of Chebishev or Elliptic filters [N, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs, 's') does the computation for an analog filter, in which case Wp and Ws are in radians/second. [N, Wn] = ELLIPORD(Wp, Ws, Rp, Rs, 's') does the computation for an analog filter, in which case Wp and Ws are in radians/second. clear all; Wp=2*pi; k=input('normalized stop frequency ') Ws=k*Wp; Rp=input('attenuation passband ') Rs=input('attenuation stopband ') [Nbutter, Wn] = BUTTORD (Wp, Ws, Rp, Rs, 's') [NCheb1, Wn] = CHEB1ORD(Wp, Ws, Rp, Rs, 's') [Nellip, Wn] = ELLIPORD(Wp, Ws, Rp, Rs, 's') Comparing the orders »OrderFilter normalized stop frequency 1.2 attenuation passband 0.2 attenuation stopband 25 Nbutter = 25 Wn = 6.7203 NCheb1 = 9 Wn = 6.2832 Nellip = 5 Wn = 6.2832

28 Franco MalobertiAnalog Filters: The Approximation28 Butter and Cheb with same specs stop frequency 1.2 attenuation PB 0.2 dB attenuation SB 25 dB Nbutter = 25 Wn = 6.7203 NCheb1 = 9 Wn = 6.2832

29 Franco MalobertiAnalog Filters: The Approximation29 Butter and Cheb with same specs (ii) clear all; point=2000; range=2; omega=linspace(0,range,point)+range/2/point; n=25; m=9; eps=0.186; k=6.7203/6.2832; for i=1:point Butter(i)=1/(1+(omega(i)/k)^(2*n)); C(i)=cos(m*acos(omega(i))); Cheb(i)=1/(1+(eps*C(i))^2); end plot(omega,Butter,omega,Cheb); Butter(1000) Cheb(1000) Butter(1200) Cheb(1200)


Download ppt "Analog Filters: The Approximation Franco Maloberti."

Similar presentations


Ads by Google