Forums

Using switched capacitor filter as a variable cut-off anti-aliasing filter

Started by djt294 June 1, 2016
Hi,
I have a need to design a 6-pole anti-aliasing filter with a variable frequency cut off range. The highest frequency will most like be a few kilohertz (3K-5K). The first thing that came to mind was a switched capacitor network. It seems to fit the application. My other options seem a bit more complicated (switching in different values of loop components). I have not designed using switched capacitor filters and was wondering if anyone has experience in using switched capacitor filters as anti-aliasing filters and the issues that came up in its implementation. Any other ideas regarding a variable frequency anti aliasing filter implementation topologies would be greatly appreciated.

Much Appreciated,
djt294
On 06/01/2016 11:08 AM, djt294 wrote:
> Hi, I have a need to design a 6-pole anti-aliasing filter with a > variable frequency cut off range. The highest frequency will most > like be a few kilohertz (3K-5K). The first thing that came to mind > was a switched capacitor network. It seems to fit the application. My > other options seem a bit more complicated (switching in different > values of loop components). I have not designed using switched > capacitor filters and was wondering if anyone has experience in using > switched capacitor filters as anti-aliasing filters and the issues > that came up in its implementation. Any other ideas regarding a > variable frequency anti aliasing filter implementation topologies > would be greatly appreciated. > > Much Appreciated, djt294 >
You can do that, but it's expensive, and the better parts have been disappearing lately, e.g. the LMF60 and LMF100. Also they're noisy as can be, and you have to filter out their clock feedthrough, so they aren't useful over a really wide range. The usual method is to use a fixed filter and sampling rate, then filter in software. That's cheap and flexible, and as a bonus it reduces the LSB/sqrt(12) sampling noise. Cheers Phil Hobbs -- Dr Philip C D Hobbs Principal Consultant ElectroOptical Innovations LLC Optics, Electro-optics, Photonics, Analog Electronics 160 North State Road #203 Briarcliff Manor NY 10510 hobbs at electrooptical dot net http://electrooptical.net
On Wed, 01 Jun 2016 08:08:56 -0700, djt294 wrote:

> Hi, > I have a need to design a 6-pole anti-aliasing filter with a variable > frequency cut off range. The highest frequency will most like be a few > kilohertz (3K-5K). The first thing that came to mind was a switched > capacitor network. It seems to fit the application. My other options > seem a bit more complicated (switching in different values of loop > components). I have not designed using switched capacitor filters and > was wondering if anyone has experience in using switched capacitor > filters as anti-aliasing filters and the issues that came up in its > implementation. Any other ideas regarding a variable frequency anti > aliasing filter implementation topologies would be greatly appreciated. > > Much Appreciated, > djt294
Switched-capacitor filters alias, and have other switching artifacts. I wouldn't say "don't use", but rather "use with caution". Can you even get them any more? They kind of lost most of their market niche when digital stuff became small and cheap. If you have any influence over the sampling end of the system, and if you really do need to have a sampling rate that is ultimately variable, consider sampling at a high rate with a fixed, simple anti-alias filter (if needed at all), then filtering and decimating further in digital-land. Unless you can really justify the need for anti-aliasing, read this (and then you will!): http://wescottdesign.com/articles/Sampling/sampling.pdf -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Wed, 1 Jun 2016 08:08:56 -0700 (PDT), djt294 <djt294@gmail.com>
wrote:

