Reply by rover8898 November 29, 20052005-11-29
>but one must not put oneself in the position of being sorry for trying to be too safe
Been there. Done that. :-). Ok. Gotcha. Have to learn to comprise between solutions for potential problems and solutions for problable problems. -Thanks Roger
Reply by Jerry Avins November 29, 20052005-11-29
rover8898 wrote:
> Jerry, > > Yes you are rigth. Aliasing ocurring above the downsampled Fs/2 should > be moot for it will removed later with the decimation digital filter. > However, (ever being accused of being too cautious), one can never > predict ALL parasitics that will find their way onto the input signal, > even if only sligthly. The VERY high frequency parasitics (RF and > above) are usually difficult to predict; depends on environmental > geometry and such ... .Therefore, since at least in theory, all high > frequency components should fold back and thus cause aliasing ...well, > I doubt that we will be lucky enough that all parasitics will fold back > only between [downsampled Fs/2] and [oversampling Fs/2]. > Hence, this leads me back to my precautionnary "broad analog filter" > solution (ahead of A/D) that would (at least in theory) filter the very > high unforseen frequencies of the input signal that would cause at > least some minor aliasing (how minor? probably below 1%, but better > safe than sorry I say ). > I would think that in today's world of cell phone, sattelite, radio, > wireless gadgets ...., one would "clean" a signal as much as possible, > cost-permitting obviously. > As for Servo work concerning the harmfull effect of the delay of an > analog antialiasing filter, well I would have to look into that for I > am sure there is merit into that as well.
Roger, Engineering is compromise. No filter is perfect. Alias components significantly smaller than one LSB are generally harmless, and going to great lengths to make them smaller can degrade other aspects of a design. "Better safe than sorry" is a fine motto, but one must not put oneself in the position of being sorry for trying to be too safe. Jerry -- You know that the outhouse is in the right place if ��� it seems too close in summer and too far in winter. ��� �������������������������������������������������������������������
Reply by rover8898 November 29, 20052005-11-29
Jerry,

Yes you are rigth. Aliasing ocurring above the downsampled Fs/2 should
be moot for it will removed later with the decimation digital filter.
However, (ever being accused of being too cautious), one can never
predict ALL parasitics that will find their way onto the input signal,
even if only sligthly. The VERY high frequency parasitics (RF and
above) are usually difficult to predict; depends on environmental
geometry and such ... .Therefore, since at least in theory, all high
frequency components should fold back and thus cause aliasing ...well,
I doubt that we will be lucky enough that all parasitics will fold back
only between [downsampled Fs/2] and  [oversampling Fs/2].
Hence, this leads me back to my precautionnary "broad analog filter"
solution (ahead of A/D) that would (at least in theory) filter the very
high unforseen frequencies of the input signal that would cause at
least some minor aliasing (how minor? probably below 1%, but better
safe than sorry I say ).
I would think that in today's world of cell phone, sattelite, radio,
wireless gadgets ...., one would "clean" a signal as much as possible,
cost-permitting obviously.
As for Servo work concerning the harmfull effect of the delay of an
analog antialiasing filter, well I would have to look into that for I
am sure there is merit into that as well.

-Roger

