PSpice Tutorial - PowerPoint PPT Presentation

About This Presentation
Title:

PSpice Tutorial

Description:

PSpice Tutorial October 13, 2004 Franklin Chiang Orcad Programs PSpice Use netlists to code up circuits. Text based. Start programs Orcad Family Release 9.2 ... – PowerPoint PPT presentation

Number of Views:244
Avg rating:3.0/5.0
Slides: 26
Provided by: Kenne73
Category:

less

Transcript and Presenter's Notes

Title: PSpice Tutorial


1
PSpice Tutorial
  • October 13, 2004

Franklin Chiang
2
Orcad Programs
  • PSpice
  • Use netlists to code up circuits. Text based.
  • Start ? programs ? Orcad Family Release 9.2 ?
    Orcad PSpice
  • Capture
  • Use diagrams to draw up circuits and simulate.
    Graphics based.
  • Start ? programs ? Orcad Family Release 9.2 Lite?
    Capture Lite

3
Startup and Basic Syntax
  • Start ? Programs ? Orcad Release 9.2 ? PSpice
  • File ? New ? Text file
  • 5 different commands you can use
  • Title first line of code (always)
  • .END last line of code (always)
  • Comment line denoted by
  • Element Resistor, capacitor, etc.
  • Control analysis

4
Passive Component Description
  • Resistor
  • Rltnamegt ltnode1gt ltnode2gt ltvaluegt
  • Ex. R1 1 2 100
  • Names should not contain comma, space, or , or
    parenthesis
  • Capacitor
  • Cltnamegt ltnode1gt ltnode2gt ltvaluegt
  • Ex CBYP 13 0 1uF
  • Inductor
  • Lltnamegt ltnode1gt ltnode2gt ltvaluegt

5
Units in PSpice
  • T tera 1012
  • G giga 109
  • Meg mega 106
  • k kilo 103
  • m milli 10-3
  • u micro 10-6
  • n nano 10-9
  • p pico 10-12
  • f femto 10-15

6
Source design
  • Independent Voltage Source
  • Vltnamegt ltnodegt lt-nodegt ltdc/acgt ltvaluegt
  • VCC 10 0 DC 6
  • Independent Current Source
  • Iltnamegt ltnodegt lt-nodegt ltdc/acgt ltvaluegt
  • I_in 10 0 AC 3m

7
Voltage Sources
  • DC Vname n n- DC ltvaluegt
  • AC Vname n n- AC ltmagnitudegt ltphasegt
  • Transient
  • Vname n n- sin(Vo Va freq td damp)
  • Vname n n- pulse(V1 V2 td tr tf PW T)
  • Vname n n- PWL(t1, v1, t2, v2, , tn, vn)

8
Active Devices (transistors!)
  • Usually given a model file as text file
  • Include it into pspice using
  • .lib ltname of filegt
  • ex .lib 115cmodel.txt
  • Make sure text file is in same directory

9
Including your own model files
  • .model ltnamegt lttypegt ltparameters.gt
  • .model QPNP PNP(Is650.6E-18 Xti3 Eg1.11
    Vaf100 Bf150 Ne1.829 Ise54.81f Ikf1.079
    Xtb1.5 Br3.563 Nc2 Isc0 Ikr0 Rc.715
    Cjc14.76p Mjc.5383 Vjc.75 Fc.5 Cje19.82p
    Mje.3357 Vje.75 Tr111.3n Tf603.7p Itf.65
    Vtf5 Xtf1.7 Rb10)
  • .model QNPN NPN(Is14.34f Xti3 Eg1.11 Vaf100
    Bf150 Ne1.307 Ise14.34f Ikf.2847 Xtb1.5
    Br6.092 Nc2 Isc0 Ikr0 Rc1 Cjc7.306p
    Mjc.3416 Vjc.75 Fc.5 Cje22.01p Mje.377
    Vje.75 Tr46.91n Tf411.1p Itf.6 Vtf1.7
    Xtf3 Rb10)
  • Copy, paste.

10
Declaring transistors
  • BJT
  • Qltnamegt ltNCgt ltNBgt ltNEgt ltmodelgt
  • Ex. Q23 10 24 13 npn
  • MOSFET
  • Mltnamegt ltNDgt ltNGgt ltNSgt ltNBgt ltmodelgt ltvarious
    parametersgt
  • M1 24 2 0 20 nmos
  • M2 2 9 3 0 pmos L10u W5u AD100p AS100p PD40u
    PS40u

11
Building a circuit
1
2
  • First, draw the diagram
  • Label nodes
  • Code in Pspice

3
3
4
0
12
Code
13
Analysis Types
  • DC Analysis
  • DC transfer curve source and sweep
  • .dc ltsourcegt ltvstartgt ltvstopgt ltvincrgt src2
    start2 stop2 incr2
  • .DC VIN 0.25 5.0 0.25
  • .DC VDS 0 10 .5 VGS 0 5 1
  • nested sweep for each VDS, sweep VGS from 0 to
    5 incrementing by 1 each time. So total number of
    operations would be 20 5 100

14
Analysis Types
  • Operating Point
  • .op
  • Calculates dc operating point of circuit with
    inductors shorted and capacitors open.
  • Useful in checking your work.
  • Results put in .txt file

15
Analysis types
  • AC small signal
  • computes the ac output variables as a function of
    frequency
  • first computes the dc operating point of the
    circuit and determines linearized, small-signal
    models for all of the nonlinear devices in the
  • resultant linear circuit is then analyzed over a
    user-specified range of frequencies
  • Can be used to compute noise!

16
Analysis Types
  • AC Analysis (cont)
  • .AC DEC ND FSTART FSTOP
  • Dec decade variation, ND pts. / decade
  • .AC LIN NP FSTART FSTOP
  • Lin linear variation, NP pts
  • .NOISE OUTV INSRC NUMS
  • OUTV output voltage which defines summing point
  • INSRC name of independent source which is the
    noise input reference
  • NUMS summary interval

17
Analysis Types
  • Transient (.tran ltstepgt ltstopgt ltstartgt)
  • The transient analysis portion of SPICE computes
    the transient output variables as a function of
    time over a user specified time interval
  • The initial conditions are automatically
    determined by a dc analysis
  • Useful for 115C
  • .tran 1ns 1000ns 500ns

18
Back to Resistor Bridge
  • Ex. Find voltage across R3 when Vin 10V

19
Results
20
Transistor examples IV curve
  • Plot I-V characteristic of NMOS with
  • W 1.2um
  • L 0.25 um
  • Set Vdd Vg 2.5V, Vs 0V

D
G
ID
S
21
Solution
3
  • 1) Draw circuit with sources
  • 2) Label nodes!
  • 3) Code in spice

2
0
22
Solution
23
Graph
24
Inverter demonstration
25
Results
Write a Comment
User Comments (0)
About PowerShow.com