# Why would I leave a signal oversampled?

I can't think of a better way for asking this question so I will start with an example. Suppose that I have an input signal with a max frequency of 50Hz (sampled at 100Hz). Now the signals of interest lie in the range 0-5Hz, so I can add a low-pass filter with a cut-off of 5Hz, and use the resulting signal for further processing. My understanding is that now I can downsample the filtered signal by a factor of 10 and hence reduce processing load. Am I right? If yes, why is downsampling not ALWAYS performed after filtering because it seems to me as the obvious way to go? And if I am wrong in my assumption, where am I mistaken?

• oversampling and then decimating a signal is often a way to deal with the slow rolloff of noise from analog filtering that would alias your signal. Then decimating(with the required lowpass that precedes it) can give higher signal quality. Brick wall filters are more readily realized in Digital domain. – Kortuk Aug 19 '11 at 15:23

You are correct that if your signal is bandlimited to <5 Hz, then you can perfectly represent it with a 10Hz sampling rate. This is the well-known sampling theorem

But ... there may be practical considerations for why one would not be able and/or inclined to use critically sampled data.

One reason is the difficulty of making a signal critically sampled. Any operation you perform to change the rate of the signal is going to have some filter with a non-zero transition bandwidth. In your example, this limits the unaliased frequency content to 5-ftrans This transition bandwidth can be made very narrow with long impulse response filters but this has costs both in terms of processing and in transients (ringing) at signal start and end.

Another reason is the efficacy of algorithms that work on the resulting signal. If you need to work with a blackbox component that can only choose the nearest sample, then you'll be better off feeding it oversampled data.

Most (all?) non-linear operations will behave differently with critically sampled vs oversampled data. One example is squaring a signal, a well known method of BPSK carrier recovery. Without a 2x oversampled condition, the multiplication of the time domain signal with itself causes wraparound garbage aliasing when the frequency domain convolves with itself.

• I do not understand the part where you talk about the signal being critically sampled. If my signals are in the range of 0-5Hz and instead of downsampling by 10, I downsample by a factor of 8 (for example), would I still have this problem? – anasimtiaz Aug 19 '11 at 13:58
• That would allow you to have some extra Nyquist bandwidth ( i.e. encodable via your sampling rate) that is not used by your signal of interest. This band allows you to have realizable filters that do not encroach on your signal of interest. – Mark Borgerding Aug 19 '11 at 14:11

Two more reasons to over-sample:

1. Low latency: for example control loops require very low latency. Oversampling gets data in and out faster, so that reduces latency. Also any lowpass filtering introduces group delay. The sharper the lowpass filter, the higher the group delay. If you oversample, you need a less steep anti-aliasing filters and end up with less group delay and thus latency.

2. Practicality: If your input and output run at the same (high) rate you can potentially downsample, but you would have to upsample again before you can output the result. Example: in a home theater system you could downsample the Bass processing path but you would have to upsample again since the outputs are running at the high rate. In many cases the savings in MIPS isn't worth the bother

There are a number of factors to consider when determining a sampling rate. Let me list some of them, to give you an idea of what other consequences might occur if you lowered the sampling rate. Of course, much of this depends on exactly how you lower the sampling rate, but...

1. Nyquist Frequency: One cannot detect frequencies more than the Nyquist, which is half of the detection rate, at least, using typical processing methods. There are methods which involve filtering signals prior to A/D conversion to those within a Nyquist band.
2. Detections of frequencies near the Nyquist can potentially be difficult, and subject to error. Note, this is typically only for those really close the the band. In this example, limiting the range to 12Hz (6 Hz Nyquist) would more than adequately address any concerns related to this.
3. High frequency components tend to be reduced in strength compared to lower frequency. This basically occurs because sampling theory assumes a comb function, ie, detections in an instant of time evenly spaced. The truth is, all signals are measured over some small window of time. The effect of this is to convolve a rectangle in the time domain, or multiply by a sinc signal in the frequency domain. Of course, if you simply take every 10th signal (As opposed to using a longer sample time), this affect will be mitigated.

To illustrate some of these principals, I have written a simple matlab program, which I will show the output to as well.

pis=linspace(0,2*pi,2048);
for f=1:512
sig=cos(f*pis+pi/2);
sig_average=filter(ones(16,1),1/16,sig);
sam_sig=sig_average(1:16:end);
freq=abs(fft(sam_sig));
freqs(f)=max(freq);
end
figure;plot((1:512)/64,freqs)


• I think your list of points is a bit misleading: 1. I would mention the potential use of "bandpass sampling" here; it is a relatively "typical" method. 2. I don't think you can make that blanket statement in general. 3. High-frequency components are not always attenuated in the way you describe. The phenomenon that you mention is related to an A/D converter's conversion time; this is only a limiting factor if the conversion time is significant compared to the sampling interval, which often is not the case. – Jason R Aug 19 '11 at 16:09
• 4. Upsampling does not improve your ability to resolve closely-spaced frequencies. Only increased observation time will provide improved frequency resolution; you need a sufficient time-bandwidth product. – Jason R Aug 19 '11 at 16:16
• @JasonR: Good points. I've corrected the statements and otherwise added things you suggested. Most of my DSP background is with signals measured over a period of time, thus perhaps showing my biases... – PearsonArtPhoto Aug 19 '11 at 17:29

The Nyquist criterion (oversample twofold to perfectly describe your signal) applies to noise-free data. If you want to reconstruct noisy data, you need to sample with higher than the minimum frequency. This is especially true in the case of images, where you don't usually have periodic signals, and where you thus cannot simply time-average to reduce the noise.

Furthermore, if you want to fit a model to your data, you benefit again from higher sampling, since fitting a model into three datapoints won't be particularly stable, especially in the presence of noise.

• There's no blanket statement that you can make about how much oversampling is required with noisy data. The overall signal bandwidth (signal-of-interest plus noise) is what's most important; this is a function of the response of any anti-aliasing filtering that you have in front of your sampler. As long as your sample rate is large enough to accommodate the amount of bandwidth that contains significant energy at the sampling aperture, you're fine. There's no hard-and-fast rule for a minimum oversampling ratio; it all depends on how quickly the signal plus noise spectrum rolls off. – Jason R Aug 21 '11 at 13:57
• @Jason R: Threefold oversampling is the general rule of thumb in fluorescent imaging; but you're right that everything depends on just how much noise you have. I've fixed my post. – Jonas Aug 21 '11 at 18:47

One reason to keep the signal oversampled is the dynamic range / oversampling tradeoff. Roughly, every time you double the bandwidth "unnecessarily" for the signal of interest you get an extra bit of sampling resolution, once filtering is applied (which can happen in the digital domain) you can store the results at a higher bit depth and those bits contain valid signal content, not extra noise (for the bandwidth of interest). If your system is operating under conditions where some additional dynamic range could be helpful, then there is a good reason to keep the signal at a high sampling rate as it enters the ADC.