Go Back   Home > Forums > Blogs > abraxalito

Rate this Entry

Designing high order active filters

Posted 20th September 2015 at 11:54 PM by abraxalito
Updated 25th September 2015 at 01:20 AM by abraxalito

I've been getting a lot of use out of Simon Bramble's webpage for designing active filters recently - https://www.simonbramble.co.uk/techar...ter_design.htm. Its a great resource.

Right down at the bottom of the page the last filter he shows the schematic of is a 9th order Chebyshev, 1dB ripple, with a corner frequency of 1kHz. A textbook frequency response plot is obtained using LTC6241s. I latched on to this and tried changing the corner frequency to 18kHz, wondering if I could use such a design for an anti-imaging filter for my DACs. So I divided all the capacitor values by 18 and ran the sim. Disaster! The frequency response I obtained is below - a 7dB spike at 17kHz.

The problem seems to be inadequate Q - high order filters are composed of sections which increase in Q (more positive feedback) and the chosen opamps aren't fast enough (18MHz GBW). I went to a faster opamp for the highest Q stage which brought about some improvement but still not as beautiful as the 1kHz corner frequency plot. Since doing those sims I've studied a bit more and it may be that the opamp's CM input capacitance is as much, or more, of an issue here than its GBW. A helpful TI paper (here - https://www.ti.com/lit/ml/sloa088/sloa088.pdf) has a formula (p53) for estimating the required GBW from the Q.

A presentation from TI about component (mostly R and C) sensitivity in opamp-based active filters. They look at the effect of finite GBW on the highest Q stage (close to the end of the text) and conclude for their 8kHz filter that 10MHz GBW ought to be sufficient. However that's not quite what I found in LTSpice with my filter so that may be a pointer that GBW isn't the primary issue, opamp input capacitance could well be.

https://www.ti.com/lit/ml/sprp524/sprp524.pdf

Given there's no way I'd go anywhere near as low as 1k for resistors driven by opamps in my designs (too much PSU noise from the classAB output stage going over to classB) there looks to be a snowball in hell's chance for scaling those 1ks upwards if parasitic capacitances are coming into play already. The capacitors are in expensive NP0 territory (332nF would call for 3 paralleled 100ns) already so higher resistor values would help the BOM cost if they could be accommodated.

After some reflection I decided to try with a discrete component approach, rather than using opamps. I was inspired by John Linsley Hood's 'Liniac' where he uses a current source loaded darlington - I opted for a current source loaded darlington wired as a follower - i.e. close to unity voltage gain. I chose a darlington because they're cheaper than the more traditional JFET and wanted to find out if I could get aurally pleasing results for less money.

The darlington needs to have a good chance of high current gain at low emitter currents - I'd like the approach not to use more current than say a TL084 (1.4mA typical per stage). Scanning a few DSs I settled on the BCV27 - its shown (in NXP data) to have a typical current gain around 60k, minimum 4k at 1mA. Its also attractively cheap - below a fifth the cost of a BF862.

Update - since beginning this post my curiosity has gotten the better of me and I've gone back to LTSpice and found out what it takes to get a textbook response out of this filter. It turns out not to be anything to do with common-mode input capacitances. Rather its due to loading effects on the higher Q stages from their following stage. What gave the game away was seeing a 'kink' in the output of the last-but-one stage, just at the point where the peak appeared in the highest Q stage. So I stuck in a perfect buffer between the two highest Q stages - and the kink vanished. The irony here is that it does indeed take higher resistor values to get a textbook FR plot - including in the last RC stage - the 1k loading is too low. Kudos to LTSpice for having opamp models which reflect the loading they're subject to - presumably there's an Rout in the model? In which case if the loading effect is a function of the NFB (Rout is reduced by loop gain) then higher GBW opamps should fix up the problem. When I experimented with a higher GBW opamp before, I think I only substituted the highest Q stage with the faster opamp - arguing that it would only be needed for that stage. Faulty reasoning - so let's go back and substitute the 2nd-highest Q opamp with a faster one and remove the buffer....

Turns out yes - with 50MHz GBW opamps (LTC6244) in the two highest Q stages the response can be pretty well perfect. So this implies the 18MHz opamps will work well enough if the resistor values are tweaked upwards, the capacitors proportionately downwards. But how low can the GBW go before the Q gets negatively affected? And how low can the capacitors be before parasitics start to kick in? This could be where building gives a faster answer than simulating. It is however an interesting discovery that the TI papers have missed an important influence - that of opamp loading.

