Forums

State variable notch filter.

Started by George Herold August 31, 2016
I was trying to turn a previous SV filter into a notch,
(Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.)
I was thinking of just subtracting the BP from the input.
But almost all the web stuff I could find said add 
the HP and LP.  (That seemed crazy to me, at high Q both
those are peaking.. but then again the SV filter seems a bit 
crazy to me... two integraters in a row, come on. :^)

So I first summed the LP and HP, (it was easier,
than the BP, no invert and divide the signal by the 
Q.)  Amazingly it worked.  Unfortunately the depth of the 
notch varied inversely with the Q... At high Q the notch 
was not deep.  (It's probably losses in the capacitors.)
At a Q of 20 and 500 mV input min on the notch was 25 mV.

Depressing.  

Anyway I then flipped over the BP, attenuated it by ~Q 
(with a pot to tweak the attenuation) and summed it with the 
input. That made a much better notch.  ~5mV at Q=20, (500 mV in) 
I didn't have time to check other Q's.  

The thing that stinks about this notch, is that the high 
Q means I have to throw away dynamic range on the input.  
Is there a high Q, lower gain band pass filter.... 
(I'm seeing Tim W., "Why not... A/D -> uC -> D/A " 
or do you also suffer dynamic range issues when implementing
a notch in digital space?) 

George H. 
On Wed, 31 Aug 2016 17:00:07 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

>I was trying to turn a previous SV filter into a notch, >(Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) >I was thinking of just subtracting the BP from the input. >But almost all the web stuff I could find said add >the HP and LP. (That seemed crazy to me, at high Q both >those are peaking.. but then again the SV filter seems a bit >crazy to me... two integraters in a row, come on. :^) > >So I first summed the LP and HP, (it was easier, >than the BP, no invert and divide the signal by the >Q.) Amazingly it worked. Unfortunately the depth of the >notch varied inversely with the Q... At high Q the notch >was not deep. (It's probably losses in the capacitors.) >At a Q of 20 and 500 mV input min on the notch was 25 mV. > >Depressing. > >Anyway I then flipped over the BP, attenuated it by ~Q >(with a pot to tweak the attenuation) and summed it with the >input. That made a much better notch. ~5mV at Q=20, (500 mV in) >I didn't have time to check other Q's. > >The thing that stinks about this notch, is that the high >Q means I have to throw away dynamic range on the input. >Is there a high Q, lower gain band pass filter.... >(I'm seeing Tim W., "Why not... A/D -> uC -> D/A " >or do you also suffer dynamic range issues when implementing >a notch in digital space?) > >George H.
Instead of tinkering why don't you do the math ?>:-} It's Veal Marsala and wine time, so I'll crank you out something later, with orthogonal adjustments... Can we start with assuming you have 4 OpAmp sections? ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website.
On Wed, 31 Aug 2016 17:33:07 -0700, Jim Thompson
<To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> wrote:

>On Wed, 31 Aug 2016 17:00:07 -0700 (PDT), George Herold ><gherold@teachspin.com> wrote: > >>I was trying to turn a previous SV filter into a notch, >>(Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) >>I was thinking of just subtracting the BP from the input. >>But almost all the web stuff I could find said add >>the HP and LP. (That seemed crazy to me, at high Q both >>those are peaking.. but then again the SV filter seems a bit >>crazy to me... two integraters in a row, come on. :^) >> >>So I first summed the LP and HP, (it was easier, >>than the BP, no invert and divide the signal by the >>Q.) Amazingly it worked. Unfortunately the depth of the >>notch varied inversely with the Q... At high Q the notch >>was not deep. (It's probably losses in the capacitors.) >>At a Q of 20 and 500 mV input min on the notch was 25 mV. >> >>Depressing. >> >>Anyway I then flipped over the BP, attenuated it by ~Q >>(with a pot to tweak the attenuation) and summed it with the >>input. That made a much better notch. ~5mV at Q=20, (500 mV in) >>I didn't have time to check other Q's. >> >>The thing that stinks about this notch, is that the high >>Q means I have to throw away dynamic range on the input. >>Is there a high Q, lower gain band pass filter.... >>(I'm seeing Tim W., "Why not... A/D -> uC -> D/A " >>or do you also suffer dynamic range issues when implementing >>a notch in digital space?) >> >>George H. > >Instead of tinkering why don't you do the math ?>:-} > >It's Veal Marsala and wine time, so I'll crank you out something >later, with orthogonal adjustments... > >Can we start with assuming you have 4 OpAmp sections? > > ...Jim Thompson
Nevermind, it's already done, see GyratorFilterNotch.pdf on the S.E.D/Schematics Page of my website. Just add an input buffer and an output buffer (using up 4 OpAmp sections) and you're done. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Age gets better with wine!
On Wednesday, August 31, 2016 at 8:33:20 PM UTC-4, Jim Thompson wrote:
> On Wed, 31 Aug 2016 17:00:07 -0700 (PDT), George Herold > <gherold@teachspin.com> wrote: > > >I was trying to turn a previous SV filter into a notch, > >(Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) > >I was thinking of just subtracting the BP from the input. > >But almost all the web stuff I could find said add > >the HP and LP. (That seemed crazy to me, at high Q both > >those are peaking.. but then again the SV filter seems a bit > >crazy to me... two integraters in a row, come on. :^) > > > >So I first summed the LP and HP, (it was easier, > >than the BP, no invert and divide the signal by the > >Q.) Amazingly it worked. Unfortunately the depth of the > >notch varied inversely with the Q... At high Q the notch > >was not deep. (It's probably losses in the capacitors.) > >At a Q of 20 and 500 mV input min on the notch was 25 mV. > > > >Depressing. > > > >Anyway I then flipped over the BP, attenuated it by ~Q > >(with a pot to tweak the attenuation) and summed it with the > >input. That made a much better notch. ~5mV at Q=20, (500 mV in) > >I didn't have time to check other Q's. > > > >The thing that stinks about this notch, is that the high > >Q means I have to throw away dynamic range on the input. > >Is there a high Q, lower gain band pass filter.... > >(I'm seeing Tim W., "Why not... A/D -> uC -> D/A " > >or do you also suffer dynamic range issues when implementing > >a notch in digital space?) > > > >George H. > > Instead of tinkering why don't you do the math ?>:-} > > It's Veal Marsala and wine time, so I'll crank you out something > later, with orthogonal adjustments... > > Can we start with assuming you have 4 OpAmp sections?
Yeah.. well I'm now using 5 or 6. There are 4 (a qaud) in the original SV. The first is a buffer, 10M to ground. And now I've tacked a floating dual on top. An inverter (and divider) on the BP that I then sum with the input. (I'll post a pic, typical hair ball...) I think as long as I put some gain behind the filter section, the dynamic range loss is not a problem. I really love the SV filters separate Q and frequency adjustment. George H.
> > ...Jim Thompson > -- > | James E.Thompson | mens | > | Analog Innovations | et | > | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | > | San Tan Valley, AZ 85142 Skype: Contacts Only | | > | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | > | E-mail Icon at http://www.analog-innovations.com | 1962 | > > I'm looking for work... see my website.
On Wed, 31 Aug 2016 17:55:12 -0700 (PDT), George Herold
<gherold@teachspin.com> wrote:

>On Wednesday, August 31, 2016 at 8:33:20 PM UTC-4, Jim Thompson wrote: >> On Wed, 31 Aug 2016 17:00:07 -0700 (PDT), George Herold >> <gherold@teachspin.com> wrote: >> >> >I was trying to turn a previous SV filter into a notch, >> >(Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) >> >I was thinking of just subtracting the BP from the input. >> >But almost all the web stuff I could find said add >> >the HP and LP. (That seemed crazy to me, at high Q both >> >those are peaking.. but then again the SV filter seems a bit >> >crazy to me... two integraters in a row, come on. :^) >> > >> >So I first summed the LP and HP, (it was easier, >> >than the BP, no invert and divide the signal by the >> >Q.) Amazingly it worked. Unfortunately the depth of the >> >notch varied inversely with the Q... At high Q the notch >> >was not deep. (It's probably losses in the capacitors.) >> >At a Q of 20 and 500 mV input min on the notch was 25 mV. >> > >> >Depressing. >> > >> >Anyway I then flipped over the BP, attenuated it by ~Q >> >(with a pot to tweak the attenuation) and summed it with the >> >input. That made a much better notch. ~5mV at Q=20, (500 mV in) >> >I didn't have time to check other Q's. >> > >> >The thing that stinks about this notch, is that the high >> >Q means I have to throw away dynamic range on the input. >> >Is there a high Q, lower gain band pass filter.... >> >(I'm seeing Tim W., "Why not... A/D -> uC -> D/A " >> >or do you also suffer dynamic range issues when implementing >> >a notch in digital space?) >> > >> >George H. >> >> Instead of tinkering why don't you do the math ?>:-} >> >> It's Veal Marsala and wine time, so I'll crank you out something >> later, with orthogonal adjustments... >> >> Can we start with assuming you have 4 OpAmp sections? > >Yeah.. well I'm now using 5 or 6. >There are 4 (a qaud) in the original SV. The first >is a buffer, 10M to ground. And now I've tacked >a floating dual on top. An inverter (and divider) on the BP >that I then sum with the input. >(I'll post a pic, typical hair ball...) >I think as long as I put some gain behind the filter section, >the dynamic range loss is not a problem. > >I really love the SV filters separate Q and frequency adjustment. > >George H. >> >> ...Jim Thompson
[snip] So do my gyrator filters... far nicer than SV. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.
On Wed, 31 Aug 2016 17:00:07 -0700, George Herold wrote:

> I was trying to turn a previous SV filter into a notch, > (Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) > I was thinking of just subtracting the BP from the input. > But almost all the web stuff I could find said add the HP and LP. (That > seemed crazy to me, at high Q both those are peaking.. but then again > the SV filter seems a bit crazy to me... two integraters in a row, come > on. :^) > > So I first summed the LP and HP, (it was easier, > than the BP, no invert and divide the signal by the Q.) Amazingly it > worked. Unfortunately the depth of the notch varied inversely with the > Q... At high Q the notch was not deep. (It's probably losses in the > capacitors.) > At a Q of 20 and 500 mV input min on the notch was 25 mV. > > Depressing. > > Anyway I then flipped over the BP, attenuated it by ~Q (with a pot to > tweak the attenuation) and summed it with the input. That made a much > better notch. ~5mV at Q=20, (500 mV in) > I didn't have time to check other Q's. > > The thing that stinks about this notch, is that the high Q means I have > to throw away dynamic range on the input. > Is there a high Q, lower gain band pass filter.... > (I'm seeing Tim W., "Why not... A/D -> uC -> D/A " > or do you also suffer dynamic range issues when implementing a notch in > digital space?) > > George H.
Tim W. already suggested a Twin-T. One of the nice things about it is that the null is provided by the passive network, and is (insofar as I understand it) more reliably deep. I suppose that centering the resonance on the null is still going to be an issue, and will get more sensitive to component variations as you turn up the Q. Or, you can use Phil Hobb's suggestion of an LC circuit -- but there again, I suspect you'll find that non-ideal components will either cause the null to not be complete, or will cause the resonance to not be centered on the null. I think you'll find that you suffer dynamic range issues no matter what you use. You certainly do with a digital filter -- as the poles get closer to the unit circle, the necessary precision of the coefficients as well as the data path width needed goes up. The nice thing about a digital filter, however, is that you don't have to redesign it every time you build a board, or change passives vendors. -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Wednesday, August 31, 2016 at 10:51:58 PM UTC-4, Tim Wescott wrote:
> On Wed, 31 Aug 2016 17:00:07 -0700, George Herold wrote: > > > I was trying to turn a previous SV filter into a notch, > > (Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) > > I was thinking of just subtracting the BP from the input. > > But almost all the web stuff I could find said add the HP and LP. (That > > seemed crazy to me, at high Q both those are peaking.. but then again > > the SV filter seems a bit crazy to me... two integraters in a row, come > > on. :^) > > > > So I first summed the LP and HP, (it was easier, > > than the BP, no invert and divide the signal by the Q.) Amazingly it > > worked. Unfortunately the depth of the notch varied inversely with the > > Q... At high Q the notch was not deep. (It's probably losses in the > > capacitors.) > > At a Q of 20 and 500 mV input min on the notch was 25 mV. > > > > Depressing. > > > > Anyway I then flipped over the BP, attenuated it by ~Q (with a pot to > > tweak the attenuation) and summed it with the input. That made a much > > better notch. ~5mV at Q=20, (500 mV in) > > I didn't have time to check other Q's. > > > > The thing that stinks about this notch, is that the high Q means I have > > to throw away dynamic range on the input. > > Is there a high Q, lower gain band pass filter.... > > (I'm seeing Tim W., "Why not... A/D -> uC -> D/A " > > or do you also suffer dynamic range issues when implementing a notch in > > digital space?) > > > > George H. > > Tim W. already suggested a Twin-T. One of the nice things about it is > that the null is provided by the passive network, and is (insofar as I > understand it) more reliably deep. I suppose that centering the > resonance on the null is still going to be an issue, and will get more > sensitive to component variations as you turn up the Q. > > Or, you can use Phil Hobb's suggestion of an LC circuit -- but there > again, I suspect you'll find that non-ideal components will either cause > the null to not be complete, or will cause the resonance to not be > centered on the null. > > I think you'll find that you suffer dynamic range issues no matter what > you use. You certainly do with a digital filter -- as the poles get > closer to the unit circle, the necessary precision of the coefficients as > well as the data path width needed goes up. The nice thing about a > digital filter, however, is that you don't have to redesign it every time > you build a board, or change passives vendors. > > -- > Tim Wescott > Control systems, embedded software and circuit design > I'm looking for work! See my website if you're interested > http://www.wescottdesign.com
Thanks Tim, absolutely correct you suggested an (active) Twin T. I looked a little at the twin T, it has more components that I have to tweak if I need to change Q and frequency. I also read that it suffers from the same issue I saw with the SV notch. and this is that the depth decreases as the Q increases. (Though I didn't try it.) For the LC suggestion, I guess I'm liking JT's Gyrator, or something like that. George H.
On Wed, 31 Aug 2016 17:00:07 -0700, George Herold wrote:

> I was trying to turn a previous SV filter into a notch, > (Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) > I was thinking of just subtracting the BP from the input. > But almost all the web stuff I could find said add the HP and LP. (That > seemed crazy to me, at high Q both those are peaking.. but then again > the SV filter seems a bit crazy to me... two integraters in a row, come > on. :^) > > So I first summed the LP and HP, (it was easier, > than the BP, no invert and divide the signal by the Q.) Amazingly it > worked. Unfortunately the depth of the notch varied inversely with the > Q... At high Q the notch was not deep. (It's probably losses in the > capacitors.) > At a Q of 20 and 500 mV input min on the notch was 25 mV. > > Depressing. > > Anyway I then flipped over the BP, attenuated it by ~Q (with a pot to > tweak the attenuation) and summed it with the input. That made a much > better notch. ~5mV at Q=20, (500 mV in) > I didn't have time to check other Q's. > > The thing that stinks about this notch, is that the high Q means I have > to throw away dynamic range on the input. > Is there a high Q, lower gain band pass filter.... > (I'm seeing Tim W., "Why not... A/D -> uC -> D/A " > or do you also suffer dynamic range issues when implementing a notch in > digital space?) > > George H.
This is the point where I'd do a sensitivity analysis of the whole circuit, component by component and taking op-amp phase shift into account. Getting a null is one of those (big number) - (big number) = 0 things, so it doesn't take a very large percentage-wise deviation from perfection to ruin your nice perfect null. The rule of thumb that was handed to me a long, long time ago by a guy I still trust is that when you're trying to cancel things out in an electronic circuit, getting 40dB of suppression is about the most you can realistically expect. If you must have more than that then you either need to go digital (and make damned sure it'll really work) or you need to expect that you're just building a lab queen that'll never work right in the field. -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Thu, 01 Sep 2016 11:49:19 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Wed, 31 Aug 2016 17:00:07 -0700, George Herold wrote: > >> I was trying to turn a previous SV filter into a notch, >> (Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) >> I was thinking of just subtracting the BP from the input. >> But almost all the web stuff I could find said add the HP and LP. (That >> seemed crazy to me, at high Q both those are peaking.. but then again >> the SV filter seems a bit crazy to me... two integraters in a row, come >> on. :^) >> >> So I first summed the LP and HP, (it was easier, >> than the BP, no invert and divide the signal by the Q.) Amazingly it >> worked. Unfortunately the depth of the notch varied inversely with the >> Q... At high Q the notch was not deep. (It's probably losses in the >> capacitors.) >> At a Q of 20 and 500 mV input min on the notch was 25 mV. >> >> Depressing. >> >> Anyway I then flipped over the BP, attenuated it by ~Q (with a pot to >> tweak the attenuation) and summed it with the input. That made a much >> better notch. ~5mV at Q=20, (500 mV in) >> I didn't have time to check other Q's. >> >> The thing that stinks about this notch, is that the high Q means I have >> to throw away dynamic range on the input. >> Is there a high Q, lower gain band pass filter.... >> (I'm seeing Tim W., "Why not... A/D -> uC -> D/A " >> or do you also suffer dynamic range issues when implementing a notch in >> digital space?) >> >> George H. > >This is the point where I'd do a sensitivity analysis of the whole >circuit, component by component and taking op-amp phase shift into >account. Getting a null is one of those (big number) - (big number) = 0 >things, so it doesn't take a very large percentage-wise deviation from >perfection to ruin your nice perfect null. > >The rule of thumb that was handed to me a long, long time ago by a guy I >still trust is that when you're trying to cancel things out in an >electronic circuit, getting 40dB of suppression is about the most you can >realistically expect. If you must have more than that then you either >need to go digital (and make damned sure it'll really work) or you need >to expect that you're just building a lab queen that'll never work right >in the field.
See "StateVariableFilter(P+1).pdf" on the S.E.D/Schematics Page of my website... doesn't have dynamic range related to Q AND minimizes the effects of dissipation factor in the capacitors. (Came up with this trick ~1970 when I was making (hybrid) low audio frequency filters... where dissipation factor can really screw you over.) ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I'm looking for work... see my website.
On Thu, 01 Sep 2016 10:15:13 -0700, Jim Thompson wrote:

