Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Calculate 3rd order Bessel filter 3db point

Status
Not open for further replies.
Hello,

Im having a nightmare with this I can't find the answer anywhere. Basically im looking for the formula to calculate the 3db point of a Bessel 3rd order sallen key filter. I need to test the circuit with various different component values, I just want a formula I can put into excel then easily calculate a number of different variations.

I know this,

1st order 3dB = 1/(2piRC)
2nd order 3dB = 1/(2pi*sqrtR1R2C1C2)
3rd order 3dB = ???????????????????????

I need to know the effect of component tolerances on the filter performance, any help would be very much appreciated, there's a picture of the circuit attached.
 

Attachments

  • filter.doc
    47 KB · Views: 323
Hello there,

I can not read your .doc file. Perhaps you can post it also as a jpg or gif file.
 
Here's both.

This circuit has a 3dB point of 3Khz, but I need to test it with components that are +/- 10%, 5%, etc...
 

Attachments

  • filter.GIF
    filter.GIF
    7 KB · Views: 362
  • filter.JPG
    filter.JPG
    13.8 KB · Views: 416
Ok thanks, I was hoping the answer wouldn't include transfer functions, I did come across them in my search for an answer but they make no sense to me. I try to avoid Laplace transforms like the plague.

Firstly my circuit uses 2 opamps, but the one on that web page uses only 1, will the equation still be relevant to mine?

Secondly, what is T(s)? and what is s? and how does this equation help me calculate the cutoff freq?
 
Hello,

When you have a transfer function in variable 's' to get the amplitude you replace s with j*w and simplify and then take the square root of the sum of squares of the real and imaginary parts. You then end up with an equation for the amplitude in the variable w (w=2*pi*F). You then set this equation equal to 1/sqrt(2) and solve for w. You'll get more than one solution so you have to choose the one or more that works. Once this is done, you have an equation or two for calculating w where the amplitude is at -3db. Then F=w/(2*pi). This is for when the passband gain is 1 however. If it is not you'll have to calculate the passband gain and solve for w that is -3db down from the passband response.
We could do an example here and that would probably best show how this is done.
 
An example would be spectacular!!!! The thing that confused me was that when you use 'w' this term obviously includes the freq, which is exactly what im trying to calculate and not knowing what T(s) is it makes it very difficult to rearrange the equation as I don't know what it is im actually multiply/dividing together.

One thing, the real and imag parts, w= 2*pi*f, either that is all imag or all real yes? there is no 1 + j(2*pi*f) or 2*pi*f + j1

So to start we'll let

C1C2C3 = x
2C3(C1+C2) = y
(C2+3C3) = z

T(s) = 1/(s^3*x + s^2*y + s*z +1)

then,

T(s) = 1/(jw^3*x + jw^2*y + jw*z +1)

where next?
 
An example would be spectacular!!!! The thing that confused me was that when you use 'w' this term obviously includes the freq, which is exactly what im trying to calculate and not knowing what T(s) is it makes it very difficult to rearrange the equation as I don't know what it is im actually multiply/dividing together.

One thing, the real and imag parts, w= 2*pi*f, either that is all imag or all real yes? there is no 1 + j(2*pi*f) or 2*pi*f + j1

So to start we'll let

C1C2C3 = x
2C3(C1+C2) = y
(C2+3C3) = z

T(s) = 1/(s^3*x + s^2*y + s*z +1)

then,

T(s) = 1/(jw^3*x + jw^2*y + jw*z +1)

where next?

Hello again,

Do you mind if i change your equation just a little by replacing x,y and z with capitals A,B, and C? These are usually constants that's why i do this.

T(s) = 1/(s^3*A + s^2*B + s*C +1)

then replace s with jw:
T(jw) = 1/(jw^3*A + jw^2*B + jw*C +1)

The very next step is to convert powers of j into simpler forms. A short table:
j^1=j
j^2=-1
j^3=-j
j^4=1

This makes (jw)^3=-j*w^3, and
(jw)^2=-1*w^2, and the rest stays the same. We then replace the original terms with the new ones so we end up with:

T(jw) = 1/(-j*w^3*A + (-1)*w^2*B + j*w*C +1)
which of course equals:

T(jw) = 1/(-j*w^3*A -w^2*B + j*w*C +1)

Note although we still have higher powers of w, we have only first powers of j left in the equation.
Does this make sense so far?

The next step is to rearrange the denominator by separating the real and imaginary parts. The imaginary parts are the terms multiplied by j and the real parts are everything else.

BTW, T(s) is the transfer function in this case, but H(s) is also used. The variable 's' is the complex frequency, but you can think of 's' as just being another variable that we replace later to calculate the amplitude. Note we already did this by replacing 's' with j*w.
Also, 'w' is sometimes called the "angular frequency", and in the equations once we are almost done we will replace this with 2*pi*f so you can evaluate with frequency f instead of angular frequency w. The only difference is the frequency f gets multiplied by 2*pi, that's it. For example:
T(w)=1/(w^2*R*C+1)
becomes:
T(f)=1/((2*pi*f)^2*R*C+1)
where f is the frequency.
 
