M2_lectures_partB
M2_lectures_partB
potentials
resistance
Thus, despite we are going to focus our discussion on the electrocardiogram case, what we
will see can be extrapolated to other biopotential signals.
(source: http://www.ivline.info/2010/05/quick-guide-to-ecg.html)
BIS 2024-2025 M2.b: 7/48
BIS 2024-2025
M2.b: 8/48
(source: http://www.ivline.info/2010/05/quick-guide-to-ecg.html)
Going back to electronics…
Therefore, from an electrical point of view, for recording ECG what we need is to measure
the potential difference between two electrodes. And, indeed, you will find small battery-
powered ECG systems that only employ two electrodes. However, desktop ECG systems
powered from the mains require that at least three electrodes are connected to the patient,
why? Because of interferences from the mains. In the next slides, we will find out how this
interferences appear. (The chest strap
transmitter contains two
electrodes)
The hand-held ECG monitor by OMRON is an example of a Wireless EKG heart rate monitors are also examples
two-electrode biopotential system of two-electrode biopotential measurements
BIS 2024-2025 M2.b: 9/48
Let’s model first the case of a battery-powered system with very short wires:
Note that the two electrodes are simply modeled as resistors and that the human body
is also modeled with resistors.
BIS 2024-2025 M2.b: 10/48
The signal at the ECG recorder (V(+)-V(-)) looks very good
(original signal)
(signal at recorder
input)
Parasitic capacitances
now are significantly
larger (100)
we modify this to 2 pF
(As we will see in the next slides, the interference does not come directly from the mains, it comes from
the voltage that appears across the patient due to the mains.)
BIS 2024-2025 M2.b: 16/48
Such mismatching greatly increases if the ECG system is powered from the mains
because a new path is established to earth. Even including an isolation transformer the
interference will be very significant…
Common mode
voltage due to
mains coupling at +
patient
VD/2
VC
CPATIENT-EARTH
CISOLATION
M2.b: 20/48
And indeed, with an ideal differential amplifier it works perfectly:
BIS 2024-2025
Due to limited CMRR and limited input impedances, a real differential amplifier (an
instrumentation amplifier) won’t work so nicely:
BIS 2024-2025
It needs to be taken into account that the common mode voltage at the patient can be
transformed into differential voltage at the amplifier input due to impedance mismatches
(particularly at the electrodes). Let’s see a numerical example (exercise) that analyzes
both mechanisms of interference at the output of biopotential amplifier…
Exercise: Calculate the maximum power-line interference seen on the patients’ EEG due to common-
mode voltage at patient caused by the power-line displacement current through the patient (assume
tissue impedances are 0 ; as seen in the above drawings).
BIS 2024-2025
1. The first thing we need to compute is the
maximum common-voltage at the patient (VCM).
According to the circuit on the right this voltage will
be:
Rin + Rin −
VD = V
CM _ MAX − = ...
Rin + + REMIN Rin + + REMAX
VCM
10M 10M
... = 0.6mV − = 0.06 μV
10M + 0.5k 10M + 1.5k
Thus, this interference magnitude (0.06 μV) may be considered negligible if compared with the
magnitude of the signal (10 μV) which is only slightly attenuated by the voltage dividers.
BIS 2024-2025
2. In addition to the transformation from
common-mode voltage to differential voltage
at the input of the amplifier due to electrode
impedance mismatches, we will also have the
contribution of the limited CMRR of the
amplifier (80 dB). The ratio between the
differential gain (Gd) and the common-mode
gain (Gc) will be:
CMRR 80
GD
= 10 20
= 10 20
= 10 4 = 10000
GC
That is, the common voltage at the input (0.6 mV) will be attenuated 10000 times with respect to the
differential signal. Thus, the 0.6 mV of common voltage would be equivalent to a differential
interference signal of 0.06 μV at the input. Again this interference magnitude (0.06 μV) may be
considered negligible if compared with the magnitude of the signal (10 μV).
BIS 2024-2025
The common mode voltage at the patient can be minimized by “driving” the reference
electrode connected to the patient.
I0 0 (LSB)
I0
I2 1
I3 0
time
0 1 0 1 1 (MSB)
I4
(LSB) (MSB)
Binary representation: 11012 = 1×23 + 1×22 + 0×21 + 1×20 = 810+ 410 + 010 + 110 = 1310
To convert a number from decimal notation to binary notation divide repeatedly the number
by 2 and annotate the reminders in inverse order.
13/2 = 6 reminder 1,
6/2 = 3 reminder 0,
3/2 = 1 reminder 1,
1/2 = 0 reminder 1,
1310 = 11012
(Most scientific calculators allow conversions from decimal to binary and vice versa)
12ABCDEFh=000100101010101111001101111011112
= (0001 0010 1010 1011 1100 1101 1110 11112)
From “The Art of Electronics”, 3rd edition: “Hexadecimal representation is well suited to the
popular “byte” (8-bit) organization of computers, which are most often organized as 16,
32, or 64-bit computer “words”; a word is then 2, 4, or 8 bytes. So in hexadecimal, each
byte is 2 hex digits, a 16-bit word is 4 hex digits, etc. For example, the memory locations in
a microcontroller with 65,536 (“64K”) bytes of memory can be identified by a 2-byte
address, because 216=65,536; the lowest address in hex is 0000h (the trailing “h” means
hex), the highest address is FFFFh, the second half of memory begins at 8000h, and the
fourth quarter of memory begins at C000h.”
Nibble: term used sometimes to refer to a group of four bits (half of a byte).
Byte: group of 8 bits (an octet). Standards specify “B” (upper case) as the symbol for the
byte (as opposed to “b” lower case for the bit)
Word: group of bits of a fixed size. Nowadays it usually corresponds to 16 bits (2 bytes).
The terms “double word” or “dword” (4 bytes) and “quad word” or “qword” (8 bytes) are
also used. M2.b: 34/48
BIS 2024-2025
Character encoding
From “The Art of Electronics”, 3rd edition: “A byte sitting somewhere in computer memory
can represent an integer number, or part of a number. But it can also represent other
things: for example, an alphanumeric character (letter, number, or symbol) is commonly
represented as one byte. In the widely used ASCII representation, lowercase “a” is
represented as ASCII value 01100001 (61h), “b” is 62h, etc. Thus the word “nerd” could be
stored in a pair of 16-bit words whose hex values are 6E65h and 7264h”
Although it is highly inefficient, in some cases it may be interesting to store and transmit
the digits of the number as characters. For instance, instead of sending 1210 ( = 11002) we
would send the characters “1” and “2” which would correspond to 4910 and 5010
(001100012 and 001100102)
3 011
Example: -3+2=-1
2 010
101 (-310)
1 001 +010 ( 210)
0 000 111 (-110)
-1 111
-2 110
-3 101
-4 100
BIS 2024-2025 M2.b: 37/48
M2.17. Analog-to-digital converters
Stimulus
Vref #
Signal conditioning
vin
0.5 LSB
QUANTIZATION
ERROR
(due to limited -0.5 LSB
resolution)
According to the presented expressions, if the input voltage is 1.36 V then digital code will be:
V − Vrl N 13.6 − 0 16
D0 = int i 2 = int 2 = int 17825.792 = 17826
ru
V − V rl 5 − 0
Which expressed in the binary number system would be 0100 0101 1010 0010
and in hexadecimal would be 45A2
V −V 5−0
Vi ' = D0 ru N rl + Vrl = 17826 16 + 0 = 1.360015869140625 [V]
2 2
Note that this error is within the uncertainty range due to the limited resolution of
the ADC = ± (1/2)*(5/2^16)= ±38.1 μV
Since it is not otherwise indicated, we have to assume that the sensor has a linear transfer function of the type
S = a+b s
; where s is the stimulus (i.e. the temperature), S is the output (i.e. voltage), b is the sensitivity (10 mV/ºC)
and a is the zero (i.e. the offset). Then, since no offset is indicated, we have to assume a=0 V
Therefore, the maximum and minimum voltages given by the sensor will be
Vm ax = a + b sm ax = 0 + 0.01 V/º C 100 º C = 1 V
Vmin = a + b smin = 0 + 0.01 V/º C 0º C = 0 V
And this (0 to 1 V) will be the required input range for the ADC.
A change of 0.1ºC, which is the requested resolution for the system, will produce a voltage change of
2 2 0.001
N
log 2 (1000) N
log 10 1000 3
N N N 9.96
log10 2 0.30103
And since N has to be an integer then Nmin=10. In conclusion, it is required a 10 bit ADC with an input
range from 0 to 1 V.
BIS 2024-2025 M2.b: 43/48
Time sampling
Digital acquisition not only involves discrete (i.e. uncontinuous) amplitude values but also
discrete times.
Transistor gate
(a voltage activated switch)
Simple averaging
(a special case of FIR filtering)
Note that averaging filters have notches at regular intervals. These notches
can be put to good use in filtering out strong signals such as power-line interference.
(from http://www.ti.com/lit/ml/slap103/slap103.pdf)
The response of an exponential filter can easily be varied from weak filtering with a quick step response
(fast settling time) to strong filtering with a slow step response by varying the alpha coefficient.
This is a useful feature for many measurement systems. For example, in weigh scales, it is desirable to
obtain a reading right away when a weight is placed on the scale. As more samples are taken, however,
the weight can be determined more precisely by further averages. The exponential averager can be set to
a high alpha when the scale is first loaded, and over time the alpha can be decreased to obtain more
precise results.
(from http://www.ti.com/lit/ml/slap103/slap103.pdf)
Frequency spectrum of
a sampled signal
“If a function x(t) contains no frequencies higher than B Hz, it is completely determined by
giving its ordinates at a series of points spaced 1/(2B) seconds apart.” (Nyquist-Shannon Theorem)
But, when sampling very low frequency signals (B << FS), as it will be the case in most
measurement systems, is it necessary or convenient to include a anti-aliasing LPF filter before
the ADC?
Yes, otherwise, noise and interferences at frequencies FS and above will be overlapped with
the low frequency signal of interest.
BIS 2024-2025 M2.b: 48/48