UNIVERSITY of PENNSYLVANIA
DEPARTMENT OF ELECTRICAL ENGINEERING
SPICE Example: DC Sweep, and Thevenin Equivalent Circuit
This is an example of a SPICE input le that will calculate the DC
Node voltages, the Thevenin Equivalent Circuit and also sweep the
input voltage source.
Input le: (the lines starting with a "*" are comment lines and are
inserted for clarity only).
Spice Example: DC Sweep, .TF, .OT analysis *
* We are interested in nding the following characteristics:
* 1. Node voltages v12, v2 and current i4 when vin=10V
* 2. Thevenin equivalent voltage and resistance, seen
* at the output terminals v(3,0)
* 3. Sweep the input from 0 to 20V in steps of 2V and plot
* the voltages v12, v2, vo and the current i4.
* ------------------------------------------------------
VIN 1 0 DC 10
F1 0 3 VMEAS 0.5
VMEAS 4 0 DC 0
*VMEAS is a 0V source to measure i4
R1 1 2 1K
R2 2 3 10K
R3 1 3 15K
R4 2 4 40K
R5 3 0 50K
.OP
* --------------------------------------------------
* The operating point .OP command will tell Spice
* print all DC node voltages, currents through voltage
- 1
- 2
前往页