Introduction to Elementary Circuit Simulations with PSpice Circuit Laboratory EE. Dept., National...

Preview:

Citation preview

Introduction to Elementary Circuit Simulations with PSpice

Circuit Laboratory

EE. Dept., National Taiwan University

September 2013

Outline• Where can you access PSpice?• To Get PSpice via Cadence OrCAD Site• Introduction to OrCAD Demo• Drawing Circuits with Capture CIS• Bias Point Analysis with PSpice• DC Analysis with PSpice• Transient Analysis with PSpice• AC Analysis with PSpice• FAQ

Where can you access PSpice?

• Two way to get PSpice– http://www.cadence.com/

• You can find OrCAD 16.6 Demo here.

– Your disc in Sedra/Smith• You can find OrCAD 9.2 Lite here.

• Which one to use?– They are almost the same.– You can choose one of them.– The following shows the use of OrCAD

16.6 Demo.

Example for Filling the Form

• First Name: (Yours)• Last Name: (Yours)• Company/University:

National Taiwan University

• Address: No. 1, Sec. 4, Roosevelt Road

• City: Taipei• Country: Taiwan• State/Province: 00-TW

• Postal Code: 10617• Telephone: +886-2-

33663700• Job Title: Student

Introduction to OrCAD Demo (1)

• Free version? No free meal, of course!• Limits exist since it is a lite version or a demo

The following limits apply to the Demo/Lite Version of the

products: – PSpice A/D

Circuit simulation is limited to circuits with up to: • 64 nodes • 10 transistors • 65 digital primitive devices • 10 transmission lines in total (ideal or non-ideal) • 4 pairwise coupled transmission lines.

• Limits [cont'd]– PSpice A/D [cont'd]

• The sample library includes 39 analog and 134 digital parts.

• Device characterization in the PSpice Model Editor is limited to diodes.

• Stimulus generation in the PSpice Stimulus Editor is limited to sine waves (analog) and clocks (digital).

• Circuit optimization with the PSpice Optimizer is limited to one goal, one parameter, and one constraint.

• You can not create CSDF format data files. • You can only display simulation data from simulations

performed with the Demo/Lite Version of the simulator.

Introduction to OrCAD Demo (2)

