Lez
Lez
In old physics experiments the data acquisition was matter of looking and noting
on paper, and data reduction was hand made by people particularly suited to
make calculations and thus called Computers. A typical data acquisition chain
in these old times was characterised by the following elements:
• Sensors: systems that excited by a certain form of energy, representing the
physical phenomenon to observe, give in exit a different form of energy
(e.g. light into electricity).
• Transducers: systems that convert (translate) a form of energy into an-
other (e.g. electrical into mechanical);
• Recorders: systems to translate the acquired signal in a series of numbers
or graphs that could be studied in a second moment. They could record
continuously or at discrete times and could be also humans with paper
and pencils.
• Computers: Humans that take the recorded data and elaborate them to
obtain an aggregate result.
When computers started to be electronic devices, the data acquisition chain
changed, but the elements remained essentially the same. Recorders and com-
puters became electronic devices, linked to one another and the data that en-
tered into the computing system had to be formatted in a way understandable
to computers, i.e. they had to be in digital form.
This new requirement to the data acquisition chain introduced a new ele-
ment: the Converters, i.e. electronic devices that convert a continuous-time,
continuous-value (Analogic) signal to discrete time, numerical (digital) data;
this is the Analog to Digital Converter (ADC). The inverse converter – the
Digital to Analog Converter (DAC) – is needed to get an electrical signal from
a numerical data stream, in order to realise controlled systems that, from the
acquired data, derive a signal that is used to take actions (actuate) on the sys-
tem itself. An axample of a mechanical controlled system is the damping of
a pendulum: a capacitive sensor detects the mass motion, the electrical signal
is converted in a numerical stream, a computer applies a numerical filter (e.g.
simply invert) to the input data stream and sends the computed error data
stream to the DAC that produces an electrical signal sent to an actuator that
exerts forces on the mass.
2 Sampling
As said in previous section, analogic signals have the characteristics to be con-
tinuous in time and value. The computer takes some time to elaborate input
signals and thus cannot follow the signal continuous evolution; it will, instead,
sample the signal value at discrete times. This operation is the signal sampling.
1
Figure 1: The operation of sampling and quantization: the continuous signal
is taken at discrete times and is coded by integer values. This introduces errors.
Moreover, the computer has a limited resolution given by the number of bits of
its word, thus it will not give the actual value of the signal at the time of sam-
pling, but only the nearest value representable with this word. This operation
is called Quantization. The information linked with the sampled and quantized
analogic signal is called digital signal. The digital signal is affected by errors by
the simple digitalization and quantization process. Let’s start from the error
introduced by the quantization process.
The transducer range Y s is the full range the values of the output signal can
assume from the minimum Ym to the maximum YM , Y s = YM − Ym . Given
a computer with a word of N bits, it can represent 2N numbers by this word,
thus, each bit will correspond to a value (called Least Significant Bit – LSB):
Ys
LSB = .
2N
This value, also called quantum, is the minimum difference that can be repre-
sented by the digital coding. All the values within a LSB will be coded by a
unique digital value Yd , thus the error introduced by the process of quantization
to the original signal is one half of the LSB:
LSB Ys
ǫq = = N +1 .
2 2
2
2.1 Spectral behaviour of sampled signals
Let’s denote the continuous signals as function of the continuous time f (t) while
the sampled signal as a function of the discrete time reperesented by the sample
number n F (n). Let us begin to examine the differences between the continuous
and the discrete version of the complex exponential function. For the continuous
f (t) = eiωt the larger is ω the larger is rate of oscillations and is periodic for any
value of ω. The discrete counterpart has a different behaviour, infact considering
the complex exponential with frequency (Ω0 + 2π):
or equivalently: eiΩN = 1, that is ΩN = 2kπ, i.e. eiΩn is not periodic for any
Ω, but only for Ω = 2πk/N .
The discrete-time sequence obtained by sampling a continuous complex ex-
ponential signal at equally spaced points in time is:
X[n] = eiωnT
3
Figure 2: The effect in frequency domain of sampling in time domain. The
Fourier transform of the signal to sample has a maximum frequency ωM , if the
sampling frequency ωs > 2ωM the replicas do not overlap
Theorem 1 Given a band-limited signal x(t) with X(ω) = 0 for each |ω| > ωM ,
then x(t) is uniquelly determined by its samples xp (nT ) if
ωs > 2ωM
4
where
ωs = 2π/T
is the sampling frequency.
5
Figure 4: The effect of sampling a sinusoidal function at a frequency lower
than the Nyquist frequency in the time domain.
6
can code a number from 0 to N-1, when this code is present at the same time
of a Enable (clock) signal, the output is the signal present on the corresponding
input channel. Thus at each clock pulse the output will be a different channel,
in a cyclic way. The reverse operation is accomplished by the Demultiplexer
(DEMUX).
The last element of the acquisition chain, nowadays always included in mod-
ern monolithic ADCs, is the Sample and Hold [Amplifier] (SHA). The purpose of
this circuit is to hold the analogue value steady for the time while the converter
or other following system performs some operation. In particular, one wants
that the signal do not change while the ADC is converting its value. The basic
circuit of the SHA, is shown in Fig. 6. It is essentially a unity gain amplifier in
the sample phase and a RC circuit with a long time constant in the hold phase.
When the switch is opened the capacitor discharges on the load resitance that
must be very high. The requirements on the capacitor in the sample and hold
Figure 6: The basic circuit for a Sample and Hold amplifier. When the switch
is closed it is esssentially a unity gain amplifier (emitter follower). When the
switch opens, the capacitor discharges with the RL C time constant, being RL
the load resistor. In 6b the integrator SHA is shown to overcome the problems
in the chioice of the capacitor.
phases are opposite since RC must be low in the sample phase and high in the
hold phase , for this reason other schemes are adopted, as e.g. the integrator
7
Figure 7: The data acquisition chain and its elements
Figure 8: The basic circuit for a Digital ro Analog Converter and the R-2R
scheme that uses only two kind of resistors.
8
Figure 9: The counter ADC
9
Figure 10: The Successive Approximation ADC
two states, high or low, depending whether the integrator output is positive
or negative. The comparator output is stored on the D-type flip-flop, which
is a one-bit static memory. This flip-flop is clocked at a very high frequency.
Then the flip-flop output is used to feedback the circuit thru a one-bit DAC.
This one-bit DAC will basically convert the 0 or 1 stored at the flip-flop into a
positive or negative reference voltage to be added to the input of the summing
integrator. So the summing integrator will sum the next sample with the result
of the previous sample (a positive or a negative voltage), aiming to maintain
zero at the integrator output. The result is that at the flip-flop output we will
have a series of zeros and ones that correspond the sampled data: the bitstream
average level represents the analog input signal average voltage.
Since the clock rate used at the flip-flop is very high, data is sampled many
times over, a technique known as oversampling. As we will see later, the higher
the clock, the higher the precision of the sigma-delta ADC. However, due to
oversampling, the quantization noise is thrown to the high frequencies of the
spectrum, and not spread all over the spectrum as it occurs with other designs.
This effect is called shaped noise. With all the noise concentrated in a specific
portion of the spectrum on a frequency range above the sampled data, it is quite
easy to construct a low pass filter to remove it, thus improving SNR.
The fastest (and most expensive) of all the ADCs is the flash ADC (Fig. 12.
10
It is composed a series of comparators each one comparing the input signal to
11
Figure 13: The quantization error parameters
q/2
1 q2
Z
2
ǫ = x2 dx = (7)
q −q/2 12
Encoding a sinusoidal signal (A/2)sin(ωt) with an n-bit ADC with a full scale
A, will give an error:
A2
2 q2 22n
ǫ = = (8)
12 12
The Signal to noise Ratio (SNR) due to quantization error will be:
A2
2 !
x 8
SN R = 10 log = 10 log = 6n + 1.8 dB (9)
ǫ2 A2
12·22 n
Calling n′ the effective number of bits of the n bits ADC that give the desired
SNR, we have:
SN R − 1.8
n′ = (10)
6
For example, a 12-bit ADC giving a SNR=70 dB, will behave as an ADC with:
70 − 1.8
= 11.37
6
effective bits.
12
If the frequency of the sampled signal f0 is lower than fs , after filtering the
error will be:
s
q 1 A 1 f0
√ √ = n√ (12)
12 f s 2 12 fs
thus the previous calculation for the SNR will give:
fs
SN R = 6n + 1.8 + 10 log = 6n′ + 1.8 dB (13)
f0
thus
fs
n′ = n + 1.67 log (14)
f0
hence it is possible to increase the resolution by increasing the sampling fre-
quency and filtering.
For example an 8-bit ADC becomes a 9-bit ADC with an over-sampling
factor of 4, but the 8-bit ADC must meet the linearity requirement of a 9-bit.
13