Re: Best resampling approach for different types of data?
- From: Fred Marshall <fmarshallx@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 03 Sep 2009 10:38:10 -0700
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
.
- Follow-Ups:
- References:
- Prev by Date: Re: Best resampling approach for different types of data?
- Next by Date: Re: Acoustic echo cancellation
- Previous by thread: Re: Best resampling approach for different types of data?
- Next by thread: Re: Best resampling approach for different types of data?
- Index(es):
Relevant Pages
|