I'm learning about sampling and DSP on my own. I have a hard time to understand how the quantization error results in noise. I think I miss a fundamental understanding but can't tell what it is. So how does the quantization error generate noise?

  • $\begingroup$ It's more distortion than noise. It depends on the signal, and is not random. $\endgroup$
    – endolith
    Jul 15, 2012 at 20:48
  • $\begingroup$ endolith, I think what I don't understand is how the error results in frequencies. $\endgroup$ Jul 15, 2012 at 21:04
  • 2
    $\begingroup$ distortion always produces additional frequencies. if you distort a sine wave, it becomes a different repetitive waveform. any repetitive waveform other than a sine wave is made up of multiple frequencies. $\endgroup$
    – endolith
    Jul 15, 2012 at 22:58
  • 1
    $\begingroup$ As @endolith has mentioned, let us assume you have a very bad ADC, such that you give it a pure tone, but get a signal that looks like a sine but has big steps in it. (So now your signal looks like a staircase that is going up and down with the original sine.) Now, you know intuitively that a step is composed of many frequencies. This is how an ADC will add frequencies as you are asking. It is a non-linear operation btw. If it was linear, you could not make new frequencies, only superimpose many of them together. $\endgroup$
    – Spacey
    Jul 16, 2012 at 14:33
  • $\begingroup$ Another remark: A nice interpretation is given by Yannis Tsividis in ICASSP 2004: Quantization is a hard nonlinearity and generates an "infinite number of harmonics". The sampling process folds all of them down. For sufficiently complex signals, these "downfolded harmonics" look like a white noise floor. $\endgroup$
    – divB
    Sep 12, 2018 at 21:19

4 Answers 4


Suppose I have a multitone signal (six carriers, at ±1/1000, ±2/1000 and ±7/1000 of sampling frequency)

x = (1:1000);
wave = sin(x/1000*2*pi) + sin(x/1000*2*pi*2) + sin(x/1000*2*pi*7);

which is quantized using a 14-bit ADC

wave_quant = round(wave * 16384) / 16384;

The difference

wave_qnoise = wave_quant - wave;

gives the quantization error

Quantization Noise by Time

The corresponding spectrum

wave_qnoise_freq = mag(fftshift(fft(wave_qnoise)) / sqrt(1000));

Quantization Noise by Frequency

shows the generated noise floor across the entire spectrum.

This assumes that the quantization error does not introduce a bias. If the ADC always chooses the lower value

wave_quant_biased = floor(wave * 16384) / 16384;

we get a quantization error that is no longer centered around zero

wave_qnoise_biased = wave_quant_biased - wave;

Quantization Error with Bias by Time

which has a definite spike in the FFT in the DC bin

wave_qnoise_biased_freq = mag(fftshift(fft(wave_qnoise_biased)) / sqrt(1000));

Quantization Error with Bias by Frequency

This becomes a real problem with e.g. Quadrature Amplitude Modulation, where a DC offset in the demodulated signal corresponds to a sine wave at the demodulation frequency.

  • $\begingroup$ This is very great thank you for your help. this way i have explored the distortion related to the quantization. $\endgroup$
    – user3314
    Nov 20, 2012 at 6:37
  • $\begingroup$ Hi, this answer is not helpful, but it's hard to articulate why. I think you did not take enough time to explain things approachably. It feels like you're just showing off what you know rather than taking the time to teach. How can this be better next time? $\endgroup$
    – Andy Ray
    Apr 19, 2020 at 5:09

"Noise" in this context refers to anything unwanted added to the signal, it doesn't necessarily mean it is gaussian noise, white noise, or any random well-described process.

In the context of quantization, it is a purely algebraic argument. One can view quantization as the addition of an unwanted signal ("noise") equal to... the difference between the original signal and the quantized signal. Note that this quantification noise is not random, and is correlated with the input signal. For example, if a signal is periodic, the quantization noise introduced when quantizing it will be periodic too.

  • $\begingroup$ I think I understood how the quantization causes the error itself. What puzzles me is how it generates frequency. My understanding is: "Unwanted signal" means unwanted frequencies. Suppose I sample a pure sinusoidal signal. Then the quantization error introduces "overtones". I suppose the overtones originate from the "staircase" shape of the sampled signal. Is that correct? $\endgroup$ Jul 15, 2012 at 20:44
  • 1
    $\begingroup$ @FairDinkumThinkum: yes, if you distort a pure sine wave, you will get harmonic distortion, which produces new frequencies at multiples of your sine wave's frequency. en.wikipedia.org/wiki/Distortion#Harmonic_distortion $\endgroup$
    – endolith
    Jul 15, 2012 at 22:59
  • $\begingroup$ Is it accurate to say that the "noise" is just the added delta between the source signal and the output signal due to quantization? $\endgroup$
    – Andy Ray
    Apr 19, 2020 at 5:10
  • $\begingroup$ @AndyRay, basically yes. In some applications we're also interested in additional things, e.g. when we work with GPS signals which are very faint and need to be mathematically reconstructed, we need to know if the noise has any properties that would cause the algorithm to go wrong, e.g. a DC offset or subharmonics of the sampling frequency. $\endgroup$ Apr 19, 2020 at 9:58

To expand on what pichenettes said, consider if you have an audio signal that is being digitized by a D-to-A converter that only has a resolution of 0.01 volt. If, at some particular instant in time, the audio signal is at 7.3269 volts, that will be either rounded to 7.33 volts or truncated to 7.32 volts (depending on the design of the converter). In the first case you've added "noise" of 7.33-7.3269 volts, or 0.0031 volt. In the second case you've added "noise" of 7.32-7.3269 volts, or -0.0069 volt.

Of course, there is additional noise added due to the fact that the converter is most certainly not infinitely accurate, and probably has an accuracy on par with its precision.


Here is a more basic explanation to get the fundamental point across.

  1. Reach in your pocket and take out your iPhone.
  2. Open Health app -> Fitness Activity -> Steps walked (this is turned on by default).
  3. Write down how many steps you walked during each of the past ten days.

Round those numbers to the thousands and post them here. Now the other people here have to guess your original numbers based on what you posted.

Other people cannot reliably guess the exact number based on the rounded number you provided. That's data loss. And in this case (because you used rounding) that is called quantization error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.