Page 379

368

CIRCUIT ANALYSIS USING SPICE AND PSPICE

.PRINT prints the value of variables.

[CHAP. 15

The syntax is

:PRINT

houtput variablesi

htypei

htypei is DC, AC, or TRAN (transient). .PLOT line-prints variables.

The syntax is :PLOT

htypei

houtput variablesi

.PROBE generates a data file *.DAT which can be plotted in post-analysis by evoking the Probe program. The syntax is :PROBE

½houtput variablesi

EXAMPLE 15.8 Find the value of Vs in the circuit in Fig. 15-8 such that the power dissipated in the 1-k resistor is zero. Use the .DC command to sweep Vs from 1 to 6 V in steps of 1 V and use .PRINT to show IðVsÞ, V(1,2), and V(2).

Fig. 15-8

The source file is DC sweep, Fig. 15-8 Vs 1 0 DC 1V Is 0 2 DC 1 mA R1 1 2 1k R2 0 2 2k .DC Vs 1 6 1 .PRINT DC I(Vs) V(1,2) V(2) .END The results in the output file are DC TRANSFER CURVES Vs I(Vs) 1:000E þ 00 3:333E  04 2:000E þ 00 1:333E  12 3:000E þ 00 3:333E  04 4:000E þ 00 6:667E  04 5:000E þ 00 1:000E  03 6:000E þ 00 1:333E  03

V(1,2) 3:333E  01 1:333E  09 3:333E  01 6:667E  01 1:000E þ 00 1:333E þ 00

V(2) 1:333E þ 00 2:000E þ 00 2:667E þ 00 3:333E þ 00 4:000E þ 00 4:667E þ 00

The answer is Vs ¼ 2 V. EXAMPLE 15.9 Write the source file for the circuit in Fig. 15-9(a) using commands .DC, .PLOT, and .PROBE to find the I-V characteristic equation for I varying from 0 to 2 A at the terminal AB. First, we connect a dc current source Iadd at terminal AB, ‘‘sweep’’ its value from 0 to 2 A using the .DC command, and plot V versus I. Since the circuit is linear, two points are necessary and sufficient. However, for clarity of the plot, ten steps are included in the source file as follows:

Mahmood_Nahvi_eBook_Schaum_s_Outlines_Theory_An  
Advertisement