Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to PSpice John Evans IT/CE September, 1999.

Similar presentations


Presentation on theme: "Introduction to PSpice John Evans IT/CE September, 1999."— Presentation transcript:

1 Introduction to PSpice John Evans IT/CE September, 1999

2 Introduction to PSpice2 A brief history of time… (1) Þ MicroSim - 1980s(?) - 1997/8 Þ OrCAD “merges” with MicroSim 1997/8 Þ OrCAD merges with Symmetry 1998 – OrCAD doesn’t merge with Symmetry 1999 Þ Cadence buys OrCAD 1999

3 Introduction to PSpice3 A brief history of time… (2) Þ Last MicroSim version - v8 Þ First OrCAD version - v9 Þ This used “Capture” - the OrCAD schematic capture program. Not introduced at CERN. Þ v9 to be introduced at CERN after Windows upgrade. OrCAD will use “MicroSim” schematics for next two years.

4 Introduction to PSpice4 Where are we going to today? Þ Use Schematic capture –to enter schematic and set up simulation parameters before running Þ PSpice (simulation engine) –and then look at results in Þ Probe Also available at CERN: –Parts (modelling program) –Stimulus Editor (to produce “custom” voltage/current/digital sources) –Optimizer (can automatically vary circuit component values to satisfy design criteria)

5 Introduction to PSpice5 Set-up PSpice Þ Run set-up from Windows menu –Makes “default” directories for temp files, backup files and user libraries. –Copies required files over to PC msim.ini (contains all library paths, controls “look” of the programs) msim.prb (used while running Probe)

6 Introduction to PSpice6 Freq1.sch (1) Þ Enter the circuit shown. –Use components: VDC R C VAC (VSIN) AGND OP-07 Bubble Þ Use the commands…

7 Introduction to PSpice7 Freq1.sch (2) Þ Get new part toolbar - menu - Draw/Get new part keyboard - ctrl-G Þ Flip/rotate part menu - Edit/Flip/rotate keyboard - ctrl-F, ctrl-R Þ Cut/Copy/Paste part menu - Edit Cut/Copy/Paste keyboard - ctrl-X, ctrl-C,ctrl-V

8 Introduction to PSpice8 Freq1.sch (3) Þ Wire circuit –Draw/Wire –ctrl-W use space bar/RMB Þ Change resistor values Þ Change Ref(erence) Des(ignators) Þ Label node v_out Þ Change VDC values Þ Label bubble connectors

9 Introduction to PSpice9 Set-up VAC source Þ Set-up VAC* –DC=0 used to find initial DC solution –ACMAG=1 source p-to-p value during AC analysis –ACPHASE=0 reference for phase measurements *VSIN can also be used for AC analysis - see Appendix 1 for set-up explanation

10 Introduction to PSpice10 Set-up AC analysis and Probe Þ From Menu –Analysis/Setup… Þ or Toolbar - Þ Click “AC Sweep” –Enter as shown –Click “OK”

11 Introduction to PSpice11 Set-up Probe and Run Analysis Þ Set-up Probe –From Menu Analysis/Probe Setup… –Under Data Collection tab, select “All” N.B. other options allow to limit size of.dat file Þ Run Analysis –From Menu Analysis/Simulate –From keyboard F11 –From Toolbar -

12 Introduction to PSpice12 Some Probe commands Þ Add Trace – –Trace/Add –Insert reduce traces shown, use voltage markers Þ Add Y-axis –Plot/Add Y-axis –Ctrl-Y N.B “>>” indicates the active axis Þ Display manipulation functions – or –from the menu View/Fit,In,Out,Area or –from the keyboard Ctrl N,I,O,A Þ To re-scale axes –double-click on any axis or –Plot X(Y)-Axis Settings...

13 Introduction to PSpice13 Exercise: Measure the f3dB point of v_out using the cursors Þ In Probe: –Trace/Add, DB(V(v_out)) –To make cursors active - select –Place one cursor on nominal 0dB point –Move other cursor until “dif” shows difference of 3dB

14 Introduction to PSpice14 Exercise: Measure the f3dB point of v_out using a goal function Þ N.B. to see a detailed explanation of this goal function and its parameters, select: –Trace/Goal Functions, LPBW, View –The g.f. can also be evaluated from this window (select Eval instead of View) In Probe: Trace/Eval Goal Function… Select: LPBW(1,db_level) Select: V(v_out) Enter 3 from the keyboard Click on OK