>Hi, >I have a need to design a 6-pole anti-aliasing filter with a variable frequency cut off range. The highest frequency will most like be a few kilohertz (3K-5K). The first thing that came to mind was a switched capacitor network. It seems to fit the application. My other options seem a bit more complicated (switching in different values of loop components). I have not designed using switched capacitor filters and was wondering if anyone has experience in using switched capacitor filters as anti-aliasing filters and the issues that came up in its implementation. Any other ideas regarding a variable frequency anti aliasing filter implementation topologies would be greatly appreciated. > >Much Appreciated, >djt294
I've found switchcap filters to be noisy. And they alias everything available, including power supply noise. And they make output spikes at the clock frequency. So you need real lowpass filters at the input and at the output. But they do work in some apps. Do you need continuous frequency variability? You can make an active filter and switch resistors with some analog multiplexers. Can you oversample and process digitally? Then you'd only need one fixed filter. -- John Larkin Highland Technology, Inc lunatic fringe electronics
Den onsdag den 1. juni 2016 kl. 17.09.01 UTC+2 skrev djt294:
> Hi, > I have a need to design a 6-pole anti-aliasing filter with a variable frequency cut off range. The highest frequency will most like be a few kilohertz (3K-5K). The first thing that came to mind was a switched capacitor network. It seems to fit the application. My other options seem a bit more complicated (switching in different values of loop components). I have not designed using switched capacitor filters and was wondering if anyone has experience in using switched capacitor filters as anti-aliasing filters and the issues that came up in its implementation. Any other ideas regarding a variable frequency anti aliasing filter implementation topologies would be greatly appreciated. > > Much Appreciated, > djt294
why not sample much faster and do it in software? -Lasse
On Wed, 01 Jun 2016 08:51:27 -0700, John Larkin wrote:

> On Wed, 1 Jun 2016 08:08:56 -0700 (PDT), djt294 <djt294@gmail.com> > wrote: > >>Hi, >>I have a need to design a 6-pole anti-aliasing filter with a variable >>frequency cut off range. The highest frequency will most like be a few >>kilohertz (3K-5K). The first thing that came to mind was a switched >>capacitor network. It seems to fit the application. My other options >>seem a bit more complicated (switching in different values of loop >>components). I have not designed using switched capacitor filters and >>was wondering if anyone has experience in using switched capacitor >>filters as anti-aliasing filters and the issues that came up in its >>implementation. Any other ideas regarding a variable frequency anti >>aliasing filter implementation topologies would be greatly appreciated. >> >>Much Appreciated, >>djt294 > > I've found switchcap filters to be noisy. And they alias everything > available, including power supply noise. And they make output spikes at > the clock frequency. So you need real lowpass filters at the input and > at the output. But they do work in some apps. > > Do you need continuous frequency variability? You can make an active > filter and switch resistors with some analog multiplexers. > > Can you oversample and process digitally? Then you'd only need one fixed > filter.
How does it work to do an active filter and change gains with DACs? I know it's POSSIBLE, I just don't know if it's a good idea. I think everyone who's commented on this so far has mentioned sampling fast and filtering in digital-land. There's a clue there. -- Tim Wescott Control systems, embedded software and circuit design I'm looking for work! See my website if you're interested http://www.wescottdesign.com
On Wed, 01 Jun 2016 14:39:06 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Wed, 01 Jun 2016 08:51:27 -0700, John Larkin wrote: > >> On Wed, 1 Jun 2016 08:08:56 -0700 (PDT), djt294 <djt294@gmail.com> >> wrote: >> >>>Hi, >>>I have a need to design a 6-pole anti-aliasing filter with a variable >>>frequency cut off range. The highest frequency will most like be a few >>>kilohertz (3K-5K). The first thing that came to mind was a switched >>>capacitor network. It seems to fit the application. My other options >>>seem a bit more complicated (switching in different values of loop >>>components). I have not designed using switched capacitor filters and >>>was wondering if anyone has experience in using switched capacitor >>>filters as anti-aliasing filters and the issues that came up in its >>>implementation. Any other ideas regarding a variable frequency anti >>>aliasing filter implementation topologies would be greatly appreciated. >>> >>>Much Appreciated, >>>djt294 >> >> I've found switchcap filters to be noisy. And they alias everything >> available, including power supply noise. And they make output spikes at >> the clock frequency. So you need real lowpass filters at the input and >> at the output. But they do work in some apps. >> >> Do you need continuous frequency variability? You can make an active >> filter and switch resistors with some analog multiplexers. >> >> Can you oversample and process digitally? Then you'd only need one fixed >> filter. > >How does it work to do an active filter and change gains with DACs? I >know it's POSSIBLE, I just don't know if it's a good idea.
A state-variable filter works fine with dacs to program the integrators. You could use digital pots, in a sallen-key or some such simpler filter, to program the frequency.
> >I think everyone who's commented on this so far has mentioned sampling >fast and filtering in digital-land. There's a clue there.
-- John Larkin Highland Technology, Inc picosecond timing precision measurement jlarkin att highlandtechnology dott com http://www.highlandtechnology.com
On Wed, 01 Jun 2016 12:53:19 -0700, John Larkin wrote:

