Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Revision: Sept. 23, 2014 Overview In this lab, we will experimentally explore characteristics of operational amplifiers (op-amps), especially those related to operation of non-ideal op-amps. Specifically, we will investigate the effects of: • Finite open-loop gain and bandwidth on the performance of closed-loop op-amp circuits. • Nonlinear distortions (slew-rate limiting and output saturation) • DC imperfections in the op-amp (input offset voltage and input bias current) • Finite differential gain, non-zero common-mode gain and the Common Mode Rejection Ratio (CMRR) Before beginning this lab, you should be able to: • • • • • State rules governing ideal op-amps (Module 3.1) Analyze electrical circuits which include ideal op-amps (Module 3.1) State the definition of slew rate (Sedra and Smith, section ) Represent an op-amp with DC imperfections as an ideal operational amplifier with an input offset voltage (Sedra and Smith, section ) Define Common Mode Rejection Ratio (Sedra and Smith, section ) After completing this lab, you should be able to: • • • • • • • Model op-amps as first order systems Analytically determine the frequency response of circuits containing op-amps modeled as first order systems Determine the gain-bandwidth product of a circuit Calculate the slew rate of an op-amp from experimental data Experimentally determine input bias currents for a non-ideal op-amp Design a circuit to compensate for op-amp DC imperfections Experimentally determine the Common Mode Rejection Ratio of an op-amp This lab exercise requires: • • • EE 352 Analog Parts Kit Breadboard Function Generator, oscilloscope Symbol Key: Demonstrate circuit operation to teaching assistant; teaching assistant should initial lab notebook and grade sheet, indicating that circuit operation is acceptable. Analysis; include principle results of analysis in laboratory report. Numerical simulation (using PSPICE or MATLAB as indicated); include results of Matlab numerical analysis and/or simulation in laboratory report. Record data in your lab notebook. Contains material © Digilent, Inc. 8 pages Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 2 of 8 I. Effects of finite open-loop bandwidth on circuit performance An ideal operational amplifier has an infinite open-loop gain, independent of frequency. Practical amplifiers have a finite open loop gain which decreases with frequency. A typical frequency response for an internally compensated op amp is: Vout = A0ωb (V+ − V− ) jω + ω b (1) where A0 is the op amp’s open loop DC gain, ωb is the op amp’s open-loop cutoff frequency, Vout is the voltage at the op amp’s output terminal, and V+-V- is the voltage difference between the input terminals, as shown in Figure 1. Thus, the amplitude response of the amplifier itself is very high at low frequencies, and begins to roll off at approximately 20 dB/decade at frequencies above ωb. The amplifier gain at ωb is 3dB lower than (a factor of 1 times) the amplifier DC gain. 2 - V- Vout op 27 V+ + Figure 1. Open-loop op-amp. In part I of this lab assignment, we will investigate the effects of the non-ideal op amp’s frequency response on the closed-loop frequency response of an inverting amplifier circuit. Pre-lab: Using equation (1) as your op amp model, determine an analytical expression for the frequency response of the inverting amplifier shown in Figure 2. Determine an analytical expression for the DC gain and the bandwidth of the amplifier as a function of R1, R2 and ωT=A0ωb. (Note: The bandwidth of the amplifier is defined as the frequency at which the gain is a factor of 1 times – or 3dB below 2 the DC gain of the amplifier.) Plot the gain-bandwidth product of the inverting amplifier as a function of the ratio R2 . The gain-bandwidth product is defined as the product between the amplifier’s DC R1 gain and the 3dB frequency of the amplifier. Use nominal op27 parameters provided in the on-line specification sheet as necessary for your gain-bandwidth plots. R2 R1 + Vi - op27 + Figure 2. Inverting Closed-Loop Amplifier VO Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 3 of 8 Lab Procedures: Connect the circuit shown in Figure 2. Use the oscilloscope to measure Vi and Vo. With R1 = 10 KΩ and R2 = 33 KΩ, set the signal generator output to 0.1V0-peak at 100 Hz. Use this frequency input to determine the DC gain of the amplifier. Increase the frequency as necessary to determine the bandwidth (3dB frequency) of the amplifier. Record the bandwidth and DC gain of the amplifier in your lab notebook. Demonstrate operation of your circuit to the Teaching Assistant. Have the TA initial the appropriate page(s) of your lab notebook and the lab checklist. Repeat this process for R2 = 100 KΩ and R2 = 220 KΩ while maintaining R1 = 10 KΩ. Compare the gain-bandwidth products you measured above with the analytical values determined in the pre-lab and calculate a percentage error between measured and analytical values. II. Nonlinear distortion – slew rate The slew rate of an op amp is the maximum rate of change possible at the output of a real op amp. This effect can result in a nonlinear distortion of rapidly-varying signals applied to the amplifier input. (Recall that linear systems provide a sinusoidal output to a sinusoidal input, with the output sinusoid frequency is the same as the frequency of the input sinusoid.) Pre-lab: Calculate the output voltage for the circuit shown in Figure 2, assuming an ideal op amp. Sketch the expected output voltage response as a function of time for a unit step input in Vi. (e.g. Vi is 0V for t<0 and 1V for t>0.) Next, using the slew rate provided in the attached op27 specification sheet, sketch the expected output voltage response for a slew-rate limited op amp as a function of time for a unit step input in Vis. (e.g. Vi is 0V for t<0 and 1V for t>0. (Note: Figure 2.26 in Sedra and Smith may help.) Lab Procedures: Using the circuit in Figure 2 and with R1 and R2 = 10 KΩ, apply a square wave input that alternates between equal positive and negative voltages at 100 Hz. Adjust the amplitude of the square wave until the output Vo viewed on the oscilloscope just reaches 15VP-P. To determine the slew rate of the amplifier, it will be necessary to measure the change in voltage, ∆V0, which occurs in a measured time interval, ∆t. Expand the horizontal sensitivity of the oscilloscope as necessary to obtain a display of the rising voltage. Then, measure ∆V over a convenient interval of the linear portion of the display. Also measure the time interval ∆t over which the voltage change, ∆V, occurs. Calculate the slew rate S = ∆V/∆t. Compare your results to the slew rate provided in the specification sheet. Demonstrate your circuit to the TA and have them initial your lab notebook and the lab checklist. Now connect a 10V0-P sine wave, ViB to the circuit. Increase the frequency of the sine wave until it exceeds the maximum value specified by f ≤ S . Observe the effects on the output waveform 2π ⋅ Vo − p as you exceed this maximum frequency by greater and greater amounts. Sketch the output observed for one such frequency in your lab notebook. Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 4 of 8 III. DC Imperfections Non-ideal effects are commonly encountered when applying DC voltages to real op amps. This section of this lab assignment is intended to introduce you to the concepts of input offset voltage (Vos) and input bias current. Techniques for reducing the effects of these offsets are also introduced. Pre-lab: (a) Derive an expression for Vout for the circuit of Figure 3. Your result will be a function of R1, RF, and Vos. Assume the op amp is ideal. (b) Show that the for the circuits of Figures 4a and 4b, the equations for IB1 and IB2 are: IB1 = (Vo - Vos)/R IB2 = (Vos - Vo)/R Note: The output offset voltage (Vos) is not shown in Figures 4. You will need to include it to obtain the above equations. Lab Procedures: (a) Input Offset Voltage: Connect the circuit shown in Figure 3 with R1 = 100 Ω and RF = 1 MΩ. Vos is an internal voltage within the op amp and is only represented as a voltage source in the circuit schematic (the non-inverting input to the op amp is actually shorted to ground when you build your circuit). While shorting the noninverting or pin 3 of the op amp to ground, measure, or estimate as best as possible, and record the value of Vout. Use the Vout equation determined in the pre-lab to calculate the input offset voltage for your op amp. Compare your result with the value provided on the specification sheet. Demonstrate your circuit to the TA and have them initial your lab notebook and the lab checklist. RF Op27 R1 + Vos + + Vout - - Figure 3. Output DC offset due to Vos. Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 5 of 8 (b) Input Bias Current and Input Offset Current: We will perform two measurements in order to determine the input bias currents into each input terminal of the op amp (IB1 and IB2) of the op27 op amp as outlined below: 1. Connect the circuit shown in Figure 4a with R = 1 MΩ. Measure and record Vo. Calculate IB1. 2. Connect the circuit shown in Figure 4b with R = 1 MΩ. Measure and record Vo. Calculate IB2. Op amp manufacturers typically provide the average and difference of the bias currents in their specification sheets. Therefore, after determining experimentally the bias currents, calculate the average value (the input bias current, IB) and the difference (the input offset current, IOS) as shown in equation (2) below. Include your measurements and calculated input bias current and input offset current in your lab notebook. Compare your values with those provided in the specification sheet. Demonstrate your circuit to the TA and have them initial your lab notebook and the lab checklist. I B1 + I B 2 2 = I B1 − I B 2 IB = I OS (2) R IB1 op27 + Figure 4a. IB1 bias op27 + + Vout - R IB2 + Vout - Figure 4b. IPB2 bias (c) Offset Voltage Compensation: Finally, we will investigate a circuit which allows us to reduce the effects of the DC imperfections. The development of the compensating circuit is provided in section 2.7.2 of Sedra and Smith. Specifically, see equation 2.46 for the value of the compensating resistor. Measure the effects of both the uncompensated and compensated circuits as described below. Record your measurements in your lab notebook. Demonstrate both circuits to the TA and have them initial your lab notebook and the lab checklist. 1. Determine the behavior of the uncompensated circuit, connect the circuit shown in Figure 5a with R1 and RF = 1 MΩ. Measure and record the total output offset voltage Vout = Vos. 2. Now use a compensating resistor connected to the non-inverting input. Connect the circuit shown in Figure 5b and measure and record the total offset voltage Vout = Vos. Note: It should be Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 6 of 8 sufficient to choose a value for the compensating resistor which is not exactly the desired resistance, as long as it is near the desired value of R1 RF . RF RF − IB1 R1 Op27 + IB2 − + Vout = IB1 RF - Figure 5a Uncompensated circuit IB1 R1 IB2 Op27 + Vout R = R1 II RF + = Ios RF - Figure 5b Compensated circuit IV. Unstable Circuit Configuration As a demonstration of improper terminal connection, create a circuit by feeding back the output voltage to the non-inverting input to the op amp. Specifically, for the circuit of Figure 3, short the inverting pin to ground and connect feedback resistor RF between the non-inverting pin and the output. Record the resulting Vout. Demonstrate your circuit to the TA and have them initial your lab notebook and the lab checklist. V. Common Mode Rejection Ratio In this part of the lab assignment, we will experimentally determine the common mode rejection ratio for our op27 operational amplifier. In order to determine this value, it will be necessary for us to experimentally determine the common mode gain, the open loop gain (or differential gain) of the amplifier. In general, it is desirable to have a very low common mode gain (ideally, zero) and a very high differential gain (ideally, infinity). The CMRR provides a measure of the relative values of the differential and common mode gains for a given op amp and is defined as: CMRR = 20 log Ad ACM (3) where Ad is the differential gain and ACM is the common mode gain. The CMRR is discussed in Sedra and Smith in section 2.4. Pre-lab: None Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 7 of 8 Lab Procedures: (a) Common Mode Gain: Connect the circuit shown in Figure 6. Set the input Vcm to be a 100 Hz 10Vpp signal. Refer to the op27 data sheet for the optional output offset null circuit. (Note: Use of this circuit is discussed in Sedra and Smith, section 2.7. Especially see Figure 2.30 of Sedra and Smith. The DC offset of the op27 is small enough so that you probably will not need to use an offset null circuit.) Use the oscilloscope with AC coupling to measure and record Vcm and Vout, and then determine and record the Common Mode Gain. Demonstrate your circuit to the TA and have them initial your lab notebook and the lab checklist. + 12 V − + VOut Op27 Vcm + - - 12 V Figure 6 Common Mode Output (b) Differential Mode Gain: Connect the circuit shown in Figure 7 with R1 = 1.5 KΩ, R2 = 5.6 KΩ, R3 = 10 KΩ, and R4 = 10Ω. Since the open loop gain is very large, very small changes in the amplifier input voltages will radically affect the output voltage. Notice that the variable DC voltage applied from the V1 power supply is divided down by a factor of about 1000 in the 10Ω to 10 KΩ divider network. Be sure to accurately record all of the values of the resistors as well as the voltages V2 and Vo at two different settings. Beginning with V1 set to a voltage that results in a Vo of approximately -9 volts, carefully change V1 to a new value to get a change to Vo that results in a +9 volt reading. The following equations, using actual values from the circuit in Figure 7, are important to the calculations of open loop gain: V3 ≈ V2/1000 Ad = Vo/VDiff V3 = V2R4/(R3 + R4) VDiff = V3+ - V3- Vo = Vo- - Vo+ R2 R1 R3 V1 V2 DMM + Vcc − Op27 V3 R4 + - VEE + Vo VOM - Lab Assignment 4: Non-Ideal Operational Amplifier Behavior Page 8 of 8 Figure 7 Differential Mode Gain (c) CMRR: Determine the CMRR of your amplifier from equation (3) above. Compare your result with the manufacturer’s specified value. Lab Report: In your lab report, provide a summary of the results of this lab assignment. You should include, at a minimum, all items indicated on the lab checklist. Append the lab checklist sheet with teaching assistant initials indicating completed lab demos to your report.