# Signal-to-quantization-noise ratio

Signal-to-quantization-noise ratio (SQNR or SNqR) is widely used quality measure in analysing digitizing schemes such as pulse-code modulation (PCM). The SQNR reflects the relationship between the maximum nominal signal strength and the quantization error (also known as quantization noise) introduced in the analog-to-digital conversion.

The SQNR formula is derived from the general signal-to-noise ratio (SNR) formula:

$\mathrm {SNR} ={\frac {3\times 2^{2n}}{1+4P_{e}\times (2^{2n}-1)}}{\frac {m_{m}(t)^{2}}{m_{p}(t)^{2}}}$ where:

$P_{e}$ is the probability of received bit error
$m_{p}(t)$ is the peak message signal level
$m_{m}(t)$ is the mean message signal level

As SQNR applies to quantized signals, the formulae for SQNR refer to discrete-time digital signals. Instead of $m(t)$ , the digitized signal $x(n)$ will be used. For $N$ quantization steps, each sample, $x$ requires $\nu =\log _{2}N$ bits. The probability distribution function (pdf) representing the distribution of values in $x$ and can be denoted as $f(x)$ . The maximum magnitude value of any $x$ is denoted by $x_{max}$ .

As SQNR, like SNR, is a ratio of signal power to some noise power, it can be calculated as:

$\mathrm {SQNR} ={\frac {P_{signal}}{P_{noise}}}={\frac {E[x^{2}]}{E[{\tilde {x}}^{2}]}}$ The signal power is:

${\overline {x^{2}}}=E[x^{2}]=P_{x^{\nu }}=\int _{}^{}x^{2}f(x)dx$ The quantization noise power can be expressed as:

$E[{\tilde {x}}^{2}]={\frac {x_{max}^{2}}{3\times 4^{\nu }}}$ Giving:

$\mathrm {SQNR} ={\frac {3\times 4^{\nu }\times {\overline {x^{2}}}}{x_{max}^{2}}}$ When the SQNR is desired in terms of decibels (dB), a useful approximation to SQNR is:

$\mathrm {SQNR} |_{dB}=P_{x^{\nu }}+6.02\nu +4.77$ where $\nu$ is the number of bits in a quantized sample, and $P_{x^{\nu }}$ is the signal power calculated above. Note that for each bit added to a sample, the SQNR goes up by approximately 6dB ($20\times log_{10}(2)$ ).