After some more tweaking in LTSpice I got a textbook response with the LTC6244 in the highest Q stage but could not achieve it with the LTC6241 there even when increasing the impedances. With the slower part there was always a nagging 0.3dB peak which wouldn't go away. Using 10k resistors the response is perfect with a buffer and the faster opamp - removing the buffer though and there's about a quarter dB shift. The faster LTC6244 comes with lower input parasitic capacitance so when exchanging them the cap nearest the input needs a couple of pF tweak. Plot now attached of the response I get with two LTC6244s in the two most demanding stages, 10k resistors used.

Update - I've now included a schematic of a second-order filter section which is designed to do NOS droop correction. Its accurate to within 0.1dB up to 18kHz just has a little roll off at the very top. Note its not using the BCV27 rather two discretes as LTSpice doesn't have the darlington - with the BCV27 the 3e5 resistor isn't required. The voltage source (1.75V) and series 33R is in reality a red LED.

Update2 - the first filter that I built with the BCV27 buffers was an 8th order Chebyshev - four cascaded sections. When I first listened to it on my headphones I discovered it suffered from a LOT of HF noise. Going back to LTSpice and gaining understanding of how to use the noise analysis function quickly revealed why this is so. The final stage of the filter is the highest Q one, for reasons of dynamic range - we don't want to clip this stage so it must appear in the signal chain after the HF has been sufficiently attenuated by the earlier stages. Having high Q though means high gain and from high gain follows high noise. The predominant source of noise being the shot current flowing through the input resistors. Reducing the resistor values (scaling up the Cs in tandem) reduces the noise so I did this and got the noise acceptable on my 'phones. However last night I tried this filter out on my speaker system, auditioning it against a straight wire. It clearly is still a bit too noisy but other than that I didn't notice any other audible artifacts being introduced.

So I'd say that 8th order is probably the practical limit in audio with this topology for reasons of noise, if not Q stability against component variations. Fortunately with discrete transistors we can increase the supply voltages to get more dynamic range if noise is a problem. 6th order might well be the sweet spot though on battery power so that's what I'm including in my latest DAC design, together with the NOS droop correction section.
Attached Thumbnails
Click image for larger version

Name:	bramble18kchebyshev.jpg
Views:	160
Size:	31.5 KB
ID:	1719   Click image for larger version

Name:	LTC6244-17.4k.jpg
Views:	167
Size:	47.6 KB
ID:	1721   Click image for larger version

Name:	NOSdroop.jpg
Views:	493
Size:	44.3 KB
ID:	1722   Click image for larger version

Name:	NOSdroopFR.jpg
Views:	131
Size:	34.9 KB
ID:	1723  
Views 1045 Comments 7
Total Comments 7