15 Introduction to PSpice15 Adding parameters Þ Change C1 value to {c_val} N.B. name is unimportant but { } are mandatory Þ Add a PARAM symbol (Draw/Get New Part…/ Param) Þ Set up NAME1 and VALUE1 PARAM values (double-click on the symbol). Þ Click OK

16 Introduction to PSpice16 Set-up Parametric sweep Þ Setup a Parametric sweep (Analysis/Setup…/ Parametric) Þ Click OK Þ Run AC analysis

17 Introduction to PSpice17 Parametric analysis results Þ When Probe opens, it will (typically) show: Þ The analysis results are split into “sections”. There is one section for each value of parametric sweep Þ Click on OK

18 Introduction to PSpice18 Exercises - Performance Analysis Þ Select Trace/Add. Plot DB(V(v_out)) Þ Select Trace/Performance Analysis (or from the toolbar). Þ Click OK - a new window appears. The X-axis is R, the parameter varied Þ Select Trace/Add. Plot (LPBW(V(v_out),3)) Þ Select Plot/Add Plot Þ Select Trace/Add. Plot 1/(LPBW(V(v_out),3))

19 Introduction to PSpice19 Transient.sch (1) Þ Load transient.sch Þ Complete by adding IPWL* (IPWL is a Piece Wise Linear current source) Set-up IPWL by adding (time,current) points: (T1=0, I1=0), (T2=10ms, I2=0), (T3=10.1ms, I3=1) *to set-up the ISTIM part, see appendix 3

20 20 Set-up transient and exercises Þ Set-up transient run: –Print step: 100ms –final time: 20s Þ What range of values of R1 satisfies: –risetime I(L1) < 2s –overshoot I(L1) < 10% ? Hints: –Range is somewhere between 0.4 and 1.5 Ohms (set-up Parametric Analysis in Schematics using Analysis/Setup…/Parametric…) –In Probe, select Trace/Performance Analysis…, click OK –Use GenRise() and Overshoot() goal functions

21 21 Exercises Exercise 1 Þ Design a “perfect” non-inverting voltage op-amp using E (voltage-controlled voltage- source). Verify using VPULSE (appendix 2) and transient analysis Þ Design a “perfect” non-inverting voltage op-amp using A(nalog) B(ehavioral) M(odelling) parts (found in ABM library) Þ Design an imperfect non-inverting voltage op-amp (output limited to  ”supply voltage”). Exercise 2 Þ Design an attenuator with input parameters IMP and ATT. Þ Calculate values for R1,R2 such that: –v_out = v_in - ATT dB –The impedance seen from RS = IMP –Add parameter checking

22 Introduction to PSpice22 Slow.sch Þ Load and simulate slow.sch Þ Zoom in on the output Þ Replace the digital pullup with a 1k resistor to +5V and re-simulate What’s the difference?

23 Introduction to PSpice23 Digital simulation (1) Þ “PSpice” is two simulators - one analogue and one digital –The analogue one solves Kirchoff’s laws –The digital one uses Boolean arithmetic Þ The digital simulator has an extensive library of “characterised” digital parts - these are mostly behavioural models only (which includes timing information) Þ To simulate “real” (analogue) input/output behaviour, find the transistor-level circuits –proprietary information –very slow simulation speeds

24 Introduction to PSpice24 Digital simulation (2) Þ Digital device libraries are usually specified in families. Þ Each device has its own timing model (typical, min., max. times specified here) Þ Each device has an I/O model. This will be shared by all devices in the same logic family –The I/O model includes a nominal impedance representation for each I/O pin. It also includes information on which type of AtoD and DtoA converter to use for each device. These converters are powered off the supplies defined by IPIN(supply). Þ The converters are ONLY USED when interfacing between the analogue and digital simulators!

25 Introduction to PSpice25 Digpower.sch (see Appendices 4, 5)

26 Introduction to PSpice26 Digital Setup Þ Timing mode –leave on Typical Þ Flip-flop initialization –depends on circuit Þ Default Interface –leave on Level 1 If you have lots of “unimportant” digital warnings - set Default A/D Interface to Level 2 (see Appendix 6)

27 Introduction to PSpice27 Setting Initial Conditions Þ Initial conditions can be set in the analogue simulator using: –IC on components –Setpoints –Nodeset –Save/Load Bias Point (also see Appendix 7)

28

29 Introduction to PSpice29 Appendices Þ 1)Setup VSIN Þ 2)Setup VPULSE Þ 3) Setup ISTIM Þ 4)Default digital power supplies Þ 5)Changing CMOS power supplies Þ 6)Default A/D interface definitions Þ 7)Setting Initial Conditions

