How to get rid of peaking in analog filter example? - Page 1
Forum section: electronics / beginners

author: Yuu
author_rank: Regular Contributor
timestamp: October 01, 2023, 04:32:45 pm
content: Hello, I'm reading Valkenburg's Analog filter design book and I simulated example 3.11. Green is output at R5.It's a bandstop filter that works alright but as you can see there is peaking at around 2 and 5 MHz. That's undesirable. How do you get rid of that?I know how to compensate for single gain stages. You basically want the op-amp to be a unity-gain buffer at high frequencies. Well, these things already have high-ish value caps across them!Valkenburg basically says "oh if the ringing isn't acceptable just replace the op-amp with a faster one." In the example he goes from an LM741 to a HA2542-2. Well, these OPA things I'm simulating with should be decently fast (well, larger bandwidth) AND unity-gain stable so I don't see what the issue is.

author: Yuu
author_rank: Regular Contributor
timestamp: October 02, 2023, 10:48:24 pm
content: Tried a different op-amp and it changed the peak locations. Definitely something going with the filter capacitors making poles with the op-amp internals or something. I'll continue chugging along in the book but it makes me wonder how the heck anyone makes analog filters without making a high frequency oscillator.

author: Benta
author_rank: Super Contributor
timestamp: October 02, 2023, 11:29:16 pm
content: Is this a question? Your filter behaves exactly as Schaumann/Valkenburg predict.

author: Yuu
author_rank: Regular Contributor
timestamp: October 02, 2023, 11:49:27 pm
content: Quote from: Benta on October 02, 2023, 11:29:16 pmQuote from: Yuu on October 01, 2023, 04:32:45 pm

author: Benta
author_rank: Super Contributor
timestamp: October 03, 2023, 07:36:19 pm
content: Well, Valkenburg already answered it.Seriously, that filter topology is so weird, I've never seen it used in practice (that probably also explains the lack of responses).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 03, 2023, 08:09:23 pm
content: Well, try adding some resistance (realistic, or intentional). What's source resistance? If it's zero, note it has a direct connection to the output at high frequency. Op-amps are both inductive at the output (impedance rises with frequency) and lose gain at HF, doubly skewing the transfer function you might've expected. Consider the effect of this against the capacitors, and ground-return paths (that is, ground by AC superposition, so, including the source itself, or intended-but-not-ideal virtual grounds of the amp inputs, etc.).As hinted, there are better ways to make band-cut or -stop filters, especially with greater notch depth, should that be of interest.Tim

author: Benta
author_rank: Super Contributor
timestamp: October 03, 2023, 10:08:25 pm
content: Quote from: T3sl4co1l on October 03, 2023, 08:09:23 pmGood observation.Allow me to quote Valkenburg directly concerning this filter:"Experimentally, the circuit's performance is indeed as specified until approximately 100 kHz. At higher frequencies, Figure 3.46b shows peaking in the transfer function caused by higher-order poles in the opamp model. This behaviour may or may not be acceptable in practice; if it is not acceptable, a faster opamp must be used. Figure 3.46c shows the performane obtained with HA2542-2(*) opamps, it is ideal until 1 MHz."The example in the book uses 741s and shows a 160...1600 Hz band stop filter.My translation of the quote above:"This is not a good filter topology, throwing expensive opamps at it will just move the problems out of sight."(*): 70 MHz amps!

author: Yuu
author_rank: Regular Contributor
timestamp: October 03, 2023, 11:22:16 pm
content: Quote from: T3sl4co1l on October 03, 2023, 08:09:23 pmHmmm okay so you're saying there's effectively a series inductor on the op-amp output which likely forms an oscillator with the four capacitors used in filter?Quote from: Benta on October 03, 2023, 10:08:25 pmI didn't realize that HA-2542 was 70 MHz! That's pretty large GBW compared to the op-amps I've dealt with. I thought throwing something in there with ~30x the GBW of an LM741 would do the trick but maybe not if that HA-2542 is 70x GBW.Anyway Benta the reason I didn't like Valkenburg's answer and was confused was it was basically "throw a larger GBW op-amp in there!" Well I did and I still had the same problem!I wonder if the HA-2542 would also have oscillations but just higher frequency. In other words, problems still exist but maybe harder to see.Anyway, thank you guys. Sorry to trouble with the filter question. I didn't realize it was weird topology. I just thought it was a simple, not very effective, but at least implementable-without-weird-peaking sort of thing.

author: Benta
author_rank: Super Contributor
timestamp: October 03, 2023, 11:48:23 pm
content: Glad to help.Before going further with Valkenburg, I suggest you read this excellent application note from TI:https://www.ti.com/lit/an/sloa049d/sloa049d.pdfIt focuses on the two most common 2nd-order active filter topologies:1: The finite-gain filter (aka Sallen-Key).2: The multiple-feedback filter (aka MFB).Pay attention to p.14 and p.15Cheers.

author: BillyO
author_rank: Super Contributor
timestamp: October 04, 2023, 12:21:26 am
content: You are never going to make it perfect.What is your required BW?Have you tried putting in low pass filtering that kicks in around 1MHz?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 04, 2023, 12:55:47 am
content: Quote from: Yuu on October 03, 2023, 11:22:16 pmMaybe not an oscillator outright, but a typical way that peaking shows up, particularly for capacitive loads.The inductive characteristic is also in part a product of the higher poles within the amp, so these aren't exclusive explanations, but different aspects of the same underlying thing (transfer and output characteristics of the amp itself).Tim

author: Yuu
author_rank: Regular Contributor
timestamp: October 04, 2023, 01:28:48 am
content: Quote from: BillyO on October 04, 2023, 12:21:26 amAh not a bad idea. Modeling some source resistance (even just 5 ohms) and putting a capacitor to ground in LP config helped reduce those peaks below unity gain AFTER the desired filter response.Also, I think the virtual grounds of the op-amps were doing some interesting business and I can kind of see that now like what T3sl4co1l was talking about.This is cool. I'm learning from this.