Franklin W. Olin College of Engineering Needham, Massachusetts Electrical and Computer Engineering ENGR2410 – Signals and Systems Problem Set 8 Posted Saturday, April 4 Due Thursday, April 9 in class Problem 1: Design a bandpass filter using a single opamp. Use both the Sallen-Key and multiple feedback architectures. For each architecture, explore the range of filters that you can obtain. What are the relative advantages of each? Show at least two examples of each architecture. For each example, use Matlab to show the Bode plot, step response and pole-zero map. The links below can help you get started, but feel free to use any others. Remember to indicate clearly which source(s) you use. • http://www.analog.com/Wizard/filter/detail_filter_help.pdf\#multiple • http://www.analog.com/en/design-tools/dt-adisim-design-sim-tool/design -center/dt-adisim-design-sim-tool/Filter_Wizard/resources/fca.html • http://www.maxim-ic.com/appnotes.cfm/an_pk/1762 Solution All second order filters can be characterized by their gain (G), quality factor (Q), and center frequency (ω0 ). These factors fit into the transfer function as follows. G ωQ0 s H(s) = 2 s + ωQ0 s + ω02 G = s+ ω0 2Q + r ω0 2Q 2 ω0 Q s ! − ω02 s+ ω0 2Q − r ω0 2Q 2 ! − ω02 Before we go onto Sallen-Key and Multiple Feedback topologies, let’s remind ourselves how changing Q and ω0 changes Bode plots, step responses, and pole-zero maps. 2 We know intuitively that changing ω0 changes the center of the high-gain region of a band-pass filter. As we see, changing Q can also change the way the gain is shaped in that area, and how sharp the drop-off is in phase change. This in turn changes the oscillations of the step response, etc. Cool! Now we know how theoretically we want to control these things; what’s more interesting now is how different circuits manage to handle this. The Sallen-Key circuit diagram: 3 Note that in www.analog.com, the version of Sallen-Key bandpass has the capacitors reversed. According to the great Kent Lundberg, this is wrong. Instead, we will refer to Kendall Su’s book, where the parameters are controlled as follows: r ω0 = Q = G = R1 + R2 R1 R2 R3 C1 C2 ω0 1 1 + R3 C2 + R31C1 + R 1 C1 1−µ R2 C1 µ R1 C1 1 R 1 C1 + 1 R3 C2 + 1 R 3 C1 + 1−µ R2 C1 By iterating through some possibilities, we can generate some cool plots. The following plots hold default values of R1 = R2 = R3 = C1 = C2 = µ = 1, with changed values specified in the legend or title. 4 5 Against common perception, as you can see, it is possible for Sallen-Key to achieve all sorts of crazy conformations, but it is not a very exact science. There are a lot of advantages to using Sallen-Key, but in general, the filter is not easily tuned. For multiple feedback filters, the topology is: where the transfer function parameters are defined as follows: 6 ω0 = √ 1 R1 R2 C1 C2 q Q = q G = R2 R1 C2 C1 + q C1 C2 R2 C1 R1 (C1 + C2 ) Again, let’s mess with the parameters. Again, the default parameters in these plots are R1 = R2 = C1 = C2 = 1, unless otherwise indicated by the legend or title. 7 8 Comments about both filters (via Boris) They are both configurable by component choices. If you choose in a way that you get the same parameters (Q , center frequency and gain), they will work the same way. • The Sallen-Key has the advantage of having a specific gain that provides a more easily accessible knob for changing Q and gain. • For the Sallen-Key topology, all 3 parameters are interdependent. • For the MFB topology, it is possible to set the center frequency and Q independently. • The gain is set by this choice, but can then be reduced with an additional resistor. • Q can be set to infinity (easily for the Sallen-Key), but, in real life, wont get there due to components not being exactly their advertised values. • Sallen-Key uses a particular gain. • Since this gain is assumed to be exact, this topology is sensitive to changes in the gain. 9 • MFB assumes infinite gain given a large op-amp gain, it is insensitive to variation in the op-amp gain. • For a Sallen-Key with a gain of 1, it is less sensitive to component values than the MFB topology; however only small Qs can be achieved. • For a Sallen-key with non-unity gain (higher Q), it can be more sensitive to component values than the MFB topology. • For MFB filters, large Q comes at the cost of large component spread. Problem 2: You are asked to stabilize the system H(s) = s2 1 − 0.01s + 1 A. Plot the step response and pole-zero map of this system using Matlab. Solution 10 Note that the poles in the system lie in the right-hand plane of the pole-zero map–hence the system’s instability. B. Use the pole-zero map to show the effect of using proportional control on this system. Show the step response of at least two feedback gains to illustrate. Can you stabilize the system? Solution From ModCon, we remember how a simple proportional control system works: To find the transfer function of this system, we use Black’s equation: 11 HX HX + 1 X = Kp Kp H G = Kp H + 1 G = = = Kp s2 −0.01s+1 Kp + s2 −0.01s+1 s2 1 Kp − 0.01s + 1 + Kp Again, using our fun MatLab friends, we’ll do some analysis for Kp = .0001 and Kp = 1000. 12 These are some samples of some possible plots. What’s important to note here is that no matter how we try, we can’t get those poles to go to the left of the y-axis, and therefore can never achieve stability. In fact, if we just go through with the quadratic equation, we can find the poles: sp r 0.012 0.01 ± − (1 + kp )2 = 2 4 ≈ 0.005 ± j|1 + kp | Given kp > 0, R{sp } = 0.005 And no matter what, 0.005 > 0 C. Repeat part B using integral control. Solution Now, we’re looking at this system: 13 and we again find the transfer function using Black’s Formula: HX HX + 1 Ki X = s G = G = = = HKi s Ki H + s 1 Ki s(s2 −0.01s+1) Ki + s(s2 −0.01s+1) s3 1 Ki − 0.01s2 + s + Ki Let’s plot some MATLab: 14 Again, there really doesn’t seem to be a way to stabilize the system. If you keep trying different values, you’ll again notice that the poles never move to the left of the y-axis, so again, no chance for stability. D. Repeat part B using differential (or derivative) control. Solution New block diagram: Transfer function via Black’s: 15 HX HX + 1 X = sKd sKd H G = sKd H + 1 G = = sKd s2 −0.01s+1 sKd + s2 −0.01s+1 1 sKd − 0.01s + 1 + sKd sKd = 2 s + (Kd − 0.01)s + 1 = s2 MatLab fun: 16 Hey, cool! In this case, we can stabilize the system! Let’s do some quick quadratic fun to find the poles: sp r (Kd − 0.01)2 0.01 − Kd = ± − 12 2 4 r 0.01 − Kd (Kd − 0.01)2 ± −1 = 2 4 For Kd > 0.01, R{sp } < 0, finally allowing some stability! Let’s actually look at this special case: 17 Interesting! When the poles are exactly on the y-axis, the system neither converges nor diverges! How cool! 18