previous | back | home | next
updated 2001.04.17
Author Ananda Murthy R. S.
THEVENIN THEOREM IN A DC CIRCUIT : METHOD-2

This example is meant for novice users of SPICE OPUS to help them become familiar with verification of Thevenin Theorem in a resistive circuit excited by DC source/s. 
 

PROBLEM: 

Using Thevenin Theorem, find the current in a 2 Ohm resistor connected between nodes A and B in the circuit shown in Figure-1.  Answer: 0.8175 A

This is Unsolved Problem No. 51, taken from Problems in Electrical Engineering, VIII Edition, page no.47, by S. Parker Smith & N. N. Parker Smith, Asia Publishing House, 1976. 
 


EXPLANATION:

Figure-2 shows how the given circuit is modified for simulation on SPICE OPUS. In this method we first find Voc. Then, we use a voltage controlled switch to cause short circuit to measure Isc. Then, Rth is calculated as Voc/Isc. This method can be applied in any circuit. Observe that voltage controlled switch has finite on-state and off-state resistances. The right-most part of Figure-2 is the Thevenin equivalent circuit as seen from the terminals A and B in Figure-1.
 

A voltage controlled switch is specified as:

s??????? N+ N- NC+ NC- MODELNAME 

Nodes N+ and N- are the nodes between which the switch terminals are connected. The MODELNAME is mandatory while the initial condition (ON or OFF) is optional. This statement must be followed by a .model statement as shown below. Here sw represents the model of voltage controlled switch. The name given here for the model is switch. Observe that the ON state resistance ron is chosen to be very small and the OFF state resistance roff is chosen to be very large as compared to other resistors in the circuit. 

Observe how we can change the value of a source using the alter command during simulation.

Observe how we can print the value of a source by prefixing the source name with @.

Create the circuit file given below using a text editor without any formatting and save it as a *.cir file. Then start SPICE OPUS. At SPICE OPUS prompt type `source filename.cir' to run simulation and get results. Your results should tally with what is given below.
 

CIRCUIT FILE:

THEVENIN THEOREM IN DC CIRCUIT: METHOD-2

* These are given voltage sources.
v1  1 0 dc 2v
v2  3 0 dc 4v

* This source controls ON/OFF operation of the switch.
* When this is 0v the switch is OFF. The switch is closed
* by altering this to a higher value.
v3  5 0 dc 0v

* This dummy source measures Isc.
vx  4 0 dc 0v

* This is Thevenin equivalent voltage source.
* This is later altered to the correct value.
voc 6 0 dc 0v

* This is voltage controlled switch
s   a 4 5 0 switch
.model switch sw(ron=0.00001 roff=10e+5)

r1  1 2 2
r2  2 0 12
r3  2 a 1
r4  3 a 3
r5  5 0 10Meg
r6  7 0 2

* Initially rth is set to some arbitrary value, say 10 Ohms.
* Do not set this initial value to 0 since it causes
* overflow error. Later this is set to the correct value.
rth 6 7 10

.control
* This deletes data, if any, in SPICE OPUS memory
* calculated during previous runs of simulation.
destroy all

* Initially switch is open. So, find Voc.
op
echo
echo Voc is
print v(a)

* Apply controlling voltage to close the voltage
* controlled switch to cause short circuit and measure Isc.
alter v3=10
op
echo
echo Isc is
print i(vx)

* Calculate Rth
echo
echo Rth=Voc/Isc is
print op1.v(a)/op2.i(vx)

* Now find current in Thevenin equivalent circuit.
alter voc=op1.v(a)
alter rth=op1.v(a)/op2.i(vx)
op
echo
echo Current through 2 Ohm resistor is
print -i(voc)
echo
destroy all
.endc

.end 

RESULTS:

Circuit: THEVENIN THEOREM IN DC CIRCUIT: METHOD-2

Voc is
v(a) = 2.799996e+00

Isc is
i(vx) = 1.964898e+00

Rth=Voc/Isc is
op1.v(a)/op2.i(vx) = 1.425008e+00

Current through 2 Ohm resistor is
-i(voc) = 8.175152e-01

previous | back | home | next