Webster Chapter 03

Embed Size (px)

Citation preview

AMPLIFIERS AND SICNALPROCESSINCJohnG.

Webster

Most bioelectric signals are small and require amplification. Ampliflers are also used for interfacing sensors that sense body motions, temperature, and chemical concentrations. In addition to simple amplification, the amplifier may also modify the signal to produce frequency flltering or nonlinear effects. This chapter emphasizes he operational amplifier (op amp), which has revolutionized electronic circuit design. Most circuit design was formely performed with discrete components, requiring laborious calculations, many components, and large expense. Now a2}-cenop amp, a few resistors, and knowledge of Ohm's law are all that is needed.

3.1

IDEAL OP AMPS

An op amp is a high-gain dc differential amplifier. It is normally used in circuitsthat have characteristics determined by external negative-feedback networks. The best way to approach the design of a circuit that uses op amps is first to assume that the op amp is ideal. After the initial design, the circuit is checked to determine whether the nonideal characteristics of the op amp are important. If they are not, the design is complete; if they are, another design check is made, which may require additional components.

IDEAL CHARACTERISTICSFigure 3.1 shows the equivalent circuit for a nonideal op amp. It is a dc differential amplifier, which means that any differential voltage, ua : (u2 - u1), is multiplied

by the very high gain A to produce the output voltage uo' To simplify calculations, we assume the following characteristics for an ideal op amp:

1. A: x (gain is infinity) 2. uo : 0, when t1 : az (no offset voltage)91

92

3 AMPLIFIERS AND SIONAL PROCESSINC

5.1 Op-amp equivalent circuit The two inputs re e and u2. A differential voltage between them causes current flow through the differential resistance Ra. The differential voltage is multiplied by,4, the gain of the op amp, to generate the output-voltage source. Any current flowing to the output terminal oo must pass through the output resistance Ro.Figure

3. 4. 5.

R6 Ro

: m (input impedance is inflnity) :0 (output impedance is zero)oo

Bandwidth =

(no frequency-response limitations) and no phase shift

Later in the chapter we shall examine the effect on the circuit of characteristics that are not ideal. Figure 3.2 shows the op-amp circuit symbol, which includes two differential input terminals and one output terminal. All these voltages are measured with respect to the ground shown. Power supplies, usually +15 V, must be connected to terminals indicated on the manufacturer's specification sheet (Jung, 1986; Horowitz and Hill, 1989).

TWO BASIC RULESThroughout this chapter we shall use two basic rules (or input terminal restrictions) that are very helpful in designing op-amp circuits.RULE

1

when the op-amp output is in its linear range, the two input terminals are at lhe same voltage.

This is true because if the two input terminals were not at the same voltage, the differential input voltage would be multiptied by the infinite gain to yield an innite output voltage. This is absurd; most op amps use a power supply of *15 V, so uo is restricted to this range. Actually the op-amp specifications guarantee a

HFigure

!

:

Op-amp circuit symbol A voltage at ,i.r1, the inverting input, is greatly amplified and inverted to yield uo. A voltage a, u2, the noninverting input, is greatly amplified to yield an in-phase output a uo.

3.2

3.2

INVERTINC AMPLIFIERS

95

linear output range of only +10 V, although some saturate at about +13 V. A single supply is adequate with some op amps, such as the LM358 (Horowitz and

Hill,

1989).

RULE

2

No current flows into either input terminal of the op amp.

This is true because we assume that the input impedance is infinity, and no current flows into an infinite impedance. Even if the input impedance were finite, Rule 1 tells us that there is no voltage drop across Ra! so therefore, no current flows.

3.2

INVERTINC AMPLIFIERS

CIRCUIT Figure 3.3(a) shows the basic inverting-amplifier circuit. It is widely used in instrumentation. Note that a portion of tro is fed back via R1 to the negative input of the op amp. This provides the inverting amplifier with the many advantages associated with the use of negative feedback-increased bandwidth, lower output impedance, and so forth. If oo is ever fed back to the positive input of the op amp, examine the circuit carefully. Either there is a mistake, or the circuit is one of the rare ones in which a regenerative action isdesired.

EQUATION Note that the positive input of the op amp is at 0 V. Therefore, by Rule 1, the negative input of the op amp is also at 0 V. Thus no matter what happens to the rest of the circuit, the negative input of the op amp remains at 0 V, a condition known as a virtual ground. Because the right side of Ri, is at 0 V and the left side is u1, by Ohm's law the current I through Ri, is I : utlR,. By Rule 2, no current can enter the op amp;therefore I must also flow through R1. This produces a voltage drop across l-rRi. Because the left end of R1 is at 0 V, the right end must beR1

of

uo

=_'&:-,*: or :+.Ri.

(3.1)

Thus the circuit inverts, and the inverting-amplifier gain (not the op-amp gain)

is given by the ratio of Ri to

LEVER ANALOGY Figure 3.3(b) shows an easy way to visualize the circuit's behavior. A lever is formed with arm lengths proportional to resistance values. Because the

94

3 AMPLIFIERS AND SICNAL PROCESSINCI R" _'T

Figure 3.3 (a) An inverting amplifier. Current flowing through the input resistor ,R1 also flows through the feedback resistor Rt. (b) A lever with arm lengths proportional to resistance values enables the viewer to visualize the input-output characteristics easily. (c) The input-output plot shows a slope of -&lRi in the central portion, but the output saturates at about +13 V.

negative input is at 0 V, the fulcrum is placed at 0 V, as shown. If Ri is three times Ri, as shown, any variation of r.r1 results in a three-times-bigger variation of uo. The circuit inFigure 3.3(a) is a voltage-controlled current source (VCCS) for any load ,R1 (Jung, 1986). The cuent I through Rl is o1lR1, so ui controls i. Current sources are useful in electrical impedance plethysmography for passing a fixed current through the body (Section 8.7).I

N

PUT.OUTPUT C HARACTERISTIC,r.r1

Figure 3.3(c) shows that the circuit is linear only over a limited range of a1. When 'uo exceeds about t13 Y, it saturates (limits), and further increases in produce no change in the output. The linear swing of oo is about 4 V less than the difference in power-supply voltages. Although op amps usually have

