Jump to content

Clipping (signal processing)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Kvng (talk | contribs) at 19:05, 9 November 2020 (Audio: trim to WP:SUMMARY. mv other material to Clipping (audio)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

An oscilloscope screen of an amplifier "clipping." The amplifier should be outputting a clean sine wave with rounded tops and bottoms, but instead they are cut off flat, or "clipped".

Clipping is a form of distortion that limits a signal once it exceeds a threshold. Clipping may occur when a signal is recorded by a sensor that has constraints on the range of data it can measure, it can occur when a signal is digitized, or it can occur any other time an analog or digital signal is transformed, particularly in the presence of gain or overshoot and undershoot.

Clipping may be described as hard, in cases where the signal is strictly limited at the threshold, producing a flat cutoff; or it may be described as soft, in cases where the clipped signal continues to follow the original at a reduced gain. Hard clipping results in many high-frequency harmonics; soft clipping results in fewer higher-order harmonics and intermodulation distortion components.

Audio

This PCM waveform is clipped between the red lines

In the frequency domain, clipping produces strong harmonics in the high-frequency range (as the clipped waveform comes closer to a squarewave). The extra high-frequency weighting of the signal could make tweeter damage more likely than if the signal was not clipped.

Many electric guitar players intentionally overdrive their amplifiers (or insert a "fuzz box") to cause clipping in order to get a desired sound (see guitar distortion).

In general, the distortion associated with clipping is unwanted, and is visible on an oscilloscope even if it is inaudible.[1]

Images

Example image exhibiting blown-out highlights. Top: original image, bottom: blown-out areas marked red

In the image domain, clipping is seen as desaturated (washed-out) bright areas that turn to pure white if all color components clip.

Causes

Analog circuitry

A circuit designer may intentionally use a clipper or clamper to keep a signal within a desired range.

When an amplifier is pushed to create a signal with more power than it can support, it will amplify the signal only up to its maximum capacity, at which point the signal will be amplified no further.

Digital processing

In digital signal processing, clipping occurs when the signal is restricted by the range of a chosen representation. For example in a system using 16-bit signed integers, 32767 is the largest positive value that can be represented, and if during processing the amplitude of the signal is doubled, sample values of 32000 should become 64000, but instead they are truncated to the maximum, 32767. Clipping is preferable to the alternative in digital systems — wrapping — which occurs if the digital hardware is allowed to "overflow", ignoring the most significant bits of the magnitude, and sometimes even the sign of the sample value, resulting in gross distortion of the signal.

The incidence of clipping may be greatly reduced by using floating point numbers instead of integers. However, floating point numbers are usually less efficient to use, sometimes result in a loss of precision, and they can still clip if a number is extremely large or small.

Avoiding clipping

Clipping can be detected by viewing the signal (on an oscilloscope, for example), and observing that the tops and bottoms of waves aren't smooth anymore. When working with images, some tools can highlight all pixels that are pure white, allowing the user to identify larger groups of white pixels and decide if too much clipping has occurred.

To avoid clipping, the signal can be dynamically reduced using a limiter. If not done carefully, this can still cause undesirable distortion, but it prevents any data from being completely lost.

Repairing a clipped signal

When clipping occurs, part of the original signal is lost, so perfect restoration is impossible. Thus, it is much preferable to avoid clipping in the first place. However, when repair is the only option, the goal is to make up a plausible replacement for the clipped part of the signal.

See also

References

  1. ^ Zottola, Tino (1996). Vacuum Tube and Guitar and Bass Amplifier Servicing. Bold Strummer. p. 6. ISBN 0-933224-97-4.