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?
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.
Two more reasons to over-sample:
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.
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...
- 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.
- 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.
- 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)
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.
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.