II. From analogue to digital:



1. Sampling

The aim of DSP is to manipulate the information under its digital form. Then we need to convert the analogue signal to a digital signal. We say that the signal must be sampled, i.e. taking the instantaneous value of the signal at a particular moment. The samples can be taken at regular intervals.

What sampling frequency should we use? Let's say that the Nyquist theorem can be applied. This theorem states that the sampling frequency must be greater than two times the maximum frequency component of the signal (fmax.). The sampling frequency is called the Nyquist frequency.
Sampling the signal at a higher frequency would raise up the quality of the information, but this also means more to process.
Example: the information on a CD is sampled at 44100 Hz, we can understand that the maximum frequency is 22050 Hz, which is at the limit of the human ear perception.

If the sample is sampled under the Nyquist frequency, then there is a loss of information and the reformed signal is not the same as the original one.

We need as well to eliminate all the high frequencies of a signal above the Nyquist frequency, in order to reconstruct properly the signal. An anti-alias filter is added to remove the components of the signal above the Nyquist frequency.

Example of a sine signal:





2. ADC and DAC

The analogue signal is converted from a real world signal to a voltage, to binary numerical values. The base 2 is generally used.

An ADC or Analogue to Digital Converter is a device that can convert a voltage to a binary number. The number of digital samples converted per second is defined by the sampling rate of the converter. 8 bit is a common sampling rate.
An anti-alias filter is necessary before converting the signal.

A DAC or Digital to Analogue Converter is a device that can convert binary numbers to voltage, according to its specific input-output characteristics.

A reconstitution filter is required after a DAC, to remove the high frequencies present in the signal.

Remark: The two filters cited above are analogue devices.

Resume of a signal processing:





3. Quantisation and error of quantisation


The quantisation is the approximation of the value of each signal to a multiple integer of an elementary quantity q.

The signal, after the ADC, is a digital signal. The signal has been quantisised, i.e. each value of the signal at an instant t is interpreted as a level N*q, N being integer.

Example:
An ADC has a resolution of 12 bits, or 212 = 4096 levels. If the input of the signal has a range between [-5V. ; +5V.] then a "step" or level is: 10V. / 4096 = 2.44mV.

Problem: for each value, at the time of sampling tN, the quantisation error will be half of a level q. The output signal will not be exactly the same as the input, because each value of the input has been quantisized, i.e. approximated to N*q, implementing a quantisation error or noise.

Remark: the quantisation error can be calculated:

QN = -6.02*N - 4.77 (dB.), with N the number of bits.