+ Post New Thread
Results 1 to 16 of 16

10th February 2018, 01:05 #1
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Switched capacitor equivalent of a RC low pass filter.
I am trying to make the switch capacitor equivalent of a RC passive filter and compare there frequency response curves.
My 3dB frequency for the RC filter is 1KHz where C is 1pF and Req is 159M ohms. I am using an fs of 2KHz and the C1 value comes out to be 0.5pF.
Vin value is 1.65V and clock is 3.3V when it is high. I read that for discrete time variant circuits you had to a PSS followed by PAC. This is the first time I had done both and I am attaching the forms for both analyses
.
I am trying to figure out why my freq response curves are different. Here I plot both the magnitude of the outputs of the RC and the switched cap circuit. The red is the former one and the blue is the latter.
The switched cap (blue) rolls off faster. I was wondering if there was an issue with my design or the simulation settings. It seems the RC constant of the switch cap is larger resulting in smaller 3dB frequency
I was hoping someone here could help me with this.

10th February 2018, 11:45 #2
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 42,260
 Helped
 12863 / 12863
 Points
 243,288
 Level
 100
Re: Switched capacitor equivalent of a RC low pass filter.
You confused ω0 and f0 in your simplified switched capacitor formula. C1 should be 3.1 pF ac cording to your formula. The simplified formula isn't valid for the low sampling frequency however.
fs=2 kHz is effectively useless for a 1 kHz low pass due to aliasing effects.
1 members found this post helpful.

10th February 2018, 11:45

10th February 2018, 20:03 #3
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Re: Switched capacitor equivalent of a RC low pass filter.
Thanks, you were right about the value of C1 ( that I got wrong ) as well as the sampling frequency being too low. I have to read up on how switch cap filters are designed more effectively.
Is there an equation that captures the affects of aliasing? Bumping up fs to 30KHz ( and using the sameHz formula )gets me close to the desired fc but not quite.
Is there a frequency domain plot I can do to prevent aliasing and decide upon the optimal fs?
In my ac and pac analysis the sweep was from 1 to 10KHz. so should my fs >= 2 * 10KHz, to avoid aliasing?Last edited by tenso; 10th February 2018 at 20:16.

10th February 2018, 22:51 #4
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 42,260
 Helped
 12863 / 12863
 Points
 243,288
 Level
 100
Re: Switched capacitor equivalent of a RC low pass filter.
An exact cutoff frequency calculation has to be based on ztransform. With sufficient large fs/fc ratio, the approximate relation assumed in post becomes true. Aliasing is a different issue, to avoid it, signal frequencies above fs/2 must be filtered out before entering the switched section.

11th February 2018, 00:50 #5
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Re: Switched capacitor equivalent of a RC low pass filter.
with regard to the cutoff calculation and it being based on the ztransform, could you point me in the right direction? I have seen some older threads here where posters mention the bilinear transform. Would that give a more accurate relationship?
what is vs in the fs/vs ratio you mention?
since I don't have an antialiasing frequency upfront, does running a pac with 1 to 10KHz affect the response? Here since fmax = 10 KHz, should fs be greater than 20KHz at least?

11th February 2018, 10:42 #6
 Join Date
 Jan 2008
 Location
 Bochum, Germany
 Posts
 42,260
 Helped
 12863 / 12863
 Points
 243,288
 Level
 100