• Limits [cont'd]– Capture CIS

• The PSpice libraries are the only ones included. The standard Capture libraries are not included.

• Import facilities, netlisters, and accessories that are not relevant to PSpice are not included.

• You can not save a design that contains more than 60 parts. (You can view or create larger designs, but you can not save them.)

• You can not save a library that contains more than 15 parts.

Introduction to OrCAD Demo (3)

• Minimum hardware requirements – Pentium 4 (32-bit) equivalent or faster – Windows XP, Windows Vista, or Windows 7– Minimum 512MB RAM (1GB recommended)– 300MB swap space (or more)– DVD-ROM drive– 65,000 color Windows display with minimum

1024x768 (1280x1024 recommanded)

Introduction to OrCAD Demo (4)

Notes When Set OrCAD Demo Up

• In the procedure installing…– Make sure you are connected to the internet.– Run “Product/Demo Installation” only.– Don’t set the control file.– Choose to install “Capture CIS” and “PSpice” only.– Keep “Footprint Viewer Options” to be “None.”– Cancel “License Client Configuration.”

• For the first time execution…– Run “PSpice AD” first, close it, and then you can

run “Capture CIS” and use the function of PSpice.

Agree, of course!

Check this if you feel troubled

Close it

Check this if you feel troubled

Drawing Circuits with Capture CIS

• To simulate a circuit, we need to figure out the structure of the circuit. Capture CIS helps us to do that.– Create a new project with Analog or Mixed

A/D wizard after selecting a proper folder to save.

– Place the elements (even if it is the ground) that are in the PSpice libraries.

– Place the tags (if needed) that are in capsym.olb .

Remember to select a proper folder (no Chinese!!) to saveC:\OrCAD_Data is welcome to be used

%OrCAD%\tools\capture\library\pspice\demo

Add all of them

Frequently Used Elements

• R (resistor) / L (inductor) / C (capacitor)

• D (diode)– D1N4002– D1N750

• MBreakN / MBreakN4D (NMOS)

• MBreakP / MBreakP4D (PMOS)

• QBreakN (NPN BJT)– Q2N2222

• QBreakP (PNP BJT)– Q2N2097A

• uA741

• VDC / VPULSE / VSin / VSRC

• IDC / IPULSE / ISin / ISRC

• GND

Frequently Used Elements

Bias Point Analysis with PSpice

• Where to find elements?– Place → Part or find the “Place Part”

button on the toolbar– Pick the element you want– Click OK button

• How to link the elements?– Find Place Wire button on the toolbar– Link the elements you want– NOTE:

wire crossing without big dot → openwire crossing with big dot → short

Place Wire

Bias Point Analysis with PSpice

• How to simulate?– PSpice → New Simulation Profile– Fill out the profile name– Select Bias Point in Analysis Type– Click OK– PSpice → Run

profile name as your wish

DC Analysis with PSpice• Note: VSRC or ISRC used!• How to simulate?

– PSpice → New Simulation Profile

– Fill out the profile name

– Select DC Sweep in Analysis Type

– Fill out Name, Start Value, End Value and Increment

– Never forget to check the type of the Sweep variable!

– PSpice → Run

• A/D window

DC Analysis with PSpice• Add Trace?

– Trace → Add Trace...

Node Variable

Special Functions

Transient analysis with PSpice• NOTE: VSRC and ISRC not used!• Usually VSin/ISin/VPULSE/IPULSE used• How to simulate?

– PSpice → New Simulation Profile– Fill out the profile name– Select Time Domain(Transient) in

Analysis Type– Set Run to time, Start saving data after,

and Maximum Step Size– PSpice → Run

PER

V1

V2

TD

TR TF PW

Transient Analysis with PSpice

• Trick: Axis Settings– example: Lissajous

Figures Method– Plot → Axis

Settings...• Data Range• Scale• Fourier Analysis• Axis Variable

AC Analysis with Pspice (1)• NOTE: VSRC or ISRC used!• How to simulate?

– PSpice → New Simulation Profile– Fill out the profile name– Select AC Sweep/Noise in Analysis Type– Select the frequency scale (linear or

logarithmic Decade/Octave)– Fill out Start frequency, End frequency,

and the information about sampling rate– PSpice → Run

AC Analysis with PSpice (2)

• Trick: Multiple plots in one window– example: Bode plot– Plot → Add Plot to Window

• Trick: Y-Axis scale switch (linear or logarithmic)– Log Y Axis button on the toolbar

FAQ

• I faced the dialogs as follows and cannot create or edit any PSpice simulation profile.

– If you are a WinXP user, you must forget to run “PSpice AD” first in the first-time execution. Close Capture CIS, run PSpice AD, close it, then try to run Capture CIS again.

– If you are a WinVista user, there are some OS options you need to modify. See another slides discussing the troubleshooting of installation on Windows Vista.

FAQ

• How do I represent 10-3, 10-6 ,etc., by letter in PSpice?– Scale Symbol Name

10-15 F; f femto-

10-12 P; p pico-

10-9 N; n nano-

10-6 U; u micro-

10-3 M; m milli-

103 K; k kilo-

106 MEG; meg mega-

109 G; g giga-

1012 T; t tera-

FAQ

• How do I change axis scale quickly?– Try these buttons:

FAQ

• What's the differencebetween C1:1 and C1:2?– They represent the different pins

of your element. Distinguish thepins very carefully.

FAQ• I tried my PSpice, and saved my circuit file upon

the desktop, and when I try to simulate the circuit, I get some simulation error about "file not exist" or so on. What's up?– It is a tricky bug of PSpice. A filename or folder /

directory name with Chinese is not accepted in PSpice. Try creating a new file, copying the original circuit to the new file, and save it in a folder not containing Chinese or spaces, such as C:\temp . Hope this works. Of course, files saved upon the desktop, which is at C:\Documents and Settings\eeuser\ 桌 面 if you use Windows in Chinese version, are not accepted.

– In Version 16.6, you are suggested to save your design files in OrCAD_Data folder. This helps.

Recommended