3.2

INVERTINCAMPLIFIERS

power-supply voltages set at f15 V, reduced power-supply voltages may be used, with a corresponding reduction in the saturation voltages and the linear swing of oo.

SUMMING AMPLIFIER The inverting amplifier may be extended to form a circuit that yields the weighted sum of several input voltages. Each input voltagc ui1,'ui7,. . . , 'n11 iS connected to the negative input of the op amp by an individual resistor the conductance of which (llRro) is proportional to the desired weighting.EXAMPLE

5.1 The output of a biopotential preamplifler that measures the electro-oculogram (EOG) (Section 4.7) is an undesired dc voltage of *5 V due to electrode half-cell potentials (Section 5.1), with a desired signal of t1 V superimposed. Design a circuit that will balance the dc voltage lo zeto and provide a gain of -10 for the desired signal without saturating the op amp.ANSWER Figure E3.1(a) shows the design. We assume that tr6, the balancing voltage available from the 5kO potentiometer, is *10V. The undesired voltage a ui:5 V. For oo : 0, the current through i is zero. Thereforethe sum of the currents throughR1 and R6, is zero.

l!*l!:oR,o.Rr'

: - Rf100

-1041-10)

:

2 x loao

ko

-10(al(b)

Figure E5. (a) This circuit sums the input voltage ?.)i plus one-half of the balancing voltage t6. Thus the output voltage ?ro can be set to zero even when ui has a nonzero dc component, (b) The three waveforms show ui, the input voltage; (ui+ w12), the balanced-out voltage; and tro, the amplified output voltage. If o1 were directly amplifled, the op amp would saturate.

96

3 AMPLIFIERS AND SICNAL PROCESSINC

For a gain of -10, (3.1) requires,Rl/R1,: 10, equation is

orRr,:

100kO. The circuit

^ -'r '" 'uo: - P-l /u, un\ ^, \R, Rr)-rv\ui

,o uo- ,^ 0, the noninverting amplitro ) 0. For u1 < 0, the inverting amplifier at the bottom is active, making oo ) 0. Circuit gain may be adjusted with a single pot. (b) Input-output characteristics show saturation when oo > +13 V. (Reprinted with permission fuom Electronics Magazine, copyright O December 12,1,974; Penton

Figure

3.7

fier at the top is active, making

Publishing, Inc.) (c) One-op-amp full-wave rectifier.

For

u1

< 0, the circuit

behaves like the inverting amplif,er rectifier with a gain of *0.5. For ,u1 > 0, the op amp disconnects and the passive resistor chain yields a gain of +0.5.

3.7 For

LOCARITHMICAMPLIFIERS

103

< 0, D1 and Da conduct, while D2and D3 are reverse-biased. At the i.ri seveS as the input to the lower op-amp inverting amplifler, which has a gain of -1.f x.Because D2 is not conducting, the upper op amp does not contribute to the output. And because the polarity of the gain switches with the polarity of ui, 'uo : lrilxl. The advantage of this circuit over other full-wave rectifier circuits (Wait, 1975, p.173) is that the gain can be varied with a single potentiometer and the input resistance is very high. If only a half-wave rectifier is needed, either the noninverting amplifier or the inverting amplifier can be used separately, thus requiring only one op amp. The perfect rectifier is frequently used with an integrator to quantify the amplitude of electromyographic signals (Section 6.8).u1

potentiometer wiper

'Webster,

Figure 3.7(c) shows a one-op-amp full-wave rectifier (Tompkins and 1988). Unlike other full-wave rectifiers, it requires the load to remain constant, because the gain is a function of load.

3.7

LOGARITHMIC AMPLIFIERS

The logarithmic amplifier makes use of the nonlinear volt-ampere relation of the silicon planar transistor (Jung, 1986).

Vsp: o 060r"s(f)where Vsp

(3.8)

: 1c : Is :

base

-

emitter voltage

collectorcurrent reversesaturationcurrent, 10-l3A af27"C

