Chapter 1
Chapter 1
Chapter 1
1.1 Introduction
SPICE (Simulated Program with Integrated Circuit Emphasis) is one of the
industry standards software for circuit simulation. It can be used among
other circuit analysis to perform alternating current, direct current, Fourier,
and Monte-Carlo analysis. SPICE continues to be the standard for analog
circuit simulation for the electronics industry over the past decades. There
are several SPICE-derived simulation packages. Among these are ORCAD,
PSPICE, Meta-software HSPICE, and Intusoft IS-SPICE.
PSPICE has additional features as compared to classical SPICE. Among
some of the useful features are:
FIGURE 1.1
ORCAD capture opening screen.
5 K
24 V
10 K
15 K
8 K
12 V
5 mA
FIGURE 1.2
Electric circuit with active and passive elements.
TABLE 1.1
PSPICE Parts and Corresponding Libraries
Description
Resistor
Capacitor
Inductor
DC voltage source
DC current source
PSPICE Name
PSPICE Library
R
C
L
VDC
IDC
ANALOG
ANALOG
ANALOG
SOURCE
SOURCE
TABLE 1.2
Abbreviations of SPICE Scaling Factor
Suffix Letter
T
G
Meg
K
M
U
N
P
F
Mil
Metric Prefix
Multiplying Factor
Tera
Giga
Mega
Kilo
Milli
Micro
Nano
Pico
Femto
Millimeter
1012
109
106
103
103
106
109
1012
1015
25.4 * 106
R1
R3
R4
5K
10 K
15 K
V1
24 Vdc
R2
8K
l1
5 mAdc
12 Vdc
+ V2
FIGURE 1.3
Circuit of Figure 1.2 as drawn in ORCAD capture.
1.3DC Analysis
Under DC analysis, PSPICE can perform (i) DC nodal analysis and (ii) DC
sweep. In nodal analysis, PSPICE determine the values of the node voltages
and also the values of current in voltage sources. This type of analysis is also
described as Bias Point analysis in PSPICE. The two types of DC analysis are described below in Sections 1.3.1 and 1.3.2. Some of the circuits for
DC analysis might contain dependent sources. The list of PSPICE dependent
sources and the library they can be found in is shown in Table 1.3.
R1
5K
24.00 V
+ V1
24 Vdc
R3
22.69 V 10 K
R2
R4
48.41 V
15 K
l1
5 mAdc
8K
12.00 V
+ V2
12 Vdc
0V
FIGURE 1.4
Simulation results of Figure 1.2 (nodal voltages are shown).
TABLE 1.3
PSPICE Dependent Sources
Description
Voltage-controlled voltage source (VCVS)
Current-controlled current source (CCCS)
Voltage-controlled current source (VCCS)
Current-controlled voltage source (CCVS)
PSPICE Name
Library
E
F
G
H
ANALOG
ANALOG
ANALOG
ANALOG
Consider the circuit shown in Figure 1.5. The dependent source is voltagecontrolled current source. Determine the nodal voltages.
Solution
The schematic drawing was done and the values of the circuit parameters were
adjusted by using the steps in Box 1.2. The circuit elements were wired together.
The gain of the voltage-controlled current source is changed in the Property editor, shown in Figure 1.6.
1K
1K
0.1 K
1K
+
1 mV
10 K
2K
Vx
FIGURE 1.5
Circuit with voltage-controlled current source.
FIGURE 1.6
Setting the gain of the VCCS.
10 Vx
100 K
20 K
FIGURE 1.7
Simulation settings for bias point calculations.
To simulate the circuit for DC analysis, the sequence of actions shown in Box 1.3
is used to simulate the circuit. Figure 1.7 shows the simulation settings for the bias
calculations. Figure 1.8 shows the voltages at various nodes of Figure 1.6 upon
performing the DC analysis.
1.3.2 DC Sweep
In a DC sweep, one or more of the DC voltages are allowed to change and the
voltages at nodes and currents through devices are monitored. The analysis
type used is DC sweep. The following example illustrates the use of the DC
sweep.
1.000 mV R1
697.7 uV
1K
V1
1 mVdc
465.1 uV
R2
R3
1K
R4
10 K
2K
17.91 V R5 17.44 V
0.1 K
G1
+
1K
R8
10 K
0V
R6
14.54 V
R7
5K
0V
FIGURE 1.8
DC analysis results.
10 K
1K
V1
5K
6lx
2K
lx
FIGURE 1.9
Circuit for DC sweep.
5 Vdc
V1
R1
R2
10 K
1K
F1
R4
2K
V+
R3
5K
V
FIGURE 1.10
Schematic drawing of Figure 1.9.
10
simulation name and select create. In the Simulation Settings dialog, select
DC Sweep. For the sweep variable, use the voltage V1. Select the sweep type
to be linear, the starting value of 5 V, end value of 10 V, and increments of 0.5 V.
Figure 1.11 shows the simulation settings for the DC sweep simulation. The steps
for performing the DC Sweep simulation are summarized in Box 1.4.
If the DC sweep simulation is successful, a PROBE (to be discussed in the
Section 1.4) screen will open in the schematic window. To display the results of
the simulation, indicate the variables to be displayed and the manner of displaying
them. In this example, we want to display Vout versus Vin. In ORCAD schematic,
put the voltage difference marker at the nodes of interest. If we were interested in
current through an element, we place the current marker button on the element
FIGURE 1.11
Simulation profile for the DC sweep simulation.
11
0.8 V
1.2 V
1.6 V
2.0 V
6V
5V
V (R3:2, )
7V
V_V1
8V
9V
10 V
FIGURE 1.12
Output voltage of Figure 1.9.
1.4 PROBE
PROBE is a PSPICE interactive graphics processor that allows the user to
display SPICE simulation results in graphical format on a computer monitor.
PROBE has facilities that allow the user to access any point on a displayed
graph and obtain its numerical values. In addition, PROBE has many built-in
functions that enable a user to compute and display mathematical expression that models aspects of circuit behavior.
PROBE has several commands available for file accessing, plotting, editing, viewing, and adding or removing trace. PSPICE has several functions
that PROBE can use to determine various characteristics of a circuit. Table 1.4
shows the valid functions for PROBE expression.
12
TABLE 1.4
Valid Functions for PROBE Expression
Function
+
*
/
ABS(X)
SGN(X)
SQRT(X)
EXP(X)
LOG(X)
LOG10(X)
DB(X)
PWR(X,Y)
SIN(X)
COS(X)
TAN(X)
ARCTAN(X)
ATAN
d(X)
S(X)
AVG(X)
*AVGX(XO,XF)
RMS(x)
MIN(X)
MAX(X)
M(X)
P(X)
R(X)
IMG(X)
G(X)
Meaning
Example
V(3)+V(2,1)+V(8)
I(VS4) I(VM3)
V(11)* V(12)
V(6)/V(7)
ABS(V(9))
SGN(V(4))
SQRT(I(VM1))
EXP(V(5,4))
LOG(V(9))
LOG10(V(10))
DB(V(6))
PWR(V(2),3)
SIN(6.28 * V(2))
COS(6.28 * V(3))
TAN(6.28 * V(4))
ARCTAN(6.28 * V(2))
ATAN(V(9)/V(4))
D(V(12))
S(V(15))
AVG(V5,3))
AVG V(5,4)(2e-3,20e-3)
RMS(VS2)
MIN(VM3)
MAX(VM3)
M(V(5))
P(V(4))
R(V(3))
IMG(V(6))
G(V(7))
TABLE 1.5
SPICE-Supplied Sources for Transient Analysis
Name
Application
PULSE
EXP
PWL
SIN
SFFM
13
For the RC circuit shown in Figure 1.13, the input signal is a pulse. Plot the voltage
vo(t) with respect to time.
The pulse is described by VPULSE. The parameters for the VPULSE are described
by V1, V2, TD, TR, TF, PW, and PER,
where
V1 is the initial value of pulse. There is no default value for V1.
V2 is the final voltage of the pulse. There is no default value for V2.
TD is delay time, its default value is zero.
TR is the rise time. Its default value is the printing or plotting increment.
TF is the fall time. Its default is also TSTEP.
PW is the pulse width. The default value of PW is TSTOP, the final time of the
transient analysis.
PER is the period. Its default is also TSTOP. The period does not include the
initial delay, TD.
In this example, V1=0, V2=5 V, TD=0, TR=10 -6 s, TF=10 -6 s, PW=5 ms,
and PER=20 ms.
Solution
Using the steps outlined in Box 1.2, the circuit is drawn using ORCAD capture. For
the voltage source, use the ORCAD property editor to edit the list of parameters
for the PULSE voltage source. The schematic is shown in Figure 1.14.
5K
+
+
Vs
10 uF
15 K
Vo(t)
FIGURE 1.13
RC circuit with an input pulse voltage.
R1
V1 = 0 V
V2 = 5 V
VS
TD = 0
+
TR = 1 ns
TF = 1 ns
PW = 5 ms
PER = 20 ms
5K
FIGURE 1.14
ORCAD capture drawing of Figure 1.13.
V
C1
R2
2u
10 K
14
FIGURE 1.15
Simulation profile for transient analysis.
15
2.0 V
1.0 V
0V
0s
5 ms
V (R2:2)
10 ms
15 ms
20 ms
Time
25 ms
30 ms
35 ms
40 ms
FIGURE 1.16
Output voltage of Figure 1.14.
TABLE 1.6
PSPICE Switches
Description
Voltage-controlled switch
Switch is normally opened. It will close at time TCLOSE
Switch is normally closed. It will open at time TOPEN
R1
Tclose = 0
1
2
U1
R2
500
400
PSPICE
Name
PSPICE
Library
S
Sw_tClose
Sw-tOpen
ANALOG
EVAL
EVAL
L1
10 mH
V
V1 +
10 Vdc
R4
100
R3
100
FIGURE 1.17
RL circuit with a switch.
Transient analysis sometimes involves the use of switches. PSPICE has three
switches for time-domain analysis. They are shown in Table 1.6.
The following example illustrates the use of one of the switches.
16
1.0 V
0.9 V
0.8 V
0 us
10 us
V (R3:2)
20 us
30 us
40 us
50 us
Time
60 us
70 us
80 us
90 us
100 us
FIGURE 1.18
Voltage across the resistor R3.
Solution
Use ORCAD Capture to place the parts, adjust the parameter values and wire the
parts together (see Box 1.2). To simulate the circuit, select the steps in Box 1.5 to
perform the transient analysis. However, in the Simulation Settings dialog box,
do not skip the bias point calculation. You can use run time to be 100 s. The
simulation results are shown in Figure 1.18.
1.6AC Analysis
For time-invariant circuit, excited by a sinusoidal source, AC analysis can
be used to obtain voltages and currents in the circuit. For circuits with
more than one input, the superposition theorem may be used to obtain the
response. In AC analysis, the voltages and currents are transformed into the
frequency domain. The calculations are performed using phasors (magnitudes and phases of the voltages and currents).
PSPICE has voltage source (VAC) and current source (IAC) for AC analysis.
The voltage and current sources are available in the SOURCE library. The
magnitude and phase of the AC sources are set using the property editor.
However, the frequency of the AC sources is specified using the Simulation
Settings dialog box. The IPRINT and VPRINT are used to print current
and voltage, respectively. IPRINT is connected in series with the circuit to
measure current. However, VPRINT is connected in parallel across an element whose voltage needs to be obtained. The passive sign convention is
used to describe the polarity of the voltage and current printers (VPRINT
and IPRINT). The minus sign on the printer VPRINT indicates the negative
polarity of the voltage. For the IPRINT, the minus sign indicates the node the
current leaves the printer. The following example shows how to perform AC
analysis on a simple RLC circuit.
17
Solution
Using the information in Box 1.2, the circuit is drawn. The ORCAD schematic
drawing is shown in Figure 1.20. The IPRINT and VPRINT have been inserted to
obtain ic(t) and vR1(t), respectively.
The property editor can be used to change the property of AC voltage (VAC) to
be displayed by using the display button. To change the properties of each printer,
left click on the printer to select it, and then right click on the printer to bring up a
menu. Select Edit Properties and set the AC fields, IMAG, MAG, and PHASE to
y. If for some reason, one of the fields, REAL, IMAG, MAG, and PHASE, cannot
be found in the property editor, Add New Column dialog box will pop up and
the field can be added.
+
Vs(t) = Vs
VR1(t)
12 mH
50
5 uF
400
ic(t)
100
FIGURE 1.19
RLC circuit.
R1
50
18 Vac
0 Vdc
1
C1
5u
L1
12 m
V1
Iprint
R2
100
FIGURE 1.20
ORCAD schematic capture diagram of Figure 1.19.
R3
400
18
FIGURE 1.21
Simulation profile for AC analysis.
19
The results of the simulation can be obtained from the output file. It is shown
in Table 1.7.
From the PSPICE results, we get
ic(t)=0.1086cos(2000t+73.24) A, and
vR1(t)=6.69cos(2000t+67.54) V.
TEMPERATURE=27.000 DEG C
FREQ
1.000E+03
IM(V_PRINT1)
1.086E-01
I P(V_PRINT1)
7.324E+01
FREQ
1.000E+03
VM(N00491,N00525)
6.695E+00
VP(N00491,N00525) VR(N00491,N00525)
6.754E+01
2.558E+00
IR(V_PRINT1)
3.132E-02
2.5 K
2.0 K
1.0 K
0
100 Hz
1.0 KHz
VM (1)/IM (R1)
FIGURE 1.22
A passive filter.
10 KHz
100 KHz
Frequency
1.0 MHz
10 MHz
20
800 mV
600 mV
400 mV
200 mV
0V
10 Hz
100 Hz
ABS (V(R3:2))
1.0 KHz
10 KHz
Frequency
100 KHz
1.0 MHz
FIGURE 1.23
Magnitude response of output voltage vo(t).
Using the information in Box 1.2, Figure 1.22 is drawn using ORCAD Capture. In
addition, by using the steps in Box 1.6, you can perform the AC analysis. However,
the start frequency and end frequency are selected to allow the sweep over a
range of frequencies. The frequency response is shown in Figure 1.23.
Problems
1.1
10 Vdc
+ V1
R1
R3
R5
10
20
40
R2
20
R4
40
R6
80
FIGURE P1.1
Resistive circuit.
21
R1
R5
20 Vdc
120
R2
+ V1
R6
10
40
R3
R4
R7
R8
20
20
80
80
FIGURE P1.2
Resistive circuit.
10
2V
10
Is
10 V
40
8Is
20
FIGURE P1.3
Passive circuit with dependent sources.
1.4 For the resistive capacitive circuit shown in Figure P1.4, the
source is a pulse with amplitude of 5 V and pulse duration of
10ms. Determine the voltage across the capacitor.
R1
V1 = 0
V2 = 5 V
TD = 0
TR = 1.0e9
TF = 1.0e9
PW = 0.1e3
PER = 1.0e3
V1
FIGURE P1.4
Resistive capacitive circuit.
1K
R2
4K
V
C1
0.01e6
22
1.5 Find the current flowing through the inductor if the source is
a periodic pulse signal with pulse duration of 0.4 ms, period of
1.0 ms, and pulse amplitude of 10 mA.
R2
120
I1
R1
L1
80
10 mH
FIGURE P1.5
Resistive inductive circuit.
1.6 For the circuit shown in Figure P1.6, the current flowing
through the inductor is zero at time t 0. At t=0, the switch
moved from position a to b, where it remained for 10 ms. After
the 10 ms delay, the switch moved from position b to position
c, where it remained indefinitely. Sketch the current flowing
through the inductor versus time.
500
20 V
100 mH
c
500
1500 nF
FIGURE P1.6
RLC circuit.
1.7 For the voltage shown in Figure P1.7, plot the magnitude
response of the voltage across the inductor.
R2
R1
500
1 Vac
FIGURE P1.7
RLC circuit.
V1
8K
2
C1
4000 nF
R3
10 K
L1
0.5 H
1
23
R1
0.1 uF
1K
1
50 Vac
V1
L1
0.6 H
0 Vdc
2
1
L2
0.6 H
Vo(t)
R2
4K
FIGURE P1.8
RLC circuit for AC analysis.
Bibliography
1. Nilsson, James W., and Susan A. Riedel. Introduction to PSPICE manual Using
ORCAD Release 9.2 to Accompany Electric Circuits. Upper Saddle River, NJ:
Pearson/Prentice Hall, 2005.
2. OrCAD Family Release 9.2. San Jose, CA: Cadence Design Systems, 19861999.
3. Rashid, Mohammad H. Introduction to PSPICE Using OrCAD for Circuits and
Electronics. Upper Saddle River, NJ: Pearson/Prentice Hall, 2004.
4. Soda, Kenneth J. Flattening the Learning Curve for ORCAD-CADENCE
PSPICE, Computers in Education Journal, Vol. XIV (AprilJune 2004): 2436.
5. Svoboda, James A. PSPICE for Linear Circuits. 2nd ed. New York: John Wiley &
Sons, Inc., 2007.
6. Tobin, Paul. The Role of PSPICE in the Engineering Teaching Environment.
Proceedings of International Conference on Engineering Education, Coimbra,
Portugal, September 37, 2007.
7. Tobin, Paul. PSPICE for Circuit Theory and Electronic Devices. San Rafael, CA:
Morgan & Claypool Publishers, 2007.
8. Tront, Joseph G. PSPICE for Basic Circuit Analysis. New York: McGraw-Hill, 2004.
9. Vladimirescu, Andrei. The Spice Book. New York: John Wiley and Sons, Inc., 1994.
10. Wyatt, Michael A. Model Ferrite Beads in SPICE. In Electronic Design, October
15, 1992.
11. Yang, Won Y., and Seung C. Lee. Circuit Systems with MATLAB and PSPICE.
New York: John Wiley & Sons, 2007.