Last edited:
I think im following you,

so real part = -w^2*B+1 = -(2*pi*f)^2 * B + 1
imag part = -j*w^3*A+j*w*C : Not sure how to simplifier this any further
 
I think im following you,

so real part = -w^2*B+1 = -(2*pi*f)^2 * B + 1
imag part = -j*w^3*A+j*w*C : Not sure how to simplifier this any further

Hi again,

Oh yes, that is very close, except when we isolate the imag part we drop the j variables so we end up with:

real part = -w^2*B+1
imag part = -w^3*A+w*C

and we really dont want to convert w into 2*pi*f just yet because it keeps the equations simpler for now. We will do that later though.

Next we calculate the amplitude of the denominator by calculating the norm of the real and imag parts which is very easy to do:

AmplDenom=sqrt(real^2+imag^2)

As you can see all we do is square the real part, square the imag part, then add them together, then take the square root of the result.

The amplitude of the numerator is purely real, equal to 1, so we have:
AmplNumer=1

so the total amplitude is:

Ampl=AmplNumer/AmplDenom

This gives you an equation in 'w' alone and is all real. You can then replace each w with 2*pi*f and you have your amplitude equation. We'll leave w alone for now though, and call this equation EA for short

Now last we want to calculate the -3db point, so we take the EA and set w=0 and calculate the amplitude (low pass filter only):
Ampl_0=EA(w=0)

and divide EA by this, and we get:
y=EA(w)/Ampl_0

or simply:
y=EA(w)/EA(w=0)

or even simpler yet:
y=EA(w)/EA(0)

Next we set that equal to 1/sqrt(2) as:

1/sqrt(2)=EA(w)/EA(0)

and solve this last equation for w. We'll get more than one solution so we have to check each one to see which one (or more) is (are) valid. I believe that for the low pass filter you'll probably get one real solution and two imaginary, of which only the real solution is valid.

One last note:
You'll probably have to replace A,B, and C with the real world values in order to solve for w above as the expression might be a little more complex then we want to deal with algebraically. You can also substitute W=w^2 in the last equation and solve for W instead of w, which will lead to the three solutions. Once the true solution has been identified, you can then take the square root of W to get w, and then divide by 2*pi to get f, the -3db frequency.

To test the circuit with various values for the components, you would repeatedly calculate A, B, and C, and using the solution above calculate the -3db frequency.
 
Last edited:
Right, ok I'll try and do that,

so, AmplDenom=sqrt(real^2+imag^2)

First i'll sq real

(-w^2*B +1) * (-w^2*B +1) = w^4*B^2 - w^2*B - w^2*B +1 = w^4*B^2 - 2w^2*B +1

sq imag

(-w^3*A + wC) * (-w^3*A + wC) = w^6*A^2 - w^4*AC - w^4*AC + (wc)^2 = w^6*a^2 - 2w^4*AC + w^2*C^2

so

Ampl=1/sqrt((w^4*B^2 - 2w^2*B +1)+(w^6*a^2 - 2w^4*AC + w^2*C^2))

That looks quite a mouthful, but I guess I know what all the values are apart from the f in 2pif

Im not too sure what you mean when you set w=0, surely that would mean everything on the bottom would cancel out apart from the 1. Im not convinced i've understood you.
 
Right, ok I'll try and do that,

so, AmplDenom=sqrt(real^2+imag^2)

First i'll sq real

(-w^2*B +1) * (-w^2*B +1) = w^4*B^2 - w^2*B - w^2*B +1 = w^4*B^2 - 2w^2*B +1

sq imag

(-w^3*A + wC) * (-w^3*A + wC) = w^6*A^2 - w^4*AC - w^4*AC + (wc)^2 = w^6*a^2 - 2w^4*AC + w^2*C^2

so

Ampl=1/sqrt((w^4*B^2 - 2w^2*B +1)+(w^6*a^2 - 2w^4*AC + w^2*C^2))

That looks quite a mouthful, but I guess I know what all the values are apart from the f in 2pif

Im not too sure what you mean when you set w=0, surely that would mean everything on the bottom would cancel out apart from the 1. Im not convinced i've understood you.

Hi again,

Note you may want to take another look at my previous post as i have clarified several points and so edited several times.

That is right, everything on the bottom except the 1 cancels, so we are left with 1/1 which of course equals 1, and that is the amplitude at zero frequency. That's something we have to calculate even though in this case it simplified nicely to simply 1 so we can really ignore it now. Note that if we had a gain of say 2 this would not have been the case as we would have calculated 2 and that would have to be used to divide EA(w).

