op amp design

7
Design steps taken from 1) www.ece.utah.edu/~harrison/ece5720/opampsim1.pdf 2) www.ece.utah.edu/~harrison/ece5720/opampsim2.pdf This assignment will take you through the simulation and basic characterization of a simple operational amplifier (opamp). While most digital circuits use a single-polarity power supply (e.g., vdd and gnd), many analog circuits . especially op amps are powered by a dual-polarity power supply (e.g., vdd, vss, and gnd). By convention, vdd is positive relative to gnd (e.g.,+1.2V) and vss is negative relative to gnd (e.g., -1.2V). The use of dual-polarity power supplies allows us to center ac signals at gnd and build circuits capable of generating signals that swing above and below gnd by a few volts. However the current technology offers only single polarity supply where the vdd=1.2V and the negative supply is gnd=0V. In order to design the opamp we need to redefine the single polarity supply using the analog ground gnda. This voltage can be given by the component gnda from the analogLib library in cadence gnda=600m. So now we have something similar to a dual polarity supply in the current technology to design the opamps. Dual Polarity Single Polarity VDD 2.5V vdd 1.2V Gnd 0V gnda 600mV VSS -2.5V gnd 0V As you can see vdd is positive relative to gnda (e.g.,+600mV) and gnd is negative relative to gnda (e.g., -600mV). We can use the dual-polarity power supplies to center ac signals at gnda and build circuits capable of generating signals that swing above and below gnda by a few hundred millivolts. Important tips: Tie the substrate to gnd. The rule we must always obey is this: Always tie the substrate to the most negative voltage in the circuit. In our case the gnd is the most negative voltage of all since it has the lowest voltage of 0V. Remember, when in simulation, always tie the bodies of all nMOS transistors to the most negative voltage (i.e. gnd), and always tie the bodies of all pMOS transistors highest voltage (i.e. vdd) if it is a single well process. Power supply design for your entire DAC Use the following diagram for the power supply in cadence simulations. Make sure all your signals are centered on the gnda.

Upload: bemypal123

Post on 27-Nov-2014

139 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Op Amp Design

Design steps taken from 1) www.ece.utah.edu/~harrison/ece5720/opampsim1.pdf 2) www.ece.utah.edu/~harrison/ece5720/opampsim2.pdf

This assignment will take you through the simulation and basic characterization of a simple operational amplifier (opamp). While most digital circuits use a single-polarity power supply (e.g., vdd and gnd), many analog circuits . especially op amps are powered by a dual-polarity power supply (e.g., vdd, vss, and gnd). By convention, vdd is positive relative to gnd (e.g.,+1.2V) and vss is negative relative to gnd (e.g., -1.2V). The use of dual-polarity power supplies allows us to center ac signals at gnd and build circuits capable of generating signals that swing above and below gnd by a few volts. However the current technology offers only single polarity supply where the vdd=1.2V and the negative supply is gnd=0V. In order to design the opamp we need to redefine the single polarity supply using the analog ground gnda. This voltage can be given by the component gnda from the analogLib library in cadence gnda=600m. So now we have something similar to a dual polarity supply in the current technology to design the opamps. Dual Polarity Single Polarity VDD 2.5V vdd 1.2V Gnd 0V gnda 600mV VSS -2.5V gnd 0V As you can see vdd is positive relative to gnda (e.g.,+600mV) and gnd is negative relative to gnda (e.g., -600mV). We can use the dual-polarity power supplies to center ac signals at gnda and build circuits capable of generating signals that swing above and below gnda by a few hundred millivolts. Important tips: Tie the substrate to gnd. The rule we must always obey is this: Always tie the substrate to the most negative voltage in the circuit. In our case the gnd is the most negative voltage of all since it has the lowest voltage of 0V. Remember, when in simulation, always tie the bodies of all nMOS transistors to the most negative voltage (i.e. gnd), and always tie the bodies of all pMOS transistors highest voltage (i.e. vdd) if it is a single well process. Power supply design for your entire DAC Use the following diagram for the power supply in cadence simulations. Make sure all your signals are centered on the gnda.

Page 2: Op Amp Design

Before you start simulating the opamp, we need to introduce mismatch. This is done to check that we have the required performance for the opamp inspite of the mismatch. To do this let us change the width of the transistors M1 by +30nm & M2 by –30nm. Change the width of the transistors M3 by –30nm & M4 by +30nm. This is just an example taken here to show the effects of mismatch. When the chip comes from the manufacturer the transistors might have a different mismatch depending on the Width and Length of the transistor. However for our simulation this assumption of mismatch is sufficient. With the following mismatch simulate the opamp as described below. Remember that these mismatch are to be used only for the schematic simulations. When you are doing the layout of the opamp use the actual transistor widths without the mismatch. Unity-gain buffer; input common-mode range Lets check to see if our op amp can function as a basic unity-gain buffer. Connect the negative input to the output, and apply a sine wave (300mV amplitude, 10MHz, centered at gnda) to the positive input. Run a transient simulation that captures 2-3 complete cycles of the sine wave, and plot the input and output waveforms. The output should follow the input closely. Turn in this plot. Now lets measure the opamps input common-mode range. Ideally, an opamp should work the same regardless of the dc levels of the input voltages; only the difference in voltages between the two inputs should affect the output. Of course, real circuits never behave this well. With the op amp still configured as a unity-gain buffer, run a dc simulation where the input voltage is swept from –600mV to +600mV. Plot vOUT vs. vIN and determine the input common-mode range . The range of input voltage where the circuit has a gain of approximately one. Turn in this plot. The input common-mode range of this op amp extends from __________ to ___________. (Dont forget to include appropriate units in all answers.)

Page 3: Op Amp Design

Open-loop gain measurement Let.s measure the open-loop gain of our op amp. Tie the negative input of the opamp to gnda, and connect a dc voltage source to the positive input terminal as shown below. We will perform a dc sweep of this input voltage while observing the output node. First, sweep the input voltage source from –600mV to +600mV. You will see the output voltage swing between its minimum and maximum values. The output voltage range of this op amp extends from ___________ to ___________. Next, concentrate your input voltage sweep over a very small voltage range so that you zoom in on the interesting. part of the output voltage curve - the quick transition from minimum to maximum output. You should use enough points in your simulation to observe this transition region in great detail. (For example, dont just step from -10mV to +10mV in 2mV increments. Use increments at least 100 times smaller than your total sweep range so that you get many points in your graph.) The -10mV to +10mV range is just an example. You will probably need to use a smaller range than this to see the slope clearly. a. Open-loop gain. Estimate the slope of the linear region of your plot of vOUT vs. vIN. This is the open-loop gain. What is the open-loop gain of this op amp? __________________. Now express this gain in terms of dB: ____________________. b. Input offset voltage. In other words, what does the differential input voltage have to be in order to make the output voltage equal zero? Ideally, the answer should be zero. What is the input offset voltage for this op amp? _______________.

Page 4: Op Amp Design

Transfer function and phase margin The input offset voltage measured in the previous problem is very useful for the measurements we are about to make. For these measurements, we want the dc level of vOUT to be very close to zero, since this is the typical value the output will have in closed loop circuits, assuming the input is centered around gnda. However, we need to make our measurements in the open-loop condition, so we have to balance. our high-gain opamp very carefully to keep vOUT ≈ gnda. We do this by adding a dc voltage source vOFFSET in series with one of the inputs. This voltage source is set to the input offset voltage so that if no other signal is present, the output voltage will be approximately 600mV. Add a dc voltage source vOFFSET to the positive input of the opamp. Run a dc simulation to verify that vOUT is approximately equal to 600mV You are now ready to measure the open-loop gain and phase of the op amp as a function of frequency (i.e., the op amp transfer function). Add an ac voltage source to the positive input terminal of the op amp (in series with vOFFSET). We are going to sweep the frequency of this input voltage and then measure the amplitude and phase of the output voltage. What should the amplitude of this input voltage be? You might think that we would have to keep the input voltage amplitude very small. After all, the open-loop gain of our op amp is very high, so a large voltage at the input would surely saturate the output at the limits you measured in a previous problem. Actually, since we are going to perform an ac simulation, it doesnt matter what the amplitude is. When you perform an ac simulation, the simulator first calculates the dc operating point (with all ac sources set to zero), which is why its important to set vOFFSET correctly. From the dc operating point, the simulation constructs a linear, small-signal model of the circuit, just as you have done in homework problems. Since this small signal circuit is linear, it doesn’t matter what the ac voltages are. If the op amp has a gain of 5,000 (for example), you could put in an ac signal with an amplitude of 2V, and the simulation would tell you that the output is a sine wave of amplitude 10,000V. This is completely unrealistic, of course, but that’s the way ac simulation works. Transient simulation is much more realistic. since it doesn’t linearize the circuit, but it’s not the most convenient way to measure transfer functions. Indeed, the entire concept of a transfer function assumes that your circuit behaves linearly so that if you put a sine wave in, you get a sine wave out, and only the amplitude and phase have changed.

Page 5: Op Amp Design

