Estimate standard deviation of quantization noise of complex-valued signal
returns an estimate of the quantization noise standard deviation of a complex-valued signal
with a quantization level q=2-precisionBits, where
noiseStandardDeviation = fixed.complexQuantizationNoiseStandardDeviation(
precisionBits is the required number of bits
Estimate Standard Deviation of Quantization Noise of Complex-Valued Signal
Quantizing a complex signal to bits of precision can be modeled as a linear system that adds normally distributed noise with a standard deviation of [1,2].
Compute the theoretical quantization noise standard deviation with bits of precision using the
p = 14; theoreticalQuantizationNoiseStandardDeviation = fixed.complexQuantizationNoiseStandardDeviation(p);
The returned value is .
Create a complex signal with samples.
rng('default'); n = 1e6; x = complex(rand(1,n),rand(1,n));
Quantize the signal with bits of precision.
wordLength = 16; x_quantized = quantizenumeric(x,1,wordLength,p);
Compute the quantization noise by taking the difference between the quantized signal and the original signal.
quantizationNoise = x_quantized - x;
Compute the measured quantization noise standard deviation.
measuredQuantizationNoiseStandardDeviation = std(quantizationNoise)
measuredQuantizationNoiseStandardDeviation = 2.4902e-05
Compare the actual quantization noise standard deviation to the theoretical and see that they are close for large values of .
theoreticalQuantizationNoiseStandardDeviation = 2.4917e-05
Bernard Widrow. “A Study of Rough Amplitude Quantization by Means of Nyquist Sampling Theory”. In: IRE Transactions on Circuit Theory 3.4 (Dec. 1956), pp. 266–276.
Bernard Widrow and István Kollár. Quantization Noise – Roundoff Error in Digital Computation, Signal Processing, Control, and Communications. Cambridge, UK: Cambridge University Press, 2008.
precisionBits — Required number of bits of precision
positive integer-valued scalar
Required number of bits of precision, specified as a positive integer-valued scalar.
noiseStandardDeviation — Noise standard deviation
Noise standard deviation, returned as a scalar.
fixed.complexQuantizationNoiseStandardDeviation is used in these
The variance of a complex-valued error sequence e(k) with quantization level q=2-precisionBits  is
The standard deviation of a real error sequence e(k) is
 Widrow, Bernard. "A Study of Rough Amplitude Quantization by Means of Nyquist Sampling Theory." IRE Transactions on Circuit Theory 3, no. 4 (December 1956): 266-276.
 Widrow, Bernard, and Kollár, István. Quantization Noise – Roundoff Error in Digital Computation, Signal Processing, Control, and Communications. Cambridge, UK: Cambridge University Press, 2008.
Introduced in R2021b