Rahul Sharma (Editor)

Noise shaping

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

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 digital 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 more undesirable and at a correspondingly higher level in bands where it is considered to be less undesirable. 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.

Contents

Introduction

Noise shaping works by putting the quantization error in a feedback loop. Any feedback loop functions as a filter, so by creating a feedback loop for the error itself, the error can be filtered as desired.

For example, consider the feedback system:

  y [ n ] = x [ n ] + e [ n 1 ] ,

where y[n] is the output sample value that is to be quantized, x[n] is the input sample value, n is the sample number, and e[n] is the quantization error introduced at sample n:

  e [ n ] = y quantized [ n ] y [ n ] .

In this model, when any sample's bit depth is reduced, the quantization error between the quantized value and the original value is measured and stored. That "error value" is then re-added into the next sample prior to its quantization. The effect is that the quantization error is low-pass filtered by a 2-sample averaging filter. As a result, compared to before, the quantization error has lower power at higher frequencies and higher power at lower frequencies.

Note that we can adjust the cutoff frequency of the filter by modifying by the proportion, b, of the error from the previous sample that is fed back:

  y [ n ] = x [ n ] + b e [ n 1 ]

More generally, any FIR filter or IIR filter can be used to create a more complex frequency response curve. Such filters can be designed using the weighted least squares method. In the case of digital audio, typically the weighting function used is one divided by the absolute threshold of hearing curve, i.e.

  W ( f ) = 1 A ( f ) .

Noise shaping should also always involve an appropriate amount of dither within the process itself so as to prevent determinable and correlated errors to the signal itself. If dither is not used then noise shaping effectively functions merely as distortion shaping — pushing the distortion energy around to different frequency bands, but it is still distortion. If dither is added to the process as

  y [ n ] = x [ n ] + b e [ n 1 ] + d i t h e r ,

then the quantization error truly becomes noise, and the process indeed yields noise shaping.

In digital audio

Noise shaping in audio is most commonly applied as a bit-reduction scheme. The most basic form of dither is flat, white noise. The ear, however, is less sensitive to certain frequencies than others at low levels (see Fletcher-Munson curves). By using noise shaping we can effectively spread the quantization error around so that more of it is focused on frequencies that we can't hear as well and less of it is focused on frequencies that we can hear. The result is that where the ear is most critical the quantization error can be reduced greatly and where our ears are less sensitive the noise is much greater. This can give a perceived noise reduction of 4 bits compared to straight dither. While 16-bit audio is typically thought to have 96 dB of dynamic range (see quantization distortion calculations), it can actually be increased to 120 dB using noise-shaped dither.

This article is unclear: a pure signal is by definition a sinusoidal signal (sine or cosine) which when expressed in the frequency domain has no harmonics, only a fundamental. Presumably, therefore, the harmonics shown are the result of quantisation noise being superimposed on to the analogue signal as a result of the digital-to-analogue conversion process, resulting in distortion (when compared to the original recorded source sinusoidal waveform), and that distortion results in the presence of harmonics, when the signal is represented in the frequency domain.

Noise shaping and 1-bit converters

Since around 1989, 1 bit delta-sigma modulators have been used in analog to digital converters. This involves sampling the audio at a very high rate (2.8224 million samples per second, for example) but only using a single bit. Because only 1 bit is used, this converter only has 6.02 dB of dynamic range. The noise floor, however, is spread throughout the entire "legal" frequency range below the Nyquist frequency of 1.4112 MHz. Noise shaping is used to lower the noise present in the audible range (20 Hz to 20 kHz) and increase the noise above the audible range. This results in a broadband dynamic range of only 7.78 dB, but it is not consistent among frequency bands, and in the lowest frequencies (the audible range) the dynamic range is much greater — over 100 dB. Noise Shaping is inherently built into the delta-sigma modulators.

The 1 bit converter is the basis of the DSD format by Sony. One criticism of the 1 bit converter (and thus the DSD system) is that because only 1 bit is used in both the signal and the feedback loop, adequate amounts of dither cannot be used in the feedback loop and distortion can be heard under some conditions. Most A/D converters made since 2000 use multi-bit or multi-level delta sigma modulators that yield more than 1 bit output so that proper dither can be added in the feedback loop. For traditional PCM sampling the signal is then decimated to 44.1 kHz or other appropriate sample rates.

In modern ADCs

Analog Devices uses what they refer to as "Noise Shaping Requantizer", and Texas Instruments uses what they refer to as "SNRBoost" to lower the noise floor approximately 30db compared to the surrounding frequencies. This comes at a cost of non-continuous operation but produces a nice bathtub shape to the spectrum floor. This can be combined with other techniques such as Bit-Boost to further enhance the resolution of the Spectrum. (Note: An Expert is welcome to read the following Document URLs and write something better here).

Texas Instruments explains "SNRBoost" quite well in these Documents Using Windowing With SNRBoost3G Technology (PDF) and Understanding Low-Amplitude Behavior of 11-bit ADCs (PDF) while Analog Devices explains their "Noise Shaping Requantizer", quite well in this Document AD6677 80 MHz Bandwidth IF Receiver (on Page 23).

References

Noise shaping Wikipedia