Re: Switched capacitor equivalent of a RC low pass filter.
Sorry for the typo. Should be fs/fc.
Bilinear transform is a possible method, but the bilinear equivalent of a time continuous first order low pass is a more complex switched capacitor circuit. You probably want a first order corresponding SC circuit.
There's apparently no significant aliasing in the post #1 results. Not sure if it's due to inappropriate analysis parameters (I'm not familiar with PSS/PAC analysis), it may be also an effect of relative large MOSFET rdson.

14th February 2018, 00:11 #7
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Re: Switched capacitor equivalent of a RC low pass filter.
any suggestion as to how I model the passive RC filter with switched cap circuit taking into account rdson of the MOSFET resistors. Even with correcting for the value of capacitor (3pF) the fc was way off.
I only came close to the fc when my bumped up my fs significantly. This resulted in a lower cap value. Now my sampling frequency is about 30KHz and the cap is 0.2pF but I am still of by about 100 Hz for my fc.

14th February 2018, 00:11

14th February 2018, 12:32 #8
 Join Date
 May 2008
 Location
 Germany
 Posts
 5,692
 Helped
 1706 / 1706
 Points
 39,728
 Level
 48
Re: Switched capacitor equivalent of a RC low pass filter.
Are you aware that the nonswitched capacitor must be very large if compared with the switched C ?
This is because the switchen capacitor in your circuit works only sufficiently (simulating the R), when also the right node of R is connected to a voltage source or to ground.
(a large C can mimic a voltage source).
Surprisingly, this fact (both ends of the switched C for EULER approximations to be connected to a voltage source) is not always mentioned in relevant articles/books.
If the right node of the R to be replaced is NOT connected to ground, the bilinear approximation can be used.Last edited by LvW; 14th February 2018 at 12:38.

14th February 2018, 20:38 #9
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Re: Switched capacitor equivalent of a RC low pass filter.
if you mean that R in the nonswitching cap will be large to get an fc of 1KHz and 1pF, then yes I am aware.
So you are saying if the right node of R in the passive network is not connected to ground then i can use the bi linear approximation to model the switched cap network to replace the R?
disregarding mathematical models for a while, how do I design translate the RC filter with an fc of 1K into a switch cap circuit? The only way I come close to the fc value is if I increase the sampling frequency and consequently decrease the capacitor C1.
If someone could point in the right direction as to why this is happening, I would be grateful.
Also any suggestions on books which talk about transistor level design of active RC, switch cap, gmC filters etc. will be helpful.

14th February 2018, 20:55 #10
 Join Date
 May 2008
 Location
 Germany
 Posts
 5,692
 Helped
 1706 / 1706
 Points
 39,728
 Level
 48
Re: Switched capacitor equivalent of a RC low pass filter.
I do not understand the 1st sentence ("R in the nonswitchung cap"??)
The 2nd sentence is correct.
Regarding the 3rd sentence: Yes, decreasing C1 increases the ratio C2/C2 which is in accordance to my statement: C2/C1>>1.
You are asking why? Because the theory of the simple Rreplacement based on the EULER approximation REQUIRES that both ends of the R to be replaced have a constant voltage during the sampling phase.
This requires a large ratio C2/C1 in order to allow a nearly contstant voltage across C2.

14th February 2018, 22:23 #11
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
Re: Switched capacitor equivalent of a RC low pass filter.
I thought you were talking about whether I knew that the R in the passive network is large. But now I see that you were talking about C1 and C2.
so to summarize, to accurately model the R in the original network we need the right node of R to be connected to ground or a voltage source. If both ends are connected to voltage sources the switched cap circuit accurately models the resistor. having a larger C2/C1 ratio (than what I started out with) helps in replacing the resistor.
could you link me to a source which talks about these EULER approximation you speak of? thanks for the help.

14th February 2018, 22:59 #12
 Join Date
 May 2008
 Location
 Germany
 Posts
 5,692
 Helped
 1706 / 1706
 Points
 39,728
 Level
 48
Re: Switched capacitor equivalent of a RC low pass filter.
No  not accurately. That`s not possible.
Recall: We speak of EULER APPROXIMATION only.
In any case, the sampling frequency must be as large as possible (very large in comparison to the processed signal frequencies).
This is true even for the bilinear approximation.
However  not too large. Why not? Because the sampling intervall must still be large enough to allow sufficient charging of the switched capacitor (due to finite on resistance of the FET).
As a result: We have to find a tradeoff between some conflicting requirements. However, this is a classical and normal situation in electronics.
We always have to face such situations. Remember: When we use resistors they should be preferrable within certain limits  not too large and not too small. I suppose, you know why.
There are many articles about SC Techniques available (start a google search).

15th February 2018, 13:25 #13
 Join Date
 May 2008
 Location
 Germany
 Posts
 5,692
 Helped
 1706 / 1706
 Points
 39,728
 Level
 48
Re: Switched capacitor equivalent of a RC low pass filter.
For practical reasons, the requirement to have a fixed potential at the right node of the resistor R is fulfilled using the virtual ground of the inverting opam input with feedback
For this reason, S/C intergrators play a major role in all S/C circuits.
For example, see here (Lectures 9 and 10):
https://inst.eecs.berkeley.edu/~ee24.../lectures.html

15th February 2018, 13:25

15th February 2018, 22:20 #14
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6

16th February 2018, 09:01 #15
 Join Date
 May 2008
 Location
 Germany
 Posts
 5,692
 Helped
 1706 / 1706
 Points
 39,728
 Level
 48
Re: Switched capacitor equivalent of a RC low pass filter.
In most cases. a voltage opamp is used, however, use of an OTA is also possible.

16th February 2018, 23:52 #16
 Join Date
 Feb 2015
 Posts
 83
 Helped
 2 / 2
 Points
 945
 Level
 6
+ Post New Thread
Please login