Quantization is the process of turning a [[Function]] $f$ from having a [[Continuous Function|Continuous]] [[Image]] to a [[Discrete]] [[Image]]. >[!question] > Use $B$-bit [[Integer|integers]] on the [[Image|image]] $y$, then $-2^{B-1} \leq y\leq_{2}^{B-1}-1$. What is the 'average quantization error'? What is the "signal to noise" ratio? > > Because $y$ is conformed to be an integer, the error must be $0\leq \epsilon\leq \frac{1}{2}$. > > Typically we use the [[Root Mean Squared]]. > $\huge \begin{align} > \op{RMS} = \sqrt{ \frac{1}{N} \sum_{i=1}^{N} \epsilon(x_{i})^{2}} > \end{align} $ > > Assuming $\epsilon$ is [[Uniform Distribution|uniformly distributed]] in the range $[-2^{B-1},2^{B-1}-1]$. > > $\huge \begin{align} > \mathrm{RMS}(f) &= \sqrt{ \frac{1}{\frac{1}{2}} \int_{0}^{\frac{1}{2}}x^{2}\mathrm{d}x }\\ > &= \frac{\sqrt{ 3 }}{6} > \end{align} $ > > The signal to noise ratio would be: > $\huge \mathrm{SNR} = \frac{\max_{x} |f(x)| }{\mathrm{RMS}(f)} = \frac{2^{B-1}}{ > \frac{\sqrt{ 3 }}{6} > } = 2^{B-1}2\sqrt{ 3 } = > \boxed{2^{B}\sqrt{ 3 }} $ >