Author Topic: Calculation of the 3rd order RC filter  (Read 2048 times)

0 Members and 1 Guest are viewing this topic.

Offline S. PetrukhinTopic starter

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: ru
Calculation of the 3rd order RC filter
« on: February 12, 2024, 01:24:47 pm »
Comrades!

The task from meander make most beautiful sinusoid, small distortions are acceptable.

I have made a calculation, but not sure if it is correct. Please tell me if I was wrong? Used the formula f=1/2piRC.
Chose 49.9 Ohm resistors because they are already used in the circuit and got the value of 1.3 nF capacitors for a frequency of 2.45 MHz. It was a good match.

And sorry for my English.
 

Offline robotmaster

  • Newbie
  • Posts: 5
  • Country: au
Re: Calculation of the 3rd order RC filter
« Reply #1 on: February 12, 2024, 10:54:41 pm »
I don't know about the complex calculations behind these things but it makes sense, if u charge a capacitor and have a slow release into a resistor its going to blur time together.

But little did I know how impossibly sharp the falloff was.  That's the amazing thing about them.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #2 on: February 13, 2024, 12:22:32 am »
Comrades!

The task from meander make most beautiful sinusoid, small distortions are acceptable.

I have made a calculation, but not sure if it is correct. Please tell me if I was wrong? Used the formula f=1/2piRC.
Chose 49.9 Ohm resistors because they are already used in the circuit and got the value of 1.3 nF capacitors for a frequency of 2.45 MHz. It was a good match.

(Attachment Link)

Hello there,

That formula only applies for one stage.  It can also apply for multiple stages but then the stages have to be coupled with an amplifer with a gain of 1 so that the following stage does load the previous stage.  There is a impedance transformation trick you can use though I'll show later.

For your circuit, a better formula is:
f=1/(32.34*R*C)

Anyway, that's the formula for the 3db down frequency commonly referred to as the cutoff frequency.

Using an impedance transformation works a little better. This means if your first stage resistor R1 is 50 Ohms and your first stage cap is 1uF, then R2 would be at least 500 Ohms and C2 would be 0.1uF (resistor is 10 times the previous resistor, and capacitor is 10 times less than the previous capacitor), and then R3 would be 5000 Ohms and C3 would be 0.01uf (the factors are 100 and 1/100 now if the references are still R1 and C1, or 10 and 1/10 as before if you use R2 and C2 as the reference values).
What this does is it reduces the load on the previous stages so that the circuit acts almost the same as if there were amplifiers in between each stage.  There is still some interaction though so this is just an approximation, but it's probably not bad.
The higher you go with the next resistor value (and lower the next cap value) the better the isolation so the better the formula.
The formula then is approximately:
f=1/(12.3242*R*C)


I'll list these values for clarity:
R1=50, R2=500, R3=5000
C1=1uf, C2=0.1uf, C3=0.01uf
and this makes it clear that each successive stage has a resistor 10 times the previous stage and has a capacitor 1/10 times the previous stage capacitor value.

It also looks like you may be trying to match some input or output impedances also.  If that is the case we'll have to go a little deeper into theory.
« Last Edit: February 14, 2024, 11:00:39 pm by MrAl »
 
The following users thanked this post: S. Petrukhin

Offline Solder_Junkie

  • Frequent Contributor
  • **
  • Posts: 326
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #3 on: February 13, 2024, 01:16:15 pm »
You convert a square wave to a sine way primarily by using either a band pass filter, or a low pass filter. The latter removes the harmonics leaving the fundamental frequency, which is a sine wave.

The RC filter circuit originally posted is a form of low pass filter, with a cut off frequency of 100 KHz, and 16 dB down at 2.45 MHz (not what you perhaps expected), easily modeled using Spice modelling software, in this case Tina. See the plot attached.

The free software to calculate filters using inductors and capacitors is Elsie (LC) by Tonne Software: http://tonnesoftware.com/elsie.html

SJ
« Last Edit: February 13, 2024, 01:20:21 pm by Solder_Junkie »
 
The following users thanked this post: S. Petrukhin

Offline Chalcogenide

  • Regular Contributor
  • *
  • Posts: 156
  • Country: it
