+ Post New Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 47
  1. #1
    Member level 2
    Points: 2,036, Level: 10
    Achievements:
    7 years registered

    Join Date
    May 2009
    Posts
    53
    Helped
    0 / 0
    Points
    2,036
    Level
    10

    cascading filter after a 2 poles sallenkey

    Hello I have a sallen-key topology lowpass, as in picture, which cuts at 40kHz.
    Click image for larger version. 

Name:	Clipboard01.jpg 
Views:	11 
Size:	104.0 KB 
ID:	151108
    Now, this is an antialiasing filter after a DAC and before a power amplifier. I need to add a stronger filter, and the only way I have is to insert a filter after the existing one and before the poweramp.
    How can I calculate the new filter? Suppose I need a 2 or 4 additional poles, how do I take in account that there is already an the existing one in place? Usually all the tools do not allow modifying existing topology, and I know that cascading filters can be a complex task.

  2. #2
    Advanced Member level 5
    Points: 49,718, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,718
    Level
    54

    Re: cascading filter after a 2 poles sallenkey

    Your filter frequency response is droopy because it does not have the Q of a Butterworth type. Since the gain of the opamp is 1 then the value of C1 should be double the value of C2. Cascaded filters cause the droopiness to be worse so the Q is adjusted for a total Butterworth response. Lookup multi pole Sallen and Key filters in google.



  3. #3
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    Now, this is an antialiasing filter after a DAC
    You mean "reconstruction filter"
    ("anti aliasing filter" is before an ADC)

    I need to add a stronger filter
    means you need "higher order" filter

    How can I calculate the new filter?
    do an internet search for "online sallen key calculator"

    .. to find tools like tihs one: https://www.beis.de/Elektronik/Filte...eLPFilter.html

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 253,869, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,227
    Helped
    13461 / 13461
    Points
    253,869
    Level
    100

    Re: cascading filter after a 2 poles sallenkey

    A 4th order transfer function can be decomposed into two 2nd order function, the same with higher order filters. Filter design tools do already calculate the individual second order blocks (bi-quads).



  5. #5
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    A 4th order transfer function can be decomposed into two 2nd order function, the same with higher order filters. Filter design tools do already calculate the individual second order blocks (bi-quads).
    But mind:
    [40kHz 2nd order] + [40kHz 2nd order] is not [40kHz 4th order]
    --> it will result in lower cutoff frequency but 4th order.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  6. #6
    Advanced Member level 5
    Points: 49,718, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,718
    Level
    54

    Re: cascading filter after a 2 poles sallenkey

    Quote Originally Posted by KlausST View Post

    But mind:
    [40kHz 2nd order] + [40kHz 2nd order] is not [40kHz 4th order]
    --> it will result in lower cutoff frequency but 4th order.

    Klaus
    That is why the Q of each second-order filter is adjusted for a 4th order filter.



    •   AltAdvertisment

        
       

  7. #7
    Advanced Member level 2
    Points: 4,188, Level: 15

    Join Date
    Nov 2013
    Posts
    628
    Helped
    157 / 157
    Points
    4,188
    Level
    15

    Re: cascading filter after a 2 poles sallenkey

    Filter design tables contain the necessary Q and normalised cut-off frequencies for the required order and characteristic. You should use one to calculate the next 2nd or 4th order stage(s).
    Here is one: https://alanmacy.com/design-test/ Somewhere at the bottom.
    "Try SCE to AUX." /John Aaron/



  8. #8
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    Does it depend on Q?
    Q defines the characteristic: Bessel, butterworth...

    But a filter cutoff frequency is defined by the amplitude to drop to 70.7% = -3dB.
    And if you connect two LPF in series, each defined with -3dB at 40kHz it will result in -6dB at 40kHz.
    --> The -3dB cutoff frequency of the combined filter is lower than 40kHz then.

    The exact frequency will depend on Q.
    Iīd say if you combine two identical filters to get 40kHz cutoff frequency you need to calculate the single filters for -1.5dB at 40kHz.

    But usually if one wants a 4th order filter: the two 2nd order filters are not identical.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  9. #9
    Advanced Member level 2
    Points: 4,188, Level: 15

    Join Date
    Nov 2013
    Posts
    628
    Helped
    157 / 157
    Points
    4,188
    Level
    15

    Re: cascading filter after a 2 poles sallenkey

    Quote Originally Posted by KlausST View Post
    But a filter cutoff frequency is defined by the amplitude to drop to 70.7% = -3dB.
    And if you connect two LPF in series, each defined with -3dB at 40kHz it will result in -6dB at 40kHz.
    --> The -3dB cutoff frequency of the combined filter is lower than 40kHz then.
    Partly true.
    The exception is the Butterworth characteristic, where the normalised cut-off frequencies for any order and for every stage is 1.
    It means that enough to set the Q factor of the stages to get higher/lower order, and total attenuation of the cascaded filter will be 3dB despite of each stages have 3dB attenuation at the same cut-off frequency. But don't forget that the 3dB cut-off frequency is measured from the peak of the AC characteristic, so it is a relative value, not an absolute.
    However, if you want to get a Bessel or other characteristic you have to use different normalised cut-off frequency and Q for different orders. This is why your statement is partly true, to check open the table I have attached before.
    "Try SCE to AUX." /John Aaron/



  10. #10
    Advanced Member level 5
    Points: 18,461, Level: 32
    Achievements:
    7 years registered
    crutschow's Avatar
    Join Date
    Feb 2012
    Location
    L.A. USA Zulu -8
    Posts
    3,573
    Helped
    844 / 844
    Points
    18,461
    Level
    32

    Re: cascading filter after a 2 poles sallenkey

    The easiest way to design a higher order active filter is to use a design tool, such as the FilterPro from Texas Instrument.
    If a 3-pole is sufficient, you can to that with a single-op amp, such as here.

    What problem are you seeing that you think requires a higher-order filter?
    Zapper
    Curmudgeon Elektroniker



  11. #11
    Advanced Member level 2
    Points: 4,707, Level: 16

    Join Date
    Feb 2014
    Posts
    634
    Helped
    220 / 220
    Points
    4,707
    Level
    16

    Re: cascading filter after a 2 poles sallenkey

    I quite like this filter calculator for sallen-key and multiple feedback which supports 1 to 10 filter orders and multiple options for how the values are selected:
    https://www.beis.de/Elektronik/Filte...eLPFilter.html



  12. #12
    Member level 2
    Points: 2,036, Level: 10
    Achievements:
    7 years registered

    Join Date
    May 2009
    Posts
    53
    Helped
    0 / 0
    Points
    2,036
    Level
    10

    Re: cascading filter after a 2 poles sallenkey

    First of all, I have to apologize about the schematic that I posted: it is wrong, the power supply is inverted but it is quite obvious how it should be. And yes, it is a reconstruction filter, sorry for the improper name.
    Thanks everybody for your help, I appreciate it.
    However, there is an important detail that I think was not well understood. The filter that I have posted in the picture is already there, I cannot modify it in any way. I can only add more stages after, that is the only way that I can solve the problem.
    Therefore I cannot design a filter from scratch, because I need to be so lucky that the filter calculator extracts exactly those values for the first stage. I have in some way to force those values, or calculate it manually.
    At this point I still do not have a clear figure on how to perform this calculation, i.e. leaving the first stage in place and adding additional stages. 2 + 4 poles should be enough.

    Quote Originally Posted by frankrose View Post
    Filter design tables contain the necessary Q and normalised cut-off frequencies for the required order and characteristic. You should use one to calculate the next 2nd or 4th order stage(s).
    Here is one: https://alanmacy.com/design-test/ Somewhere at the bottom.
    Now, however, I have an additional problem.
    According to your link, and also the one I have used originally:
    http://sim.okawa-denshi.jp/en/OPseikiLowkeisan.htm
    the filter I posted is correct, in fact the 39k, 39k, 100p, 100p give a cutoff at 40kHz.

    However, I simulated this filter with LTSPICE and it seems that the cutoff is at 27kHz, while at 40kHz I have exactly -6dB.
    I do not understand why.

    Then I used this calculator
    http://www.calculatoredge.com/electr...low%20pass.htm
    which, with 39k and 39k, provides 144p and 72p as capacitor values. With these LTSPICE is happy and I have -3dB at 40kHz.

    Not only I start being confused, but I start also being a bit worried since I cannot modify the first stage of the filter. What is wrong?
    Not too big deal, I can survive, but I need to carefully calculate the next two stages.



  13. #13
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    With additional LPF stages you can only shift the cutoff frequency to the left (lower frequency).
    I assume there is no way around this.

    ***
    Another point is that an ideal reconstruction filter should be sin(x)/x. This filter characteristic is theoretically only and can be built neither with analog nor with digital filters.
    Thus one uses filters that aproximate the ideal filter characteristic.
    I donīt know if the original filter is designed for this .. in either way: adding new filter stages will modify the total characteristic.
    It may improve the reconstruction filter - but it also may make it worse. (especially when you expect the output waveform to be exactly as the input waveform - even regarding phase shift.)

    ***
    Another - important to know - point is: Why do you want to modify the filter at all. I assume you are not satisfied how it works now.
    If so, you should say in which regard. Whatīs the problem now?
    Its important to tell us values.
    Without values we can only guess. This leads to "trial and error". But for "trial and error" you donīt need us - you can simply experiment on your own.

    Also we need values how you want it to be.

    Values could be: Passband ripple, passband phase shift, passband frequency, stopband frequency, stopband attenuation...

    Klaus

    - - - Updated - - -

    Hi,

    the filter I posted is correct, in fact the 39k, 39k, 100p, 100p give a cutoff at 40kHz.

    However, I simulated this filter with LTSPICE and it seems that the cutoff is at 27kHz, while at 40kHz I have exactly -6dB.
    This is what I wanted to explain with posts#5 and #8.

    ***
    It is true, that 39k with 100pF gives 40kHz,
    But two of them in series give 27kHz (and not 40kHz), since cutoff frequency is defined at -3dB.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  14. #14
    Super Moderator
    Points: 253,869, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    44,227
    Helped
    13461 / 13461
    Points
    253,869
    Level
    100

    Re: cascading filter after a 2 poles sallenkey

    Cut-off frequencies are not always calculated for -3 dB (half power point) attenuation. The Okawa tool apparently uses -6dB point, which explains the differences.

    but I start also being a bit worried since I cannot modify the first stage of the filter
    ??? Of course you can modify it at will. But you should decide about the intended filter specification first:
    - intended pass band and maximum magnitude variation in pass band
    - required stop band attenuation for specific frequencies

    The specification leads to a minimum filter order and optimal filter characteristic, e.g. Bessel, Butterworth, Chebyshev with specific parameters, etc.



  15. #15
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    Cut-off frequencies are not always calculated for -3 dB (half power point) attenuation. The Okawa tool apparently uses -6dB point, which explains the differences.
    Interesting. Never heared of that.

    Wikipedia says:
    There are many different types of filter circuits, with different responses to changing frequency. The frequency response of a filter is generally represented using a Bode plot, and the filter is characterized by its cutoff frequency and rate of frequency rolloff. In all cases, at the cutoff frequency, the filter attenuates the input power by half or 3 dB.
    I just out of curiosity I googled for OKAWA tools. What I found is this:
    http://sim.okawa-denshi.jp/en/OPstool.php
    I didnīt find anything about 6dB cutoff criterium. And the bode plot show -3dB at cutoff frequency.

    Whatīs the idea behind defininig a filter cutoff criterium other than -3dB?

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  16. #16
    Advanced Member level 5
    Points: 40,247, Level: 49
    Achievements:
    7 years registered
    LvW's Avatar
    Join Date
    May 2008
    Location
    Germany
    Posts
    5,770
    Helped
    1724 / 1724
    Points
    40,247
    Level
    49

    Re: cascading filter after a 2 poles sallenkey

    Quote Originally Posted by KlausST View Post
    Whatīs the idea behind defininig a filter cutoff criterium other than -3dB?
    Klaus
    Wikipedia is wrong (not the first time).

    The definition of a so-called cut-off frequency (end of pass band) at the "-3dB" frequency is mostly used (but not necessarily always !) for Butterworth responses (and perhaps for Bessel-Thomson responses).
    It is NOT in common use for all Chebyshev and Cauer (elliptic) approximations. In these cases, normally the allowed ripple within the passband defines the end of the passband.
    According to my knowledge (and to my experience) nearly all flter tables and filter design programs are using this set of definitions.
    Last edited by LvW; 13th February 2019 at 14:03.



    •   AltAdvertisment

        
       

  17. #17
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: cascading filter after a 2 poles sallenkey

    Hi,

    I went away from wikipedia and did a search at analog.com.

    They explain it more detailed.
    For - what I call "usual" - filters like:
    * Bessel
    * Butterworth
    * Linkwitz Riley
    ...
    there is the -3dB criterium.

    ****
    But for Chebychev filters - because one of their benefit is the low passband ripple - it makes no sense to use the -3dB criterion.

    Example: one can explicitely design a chebychev filter for +/- 0.2dB passband ripple, mostly because the application calls for this.
    --> Then indeed it makes sense to limit the so called passband where the filter response leaves the +/-0.2dB tolerance (and not at the usual -3dB).

    I have to admit: Although I used various filter types - including Chebychev - before, I was not aware about the different passband limit definitions.
    ***

    Back to the OPīs problem:
    I assume all the new knowledge doesn't help....

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  18. #18
    Member level 2
    Points: 2,036, Level: 10
    Achievements:
    7 years registered

    Join Date
    May 2009
    Posts
    53
    Helped
    0 / 0
    Points
    2,036
    Level
    10

    Re: cascading filter after a 2 poles sallenkey

    Quote Originally Posted by KlausST View Post
    Hi,

    With additional LPF stages you can only shift the cutoff frequency to the left (lower frequency).
    I assume there is no way around this.
    This is not a big deal in my application.

    Quote Originally Posted by KlausST View Post
    Another point is that an ideal reconstruction filter should be sin(x)/x. This filter characteristic is theoretically only and can be built neither with analog nor with digital filters.
    Thus one uses filters that aproximate the ideal filter characteristic.
    I donīt know if the original filter is designed for this .. in either way: adding new filter stages will modify the total characteristic.
    It may improve the reconstruction filter - but it also may make it worse. (especially when you expect the output waveform to be exactly as the input waveform - even regarding phase shift.)
    And this is why I am asking in this forum!
    As I said, I cannot change the existing filter. I just want to add more poles.

    Quote Originally Posted by KlausST View Post
    ***
    Another - important to know - point is: Why do you want to modify the filter at all. I assume you are not satisfied how it works now.
    If so, you should say in which regard. Whatīs the problem now?
    Its important to tell us values.
    Without values we can only guess. This leads to "trial and error". But for "trial and error" you donīt need us - you can simply experiment on your own.

    Also we need values how you want it to be.

    Values could be: Passband ripple, passband phase shift, passband frequency, stopband frequency, stopband attenuation...
    Ok, this is the reason. The signals are generated by a DAC at 100kHz S/s, and they are synthesized, not sampled. Therefore there is no energy over Nyquist.
    However I see after the filter the signal mirrored, i.e. if I output 23kHz I see energy at the mirrored frequency 100-23kHz. I want to eliminate this.
    The filter that I described looks insufficient. I am trying to make it sharper by adding more stages after. I have to make sure I do not change the phase till 25-30kHz. Since signals are generated at 100kHz the best frequency for the cutoff is 40kHz.

    Quote Originally Posted by KlausST View Post
    Klaus

    - - - Updated - - -

    Hi,


    This is what I wanted to explain with posts#5 and #8.

    ***
    It is true, that 39k with 100pF gives 40kHz,
    But two of them in series give 27kHz (and not 40kHz), since cutoff frequency is defined at -3dB.

    Klaus
    Sorry, I do not understand this point. This is one filter with 2 poles, not 2 filters. However it is not that important, it is a matter of terms.



  19. #19
    Advanced Member level 5
    Points: 49,718, Level: 54
    Achievements:
    7 years registered
    Audioguru's Avatar
    Join Date
    Jan 2008
    Location
    Toronto area of Canada
    Posts
    8,647
    Helped
    2017 / 2017
    Points
    49,718
    Level
    54

    Re: cascading filter after a 2 poles sallenkey

    A filter with a flat frequency response and a sharp cutoff corner is called Butterworth. Its Q is 0.707.
    A filter with a droopy frequency response and a gradual cutoff corner is called Bessel, but it has a better phase response and group delay than a Butterworth. Its Q is about 0.50.
    The original filter in this thread is a Bessel filter.

    When two Bessel filters are cascaded then the frequency response is VERY droopy and the cutoff corner is VERY gradual.



  20. #20
    Member level 2
    Points: 2,036, Level: 10
    Achievements:
    7 years registered

    Join Date
    May 2009
    Posts
    53
    Helped
    0 / 0
    Points
    2,036
    Level
    10

    Re: cascading filter after a 2 poles sallenkey

    Quote Originally Posted by Audioguru View Post
    A filter with a flat frequency response and a sharp cutoff corner is called Butterworth. Its Q is 0.707.
    A filter with a droopy frequency response and a gradual cutoff corner is called Bessel, but it has a better phase response and group delay than a Butterworth. Its Q is about 0.50.
    The original filter in this thread is a Bessel filter.

    When two Bessel filters are cascaded then the frequency response is VERY droopy and the cutoff corner is VERY gradual.
    This is general theory.
    That said, what do you suggest to do?



--[[ ]]--