Author Topic: Notch active filter transfer function  (Read 2991 times)

0 Members and 1 Guest are viewing this topic.

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Notch active filter transfer function
« on: April 04, 2019, 11:38:14 am »
Good evening eefolks,

I have been looking for a one-opamp notch filter and I stumped across a topology which seemed interesting to me. I found it here. They provide the equations for the natural frequency for a simplified version. I simulated it on LTspice and sure enough it was a notch filter.

But I was wondering, what was the transfer function of the filter (to check what was the expression for its Q and its natural frequency for the non-simplified version). So I took my notebook and started to use KCL and KVL...



Thing is I don't really know what is going on in node "V". I know that V+ = V-, and that the output would be the difference between the two...But again if I apply V+ = V-, I'm missing C2 for the expression. I attach you what I wrote below.



Could someone enlighten me to what is going on at node "V"?

Thanks in advance!

 

Offline kulky64

  • Regular Contributor
  • *
  • Posts: 61
  • Country: sk
Re: Notch active filter transfer function
« Reply #1 on: April 04, 2019, 08:28:09 pm »
Hi, I tried to derive the transfer function and got this:
F(s)=Vo(s)/Vi(s)=(R3*R4*C1*C2*s^2+(R3*C1-R2/R1*R4*C2)*s+1)/(R3*R4*C1*C2*s^2+(R4*C2+R3*C1)*s+1)

You forgot to include two currents into your equations:
1) current flowing out of signal generator to the input of filter,
2) current flowing from opamp output into "V" node.
« Last Edit: April 04, 2019, 10:31:53 pm by kulky64 »
 
The following users thanked this post: alex.martinez

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #2 on: April 04, 2019, 10:45:58 pm »
Hi, I tried to derive the transfer function and got this:
F(s)=Vo(s)/Vi(s)=(R3*R4*C1*C2*s^2+(R3*C1-R2/R1*R4*C2)*s+1)/(R3*R4*C1*C2*s^2+(R4*C2+R3*C1)*s+1)

You forgot to include two currents into your equations:
1) current flowing out of signal generator to the input of filter,
2) current flowing from opamp output into "V" node.


Yup, I just arrived to the TF you posted... Since I could not actually get around what was going on on "V" I just went ahead and included it in the feedback loop as I show below.



Then I just set the equation Vo = Vp - ic2·Z2 (like a voltage divider), and found ic2 = i4 and solved for Vo/Vi ... arrived to your TF! Also, found the Q factor

Q = wo/(R4·C2 + R3·C1), which matches to 1/2 for R4 = R3 and C1 = C2 ! THank you a lot!
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: Notch active filter transfer function
« Reply #3 on: April 05, 2019, 05:43:27 pm »
Q = wo/(R4·C2 + R3·C1), which matches to 1/2 for R4 = R3 and C1 = C2 ! THank you a lot!

The Q you have here is the pole Q.  For a notch filter, the sharpness of the notch is related to the Q of the zeroes of the transfer function.

I made all the resistors 10k except R4 which was 11k, and the capacitors .01uF.  This gave me a 60 dB notch and the Q of the zeroes was about 10
 

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #4 on: April 06, 2019, 08:34:32 pm »
Q = wo/(R4·C2 + R3·C1), which matches to 1/2 for R4 = R3 and C1 = C2 ! THank you a lot!

The Q you have here is the pole Q.  For a notch filter, the sharpness of the notch is related to the Q of the zeroes of the transfer function.

I made all the resistors 10k except R4 which was 11k, and the capacitors .01uF.  This gave me a 60 dB notch and the Q of the zeroes was about 10