Re: Calculation of the 3rd order RC filter
« Reply #4 on: February 13, 2024, 01:23:54 pm »
I have used this website in the past to calculate passive filters https://markimicrowave.com/technical-resources/tools/lc-filter-design-tool/ and it worked quite nicely.
 
The following users thanked this post: Solder_Junkie, S. Petrukhin

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #5 on: February 14, 2024, 05:04:36 pm »
Hello again,

Note in post #2 I had to correct a typo in the formula for the cutoff frequency.

Also, I agree that a bandpass filter is the better option for filtering a square wave into a sine wave.
We'd have to look into how well a passive bandpass filter would work here though.

« Last Edit: February 14, 2024, 05:15:01 pm by MrAl »
 
The following users thanked this post: S. Petrukhin

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1371
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #6 on: February 14, 2024, 05:49:12 pm »
I disagree that bandpass is better than lowpass in this scenario. With only Rs and Cs a bandpass is just a high pass and low pass in series.  In this scenario the highpass is not needed as there is nothing below the fundamental that needs filtering.  Incorporating a highpass would require at least one extra component.
 
The following users thanked this post: S. Petrukhin

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Re: Calculation of the 3rd order RC filter
« Reply #7 on: February 14, 2024, 07:02:23 pm »
A RC filter will never make a sinusoidal wave, but the capacitor charge/discharge curve, similar to the triangle shape.





You need a LC circuit:
https://www.learningaboutelectronics.com/Articles/LC-resonant-circuit.php
« Last Edit: February 14, 2024, 07:10:50 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: S. Petrukhin

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1092
  • Country: nz
  • Retired Electronics Design Engineer
Re: Calculation of the 3rd order RC filter
« Reply #8 on: February 14, 2024, 07:38:33 pm »
A RC filter will never make a sinusoidal wave, but the capacitor charge/discharge curve, similar to the triangle shape.





You need a LC circuit:
https://www.learningaboutelectronics.com/Articles/LC-resonant-circuit.php
No. This only applies to a single RC stage. A cascade of several RC filters will produce a closer approximation to a sine wave at the expense of a gradually drooping pass band response. The OP's cascaded RC filter is quite bad in this respect contributing considerable attenuation to the 2.45MHz fundamental.

An LC filter will perform better and produce a sharper cut-off with a flatter response in the pass band and higher attenuation in the stop band and is only required where fundamental of the signal is to be passed with minimal attenuation.
 
The following users thanked this post: S. Petrukhin

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3274
  • Country: us
Re: Calculation of the 3rd order RC filter
« Reply #9 on: February 14, 2024, 07:48:23 pm »
A RC filter will never make a sinusoidal wave, but the capacitor charge/discharge curve, similar to the triangle shape.





You need a LC circuit:
https://www.learningaboutelectronics.com/Articles/LC-resonant-circuit.php
No. This only applies to a single RC stage. A cascade of several RC filters will produce a closer approximation to a sine wave at the expense of a gradually drooping pass band response. The OP's cascaded RC filter is quite bad in this respect contributing considerable attenuation to the 2.45MHz fundamental.

An LC filter will perform better and produce a sharper cut-off with a flatter response in the pass band and higher attenuation in the stop band and is only required where fundamental of the signal is to be passed with minimal attenuation.

Exactly :-+

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3274
  • Country: us
Re: Calculation of the 3rd order RC filter
« Reply #10 on: February 14, 2024, 08:05:13 pm »
Here's a couple interesting Passive RC 3rd Order filters which exhibit a Voltage Gain greater than Unity without inductors, nor transformers!!

Low pass and High pass versions.

Enjoy!!

Best,
« Last Edit: February 14, 2024, 08:07:42 pm by mawyatt »
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: RoGeorge, S. Petrukhin

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5914
  • Country: es
Re: Calculation of the 3rd order RC filter
« Reply #11 on: February 14, 2024, 09:36:45 pm »
True! Arggg I'm forgetting everything due no use!
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #12 on: February 14, 2024, 10:24:59 pm »
Fascinating - I played with this and came up with a nested variant:
 
The following users thanked this post: S. Petrukhin

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #13 on: February 15, 2024, 09:38:44 am »
Here's a couple interesting Passive RC 3rd Order filters which exhibit a Voltage Gain greater than Unity without inductors, nor transformers!!