The equation might be solved by first squaring both sides. This gets rid of the square root signs. Next, we can take the inverse of both sides and this gives us a 6th order polynomial in w. Note however that this 6th order equation is special in that it only contains even powers of w. This means we can make a substitution w^2=W and then we are left with a much simpler 3rd order poly in W rather than w. We then solve this 3rd order poly and that's how we get the solution for W, and then once we have that we take the square root of W to get w, then divide w by 2*pi to get f the -3db frequency.

Try that and see how it goes. Note you do need to know how to solve 3rd order polynomials, but the algebra will be quite involved unless you substitute the real world component values before you try to solve this 3rd order equation.
 
Last edited:
one quick question, there is no mention of the resistor values in this equation, but when I simulate the circuit and change the resistor values it does have an effect on the 3dB point, do i need another equation for this?

ok i've added in the values that I know and w^2=W and I get this horrible looking thing

5.483698704x10^-51 W^3 + 4.5467928x10^-33 W^2 + 3.8217x10^-16 W + 1

can I just stick the values into these equally horrible looking formulae?

https://en.wikipedia.org/wiki/Cubic_function#General_formula_of_roots
 
Last edited:
one quick question, there is no mention of the resistor values in this equation, but when I simulate the circuit and change the resistor values it does have an effect on the 3dB point, do i need another equation for this?

Hi again,


Yeah ha ha i just noticed that a minute ago too. Yes, you'll need another equation. There is one on the web but i have not tested it yet.
 

Attachments

  • SK-LP-Untested-01.gif
    SK-LP-Untested-01.gif
    2.8 KB · Views: 286
one quick question, there is no mention of the resistor values in this equation, but when I simulate the circuit and change the resistor values it does have an effect on the 3dB point, do i need another equation for this?

ok i've added in the values that I know and w^2=W and I get this horrible looking thing

5.483698704x10^-51 W^3 + 4.5467928x10^-33 W^2 + 3.8217x10^-16 W + 1

can I just stick the values into these equally horrible looking formulae?

Cubic function - Wikipedia, the free encyclopedia


Hello again,

Yes, that's the basic idea. It looks like you'll use the first formula there that does not contain any lower case i's.

It's always good to double check the solution too, by inserting it back into the equation and calculating the result and the result should equal zero or very very nearly so.

It's also an idea to divide though by the coefficient 'a' so that simplifies things a little. For example for:
a*x^3+b*x^2+c*x+1=0

we would first divide through by 'a' which would give us:

x^3+b/a*x^2+c/a*x+1/a=0

and equating all the coefficients we end up with:
x^3+B*x^2+C*x+D=0

which only contains three coefficients, and a solution to this is:
Code:
x=(sqrt(27*D^2+(4*B^3-18*B*C)*D+4*C^3-B^2*C^2)/(6*sqrt(3))-(27*D-9*B*C+2*B^3)/54)^(1/3)+(B^2-3*C)/(9*(sqrt(27*D^2+(4*B^3-18*B*C)*D+4*C^3-B^2*C^2)/(6*sqrt(3))-(27*D-9*B*C+2*B^3)/54)^(1/3))-B/3
You can test the web formula with this one if you like. In any case let me know how you make out with this.
 
Last edited:
my dreams of a simple solution to all this are quickly evaporating. Before I go any further, will I need this other equation instead of the one i've been doing?

Oh yeah, thanks for all the help, it is very much appreciated.


Just found something very curious, my 'a' value = 5.483698704x10^-51, turns out that when you square this the answer is 0, seems like anything to x10^-51 squared = 0
 
Last edited:
my dreams of a simple solution to all this are quickly evaporating. Before I go any further, will I need this other equation instead of the one i've been doing?

Oh yeah, thanks for all the help, it is very much appreciated.

Hi again,

You mean the other solution for x? You can use that one or use the one from the web, but if you use the one from the web you should test it to make sure it works. Now although that equation may be accurate, i have found many many equations on the web that look good but are not accurate.

It's not too bad though, because you end up with a 3rd degree equation to solve. Be happy you didnt end up with a 4th degree equation :)
The way this would be done normally is we would use the computer by creating a program to calculate this over and over again, or use a programmable calculator which may actually have a third order solver built in.
Note that once we have the solution and it is programmed into something it's real easy to calculate it over and over again to test with new component values.
There are free computer languages/compilers out there with relatively simple programming languages. You could use one of them if you like. There is one called simply "Euphoria" which makes programming some math problems like this not too hard to do as the syntax for simple programs like this is quite simple too.

If i get a chance today i'll double check that formula for the SK low pass filter with all the R's and C's included.
 
Last edited:
Hello again,

Ok the transfer function with the R's and C's posted previously is correct.
 
Just found something very curious, my 'a' value = 5.483698704x10^-51, turns out that when you square this the answer is 0, seems like anything to x10^-51 squared = 0

I think this is because the answer to that calculation is so small my calculator considers it to be 0, it happened with another one as well.

Anyway,

Right i'll try that new equation then,
 
Ok so i've followed the steps as before, not sure what the ampnumerator is this time, it was one for the previous equation, is it 1/(C1C2C3R1R2R3) this time
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top