ENT186 Pspice Simulation-Ver2018
ENT186 Pspice Simulation-Ver2018
Rearranged by:
Ahmad Firdaus AZ, Grad. Eng. (Electronic) BEM
Kamarulzaman Kamarudin, PhD
Introduction
• SPICE (Simulation Program for Integrated Circuits Emphasis) is a general
purpose analog circuit simulator that is used to analyze and verify circuit designs
and to predict the circuit behavior. For decades, SPICE models have been a
mainstay of applications departments at semiconductor companies. PSpice is a PC
version of SPICE.
• In earlier times, they are provided in ASCII text format, which is generic and
allows importation into a variety of programs. The schematic was reduced to
numbered nodes. Years later, the schematic was typed into an ASCII .cir (Pspice
circuit description file) file and PSpice was run from DOS.
• Microsoft Windows introduced graphical interface. Designers finally could access
part symbols and draw schematics on the screen which is intuitive, eliminating
chance of error transcribing a schematic into a list of connections.
Introduction
• However, the parts available to the designer are limited to the list available in the
program’s library.
• From the very beginning, PSpice has provided a method to enter new part
symbols, but few designers have been able to understand the process, which is
anything but intuitive.
• Normally the circuit schematic is designed using OrCAD Capture and analysis /
simulation is done using PSpice. Therefore, both programs had to be installed
together as Pspice would be called automatically from OrCAD schematic
interface.
• Other popular software that able to perform similar function includes: MATLAB
SIMULINK Simscape, NI Multisim (formerly known as Electronic workbench) and
Proteous.
Types of Analysis
• Below is the type of analysis that can be performed on the designed circuit. We
will explore the first four in this lecture.
1. Bias point calculation
2. Transient analysis
3. DC sweep analysis
4. AC sweep analysis (also similar to frequency response)
5. Noise analysis
6. Sensitivity analysis
7. Distortion analysis
8. Fourier analysis
9. Monte Carlo Analysis
Circuit Components
• For the lite version, components that can be simulated ranging from:
generic RLC components, power supply, some type of discrete
analog/digital electronic devices and ICs
• Generally component that can be simulated has two main attributes:
1. Loaded from libraries inside Pspice folder
2. Has the Pspice logo as in figure
File structure PSPICE (Capture)
• Input file for PSpice has the file type “.CIR”
• When a circuit is simulated “.OUT” file is generated
• “*.DAT” file is by default a binary file to see the data
• “*.LIB” files where the details of complex parts are
saved
• Additional file types:
• *.SCH (the schematic data, itself)
• *.ALS (alias files)
• *.NET (network connection files)
Libraries
• These are files that contain reusable part data.
• They can be custom or default ones
• Some of the libraries available in the Evaluation version of
PSPICE are:
• abm.olb for special functions like square root and multipliers
• analog.olb for analog components like resistors and capacitors
• eval.olb for semiconductor, digital devices, switches
• port.olb for grounds, high/low digital ports
• special.olb for ammeters, viewpoints
• source.olb for various analog and digital sources
Parts
• Part is a basic building block which may represent
• One or more physical element
• Function
• Simulation model
• When a part is placed for first time its entry is done in
“Design Cache”
Make sure to choose Analog or Mixed A/D and proper location for project
Getting Started
• Next comes following window
• Figure above shows a Bode plot. On the x-axis is the frequency while on the y-axis is the circuit
response in decibel (dB) scale.
• Notice that until frequency of 100Hz, the circuit response curve is at 0dB. This shows that the
output has the same magnitude as the input (gain equals 1). After that, the curve starts to decay
indicating the output less than input (gain less than 1) as the frequency increases.
• Due to wide range of frequency, the x-axis of the plot is converted to logarithmic. Notice that for
this graph, there are 10 minor intervals between major intervals.
• As the y-axis is linear scale, such graph is considered semi-logarithmic graph (semi-log).
Simulation Example: AC Sweep for Low Pass
Circuit
• In this example, we would like to
produce a a frequency response
of a low pass filter.
• Consider a simple single stage
low pass RC filter as in the
circuit.
• You should now be able to
calculate critical low frequency
for the circuit.
• Draw the circuit using Orcad
Capture.
Simulation Example: AC Sweep for Low Pass
Circuit
0.5V
0V
1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
V(OUTPUT)
Frequency
• The graph here will be circuit gain (Vout/Vin) on the y-axis versus frequency on x-
axis.
• Notice that the y-axis is the gain even though we only selected V(out). This is
because we have set the V(in) to 1V ac in the circuit. So the V(out) is normalized
against input and equivalent to circuit gain at the y-axis.
• However usually in Bode Plot, decibel scale is used to facilitate analysis. So the y-
axis values has to be converted to that scale.
Simulation Example: AC Sweep for Low Pass
Circuit
• You have to delete existing
trace to make way for the
new trace in dB scale.
• Select the DB() function
from the right side.
• Then select the V(output)
from the left side. Make
sure in the Trace Expression
the V(output) becomes
variable of the function
DB().
Simulation Example: AC Sweep for Low Pass
Circuit
0
-50
-100
1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
DB(V(OUTPUT))
Frequency
• Now the scale in the y-axis has been converted to decibel (dB).
• In the Plot menu from Pspice interface, you can adjust the axis
parameter using Axis Settings.
Simulation Example: AC Sweep for Low Pass
Circuit
• From X Axis: Change Data
Range from Auto to User
Defined and Select frequency
from 1Hz to 10kHz.
• From Y Axis: Change Data
Range to User Defined and
Select decibel from-20 to 0.
• From X Grid: Deselect the
Automatic. Change Minor
Intervals between the Major to
10.
• Click OK after done with Axis
Settings.
Simulation Example: AC Sweep for Low Pass
Circuit
-0
-5
-10
-15
-20
1.0Hz 10Hz 100Hz 1.0KHz 10KHz
DB(V(OUTPUT))
Frequency
• Now we have the complete Bode Plot indicating response of the low pass filter circuit
that we have previously designed.
• Do you know that there are parameters of concern that can be extracted from the this
graph? (Consult: Floyd T, Electronic Devies:Chapter 10 Frequency Response)
• Instead by manually determining the parameter from this graph there are special
function that you can use to determine critical frequencies and bandwidth.
• Just now we have analyzed frequency response on the circuit gain. Do you know that
there is frequency effects on phase shift too?
Simulation Example: AC Sweep for Low Pass
Circuit
• Remove the existing trace to make way for the new trace.
• Select the P() function from the right side. Then select the V(output) from the left side.
Make sure in the Trace Expression the V(output) becomes variable of the function P().
Simulation Example: AC Sweep for Low Pass
Circuit
0d
-50d
-100d
1.0Hz 10Hz 100Hz 1.0KHz 10KHz 100KHz 1.0MHz
P(V(OUTPUT))
Frequency