30 Introduction to PSpice30 Appendix 1 - Setup VSIN Þ Set-up VSIN –DC=0 –AC=1* –VOFF=2 –VAMPL=2 –FREQ=5 –TD=1 –DF=1 –PHASE=45 *AC Analysis only

31 Introduction to PSpice31 Appendix 2 - Setup VPULSE Þ Example –DC=0 –AC=1* –V1=1 –V2=4 –TD=1 –TR=1 –TF=1 –PW=2 –PER=6 *AC Analysis only

32 32 Appendix 3 - Setup ISTIM Þ Double click on Stimulus= –Enter name test –Double click on ISTIM body to open STMED - Select PWL Þ Double-click on axis –Set X-axis to range 10.1ms, resolution 0.1ms –Set Y-axis to range 1, resolution 0.2 –Enter (time,value) points using the “pencil” : (t1=0, I1=0), (t2=10ms, I1=0), (t3=10.1ms, I3=1) Þ Save and exit Stimulus Editor N.B this saves the stimulus “test” in transient.stl

33 Introduction to PSpice33 Appendix 4 - Default digital power supplies  Most digital parts and stimulii already have a default power supply. Þ The four default power supplies provided in the model library are: – DIGIFPWR (TTL) – CD4000_PWR (CD4000 series CMOS) – ECL_10K_PWR (ECL10K) – ECL_100K_PWR (ECL 100K).

34 Introduction to PSpice34 Appendix 5 - Changing CMOS power supplies Þ Change default values for $G_CD4000_VDD/ $G_CD4000_VSS –Use the PARAM symbol –Enter the required values for CD4000_VDD and CD4000_VSS Þ Create a custom CMOS supply – use the symbol CD4000_PWR –Name VDD_NODE and VSS_NODE –Give values to VOLTAGE and REFERENCE* –Change power pins on IC symbol to reference custom supply –See example digpower.sch * VSS_NODE = REFERENCE Volts VDD_NODE = (VOLTAGE + REFERENCE) Volts

35 Introduction to PSpice35 Appendix 6 - Default A/D interface definitions Þ Default A/D interface Level 1 (AtoD1/DtoA1) - AtoD generates intermediate R,F, and X levels Level 2 (AtoD2/DtoA2) - AtoD does not generate R,F, and X levels Level 3 (AtoD3/DtoA3) => same as level 1* Level 4 (AtoD4/DtoA4) => same as level 2* N.B. DtoA1 is always the same as DtoA2 For HC/HCT parts, there are two different DtoA models Simple (level 1 or 2) - assumes fixed supply of +5V at 25C Elaborate (level 3 or 4) - valid from 2-6V, temperature derated N.B. Elaborate is much slower than simple - don’t use unless required

36 Introduction to PSpice36 Appendix 7 - Setting Initial Conditions (Following extracted from the “PSpice Reference Manual”) IC Initial Condition A voltage assigned to (or a current assigned to an inductor) for the duration of the bias point calculation. The voltage between two nodes and the current through an inductor can be specified. During bias calculations, PSpice clamps the voltages to specified values by attaching a voltage source with a 0.0002 ohm series resistor between the specified nodes. After the bias point has been calculated and the transient analysis started, the node is released..NODESET This helps calculate the bias point by providing an initial best guess for some node voltages and/or inductor currents. Some or all of the circuit’s node voltages and inductor currents can be given the initial guess, and in addition, the voltage between two nodes can be specified. The command is effective for the bias point (both small-signal and transient bias points) and for the first step of the DC sweep. It has no effect during the rest of the DC sweep, nor during a transient analysis. Unlike the.IC (Initial Bias Point Condition) command,.NODESET provides only an initial guess for some initial values. It does not clamp those nodes to the specified voltages. However, by providing an initial guess,.NODESET can be used to break the tie in, for instance, a flip-flop, and make it come up in a required state. If both the.IC command and.NODESET command are present, the.NODESET command is ignored for the bias point calculations (.IC overrides.NODESET). Other methods of setting initial conditions are by using Save Bias Point and Load Bias Point options - refer to the PSpice Reference manual for more information.

37

38 38 Exercise 1 “Solution”

39 Introduction to PSpice39 Exercise 2 “Solution” (no parameter checking)

40 40 Exercise 2 “Solution” (with parameter checking)


Download ppt "Introduction to PSpice John Evans IT/CE September, 1999."

Similar presentations


Ads by Google