What do you mean by pole and zero Q? I've never heard of it  :'(
 

Offline kulky64

  • Regular Contributor
  • *
  • Posts: 61
  • Country: sk
Re: Notch active filter transfer function
« Reply #5 on: April 06, 2019, 08:56:19 pm »
How did you get your expression for Q? It doesn't seem correct. Q should be dimensionless number, but in your expression it is not so.
 

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #6 on: April 06, 2019, 09:13:46 pm »
How did you get your expression for Q? It doesn't seem correct. Q should be dimensionless number, but in your expression it is not so.

Mistake, forgot to include a wo^-1, the correct expression is Q = wo^-1 / (C2·R4 + C1·R3) = 1/[(C2·R4 + C1·R3)· wo], my bad sorry  :phew:
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: Notch active filter transfer function
« Reply #7 on: April 06, 2019, 09:16:25 pm »
Q = wo/(R4·C2 + R3·C1), which matches to 1/2 for R4 = R3 and C1 = C2 ! THank you a lot!

The Q you have here is the pole Q.  For a notch filter, the sharpness of the notch is related to the Q of the zeroes of the transfer function.

I made all the resistors 10k except R4 which was 11k, and the capacitors .01uF.  This gave me a 60 dB notch and the Q of the zeroes was about 10

What do you mean by pole and zero Q? I've never heard of it  :'(

See here: http://hasler.ece.gatech.edu/Courses/ECE6414/Unit1/Discrete_01.pdf

This: http://hasler.ece.gatech.edu/Courses/ECE6414/Unit1/Discrete_01.pdf also initially shows how to calculate pole Q on the s plane, even though they really want to discuss poles in the z plane.

The denominator of your notch filter transfer function has a couple of zeroes on the negative real axis, and since they're in the denominator, they give rise to a couple of poles with pole Q of 1/2.

The zeroes of the numerator are complex conjugates and have higher Q, which gives the narrow notch response.
 
The following users thanked this post: alex.martinez

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #8 on: April 06, 2019, 09:24:53 pm »
See here: http://hasler.ece.gatech.edu/Courses/ECE6414/Unit1/Discrete_01.pdf

This: http://hasler.ece.gatech.edu/Courses/ECE6414/Unit1/Discrete_01.pdf also initially shows how to calculate pole Q on the s plane, even though they really want to discuss poles in the z plane.

The denominator of your notch filter transfer function has a couple of zeroes on the negative real axis, and since they're in the denominator, they give rise to a couple of poles with pole Q of 1/2.

The zeroes of the numerator are complex conjugates and have higher Q, which gives the narrow notch response.

Okay, got it!. I need to refresh the s-plane later (a couple of years have passed since I last used it).
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1578
Re: Notch active filter transfer function
« Reply #9 on: April 07, 2019, 07:34:03 am »
Hi,

I got this for the transfer function:
((s^2*C1*C2*R1*R3-s*C2*R2)*R4+s*C1*R1*R3+R1)/((s^2*C1*C2*R1*R3+s*C2*R1)*R4+s*C1*R1*R3+R1)

That might be the same but i did not check.

I came up with bandwidth and Q but the expressions were a little too complicated.  I'd have to try to simplify them a little.

Also, the Q will depend on component selection accuracy and op amp open loop gain so an true expression would have to include some other things besides the component values, except in theory of course.
If you ever worked with a passive notch filter you would see how critical component selection can be in order to get a deep notch.  I have graphs of the notorious passive twin T notch filter around i'll look up if you are interested.

« Last Edit: April 07, 2019, 07:37:07 am by MrAl »
 
The following users thanked this post: alex.martinez

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #10 on: April 07, 2019, 11:36:45 am »
Hi,

I got this for the transfer function:
((s^2*C1*C2*R1*R3-s*C2*R2)*R4+s*C1*R1*R3+R1)/((s^2*C1*C2*R1*R3+s*C2*R1)*R4+s*C1*R1*R3+R1)

That might be the same but i did not check.

I came up with bandwidth and Q but the expressions were a little too complicated.  I'd have to try to simplify them a little.

Also, the Q will depend on component selection accuracy and op amp open loop gain so an true expression would have to include some other things besides the component values, except in theory of course.
If you ever worked with a passive notch filter you would see how critical component selection can be in order to get a deep notch.  I have graphs of the notorious passive twin T notch filter around i'll look up if you are interested.

Yes, looks good (the natural frequency is included in the TF, so I guess it's correct). I always try to leave s^2 alone and then obtain the parameters from the "canonical" 2nd order response. Here is my solution to the TF which, I believe, is the same as yours and the one posted by kulky64.
 

Offline kulky64

  • Regular Contributor
  • *
  • Posts: 61
  • Country: sk
Re: Notch active filter transfer function
« Reply #11 on: April 07, 2019, 01:05:52 pm »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1578
Re: Notch active filter transfer function
« Reply #12 on: April 07, 2019, 05:34:21 pm »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?

Hi,

That does not look correct.
wo/Q is just the same as wo/(wo/BW) which equates to just BW.
SO that means BW=1/(R3*C1)+1/(C2*R4)

and there is no R1 or R2 in there.

Anybody test that yet?
 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: Notch active filter transfer function
« Reply #13 on: April 07, 2019, 06:34:53 pm »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?

I assume you're referring to the algebra mistake?



Edit:

In the second image in reply #10, the algebra leading from the expression wo/Qp = 1/(R3 C1) + 1/(C2 R4) to the expression

Qp = (wo^-1)/(C2 R4 + R3 C1) would be incorrect if it weren't for the definition of wo as 1/sqrt(R3 R4 C1 C2).

Considering only the apparent algebraic manipulation from the first expression to the second, the algebra appeared to be mistaken.  Taking into account the definition of wo, all is well.

Setting R3 and R4 to 10k ohms, and C1 and C2 to .01 uF, we get these numerical values for various expressions.  The second expression for Q in the image below comes from reply #2, and appears to be incorrect.



« Last Edit: April 08, 2019, 06:28:18 am by The Electrician »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1578
Re: Notch active filter transfer function
« Reply #14 on: April 08, 2019, 05:05:18 am »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?

I assume you're referring to the algebra mistake?



Hi,

What that formula actually tested yet though?
 

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #15 on: April 08, 2019, 11:20:37 am »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?

I assume you're referring to the algebra mistake?



Hi,

What that formula actually tested yet though?

I think this is getting a bit out of hand... Qp =wo·(C1·C2·R3·R4)/(C2·R4+R3·C1) is algebraically the same as  Qp = 1/[(C2·R4 + C1·R3)· wo], since we define wo = 1/sqrt(C1·C2·R3·R4).

If dimensions are taken into account, both expressions arrive at a dimensionless factor. What I do is I define what is the natural frequency of the system and re-write it in a canonical form:



The I just take the terms that multiply s on the denominator and equate it to wo/Qp, in order to find the expression for Qp.
 

Offline kulky64

  • Regular Contributor
  • *
  • Posts: 61
  • Country: sk
Re: Notch active filter transfer function
« Reply #16 on: April 08, 2019, 03:42:44 pm »
OK, now I see.
What I do is I define what is the natural frequency of the system and re-write it in a canonical form:



The I just take the terms that multiply s on the denominator and equate it to wo/Qp, in order to find the expression for Qp.

But the TF only has this form when the condition (R3*C1-R2/R1*R4*C2)=0 is met, for example if R3=R4=R, C1=C2=C and R1=R2 as suggested in the article you linked in your first post. Then you don't have to bother calculating Q, because it is equal to 1/2.
In most general case though, without any restrictions on R1, R2, R3, R4, C1 and C2 values, I think your method for determining Q is no longer valid. Or am I wrong?
 

Offline alex.martinezTopic starter

  • Contributor
  • Posts: 44
  • Country: es
  • Happiness is fixing electronics by hitting them.
Re: Notch active filter transfer function
« Reply #17 on: April 08, 2019, 07:40:54 pm »
But the TF only has this form when the condition (R3*C1-R2/R1*R4*C2)=0 is met, for example if R3=R4=R, C1=C2=C and R1=R2 as suggested in the article you linked in your first post. Then you don't have to bother calculating Q, because it is equal to 1/2.
In most general case though, without any restrictions on R1, R2, R3, R4, C1 and C2 values, I think your method for determining Q is no longer valid. Or am I wrong?

I see your point, and it has been bugging me as well because I was getting an s term in the numerator. I really do not know of any second order transfer function that presents a complete quadratic term in the numerator.

Regarding (R3*C1-R2/R1*R4*C2)=0, yes the obtained TF and the one in the canonical form coincide just for the aforementioned condition. I do not know how does that relate to the method of obtaining Q.

 

Offline kulky64

  • Regular Contributor
  • *
  • Posts: 61
  • Country: sk
Re: Notch active filter transfer function
« Reply #18 on: April 08, 2019, 09:38:02 pm »
I created Bode diagrams with component values exactly as in the article you mentioned: R3=R4=68kOhm, C1=C2=47nF, but I varied R2/R1 ratio. So w0 is for all curves the same: 312.891113892365 rad/s.
F1: R2/R1=1
F2: R2/R1=0.95
F3: R2/R1=0.9
F4: R2/R1=0.8
F5: R2/R1=0.7
F6: R2/R1=0.6
It looks like the Q factor changes according to R2/R1 ratio. Or not?

 

Offline The Electrician

  • Frequent Contributor
  • **
  • Posts: 747
  • Country: us
Re: Notch active filter transfer function
« Reply #19 on: April 09, 2019, 12:12:49 am »
I created Bode diagrams with component values exactly as in the article you mentioned: R3=R4=68kOhm, C1=C2=47nF, but I varied R2/R1 ratio. So w0 is for all curves the same: 312.891113892365 rad/s.
F1: R2/R1=1
F2: R2/R1=0.95
F3: R2/R1=0.9
F4: R2/R1=0.8
F5: R2/R1=0.7
F6: R2/R1=0.6
It looks like the Q factor changes according to R2/R1 ratio. Or not?

How then would you calculate the Q factor?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1578
Re: Notch active filter transfer function
« Reply #20 on: April 09, 2019, 07:02:49 am »
How did you arrive from wo/Qp=1/(R3*C1)+1/(C2*R4) to Qp=wo^(-1)/(C2*R4+R3*C1) ?

I assume you're referring to the algebra mistake?



Hi,

What that formula actually tested yet though?

I think this is getting a bit out of hand... Qp =wo·(C1·C2·R3·R4)/(C2·R4+R3·C1) is algebraically the same as  Qp = 1/[(C2·R4 + C1·R3)· wo], since we define wo = 1/sqrt(C1·C2·R3·R4).

If dimensions are taken into account, both expressions arrive at a dimensionless factor. What I do is I define what is the natural frequency of the system and re-write it in a canonical form:



The I just take the terms that multiply s on the denominator and equate it to wo/Qp, in order to find the expression for Qp.

Hi,

No i was not referring to the algebra mistake, if there way one, i was referring to teh entire formula as it does not seem right.  If that is meant to calculate the Q of the circuit or the Bandwidth then i dont think it is right.  It is missing two resistors which have an effect on the bandwidth BW.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf