Circuit Simulation With Spice
Circuit Simulation With Spice
Circuit Simulation With Spice
ES154 Lab #4
Circuit Simulations with Spice
Objective
To learn how to use PSpice and Capture to run DC, AC, and transient simulations on
analog circuits
Deliverables
Typed lab report due in class on December 4th. Please answer all questions.
Introduction
Computer Simulations of electronic circuits have become a typical and necessary part of
the design process. Both for integrated circuits as well as circuits constructed from
discrete components, time, money, and performance may be gained by simulating a
circuit before constructing it.
Computer simulations allow users to test a circuit with more advanced models of circuit
elements (e.g. op-amp models have input voltage offsets) to test to see if circuits actually
meet specifications with some non-idealities taken into account. Simulations may also
serve to give a designer insight into the intricacies of how a circuit works and may reveal
trade-off relationships that were not noticed before, which can allow for changes in
design before fabrication. However, circuit simulations cannot substitute an engineer
with a thorough understanding of circuit analysis. Paper calculations and analysis are still
necessary in the design process, simulations can only serve to test the ideas and the
choices of components that come from paper and pencil ideas early in the design process.
The simulation program that we will use is called SPICE (Simulation Program with
Integrated Circuit Emphasis). SPICE is an open source program that was developed in
the 1970s. PSpice is a commercial product made by ORCAD that is SPICE packaged
with a graphical-user-interface circuit design program and is what we will use in this
course.
ES154 Lab #4
Yang Fall 2007
1. Click Place>>Part
2. Add the libraries of parts that we will be using. (C:\Program Files\OrcadLite\
Capture\Library\PSpice\analog, source, and eval)
To wire the circuit together, click Place>>Wire and to lay a wire simply point from
one node to the next and the “Esc” button to end the wire.
R1
0V 0V
1k
V
C1
VOFF = 0
VAMPL = 1 1n
FREQ = 1e3
0V
Calculate the transfer function of the circuit, sketch the Bode Plot, and note the f3db
point.
ES154 Lab #4
Yang Fall 2007
Transient Analysis
First, we will perform Time Domain (Transient Analysis). Set the time domain such
that it is appropriate for the frequency of your input signal.
Run the simulation at different frequencies and with different DC offsets and note the
response.
AC Response
Replace VSIN with a VAC source. VAC is a source that is used to measure the
response of a circuit at a range of frequencies.
R1
0V 0V
1k
V
V3 C1
1Vac
1n
0Vdc
0V
Set the range of frequencies such that it covers several decades above and below the
f3db point.
Now, add a diode (d, eval) to the circuit such that the new circuit has the
configuration shown below:
ES154 Lab #4
Yang Fall 2007
D1 R1
1k
V
V1
1Vac C1
0Vdc 1n
P ARAM E T ERS:
CCI = 10u
CCO = 10u
CS = 10u
RD = 4.2K
RG1 = 2E6
RG2 = 1.3E6
RL = 50K
RS = 630 VDD VDD
Rsig = 10K
W = 22u
L = 0.6u {RG1} {RD}
VDD = 3.3
{CCO}
OUT
0
1Vac
0Vdc
DC = {VDD} {RG2} {RS}
{CS}
0 0 0 0 0
2. Set the value of RD such that the gain of the circuit is 6V/V
3. The circuit has been previously constructed for you and is under ES154-student-
file-save\spice circuits\CHAPTER4 folder. Copy this folder under your working
directory and run the simulation under your working directory.
4. Use PSpice to extract the DC voltages and currents through each node and branch
of the circuit. Compare the values to those you calculated by hand. Check to
make sure that the circuit is in saturation mode. (If you get the same errors as
before, try to follow the same procedure with sedra.lib file.)
5. Perform AC analysis on the circuit and plot the results such that it represents the
Bode Plot of the amplifier. What is the mid-band gain of the circuit?
ES154 Lab #4
Yang Fall 2007
6. What causes the flattening of the gain in the mid-band?
7. Repeat the measurement of the Bode Plot of the amplifier for several different
values of CS. Explain your results. What effect does CS have on the Bandwidth?
What effect does CS have on the Gain? Is there a relationship between the
bandwidth and the gain?
The problem:
Implement an amplifier using the standard Common Source configuration (see fig. 4.49a
in the text). Let RD=15kΩ, ro=150kΩ, and RL=10kΩ.
1. By hand, find C2 that will ensure that the associated break frequency is at, or
below, 10Hz.
2. With the C2 that you calculated, show that your circuit has a break frequency that
is in fact at or below 10Hz using AC analysis in PSpice.
3. The goal now is to maximize the amount of power being delivered to RL, while
keeping the break frequency at, or below 10Hz. Try reducing RD and ro by a
factor of 2,3,4, etc.. Report and show the change in the corner frequency and the
amount of power being delivered to RL.