digital lowpass filters and analog RC lowpass

J

Jamie Morken

Guest
Hi,

I am using a 40Hz -3dB RC lowpass filter, and then a 40Hz 1 pole
digital lowpass (100Hz sampling butterworth generated from here:
"http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html").

What is the effective -3dB frequency for the combination of these
two filters? I don't think it is the same as a 2pole filter but am
not sure.

Also is it possible to replace an analog lowpass filter with a digital
lowpass for filtering out high frequency? ie. If I have a 100Hz
sampling rate with the digital filter and a 40Hz -3dB frequency, will
this filter be able to filter out signals above the sampling rate?

cheers,
Jamie Morken
 
On Wed, 29 Jun 2005 06:12:34 +0000, Jamie Morken wrote:

Hi,

I am using a 40Hz -3dB RC lowpass filter, and then a 40Hz 1 pole
digital lowpass (100Hz sampling butterworth generated from here:
"http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html").

What is the effective -3dB frequency for the combination of these
two filters? I don't think it is the same as a 2pole filter but am
not sure.

You have two cascaded filters. You can just multiply the two gain curves
together, if the gains are in Volts per Volt, or add them together if they
are in dB. Then you should easily be able to see where the new -3dB point
is.

Also is it possible to replace an analog lowpass filter with a digital
lowpass for filtering out high frequency? ie. If I have a 100Hz
sampling rate with the digital filter and a 40Hz -3dB frequency, will
this filter be able to filter out signals above the sampling rate?

cheers,
Jamie Morken
You are cutting things too close with respect to the Nyquist criterion.
The Nyquist criterion says that you can't unambiguously reconstruct a
signal from its samples unless the signal bandwidth is constrained within
the range of n*f to (n+1)f, where f is half the sampling rate, and n is an
integer. Half the sampling rate is sometimes called the Nyquist frequency,
or just Nyquist.

The simple version of the rule (when n=0) is that you can't feed any
signals greater than Nyquist to an ADC. According to the simple version
of the rule, you need an analog low-pass filter in front of the ADC which
guarantees that signals greater than Nyquist do not pass.

There is a trick, though, which doesn't break any rules. If you use an
n other than 0, you can sample higher frequencies without ambiguity. You
still would probably need an anti-aliasing filter, but it will now be a
bandpass filter.

For example, you are sampling at 100 Hz, so if you had a signal which was
band-limited so that all of the signal content was between 50 and 100 Hz,
you could sample the signal, then later reconstruct it correctly by
feeding the samples to a DAC and using an appropriate output filter.(I
guess ideally you would want to interpolate, or take an FFT, zero-pad,
then invert the FFT before going to the DAC, which would run at twice the
ADC sample rate.)

But any time you could have signals at more than one Nyquist band, you
will have problems, because you cannot differentiate them. For example, in
your case, you have no way to differentiate a signal at 40 Hz from one at
60 Hz. In this case you would say that the 60 Hz signal has aliased to
40 Hz. The two signals look the same, and will appear in the same
frequency bin if you do an FFT on your samples. Worse, the same thing
holds true for signals at 70 Hz and 30 Hz. So a 70 Hz signal (which is
supposed to get attenuated) will look like a 30 Hz signal to your digital
filter, and get passed right through with little attenuation.

So, in short, I don't think you can eliminate the analog filter. In fact,
depending on your signal, it would probably be advisable to sample much
faster or put a steeper analog filter in front of the ADC. Once you
digitize your signal without violating Nyquist, you can implement any kind
of digital filter you want.

If you are using any op-amps, it might be easiest to just cascade them to
get a steeper cutoff for your analog filter. You can push the cutoff
closer and closer to 50 Hz as you add more elements to keep the overall
-3dB point where you want it. If you keep the sampling rate at 100 Hz,
you will want to have lots of attenuation at 50 Hz. The exact value will
depend on the characteristics of your signal. Just keep in mind that
anything above 50 Hz will alias back in at another frequency.

--Mac
 
Jamie Morken wrote:
Hi,

I am using a 40Hz -3dB RC lowpass filter, and then a 40Hz 1 pole
digital lowpass (100Hz sampling butterworth generated from here:
"http://www-users.cs.york.ac.uk/~fisher/mkfilter/trad.html").

What is the effective -3dB frequency for the combination of these
two filters? I don't think it is the same as a 2pole filter but am
not sure.

Also is it possible to replace an analog lowpass filter with a digital
lowpass for filtering out high frequency? ie. If I have a 100Hz
sampling rate with the digital filter and a 40Hz -3dB frequency, will
this filter be able to filter out signals above the sampling rate?
The cutoff frequency will be around 28Hz, but the digital filter is useless,
if you have any signal content above 50Hz with the analog filter only. If
you want i.e. a 12bit accuracy up to 40Hz, make sure your input signal is
attenuated by 72dB above 60Hz. It will be difficult to make an analog filter
that steep, but alternativly you can increase your sampling frequency to say
200Hz. now you need the -72dB only at 160Hz, so a 6th order analog filter
will give 36dB/octave and is down enough with a -3dB point of 40Hz. A 6th
order filter still requires 3opamps at least.
So better 1.6kHz sampling. Then we have 5.5 octaves to fall off, which
require only a 2nd order analog filter. You can then apply digital
filtering, downsample to your 100Hz and have still a 40Hz bandwidth. Less
filtering is needed if the input signal has already some intrinsic filter
function, it can be subtracted from these 72dBs.

So the analog filter can *not* be replaced if it is needed for aliasing
purposes. But oversampling is the way to go.
--
ciao Ban
Bordighera, Italy
 

Welcome to EDABoard.com

Sponsor

Back
Top