Reply by Carlos Moreno November 29, 20052005-11-29
rover8898 wrote:
> Hello, > > >>It's not the digital filters -- it's the digitizing process of an >>analog signal what requires this filtering; it's not always done >>with analog signals; some times it's easier to sample the signal >>at a far higher rate, then apply a digital low-pass filter, and >>then "sample" the resulting signal (since it is already in the >>digital domain, we're talking simply about keeping one every N >>samples, or "downsample" by a factor of N) > > > The filtering can be done with a [oversampling at higher sample rate] + > [digital low pass filter] +[downsampling] scheme, I guess. But if the > input signal (prior to A/D) has frequency components beyond the > [oversampling rate/2] threshold, then there will aliasing, digital > lowpass filter or not. Is there a reason why a precautionary ~broad > analog filter cannot be placed ahead of the A/D (aside from cost and > maybe gadget size) ?
The technique of sampling at a much higher frequency and then do a low-pass digital filtering does not replace the analog filter; it just makes the analog filter trivial -- if you know that your signal has valuable spectral contents up to 20 kHz and want to sample at 44.1 kHz, the analog filter required would have to be very precise and very "wall-like" -- it would be quite hard to design an analog filter with such a "wall" frequency response and without truly ugly phase distorsion (mostly at frequencies near the cutoff). So, instead, if you sample at, say, 8 times the intended rate (i.e., at 8 x 44.1 kHz), then a very simple, perhaps first- order RC filter with cutoff at 50 kHz would do a more-than- excellent job, since now you only need to worry to eliminate frequencies above 4x44.1, or approx. 170 kHz -- that's trivial, since the RC already has a good attenuation at that point, and also, the audio signal really has very low contents at those ultra-high frequencies. The part that you really were worried about -- a wall-like cutoff above 20 but below 22, that you get with a digital filter with nice phase response. Notice, however, that I'm not describing a universal technique that is applied unconditionally in every design -- it's just that it may be very practical and easy, so you do encounter it quite often -- for speech, for instance, where you want a sampling rate of 8 kHz (typically), it's quite easy to do the sampling at a higher rate and then bring it down after it is in the digital domain. HTH, Carlos --
Reply by Fred Marshall November 28, 20052005-11-28
"rover8898" <rover8898@hotmail.com> wrote in message 
news:1133216698.967625.187630@g47g2000cwa.googlegroups.com...
> Hello everyone, > > OK. So I got the point that the response of a digital filter just > repeats itself at a period of Fs. Also it seems that a digital signal > has only frequency components from -Fs/2 to +Fs/2. If I undestood > correctly, this is because all signals when digitized, are, in the > frequency domain a series of the frequency spectrum of the undigitized > signal interspaced at intervals of Fs. Depending on the bandwidth of > the undigitized signal and the Fs, absence or presence of aliasing will > be determined. > > So basically, if aliasing occurs, the *digital signal* (-Fs/2 to +Fs/2) > will have frequency components of the original signal that are above > Fs/2. That is where those unwanted "high frequencies" end up; they > double back in the relevant [-Fs/2 to +Fs/2] frequency range if there > is aliasing .If there isn't any aliasing, it implies that the input > signal was already properly cleaned up. And if the input signal > contains frequencies components up to Fbw, and we decide to sample the > input signal at Fbw/10 because 95% of the relevant signal lies under > Fbw/30, we would be commiting a huge no-no for the frequency components > from [Fbw/20 to Fbw] will fold back and corrupt the retrieved data, > despite these components being quite weak in strength.Rigth ? > > A low pass digital FIR filter whose [Fpassband=0.45*Fs and > Fstopband=0.47*Fs] serves no practical purpose if its purpose for being > is to attenuate high frequencies. Right? > It will supress only 6-10% of the input frequencies (depending on the > transitions bands). In other words: > the [0-0.45 0.55-1.45 1.55-2.45 2.55-3.45....]*Fs frequencies of the > undigitized input signal will pass unhindered through the digital > lowpass FIR filter. It certaintly not a viable antialiasing filter. > Rigth? > > -Roger
Right. Good study. The antialiasing filtering needs to be done pre-sampling. If you're doing sample rate conversion, then you could well *also* need to do antialiasing filtering in the discrete time world - and *there* you use digital filters. Fred
Reply by rover8898 November 28, 20052005-11-28
Hello everyone,

OK. So I got the point that the response of a digital filter just
repeats itself at a period of Fs. Also it seems that a digital signal
has only frequency components from -Fs/2 to +Fs/2. If I undestood
correctly, this is because all signals when digitized, are, in the
frequency domain a series of the frequency spectrum of the undigitized
signal interspaced at intervals of Fs. Depending on the bandwidth of
the undigitized signal and the Fs, absence or presence of aliasing will
be determined.

So basically, if aliasing occurs, the *digital signal* (-Fs/2 to +Fs/2)
 will have frequency components of the original signal that are above
Fs/2. That is where those unwanted "high frequencies" end up; they
double back in the relevant [-Fs/2 to +Fs/2] frequency range if there
is aliasing .If there isn't any aliasing, it implies that the input
signal was already properly cleaned up. And if the input signal
contains frequencies components up to Fbw, and we decide to sample the
input signal  at Fbw/10  because 95% of the relevant signal lies under
Fbw/30, we would be commiting a huge no-no for the frequency components
from [Fbw/20 to Fbw] will fold back and corrupt the retrieved data,
despite these components being quite weak in strength.Rigth ?

A low pass digital FIR filter whose [Fpassband=0.45*Fs and
Fstopband=0.47*Fs] serves no practical purpose if its purpose for being
is to attenuate high frequencies. Right?
It will supress only 6-10% of the input frequencies (depending on the
transitions bands). In other words:
the [0-0.45 0.55-1.45 1.55-2.45 2.55-3.45....]*Fs frequencies of the
undigitized input signal will pass unhindered through the digital
lowpass FIR filter. It certaintly not a viable antialiasing filter.
Rigth? 

-Roger

Reply by Jerry Avins November 28, 20052005-11-28
rover8898 wrote:
> Hello, > > >>It's not the digital filters -- it's the digitizing process of an >>analog signal what requires this filtering; it's not always done >>with analog signals; some times it's easier to sample the signal >>at a far higher rate, then apply a digital low-pass filter, and >>then "sample" the resulting signal (since it is already in the >>digital domain, we're talking simply about keeping one every N >>samples, or "downsample" by a factor of N) > > > The filtering can be done with a [oversampling at higher sample rate] + > [digital low pass filter] +[downsampling] scheme, I guess. But if the > input signal (prior to A/D) has frequency components beyond the > [oversampling rate/2] threshold, then there will aliasing, digital > lowpass filter or not. Is there a reason why a precautionary ~broad > analog filter cannot be placed ahead of the A/D (aside from cost and > maybe gadget size) ?
Aliasing from frequencies above the [oversampling rate/2] threshold won't hurt if the aliases are above the downsampled Fs/2, as those will be removed by the digital downsampling (decimation) filter. A "precautionary ~broad analog filter" should be placed ahead of the A.D in most cases. In Servo work, delay is often more harmful than aliasing, so the antialias filter is omitted. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by rover8898 November 28, 20052005-11-28
Hello,

>It's not the digital filters -- it's the digitizing process of an >analog signal what requires this filtering; it's not always done >with analog signals; some times it's easier to sample the signal >at a far higher rate, then apply a digital low-pass filter, and >then "sample" the resulting signal (since it is already in the >digital domain, we're talking simply about keeping one every N >samples, or "downsample" by a factor of N)
The filtering can be done with a [oversampling at higher sample rate] + [digital low pass filter] +[downsampling] scheme, I guess. But if the input signal (prior to A/D) has frequency components beyond the [oversampling rate/2] threshold, then there will aliasing, digital lowpass filter or not. Is there a reason why a precautionary ~broad analog filter cannot be placed ahead of the A/D (aside from cost and maybe gadget size) ? -Roger
Reply by Jerry Avins November 27, 20052005-11-27
chris_bore@yahoo.co.uk wrote:

   ...

> Try the RIEE analog filters (for gramophones) implemented with a > digital filter - analog ones are often specified with extremely sharp > rolloffs that are really hard to get with digital.
What is RIEE? I know what RIAA is, and the recording compensation curve specified in its name is intended to be minimum phase, best implemented by two R-C time constants. .... Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by November 27, 20052005-11-27
1) Frequencies above Fs/2 will appear, aliased to other frequencies.

Uusally an antialias filter is used - this MUST be analog, and should
filter out all frequencies above Fs/2 so that they are not a problem.
But in undersampling, you can have a high frequency signal (ie above
Fs/2) that aliases, to a known alias) frequency, and can work on that
quite comfortably. Provided only that the signal has no two frequencies
whose aliases are the same, and that your sample/hold is fast enough to
not itself act as a lowpass filter.

2) I find it unhelpful when people say that 'digital filters are
superior' etc. It depends on your criteria. FIR filters can guarantee
linear phase. Certain types of FIR filter can guarantee to be (almost,
probably) the closest match to what you desire by some meaure (eg LMS).
But sometimes you don't want that.

Try the RIEE analog filters (for gramophones) implemented with a
digital filter - analog ones are often specified with extremely sharp
rolloffs that are really hard to get with digital.

3) Yes, all digital filters that work on signals that come from the
analog world do requir an analog filter at their front end, that
antialiases. You can sometimes sample very much faster than you really
need to, so relaxing the requirements on that analog filter, but you
can't do away with it. And yes, if the digital filter changes its
sample rate then the analog filter should do too. Unless you were
sampling very fast, in which case you amy not care.

Chris
=========================
Chris Bore
BORES Signal Processing
www.bores.com