Comments

  1. Old Comment
    Are you using an MFB topology for your circuit? Leapfrog? Hopefully not Sallen-Key! AVOID SK for high Q circuits. They have HUGE component sensitivities when Q increases above about 2. Sims look nice with perfect values, but in reality with real world components and real world tolerances they are no good.

    Are you following the circuits from that web page? Those look SK to me. Can you post your schematic?
    permalink
    Posted 21st September 2015 at 11:46 PM by CharlieLaub CharlieLaub is offline
    Updated 21st September 2015 at 11:51 PM by CharlieLaub
  2. Old Comment
    abraxalito's Avatar
    Sallen - Key it is. I'm aware of the component sensitivities - they're set out very well in the paper I linked to. I am using the least sensitive S-K variant - with unity gain buffer.

    I have built some filters with Qs greater than 2 and done some simple measurements - 'no good' is hype.

    Which schematic do you want? I'll be posting the schematic for the discrete buffer stage in a few days but sounds like its not for you as in your perception they're 'no good'.
    permalink
    Posted 22nd September 2015 at 12:57 AM by abraxalito abraxalito is offline
  3. Old Comment
    Well I wouldn't use SK above Q=2 or so but maybe your low sensitivity version would work fine. You can still try MFB for the highest Q stages, but know (I'm sure you do) that they are phase inverting.
    permalink
    Posted 24th September 2015 at 12:25 AM by CharlieLaub CharlieLaub is offline
  4. Old Comment
    abraxalito's Avatar
    Perhaps we have different requirements for how flat our passbands need to be - for me I don't worry much at all about half a dB of ripple seeing as I know my speakers in-room will be much worse than that.

    MFB is a topology I've tried before - it needs an inverting amp with gain so wouldn't work with a simple buffer stage. When I tried it with opamps one major drawback is the lowish input impedance in practical realizations.

    How do the sensitivities compare - between S-K in unity gain and MFB in (inverting) unity gain?
    permalink
    Posted 24th September 2015 at 01:41 AM by abraxalito abraxalito is offline
  5. Old Comment
    Gain is not required for an MFB filter. You may find low input impedance as you mentioned, but unless the Q is really high it's manageable. You do need to use an op-amp that has high open loop gain and high bandwidth for MFB, but this is not a problem these days. Just don't use a TL072 or NE5532! If you want I can send you a MFB LP filter design spreadsheet (Excel) that I put together. The user chooses Fc, gain (V/V), Q and the capacitance used, all of which are independently variable. The 'sheet automatically chooses the "best" resistor values from the E96 or E192 series for the circuit. PM me with your email address and I will send it over.
    permalink
    Posted 24th September 2015 at 03:42 PM by CharlieLaub CharlieLaub is offline
  6. Old Comment
    Also, if you want to design an Elliptic filter for this purpose and want more freedom in choosing the implementation you need to know the filter in terms of first and second order stages and the associated Fc and Q of each. I can send you a program (its a DOS program unfortunately) that lets you provide these as input and then spits out the parameters for the various stages. Then it is up to you to determine how to implement them, e.g. a cascade of SK or MFB or other. I have used this program to design a set of filters that have ripple in both the passband and stopband, like elliptic filters, but are meant to be used in complementary pairs as loudspeaker crossover filters. I hope to write all of that up someday...

    For an anti-aliasing filter you want something that is very steep right away. I think that typically the transition band starts around 18kHz like you mention but the stop band edge is set to Nyquist, e.g. 22k or 24k Hz and attenuation hits max there, at least 60dB of it. I have measured this exact response from commercial products, so I believe they are using an elliptical filters. These performance specs are ALOT steeper than the 9th order (the 1kHz Fc one) Elliptical filter shown on the simonbramble web page you linked to. That filter is not a fully elliptic filter, it's a Chebyshev type 1 filter - these have passband ripple but no stopband ripple. You can see these differences in filter types highlighted here:
    https://commons.wikimedia.org/wiki/F...ar_filters.svg
    Having both passband AND stopband ripple (full elliptic filter) gives the steepest transition band but the stopband rebounds up to some "ceiling". This is usually a minimum of 60dB down. The Q values needed for this kind of filter are much higher (like Q=50) and there is no way you could use a Sallen Key topology for that. Even MFB is hard pressed to do such a high Q, but that is what is needed to get the required rejection over only a band that is only a few kHz wide. This is the kind of filter I had in mind when I first saw your post, and so I thought that using a SK was ludicrous. In any case, making these filters yourself will be difficult and expensive. Why not just use a monolithic solution? There are 8th order Elliptic LP filters available as ICs that are purpose built for anti-aliasing.
    permalink
    Posted 24th September 2015 at 03:56 PM by CharlieLaub CharlieLaub is offline
    Updated 24th September 2015 at 04:30 PM by CharlieLaub
  7. Old Comment
    abraxalito's Avatar
    I realize that gain isn't required from the resulting filter (in fact in my understanding it can attenuate too without difficulty) but it does need a gain element (an opamp for example, not a unity gain follower). That was my meaning.

    Low input impedance isn't really manageable when good SQ is a target - means current source biassing the output and running fully balanced to equalize PSU currents. That's why I'll take a pass on MFB - the BOM cost will escalate as will the power requirement. Thanks for the offer though.

    I've already built the elliptic filter - see one of my previous posts. Even when passive, elliptic filters I found have hideous component sensitivity (due as you point out to the extreme Q), which is why I gave up on elliptic passive filters. I'm curious how you arrived at your 60dB figure? I came across ICs to implement filters many years ago when in the industry but I doubt they'd be optimum for power and cost in my application.
    permalink
    Posted 24th September 2015 at 11:17 PM by abraxalito abraxalito is offline
 

New To Site? Need Help?
Copyright ©1999-2017 diyAudio