I've read about the discrete convolution and how it applies to filters, but is convolution the only way to apply filters (to input signals)?
2 Answers
For this discussion it's important to restrict the class of filters to linear time-invariant (LTI) filters. Their input-output relation is described by the standard convolution sum (or, in continuous-time, convolution integral) that you've probably come across. So the operation of any LTI system can be described by a convolution. In discrete time you have
$$y[n]=\sum_{k=-\infty}^{\infty}h[k]x[n-k]\tag{1}$$
where $x[n]$ is the input signal, $h[n]$ is the system's impulse response, and $y[n]$ is the output signal. An example where $(1)$ is implemented directly is the transversal filter, which has a finite impulse response (FIR).
However, this doesn't mean that an LTI system can only be implemented by directly implementing the convolution sum ($1$). Any infinite impulse response (IIR) must be implemented recursively, because the convolution sum $(1)$ can't be computed exactly in finite time (since it's an infinite sum). But mathematically, any recursive implementation of an IIR filter computes the same thing as the convolution sum.
The convolution sum can also be implemented in the frequency domain, where blocks of data are transformed using the DFT, these frequency domain data are modified according to the desired impulse response, and after applying an IDFT, the data blocks are combined to give the desired output signal. Two such methods are the overlap add and the overlap save methods.
In sum, all LTI systems are described by a convolution sum (or integral), but there are many ways to implement that sum, and more often than not, the convolution sum is not evaluated directly.
- 89,963
- 9
- 79
- 179
-
-
-
-
So then the answer to my question should be "yes, but only for LTI systems"? – mavavilj Jul 03 '16 at 10:30
-
@mavavilj: Well, the problem is that your formulation "the only way to apply filters" is a bit unclear. Does "apply" mean implement? My answer should clarify all those details, please read it (again), and ask questions if necessary. Especially the last sentence of the answer should actually make things clear. – Matt L. Jul 03 '16 at 10:37
-
-
@mavavilj: Sure, but do you mean in an actual implementation, or on paper? Again, my answer (hopefully) addresses and clarifies all those details. I don't understand what is still unclear to you. – Matt L. Jul 03 '16 at 10:39
-
-
@mavavilj: Did you read my answer? E.g., it says "Any infinite impulse response (IIR) must be implemented recursively, because the convolution sum (1) can't be computed exactly in finite time". So on paper you can write down the convolution sum, but in practice you don't have the time to sum an infinite number of terms. – Matt L. Jul 03 '16 at 10:52
-
-
-
-
@mavavilj: If you have a discrete-time convolution with a finite length impulse response (FIR), then you can compute the convolution sum directly, but you don't need to (you can also do a frequency domain implementation. Again, all of this is in my answer (see the second paragraph from the bottom). – Matt L. Jul 03 '16 at 18:02
What is a filter anyway? In every-day life:
a device that is used to remove something unwanted from a (generally) fluid substance
In computer programming?
a program or section of code that is designed to examine each input or output request for certain qualifying criteria
In data processing, we are somehow inbetween. The fluid substance (signal) should be removed from something unwanted not satisfying some qualifying criteria (noise).
Depending on the criteria, you have many choices, depending on assmptions. For instance median, min-max filtering, all depending on certain qualifying criteria.
If you trust in filtering that does not depend on the actual time, and that is linear (the sum of two filtered signals is the filtering of the sum of two signals), you get "linear time_invariant filtering" (LTI). Then, one quickly understands this is strongly related to Fourier basis and convolution. Many other sources can provide you with insights:
- What are the advantages of LTI ( Linear Time Invariant ) systems over other systems?
- Intuition behind the convolution of two functions
- Understanding the convolution in signals and systems
Then, you can apply linear filters the convolutive way. But thanks to the above Fourier relation, you can apply them in the Fourier domain, using recursive filters, with lattice formulations, etc. All of them ultimately yield linear filters, but the different implementations vary in efficiency, complexity, economy, robusness to errors, etc.
- 31,850
- 3
- 33
- 101
In the end, everything can be traced back to one form of convolution or another.
– Jan Krüger Jul 02 '16 at 09:44filtercomputes? It's a discrete convolution! – Marcus Müller Jul 02 '16 at 10:10filterhas nothing to do with them. – Marcus Müller Jul 02 '16 at 11:04