Sinc filter

Last updated
The normalized sinc function, the impulse response of a sinc-in-time filter and the frequency response of a sinc-in-frequency filter. Sinc function (normalized).svg
The normalized sinc function, the impulse response of a sinc-in-time filter and the frequency response of a sinc-in-frequency filter.
The rectangular function, the frequency response of a sinc-in-time filter and the impulse response of a sinc-in-frequency filter. Rectangular function.svg
The rectangular function, the frequency response of a sinc-in-time filter and the impulse response of a sinc-in-frequency filter.

In signal processing, a sinc filter can refer to either a sinc-in-time filter whose impulse response is a sinc function and whose frequency response is rectangular, or to a sinc-in-frequency filter whose impulse response is rectangular and whose frequency response is a sinc function. Calling them according to which domain the filter resembles a sinc avoids confusion. If the domain is unspecified, sinc-in-time is often assumed, or context hopefully can infer the correct domain.

Contents

Sinc-in-time

Sinc-in-time is an ideal filter that removes all frequency components above a given cutoff frequency, without attenuating lower frequencies, and has linear phase response. It may thus be considered a brick-wall filter or rectangular filter.

Its impulse response is a sinc function in the time domain:

while its frequency response is a rectangular function:

where (representing its bandwidth) is an arbitrary cutoff frequency.

Its impulse response is given by the inverse Fourier transform of its frequency response:

where sinc is the normalized sinc function.

Brick-wall filters

An idealized electronic filter with full transmission in the pass band, complete attenuation in the stop band, and abrupt transitions is known colloquially as a "brick-wall filter" (in reference to the shape of the transfer function). The sinc-in-time 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 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-in-time filters (since the filters are zero phase, their magnitude responses subtract directly): [1]

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

Unrealizable

As the sinc-in-time filter has infinite impulse response in both positive and negative time directions, it is non-causal and has an infinite delay (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). However, it is used in conceptual demonstrations or proofs, such as the sampling theorem and the Whittaker–Shannon interpolation formula.

Sinc-in-time filters must be approximated for real-world (non-abstract) applications, typically by windowing and truncating an ideal sinc-in-time filter kernel, but doing so reduces its ideal properties. This applies to other brick-wall filters built using sinc-in-time filters.

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.

Frequency-domain sinc

Filter transmission function of a 4sample group averaging filter Group averaging 4samples.png
Filter transmission function of a 4sample group averaging filter

The simplest implementation of a sinc-in-frequency filter uses a boxcar impulse response to produce a simple moving average (specifically if divide by the number of samples), also known as accumulate-and-dump filter (specifically if simply sum without a division). It can be modeled as a FIR filter with all coefficients equal. It is sometimes cascaded to produce higher-order moving averages (see Finite impulse response § Moving average example and cascaded integrator–comb filter).

This filter can be used for crude but fast and easy downsampling (a.k.a. decimation) by a factor of The simplicity of the filter (accumulate data samples, output the accumulator result, zero the accumulator, and repeat) is foiled by its mediocre low-pass capabilities. Its poorest attenuation in the stop-band is -13.3 dB [2] and most high frequency components are only slightly more attenuated than that. An -sample filter sampled at will alias all non-fully attenuated signal components lying above to the baseband ranging from DC to

Filter transmission function of a 32sample group averaging filter Group averaging 32samples.png
Filter transmission function of a 32sample group averaging filter

A group averaging filter processing samples has transmission zeroes evenly-spaced by with the lowest zero at and the highest zero at (the Nyquist frequency). Above the Nyquist frequency, the frequency response is mirrored and then is repeated periodically above forever.

The magnitude of the frequency response (plotted in these graphs) is useful when one wants to know how much frequencies are attenuated. Though the sinc function really oscillates between negative and positive values, negative values of the frequency response simply correspond to a 180-degree phase shift.

See Window function § Rectangular window for application of this kernel as the simplest windowing function.

