Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Introduction To PSPICE

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Introduction to PSPICE

To install OrCAD PSpice Release 16.5 Lite Edition


1. Go to http://www.cadence.com/products/orcad/pages/downloads.aspx#pspice
and click on the Download FREE OrCAD 16.5 Demo software under the
Capture and PSpice only section. You will have to fill out a short form and then
will receive an email with download instructions.
2. Save the .exe file somewhere convenient and double click the executable and
follow the steps in the installation wizard.

The steps to simulation


In any basic circuit simulation, there are six steps to simulating a circuit:
1. Create a simulation project
2. Draw the schematic to simulate
3. Establish a simulation profile
4. Set up a simulation type
5. Simulate the circuit
6. Analyze the results in Probe

To start a simulation session


1. On the start menu select Engineering Software ---> Electrical Electronic and
Computer Engineering ---> Cadence ---> OrCAD Capture, Click OK below.

2. The window is shown below:

3. Click File---> New---> Project, and the following window will appear:

4. Give the project a descriptive name (e.g. CMOS_inverter). Select Analog or


Mixed A/D. You will not be able to simulate your project if the schematic button
is selected.
5. Specify a location where the project is to be stored. Click Browse and specify the
location where the files are to be stored, e. g., your own drive or usb but not C:
drive.
6. Click OK. The window below appears. Select Create a blank project and click OK.

7. The following window appears:

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.

To create a schematic for a CMOS inverter


simulation
1. Click on Schematic Page Tab. If the Schematic Tab is not visible, go to DESIGN
RESOURCES---> .\filename.DSN ---> SCHEMATIC ---> PAGE 1 in the Project Tab and
double click.
2. To place parts, click the Place Part Icon
3. The Place Part side panel shows that:

in the upper right tool palette.

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.

8. To wire parts together, click the Place Wire icon


.
Place your cursor over the boxes at the ends of the parts and draw wires
connecting parts. When done, hit ESC or right click and select END WIRE.
9. To insert a ground node, click the Ground Icon

10. To change component values that are displayed


Double click the displayed value.
Change the desired value in the dialog box that appears.
5

11. To change component values that are not displayed


Select the part (a box is drawn around the entire part when it is selected). Double
click the part or Right click and select EDIT PROPERTIE.
A Property Editor database screen appears in a new tab. Scroll right until the
desired value is seen on the top line. Click the property (second line) you wish to
change.
Type in the new value.
Right click on the tab and select CLOSE to close the tab.

12. To change model values


1) Select model and double click, you will see the following,
Right click the following area, and click Display in the dialog box that appears. The
parameter W can be modified (Note that you can only edit the parameters that
can be seen from property editor).

Select Name and Value, click OK. You will see

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.

To set up a simulation profile


1. Select PSPICE NEW SIMULATION PROFILE or click the new simulation profile
icon

on the toolbar.

2. Give a descriptive name to the type of simulation (e.g. DC sweep, transient,


etc).
3. Click CREATE and the simulation settings menu will appear:
4. Select the ANALYSIS TYPE from the pull down menu.
5. Set the parameters.
6. Click OK.

Simple DC Sweep (Sweeping sources only)


Use a simple DC sweep when you want to plot a voltage, current, or power as a function
of another DC voltage or current. The sources used in this type of simulation will
typically be VDC and IDC sources.
1.
2.
3.
4.
5.
6.
7.
8.

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

Parametric simulation of VTC of the inverter


1. If you want to do a VTC of the inverter parametric simulation, e.g., for the following
schematic, we can edit them in edit simulation profile as follows:

18

Where we change +VTO=0.4V for MbreakN, and +VTO=-0.4V for MbreakP.

19

The simulation results are as follows:

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.

Click the run icon on the toolbar.


Probe will be open with the marked values displayed on one graph
To add a new y-axes in Probe select PLOT ADD Y AXIS
To add a new plot window in Probe select PLOT ADD PLOT TO WINDOW
To move a trace to the new axis/window:
Click on the trace name to be moved (it should turn red when selected) and select
EDIT CUT
Click on the axis/window to move the trace to (it should have a >> at the bottom
when selected) and select EDIT PASTE

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

Print Simulation Results


The following method helps you to print simulation results in an excel file as follows:
1. In plot, click EditSelect AllCopy
2. Open a new excel file, Paste, you will see many columns data. Select them.
3. Click InsertScatter. The figure in excel can be shown.

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

You might also like