Sinc filter

See also:  Wavelet

In signal processing, a **sinc filter** is an idealized filter that removes all frequency components above a given cutoff frequency, without affecting lower frequencies, and has linear phase response. The filter's impulse response is a sinc function in the time domain, and its frequency response is a rectangular function.

It is an "ideal" low-pass 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 (a.k.a. *rectangular filter*) is non-causal and has an infinite delay and would therefore require knowledge of the infinite future and infinite past to operate perfectly. But it is commonly found in conceptual demonstrations or proofs, such as the sampling theorem and the Whittaker–Shannon interpolation formula.

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

H
(
f
# )

r
e
c
t

(

f

2
B

)

{\displaystyle H(f)=\mathrm {rect} \left({\frac {f}{2B}}\right)}

where

B

{\displaystyle B\,}

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

h
(
t
# )

F

−
1

{
H
(
f
)
}

=
2
B

sin
⁡
(
2
π
B
t
)

2
π
B
t

=
2
B

s
i
n
c

(
2
B
t
)

{\displaystyle {\begin{aligned}h(t)={\mathcal {F}}^{-1}\{H(f)\}&=2B{\frac {\sin(2\pi Bt)}{2\pi Bt}}\\&=2B\,\mathrm {sinc} (2Bt)\end{aligned}}}

where *sinc* is 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 sinc filter is often used instead. Windowing and truncating a sinc filter kernel in order to use it on any practical real world data set reduces its ideal properties.

## Sinc function

In digital signal processing and information theory, the **normalized sinc function** is commonly defined for *x* ≠ 0 by

sinc
⁡
(
x
# )

sin
⁡
(
π
x
)

π
x

.

{\displaystyle \operatorname {sinc} (x)={\frac {\sin(\pi x)}{\pi x}}~.}

In either case, the value at *x* = 0 is defined to be the limiting value

sinc
⁡
(
0
)
:=

lim

x
→
0

sin
⁡
(
a
x
)

a
x

=
1

{\displaystyle \operatorname {sinc} (0):=\lim \_{x\to 0}{\frac {\sin(ax)}{ax}}=1}

 for all real *a* ≠ 0.
The normalization causes the definite integral of the function over the real numbers to equal 1 (whereas the same integral of the unnormalized sinc function has a value of π). As a further useful property, the zeros of the normalized sinc function are the nonzero integer values of x.

## Brick-wall filters

An idealized electronic filter, 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. The sinc filter is a brick-wall low-pass filter, from which brick-wall band-pass filters and high-pass filters are easily constructed.

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

h

L
P
F

(
t
# )
2

B

L

s
i
n
c

(

2

B

L

t

)

{\displaystyle h\_{LPF}(t)=2B\_{L}\,\mathrm {sinc} \left(2B\_{L}t\right)}

H

L
P
F

(
f
# )

r
e
c
t

(

f

2

B

L

)

.

{\displaystyle H\_{LPF}(f)=\mathrm {rect} \left({\frac {f}{2B\_{L}}}\right).}

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

h

B
P
F

(
t
# )
2

B

H

s
i
n
c

(

2

B

H

t

)

−
2

B

L

s
i
n
c

(

2

B

L

t

)

{\displaystyle h\_{BPF}(t)=2B\_{H}\,\mathrm {sinc} \left(2B\_{H}t\right)-2B\_{L}\,\mathrm {sinc} \left(2B\_{L}t\right)}

H

B
P
F

(
f
# )

r
e
c
t

(

f

2

B

H

)

−

r
e
c
t

(

f

2

B

L

)

.

{\displaystyle H\_{BPF}(f)=\mathrm {rect} \left({\frac {f}{2B\_{H}}}\right)-\mathrm {rect} \left({\frac {f}{2B\_{L}}}\right).}

The high-pass filter with lower band edge *B**H* is just a transparent filter minus a sinc filter, which makes it clear that the Dirac delta function is the limit of a narrow-in-time sinc filter:

h

H
P
F

(
t
# )
δ
(
t
)
−
2

B

H

s
i
n
c

(

2

B

H

t

)

{\displaystyle h\_{HPF}(t)=\delta (t)-2B\_{H}\,\mathrm {sinc} \left(2B\_{H}t\right)}

H

H
P
F

(
f
# )
1
−

r
e
c
t

(

f

2

B

H

)

.

{\displaystyle H\_{HPF}(f)=1-\mathrm {rect} \left({\frac {f}{2B\_{H}}}\right).}

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 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 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 delta-sigma ADCs, as they are easy to implement and nearly optimal for this use.

The simplest implementation of a Sinc-in-frequency filter is a group-averaging filter, also known as accumulate-and-dump filter.
This filter also performs a data rate reduction.

It collects N data samples , accumulates them and provides
the accumulator value as output. Thus, the decimation factor of this filter is N.
It can be modelled as a FIR filter with all N coefficients equal, followed by a N-time downsampling
block.
The simplicity of the filter, requiring just an accumulator as central data processing block,
is foiled with strong aliasing effects: an N sample filter aliases all attenuated and unattenuated signal components lying above

f

S

2
∗
N

{\displaystyle {\frac {f\_{S}}{2\*N}}}

 to the baseband ranging from 0 to

f

S

2
∗
N

{\displaystyle {\frac {f\_{S}}{2\*N}}}

 ( fS is the input sample rate).

A group averaging filter processing N samples has N/2 transmission zeroes.

The picture "transmission function of a 16sample group averaging filter" shows how the transmission function looks like above the
Nyquist frequency.

## Stability

The sinc filter is not bounded-input–bounded-output (BIBO) stable. That is, a bounded input can produce an unbounded output, because the integral of the absolute value of the sinc function is infinite. A bounded input that produces an unbounded output is sgn(sinc(*t*)). Another is sin(2π*Bt*)u(*t*), a sine wave starting at time 0, at the cutoff frequency.