The transistor is placed in the transdiode configuration shown in Figure : uilRi. Then the output ao : Vnn is logarithmically related to tri as given by (3.8) over the approximate range 10-7 A ( 19 ( 10 2 A. The approximate range of tr" is -0.36 to -0.66 V, so larger ranges of uo are sometimes obtained by the alternate switch position shown in Figure 3.8(a). The resistor network feeds back only a fraction of oo in order to boost uo and uses the same principle as that used in the noninverting amplifier. Figure 3.8(b) shows the input-output characteristics for each of these circuits. Because semiconductors are temperature sensitive, accurate circuits require temperature compensation. Antilog (exponential) circuits are made by interchanging the resistor and semiconductor. These log and antilog circuits are used to multiply a variable, divide it, or raise it to a powe; to compress large dynamic ranges into small ones; and to linearize the output of devices with logarithmic or exponential input-output relations. In the photometer3.8(a), in which 16

104

3 AMPLIFIERS AND SICNAL PROCESSINC

(a)

(b)

Figure 3.8 (a) A logarithmic amplifier makes use of the fact that a transistor's VsB is related to the logarithm of its collector current. With the switch thrown in the alternate position, the circuit gain is increased by 10. (b) Input-output characteristics show that the logarithmic relation is obtained for only one polarity; x1 and x10 gains are indicated. (Section 11.1), the logarithmic converter can be used to convert transmittance

to absorbance.

3.8

INTECRATORS

So far in this chapter, we have considered only circuits with a flat gain-versus-

frequency characteristic. Now let us consider circuits that have a deliberate change in gain with frequency. The first such circuit ishe integrator.Figue3.9

integrator With 51 open and 52 closed, the dc inverting amplifier. Thus ao : ?ric rld uo Qan be set to any desired initial condition. With 51 closed and 52 open, the circuit integrates. With both switches open. the circuit holds o^ constant, making possible a leisurely readout.FigureA three-modeas an

3.9

circuit behaves

3.8

INTECRATORS

10551.

shows the circuit for an integrator, which is obtained by closing switch voltage across an initially uncharged capacitor is given by

The

,:llo",a,

(3.e)

where I is the current through C and /1 is the integration time. For the integrator, for ui positive, the input current i : uil R flows through C in a direction to cause uo to move in a negative direction. Thus

7f4 -RCJ,

uidt

+

uic

(3.10)

This shows that r.ro is equal to the negative integral of ,u;, scaled by the faetor Ll RC and added to u;., the voltage due to the initial condition. For oo :0 andui

:

constant, oo

integrator eventually drifts into saturation, a means must be provided to restore 'rro to any desired initial condition. If an initial condition of ?,o : 0 V is desired, a simple switch to short out C is sufficient. For more versatility, 51 is opened and 52 closed. This dc circuit then acts as an inverting amplifier, which makes uo : nic. During integration, 51 is closed and 52 open. After the integration, both switches may be opened to hold the output at the final calculated value, thus permitting time for a readout. The circuit is useful for computing the area under a curve, as technicians do when they calculate cardiac output (Section 8.2). The frequency response of an integrator is easily analyzed because the formula for the inverting amplifler gain (3.1) can be generalized to any input and feedback impedances. Thus for Figure 3.9, with 51 closed,

: -oi after an integration

time equal to RC. Because any real

V.(jr) :Zt : _ rljaC Vi(j.) Zi R

11 joRC

(3.11)

jrot

where t:RC,o:2trf , and/= frequency. Equation (3.11) shows that the circuit gain decreases as R increases, Figure 3.10 shows the frequency response, and (3.11) shows that the circuit gain is 1 when @r :7. EXAMPLE

The output of the piezoelectric sensor shown in Figure directly into the negative input of the integrator shown in Figure 3.9, as shown in Figure 83.2. Analyze the circuit of this charge amplifier and discuss its advantages.2.1,1,(b) may be fed

3-3

ANSWERlsn :0.

Because the FET-op-amp negative input is a virtual ground, 1"6 Hence long cables may be used without changing sensor sensitivity or

:

106

3 AMPLIFIERS AND SIONAL PROCESSINC.

100

10

100

"

J" Frequency, Hz

Figure 3.O 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 /, for high-pass, low-pass, and bandpass filters.

time constant, thatuo is

as is the case with voltage amplifiers. From Figure 83.2, curcen generated by the sensor, i" K dx ldt, all flows into C, so, using (3.10), we find

:

uo:-u-eI f" Kdx o,:- kX c J, d,which shows that uo is proportional to r, even down to dc. Like the integrator, the charge amplifier slowly drifts with time because of bias

dq"ldr=i"=Kdr/dt

E3.2 The charge amplifier transfers charge generated from a piezoelectric sensor to the op-amp feedback capacitor C.Figure

3.9

DIFFERENTIATORS

currents required by the op-amp input. A large feedback resistance R must therefore be added to prevent saturation. This causes the circuit to behave as a high-pass filter, with a time constan t : RC.I then responds only to frequencies above f,:llQIRC) and has no frequency-response improvement over the voltage amplifier. Common capacitor values are 10 pF to 1 pF.

3.9

DIFFERENTIATORS

Interchanging the integrator's R and C yields the differentiator shown in Figure 3.11. The current through a capacitor is given by

i:Ifu^. Thus

C+ clt

(3.12)

dui I dt is positive, I flows through R in a direction such that it yields a negative

u,

- -nC* dt

(3.13)

The frequency response of a differentiator is given by the ratio of feedback

to input impedance.

V.(jr) _ _Zr

Vi(jr)

Z, lljaC : _ jLDRC: jm

(3.14)

Equation (3.14) shows that the circuit gain increases as/increases and that it is equal to unity when ar : 1,. Figure 3.10 shows the frequency response. Unless specific preventive steps are taken, the circuit tends to oscillate. The output also tends to be noisy, because the circuit emphasizes high frequencies. A differentiator followed by a comparator is useful for detecting

Figure 3.1 Adifferentiator The dashed lines indicate that a small capacitor must usually be added across the feedback resistor to prevent oscillation.

108

3 AMPLIFIERS AND SICNAL PROCESSING

an event the slope of which exceeds a given

value-for example, detection of

the R wave in an electrocardiosram.

3.10

ACTIVE FITTERS

LOW.PASS FILTER Figure 1.9(a) shows a low-pass filter that is useful for attenuating highfrequency noise. A low-pass active filter can be obtained by using the oneop-amp circuit shown in Figure 3.12(a). The advantages of this circuit are that

(c)

Figure 3.12 Active filters (a) A low-pass filter attenuates high frequencies. (b) A high-pass filter attenuates low frequencies and blocks dc. (c) A bandpass filter attenuates both low and high frequencies.

3.1O ACTIVE FILTERS

109

it is capable of gain and that it has a very low output impedance. The frequency response is given by the ratio of feedback to input impedance.

V"(ia):_Zt__ Vi( jat) ZiR1

(tuljcoC) l(1ljac1) + R1l,R1

Rr1RiL

(1

+

ioRrcr)Ri

+ jatt

(3.1s)

where r : RrCt. Note that (3.15) has the same form as (1.23). Figure 3.10 shows the frequency response, which is similar to that shown in Figure 1.8(d). For a111f r, the circuit behaves as an inverting amplifier (Figure 3.3), because the impedance of C1 is large compared with R1. For ot))1.f t, the circuit behaves as an integrator (Figure 3.9), because C1 is the dominant feedback impedance.

The corner frequency /", which is defined by the intersection of the two

asymptotes shown, is given by the relation ar :2nf,r : 1. When a designer wishes to limit the frequency of a wide-bandwideband amplifier, it is not necessary to add a separate stage, as shown in Figure 3.12(a), but only to add the correct size Cl to the existing wide-band amplifier.

HIGH.PASS FILTERFigure 3.12(b) shows a one-op-amp high-pass filter. Such a circuit is useful for amplifying a small ac voltage that rides on top of a large dc voltage, because C1, blocks the dc. The frequency-response equation is

V"(jr)__Zt:_ Rt Vi(ja) Zi Ll joCi + Rt jr';RrCi _ _Rt jr';r __ 1+ j@CiRi RiL + jrot

(3.16)