> On Thu, 01 Sep 2016 11:49:19 -0500, Tim Wescott <tim@seemywebsite.com> > wrote: > >>On Wed, 31 Aug 2016 17:00:07 -0700, George Herold wrote: >> >>> I was trying to turn a previous SV filter into a notch, >>> (Freq ~3.3 kHz, Q~10-20, see my mech. PID thread.) >>> I was thinking of just subtracting the BP from the input. >>> But almost all the web stuff I could find said add the HP and LP. >>> (That seemed crazy to me, at high Q both those are peaking.. but then >>> again the SV filter seems a bit crazy to me... two integraters in a >>> row, come on. :^) >>> >>> So I first summed the LP and HP, (it was easier, >>> than the BP, no invert and divide the signal by the Q.) Amazingly it >>> worked. Unfortunately the depth of the notch varied inversely with >>> the Q... At high Q the notch was not deep. (It's probably losses in >>> the capacitors.) >>> At a Q of 20 and 500 mV input min on the notch was 25 mV. >>> >>> Depressing. >>> >>> Anyway I then flipped over the BP, attenuated it by ~Q (with a pot to >>> tweak the attenuation) and summed it with the input. That made a much >>> better notch. ~5mV at Q=20, (500 mV in) >>> I didn't have time to check other Q's. >>> >>> The thing that stinks about this notch, is that the high Q means I >>> have to throw away dynamic range on the input. >>> Is there a high Q, lower gain band pass filter.... >>> (I'm seeing Tim W., "Why not... A/D -> uC -> D/A " >>> or do you also suffer dynamic range issues when implementing a notch >>> in digital space?) >>> >>> George H. >> >>This is the point where I'd do a sensitivity analysis of the whole >>circuit, component by component and taking op-amp phase shift into >>account. Getting a null is one of those (big number) - (big number) = 0 >>things, so it doesn't take a very large percentage-wise deviation from >>perfection to ruin your nice perfect null. >> >>The rule of thumb that was handed to me a long, long time ago by a guy I >>still trust is that when you're trying to cancel things out in an >>electronic circuit, getting 40dB of suppression is about the most you >>can realistically expect. If you must have more than that then you >>either need to go digital (and make damned sure it'll really work) or >>you need to expect that you're just building a lab queen that'll never >>work right in the field. > > See "StateVariableFilter(P+1).pdf" on the S.E.D/Schematics Page of my > website... doesn't have dynamic range related to Q AND minimizes the > effects of dissipation factor in the capacitors. > > (Came up with this trick ~1970 when I was making (hybrid) low audio > frequency filters... where dissipation factor can really screw you > over.)
May work. I'd still want to see a component-by-component sensitivity analysis if I thought really deep nulls in my notches were important. -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com