Laboratory 4: Feedback and Compensation To be performed during Week 9 (Oct. 20-24) and Week 10 (Oct. 27-31) Due Week 11 (Nov. 3-7) 1 Pre-Lab This Pre-Lab should be completed before attending your regular lab section. The Lab TA will need to see your completed Pre-Lab and check it off at the start of the lab session before you can begin taking your measurements. Read Sections 8.1, 8.8.1, 8.10, 8.11.1, and 8.11.2 in the text, which cover feedback, stability, and frequency compensation. This lab will demonstrate the effect of negative feedback on amplifier performance, and demonstrate one method of frequency compensation. The first part of the lab involves the construction and characterization of an open-loop amplifier whose poles are accurately set by discrete resistors and capacitors. In the second part we will close a feedback loop around the amplifier and measure its effect on amplifier performance, and in the third part we will use dominant pole compensation to stabilize the feedback system. In a practical amplifier, the high-frequency poles and zeros result from the internal capacitances of the transistors. These poles occur at frequencies too high to be measured using a breadboard (the poles of the breadboard wiring appear at lower frequencies than the amplifier poles). To avoid this problem, the high-frequency poles of the amplifier we will build are deliberately and accurately set to relatively low frequencies by external resistors and capacitors. The open-loop amplifier is shown in Fig. 1 1. Calculate the low frequency gain for this circuit (Hint: open circuit all capacitors and consider each of the three gain stages in isolation). 2. Estimate the 3-dB cutoff frequency for this circuit using the method of Open Circuit Time Constants (Hint: op-amp outputs are considered grounds in the OCTC analysis, as are op-amp inputs that are driven to be virtual grounds by feedback). Figure 1: Open-loop amplifier schematic. 1
Figure 2: Open-loop amplifier schematic for spice simulations. 3. From the relative sizes of the time constants associated with each capacitor, which capacitor do you expect to contribute the dominant pole (in other words, which capacitor should we focus on for our frequency compensation efforts)? 2 Simulations Create a.cir file for the circuit shown in Fig. 2 (this is the same circuit as shown in Fig. 1 but with node numbering added). Note the configuration of the input terminals of the third opamp (its terminals are flipped with respect to the other opamps). The spice model for the 741 opamp is available on the class website. Number your nodes as indicated to maintain consistency with the rest of the class, and to make it easier to help you if you have questions. The circuit in Fig. 2 models an op-amp with multiple gain stages, where v in is the negative input, and the positive input is implicitly grounded. This circuit has a high input resistance, low output resistance, and reasonably high gain. The capacitors C 1 - C 3 limit the high-frequency response of this amplifier, playing the role that internal transistor parasitic capacitances play in actual IC (integrated circuit) op-amps. 2.1 Open-Loop 1. Run an AC simulation of the open loop amplifier (A(s)) in Fig. 2 and plot the magnitude and phase response. Save the data points for the magnitude and phase so they can be plotted in Matlab along with the measured data. 2. Using this bode plot, we can predict the stability of different closed-loop configurations. For a feedback factor of β = 3.3/4.3, determine whether or not you expect the closed-loop system to be stable, and if so, record the phase margin. Note: In this amplifier the inversion (180 phase shift) is built into A(s), so you need to check where the magnitude crosses 20 log(1/β) and the phase margin will be how far above 0 the phase is at that frequency. 3. Repeat the previous step for a feedback factor of β = 1/16. 2
2.2 Closed-Loop Figure 3: Closed-loop amplifier schematic for spice simulations. We will now close a feedback loop around the amplifier and run transient simulations to validate our stability predictions from the open-loop simulations. Save a new spice file with a feedback network connected around the amplifier, as shown in Fig. 3 (save the open-loop spice file, as we will use this again for compensation). The triangular block represents the entire 3-stage amplifier of Fig. 2 (our op-amp ) with the corresponding nodes labeled. This feedback configuration corresponds to the familiar inverting amplifier, with the closed loop gain given by A CL R b /R a (assuming that A(s)β >> 1) and the feedback factor given by β = Ra R a+r b. 1. In your new spice file for the closed loop amplifier, let R a = 1 kω and R b = 3.3 kω to implement a feedback factor of β = 3.3/4.3. Ground the input (remove the v in source in Fig. 2 and connect the positive input of the first opamp to node 0 (ground) instead of node 1)and run a transient simulation with a length of 1 ms. Plot the output voltage and observe whether or not the feedback amplifier oscillates. 2. Change the spice file to let R a = 1 kω and R b = 15 kω to implement a feedback factor of β = 1/16. Re-run the transient simulation (again with a length of 1 ms) and plot the output voltage (retain this plot for your lab report). Observe whether or not the feedback amplifier oscillates, keeping in mind that any non-periodic disturbance that you observe are probably just numeric artifacts. 3. With the same feedback factor of β = 1/16, change the spice file to have a 0.1 V, 100 Hz square wave at the input and plot the output for two periods, observing whether any ringing is present in the output signal. Record the rise and fall times, and the amount of overshoot. Save this data to plot in Matlab. 2.3 Compensation We will now compensate the second version of the amplifier (with R a = 1 kω, R b = 15 kω) to increase its stability (and thereby reduce the ringing effects observed in the transient 3
simulation). We will do this using dominant pole compensation, as described in pp. 848-851 of the text. 1. Re-run the AC simulation for the open-loop amplifier and plot the magnitude and phase responses, adjusting the value of C 2 (the dominant pole in the amplifier) until the amplifier has a phase margin of about 70. Record the final value of C 2. 2. Now re-run the transient simulation (with the 0.1 V, 100 Hz square wave input) for the closed-loop amplifier with the new value of C 2, and observe whether or not there is any ringing present. Save this data to plot in Matlab. Record the rise and fall times and overshoot of the output waveform. 3 Measurements Build the amplifier shown in Fig. 1. Note the configuration of the input terminals of the third opamp (its terminals are flipped with respect to the other opamps). Use resistors and capacitors within 10% of the values shown in Fig. 1 (only change the value if the specified resistor value is not available). Record any component values that you end up changing for later use in calculations. You may use any general purpose opamp. Power supplies should be ±10 V, as shown in Fig. 1. 3.1 Open-Loop Connect the signal generator to the input of the open-loop amplifier, and connect the oscilloscope to observe both the input and output waveforms of the amplifier. The low frequency voltage gain of this amplifier is about 100 and the ±10 V power supplies limit the output voltage to a range less than ±10 V, so the input voltage must be less than 100 mv to prevent distortion. Perform the following measurements: 1. Set the signal generator to output a sinusoid, and measure both the gain and phase vs. frequency of your amplifier over a frequency range from 100 Hz to 20 khz, recording 5-10 data points per decade. To measure the phase, compare the delay of the output signal to the input signal, keeping in mind that one period is 360. Remember that this is an inverting amplifier, so the low frequency phase shift will be 180, not 0 as you might expect. 3.2 Closed-Loop 1. Connect the feedback network around the amplifier, as shown in Fig. 3, with Ra = 1 kω and Rb = 3.3 kω. Disconnect the signal generator from your circuit, and ground the input (the v i end of R a in Fig. 3). Connect the oscilloscope to the output and observe the signal (if any) that is present there. Does the circuit oscillate? 2. Now change R b to 15 kω, and again observe the signal at the output (with the input still grounded). Does the circuit oscillate? 4
3. With R b still set at 15 kω, connect the signal generator to the input (remember to remove the connection to ground) and apply a 0.1 V, 100 Hz square wave to the circuit. Is there any ringing in the output signal? Record the rise and fall times and amount of overshoot of the output signal. 3.3 Compensation We will now compensate the second version of the amplifier (with R a = 1 kω, R b = 15 kω) to increase its stability (and thereby reduce the ringing effects observed in the transient simulation). We will do this using dominant pole compensation, with the capacitor values that were determined in the spice simulations. 1. Change the value of C 2 in your circuit to what you determined in your spice simulations. 2. We will first determine the effects of the compensation on the open-loop response of the op-amp. Temporarily remove R a and R b from your circuit and apply a lowfrequency sinusoidal signal to the input and increase the frequency until the gain has dropped by 3 db from its low-frequency value (observe the gain by comparing the input and output amplitudes with the oscilloscope). Record this value as the 3-dB frequency of the compensated opamp. 3. We will now observe the output of the feedback amplifiers with a square wave input. Add the feedback resistors R a = 1 kω, R b = 15 kω back to your amplifier, remembering that the signal generator will now be applied to R a instead of directly to the opamp input. Set the signal generator to apply a 0.1 V, 100 Hz square wave to the input of the feedback amplifier. Observe if there is any ringing present in the output signal, and record the rise and fall times and amount of overshoot 4 Analysis Answer the following questions in the analysis section of your lab report: 1. Using Matlab, plot your measured and simulated results for the magnitude and phase of the open-loop gain of the uncompensated amplifier on the same axes. Include this plot in your report. Discuss how well they match, and what could be responsible for differences between them. 2. Compare the 3-dB frequency for the open-loop uncompensated amplifier calculated in the pre-lab to those from the simulations and measurements. Does the Open Circuit Time Constant method yield a reasonable approximation of the 3-dB frequency? 3. Using Matlab, plot the simulated results for the square wave responses of the closedloop compensated and uncompensated amplifiers on the same axes. What effect does compensation have on the rise and fall times of the closed-loop amplifier? 5
4. Compare the measured and simulated rise and fall times of the closed-loop compensated amplifier. Does the difference between the measured and simulated rise and fall times coincide with the difference between the measured and simulated 3-dB points of the open-loop compensated amplifier? 5. If we increased the compensation capacitor (C 2 ) further, what effect would you expect to observe on the rise and fall times of the closed-loop system? 6