Principles of Biomedical Systems & Devices PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Lecture 11 Biopotential Amplifiers This Week in PBS&D PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Biopotential Amplifiers ª Op-amps and basic amplifier circuits ª Inverting vs. non-inverting amplifiers ª Three-op-amp differential amplifiers (instrumentation amplifiers) ª Comparators ª Integrators / Differentiators ª Active filters – Lowpass, highpass, bandpass filters ª Frequency response of amplifiers ª Other desired properties of biopotential amplifiers Operational Amplifiers PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 v0 = A( v2 − v1 ) A voltage at υ1, the inverting input, is greatly amplified and inverted to yield υo. A voltage at υ2, the noninverting input, is greatly amplified to yield an inphase output at υo. Ideal Operational Amplifiers PBS&D – Fall 2004 – Polikar υ1 υ2 http://engineering.rowan.edu/~polikar/CLASSES/ECE404 + A υ0 The two inputs are υ1 and υ 2. A differential voltage between them causes current flow through the differential resistance Rd. The differential voltage is multiplied by A, the gain of the op amp, to generate the output-voltage source. Any current flowing to the output terminal υ0 must pass through the output resistance Ro. Ideal Op-amps PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Assumptions: ª ª ª ª ª A = ∞ (infinite gain) υ0=0, when υ1 = υ 2 (no offset voltage) Rd = ∞ (input impedance is infinite) R0 = 0 (output impedance is zero) Bandwidth = ∞ (no frequency-response restrictions)  Two basic rules 1. When the op-amp is working in its linear range, the two input terminals are at the same voltage, that is υ1 = υ 2 (due to infinite gain) 2. No current flows into either input terminal of the op amp, that is i1 = i 2 = 0 (due to assumed infinite input impedance) Basic op-amp Circuits Inverting Amplifier PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 saturation i Rf υo 10 V i υi Ri Virtual ground − υo -10 V 10 V υi + Slope = -Rf / Ri -10 V Rf v0 =− vi Ri Basic op-amp Circuits Summing Amplifier PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Vo = - RF ( V1 / R1 + V2 / R2 + V3 / R3) = - ( V1 . RF / R1 + V2 . RF / R2 + V3 . RF / R3 ) Basic op-amp Circuits Non-inverting Amplifier PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 i Ri i Rf − υi - υo υo υi + Buffer υo + Non-inverting amplifier 10 V Gain =1, What good is a buffer? Slope = (Rf + Ri )/ Ri 10 V -10 V υi -10 V v0 R f + Ri = vi Ri What if Ri=0? Single Op-Amp Differential Amplifiers PBS&D – Fall 2004 – Polikar υ3 http://engineering.rowan.edu/~polikar/CLASSES/ECE404 vo ( v4 − v3 )R4 = R3 υ4 Common mode rejection ratio? Why is it important? If υ3= υ4 Î υ0=0 Common mode gain, Gc=0 If υ3≠υ4 Î υ0 α R4/R3 Differential mode gain, Gd= R4/R3 Gd CMRR = Gc Gc=?, Gd=? Three Op-Amp Differential Amplifiers PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  What is a potential problem with the single op-amp differential amp? i Ri i Rf • One way to increase the input resistance is too add a buffer to each input. - υ1 + i Ri i Rf - υ2 + • The input resistance can be too low for certain applications • But, while we are at it, we might as well get some amplification out of it too, so we can add the noninverting amplifier to each input. Then, not only we get high input impedance, but we can obtain gain as well. ÂHow about this one? (In terms of CMRR?) Three Op-Amp Differential Amplifiers PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Better solution: Gc = 1 2 R2 + R1 Gd = R1 Instrumentation Amplifier 9 High input impedance 9 High CMRR 9 Gain controllable Comparators PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 υo υi R1 With hysteresis (R3 > 0) 10 V − υref υo R1 + R3 -10 V 10 V - υref R2 -10 V υi Without hysteresis (R3 = 0) When R3 = 0, υo indicates whether (υi + υRef) is greater or less than 0 V. When R3 is larger, the comparator has hysteresis Would we want to have hysteresis in a comparator? Why / why not? Rectifiers PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Control gain, 1/x R xR (1-x)R D1 I-V Characteristic? υo D2 10 V − υi + -10 V R D4 − + 10 V D3 υo = υi υi x -10 V Full-wave precision rectifier. For υi > 0, the noninverting amplifier at the top is active, making υo > 0. For υi < 0, the inverting amplifier at the bottom is active, making υo > 0. Circuit gain may be adjusted with a single pot. Single Op-Amp Full Wave rectifier PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 υi Ri = 2 kΩ Rf = 1 kΩ v − o D RL = 3 kΩ + Integrators PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 t −1 1 v0 = vi dt + vic ∫ RC 0 V0 ( jω ) − Z f − 1 / j ωC = = Vi ( jω ) Zi R 1 1 =− =− jωRC jωτ Circuit gain decreases as frequency increases A three-mode integrator With S1 open and S2 closed, the dc circuit behaves as an inverting amplifier. Thus υo = υic and υo can be set to any desired initial conduction. With S1 closed and S2 open, the circuit integrates. With both switches open, the circuit holds υo constant, making possible a leisurely readout. Differentiators PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 to prevent oscillation v0 = − RC dvi dt V0 ( jω ) Z f R = =− Vi ( jω ) Z i 1 / jωC = − jωRC = − jωτ Active Filters Lowpass Filter PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Log scale Cf υi Ri − Rf V0 (jω) Vi (jω) 1.0 0.707 τSmall υo τLarge + ωSmall (R f / jω C f ) (1 j ω C f ) + R f −Rf V 0 ( jω ) − Z f = =− = Vi ( jω ) Zi Ri (1 + j ω R f C f ) R i What is τ (time constant) ? ωlarge Log scale ω ω >> 1/τ Æ integrator ω << 1/τ Æ inv. amp Active Filters Highpass Filter PBS&D – Fall 2004 – Polikar Ci υi http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Ri Rf − υo + Rf V0 ( jω ) Z f = = Vi ( jω ) Z i (1 jωCi ) + Ri Active Filters Bandpass Filter PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Cf Ci υi Ri Rf − υo + Characteristic Frequency Responses PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 HP 100 I Bode plot (gain versus frequency) for various filters. Integrator (I); differentiator (D); low pass (LP), 1, 2, 3 section (pole); high pass (HP);bandpass (BP). Corner frequencies fc for high-pass, lowpass, and bandpass filters. BP 10 LP 1 D 0.1 1 3 10 100 fc fc Frequency, Hz 2 1 1k PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Read on your own from your text and references for project Frequently Observed Problems (FOP) PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Frequency distortion ª It is important to know the expected bandwidths of the signals being measured. ª Is 1~150 Hz flat frequency spectrum adequate for ECG measurements/ ª How about EMG? ª How about EEG?  Filters must be designed very carefully to avoid frequency distortion  What effects would frequency distortion have on the signal? Bandwidth Requirements PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Measurement Range Frequency, Hz Method Blood flow 1 to 300 mL/s 0 to 20 Electromagnetic or ultrasonic Blood pressure 0 to 400 mmHg 0 to 50 Catheter, Cuff or strain gage Cardiac output 4 to 25 L/min 0 to 20 Fick, dye dilution Electrocardiography 0.5 to 4 mV 0.05 to 150 Skin electrodes Electroencephalography 5 to 300 µ V 0.5 to 150 Scalp electrodes Electromyography 0.1 to 5 mV 0 to 10000 Needle electrodes Electroretinography 0 to 900 µ V 0 to 50 Contact lens electrodes pH 3 to 13 pH units 0 to 1 pH electrode pCO2 40 to 100 mmHg 0 to 2 pCO2 electrode pO2 30 to 100 mmHg 0 to 2 pO2 electrode Pneumotachography 0 to 600 L/min 0 to 40 Pneumotachometer Respiratory rate 2 to 50 breaths/min 0.1 to 10 Impedance Temperature 32 to 40 °C 0 to 0.1 Thermistor Saturation / Cutoff Distortion PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Due to non-ideal nature of op-amps, as well as the finite CMRR, an offset voltage is typically observed at the output even when the two inputs are at the same potential  High off-set voltages, as well as electrode displacement or improperly adjusted amplifiers can cause saturation / cutoff distortion, where high amplitude signals are truncated / chopped off.  This can be prevented by using a “nulling pot” to set the vo to zero, when v1=v2. Ground Loops PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Patients who are hooked to ECGs at clinical environments are often also connected to other devices  Each device is typically grounded through the ground terminal of the power outlet, however, grounds at different outlets may be at slightly different grounds Î ground loops!  Ground loops cause a non-zero ground current to flow between the devices through the patient: ª Common mode signal interference: If CMRR is not high enough, this can distort the actual signal being measured ª Unsafe: In case of a hazard, this current can – potentially – cause electrocution Interference from Power Lines PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  The power lines that provide the power to the ECG as well as to a multitude of other devices run throughout the room and cause significant interference at 60Hz.  Other devices / signals may also cause interference 60 Hz EMG Electric Field Coupling PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Power line C2 Z1 Z2 120 V C1 Id1 Id2 C3 does not cause interference since its current flows through the ECG on to its ground However, current C1 and C2flow through the skin – electrode impedances Z1 and Z2 (not through the ECG) to ground ZG C3 A Body resistance of 500Ω is negligible compared to others B Solution: Shield the leads, lower Z1 and Z2 Electrocardiograph G ZG Id1+ Id2 v A − v B = id 1Z1 − id 2 Z 2 ≈ id 1 (Z1 − Z 2 ) ≈ 6nA ⋅ 20kΩ = 120µV But wait …there is more…! PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Power line 120 V vcm = idb Z G = (0.2µA)(50kΩ) = 10mV Cb Displacement current idb flowing through the body Z1 υcm In poor electrical environments, idb>1µA Æ vcm>50mV This is a common mode signal. Not a problem for perfect amplifiers, but in practice, no amplifier has perfect CMRR. This causes the voltage difference Electrocardiograph A υcm Zin B Z2 Zin υcm Z − Z1 v A − v B = vcm 2 Z in 20kΩ ≈ 10mV = 40µV 5MΩ G ZG idb Noticeable on an ECG, and unacceptable on EEG ! ÆNeed to reduce the difference on skin-electrode impedance, or just the impedances themselves, and increasing amplifier input impedance. Magnetic Interference PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Faraday’s lawÆ Voltage is induced due to changing magnetic field created by the power lines, fluorescent lights, other devices, (esp. electrosurgery, diathermy) etc. V α B, A. It can be minimized by i. Reducing B by shielding | | ii. Keep ECG/leads away from magnetic sources (almost impossible) iii. Reducing the effective area of the loop. Magnetic-field pickup by the elctrocardiograph (a) Lead wires for lead I make a closed loop (shaded area) when patient and electrocardiograph are considered in the circuit. The change in magnetic field passing through this area induces a current in the loop. (b) This effect can be minimized by twisting the lead wires together and keeping them close to the body in order to subtend a much smaller area. Transient Protection PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Electric devices, even in normal and intended use may also damage other devices. Particularly true with the electrosurgical units that apply very high voltages (300 ~ 9000 V, @500kHz ~2MHz, w/100 ~750W)  If the ground connection to these units are faulty, and/or if higher then normal output resistance is present, they may elevate patients’ potential significantly over the ground. Even at very short intervals, this may be adequate to fry an ECG machine, or at a minimum cause transient effects.  How to make sure that high voltages are not applied to other devices, such as ECGs, when they are present? Transient Protection PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404 Midterm Design Assignment Due Nov 8 PBS&D – Fall 2004 – Polikar http://engineering.rowan.edu/~polikar/CLASSES/ECE404  Design and build an amplifier specifically for ECG signals. This is an open ended design lab assignment. You get to choose all specifications, but you must make sure that the signals you get are amplified without loss of any fidelity. You will need to experiment with a number of different (active) filter alternatives to make sure that you maximize the SNR. The order of the filter, the gain, CMRR, etc. are all parameters that you need to determine.  You will receive the signals from a simulator, therefore you need not be too concerned about isolating the source, however, you have to make sure that you build a high input impedance amplifier. Alternatively, use an isolated amplifier and try on yourself!