where r : RiCi. Figure 3.10 shows the frequency response. For ro ( 1,f r, he circuit behaves as a differentiator (Figure 3.11), because C: is the dominant input impedance. For at)t1-f r, the circuit behaves as an inverting amplifier, because the impedance of R1 is large compared with that of Ci. The corner frequency/", which is defined by the intersection of the two asymptotes shown, is given by the relation ar :Znf,t - l.

BANDPASS FILTER

A

series combination of the low-pass filter and the high-pass filter results in a filter,which amplifies frequencies over a desired range and attenuates higher and lower frequencies. Figure 3.12(c) shows that the bandpass function can be achieved with a one-op-amp circuit. Figure 3.10 shows the frequency response. The corner frequencies are defined by the same relations as those for the low-pass and the high-pass filters. This circuit is useful forbandpass

11O

3 AMpLrFlERSANDSroNALpRocEssrNcas those

amplifying a certain band of frequencies, such heart sounds or the electrocardiosram.

required for recording

3.11

FREQUENCYRESPONSE

Up until now, we have found it useful to consider the op amp as ideal. Now we shall examine the effects of several nonideal characteristics, starting with that

of frequency response. OPEN.LOOP CAINBecause the op amp requires very high gain, it has several stages. Each of these stages has stray or junction capacitance that limits its high-frequency response in the same way that a simple RC low-pass fllter reduces high-frequency gain. At high frequencies, each stage has a -1 slope on a log-log plot of gain versus frequency, and each has a -90' phase shift. Thus a three-stage op amp, such as type 709, reaches a slope of -3, as shown by the dashed curve in Figure 3.13.1MOp-amp gain Uncompensated100

k

10k

\

