Go to CMC Home
Course Index Go to the previous lecture

BM661 - Module 4: Discrete-time signals and systems

Lecture 4A: Digitization of signals - Sampling and Quantization

Signals in the real world are in general continuous functions of time, which means that they have some value for every instant of time. In order to process signals in a digital computer they need to be converted into discrete time signals which are in the form of a sequence of numbers.

Thus discrete-time signals have their value defined only at discrete points in time. A continuous-time signal (or analogue signal) can be converted into a discrete-time signal (digital signal) using an analogue-to-digital converter (called A/D converter or ADC).

An analogue-to-digital converter is an electronic circuit that takes a continuous-time signal and delivers a sequence of numbers to a computer. When a signal x(t) is digitized it is denoted by, x[n] where 'n' takes integer values corresponding to the sample time number. The sampling interval is not explicitly indicated here.

Analogue-to-Digital Conversion

At first glance, it seems that the greater the sampling rate and the greater the number of bits used, the better is the analogue-to-digital conversion. However, it is important to ask what is the smallest sampling rate that is required and what is the minimum number of bits that is required for the signal of interest. These minimum values are important because, the smaller the number of data, the smaller will be the required storage space (memory and disk space) and faster will be the calculations that can be performed.

For the sampling rate, there is a very elegant mathematical criterion that is available. This is stated in the sampling theorem.

The Sampling Theorem:

When digitizing a continuous-time signal, it must be sampled at a frequency greater than twice its highest frequency component. This minimum sampling frequency is called the Nyquist sampling rate. The discrete signal thus formed by sampling a signal above its Nyquist sampling rate can be used to completely reconstruct the original analogue continuous-time signal.

Reconstruction

When we say that it is adequate to sample a signal at Fs Hz and use Q bits for quantization, we mean that by using these values for the A/D, we can recover the original signal from the digital version with a reasonable amount of accuracy.


This brings us to the question of how do we reconstruct a continuous time signal from its digitized version.

The conversion of a continuous time signal, x(t), into a discrete-time signal, x[n], processing in a digital computer and then reconstructing an analogue signal, y(t), is shown schematically in the figure below:

Aliasing

If a signal is sampled at a rate less than its Nyquist rate, the signal will be incorrectly represented. If we try to reconstruct the continuous-time signal from such an undersampled signal, the original signal will not be obtained. This phenomenon where a different signal is obtained from the samples of an undersampled signal is called aliasing.


The above concepts are illustrated in the following interactive example.

There are three panels. The top panel (gray grid) shows a simulated continuous time signal, the middle panel (green grid) shows the signal sampled and quantized with selected parameters, and the third panel (yellow grid) shows a reconstructed signal using one of the above mentioned three methods.

The grid shows the sampling time (vertical lines) and the quantization values (horizontal lines). The value of the continuous time signal is only noted where it intersects the vertical lines - the sample points. When the continuous time signal falls between two quantization levels the lower boundary is taken as the digitized value. For 2 bits of quantization, the digital values possible are: 0, 1, 2, 3. Thus, if the continuous-time signal has amplitude in the bottom quarter of the full range, the digital value = 0, if it is between 0.25 and 0.5, the digital value =1, etc.

Use sinusoids to understand the basic ideas of sampling and quantization. Then use the ECG and aortic pressure waveforms to see how they work with real signals.

Note: When changing the sampling rate or quantization, wait for some time for the new values to take effect.

Interactive example: Sampling and Quantization

Try the following:

Go to 
the next lecture

© Suresh Devasahayam