◄Previous: 3.3 Sampling a continuous-time signal

# 3.4 Quantisation of a signal

When a continuous-time signal is sampled, the amplitude of each sampled point undergoes quantisation which means that it is forced to have only certain discrete values. The amplitude of each sample is represented by a digital binary code, and the word length of the code will be a fixed number of digital bits. Representing the amplitude of the samples in this way means the value is represented by a binary number, so it is truncated or quantised to its closest binary equivalent.

A 1-bit binary number can represent two levels because it can only take a value of 0 or a value of 1. A 2-bit binary number represents four levels, where each level takes one of the values 00, 01, 10 or 11. Figure 17 shows a discrete-time signal whose values are limited to a 3-bit binary number, which represents eight possible combinations of 0s and 1s – each possible combination is shown on the -axis of the figure. Note that each sampled, digitised signal is a binary representation of the analogue value, so in conversion to these binary representations some rounding of the signal values has occurred: some sampled values are just above and some just below the continuous-time signal.

Figure 17 Sampled and quantised signal

Any binary word will always give an even number of quantisation levels. In general, a binary word with bits gives quantisation levels – hence a 3-bit word gives 8 levels, a 4-bit word gives 16 levels, a 5-bit word gives 32 levels, etc.

Figure 18 shows a sine wave along with a set of quantisation levels. Here the 0 or midpoint of the sine wave occurs at a midpoint between the 011 and 100 levels. The gaps between the quantisation levels are called the quantisation intervals. Sometimes a quantisation level is assigned to the 0 or midpoint, which means that on one side of the 0 there is one more level than on the other side.

Figure 18 A sine wave and a set of quantisation levels

The larger the quantisation intervals, the more error will be introduced into the sampled signal. The quantisation error for a sample is the difference between the value of the input signal and the resultant quantised signal, with the maximum quantisation error being half the quantisation interval. Quantisation errors can be reduced by increasing the number of levels; however, as the number of levels increases, so does the number of bits needed to represent each sample.

## Activity 7

Allow about 15 minutes

An electrocardiogram (ECG) signal contains useful information in frequencies up to 400 Hz.

1. At what rate must the signal be sampled to ensure that no information is lost in sampling?

2. If a 3-bit quantiser is used to represent the signal, how many bits of data are generated per second if the sampling rate is set to 1000 Hz?

3. If the signal range from the ECG extends from +7 V to −7 V, where 7 V equates to the highest quantisation level and −7 V to the lowest quantisation level, what is the quantisation interval and what is the maximum quantisation error in the system?

4. If the quantiser is changed to a 4-bit system, what happens to the maximum quantisation error?

### Answer

1. The signal must be sampled at greater than twice the maximum frequency of the signal, so the minimum sampling rate is 800 Hz.

2. With a 3-bit quantiser each sample point uses three bits of data, so the number of bits of data generated is 3 × 1000 = 3000 bits per second.

3. With a 3-bit quantiser there are a total of eight levels and seven quantisation intervals in the system. If the voltage range covers 14 V, then each quantisation interval is 2 V. The maximum quantisation error is half this quantisation interval, or 1 V.

4. A 4-bit system has 16 quantisation levels and 15 quantisation intervals, so each quantisation interval is

This reduces the maximum quantisation error to

In the next section you will return to digital filtering and how they work in the time domain.

◄Contents►Next: 3.5 Digital filtering in the time domain

OpenLearn - Electronic applications
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.