Analog Signal Processing Via Operational Amplifiers

Preview:

Citation preview

Analog Signal Processing

Via Operational Amplifiers

Model of OP AMP

That will be used

In much of this part

of the course.

-13 V -13 V

+13 V +13 V

“Golden” Rules of the Ideal OP AMP

• Golden Rule #1 (Virtual Voltage Rule) – When OP AMP is operating in its linear

amplifying range, V+ ≈ V-

This rule must hold since (V+ - V-) must lie between +13 µV and -13 µV when the OP AMP is in its linear amplifying range. (Usually if there is a negative feedback path around the OP AMP, and if the input signal is suitably small, the OP AMP will be driven into and held in its linear amplifying range by the negative feedback circuit.)

• Golden Rule #2 (Zero Input Current Rule)– No current can flow into the (+) input or the (-)

input of the OP AMP (I+ = 0, I- = 0)

Real vs. Ideal Op Amp Specs

Minimizing effect of Input Bias Currents

Ib3Ib4

Io

(+) Input

(-) Input

The input stage of a “real” OP AMP has a differential pair of transistors (Q3 and Q4) arranged as shown. Note that the constant dc current Io is divided between the Q3 and Q4. Io = Ie3 + Ie4. As the small input voltage vi increases slightly above 0 V, Q3 conducts more of Io and Q4 less, so the output voltage vout developed at the collector of Q4 goes down. Likewise, as vi decreases below 0 V, vout rises. Since vi is small, Ie3 and Ie4 are both approximately equal to Io/2. Therefore, very small “input bias currents” flow into the (+) and (-) inputs of a REAL OP AMP, which are approximately equal to (Io/2)/(β+1), on the order of a µA.

vout

The presence of these very small input bias currents can cause the output voltage of an op amp configured as an inverting amplifier to deviate from zero when its input is held precisely at 0 V. This problems is solved by adding resistor R3 as shown below.

-

For an ideal OP AMP, the presence of R3 would be immaterial, since (by Rule #2 of the OP AMP there is NO CURRENT flowing into the (+) and (-) inputs. However, in any real OP AMP, a very slight bias current flows, on the order of a few hundred nanoamperes.

Ib-

Ib+

Δ V-

Δ V+

Using Linear Superposition, we will think only about the very small voltage offsets at the (+) and (-) inputs that are contributed by the effects of the input bias currents. This means that we will temporarily set the Vin and Vout sources to ZERO in the inverting OP AMP circuit.

Without R3 present, there would be a small negative voltage offset introduced by the bias current “ib-” flowing into the (-) input which is given by

Δ V- = -(ib-)*(R1 // R2)

If ib- is 1 nA and R1 // R2 = 1 kΩ, then Δ V- = -1 nA * 1 kΩ = -1 µV, and when it is amplified by the open loop gain of the OP AMP (-105), the undesired voltage at the output of the OP AMP (even when Vin = 0 V) would be Vout = 100 mV.

The input bias current problem is even worse when R1 // R2 is larger than 1 kΩ.

With R3 present, there will be a nearly identical small negative voltage offset introduced by the bias current ib+ which is given by Δ V+ = -(ib+)*R3

Thus Δ V+ and Δ V- will be nearly equal and largely cancel each other, as long as R3 is chosen so it is equal to R1 // R2 and as long as ib+ is approximately equal to ib-, which will be the case if the OP AMP is operating in its linear amplifying region, where Golden Rule #1 (Virtual Voltage Rule) applies.

Single DC Power Supply Inverting AMP

Recall that the electret (or capacitive) microphone needs its own dc power source to operate.

Make R1 = R2 so that the (+) input is held at Vcc/2, which is taken as the 0 V reference (ground). Thus the positive DC supply pin is at +2.5 V w.r.t ground, and the negative DC supply pin is at -2.5 V w.r.t. ground.

Make R1//R2 = R3//R4 for input bias current compensation

C1 and C2 are needed to isolate 2.5 V OP AMP ground from the ground in the rest of the circuit!

Note that the non-inverting OP AMP configuration may be compensated for input bias currents by inserting a resistor in series with the (+) input that is equal to Rf // Ri.

Assume that the input node “Vin” is connected to a transducer or generator whose source impedance is Rg = Rf // Ri

Note that the OP AMP Voltage Follower may compensated for input bias currents if the short circuit is replaced by a resistor equal to Rth.

Inverting Weighted Summing Circuit --- Input Bias Compensation

Defining Differential Mode & Common Mode voltage

Definition of Common Mode Rejection Ratio (CMRR)

Instrumentation Amplifier (3-OP AMP Differential Amplifier)

Biomedical Application of Instrumentation Amplifier: ElectroOculogram EOG

1. EOG electrical potentials arise due to the permanent “Electric Dipole Vector” that is set up between the cornea and the ocular fundus.

2. This electric dipole causes a potential difference to be projected onto the surface of the skin, and it may be picked up by electrodes placed on either side of the eye socket, as shown to the left.

3. When the eyes are looking straight ahead, the dipole + and – charge centers of the dipole cancel, and no voltage is picked up across the electrodes.

4. But when the eyes are looking at a 30 degree angle, the + and – charge centers are displaced far enough that a potential difference on the order of 1 mV can be picked up by the electrodes across either eye socket.

5. This is commonly referred to as the cornea-retinal potential (CRP) with the cornea being positive.

Moving eyes to the right (keeping head STILL) causes a positive EOG voltage to be picked up by the electrodes, while moving eyes to the left (head fixed) produces a negative EOG voltage. The magnitude of the voltage indicates how much off of dead center the eye is looking.

Looking to the right causes a positive deviation in the EOG, looking straight ahead produces zero voltage, and looking to the left causes a negative deviation in the EOG.

EOG Waveform A is produced by having the patient stare at an object and also move their head back and forth while their eyes are fixed on the object. The human eye has a remarkable “image stabilization” control system that makes the eyes move back and forth their sockets, as they track the object

EOG Waveform B is produced by moving an object back and forth while the patient keeps his head perfectly still while his eye track the moving object.

1. Used by sleep lab technicians to detect dream states in a sleeping patient, which are characterized by REM (rapid eye movement) sleep.

2. Measuring the rate at which a person is reading each line in a book. Note that the reader must not be allowed to move his head, but rather to simply track the words on the line with his eyes.

3. Electrooculography was used by Robert Zemeckis and Jerome Chen, the visual effects supervisor in the movie Beowulf during the enhanced performance capture to correctly capture and animate the eye movements of the actors.

4. Ophthalmological diagnosis: Used by doctors to assess the function of the pigment epithelium. During dark adaptation, the resting potential decreases slightly and reaches a minimum ("dark trough") after several minutes. When a light is suddenly switched on, a substantial increase of the resting potential occurs ("light peak"), which drops off after a few minutes when the retina adapts to the light. The ratio of the voltages (i.e. light peak divided by dark trough) is known as the Arden ratio, which indicates something about the patient’s eyesight and whether that person should be allowed to drive at night.

EOG Applications

5. A final application of the EOG might be to measure the SHIFTY EYES of a politician!

…..“If I am elected, I will never, never, never raise your taxes!”

Can we tell if this man is telling the truth by measuring his EOG during a campaign speech???

Of course the base resistor, collector resistor and the beta of the BJT must be chosen so that the BJT is guaranteed to saturate when the OP AMP saturates at its +13 V output level. For example, if we desire the output resistance of the comparator (BJT inverter) must be 1 kilohm (Rc = 1 kΩ), then the maximum allowable value of Rb which will hold the BJT on the edge of saturation may be calculated as shown below. This value of Rbmax will demand minimum driving current from the OP AMP. Assuming Vcc = 5V, β = 100, and (Vce)sat = 0.1 V:

RcRb

VVoVccoV

7.0

kRb

kRb

VVVV

251

11007.00.13

51.0

max

max

Disadvantages of the Single OP AMP Precision Full-Wave Rectifier

)log(10 IoRfIoRf Note:

Thus we may write 06.0

)log(06.0

10IoRfVi

Vo

Now it is clear that if the logging circuit is connected directly to the antilogging circuit (assuming Rf = Ri and the same “Io” BJT values), then Vo = Vi. That is, the dc offset added by the logging circuit, 0.06*log(Ri*Io), is exactly the same as the dc offset that is subtracted by the antilogging circuit!

211

1211

1010101 )1log()2log()1log(

VVIoR

VVIoRVo

IoRVo IoRVV

R1*Io

Now the output of the summer Vc has been calculated, we put this through the antilogging circuit to calculate Vo, the system output.

Inverting Differentiator

• The OP AMP differentiator is used to perform the mathematical operation of differentiation. |

• The circuit shown on the next slide is not practical, because it is a true differentiator and is therefore extremely susceptible to high frequency noise since AC gain increases at the rate of 20 dB per decade, and is therefore approaching infinity at very high frequencies.

• In addition, the feedback network of the differentiator, formed by R1 & C1, is an RC low pass filter which contributes 90 degree phase shift to the loop and may cause stability problems even with an OP AMP which is compensated for unity gain.

Iin

≈ 0 V

dt

dvCRIinRv

dt

dvCIin

inout

in

)( 111

1VinRsC

sC

RVinVout )(

)/(1 111

1

In the time domain: In the frequency domain:

Multiplication by s = jω in the frequency domain is equivalent to differentiation w.r.t. time in the time domain.

VirtualGroundNode

Practical Differentiator Circuit

A practical differentiator is shown above. Here both the stability and noise problems are corrected by the addition of two additional components, R1 and C2. R2 and C2 contribute a 20 dB per decade high frequency roll-off in the feedback network and R1*C1 form a 6 dB per octave roll-off network in the input network for a total high frequency roll-off of -40 dB per decade. This reduces the effect of high frequency input and amplifier noise. This circuit design requires that we make R1*C1 and R2*C2 equal to the frequency “fh”

Vout

Vin

ZfZi

Vout

Vin

1

1

R2s C2

R11

s C1

Vout

Vin

s R2 C11 s R2 C2( ) 1 s R1 C1( )

The resulting Bode (dB Gain vs. Log Frequency) plot is shown below.

Note that an ideal integrator must multiply by Vin(s) by “s = j 2π f” in the frequency domain, so the gain of this integrator is “R2*C1”, and the gain of the integrator passes through 0 dB (unity) at fc = 1/(2π*R2*C1) Hz

Note that the circuit properly differentiates signals whose frequency lies below

fh = 1/(2π*R1*C1) = 1/(2π*R2*C2) Hz

But it will NOT differentiate signals of frequencies above fh.

Application of Differentiator: QRS Complex Detector

Atria Contract

d

The QRS complex, which is associated with the ventricles contracting is often used to initiate an audible tone burst to let the nurse/doctor know when the patient’s ventricles are contracting.

To make the QRS complex stand out “like a sore thumb” from the rest of the ECG waveform, a differentiating circuit may be used to emphasize the relatively large slope of the QRS complex.

A voltage comparator may be used at the output of the integrator to derive a QRS (R-wave) pulse that can gate on an audio tone.

Inverting Integrator

iIN = Vin/R1

Time Domain Analysisvc

1

Ctic

d

vout1

C1tic

d

1

C1t

vin

R1

d

vout1

R1 C1tvin

d

Frequency Domain Analysis

Vout

Vin

ZfZi

1

s C 1

R 1

1

R 1 C 11

s

Multiplication by 1/s in the frequency domain is equivalent to integration w.r.t. time in the time domain.

Moving switch to Position 1 puts circuit in RESET mode, where Vout = 0 V.

Flipping switch to Position 2 puts circuit in INTEGRATE mode.

Virtual Ground

CD4066BC Quad Bilateral SwitchThe CD4066BC is a quad bilateral SPST switch, where Vcontrol = 5 V => Switch closed Vcontrol = 0 V => Switch open It is intended for the transmission or switching of analog or digital signals. It has a low (80 ohm) “ON” resistance that stays constant over the input-signal range.

NOTE: The integrator can be reset using an electronic switch rather than a mechanical one

1. This circuit is essentially a low-pass filter with a frequency response decreasing at 20 dB per decade.

2. Its gain vs. frequency Bode plot is shown below. Note this circuit exhibits INFINITE gain at DC! This is a practical problem, since any small dc voltage offset in the circuit or the input signal will cause the integrator output to slowly ramp up (or down) until the OP AMP saturates, and the integrator stops integrating.

3. The circuit must be provided with an external method of establishing an initial condition (Vout = 0 V)

4. R2 must be chosen = R1 for minimum error due to bias current.

Vout

Vin

ZfZi

1

s C 11

R 3

R 1

R 3

R 1

s C 1 R 3 1

Low_Freq_GainR 3

R 1

Frequency Domain Analysis

Note that adding R3 rolls off the low frequency gain of the integrator. It now only integrates signal frequencies well above frequency fc. The problem of OP AMP saturation due to a dc voltage offset has been eliminated. Note that for frequencies well above fc, the gain of the inverting integrator is -1/(R1*C1)*1/s

Practical Inverting Integrator: First-order Low-pass Filter (LPF)

f break1

2 R 3 C 1

Integrator Application: Triangle WaveDerived from Square Wave

Note that this is a single-power supply op amp circuit, where ground is established at Vcc/2.

R

First-Order High Pass Filter (HPF)

Vout

Vin

ZfZi

R O

1

s C 1R 1

s C 1 R o

1 s R 1 C 1

f break1

2 R 1 C 1

Analysis of High Pass Amplifier

High_Freq_GainR o

R 1(3-dB down frequency)

Normalized Frequency, f / fbreak

Lowpass vs. Highpass Filter

Gain is down 3 dB at f = fbreak

Bandpass Filter (BPF) May be made by cascading LPF and HPF with OVERLAPPING break frequencies

(ωbreakLPF = 1/τ2 >> ωbreakHPF = 1/τ1)

Single OP AMP Bandpass Filter(Made by combining LPF and HPF Designs)

Analysis:(Log Scale)

Gain in dB = 20*log(|Vo/Vi|)

ωb1=1/(R1C1) ω

Vout

Vin

ZfZi

1

s C 11

R 1

1

s C 2R 2

R 1 C 2 s

1 s R 1 C 1 1 s R 2 C 2

ωb2=1/(R2C2)

Passband Gain = 20*log(R1/R2)

Note that the passbands of the LPF and HPF must OVERLAP, thus the break frequency of the LPF (ωb1 = 1/(R1*C1)) must be >> than the break frequency of the HPF (ωb2 = 1/(R2*C2))

Active Analog Filter Prototype Design

1. Analog LPF filter designs are presented that have a break frequency of ωo = 1 radian/second and resistance values of 1 ohm. Then the design is magnitude scaled and frequency scaled so that the design uses more practical resistor values and exhibits the desired break frequency.

2. Three different types of analog filters are commonly designed: Butterworth, Bessel, and Chebyshev.

3. The benefits of each type of filter design are summarized on the next page.

Butterworth, Bessel, and Chebyshev Analog Filters

Analog Filter Prototype Design

2nd-order Bessel Butterworth and Chebyshev LPF Gain vs. Frequency Plots (fbreak = 10 kHz)

Note that Bessel has widest transition band between passband and cutoff, and Chebyshev has sharpest transition band, but Chebyshev has passband ripple. Butterworth’s transition bandwidth is between the Chebyshev and Butterworth

2nd-order Bessel, Chebyshev, and Butterworth Phase Shift vs. Frequency (fbreak = 10 kHz)

Notice that the Bessel LPF has the most linear phase shift in its passband, this means that each frequency component in a wide bandwidth signal will be delayed by the same amount as it passes through the filter, since delay through the filter is proportional to –dφ/dω, thus there will be the least “delay distortion” imposed by the Bessel filter. The Chebyshev as the largest delay distortion, and the Butterworth exhibits intermediate delay distortion.

Group Delay vs. Frequency

Butterworth (Maximally Flat) LPF

where•n = order of filter•ωc = cutoff

frequency(approximately the -3dB frequency)

•G0 is the DC gain (gain

at zero frequency)

Note that in the stop band the gain falls off at a rate of -20n dB/decade.At the break or cutoff frequency fc = ωc/(2π), the gain is -3dB.

Impedance Magnitude and Frequency Scaling an analog prototype filter design

For C:

For L:

Combined Result: Scaling analog prototype filter design so its 1 ohm resistor values are scaled up to R ohms, AND ALSO so its break frequency is scaled from 1 radian/second up to ωc = 2π*fc radians per second, or up to “fc” Hertz:

1. 1 ohm resistors are replaced with “R” ohm resistors

2. “C” Farad capacitors are replaced with C/(2π*fc*R) Farad capacitors

3. “L” Henry inductors are replaced with R*L/(2π*fc) Henry inductors. (Note: inductors are RARELY used in modern active filter design, since they are bulky, expensive, and most important, less ideal than capacitors.)

Magnitude and Frequency Scaling Example

Vout

+

-

+

0

-

Vin

1Vac0Vdc

R1

1_OhmV

C1

1_Farad

L1

1_Henry

1

2

The passive component bandpass filter shown below is made from a 1 ohm resistor, 1 F capacitor, and 1 H inductor; it has peak response (passband center) at 1 radian/sec. = 1/(2π) Hz

Note that the passband gain is unity and the center of the passband is at 1 r/s = 1/(2π) Hz

Frequency

10mHz 30mHz 100mHz 300mHz 1.0Hz 3.0Hz 10Hz 30Hz 100HzV(R1:2)

0V

0.2V

0.4V

0.6V

0.8V

1.0V

-

+

-

+

V

0

VoutL1

1000_Henry

1

2

C10.001_Farad

R1

1000_OhmVin

1Vac0Vdc

We desire to impedance magnitude scale each component up by a factor of 1000, so R1 becomes 1 kilohm.

Multiply R1 by 1000 => R1new = 1000 ohmsMultiply L1 by 1000 => L1new = 1000 HenryDivide C1 by 1000 => C1new = 1/1000 Farad

Note that the center of the passband and the passband gain has NOT changed

Frequency

10mHz 30mHz 100mHz 300mHz 1.0Hz 3.0Hz 10Hz 30Hz 100HzV(R1:2)

0V

0.2V

0.4V

0.6V

0.8V

1.0V

Now we desire to both magnitude scale the circuit impedances by a factor of 1000 and also shift the pass frequency from 1 r/s to 5 kHz = 2π*5000 r/s

Multiply original R1 by 1000 => R1new = 1000 ohmsMultiply original L1 by 1000/(2π*5000) => L1new = 31.83 mHDivide original C1 by 1000*(2π*5000) => C1new = 31.83 nF

Vout

+

-

+

0

-

V

Vin

1Vac0Vdc

R1

1000_Ohm

C131.83nF

L1

31.83mH

1

2

Note that the passband gain is still unity, but now the center of the passband has been changed from 1 r/s to 5 kHz, as desired!

Frequency

100Hz 300Hz 1.0KHz 3.0KHz 10KHz 30KHz 100KHz 300KHz 1.0MHz 3.0MHz 10MHzV(R1:2)

0V

0.2V

0.4V

0.6V

0.8V

1.0V

Sallen-Key Unity Gain LPF, HPF Design

Taken from “Practical Interfacing in the Laboratory: Using a PC for Instrumentation, Data Analysis and Control” by Stephen DeRenzo, Cambridge University Press (July 14, 2003)

LPF filter – A convenient value of R is chosen, then C1 and C2 must be calculated from given amplitude and frequency scaling formulas, where ωo = 2πfo is the desired break frequency.

HPF filter – A convenient value of C is chosen, then R1 and R2 must be calculated from given amplitude and frequency scaling formulas, where ωo = 2πfo is the desired break frequency.

Note the magnitude and frequency scaling are performed by the given formula. Table 2.3 gives the prototype design for C1 = k1, and C2 = k2, where wo = 1 r/s, and R = 1 ohm

4th-Order Butterworth LPF Design Example. Note that the two 2nd-order stages can be cascaded in either order!

Analysis of 2nd-Order Sallen-Key LPF Topology

Note that R1+R2 is added for input bias current compensation. Since virtually no current flows through this resistor, we may assume V3 = V+ = V- = Vo

Given

V1 V2R

Vo V21

s C1

V3 V2

R 0

V3

1

s C2

V3 V2R

0 V3 Vo

Vo

V1

1

s2

R2 C1 C2 s 2 R C2 1

Analysis:

Solving for Vo, V2, and V3 yields

This is the general 2nd-Order Sallen-Key LPF Transfer Function

Let us replace s by jω, and also let us see if this general Sallen-Key LPF filter topology yields a 2nd-order Butterworth Filter if we adjust our components according to Table 2-3.

According to Table 2-3, we may make R = 1 ohm, C1 = 1.414 F = sqrt(2) F, and C2 = 0.707 F = 1/sqrt(2) F.

Vo

V1

1

s2

R2 C1 C2 s 2 R C2 1

s j R 1 C1 2 C21

2

Vo

V1

1

2

i 2 1

Vo

V1

1

2 21

2 2

Vo

V1

1

11

2 2

Note that we end up with the magnitude of the frequency response of the 2nd-order Butterworth LPF that was shown earlier!

Noise in Analog Instruments

From: Principles of Electronic Instrumentation, 3rd Edition By A. James Diefenderfer and Brian A Holton

Noise in an OP AMP

Boltzmann’s Constant:

k = 1.38 x 10-23 J/K

Note: “vn” and “in” are OP AMP noise parameters referred to the input of the OP AMP that can be found in the OP AMP’s data sheet

Example: From LMV721 “Low Noise” OP AMP Data Sheet

Note the en and in parameters in this data sheet!

Why do the rms value of random noise contributions add as the square root of the sum of the square?

3

AvCL = 1/β = (Rin + Rf)/Rin

(From the Getting Started with Orcad Document)

Recommended