transmission function of a 16sample group averaging filter working on a 1kHz input data rate, extended to 4x the Nyquist frequency Group averaging 16samples periodic.png
transmission function of a 16sample group averaging filter working on a 1kHz input data rate, extended to 4x the Nyquist frequency

See also

Related Research Articles

<span class="mw-page-title-main">Nyquist–Shannon sampling theorem</span> Sufficiency theorem for reconstructing signals from samples

The Nyquist–Shannon sampling theorem is an essential principle for digital signal processing linking the frequency range of a signal and the sample rate required to avoid a type of distortion called aliasing. The theorem states that the sample rate must be at least twice the bandwidth of the signal to avoid aliasing distortion. In practice, it is used to select band-limiting filters to keep aliasing distortion below an acceptable amount when an analog signal is sampled or when sample rates are changed within a digital signal processing function.

A low-pass filter is a filter that passes signals with a frequency lower than a selected cutoff frequency and attenuates signals with frequencies higher than the cutoff frequency. The exact frequency response of the filter depends on the filter design. The filter is sometimes called a high-cut filter, or treble-cut filter in audio applications. A low-pass filter is the complement of a high-pass filter.

<span class="mw-page-title-main">High-pass filter</span> Type of electronic circuit or optical filter

A high-pass filter (HPF) is an electronic filter that passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. The amount of attenuation for each frequency depends on the filter design. A high-pass filter is usually modeled as a linear time-invariant system. It is sometimes called a low-cut filter or bass-cut filter in the context of audio engineering. High-pass filters have many uses, such as blocking DC from circuitry sensitive to non-zero average voltages or radio frequency devices. They can also be used in conjunction with a low-pass filter to produce a band-pass filter.

The Whittaker–Shannon interpolation formula or sinc interpolation is a method to construct a continuous-time bandlimited function from a sequence of real numbers. The formula dates back to the works of E. Borel in 1898, and E. T. Whittaker in 1915, and was cited from works of J. M. Whittaker in 1935, and in the formulation of the Nyquist–Shannon sampling theorem by Claude Shannon in 1949. It is also commonly called Shannon's interpolation formula and Whittaker's interpolation formula. E. T. Whittaker, who published it in 1915, called it the Cardinal series.

<span class="mw-page-title-main">Undersampling</span> Signal processing sample technique

In signal processing, undersampling or bandpass sampling is a technique where one samples a bandpass-filtered signal at a sample rate below its Nyquist rate, but is still able to reconstruct the signal.

Chebyshev filters are analog or digital filters that have a steeper roll-off than Butterworth filters, and have either passband ripple or stopband ripple. Chebyshev filters have the property that they minimize the error between the idealized and the actual filter characteristic over the operating frequency range of the filter, but they achieve this with ripples in the passband. This type of filter is named after Pafnuty Chebyshev because its mathematical characteristics are derived from Chebyshev polynomials. Type I Chebyshev filters are usually referred to as "Chebyshev filters", while type II filters are usually called "inverse Chebyshev filters". Because of the passband ripple inherent in Chebyshev filters, filters with a smoother response in the passband but a more irregular response in the stopband are preferred for certain applications.

In mathematics, the Gibbs phenomenon is the oscillatory behavior of the Fourier series of a piecewise continuously differentiable periodic function around a jump discontinuity. The th partial Fourier series of the function produces large peaks around the jump which overshoot and undershoot the function values. As more sinusoids are used, this approximation error approaches a limit of about 9% of the jump, though the infinite Fourier series sum does eventually converge almost everywhere except points of discontinuity.

In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have internal feedback and may continue to respond indefinitely.

<span class="mw-page-title-main">Sinc function</span> Special mathematical function defined as sin(x)/x

In mathematics, physics and engineering, the sinc function, denoted by sinc(x), has two forms, normalized and unnormalized.

<span class="mw-page-title-main">Rectangular function</span> Function whose graph is 0, then 1, then 0 again, in an almost-everywhere continuous way

The rectangular function is defined as

<span class="mw-page-title-main">Dirac comb</span> Periodic distribution ("function") of "point-mass" Dirac delta sampling

In mathematics, a Dirac comb is a periodic function with the formula

Optical resolution describes the ability of an imaging system to resolve detail, in the object that is being imaged. An imaging system may have many individual components, including one or more lenses, and/or recording and display components. Each of these contributes to the optical resolution of the system; the environment in which the imaging is done often is a further important factor.

The raised-cosine filter is a filter frequently used for pulse-shaping in digital modulation due to its ability to minimise intersymbol interference (ISI). Its name stems from the fact that the non-zero portion of the frequency spectrum of its simplest form is a cosine function, 'raised' up to sit above the (horizontal) axis.

<span class="mw-page-title-main">Nyquist ISI criterion</span>

In communications, the Nyquist ISI criterion describes the conditions which, when satisfied by a communication channel, result in no intersymbol interference or ISI. It provides a method for constructing band-limited functions to overcome the effects of intersymbol interference.

<span class="mw-page-title-main">Triangular function</span> Tent function, often used in signal processing

A triangular function is a function whose graph takes the shape of a triangle. Often this is an isosceles triangle of height 1 and base 2 in which case it is referred to as the triangular function. Triangular functions are useful in signal processing and communication systems engineering as representations of idealized signals, and the triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel density estimation. It also has applications in pulse-code modulation as a pulse shape for transmitting digital signals and as a matched filter for receiving the signals. It is also used to define the triangular window sometimes called the Bartlett window.

<span class="mw-page-title-main">Hann function</span> Mathematical function used in signal processing

The Hann function is named after the Austrian meteorologist Julius von Hann. It is a window function used to perform Hann smoothing. The function, with length and amplitude is given by:

The zero-order hold (ZOH) is a mathematical model of the practical signal reconstruction done by a conventional digital-to-analog converter (DAC). That is, it describes the effect of converting a discrete-time signal to a continuous-time signal by holding each sample value for one sample interval. It has several applications in electrical communication.

First-order hold (FOH) is a mathematical model of the practical reconstruction of sampled signals that could be done by a conventional digital-to-analog converter (DAC) and an analog circuit called an integrator. For FOH, the signal is reconstructed as a piecewise linear approximation to the original signal that was sampled. A mathematical model such as FOH (or, more commonly, the zero-order hold) is necessary because, in the sampling and reconstruction theorem, a sequence of Dirac impulses, xs(t), representing the discrete samples, x(nT), is low-pass filtered to recover the original signal that was sampled, x(t). However, outputting a sequence of Dirac impulses is impractical. Devices can be implemented, using a conventional DAC and some linear analog circuitry, to reconstruct the piecewise linear output for either predictive or delayed FOH.

<span class="mw-page-title-main">Ringing artifacts</span> Form of error in digital signals; spurious signals near sharp transitions

In signal processing, particularly digital image processing, ringing artifacts are artifacts that appear as spurious signals near sharp transitions in a signal. Visually, they appear as bands or "ghosts" near edges; audibly, they appear as "echos" near transients, particularly sounds from percussion instruments; most noticeable are the pre-echos. The term "ringing" is because the output signal oscillates at a fading rate around a sharp transition in the input, similar to a bell after being struck. As with other artifacts, their minimization is a criterion in filter design.

In optics, the Fraunhofer diffraction equation is used to model the diffraction of waves when the diffraction pattern is viewed at a long distance from the diffracting object, and also when it is viewed at the focal plane of an imaging lens.

References

  1. Mark Owen (2007). Practical signal processing. Cambridge University Press. p. 81. ISBN   978-0-521-85478-8.
  2. Verbeure, Tom (2020-09-30). "An Intuitive Look at Moving Average and CIC Filters". Electronics etc…. Archived from the original on 2023-04-02. Retrieved 2023-08-24.