6 (,

1k

100

10

Amplifier circuit gainI

10

100

1k

rOk

100k

1M

tOM

Frequency, Hz

Figure 3.3 Op-ampfrequency characteristics Early op amps (such as the 709) were uncompensated, had a gain greater than 1 when the phase shift was equal to -180', and therefore oscillated unless compensation was added externally. A popular op amp, the 41L, is compensated intemally; so for a gain greater than 1, the phase shift is limited to -90". When feedback resistors are added to build an amplifier circuit, the loop gain on this log-log plot is the difference between the op-amp gain and the amplifier--circuit gain.

3.11

FREQUENCY

RESPONSE 111

The phase shift reaches -270", which is quite satisfactory for a comparator, because feedback is not employed. For an amplifier, if the gain is greater than 1 when the phase shift is equal to -180' (the closed-loop condition for oscillation), there is undesirable oscillation. COMPENSATION

Adding an external capacitor to the terminals indicated on the specification sheet moves one of the RC filter corner frequencies to a very low frequency. This compensates the uncompensated op amp, resulting in a slope of -1 and a maximal phase shift of -90". This is done with an internal capacitor in the 411, resulting in the solid curve shown in Figure 3.13. This op amp does not oscillate for any amplifier we have described. This op amp has very high dc gain, but the gain is progressively reduced at higher frequencies, until it is only I at 4 MHz.CLOSED.LOOP OAIN

It might appear that the op amp has very poor frequency response, because its gain is reduced for frequencies above 40 Hz. F{owever, an amplifier circuit is never built using the op-amp open loop, so we shall therefore discuss only the circuit closed-loop response. For example, if we build an amplif,er circuit with a gain of 10, as shown in Figure 3.13, the frequency esponse is flat up to 400 kHz and is reduced above that frequency only because the amplifier-circuit gain can never exceed the op-amp gain. We find this an advantage of using negative feedback, in that the frequency response is greatly extended.LOOP GAINThe loop gain for an amplifier circuit is obtained by breaking the feedback loop at any point in the loop, injecting a signal, and measuring the gain around the

loop. For example, in a unity-gain follower [Figure 3.a@)l we break the feedback loop and then the injected signal enters the negative input, after which it is amplified by the op-amp gain. Therefore, the loop gain equals the op-amp gain. To measure loop gain in an inverting amplifier with a gain of *L [Figure 3.3(a)], assume that the amplifier-circuit input is grounded. The injected signal is divided by 2 by the attenuator formed of R1 and Ri, and is then amplified by the op-amp gain. Thus the loop gain is equal to (op-ampgain)12.

Figure 3.13 shows the loop-gain concept for a noninverting amplifier. The amplifier-circuit gain is 10. On the log-log plot, the difference between the opamp gain and the amplifier-circuit gain is the loop gain. At low frequencies, the loop gain is high and the closed-loop amplifier-circuit characteristics are determined by the feedback resistors. At high frequencies, the loop gain is low and the amplifier-circuit characteristics follow the op-amp characteristics. High loop gain is good for accuracy and stability, because the feedback resistors can be made much more stable than the op-amp characteristics.

112

s

AMpLrFrERsANDsrcNALpRocESSrNo

OAIN-BANDWIDTH PRODUCTThe gain-bandwidth product of the op amp is equal to the product of gain and

bandwidth at a particular frequency. Thus in Figure 3.13 the unity-gainbandwidth product is 4 MHz, a typical value for op amps. Note that along the entire curve with a slope of -1, the gain-bandwidth product is still constant, at 4 MHz. Thus, for any amplifier circuit, we can obtain its bandwidth by dividing the gain-bandwidth product by the amplifier-circuit gain. For higherfrequency applications, op amps such as the OP-37E are available with gainbandwidth products of 60 MHz. SLEW RATESmall-signal response follows the amplifier-circuit frequency response predicted by Figure 3.13. For large signals there is an additional limitation. When rapid changes in output are demanded, the capacitor added for compensation must be charged up from an internal source that has limited current capability 1-u,. The change in voltage across the capacitor is then limited, du ldt : I^u*lC, and du"f dt is limited to a maximal slew rate (15V/ps for the 4II).If this slew rate S. is exceeded by a large-amplitude, high-frequency sine wave, distortion occurs. Thus there is a limitation on the sine-wave full-power resDonse. o maximal frequency for rated output,

Jp:

t

s,2nVo,

(3.17)

where lzo. is the rated output voltage (usually 10 V). If the slew rate is too slow for fast switching of a comparator, an uncompensated op amp can be used, because comparators do not contain the negative-feedback path that may cause oscillations.

3.12

OFFSET VOLTAOE

Another nonideal characteristic is that of offset voltage. The two op-amp inputs drive the bases of transistors, and the base-to-emitter voltage drop may be slightly different for each. Thus, so that we can obtain ?o - 0, the voltage (r, - ,r) must be a few millivolts. This offset voltage is usually not important when oi is 1 to -10 V. But when oi is on the order of millivolts, as when amplifying the output from thermocouples or strain gages, the offset voltage must be considered.NUTLINOThe offset voltage may be reduced to zero by adding an external nulling pot to the terminals indicated on the specification sheet. Adjustment of this pot

3.12

OFFSET

VOLTAOE 113

increases emitter current through one of the input transistors and lowers it through the other. This alters the base-to-emitter voltage of the two transistors until the offset voltage is reduced to zero.

DRIFT Even though the offset voltage may be set to 0 at25'C, it does not remain there if temperature is not constant. Temperature changes that affect the base-to-emitter voltages may be due to either environmental changes or to variations in the dissipation of power in the chip that result from fluctuating output voltage. The effects of temperature may be specified as a maximal offset voltage change in volts per degree Celsius or a maximal offset voltagechange over a given temperature range, say -25'C to +85 "C. If the drift of an inexpensive op amp is too high for a given application, tighter speciflcations (0.1pV/'C) are available with temperature-controlled chips. An alternative technique modulates the dc as in chopper-stabilized and varactor op amps (Tobey et a1., L97I).

NOISE

All semiconductor junctions generate noise, which limits the detection of smallsignals. Op amps have transistor input junctions, which generate both noisevoltage sources and noise-current sources. These can be modeled as shown in Figure 3.14. For low source impedances, only the noise voltage tr' is important, it is large compared with the I,R drop caused by the current noise ln. The noise

is random, but the amplitude varies with frequency. For example, at low

rl

,ot

lF ft--.5.4 Noise sources in an op amp The noise-voltage source tr, is in series with the input and cannot be reduced. The noise added by the noisecurrent sources in can be minimized by using small external resistances.Figure

114

3 AMpLTFTERSANDSTcNALpRocESSTNc

frequencies the noise power density varies as [lf (flicker noise), so a large amount of noise is present at low frequencies. At the midfrequencies, the noise is lower and can be specified in root-mean-square (rms) units ofY.Hz-rlz.ln

addition, some silicon planar-diffused bipolar integrated-circuit op amps exhibit bursts of noise, called popcorn noise (Wait et a1.,1975).

3.13

BIAS CURRENT

Because the two op-amp inputs drive transistors, base or gate current must flow all the time to keep the transistors turned on. This is called bias current, which for the 411 is about 200 pA. This bias current must flow through the feedback network. It causes errors proportional to feedback-element resistances. To minirnize these errors, small feedback resistors, such as those with resistances of 10 kO, are normally used. Smaller values should be used only after a check to

determine that the current flowing through the feedback resistor, plus the current flowing through all load resistors, does not exceed the op-amp output current raling (20 mA for the 411).

DIFFERENTIAL BIAS CURRENTThe difference between the two input bias currents is much smaller than either of the bias currents alone. A degree of cancellation of the effects of bias current can be achieved by having each bias current flow through the same equivalent resistance. This is accomplished for the inverting amplifier and the noninverting amplifier by adding, in series with the positive input, a compensation resistor the value of which is equal to the parallel combination of R1 and R1. There still is an error, but it is now determined by the difference in bias current.

DRIFT

The input bias currents are transistor base or gate currents, so they are temperature sensitive, because transistor gain varies with temperature. However, the changes in gain of the two transistors tend to track together, so the additional compensation resistor that we have described minimizes theproblem. NOISE

Figure 3.14 shows how variations in bias current contribute to overall noise.The noise currents flow through the external equivalent resistances so that the total rms noise voltage is

,-

{fui +

(1,R1)2

+ U,R)z

i

4rcTR1* 4rcTR2lBW}Uz

(3.18)

3.14 INPUTANDOUTPUTRESISTANCE 115whereR1 and R2

: on :jn

equivalent source resistancesnrl value of the rms noise voltage,

inY'Hz-r 12, A Hz1

across the frequency range of interest

:

tre&n vlue of the rms noise current' in across the frequency range of interest

/2,

r:

Boltzmann's constant (Appendix)

T: BW:

temperature, K noisebandwidth, Hz

The specification sheet provides values of uo and l, (sometimes ul and ll), thus making it possible to compare different op amps. If the source resistances are 10 k'f), bipolar-transistor op amps yield the lowest noise. For larger source resistances, low-input-current amplifiers such as the field-effect transistor (FET)

input stage are best because of their lower current noise. Ary (1977) presentsdesign factors and performance specifications for a low-noise amplifier.

For ac amplifiers, the lowest noise is obtained by calculating the characteristic noise resistance -R' : unlin and setting it equal to the equivalent source resistance R2 (for the noninverting amplifier). This is accomplished by inserting a transformer with turns ratio 1 : N, where Vtr : (R"lR2)'/', between the source and the op amp (Jung, 1986).

3.14 INPUT AND OUTPUT RESISTANCEINPUT RESISTANCEThe op-amp differential-input resistance R6 is shown in Figures 3.1 and 3.15. For the FET-input 4II,rt is 1TO, whereas for BJT-input op amps, it is about 2 }dA, which is comparable to the value of some feedback resistors used. F{owever, we shall see that its value is usually not important because of the benefits of feedback. Consider the follower shown in Figure 3.15. In order to calculate the amplifier-circuit input resistance Ru1, assume a change in input voltage ui. Because this is a follower,

Luo: 46uo : A(Lui ALui

Auo)

A+1Aoo -.r _ RaAu1

&

- Azo

Aui

(1

-l_

tln.(3.1e)

D

-' -

-"t

A.tt

air -

(+1)doARa

116

3 AMPLIFIERS AND SICNAL PROCESSINC

Figure 5.15 The amplifier input impedance is much higher than the op-amp input impedance R6. The amplifler output impedance is much smaller than the op-amp output impedance Ro.Thus the amplifier-ccuit input resistance Ru; is about (10s) x (2 MO) 200 GO. This value cannot be achieved in practice, because surface leakage paths in the opamp socket lower it considerably. In general, all noninverting amplifiers have a very high input resistance, which is equal to R6 times the loop gain. This is not to say that very large souce resistances can be used, because the bias current usually causes much larger problems than the amplifier-circuit input impedance. For large source resistances, FET op amps such as the 411 are helpful. The input resistance of an inverting amplifier is easy to determine. Because the negative input of the op amp is a virtual ground,

:

^^r:resistance.

ff:

(3.20)

^,

Thus the amplifier-circuit input resistance Rui is equal to i, the input resistor. Because R1 is usually a small value, the inverting amplifier has small input

OUTPUT RESISTANCEThe op-amp output resistance Ro is shown in Figures 3.1 and 3.15. It is about 40 O for the typical op amp, which may seem large for some applications. However, its value is usually not important because of the benefits of feedback. Consider the follower shown in Figure 3.15. In order to calculate the amplifiercircuit output resistance Ruo, assume that load resistor R1 is attached to the output, causing a change in output current Alo. Because lo flows through Ro, there is an additional voltage drop AloRo.

-L,ua: Aoo (,4+1)Ao,:AloRo n"^ -

AL,ua|_

AloRo: -AL,uo +AioRo

!g: -4al" AII

= R^tA

(3.21)

3,15 PHASE-SENSITIVE DEMODULATORS 117Thus the amplifier-circuit output resistance R.o is about 40lI}sa value negligible

:

0.0004 O,

in most circuits. In general, all noninverting and inverting amplifiers have an output resistance that is equal to R" divided by the loop gain. This is not to say that very small load resistances can be driven by the output. If R1 shown in Figure 3.15 is smaller than 500 O, the op amp saturates internally, because the maximal current output for a typical op amp is 20 mA. This maximal current output must also be considered when driving large capacitances Ca at a high slew rate. Then the output current

'.- rr#

(3.22)

The Ro-C; combination also acts as a low-pass filter, which introduces additional phase shift around the loop and can cause oscillation. The cure is to add a small resistor between uo and C1, thus isolating Ca from thefeedback loop.

To achieve larger current outputs, lhe current booster is used. An ordinary op amp drives high-power transistors (on heat sinks if required). Then we can use the entire circuit as an op amp by connecting terminals u1, u2, ltd uo o external feedback networks. This places the booster section within the feedback loop and keeps distortion low.

3.15 PHASE.SENSITIVE

DEMODULATORS

Figure 2.7 shows that a linear variable differential transformer requires a phase-sensitive demodulator to yield a useful output signal. A phase-sensitive demodulator does not measure phase but yields a full-wave-rectified output of the in-phase component of a sine wave. Its output is proportional to the amplitude of the input, but it changes sign when the phase shifts by 180'. Figure 3.16 shows the functional operation of a phase-sensitive demodulator. Figure 3.16(a) shows a switching function that is derived from a carrier oscillator and causes the double-pole double-throw switch in Figure 3.16(b) to be in the upper position for *1 and in the lower position for -1. In effect, this multiplies the input signal zr1 by the switching function shown inFigure 3.16(a). The in-phase sine wave in Figure 3.16(c) is demodulated by this switch to yield the full-wave-rectified positive signal in Figure 3.16(d). The sine wave in Figure 3.16(e) is 180' out of phase, so it yields the negative signal in Figure 3.16(f). Amplifier stray capacitance may cause an undesirable quadrature voltage that is shifted 90', as shown in Figure 3.16(9). The demodulated signal in Figure 3.16(h) averages o zero when passed through a low-pass filter and is rejected. The dc signal shown in Figure 3.16(i) is demodulated to the wave shown in Figure 3.160) and is rejected. Any frequency component not locked to the

118

3 AMpLTFTERsANDSTcNALpRocESSTNc

(a.,

(b)

-t

'--i__,,\,(d)

tc.,

,\r

-l

(e.,

-l

''t

/^

(0

\-AJ

I

)0-1

V

h \l\c)

(i) -1

-l-r

Figure 5.6 Functional operation of a phase-sensitive demodulator (a) Switching function. (b) Switchswitch. (c), ("), (g), (i) Several several input voltages. (d), (f), (h), (j) Corresponding corresponding output voltages.

carrier frequency is similarly rejected. Because the phase-sensitive demodulator has excellent noise-rejection capabilities, it is frequently used to demodulate the suppressed-carrier waveforms obtained from linear variable differential transformers (LVDTs) and the ac-excited strain-gage Wheatstone bridge (Section 2.3). A carrier system and phase-sensitive demodulator are also essential for operation of the electromagnetic blood flowmeter (Section 8.3). The noise-rejection capability may be improved by placing a tuned amplifier before the phase-sensitive demodulator, thus forming a lock-in amplifier (Aronson, 1977).

3.15 PHASE-SENSITIVE DEMODULATORS 119

Figure 3.17 A ring demodulator This phase-sensitive detector produces a full-wave-rectified output oo that is positive when the input voltage T.ri is in phase with the carrier voltage u" and negative when 'ui is 180' out of phase with u..

A practical phase-sensitive demodulator is shown in Figure 3.17.This ring demodulator operates with the following action, provided that u" is more than twice tri If the carrier waveform 'u; is positive at the black dot, diodes D1 and D2 are forward-biased and D3 and Da are reverse-biased. By symmetry, points A and B are at the same voltage. If the input waveform u1, is positive at the black dot, this transforms to a voltage ops that appears at oo, as shown in the first halfof Figure 3.16(d). During the second half of the cycle, diodes D3 and Da are forward-biased and D1 and D2 are reverse-biased. By symmetry, points A and C are at the same potential. The reversed polarity of 'u; yields a positive Trp6, which appears at T.ro. Thus t;o is a full-wave-rectified waveform. If u1. changes phase by 180', as shown in Figure 3.16(e), oo changes polarity. To eliminate ripple, the output is usually low-pass flltered by a filter the corner frequency of which is about onetenth of the carrier frequency. The ring demodulator has the advantage of having no moving parts. Also, because transformer coupling is used, 1)i, 1)g, rd uc can all be referenced to different dc levels. The availability of type 1.495 solid-state double-balanced demodulators on a single chip (Jung, 1986) makes it possible to eliminate the bulky transformers but requires more care in biasing ai, us, rd uo at differentdc levels.

EXAMPLE 3.4 (a) For Figure 3.17, assume that the carrier frequency is 3 kHz. Design the RC output low-pass filter to have a corner frequency of 20Hz and a reasonable value capacitor (100 nF). Use (b) a one-section active filter.

12O

3 AMpLTFTERSANDSTcNALpRocESSTNcSee Figure 1.6(a)

ANSWER (a)

R:

:7 7(2nfC) : l Qnz} x 0.0000001) :2rfRCL

80ko

(b) See Figure 3.72(a)Cr

:0.1pF,

Ri

:

80kO, Rr

:

80kO

3.16

TIMERS

In elqctronic3.18.

design, there is often a need to generate signals that repeat at regular intervals. One type of signai is the square wave, shown in Figure The voltage of a square wave is high for a fixed amount of time, fi,, then it drops to a lower voltage for a length of time fi. This pattern of alternating high and low cycles continuously repeats. The total period of the square wave, the time it takes to repeat, is thus

T:Tn*Tt

(3.23)

The duty cycle of a square wave is deflned as the percentage of the time that the square wave is at its higher output voltage. Thus

Dutycycle

-+

"

(100%)

(3.24)

For example, a square wave in whichcycle.

21,

-

Zr is said to have a 50% duty

There are many ways to generate square waves. Digital systems use square waves with 50% duty cycles as clocks to synchronize digital logic; thus, there

Th

TT

tl

-- -v-tT

Figure

3.8 A

square wave of period ? oscillates between two values.

3.16

TIMERS

are many commercially available clock generator chips that yield square \ilaves

with 50% duty cycles. Many times, however, we want to generate square waves with duty cycles other than 50%. A popular means of doing this is with a 555 timer. The 555 timer is an S-pin integrated circuit, as shown in Figure 3.19(a). The 555 timers form the core of many different kinds of timing circuits. One popular configuration is shown in Figure 3.19(b). When powered, this circuit oscillates internally, alternately charging and discharging capacitor C. Figure 3.19(c) shows the output of the circuit. Note that the duty cycle of this circuit is always greater than 50% because Ru must be nonzero. To get square waves with duty cycles less than 50%, the output of this circuit may be fed into an inverting amplifier or logic inverter.

Ground

Vcc1

Trigger Discharge Output Threshold

6

Reset

Control

2

(a)Zr' =

-In(0 5XRa+Ru)C

0v_In(0.5

Fisure 3.e rn" sl tit", (a) Pinout for the 555 timer IC. (b) A popular circuit that utilizes a 555 timer and four external components creates a squale wave with duty cycle ) 50o/o. (c) The output from the 555 timer circuit shown

in (b).

122

3 AMpLTFTERSANDSTcNALpRocESSTNca

This method of generating square waves is simple and requires only

small

integrated circuit (IC) and four external components. The circuit of Figure 3.19(b), however, is not very useful for precision timing applications, because of the difflculty of creating precision capacitors. Using typical off-the-shelf components, the period may vary by as much as25"/" from the nominal values. Using variable resistances for Ru and R6, which allows fine-tuning of the time constants. can minimize this.EXAMPLEp,s

3.5

Design a timer for a nerve stimulator that stimulates for 200

every 50 ms.3.19(c)

ANSWER Use the circuit shown in Figure 3.19(b). From FigureTt

Zr'

1n(0.5)R6C

Ra

: -ln(0.5)(Rr + Rr,)C. Rr,: &+Tnl( ln(0.5)c:

= Tt l?

ln(0.5)C

:

200 ps/(0 .693

x 0.1 p.F)

:

2886

C)

-2886+50ms/(0.693 x 0.1p.F) :717

ktl.

Use 7404 TTL chip or 4049 CMOS chip logic gate inverter ro yield200 u.s.

*5 V for

3.17 MICROCOMPUTERS

IN MEDICAL INSTRUMENTATION

The electronic devices that we have described so far in this chapter are useful for acquiring a medical signal and performing some initial processing, such as flltering or demodulation. Microcomputers can frequently replace analog circuits by performing the signal-processing functions of comparator, limiter,

rectifier, logarithmic amplifler, integrator, differentiator, active filter, and in software (Tompkins, 1993; Ritter et al., 2005). The generalized instrumentation system shown in Figure 1.1 also indicates additional signal processing, data storage, and control and/or feedback capability. Traditionally, this additional processing was handled either by using relatively simple digital-electronic circuits or, if a significant amount of processing was required, by connecting the instrument to a computer.phase-sensitive demodulator The development of microcomputers has led to the combining ofa

medical

instrument with a signal-processing capability sufficient to perform functions normally done by an operator or a computer. This computing function can certainly be implemented. But from the point of view of medical instrumentation, it is more instructive to view the microcomputer as a microcontroller. The use of a microcomputer generally results in fewer IC packages. This reduced complexity, together with the capability for self-calibration and

PROBLEMS 123detection of errors, enhances the reliability of the instrument. The most useful applications of microcomputers for medical instrumentation involve this controller function. Microcomputers can provide self-calibration for measurement systems, automatic sequencing of events, and an easy way to enter such patient data as height, weight, and sex for calculating expected or normal performance. All these functions are made possible by the basic structure of the microcomputer system. Further development has resulted in chip-based systems. For instance digital filters are now directly hard coded onto dedicated chips which result in significant computational savings The LabVIEW PCbased system provides modular software-based instruments for data acquisition. It permits graphical system design of embedded applications for microprocessor and microcontroller devices. Thus the LabVIEW developed software can be used in many new medical instruments after the purchase of one LabVIEW system that includes the Microprocessor SDK toolkit. (http://www.ni.com/labview/; Tompkins and Webster, 1981; Tompkins and Webster, 1988; Carr and Brown, 2001).

PROBLEMS

3.1 (a) Design an inverting ampliier

with an input resistance of 20 kO and a gain of 10. (b) Include a resistor to compensate for bias current. (c) Design a summing amplifier such that o" : -(10u1 *2u2 10.5u3). 3.2 The axon action potential (AAP) is shown in Figure 4.1. Design a dccoupled one-op-amp circuit that will amplify the 100 mV to 50 mV input range to have the maximal gain possible without exceeding the typical guaranteedlinear output range. 3.3 Use the circuit shown in Figure E3.1 to design a dc-coupled one-op-amp circuit that will amplify the f 100 pV EOG to have the maximal gain possible without exceeding the typical guaranteed linear output range. Include a control

that can balance (remove) series electrode offset potentials up to f 300 mV. Give all numerical values. 3.4 Design a noninverting amplifier having a gain of 10 and Rl of Figure 3.4(b) equal to 20 kO. Include a resistor to compensate for bias current. 3.5 An op-amp differential amplifier is built using four identical resistors, each having a tolerance of L5o. Calculate the worst possible CMRR. 3.6 Design a three-op-amp differential amplifier having a differential gain of 5 in the first stage and 6 in the second stage. 3.7 Design a comparator with hysteresis in which the hysteresis width extends

from0to2V.

3.8 For an inverting

half-wave perfect rectifier, sketch the circuit. Plot the input output characteristics for both the circuit output and the op-amp output, which are not the same point as in most op-amp circuits.

124

3 AMPLIFIRS AND SIGNAL PROCESSINC

shown in Figure 3.8, design a signal compressor for which an input-voltage range of *10 V yields an output-voltage range of +4 V. 3.10 Design an integrator with an input resistance of I MO. Select the capacitor such that when u1 : +10 V, oo travels from 0 to 10 V in 0.1 s. 3.11 In Problem 3.10, if oi:0 and offset voltage equals 5 mV, what is the current through R? How long will it take for uo to drift from 0 V to saturation? Explain how to cure this drift problem. 3.I2 In Problem 3.10, if bias current is 200 pA, how long will it take for uo to drift from 0 V to saturation? Explain how to cure this drift problem. 3.13 Design a differentiator for which r.,o : -10V when dqf dt: 100V/s. 3.14 Design a one-section high-pass filter with a gain of 20 and a corner frequency of 0.05 Hz. Calculate its response to a step input of I mV. 3.15 Design a one-op-amp high-pass active filter with a high-frequency gain of 10 (not 10), a high-frequency input impedance of l0 MO, and a corner frequency of 10 Hz. 3.16 Find Iz"(iro) lvt(ioo) for the bandpass filter shown in Figlre 3.12(c). 3.17 Figure 6.16 shows that the frequency range of the AAP is 110 to 10kHz.Design a one-op-amp active bandpass filter that has a midband input impedance of approximately l0 kC), a midband gain of approximately 1, and a frequency response from I to 10 kHz (corner frequencies).

3.9 Using the principle

3.18 Figure 6.16 shows the maximal single-peak signal and frequency range of the EMG. Design a one-op-amp bandpass filter circuit that willamplify the EMG to have the maximal gain possible without exceeding the typical guaranteed linear output range and will pass the range offrequenciesshown.

3.1-9 Using 411 op amps, explain how an amplifier with a gain of 100 and a bandwidth of 100 kHz can be designed. 3.20 Refer to Figure 3. 1 3. If the amplifier gain is 1 000, what is the loop gain at100 Hz?

the differentiator shown in Figure 3.11, ground the input, break the feedback loop at any point, and determine the phase shift in each section. Explain why the circuit tends to oscillate. 3.22 For Problem 3.21, calculate the amplifier input and output resistances at 100 Hz, for inverting and noninverting amplifiers. 3.23 For Figure 3.15, what is the maximal capacitive load Ca that can be connected Lo a4ll without degrading the normal slew rate (15V/ps) at the

3.21 For

maximal current output (20 mA)? 3.24 For Figure 3.17, if the forward drop of D1 is l0% higher than that of the other diodes, what change occurs in oo? 3.25 Given an oscillator block, design (show the circuit diagram for) an LVDT, phase-sensitive demodulator and a first-order low-pass filter with a corner frequency of 100 Hz. Sketch waveforms at each signif,cant location.

REFERENCES 125REFERENCESAronson, M. H., "Lock-in and carrier amplifiers." Med. Electron. Data.8(3),1917, CI-C16. Ary, J. P., "A head-mounted 24-channel evoked potential preamplifier employing low-noise operational amplifiers." IEEE Trans. Biomed. Eng., BMF.-24, 7977, 293-297 Carr, J. J., and J. M. Brown, Introduction to Biomedical Equipment Technology- 4th ed., Upper Saddle River, NJ: Prentice-Hall, 2001. Franco, 5., Design with operational Amplifiers and Analog Integrated circuits.3rd ed., New York: McGraw-Hill, 2002. Graeme, J. G., "Rectifying wide-range signals with precision, variable gain." Electron.,Dec' 12,.

1974, 45(25),107-109.

Ifill, The Art of Electronics, 2nd ed. Cambridge, England: Cambridge University Press. 1989. Jung, W. G., lC Op-Amp Cookbook,3rd ed. Indianapolis: Howard W' Sams, 1986. Ritter, A. 8., S. Reisman, and B. B. Michniak, Biomedical Engineering Principles. Boca Raton: CRC Press, 2005. Shepard, R. R., "Active filters: Part 1-2, Short cuts to network design." Electron., Aug. 18' 1969, 42(17),82-92. Tobey, G. E., J. G. Graeme, and L. P. Huelsman, Operational Amplifiers: Desgn and Application. New York: McGraw-Hill, 1971. Tompkins, w. J. (ed.), Biomedical Digital sgnal Processing: C-Language Examples and Lahoratory Experiments for the IBM PC. Englewood Cliffs, NJ: Prentice Hall, 1993. Tompkins, W. J., and J. G. Webster (eds.), Design of Microcomputer-Based Medical Instrumerxtation. F,rrglevt ood Cliffs, NJ: Prentice-Hall, 1981. Tompkins, W. J., and J. G. Webster (eds.),Interfacng Sensors to the IBM PC. Englewood Cliffs, NJ: Prentice-Hall, 1988. Wait, J. V., L. P. Huelsman, and G. A. Korn, Introduction to Operational Amplifier Theory and Applications. New York: McGraw-Hill, 1975.Horowitz, P., and W.