Problem 5.3 - DC Node Voltage Solution for Mesh Currents
*
* The circuit for this problem is from textbook Chap. 4, Problem 32.
*
* Solve for the mesh currents by superposition, with one independent
* source active at a time. Add the partial solutions to obtain the
* complete solution. Check your result with the complete solution
* results found in Part 4 of this program run.
*
* For each part of the problem, print the branch currents that are
* equal to the mesh currents shown on the circuit diagram. Note
* that the mesh current i2 will have to be calculated (unless you add
* a current measuring source in the top line of the center mesh).
*
* The following "end-to-end" programs will obtain (in one program
* run) the separate solutions for the sources taken one at a time
* plus the complete solution with all sources active.
*
.OPT NOPAGE
V1 1 0 DC ??? ; Select a source to be active.
I1 4 2 DC ??? ; Note that the active source and the
V2 5 6 DC ??? ; .DC sweep command source must agree.
G1 6 2 ??? ??? 2 ; Enter the + and - nodes for the
; controlling voltage for the VCCS.
H1 2 7 V1 -2 ; Note that the gain of the CCVS is
; negative because by PSpice definition
; positive current through the voltage
; source V1 is from node 1 to node 0.
R1 1 2 .2
R2 4 5 .50 ; This resistance value is different
; from the resistance in Problem 32
; of Chapter 4. Compare the results.
R3 5 0 .10
R4 7 0 .166667
.DC V1 27 27 1
.PRINT DC ; Enter currents to print so that the
; mesh currents i1 and i3 are equal
; to the branch currents you choose.
; Enter any other current you may need
; in order to calculate the current i2.
.PRINT DC V(2) V(5)
.END
Problem 5.3, Part 2. DC Node Voltage Solution for Mesh Currents
*
* Choose a second source to be the active source.
*
.OPT NOPAGE
V1 1 0 DC ??? ; Select a source to be active.
I1 4 2 DC ??? ; Note that the active source and the
V2 5 6 DC ??? ; .DC sweep command source must agree.
G1 6 2 ??? ??? 2 ; Enter the + and - nodes for the
; controlling voltage.
H1 2 7 V1 -2 ; Note that gain is negative because
; positive current through the voltage
; source V1 is from node 1 to node 0.
R1 1 2 .2
R2 4 5 .50 ; This resistance value is different
; from the resistance in Problem 32
; of Chapter 4. Compare the results.
R3 5 0 .10
R4 7 0 .166667
.DC I1 10 10 1
.PRINT DC ; Enter currents to print so that the
; mesh currents i1 and i3 are equal
; to the branch currents you choose.
; Enter any other current you may need
; in order to calculate the current i2.
.PRINT DC V(2) V(5)
.END
Problem 5.3, Part 3. DC Node Voltage Solution for Mesh Currents
*
* Choose a third source to be the active source.
*
.OPT NOPAGE
V1 1 0 DC ??? ; Select a source to be active.
I1 4 2 DC ??? ; Note that the active source and the
V2 5 6 DC ??? ; .DC sweep command source must agree.
G1 6 2 ??? ??? 2 ; Enter the + and - nodes for the
; controlling voltage.
H1 2 7 V1 -2 ; Note that gain is negative because
; positive current through the voltage
; source V1 is from node 1 to node 0.
R1 1 2 .2
R2 4 5 .50 ; This resistance value is different
; from the resistance in Problem 32
; of Chapter 4. Compare the results.
R3 5 0 .10
R4 7 0 .166667
.DC V2 6 6 1
.PRINT DC ; Enter currents to print so that the
; mesh currents i1 and i3 are equal
; to the branch currents you choose.
; Enter any other current you may need
; in order to calculate the current i2.
.PRINT DC V(2) V(5)
.END
Problem 5.3, Part 4. DC Node Voltage Solution for Mesh Currents
*
* Complete solution with all sources active together.
*
.OPT NOPAGE
V1 1 0 DC ??? ; Enter the correct source data.
I1 4 2 DC ???
V2 5 6 DC ???
G1 6 2 ??? ??? 2 ; Enter the + and - nodes for the
; controlling voltage.
H1 2 7 V1 -2 ; Note that gain is negative because
; positive current through the voltage
; source V1 is from node 1 to node 0.
R1 1 2 .2
R2 4 5 .50 ; This resistance value is different
; from the resistance in Problem 32
; of Chapter 4. Compare the results.
R3 5 0 .10
R4 7 0 .166667
.DC V2 6 6 1
.PRINT DC ; Enter currents to print so that the
; mesh currents i1 and i3 are equal
; to the branch currents you choose.
; Enter any other current you may need
; in order to calculate the current i2.
.PRINT DC V(2) V(5)
.END