Introduction To PSPICE
Introduction To PSPICE
Introduction To PSPICE
3. Click File---> New---> Project, and the following window will appear:
Across the top are tabs to select the Start Page, the Project Page and the Schematic
Page. Toolbars are across the top and down the right side. These toolbars and menus
will change depending on which window is selected. Be sure the Schematic Page Tab
(likely named Page1) is selected.
You are now ready to begin creating a circuit for simulation.
4.
5.
6.
7.
If you do not see all of the libraries listed, click the Add Library icon
and
select all of the libraries in the PSpice folder. Parts from other locations will not
simulate properly. In this lab, you need libraries of BREAKOUT and SOURCE.
Select the part you wish to place in the schematic and press Enter. You can
quickly find the part by starting to type the name in the part window. In this lab,
you need MbreakN, MbreakP, VDC and VPULSE.
Select the part and use Right Click to rotate and mirror.
Insert as many as needed. You can also select a group of parts and CTRL-drag to
copy those parts.
Hit ESC or Right Click and select END MODE to stop inserting parts.
You can now double click W= in the schematic, and edit the value you want.
2) When you want to edit parameters that cannot be seen from property editor
(e.g., VTO), you can do it as follows:
First, Select Mbreakp and Right click it, select Edit PSpice Model (see the
following figure).
Then, Input +VTO = -0.4 (for Mbreakp) in PSpice Model Editor (see the
following figure).
At last, save it and Close.
on the toolbar.
Create a new simulation profile called dc sweep (or whatever you want).
Under ANALYSIS Tab, select an ANALYSIS TYPE of DC SWEEP.
Be sure PRIMARY SWEEP is checked.
In the SWEEP VARIABLE section, select the radio button for voltage source or
current source and enter the source name (such as V1, I3, etc) to be varied.
Enter the appropriate variables in the SWEEP TYPE Section.
Click OK.
Determine the variables of interest to be plotted in Probe.
For example, you can try to simulate the output voltage of the CMOS inverter
shown below. Do not forget to put voltage Probe.
10
11
Transient Analysis
Use a transient analysis when you want to plot a voltage, current, or power as a function
of time. The sources used in this type of analysis will be any voltage or current source
that varies with time; examples include VSIN, VPULSE, ISIN, and VRAMP.
1.
2.
3.
4.
Create a new simulation profile called transient (or whatever you want).
Under ANALYSIS Tab, select an ANALYSIS TYPE of TIME DOMAIN (TRANSIENT).
Enter the stop time (TSTOP) for the simulation in the RUN TO TIME box.
Enter the maximum step size in the TRANSIENT OPTIONS section making this
variable ~TSTOP/1000, will help ensure that the traces in Probe are relatively
smooth.
5. Click OK.
6. Determine the variables of interest to be plotted in Probe.
7. Simulate the circuit below.
12
Parametric Simulation
1. Use this type of analysis when you want to plot a voltage, current, or power as
some component or model parameter varies, such as L or W of Mbreakp.
13
2. Place the PARAM part (located in the SPECIAL library) somewhere on the schematic
3. Double click PARAMETERS:, you will see the following, and click New Row, Edit Name:
and Value as follows (e.g., Wvar and Lvar)
14
4. Double click MbreakP and MbreakN (see below), right click the area (right of L or W),
and click Display in the dialog box that appears. The parameter W and L can be
modified. Select Name and Value, click OK. You can double click W and L, and edit the
value as Wvar and Lvar.
15
16
5.
6.
7.
8.
Create a new simulation profile called transient (or whatever you want).
Under ANALYSIS Tab, select an ANALYSIS TYPE of TIME DOMAIN (TRANSIENT).
Enter the stop time (TSTOP) for the simulation in the RUN TO TIME box.
Enter the maximum step size in the TRANSIENT OPTIONS section making this
variable ~TSTOP/1000, will help ensure that the traces in Probe are relatively smooth.
9. Click OK.
10. In Parametric Sweep, select Global parameter, input the name of parameter (e.g.,
Wvar) in Parameter name.
11. Set sweep type using Linear or value list (see follows).
12. Determine the variables of interest to be plotted in Probe.
13. Simulate the circuit.
17
18
19
To Edit Waveform
1. Place voltage, voltage differential, current, and power markers from the toolbar
where needed.
Voltage Markers can be placed on any wire and they will give the voltage at that node
with relation to ground.
Current Markers must be placed at one of the terminals of a device and they will give
the current entering that pin.
Power markers must be placed directly on the part and they will give the power
dissipated by that device (thus a negative value means the part is supplying power).
2.
3.
4.
5.
6.
20
7. To add a new trace select TRACE ADD NEW TRACE and select the variable to plot.
Algebraic expressions can also be entered here using the operators in the right hand
side of the add trace window.
8. To measure the delay as follows:
Click TraceCursorDisplay, we have
Left click, then Right click in the plot, you will see two measure cursors (red and blue
ones). You can choose the marker below the X-axis (e.g., the markers in front of
V(M1:d) of the following figure) to measure corresponding results. Drag the cursors,
and let the Y value be 1.25 (see the following figure), we can obtain two
corresponding X values. Therefore, the delay can be calculated. In this way, all delays
can be obtained.
21
Common Mistakes
These are the most common problems I see students make when using PSpice.
1. Not having a 0 Ground. If you are getting errors that say you have a bunch of
floating nodes, check to be sure that the ground you have is indeed named 0!
2. Not selecting Analog A/D when setting up the project. If you can draw the
schematic but then do not have an option to set up a simulation profile, you
22
3.
4.
5.
6.
selected Schematic instead of Analog A/D. To fix this, select the entire schematic,
copy it, restart PSpice, create a new project with a new name (selecting Analog
A/D, of course), and paste the schematic into this project.
Not having the correct libraries included. Only the components in the PSpice
library will simulate correctly. You must have these libraries and no others
included.
Using the wrong sources. DC sources (VDC, IDC) for bias and DC analysis, AC
sources (VAC, IAC) for AC analysis, and time varying sources (VSIN, VPULSE) for
transient analysis. Do not use VSIN for a frequency response or VAC for a
transient analysis!
Having a zero-impedance path from a voltage source to ground. Before PSpice
does any kind of analysis, it always does a DC bias point analysis first. If it finds a
voltage directly across an inductor, it cannot compute the bias point. This can be
solved by placing a very small resistance in series with the inductor. If you are
getting an error that tells you that you have a voltage-inductor loop, you have this
problem. This can also result from a direct short across a voltage source.
SI prefix confusion. PSpice is not case sensitive and you can use SI prefixes.
23