LECTURE 25 and MORE: Basic Ingredients of Butterworth Filtering INTRODUCTION: A SIMPLISTIC DESIGN OVERVIEW Objective: Design a second order low pass filter whose 3dB down point is f c,min 500 Hz or ω c,min 000π rad/s. Design constraint: only capacitors available are µf. Hey, what is this thing called ω c,min? Step. Choose a candidate circuit. Consider the second order circuit for which R s Ω whose transfer function is H cir (s) V out (s) V in (s) LC s 2 + L s + LC Step 2. Look up or compute (from specs) the so-called 3dBNLP (3dB normalized low pass) Butterworth 2 nd order filter transfer function: H 3dBNLP (s) s 2 + 2s + Where does this dude come from? Step 3. Match Coefficients and solve for L and C.
Lecture 24 Sp 5 2 R. A. DeCarlo LC s 2 + L s + LC s 2 + 2s + implies that L 2 H and C 2 F. Step 4. Frequency and magnitude scale to obtain final circuit values: C final C old K m K f 2 K m 000π 0 6 K m 03 2 π 450.6 C final µf, L final K m K f L old 0.03 H, and R s, final 450 Ω. Magnitude and frequency scaling???? Are we still responsible for that? PART BASIC TERMINOLOGY AND CONCEPTS. Definition: db attenuation or loss is (i) A(ω ) 0log 0 H filter ( jω ) 2 20log 0 H filter ( jω ) and db gain is (ii) G(ω ) 0log 0 H filter ( jω ) 2 20log 0 H filter ( jω ).
Lecture 24 Sp 5 3 R. A. DeCarlo 2. Definition: the loss function, denoted H filter (s), is the inverse of the transfer function, i.e., H filter (s). Thus db attenuation in terms of H filter (s) the loss function is: A(ω ) 0log 0 H filter ( jω ) 2 20log 0 H filter ( jω ). 3. General LP Filter Design Problem: (a) OBJECTIVES: (I) Construct a transfer function, H filter (s) H filter (s), i.e., equivalently construct the loss function H filter (s), that meets a given set of LP filter specs. (II) THEN construct a candidate circuit with transfer function H cir (s) H cir (s). H filter (s) H filter (s) and H cir (s) H cir (s) should have the same order. (III) Match coefficients so that H filter (s) H cir (s). (b) LP filter specifications: (i) The passband: 0 ω, ( is the passband edge frequency). Passband means frequency content of signal gets through. (ii) Maximum allowable db attenuation in in passband is A max, i.e., for 0 ω A(ω ) 0log 0 Hcir ( jω ) 2 A max
Lecture 24 Sp 5 4 R. A. DeCarlo (iii) Stopband: ω ( is the stopband edge frequency). Frequency content is attenuated. (iv) Minimum allowable attenuation in db over the stopband is A min, i.e., for ω, A min A(ω ) 0log 0 H cir ( jω ) 2 Remarks: (i) ω is called the transition band. (ii) H filter (s) denotes a transfer function that meets the filtering specs and H cir (s) denotes the transfer function of a candidate circuit in terms of the circuit parameters. (iii) the solution to the filtering problem is generally NOT unique in that there are many transfer functions H filter (s) that meet the specs and many circuits that can realize each of the transfer functions. (Chaos is alive and well.) 4. The Seven Faces of Brickwall LP Filter Specifications (seven is an exaggeration): (i) Actual LP Brickwall Spec in terms of loss or attenuation in db:
Lecture 24 Sp 5 5 R. A. DeCarlo (ii) Normalized LP (NLP) Brickwall Specs in terms of loss or attenuation in db: {, A max } and Ω s, A min ω. s
Lecture 24 Sp 5 6 R. A. DeCarlo (iii) 3dBNLP Brickwall Spec in terms of loss or attenuation in db:, 3dB, A min ω c. { } and Ω s 5. Basic Butterworth LP Filter Design PROTOCOL I given LP filter specs (, A max ) and (, A min ): Step. Compute normalized low pass (NLP) specifications: (Ω p, A max ) (, A max ) and (Ω s, A min ) ω s, A ω min. p Step 2. Compute minimum filter order meeting the specs according to the formula:
Lecture 24 Sp 5 7 R. A. DeCarlo n 0 0.A min log 0 0 0.A max log 0 log 0 0 0.A min 0 0.A max log 0 ( ) Ω s MATLAB COMMAND: nbuttord(wp, ws,amax,amin,'s') Step 3. Choose the proper Butterworth transfer function H 3dBNLP (s) from the table below: Order: n H 3dBNLP (s) s + 2 s 2 + 2s + 3 s 3 + 2s 2 + 2s + s + s 2 + s + MATLAB COMMANDS: [z,p,k] buttap(n) num k*poly(z) den poly(p) % H3dbNLP(s) has numerator coefficients num and denominator coefficients % den. Step 4. Choose ω c to satisfy ( 0 0.A ) max ω c,min ω c ω c,max ( 0 0.A min )
Lecture 24 Sp 5 8 R. A. DeCarlo Remarks: (i) H 3dBNLP (s) does NOT meet the NLP specifications above. (ii) H 3dBNLP (s) meets the specs: (Ω c, A max ) (,3dB) and (Ω s,c, A min ) ω s, A ω min c. (iii) In this course we choose ω c ω c,min when otherwise requested. ( 0 0.A ) max except Step 5. Choose an n-th order passive circuit having n-th order transfer function H cir (s) H cir (s, R k, L k,c k ) which in general will have a total of n capacitors and inductors. Go figure. Ordinarily this will be given to you by the mythical filter god, FILTO. Step 6. Match Coefficients so that H 3dBNLP (s) H cir (s, R k, L k,c k ), i.e., find non-unique values (in general) for the resistor, inductor, and capacitor values. Step 6. Frequency and Magnitude scale the circuit parameters by K f ω c,min and magnitude scale by an appropriately chosen K m. Remarks: (i) Notice that we NEVER compute the actual filter transfer function!!!! (ii) There are two normalized transfer function forms: H 3dBNLP (s) and H NLP (s). The purpose of having TWO normalized transfer functions (which ARE different) is to obfuscate the student learning process. Not really, but obfuscation happens.
Lecture 24 Sp 5 9 R. A. DeCarlo Example. Design a first order Butterworth filter-circuit having 3 db cut off of 4000 rad/s. If the circuit contains a capacitor, then its value should be 0. microfarad; if the circuit contains an inductor then the inductor value should be 0. H. Strategy: There is no need to compute the filter order since the customer has specified the order a priori. Step : What is first order 3dB NLP Butterworth filter transfer function? ANSWER: H 3dBNLP (s) s +. Step 2: Pick a Candidate Circuit : Step 3: Compute circuit transfer function. H cir (s) Cs R s + Cs R s C s + R s C Remark: without loss of generality, we set R s Ω. Step 4: Match Coefficients H cir (s) H 3dBNLP (s).
Lecture 24 Sp 5 0 R. A. DeCarlo H cir (s) C s + C s + implies C F Step 5: Frequency and Magnitude Scale circuit components. (i) By design, K f 3000. (ii) By the design constraint: C final 0. 0 6 C old K m K f K m C old C final K f 03 0. 4 2500 (iii) C final 0. µf and R s, final 2500 Ω. ALTERNATE CIRCUIT REALIZATION Step 2: Pick a Candidate Circuit 2: Step 3: Compute circuit transfer function. H cir (s) L s + L
Lecture 24 Sp 5 R. A. DeCarlo Step 4: Match Coefficients H cir (s) H 3dBNLP (s). L H. Step 5: Frequency and Magnitude Scale circuit components. (i) By design, K f 4000. (ii) By the design constraint: L final 0. K m L old K f K m K f L final L old 400 (iii) L final 0. H and R s, final 400 Ω. Exercise. Using the leaky integrator op amp circuit, design a 3dB NLP first order Butterworh filter circuit for which H cir (s). Then magnitude and s + frequency scale so that the 3dB down frequency is ω c,min 4000 rads/s and capacitor is 0. µf. What are the new resistor values? PART 2 PROBABLY (OR POSSIBLE) REASONINGS OF MR. BUTTERWORTH. The loss magnitude response of a LP filter ought to be a polynomial in ω, as a first guess anyway. So how about something like: H LP ( jω ) 2 + 2 ω where n is the filter order and is a constant to be determined from the specs.
Lecture 24 Sp 5 2 R. A. DeCarlo 2. Better yet, how about a slightly different normalization which uses something more pertinent than some unknown constant called : H LP ( jω ) 2 + ω ω c + 2 ω where again ω c is that illusive 3 db down point and n the filter order both must be determined from the specs. 3. Given the above form, the loss in db of our LP filter is A(ω ) 0log 0 + ω ω c ( )! 0log 0 + Ω 0log 0 H 3dBNLP ( jω) 2 where Ω ω ω c is called 3dB normalized frequency. PART 3 DETERMINATION OF n AND ω c.. Show that the filter order is n 0 0.A min log 0 0 0.A max log 0 Step. Use pass band edge frequency spec:
Lecture 24 Sp 5 3 R. A. DeCarlo A max A( ) 0log 0 + ω p ω c After a bunch of algebra, 0 0.A max ω p Step 2. Use stop band edge frequency spec: ω c A min A( ) 0log 0 + ω s ω c n After a bunch of algebra, 0 0.A min ω s ω c n Step 3. Taking the appropriate ratio so that the unknown ω c disappears 0 0.A min 0 0.A max ω c ω c Step 4. Solve for n. After some algebra: n n n
Lecture 24 Sp 5 4 R. A. DeCarlo n 0 0.A min log 0 0 0.A max log 0 2. Show that ( 0 0.A ) max ω c,min ω ω c,max ( 0 0.A min ) (a) A max 0log 0 + ω c,min implies that ω c,min ( 0 0.A ) max.
Lecture 24 Sp 5 5 R. A. DeCarlo (b) A min 0log 0 + ω c,max implies that ω c,max ( 0 0.A min ) Remark: So what ω c do we use???? As mentioned earlier we choose ω c ω c,min. PART 4 An Example on the complexity of computing H 3dBNLP (s) by computing the loss function H 3dBNLP (s). Recall: A(ω ) 0log 0 + Ω 0log 0 H( jω) 2 where Ω ω ω c is normalized frequency, i.e., as per Mr. Butterworth s musings: + Ω H( jω) 2 Step. Using the definition of the magnitude-squared of a complex number, + Ω H 3dBNLP ( jω) 2 H 3dBNLP ( jω) H 3dBNLP ( jω) H 3dBNLP (s) H 3dBNLP ( s) s jω Step 2. Given that s jω, one can solve for Ω js. Thus we have Step 3. So if n, + Ω Ω js H 3dBNLP (s) H 3dBNLP ( s)
Lecture 24 Sp 5 6 R. A. DeCarlo H 3dBNLP (s) H 3dBNLP ( s) + ( js) 2 s 2 (+ s)( s) Since all our filters must be STABLE, we conclude that H 3dBNLP (s) s + in which case the first order Butterworth 3dB NLP transfer function is: H 3dBNLP (s) s + Step 4. This transfer function can be realized by either of the circuits below with all parameter values set to. or