To measure transfer functions, we need to plot vOUT(s)/vIN(s). If we make vIN have an amplitude of 1V and zero phase, vOUT(s)/vIN(s) = vOUT(s), which makes the post processing of the data a bit easier. Plot the gain (in dB) and phase (in degrees) transfer function of the op amp over the frequency range 1Hz to 100MHz. Plot at least 80 points per decade of frequency for good resolution. Turn in this plot. The low-frequency gain of the op amp is _____________________. Does this agree with the open-loop gain measured previously? ________________ _______________________________________________________________________ What is the phase margin of the amplifier? To measure the phase margin, find the unity gain frequency of the amplifier (the frequency at which the gain drops to one, or 0 dB). Now find the phase at this frequency. The phase margin equals 180° plus the phase at the unity gain frequency. For example, if the gain drops to 0 dB at 3MHz, and the phase at 3MHz is -150°, then the phase margin is +30°. If the gain drops to 0 dB at 5MHz, and the phase at 5MHz is -190°, then the phase margin is -10°. Graphically, the phase margin is the distance between the phase and the -180° line, where phases above this line are reported as positive numbers. Note: Dont be fooled if the phase plot suddenly jumps from -180° to +180°. Most simulations restrict phase angles within this range, since -181° is mathematically equivalent to +179°. However, for measuring phase margin, you should unwrap the phase for your calculations. In other words, if the phase has just jumped from -180° to +180°, begin subtracting 360° from the phase angle to preserve the continuity of the phase lag vs. frequency. Real circuits exhibit smooth, continuous phase changes with frequency. The sudden 360° .jumps. are a numerical artefacts. The unity-gain frequency of the op amp is _____________________. The phase margin of the op amp is _______________________.

Page 6: Op Amp Design

Common-mode gain; CMRR Common-mode gain measures how much the output changes in response to a change in the common-mode input level. Ideally, the common-mode gain of an op amp is zero; the amplifier should ignore the common-mode level and amplify only the differential-mode signal. Lets measure the common-mode gain of our op amp. In order to measure the common-mode gain in the open-loop condition, we have to once again balance. our high-gain op amp very carefully to keep vOUT ≈ 600mV, just like we did in the last assignment when we measured the transfer function. Remember, we do this by adding a dc voltage source vOFFSET in series with one of the inputs. This voltage source is set to the input offset voltage so that if no other signal is present, the output voltage will be approximately zero. Now, with this adjustment in place, we tie the two inputs together and apply an ac signal vIN as shown below. Plot the common-mode gain (in dB) transfer function of the op amp over the frequency range 1Hz to 100MHz. Plot at least 80 points per decade of frequency for good resolution. Turn in this plot. What is the common-mode gain at 100 kHz? ____________________ What is the common-mode gain at 10 MHz? ____________________ An important figure of merit in op amp design is the common-mode rejection ratio, or CMRR. CMRR is defined as the differential-mode gain divided by the common-mode gain. (Remember, if you express your gains in the logarithmic units of dB, subtraction is equivalent to division.) For example, if a particular amplifier has a differential gain of 80 dB at 100 Hz and a common-mode gain of 10 dB at the same frequency, then the amplifier.s CMRR at 100 Hz is 70 dB. Ideally, an amplifier should have infinite CMRR. Practically, most designers try to get CMRR > 60 dB, though some applications may required much higher values. Disconnect the negative input of the op amp from vIN and connect it back to ground. Measure the differential-mode gain (in dB) transfer function of the op amp over the frequency range 1Hz to 100MHz. (This is the same measurement you did in the last assignment.) Plot at least 80 points per decade of frequency for good resolution. Turn in this plot. What is the CMRR at 100 kHz (in dB)? ____________________ What is the CMRR at 10 MHz (in dB)? ____________________

Page 7: Op Amp Design

Slew rate In the previous assignment, we used ac analysis to determine the small-signal bandwidth of the op amp. The speed of amplifiers is often limited by large-signal effects such as slew rate . the maximum speed at which an op amp can charge and discharge its load. To measure slew rate, configure the op amp as a unity-gain buffer as shown below. Run a transient simulation where vIN is a 100kHz square wave going from –300mV to +300mV. (This qualifies as a large signal.) Look at the output waveform. Does it look like a nice square wave, or do you see significant slewing (a slope less than infinity) on the –300mV to +300mV transitions? Increase the frequency of the square wave until you can see these sloped regions clearly. (The output should still reach –300mV and +300mV during each cycle. If it does not, your square wave is too fast.) Make sure your maximum time step is at least 200 times less than your simulation time so you get a high-resolution simulation. Turn in this plot. Now select two points on the rising slope and from these calculate the positive slew rate using units of V/µs. The positive slew rate is ___________________. Now select two points on the falling slope and from these calculate the negative slew rate using units of V/µs. The negative slew rate is ___________________. Now repeat the above measurements after removing CL. Turn in this slew-rate plot. The positive slew rate with no load is ___________________. The negative slew rate with no load is ___________________. What is the slew rate in hand calculations? ________________. How does this compare with the simulation results? ______________________________