USC Electrical Engineering ELCT 301 Project 44#1 BUTTERWORTH FILTER DESIGN Objective The main purpose of this laboratory exercise is to learn the procedures for designing Butterworth filters. In addition, the theory behind these procedures will be discussed in recitation and the hands-on methods practiced in the laboratory. This exercise will focus on the fourth-order filter but the methods are valid regardless of the order of the filter. In this lab only even order filters will be considered. Background Read pgg.728-738 Hambley or pgg.1254-1267 Sedra Smith and the handout. The Butterworth and Chebyshev filters are high order filter designs which have significantly different characteristics, but both can be realized by using simple first order or biquad stages cascaded together to achieve the desired order, passband response, and cut-off frequency. The Butterworth filter has a maximally flat response, i.e., no passband ripple and a roll-off of -20dB per pole. In the Butterworth scheme the designer is usually optimizing the flatness of the passband response at the expense of roll-off. The Chebyshev filter displays a much steeper roll-off, but the gain in the passband is not constant. The Chebyshev filter is characterized by a significant passband ripple that often can be ignored. The designer in this case is optimizing roll-off at the expense of passband ripple. Both filter types can be implemented using the simple Sallen-Key configuration. The Sallen-Key design (shown in Figure A-1) is a biquadratic or biquad type filter, meaning there are two poles defined by the circuit transfer function H ( s) H0 , ( s / 0 ) (1 / Q )( s / 0 ) 1 2 (1) where H0 is the DC gain of the biquad circuit and is a function only of the ratio of the two resistors connected to the negative input of the opamp. The quantity Q is called the quality factor and is a direct measure of the flatness of the passband (in particular, a large value of Q indicates peaking at the edge of the passband.) When C1 = C2 = C and R1 = R2 =R for the Sallen-Key design, the value of Q depends exclusively on the gain of the opamp stage and the cut-off frequency depends on R and C, or © 2007 Santi Q 1 , (3 H 0 ) fC 1 2 RC and (2) . (3) 1 USC Electrical Engineering ELCT 301 Project 44#1 Notice that the quality factor Q and the DC gain H0 cannot be independently set in the Sallen-Key circuit. Choice of the value of Q depends on the desired characteristics of the filter. In particular the designer must consider both the quality and the stability of the circuit. Calculations with different values of Q demonstrate that for the second order case the flattest response occurs when Q = 0.707, hence the maximally flat response of the Butterworth filter will also be realized when Q = 0.707. In addition the circuit is only stable when H0 < 3. Higher values will result in poles in the right half-plane and an unstable circuit. The Butterworth filter is an optimal filter with maximally flat response in the passband. The magnitude of the frequency response of this family of filters can be written as H( f ) H0 1 f / fC 2n (4) , where n is the order of the filter and fc is the cutoff frequency . For a single biquad section, i.e., n = 2, the gain for which Q will equal 0.707, and hence yield a Butterworth type response, is found to be 1.586 from equation (2). In the case of a fourth order Butterworth filter (n = 4), the correct response can be achieved by cascading two biquad stages. Each stage must be characterized by a specific value of gain (or Q) that achieves both a flat response and stability. For a fourth order Butterworth filter, the Q factors of the two stages must be Q = 0.541 and Q = 1.307. From (2) it follows that one stage must have a gain of 1.152 and the other stage a gain of 2.235. As a result the overall DC gain of the fourth-order Butterworth realized with two biquad stages will be equal to the product of the DC gain of the two stages, i.e., 2.575. The gain values required to cascade biquad sections to achieve even-order filters are given in Table A-I. Note that the number of biquad stages needed to realize a filter of order n is n/2. Other types of filters such as high pass, and bandpass filters can be designed the same way, i.e., by cascading the appropriate filter sections to achieve the desired bandpass and roll-off. The high-pass dual to the Sallen-Key low pass filter can be realized by simply exchanging the positions of R and C in the circuit of Figure A-1. Prelab 1. Do the following four paper designs and write all component values in your lab notebook using the corner frequency assigned to you on the class webpage: a. Second order lowpass filter b. Fourth order lowpass filter c. Second order highpass filter d. Fourth order highpass filter 2. What is the passband gain of the four filters? Is it 0dB (gain of 1) or not? © 2007 Santi 2 USC Electrical Engineering ELCT 301 Project 44#1 3. Simulate the two fourth order filters using Spice. Produce Bode plots for magnitude and phase for the two filters. 4. In Spice apply to the lowpass filter a 1V square wave and simulate the response of the lowpass filter. Do this for three cases: square wave frequency equal to 0.1 fc, 0.5 fc, and fc, where fc is the cutoff frequency of the lowpass filter. Comment on the results. 5. In the lab you will have to measure the frequency response of the filter. You will measure a total of 20 points. Select 20 frequencies equally spaced on a log scale centered around the cutoff frequency, starting one decade below and ending one decade above the cutoff frequency. For example, if you were choosing 5 points only, you would select the following points: 0.1fc - 0.316 fc - fc - 3.16 fc - 10 fc . Lab Project 1. Build the fourth-order lowpass Butterworth filter you designed for the Prelab. Notice that there are quite a few components. Try to be orderly and test the Sallen Key sections one at a time. 2. Measure the cutoff frequency of the lowpass filter using the following procedure: measure the low-frequency gain for a sinusoidal input and increase the frequency until the gain drops by 3 dB. That is the definition of cutoff frequency. 3. Make the measurements needed to create a magnitude and phase Bode plot of the filter frequency response. Apply a 1-Volt sinusoidal signal at the frequencies you calculated in the prelab, observe input and output and measure gain and phase shift. 4. Perform a preliminary check comparing the response to the model predictions from the prelab. 5. For the lowpass filter perform experimentally step 4 of the prelab (square wave response). Compare with simulation. 6. Exchange resistors R1, R2 and capacitors C1, C2 and make a few measurements to verify that the circuit becomes a highpass filter. Determine the cutoff frequency. Lab Report In the lab report discuss the cutoff frequency measurement that you made. Based on component tolerances, predict the expected range of values that you would expect to see and comment on your actual measurement. Create a magnitude and phase Bode plot based on your experimental measurements. Make sure you use the correct scales for the axes (for example the magnitude Bode plot is a log-log plot with the y-axis expressed in dB). Compare the frequency response results with Spice results and discuss. Report also on the lowpass filter square wave response, both the simulation and experimental results. Explain the result. © 2007 Santi 3 USC Electrical Engineering ELCT 301 Project 44#1 Appendix C2 R1 R2 + VIN VOUT (H0-1)Rf C1 Rf Figure A-1 The Sallen-Key lowpass filter For R R1 R2 and C C1 C 2 the Sallen Key filter has a gain H ( s) H0 1 RCs (3 H 0 ) ( RC ) 2 s 2 This transfer function can be written in normalized pole-zero form as H ( s) 1 H0 1 with Q and 0 2f c 2 s s RC (3 H 0 ) 1 2 0Q 0 Notice that the DC gain H0 and the Q of the filter cannot be independently set. Poles 2 4 6 8 © 2007 Santi Butterworth Chebyshev (0.5dB) Chebyshev (2.0dB) (DC Gain H0) n Gain n Gain 1.586 1.231 1.842 0.907 2.114 1.152 0.597 1.582 0.471 1.924 2.235 1.031 2.660 0.964 2.782 1.068 0.396 1.537 0.316 1.891 1.586 0.768 2.448 0.730 2.648 2.483 1.011 2.846 0.983 2.904 1.038 0.297 1.522 0.238 1.879 1.337 0.599 2.379 0.572 2.605 1.889 0.861 2.711 0.842 2.821 2.610 1.006 2.913 0.990 2.946 Table I Design Table for Butterworth and Chebyshev filters 4 USC Electrical Engineering ELCT 301 Project 44#1 Butterworth Design Example Design Example. You want to design a fourth-order Butterworth filter having a corner frequency fc = 3kHz. Specify all component values needed for the design. You need to use two cascaded Sallen-Key second-order sections. We will call them section A and section B. From the Table above the DC gains of the two sections are: H 0 A 1.152 H 0 B 2.235 For each section we need to decide values for capacitor C and resistors R, Rf and ( H 0 1) R f . We can arbitrarily select values for C and Rf. Let us choose C = 10nF and Rf = 10k. The corner frequency of the R-C filter must be 3kHz and therefore R 1 5.3k 5.1k 2Cf c where the last value is a standard 5% resistor value. So resistors R1 and R2 will have this value. Regarding the feedback resistors the values are: ( H 0 A 1) R f 1.52k 1.5k ( H 0 B 1) R f 12.35k 12k Comment: how do you choose the arbitrary values for C and Rf? Typically you want all resistors to be in the range 1k - 1M (this is related to the output current capability of opamps) and capacitors to be in the range 100pF – 100nF, so that you can use standard plastic capacitors. © 2007 Santi 5 USC Electrical Engineering ELCT 301 44#1 © 2007 Santi 6 Project