+ Post New Thread
Results 1 to 16 of 16
  1. #1
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    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.

    Click image for larger version. 

Name:	pic1.PNG 
Views:	16 
Size:	68.8 KB 
ID:	144446

    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.

    Click image for larger version. 

Name:	pic2.PNG 
Views:	10 
Size:	20.3 KB 
ID:	144448

    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

    Click image for larger version. 

Name:	pic3.PNG 
Views:	5 
Size:	31.7 KB 
ID:	144447

    Click image for larger version. 

Name:	pic4.PNG 
Views:	4 
Size:	23.8 KB 
ID:	144449.

    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.

    Click image for larger version. 

Name:	pic5.PNG 
Views:	10 
Size:	34.2 KB 
ID:	144450

    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.

  2. #2
    Super Moderator
    Points: 244,846, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,531
    Helped
    12958 / 12958
    Points
    244,846
    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.

  3. #3
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by FvM View Post
    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.
    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.



    •   Alt10th February 2018, 20:03

      advertising

        
       

  4. #4
    Super Moderator
    Points: 244,846, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,531
    Helped
    12958 / 12958
    Points
    244,846
    Level
    100

    Re: Switched capacitor equivalent of a RC low pass filter.

    An exact cut-off frequency calculation has to be based on z-transform. 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.



  5. #5
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by FvM View Post
    An exact cut-off frequency calculation has to be based on z-transform. With sufficient large fs/vs 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.
    with regard to the cut-off calculation and it being based on the z-transform, 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 anti-aliasing 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?



  6. #6
    Super Moderator
    Points: 244,846, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    42,531
    Helped
    12958 / 12958
    Points
    244,846
    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.



  7. #7
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by FvM View Post
    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.
    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.



    •   Alt14th February 2018, 00:11

      advertising

        
       

  8. #8
    Advanced Member level 5
    Points: 39,840, Level: 48
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,714
    Helped
    1710 / 1710
    Points
    39,840
    Level
    48

    Re: Switched capacitor equivalent of a RC low pass filter.

    Are you aware that the non-switched 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.



  9. #9
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by LvW View Post
    Are you aware that the non-switched 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.
    if you mean that R in the non-switching 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, gm-C filters etc. will be helpful.



  10. #10
    Advanced Member level 5
    Points: 39,840, Level: 48
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,714
    Helped
    1710 / 1710
    Points
    39,840
    Level
    48

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by tenso View Post
    if you mean that R in the non-switching 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, gm-C filters etc. will be helpful.
    I do not understand the 1st sentence ("R in the non-switchung 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 R-replacement 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.



  11. #11
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    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.



  12. #12
    Advanced Member level 5
    Points: 39,840, Level: 48
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,714
    Helped
    1710 / 1710
    Points
    39,840
    Level
    48

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by tenso View Post
    If both ends are connected to voltage sources the switched cap circuit accurately models the resistor.
    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 trade-off 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).



    •   Alt14th February 2018, 22:59

      advertising

        
       

  13. #13
    Advanced Member level 5
    Points: 39,840, Level: 48
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,714
    Helped
    1710 / 1710
    Points
    39,840
    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



  14. #14
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by LvW View Post
    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
    thanks for the help. Reading lecture 10, it says the op-amp is transconductance types. I will redo the simulation with an OTA for the integrator circuit and take a look at the simulation results.



  15. #15
    Advanced Member level 5
    Points: 39,840, Level: 48
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,714
    Helped
    1710 / 1710
    Points
    39,840
    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.



  16. #16
    Member level 5
    Points: 973, Level: 7

    Join Date
    Feb 2015
    Posts
    83
    Helped
    2 / 2
    Points
    973
    Level
    7

    Re: Switched capacitor equivalent of a RC low pass filter.

    Quote Originally Posted by LvW View Post
    In most cases. a voltage opamp is used, however, use of an OTA is also possible.
    wouldn't it be better to use an OTA if you have capacitors in the feedback network?



--[[ ]]--