Author Topic: How to get rid of peaking in analog filter example?  (Read 1489 times)

0 Members and 1 Guest are viewing this topic.

Offline YuuTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
How to get rid of peaking in analog filter example?
« on: October 01, 2023, 04:32:45 pm »
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.
« Last Edit: October 01, 2023, 04:35:36 pm by Yuu »
 

Offline YuuTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: How to get rid of peaking in analog filter example?
« Reply #1 on: October 02, 2023, 10:48:24 pm »
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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6306
  • Country: de
Re: How to get rid of peaking in analog filter example?
« Reply #2 on: October 02, 2023, 11:29:16 pm »
Is this a question? Your filter behaves exactly as Schaumann/Valkenburg predict.
 

Offline YuuTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: How to get rid of peaking in analog filter example?
« Reply #3 on: October 02, 2023, 11:49:27 pm »
Is this a question? Your filter behaves exactly as Schaumann/Valkenburg predict.

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?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6306
  • Country: de
Re: How to get rid of peaking in analog filter example?
« Reply #4 on: October 03, 2023, 07:36:19 pm »
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).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How to get rid of peaking in analog filter example?
« Reply #5 on: October 03, 2023, 08:09:23 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: Yuu

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6306
  • Country: de
Re: How to get rid of peaking in analog filter example?
« Reply #6 on: October 03, 2023, 10:08:25 pm »
note it has a direct connection to the output at high frequency.
Good 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!
 
The following users thanked this post: Yuu

Offline YuuTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: How to get rid of peaking in analog filter example?
« Reply #7 on: October 03, 2023, 11:22:16 pm »
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.).

Hmmm 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?

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!
I 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.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6306
  • Country: de
Re: How to get rid of peaking in analog filter example?
« Reply #8 on: October 03, 2023, 11:48:23 pm »
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.pdf
It 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.15

Cheers.
 

Offline BillyO

  • Super Contributor
  • ***
  • Posts: 1803
  • Country: ca
Re: How to get rid of peaking in analog filter example?
« Reply #9 on: October 04, 2023, 12:21:26 am »
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?
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22436
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: How to get rid of peaking in analog filter example?
« Reply #10 on: October 04, 2023, 12:55:47 am »
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.).

Hmmm 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?

Maybe 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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline YuuTopic starter

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: How to get rid of peaking in analog filter example?
« Reply #11 on: October 04, 2023, 01:28:48 am »
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?

Ah 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf