Anti-aliasing filter

Last updated

An anti-aliasing filter (AAF) is a filter used before a signal sampler to restrict the bandwidth of a signal to satisfy the Nyquist–Shannon sampling theorem over the band of interest. Since the theorem states that unambiguous reconstruction of the signal from its samples is possible when the power of frequencies above the Nyquist frequency is zero, a brick wall filter is an idealized but impractical AAF. [lower-alpha 1] A practical AAF makes a trade off between reduced bandwidth and increased aliasing. A practical anti-aliasing filter will typically permit some aliasing to occur or attenuate or otherwise distort some in-band frequencies close to the Nyquist limit. For this reason, many practical systems sample higher than would be theoretically required by a perfect AAF in order to ensure that all frequencies of interest can be reconstructed, a practice called oversampling.

Contents

Optical applications

Moire pattern of bricks small.jpg
Moire pattern of bricks.jpg
Simulated photographs of a brick wall without (left) and with (right) an optical low-pass filter
Optical low-pass filter (OLPF) Lowpassfilter - Copy.jpg
Optical low-pass filter (OLPF)

In the case of optical image sampling, as by image sensors in digital cameras, the anti-aliasing filter is also known as an optical low-pass filter (OLPF), blur filter, or AA filter. The mathematics of sampling in two spatial dimensions is similar to the mathematics of time-domain sampling, but the filter implementation technologies are different.

The typical implementation in digital cameras is two layers of birefringent material such as lithium niobate, which spreads each optical point into a cluster of four points. [1] The choice of spot separation for such a filter involves a tradeoff among sharpness, aliasing, and fill factor (the ratio of the active refracting area of a microlens array to the total contiguous area occupied by the array). In a monochrome or three-CCD or Foveon X3 camera, the microlens array alone, if near 100% effective, can provide a significant anti-aliasing function, [2] while in color filter array (e.g. Bayer filter) cameras, an additional filter is generally needed to reduce aliasing to an acceptable level. [3] [4] [5]

Alternative implementations include the Pentax K-3's anti-aliasing filter, which applies small vibrations to the sensor element. [6] [ promotion? ]

Audio applications

Anti-aliasing filters are used at the input of an analog-to-digital converter. Similar filters are used as reconstruction filters at the output of a digital-to-analog converter. In the latter case, the filter prevents imaging, the reverse process of aliasing where in-band frequencies are mirrored out of band.

Oversampling

With oversampling, a higher intermediate digital sample rate is used, so that a nearly ideal digital filter can sharply cut off aliasing near the original low Nyquist frequency and give better phase response, while a much simpler analog filter can stop frequencies above the new higher Nyquist frequency. Because analog filters have relatively high cost and limited performance, relaxing the demands on the analog filter can greatly reduce both aliasing and cost. Furthermore, because some noise is averaged out, the higher sampling rate can moderately improve signal-to-noise ratio.

A signal may be intentionally sampled at a higher rate to reduce the requirements and distortion of the anti-alias filter. For example, compare CD audio with high-resolution audio. CD audio filters the signal to a passband edge of 20 kHz, with a stopband Nyquist frequency of 22.05 kHz and sample rate of 44.1 kHz. The narrow 2.05 kHz transition band requires a compromise between filter complexity and performance. High-resolution audio uses a higher sample rate, providing both a higher passband edge and larger transition band, which allows better filter performance with reduced aliasing, reduced attenuation of higher audio frequencies and reduced time and phase domain signal distortion. [7] [8] [ failed verification ] [9] [10]

Bandpass signals

Often, an anti-aliasing filter is a low-pass filter; this is not a requirement, however. Generalizations of the Nyquist–Shannon sampling theorem allow sampling of other band-limited passband signals instead of baseband signals.

For signals that are bandwidth limited, but not centered at zero, a band-pass filter can be used as an anti-aliasing filter. For example, this could be done with a single-sideband modulated or frequency modulated signal. If one desired to sample an FM radio broadcast centered at 87.9 MHz and bandlimited to a 200 kHz band, then an appropriate anti-alias filter would be centered on 87.9 MHz with 200 kHz bandwidth (or passband of 87.8 MHz to 88.0 MHz), and the sampling rate would be no less than 400 kHz, but should also satisfy other constraints to prevent aliasing.[ specify ]

Signal overload

It is very important to avoid input signal overload when using an anti-aliasing filter. If the signal is strong enough, it can cause clipping at the analog-to-digital converter, even after filtering. When distortion due to clipping occurs after the anti-aliasing filter, it can create components outside the passband of the anti-aliasing filter; these components can then alias, causing the reproduction of other non-harmonically related frequencies. [11]

Notes

  1. Brick-wall filters that run in realtime are not physically realizable as they have infinite latency and infinite order.

Related Research Articles

<span class="mw-page-title-main">Bandwidth (signal processing)</span> Range of usable frequencies

Bandwidth is the difference between the upper and lower frequencies in a continuous band of frequencies. It is typically measured in unit of hertz.

<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.

<span class="mw-page-title-main">Analog-to-digital converter</span> System that converts an analog signal into a digital signal

In electronics, an analog-to-digital converter is a system that converts an analog signal, such as a sound picked up by a microphone or light entering a digital camera, into a digital signal. An ADC may also provide an isolated measurement such as an electronic device that converts an analog input voltage or current to a digital number representing the magnitude of the voltage or current. Typically the digital output is a two's complement binary number that is proportional to the input, but there are other possibilities.

<span class="mw-page-title-main">Digital audio</span> Technology that records, stores, and reproduces sound

Digital audio is a representation of sound recorded in, or converted into, digital form. In digital audio, the sound wave of the audio signal is typically encoded as numerical samples in a continuous sequence. For example, in CD audio, samples are taken 44,100 times per second, each with 16-bit sample depth. Digital audio is also the name for the entire technology of sound recording and reproduction using audio signals that have been encoded in digital form. Following significant advances in digital audio technology during the 1970s and 1980s, it gradually replaced analog audio technology in many areas of audio engineering, record production and telecommunications in the 1990s and 2000s.

In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts (aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graphics, digital audio, and many other applications.

<span class="mw-page-title-main">Aliasing</span> Signal processing effect

In signal processing and related disciplines, aliasing is the overlapping of frequency components resulting from a sample rate below the Nyquist rate. This overlap results in distortion or artifacts when the signal is reconstructed from samples which causes the reconstructed signal to differ from the original continuous signal. Aliasing that occurs in signals sampled in time, for instance in digital audio or the stroboscopic effect, is referred to as temporal aliasing. Aliasing in spatially sampled signals is referred to as spatial aliasing.

Sound can be recorded and stored and played using either digital or analog techniques. Both techniques introduce errors and distortions in the sound, and these methods can be systematically compared. Musicians and listeners have argued over the superiority of digital versus analog sound recordings. Arguments for analog systems include the absence of fundamental error mechanisms which are present in digital audio systems, including aliasing and associated anti-aliasing filter implementation, jitter and quantization noise. Advocates of digital point to the high levels of performance possible with digital audio, including excellent linearity in the audible band and low levels of noise and distortion.

<span class="mw-page-title-main">Nyquist frequency</span> Maximum frequency of non-aliased component upon sampling

In signal processing, the Nyquist frequency, named after Harry Nyquist, is a characteristic of a sampler, which converts a continuous function or signal into a discrete sequence. For a given sampling rate, the Nyquist frequency (cycles per second) is the frequency whose cycle-length is twice the interval between samples, thus 0.5 cycle/sample. For example, audio CDs have a sampling rate of 44100 samples/second. At 0.5 cycle/sample, the corresponding Nyquist frequency is 22050 cycles/second (Hz). Conversely, the Nyquist rate for sampling a 22050 Hz signal is 44100 samples/second.

<span class="mw-page-title-main">Sampling (signal processing)</span> Measurement of a signal at discrete time intervals

In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or space; this definition differs from the term's usage in statistics, which refers to a set of such values.

<span class="mw-page-title-main">Spectrum analyzer</span> Electronic testing device

A spectrum analyzer measures the magnitude of an input signal versus frequency within the full frequency range of the instrument. The primary use is to measure the power of the spectrum of known and unknown signals. The input signal that most common spectrum analyzers measure is electrical; however, spectral compositions of other signals, such as acoustic pressure waves and optical light waves, can be considered through the use of an appropriate transducer. Spectrum analyzers for other types of signals also exist, such as optical spectrum analyzers which use direct optical techniques such as a monochromator to make measurements.

<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.

Noise shaping is a technique typically used in digital audio, image, and video processing, usually in combination with dithering, as part of the process of quantization or bit-depth reduction of a signal. Its purpose is to increase the apparent signal-to-noise ratio of the resultant signal. It does this by altering the spectral shape of the error that is introduced by dithering and quantization; such that the noise power is at a lower level in frequency bands at which noise is considered to be less desirable and at a correspondingly higher level in bands where it is considered to be more desirable. A popular noise shaping algorithm used in image processing is known as ‘Floyd Steinberg dithering’; and many noise shaping algorithms used in audio processing are based on an ‘Absolute threshold of hearing’ model.

In signal processing, oversampling is the process of sampling a signal at a sampling frequency significantly higher than the Nyquist rate. Theoretically, a bandwidth-limited signal can be perfectly reconstructed if sampled at the Nyquist rate or above it. The Nyquist rate is defined as twice the bandwidth of the signal. Oversampling is capable of improving resolution and signal-to-noise ratio, and can be helpful in avoiding aliasing and phase distortion by relaxing anti-aliasing filter performance requirements.

<span class="mw-page-title-main">Delta-sigma modulation</span> Method for converting signals between digital and analog

Delta-sigma modulation is an oversampling method for encoding signals into low bit depth digital signals at a very high sample-frequency as part of the process of delta-sigma analog-to-digital converters (ADCs) and digital-to-analog converters (DACs). Delta-sigma modulation achieves high quality by utilizing a negative feedback loop during quantization to the lower bit depth that continuously corrects quantization errors and moves quantization noise to higher frequencies well above the original signal's bandwidth. Subsequent low-pass filtering for demodulation easily removes this high frequency noise and time averages to achieve high accuracy in amplitude.

In a mixed-signal system, a reconstruction filter, sometimes called an anti-imaging filter, is used to construct a smooth analog signal from a digital input, as in the case of a digital to analog converter (DAC) or other sampled data output device.

<span class="mw-page-title-main">Kell factor</span>

The Kell factor, named after RCA engineer Raymond D. Kell, is a parameter used to limit the bandwidth of a sampled image signal to avoid the appearance of beat frequency patterns when displaying the image in a discrete display device, usually taken to be 0.7. The number was first measured in 1934 by Raymond D. Kell and his associates as 0.64 but has suffered several revisions given that it is based on image perception, hence subjective, and is not independent of the type of display. It was later revised to 0.85 but can go higher than 0.9, when fixed pixel scanning and fixed pixel displays are used, or as low as 0.7 for electron gun scanning.

<span class="mw-page-title-main">Audio bit depth</span> Number of bits of information recorded for each digital audio sample

In digital audio using pulse-code modulation (PCM), bit depth is the number of bits of information in each sample, and it directly corresponds to the resolution of each sample. Examples of bit depth include Compact Disc Digital Audio, which uses 16 bits per sample, and DVD-Audio and Blu-ray Disc which can support up to 24 bits per sample.

A Bitcrusher is an audio effect that produces distortion by reducing of the resolution or bandwidth of digital audio data. The resulting quantization noise may produce a "warmer" sound impression, or a harsh one, depending on the amount of reduction.

Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps.

In digital audio, 44,100 Hz is a common sampling frequency. Analog audio is often recorded by sampling it 44,100 times per second, and then these samples are used to reconstruct the audio signal when playing it back.

References

  1. Adrian Davies and Phil Fennessy (2001). Digital imaging for photographers (Fourth ed.). Focal Press. ISBN   0-240-51590-0.
  2. S. B. Campana and D. F. Barbe (1974). "Tradeoffs between aliasing and MTF". Proceedings of the Electro-Optical Systems Design Conference – 1974 West International Laser Exposition – San Francisco, Calif., November 5-7, 1974. pp. 1–9. Bibcode:1974eosd.conf....1C.{{cite book}}: |journal= ignored (help)
  3. Brian W. Keelan (2004). Handbook of Image Quality: Characterization and Prediction. Marcel–Dekker. ISBN   0-8247-0770-2.
  4. Sidney F. Ray (1999). Scientific photography and applied imaging. Focal Press. p. 61. ISBN   978-0-240-51323-2.
  5. Michael Goesele (2004). New Acquisition Techniques for Real Objects and Light Sources in Computer Graphics. Books on Demand. p. 34. ISBN   978-3-8334-1489-3.
  6. "Pentax K-3" . Retrieved November 29, 2013.
  7. Kester, Walt. "Oversampling Interpolating DACs" (PDF). Analog Devices. Retrieved January 17, 2015.
  8. Nauman Uppal (August 30, 2004). "Upsampling vs. Oversampling for Digital Audio". Audioholics . Retrieved October 6, 2012.
  9. Story, Mike (September 1997). "A Suggested Explanation For (Some Of) The Audible Differences Between High Sample Rate And Conventional Sample Rate Audio Material" (PDF). dCS Ltd. Archived (PDF) from the original on November 28, 2009.
  10. Lavry, Dan (1997). "Sampling, Oversampling, Imaging and Aliasing - a basic tutorial" (PDF). Lavry Engineering. Archived (PDF) from the original on June 21, 2015.
  11. Level and distortion in digital broadcasting (PDF), retrieved May 11, 2021