DSPRelated.com
Forums

software anti-aliasing filter.

Started by Unknown September 13, 2014
On 9/13/14 6:03 PM, Eric Jacobsen wrote:
> On Sat, 13 Sep 2014 03:24:22 -0700 (PDT), zoulzubazz@googlemail.com > wrote: >> >> I designed a system to acquire certain physiological signals and recorded t= >> hese signals using a data acquisition card (agilent u2531a specifically). t= >> he problem is when designing the circuit i was unable to place an anti-alia= >> sing filter before feeding the signal to the data acquisition device. The c= >> ard does not have a software selectable filter at the input stage either. i= >> s there a way to implement this anti-aliasing filter in software (the signa= >> ls are being processed offline)? all ideas welcome. Thanks very much. > > Aliasing will be a problem if there was signal energy (or interference > energy, or ANY energy) at frequencies above half the sample rate.
tiny bone to pick, Eric. what constitutes "a problem" just *has* to be a quantitative (and more than binary) value. saying "ANY energy" is a binary condition. from my point-of-view, i don't think -140 dB S/N ratio as a result of aliasing is "a problem". and i **know** it's non-zero energy being folded back into the baseband. (what i'm talking about is making decently accurate but back-of-the-envelope calculations of worst-case S/N with a particular polyphase resampling kernel.) me thinks, in general, that without any analog anti-aliasing filter (other than the physics of the op-amps and wires preceding the A/D) that, if you *know* your input signal's gonna have squat (not quite zero, but essentially nothing) up there around Nyquist, then, if anti-aliasing is desired (and it might be if they wanna downsample from 2 MHz for time-domain records), it can be done in software.
> ... > > So it is potentially possible to run a software anti-aliasing filter, > but only if your signal was significantly oversampled and the aliased > energy (if any) was outside of the desired signal spectrum.
"oh... never mind." -- emily litella rbj@audioimagination.com "Imagination is more important than knowledge."
On 9/13/14 4:54 PM, bellda2005@gmail.com wrote:
> On Saturday, September 13, 2014 6:24:22 AM UTC-4, zoulz...@googlemail.com wrote: >> Hey guys, >> >> >> >> I designed a system to acquire certain physiological signals and recorded these signals using a data acquisition card (agilent u2531a specifically). the problem is when designing the circuit i was unable to place an anti-aliasing filter before feeding the signal to the data acquisition device. The card does not have a software selectable filter at the input stage either. is there a way to implement this anti-aliasing filter in software (the signals are being processed offline)? all ideas welcome. Thanks very much. >> >> >> >> zoul > > Zoul, > > I think you are mistaken. The following document indicates that the Agilent u2531a does indeed have filtering which corresponds to a pretty high sample rate. > > http://cp.literature.agilent.com/litweb/pdf/5990-3505EN.pdf > > Whether it is programmable or not, it doesn't say.
doesn't matter, it can be further anti-aliased on the software end. and if zoul wants to down-sample or decimate the captured (at Fs = 2 MHz) data files, he/she can do it in software. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 9/14/14 9:53 PM, Rick Lyons wrote:
> On Sat, 13 Sep 2014 11:57:26 -0500, Tim Wescott > <seemywebsite@myfooter.really> wrote: > >> On Sat, 13 Sep 2014 03:24:22 -0700, zoulzubazz wrote: >> >>> I designed a system to acquire certain physiological signals and >>> recorded these signals using a data acquisition card (agilent u2531a >>> specifically). the problem is when designing the circuit i was unable to >>> place an anti-aliasing filter before feeding the signal to the data >>> acquisition device. The card does not have a software selectable filter >>> at the input stage either. is there a way to implement this >>> anti-aliasing filter in software (the signals are being processed >>> offline)? all ideas welcome. Thanks very much. >> >> Do this simple experiment: >> >> Take any 10-page document. Copy all of the pages of the document onto >> just one sheet, right on top of each other. >> >> Is there a way to reconstruct the original document? >> >> That's what you're trying to do by anti-aliasing after the fact. > > [Snipped by Lyons] > > That "paper copy example" is one terrific analogy > to what happens with aliasing. GOOD JOB!
or (a similar analogy) is, with one of those cellulose transparencies, drawing a continuous-time frequency response out and folding it over, like an accordion, and looking through the multiple layer. in both the model and reality, "folding frequency" or "folding over" would have have as literal meaning as doing the wave equation on the physics of the water's surface. i dunno. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 09/15/2014 09:56 AM, robert bristow-johnson wrote:
> tiny bone to pick, Eric. > > what constitutes "a problem" just *has* to be a quantitative (and more > than binary) value. saying "ANY energy" is a binary condition. > > from my point-of-view, i don't think -140 dB S/N ratio as a result of > aliasing is "a problem". and i **know** it's non-zero energy being > folded back into the baseband. (what i'm talking about is making > decently accurate but back-of-the-envelope calculations of worst-case > S/N with a particular polyphase resampling kernel.) > > me thinks, in general, that without any analog anti-aliasing filter > (other than the physics of the op-amps and wires preceding the A/D) > that, if you *know* your input signal's gonna have squat (not quite > zero, but essentially nothing) up there around Nyquist, then, if > anti-aliasing is desired (and it might be if they wanna downsample from > 2 MHz for time-domain records), it can be done in software.
Good point, but the term "problem" itself also needs to be nuanced. Just how big a problem is the aliasing, even if it is strong enough to be considered a problem? There are many problems in the design of most systems. You need to ensure that aliasing isn't one of the bigger causes of performance limitations. In control loops, for example, aliasing may be a problem, but an effective anti-alias filter will cause so much latency that it will wreck the control loop's responsiveness. As the lesser of two evils control loops typically have little or no anti-alias filtering. We may try to minimise the sources of out of band energy, if that is feasible. Regards, Steve
On Saturday, September 13, 2014 10:24:22 PM UTC+12, zoulz...@googlemail.com wrote:
> Hey guys, > > > > I designed a system to acquire certain physiological signals and recorded these signals using a data acquisition card (agilent u2531a specifically). the problem is when designing the circuit i was unable to place an anti-aliasing filter before feeding the signal to the data acquisition device. The card does not have a software selectable filter at the input stage either. is there a way to implement this anti-aliasing filter in software (the signals are being processed offline)? all ideas welcome. Thanks very much. > > > > zoul
You can make a pig into a poke, but not a poke into a pig.
On Mon, 15 Sep 2014 10:26:55 +0800, Steve Underwood <steveu@dis.org>
wrote:

>On 09/15/2014 09:56 AM, robert bristow-johnson wrote: >> tiny bone to pick, Eric. >> >> what constitutes "a problem" just *has* to be a quantitative (and more >> than binary) value. saying "ANY energy" is a binary condition. >> >> from my point-of-view, i don't think -140 dB S/N ratio as a result of >> aliasing is "a problem". and i **know** it's non-zero energy being >> folded back into the baseband. (what i'm talking about is making >> decently accurate but back-of-the-envelope calculations of worst-case >> S/N with a particular polyphase resampling kernel.) >> >> me thinks, in general, that without any analog anti-aliasing filter >> (other than the physics of the op-amps and wires preceding the A/D) >> that, if you *know* your input signal's gonna have squat (not quite >> zero, but essentially nothing) up there around Nyquist, then, if >> anti-aliasing is desired (and it might be if they wanna downsample from >> 2 MHz for time-domain records), it can be done in software. > >Good point, but the term "problem" itself also needs to be nuanced. Just >how big a problem is the aliasing, even if it is strong enough to be >considered a problem? There are many problems in the design of most >systems. You need to ensure that aliasing isn't one of the bigger causes >of performance limitations.
Yes, and the reponse to how to characterise "problem" or how much aliasing "has to be" suppressed is always application dependent. Hence I usually try to keep to generalities at least in initial posts to an OP. Unless/until there is a lot of detail given, that's about all one can do.
>In control loops, for example, aliasing may be a problem, but an >effective anti-alias filter will cause so much latency that it will >wreck the control loop's responsiveness. As the lesser of two evils >control loops typically have little or no anti-alias filtering. We may >try to minimise the sources of out of band energy, if that is feasible. > >Regards, >Steve > >
Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
On Sun, 14 Sep 2014 22:09:43 -0400, robert bristow-johnson wrote:

> On 9/14/14 9:53 PM, Rick Lyons wrote: >> On Sat, 13 Sep 2014 11:57:26 -0500, Tim Wescott >> <seemywebsite@myfooter.really> wrote: >> >>> On Sat, 13 Sep 2014 03:24:22 -0700, zoulzubazz wrote: >>> >>>> I designed a system to acquire certain physiological signals and >>>> recorded these signals using a data acquisition card (agilent u2531a >>>> specifically). the problem is when designing the circuit i was unable >>>> to place an anti-aliasing filter before feeding the signal to the >>>> data acquisition device. The card does not have a software selectable >>>> filter at the input stage either. is there a way to implement this >>>> anti-aliasing filter in software (the signals are being processed >>>> offline)? all ideas welcome. Thanks very much. >>> >>> Do this simple experiment: >>> >>> Take any 10-page document. Copy all of the pages of the document onto >>> just one sheet, right on top of each other. >>> >>> Is there a way to reconstruct the original document? >>> >>> That's what you're trying to do by anti-aliasing after the fact. >> >> [Snipped by Lyons] >> >> That "paper copy example" is one terrific analogy >> to what happens with aliasing. GOOD JOB! > > or (a similar analogy) is, with one of those cellulose transparencies, > drawing a continuous-time frequency response out and folding it over, > like an accordion, and looking through the multiple layer. in both the > model and reality, "folding frequency" or "folding over" would have have > as literal meaning as doing the wave equation on the physics of the > water's surface. > > i dunno.
I was specifically trying to model the futility of reconstructing the original signal. Your "fold the transparency" notion is probably better to educate someone on what's _really_ going on, although it's really "fold and add", which gets beyond what's easy to do graphically. 'taint easy stuff. If it were, managers could do it. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:
> On Sun, 14 Sep 2014 22:09:43 -0400, robert bristow-johnson wrote: > >> On 9/14/14 9:53 PM, Rick Lyons wrote: >>> On Sat, 13 Sep 2014 11:57:26 -0500, Tim Wescott >>> <seemywebsite@myfooter.really> wrote: >>> >>>> On Sat, 13 Sep 2014 03:24:22 -0700, zoulzubazz wrote: >>>> >>>>> I designed a system to acquire certain physiological signals and >>>>> recorded these signals using a data acquisition card (agilent u2531a >>>>> specifically). the problem is when designing the circuit i was unable >>>>> to place an anti-aliasing filter before feeding the signal to the >>>>> data acquisition device. The card does not have a software selectable >>>>> filter at the input stage either. is there a way to implement this >>>>> anti-aliasing filter in software (the signals are being processed >>>>> offline)? all ideas welcome. Thanks very much. >>>> >>>> Do this simple experiment: >>>> >>>> Take any 10-page document. Copy all of the pages of the document onto >>>> just one sheet, right on top of each other. >>>> >>>> Is there a way to reconstruct the original document? >>>> >>>> That's what you're trying to do by anti-aliasing after the fact. >>> >>> [Snipped by Lyons] >>> >>> That "paper copy example" is one terrific analogy >>> to what happens with aliasing. GOOD JOB! >> >> or (a similar analogy) is, with one of those cellulose transparencies, >> drawing a continuous-time frequency response out and folding it over, >> like an accordion, and looking through the multiple layer. in both the >> model and reality, "folding frequency" or "folding over" would have have >> as literal meaning as doing the wave equation on the physics of the >> water's surface. >> >> i dunno. > > I was specifically trying to model the futility of reconstructing the > original signal. > > Your "fold the transparency" notion is probably better to educate someone > on what's _really_ going on, although it's really "fold and add", which > gets beyond what's easy to do graphically.
Careful, use of absolutes cause trouble. Consider spectrograms like https://en.wikipedia.org/wiki/File:Spectrogram-19thC.png . [especially if amplitude is greyscale ;]
> > 'taint easy stuff. If it were, managers could do it. >
On 9/15/2014 1:42 PM, Richard Owlett wrote:
> Tim Wescott wrote: >> On Sun, 14 Sep 2014 22:09:43 -0400, robert bristow-johnson wrote: >> >>> On 9/14/14 9:53 PM, Rick Lyons wrote: >>>> On Sat, 13 Sep 2014 11:57:26 -0500, Tim Wescott >>>> <seemywebsite@myfooter.really> wrote: >>>> >>>>> On Sat, 13 Sep 2014 03:24:22 -0700, zoulzubazz wrote: >>>>> >>>>>> I designed a system to acquire certain physiological signals and >>>>>> recorded these signals using a data acquisition card (agilent u2531a >>>>>> specifically). the problem is when designing the circuit i was unable >>>>>> to place an anti-aliasing filter before feeding the signal to the >>>>>> data acquisition device. The card does not have a software selectable >>>>>> filter at the input stage either. is there a way to implement this >>>>>> anti-aliasing filter in software (the signals are being processed >>>>>> offline)? all ideas welcome. Thanks very much. >>>>> >>>>> Do this simple experiment: >>>>> >>>>> Take any 10-page document. Copy all of the pages of the document onto >>>>> just one sheet, right on top of each other. >>>>> >>>>> Is there a way to reconstruct the original document? >>>>> >>>>> That's what you're trying to do by anti-aliasing after the fact. >>>> >>>> [Snipped by Lyons] >>>> >>>> That "paper copy example" is one terrific analogy >>>> to what happens with aliasing. GOOD JOB! >>> >>> or (a similar analogy) is, with one of those cellulose transparencies, >>> drawing a continuous-time frequency response out and folding it over, >>> like an accordion, and looking through the multiple layer. in both the >>> model and reality, "folding frequency" or "folding over" would have have >>> as literal meaning as doing the wave equation on the physics of the >>> water's surface. >>> >>> i dunno. >> >> I was specifically trying to model the futility of reconstructing the >> original signal. >> >> Your "fold the transparency" notion is probably better to educate someone >> on what's _really_ going on, although it's really "fold and add", which >> gets beyond what's easy to do graphically. > > Careful, use of absolutes cause trouble. > Consider spectrograms like > https://en.wikipedia.org/wiki/File:Spectrogram-19thC.png . > [especially if amplitude is greyscale ;]
What about them??? -- Rick
rickman wrote:
> On 9/15/2014 1:42 PM, Richard Owlett wrote: >> Tim Wescott wrote: >>> On Sun, 14 Sep 2014 22:09:43 -0400, robert bristow-johnson wrote: >>> >>>> On 9/14/14 9:53 PM, Rick Lyons wrote: >>>>> On Sat, 13 Sep 2014 11:57:26 -0500, Tim Wescott >>>>> <seemywebsite@myfooter.really> wrote: >>>>> >>>>>> On Sat, 13 Sep 2014 03:24:22 -0700, zoulzubazz wrote: >>>>>> >>>>>>> I designed a system to acquire certain physiological >>>>>>> signals and >>>>>>> recorded these signals using a data acquisition card >>>>>>> (agilent u2531a >>>>>>> specifically). the problem is when designing the circuit i >>>>>>> was unable >>>>>>> to place an anti-aliasing filter before feeding the signal >>>>>>> to the >>>>>>> data acquisition device. The card does not have a software >>>>>>> selectable >>>>>>> filter at the input stage either. is there a way to >>>>>>> implement this >>>>>>> anti-aliasing filter in software (the signals are being >>>>>>> processed >>>>>>> offline)? all ideas welcome. Thanks very much. >>>>>> >>>>>> Do this simple experiment: >>>>>> >>>>>> Take any 10-page document. Copy all of the pages of the >>>>>> document onto >>>>>> just one sheet, right on top of each other. >>>>>> >>>>>> Is there a way to reconstruct the original document? >>>>>> >>>>>> That's what you're trying to do by anti-aliasing after the >>>>>> fact. >>>>> >>>>> [Snipped by Lyons] >>>>> >>>>> That "paper copy example" is one terrific analogy >>>>> to what happens with aliasing. GOOD JOB! >>>> >>>> or (a similar analogy) is, with one of those cellulose >>>> transparencies, >>>> drawing a continuous-time frequency response out and folding >>>> it over, >>>> like an accordion, and looking through the multiple layer. >>>> in both the >>>> model and reality, "folding frequency" or "folding over" >>>> would have have >>>> as literal meaning as doing the wave equation on the physics >>>> of the >>>> water's surface. >>>> >>>> i dunno. >>> >>> I was specifically trying to model the futility of >>> reconstructing the >>> original signal. >>> >>> Your "fold the transparency" notion is probably better to >>> educate someone >>> on what's _really_ going on, although it's really "fold and >>> add", which >>> gets beyond what's easy to do graphically. >> >> Careful, use of absolutes cause trouble. >> Consider spectrograms like >> https://en.wikipedia.org/wiki/File:Spectrogram-19thC.png . >> [especially if amplitude is greyscale ;] > > What about them??? >
Print greyscale version of referenced png on transparent medium. Cut as required. Stack them in front of light.