We soon realize that digital devices can only deal with integers no matter how many

bits we use inside each memory cell.

And so we need to map the numeric range that discrete time samples live on or

to a finite set of values.

In so doing there is an irreversible loss of information because we're

chopping these amplitudes according to the resolution that our system allows for.

If we were to represent the situation graphically we have a sequence of discrete

time samples here that belong say, to the set of complex numbers.

These samples go through a quantizer, and the sequence of quantized samples come out

where each quantized sample now belongs to the set of integers.

We model input as a stochastic process.

And to study the effects of the system, we have to consider several factors.

How many bits per sample this quantizer will allocate?

What is the storage scheme used to represent the quantize samples?

For instance is it fixed point or floating point, and

what are the properties of the input as a stochastic process?

What is its range and what is its probability distribution?

The simplest quantizer is the Scalar quantizer.

In this quantizer, each sample is encoded individually.

So we don't take into account, relationship between neighboring samples.

Each sample is quantized independently, so there is no memory of

previous quantization operations, and each sample is encoded using R bits.

So the rate here is R bits per sample.

Let's see what happens when we Scalar quantize an input.

Assume we know that each input sample is strictly between A and B.

Each sample is quantized over 2 to the R possible values, because we are using R

bits per sample and this defines 2 to the R intervals over the range A to B.

Each interval will be associated to a quantization value.

Which means that whenever the sample, say, falls into this interval here,

it will be replaced by this representative value for

the interval and similarly for the other intervals.

So let's look at an example for R = 2.

The range A to B, would be divided into four intervals, and

these are the boundaries of each interval.

We would associate a representative point to each interval,

and we would encode each interval using two bits, so the sequence zero,

zero would be associated to the first interval, and so on and so forth.

In other words, the quantized values would be one of these four possible values.

And internally,

the quantizer would know how to associate this binary value to this real value.

The two natural questions at this point are, what are the optimal

interval boundaries IFK and what are the optimal quantization values for each

interval [INAUDIBLE] to find an answer, let's consider the quantization error.

So this is defined as difference between the quantized value,

namely the representative value for each interval, minus the real value.

We model the input as a stochastic process, as we said in the beginning, and

we model the error as a white noise sequence.

In other words, we assume the samples are uncorrelated.

And we assume that all error samples have the same distribution.

These are rather drastic assumptions, but as a first approximation,

they will give us a good feeling for the effects of a quantizer.

In order to proceed further,

we need the statistical description of the input samples.

Let's also make some assumptions on the general structure of the quantizer.

And let's consider the simple, but very common case of uniform quantization.

The range in this case is split into 2 to the R equal intervals of width delta,

which is equal to B- A, the range of the input samples.

Divided by 2 to the R,

the number of levels afforded to by a rate of R beats percent.

So in the case of R equal to 2, as before,

our range would be split into four equal width intervals.

The Mean Square Quantization Error is the variance of the the error signal,

namely the expectation of the difference between the quantized samples and

the original samples.