Low pass and High pass versions.

Enjoy!!

Best,

Hello there,

With regards to the low pass filter there, did you check to make sure it was actually a 3rd order filter?
A 1st order LP filter will have a 20db per decade roll off.
A 2nd order LP filter will have a 40db per decade roll off.
A 3rd order LP filter will have a 60db per decade roll off.

That LP filter looks like it only has a 20db/decade roll off, but you could double check that.  If this is true though that would make it more like a 1st order filter.
The angular cutoff frequency looks like it's w=0.9535/RC

I don't see any extra gain either.

We could also check the HP filter.

« Last Edit: February 15, 2024, 09:25:56 pm by MrAl »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #14 on: February 15, 2024, 09:41:16 am »
Fascinating - I played with this and came up with a nested variant:
(Attachment Link)

Hello there,

Yes, and with only 16 capacitors and 16 resistors who could resist using that one :)

It does look interesting though, but what is that supposed to do?

 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #15 on: February 15, 2024, 07:33:58 pm »


It does look interesting though, but what is that supposed to do?
Be counter-intuitive?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #16 on: February 15, 2024, 09:24:56 pm »


It does look interesting though, but what is that supposed to do?
Be counter-intuitive?

In what way?
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #17 on: February 17, 2024, 10:16:13 am »
Because a passive network produces higher voltage than supplied to it, without LC resonance.  Although its not exactly easy or practical.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #18 on: February 18, 2024, 02:10:37 pm »
Because a passive network produces higher voltage than supplied to it, without LC resonance.  Although its not exactly easy or practical.

Hello again,

Oh you mean the circuit you drew produces a higher AC voltage at the output than at the input?

A typical voltage doubler does that but it's AC input and DC output.
 

Offline MarkT

  • Frequent Contributor
  • **
  • Posts: 367
  • Country: gb
Re: Calculation of the 3rd order RC filter
« Reply #19 on: February 18, 2024, 02:33:13 pm »
A voltage double has non-linear elements though, its not just RC.
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #20 on: February 19, 2024, 01:10:03 pm »
A voltage double has non-linear elements though, its not just RC.

Hello,

Yup.

So what is the output of that more complicated RC circuit with many resistors and capacitors?
Did you do a simulation of that?
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3274
  • Country: us
Re: Calculation of the 3rd order RC filter
« Reply #21 on: February 19, 2024, 02:14:40 pm »
Another interesting active 3rd Order Filter Topology that utilizes equal valued components, origin is from ~half a century ago!

https://www.eevblog.com/forum/projects/7th-order-butterworth-filter-help/25/

https://www.eevblog.com/forum/projects/opamp-follower-and-sallen-key-filter-behaving-strange/msg4912561/#msg4912561

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 
The following users thanked this post: S. Petrukhin

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1445
Re: Calculation of the 3rd order RC filter
« Reply #22 on: February 20, 2024, 01:15:29 am »
Another interesting active 3rd Order Filter Topology that utilizes equal valued components, origin is from ~half a century ago!

https://www.eevblog.com/forum/projects/7th-order-butterworth-filter-help/25/

https://www.eevblog.com/forum/projects/opamp-follower-and-sallen-key-filter-behaving-strange/msg4912561/#msg4912561

Best,

Yes that looks interesting too.
 

Offline S. PetrukhinTopic starter

  • Super Contributor
  • ***
  • Posts: 1146
  • Country: ru
Re: Calculation of the 3rd order RC filter
« Reply #23 on: April 17, 2024, 01:25:58 pm »
Here's a couple interesting Passive RC 3rd Order filters which exhibit a Voltage Gain greater than Unity without inductors, nor transformers!!

Low pass and High pass versions.


Thank you very much! But how to calculate these filters correctly for the frequency I need?
And sorry for my English.
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3274
  • Country: us
Re: Calculation of the 3rd order RC filter
« Reply #24 on: April 18, 2024, 01:43:20 am »
You will need to derive the transfer function for these and then evaluate their performance. These really aren't useful practically except for helping develop ones understanding of passive RC filters and such, and winning a few brewisky bets  ;).

They do achieve a greater (slightly) than unity voltage gain, and one can simply build a Protoboard version to evaluate.

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf