Re: Best resampling approach for different types of data?





chrah wrote:

chrah wrote:
Hi,
I need to downsample a bunch of signals, all of which have very
different
properties (the Nyquist criteria will not be fulfilled after the
downsampling). My question is how to proceed in the best possible way.
All
processing is off-line but has to be fairly fast.

Case 1: An analogue signal (continuous amplitude and time) has been
sampled and needs to be downsampled. I have no problems here, just
apply un
antialias filter and resample properly.

Case 2: An analogue signal with discontinuous jumps. Ripples introduced
by
the antialias filter makes the downsampled signal useless. Please
help.

Case 3: An analogue signal which contains constant segments. Antialias
filters introduce ripples at the edge of each constant segment. Can
this be
avoided in a clever way?

Case 4: An enum signal (a few discrete amplitude levels and continuous
time). I guess the best approach here is to, kind of, just pick the
sample
which is closest to the new sampling time (nearest neighbour
interpolation).

Case 5: Noisy enum signal. Using a linear filter will introduce lots
of
ripple since there are discontinuous jumps every time the signal
changes
from one amplitude state to another. My approach would be to use a
median
filter followed by the case 2 approach, but I guess there must be a
better
way?

I hope you can help

Best regards
Christer


Christer,

Let's try to break this down into a few fundamental things:

By "downsample" we generally mean bringing a passband signal down to
baseband with quadrature samples. This usually involves reducing the
sample rate at the same time.

By "decimate" or "sample rate reduction" we generally mean reducing the
sample rate but leaving the signal spectrum location the same.

I think you mean to decimate here / to reduce the sample rate.

When there are discontinuities in the analog signal then you "should"
filter before sampling so as to meet the Nyquist criterion.

When there are discontinuities in a sampled signal then you "should"
filter before sample rate reduction.
[I say "should" because the degree, etc. becomes subjective to a
degree.]

Ripple at the discontinuities is caused by using a rectangular spectral
window as in a "perfect" brick wall lowpass filter.
Applying any filter causes convolution in the time domain.
A brick wall filter has a sinc as its temporal response.
The convolution with a sinc causes the ripples at transient edges.

The solution to the ripples is to use a filter whose transition from
passband to stopband is more gradual. There are even optimum filters
that have monotonic temporal transitions - with *no* ripple and still
have minimum rise time. This is as good as it gets.

So, you pick a lowpass filter that has "nice" characteristics for your
application and use that as a pre-decimation filter. You may want to
decimate in stages using half-band filters - that's one option.

With any lowpass filter you're going to have a transient in the impulse
/ unit sample response as the filter "fills up" with the next change in
the signal. So, you may be motivated to ignore the ends of a filtered
record and perhaps even to ignore the information around a step change -

although that really isn't necessary. The signal, post-decimation is
what it is, transients and all.

Obviously you can't lowpass filter and *then* expect to identify exactly

where the step changes have occurred ... at least not more accurately
than the lower bandwidth allows. In general, the temporal resolution
for this sort of thing is the reciprocal of the filter bandwidth.
You'll be stuck with that.

This ignores any fancy nonlinear processing one might do.

Fred


Please tell me more about the fancy nonlinear processing. As I already
mentioned, bilateral filtering works pretty good in the case where it is
important to preserve the edges of a jump in the signal. Weighted median
filters should also be able to do the trick fairly well. Any other
suggestions?

Maybe you just need data compression. Is your task to store as much of
the original data in a small amount of space.

-jim


/Christer
.



Relevant Pages

  • Re: Oversampling and the FFT
    ... I suggested we sample just above Nyquist and perform our 1024 point FFT. ... regardless of the window function or sample rate. ... Also the phase of a sharp filter may change ... signals near the Nyquist frequency of a given sampling rate than ...
    (comp.dsp)
  • Re: Best resampling approach for different types of data?
    ... I need to downsample a bunch of signals, all of which have very different ... the antialias filter makes the downsampled signal useless. ... By "downsample" we generally mean bringing a passband signal down to baseband with quadrature samples. ... By "decimate" or "sample rate reduction" we generally mean reducing the sample rate but leaving the signal spectrum location the same. ...
    (comp.dsp)
  • Re: Best resampling approach for different types of data?
    ... I need to downsample a bunch of signals, ... By "downsample" we generally mean bringing a passband signal down to ... sample rate but leaving the signal spectrum location the same. ... filter before sampling so as to meet the Nyquist criterion. ...
    (comp.dsp)
  • Re: Neural netss (was Re: death of the mind.)
    ... its 30+ visual areas and 1100+ feedforward and feedback pathways, ... This whole thing makes sense, regards the cortex, if you think about ... feedback signals from the other 29 areas, ... they filter and perform the basic ...
    (sci.cognitive)
  • Re: Best resampling approach for different types of data?
    ... I need to downsample a bunch of signals, ... filters introduce ripples at the edge of each constant segment. ... By "downsample" we generally mean bringing a passband signal down to ... filter before sampling so as to meet the Nyquist criterion. ...
    (comp.dsp)