Causal filter


In signal processing, a causal filter is a linear and time-invariant causal system. The word causal indicates that the filter output depends only on past and present inputs. A filter whose output also depends on future inputs is non-causal, whereas a filter whose output depends only on future inputs is anti-causal. Systems that are realizable must be causal because such systems cannot act on a future input. In effect that means the output sample that best represents the input at time comes out slightly later. A common design practice for digital filters is to create a realizable filter by shortening and/or time-shifting a non-causal impulse response. If shortening is necessary, it is often accomplished as the product of the impulse-response with a window function.
An example of an anti-causal filter is a maximum phase filter, which can be defined as a stable, anti-causal filter whose inverse is also stable and anti-causal.

Example

The following definition is a moving average of input data. A constant factor of 1/2 is omitted for simplicity:
where x could represent a spatial coordinate, as in image processing. But if represents time, then a moving average defined that way is non-causal, because depends on future inputs, such as. A realizable output is
which is a delayed version of the non-realizable output.
Any linear filter can be characterized by a function h called its impulse response. Its output is the convolution
In those terms, causality requires
and general equality of these two expressions requires h = 0 for all t < 0.

Characterization of causal filters in the frequency domain

Let h be a causal filter with corresponding Fourier transform H. Define the function
which is non-causal. On the other hand, g is Hermitian and, consequently, its Fourier transform G is real-valued. We now have the following relation
where Θ is the Heaviside unit step function.
This means that the Fourier transforms of h and g are related as follows
where is a Hilbert transform done in the frequency domain. The sign of may depend on the definition of the Fourier Transform.
Taking the Hilbert transform of the above equation yields this relation between "H" and its Hilbert transform: