moerjielovecookie

Sawen_Blog

一个普通工科牲的博客网站
x
github
follow
email

Limited Word Length Effect

The essence of digital signal processing is numerical computation. During the computation process, coefficients, inputs, outputs, etc., in the system must be stored in finite-length storage units in binary form, which means the precision of finite-length numbers is limited. Errors may occur in specific implementations. The factors causing errors in digital systems due to finite word length are mainly the following three:

  1. Quantization effects produced when the AD converter converts the analog input signal into a set of discrete levels.
  2. Quantization effects produced when coefficients are represented by finite-length binary numbers.
  3. Finite word length effects caused by truncation operations to limit word length and compression of signal levels to prevent overflow.

1 Finite Word Length Effect in AD Conversion#

AD converters can be divided into two parts: sampling and quantization. Sampling converts continuous analog signals into discrete signals, while quantization represents each sampled value with a finite word length. Its statistically equivalent structure is shown in the figure:
image
The quantized value can be expressed as the sum of the exact sampled value and the quantization error, that is,

x^(n)=Q[x(n)]=x(n)+e(n)\hat{x}(n)=Q[x(n)]=x(n)+e(n)

This model is based on the following assumptions:

  • $e(n)$ is a stationary random sampling sequence
  • $e(n)$ has uniform distribution characteristics
  • $e(n)$ has a white noise process
  • $e(n)$ is uncorrelated with $x(n)$
    Since $e(n)$ has a uniform distribution, the probability distributions of rounding errors, two's complement truncation, and sign-magnitude truncation are shown as follows:
    image
  • For rounding, the mean is 0, and the variance is $\frac{\delta^2}{2}$
  • For two's complement truncation, the mean is $-\frac{\delta}{2}$, and the variance is $\frac{\delta^2}{12}$
  • For sign-magnitude truncation, the mean is 0, and the variance is $\frac{\delta^2}{3}$
    The expression for quantization signal-to-noise ratio is
SNRAD=10lg(δx2δe2)=10lg(12×22Lδx2)=6.02B+10.79+10lg(δx2)SNR_{AD}=10\lg(\frac{\delta^2_x}{\delta_e^2})=10\lg(12\times2^{2L}\delta_x^2)\\ =6.02B+10.79+10\lg(\delta^2_x)

It can be concluded that after rounding, for each additional bit in word length, the SNR increases by approximately 6dB.

2 Finite Word Length Effect in System Computation#

For binary operations, the addition of fixed-point numbers does not change the word length but may cause data overflow. The multiplication of fixed-point numbers has a word length effect because multiplying two fixed-point numbers of B bits requires 2B bits of data to retain all significant bits, and truncation or rounding of data will inevitably introduce word length effects.
If the word length is increased during computation to ensure that truncation and rounding do not occur, resource consumption increases. This can be done in systems without feedback. However, in systems with feedback networks, such as digital filters, each closed-loop computation increases the word length, leading to a growing demand for resources as the iterative computations proceed.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.