> On Wed, 01 Jun 2016 14:39:06 -0500, Tim Wescott <tim@seemywebsite.com> > wrote: > >>On Wed, 01 Jun 2016 08:51:27 -0700, John Larkin wrote: >> >>> On Wed, 1 Jun 2016 08:08:56 -0700 (PDT), djt294 <djt294@gmail.com> >>> wrote: >>> >>>>Hi, >>>>I have a need to design a 6-pole anti-aliasing filter with a variable >>>>frequency cut off range. The highest frequency will most like be a few >>>>kilohertz (3K-5K). The first thing that came to mind was a switched >>>>capacitor network. It seems to fit the application. My other options >>>>seem a bit more complicated (switching in different values of loop >>>>components). I have not designed using switched capacitor filters and >>>>was wondering if anyone has experience in using switched capacitor >>>>filters as anti-aliasing filters and the issues that came up in its >>>>implementation. Any other ideas regarding a variable frequency anti >>>>aliasing filter implementation topologies would be greatly >>>>appreciated. >>>> >>>>Much Appreciated, >>>>djt294 >>> >>> I've found switchcap filters to be noisy. And they alias everything >>> available, including power supply noise. And they make output spikes >>> at the clock frequency. So you need real lowpass filters at the input >>> and at the output. But they do work in some apps. >>> >>> Do you need continuous frequency variability? You can make an active >>> filter and switch resistors with some analog multiplexers. >>> >>> Can you oversample and process digitally? Then you'd only need one >>> fixed filter. >> >>How does it work to do an active filter and change gains with DACs? I >>know it's POSSIBLE, I just don't know if it's a good idea. > > A state-variable filter works fine with dacs to program the integrators.
Hmm. And if you did it right you'd only need to change the frequency- setting gains -- the damping ratios could be fixed with resistors, at least until you started bumping into the op-amp phase shifts. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com I'm looking for work -- see my website!
"Tim Wescott" <seemywebsite@myfooter.really> wrote in message 
news:fqydnVGHCuOL3tLKnZ2dnUU7-I2dnZ2d@giganews.com...
>> A state-variable filter works fine with dacs to program the integrators. > > Hmm. And if you did it right you'd only need to change the frequency- > setting gains -- the damping ratios could be fixed with resistors, at > least until you started bumping into the op-amp phase shifts.
You'll bump into the R-2R (or whatever network they use internally) rolloff around the same point (100s kHz), but for a filter in the low kHz, that's perfectly fine. It's a good match. Honestly, I think I'd even do it in digital... even an AVR can crank enough samples and MACs to do it. Continuously variable IIR filter coefficients might be an, interesting computational exercise, or a fairly easily synthesized/rescaled FIR filter can be used at the expense of more MACs. Otherwise, just get a bog standard ARM, or a proper DSP even. Tim -- Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website: http://seventransistorlabs.com
On Wed, 1 Jun 2016 19:39:19 -0500, "Tim Williams"
<tiwill@seventransistorlabs.com> wrote:

>"Tim Wescott" <seemywebsite@myfooter.really> wrote in message >news:fqydnVGHCuOL3tLKnZ2dnUU7-I2dnZ2d@giganews.com... >>> A state-variable filter works fine with dacs to program the integrators. >> >> Hmm. And if you did it right you'd only need to change the frequency- >> setting gains -- the damping ratios could be fixed with resistors, at >> least until you started bumping into the op-amp phase shifts. > >You'll bump into the R-2R (or whatever network they use internally) rolloff >around the same point (100s kHz), but for a filter in the low kHz, that's >perfectly fine. It's a good match. > >Honestly, I think I'd even do it in digital... even an AVR can crank enough >samples and MACs to do it. Continuously variable IIR filter coefficients >might be an, interesting computational exercise, or a fairly easily >synthesized/rescaled FIR filter can be used at the expense of more MACs. >Otherwise, just get a bog standard ARM, or a proper DSP even. > >Tim
The other goofy analog thing you can do is use an analog switch as a duty-cycle-controlled resistor, instead of a DAC. After all, it *is* a lowpass filter. -- John Larkin Highland Technology, Inc lunatic fringe electronics