[Edit answer moved from OP edit to "Answers" as per comment suggestion]
I'm trying to create a simple model of a signal chain (image sensor) that includes an ADC but I'm failing to observe quantization noise. I'm afraid I'm missing big points about quantization noise. [Will assume Matlab for pseudo code]
Let's assume that the input signal has a range between 0-1 Volts and the ADC has N bits with LSB=1/2^N
(eg 8 or 10).
My input signal average is centered in the range and let's assume that the standard deviation is a certain percentage of the ADC LSB (alpha):
I=0.5+alpha*LSB*randn(10000,1)
I'm modeling the ADC as a quantizer like so:
Iq=round(I/LSB)
I evaluate the noise of the quantized image as
Iq_std_meas = std(Iq)
Case 1)
If alpha>>0.5 then the signal swing is big compared to the LSB. I'm expecting to be able to model the output noise as Iq_std_model = alpha+1/sqrt(12)
but it seems that a better model is Iq_std_model = alpha
since the quantization error becomes insignificant.
Case 2)
If alpha<<0.5 I'm expecting to be able to model the output noise as such: Iq_std_model = 1/sqrt(12)
but obviously Iq_std_meas tends to 0 the lower alpha becomes.
Note that for any value of alpha I can observe quantization noise as 1/sqrt(12) by just taking: std(I-Iq)
It seems I can't measure the final noise as Iq_std_meas = std(Iq)
.
What is the fundamental point that I'm missing?
round()
instead offloor()
) with variance of $\frac{\Delta^2}{12}$ and it's bandlimited (to the Nyquist frequency) white. Now, for most modeling purposes (such as noise shaping or something), it probably wouldn't hurt to replace the uniform p.d.f. with gaussian p.d.f. having the same mean and variance and spectrum (uncorrelated samples). If your signal swing is large, you can get away with it. $\endgroup$