Sinc filter

# Sinc filter

Discussion

Encyclopedia

In signal processing
Signal processing
Signal processing is an area of systems engineering, electrical engineering and applied mathematics that deals with operations on or analysis of signals, in either discrete or continuous time...

, a sinc filter is an idealized filter
Filter (signal processing)
In signal processing, a filter is a device or process that removes from a signal some unwanted component or feature. Filtering is a class of signal processing, the defining feature of filters being the complete or partial suppression of some aspect of the signal...

that removes all frequency components above a given bandwidth, leaves the low frequencies alone, and has linear phase
Linear phase
Linear phase is a property of a filter, where the phase response of the filter is a linear function of frequency, excluding the possibility of wraps at \pm\pi. In a causal system, perfect linear phase can be achieved with a discrete-time FIR filter...

. The filter's impulse response
Impulse response
In signal processing, the impulse response, or impulse response function , of a dynamic system is its output when presented with a brief input signal, called an impulse. More generally, an impulse response refers to the reaction of any dynamic system in response to some external change...

is a sinc function in the time domain, and its frequency response
Frequency response
Frequency response is the quantitative measure of the output spectrum of a system or device in response to a stimulus, and is used to characterize the dynamics of the system. It is a measure of magnitude and phase of the output as a function of frequency, in comparison to the input...

is a rectangular function.

It is an "ideal" low-pass filter
Low-pass filter
A low-pass filter is an electronic filter that passes low-frequency signals but attenuates signals with frequencies higher than the cutoff frequency. The actual amount of attenuation for each frequency varies from filter to filter. It is sometimes called a high-cut filter, or treble cut filter...

in the frequency sense, perfectly passing low frequencies, perfectly cutting high frequencies; and thus may be considered to be a brick-wall filter.

Real-time filters can only approximate this ideal, since an ideal sinc filter (aka rectangular filter) is acausal
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. A filter whose output depends only on future inputs is...

and has an infinite delay, but it is commonly found in conceptual demonstrations or proofs, such as the sampling theorem
Nyquist–Shannon sampling theorem
The Nyquist–Shannon sampling theorem, after Harry Nyquist and Claude Shannon, is a fundamental result in the field of information theory, in particular telecommunications and signal processing. Sampling is the process of converting a signal into a numeric sequence...

and the Whittaker–Shannon interpolation formula
Whittaker–Shannon interpolation formula
The Whittaker–Shannon interpolation formula or sinc interpolation is a method to reconstruct a continuous-time bandlimited signal from a set of equally spaced samples.-Definition:...

.

In mathematical terms, the desired frequency response is the rectangular function:

where is an arbitrary cutoff frequency (aka bandwidth). The impulse response of such a filter is given by the inverse Fourier transform:

in terms of the normalized sinc function.

As the sinc filter has infinite impulse response in both positive and negative time directions, it must be approximated for real-world (non-abstract) applications; a windowed
Window function
In signal processing, a window function is a mathematical function that is zero-valued outside of some chosen interval. For instance, a function that is constant inside the interval and zero elsewhere is called a rectangular window, which describes the shape of its graphical representation...

sinc filter is often used instead. Windowing and truncating a sync filter kernel in order to use it on any practical real world data set destroys its ideal properties.

## Brick-wall filters

An idealized electronic filter
Electronic filter
Electronic filters are electronic circuits which perform signal processing functions, specifically to remove unwanted frequency components from the signal, to enhance wanted ones, or both...

, one that has full transmission in the pass band, and complete attenuation in the stop band, with abrupt transitions, is known colloquially as a "brick-wall filter", in reference to the shape of the transfer function
Transfer function
A transfer function is a mathematical representation, in terms of spatial or temporal frequency, of the relation between the input and output of a linear time-invariant system. With optical imaging devices, for example, it is the Fourier transform of the point spread function i.e...

. The sinc filter is a brick-wall low-pass filter
Low-pass filter
A low-pass filter is an electronic filter that passes low-frequency signals but attenuates signals with frequencies higher than the cutoff frequency. The actual amount of attenuation for each frequency varies from filter to filter. It is sometimes called a high-cut filter, or treble cut filter...

, from which brick-wall band-pass filter
Band-pass filter
A band-pass filter is a device that passes frequencies within a certain range and rejects frequencies outside that range.Optical band-pass filters are of common usage....

s and high-pass filter
High-pass filter
A high-pass filter is a device that passes high frequencies and attenuates frequencies lower than its cutoff frequency. A high-pass filter is usually modeled as a linear time-invariant system...

s are easily constructed.

The lowpass filter with brick-wall cutoff at frequency BL has impulse response and transfer function given by:

The band-pass filter with lower band edge BL and upper band edge BH is just the difference of two such sinc filters (since the filters are zero phase, their magnitude responses subtract directly):

The high-pass filter with lower band edge BH is just a transparent filter minus a sinc filter, which makes it clear that the Dirac delta function
Dirac delta function
The Dirac delta function, or δ function, is a generalized function depending on a real parameter such that it is zero for all values of the parameter except when the parameter is zero, and its integral over the parameter from −∞ to ∞ is equal to one. It was introduced by theoretical...

is the limit of a narrow-in-time sinc filter:

Brick-wall filters that run in realtime are not physically realizable as they have infinite latency (i.e., its compact support in the frequency domain
Frequency domain
In electronics, control systems engineering, and statistics, frequency domain is a term used to describe the domain for analysis of mathematical functions or signals with respect to frequency, rather than time....

forces its time response not to have compact support meaning that it is ever-lasting) and infinite order (i.e., the response cannot be expressed as a linear differential equation
Linear differential equation
Linear differential equations are of the formwhere the differential operator L is a linear operator, y is the unknown function , and the right hand side ƒ is a given function of the same nature as y...

with a finite sum), but approximate implementations are sometimes used and they are frequently called brick-wall filters.

## Frequency-domain sinc

The name "sinc filter" is applied also to the filter shape that is rectangular in time and a sinc function in frequency, as opposed to the ideal low-pass sinc filter, which is sinc in time and rectangular in frequency. In case of confusion, one may refer to these as sinc-in-frequency and sinc-in-time, according to which domain the filter is sinc in.

Sinc-in-frequency CIC filters, among many other applications, are almost universally used for decimating
Decimation (signal processing)
In digital signal processing, decimation is a technique for reducing the number of samples in a discrete-time signal. The element which implements this technique is referred to as a decimator.Decimation is a two-step process:...

delta-sigma
Delta-sigma modulation
Delta-sigma modulation is a method for encoding high-resolution or analog signals into lower-resolution digital signals. The conversion is done using error feedback, where the difference between the two signals is measured and used to improve the conversion...