PSpice使用教程
- 格式:ppt
- 大小:1.76 MB
- 文档页数:10
第二章PSPICE使用本章通过对一个共射极放大电路的仿真分析,学习PSpice软件的使用方法,掌握PSpice 软件分析电子电路的基本过程。
使用PSpice软件的步骤是:第一步:通过电路图编辑程序(Schematics Editor程序)输入编辑电路图;第二步:在电路图编辑程序中设置电路的分析方式和参数;第三步:运行电路仿真分析程序(PSpice程序);第四步:运行图形后处理程序(Probe程序)查看输出图形或查看电路输出文件。
第一节认识Schematics电路图编辑程序一、启动Schematics程序PSpice软件7.1版本是Windows应用程序,因此,应先启动Windows操作系统,Windows 操作系统可以是Windows 3.x 或Windows 95或Windows 98,本书都是在Windows 98操作系统下完成的,并且假定读者已掌握Windows 98操作系统的使用,如果读者尚没有掌握Windows 98操作系统的使用,应先了解Windows 98操作系统;如果读者使用的是Windows 3.x 或Windows 95操作系统,则在Windows系统操作上会略有不同,但PSpice显示的内容都是一样的,相信不应该出现什么大的困难。
使用PSpice软件总是从输入电路图开始,除非你已经直接在电路描述文件中输入了电路所需的数据,因此,使用PSpice软件通常是从Schematics电路图编辑程序开始的。
而且在Schematics电路图编辑程序中可以设置电路的分析方式和参数,可以通过菜单命令启动电路仿真分析程序(PSpice程序)及图形后处理程序(Probe程序)。
假定已经安装了PSpice软件的7.1版本,并且已经启动了Windows 98操作系统,则启动Schematics电路图编辑程序有三种方法:1. 选择开始菜单上的程序组>>MicroSim Eval 7.1程序组>>Schamatics程序项。
Pspice8.0快速入门手册目的:帮助初学者了解Pspice8.0的简单操作及使用方法,较深入的探讨还是好参考其他书籍及读者自行学习。
步骤:一、放置所需元件(包括电源)二、连接导线三、设定要执行的模拟内容四、设定Probe五、执行模拟六、利用Probe观察模拟结果七、将数据取出用其它软件画图八、补充说明开始模拟电路之前,必须先用[Schematic]将电路图画出来。
一、放置元件(包括电源)1、先开启[Schematic],点选[Draw/Get New Part],或按工具栏上的图标:2、即可打开如下对话框:(这是Advanced选单,Basic选单则无Search功能)你可以直接在Part Name处键入元件名称,例如需要一个电阻则键入R。
或你可以电选Libraries,再从其中点选。
你如果用的是 Pspice教学免费版,提供的Lebraries有限,但已能满足学习需求,不用担心。
常用的Librares内容如下:ANALOG.slb 常用的被动元件BREAKOUT.slb 可改变参数的基本元件SOURCE.slb 电源及信号源PORT.slb 接地及连接器ERAL.slb 常用的半导体元件(这是免费版专属元件库)3、确定元件后,按[Place]即可将元件拖放到电路图上,按一下鼠标左键,就可以将元件放在图面上,按右键则结束。
放完元件后,按的Close钮关闭对话框。
要改变元件的方向,可点选该元件,在执行[Edit/Rotate]菜单命令(快捷键Ctrl+R)或[Edit/Flip](快捷键Ctrl+F)。
4、要改变元件的参数(或称Attributes),可双击该元件,打开元件属性对话框。
如下图是一电阻,在1处点选VALUE,在2处键入需要的电阻值即可,然后按[Save Arrr],在按[OK]钮完成。
回到文件顶端二、连接导线1、利用连线工具(Draw Wire)画导线。
2、点选画线工具后,即可看到一个铅笔状的指示。
April 2016© 2013Cadence Design Systems, Inc. All rights reserved.Portions © Apache Software Foundation, Sun Microsystems, Free Software Foundation, Inc., Regents of the University of California, Massachusetts Institute of T echnology, University of Florida. Used by permission. Printed in the United States of America.Cadence Design Systems, Inc. (Cadence), 2655 Seely Ave., San Jose, CA 95134, USA.Product PSpice contains technology licensed from, and copyrighted by: Apache Software Foundation, 1901 Munsey Drive Forest Hill, MD 21050, USA © 2000-2005,Apache Software Foundation. Sun Microsystems, 4150 Network Circle, Santa Clara, CA 95054 USA © 1994-2007, Sun Microsystems, Inc. Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA © 1989, 1991, Free Software Foundation, Inc. Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, © 2001, Regents of the University of California. Daniel Stenberg, © 1996 - 2006, Daniel Stenberg. UMFPACK ©2005,TimothyA.Davis,UniversityofFlorida,(**************.edu).KenMartin,WillSchroeder,Bill Lorensen © 1993-2002, Ken Martin, Will Schroeder, Bill Lorensen. Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, Massachusetts, USA © 2003, the Board of Trustees of Massachusetts Institute of Technology. All rights reserved.Trademarks: Trademarks and service marks of Cadence Design Systems, Inc. contained in this document are attributed to Cadence with the appropriate symbol. For queries regarding Cadence’s trademarks, contact the corporate legal department at the address shown above or call 800.862.4522.Open SystemC, Open SystemC Initiative, OSCI, SystemC, and SystemC Initiative are trademarks or registered trademarks of Open SystemC Initiative, Inc. in the United States and other countries and are used with permission.All other trademarks are the property of their respective holders.Restricted Permission: This publication is protected by copyright law and international treaties and contains trade secrets and proprietary information owned by Cadence. Unauthorized reproduction or distribution of this publication, or any portion of it, may result in civil and criminal penalties. Except as specified in this permission statement, this publication may not be copied, reproduced, modified, published, uploaded, posted, transmitted, or distributed in any way, without prior written permission from Cadence. Unless otherwise agreed to by Cadence in writing, this statement grants Cadence customers permission to print one (1) hard copy of this publication subject to the following conditions:1.The publication may be used only in accordance with a written agreement between Cadence and itscustomer.2.The publication may not be modified in any way.3.Any authorized copy of the publication or portion thereof must include all original copyright,trademark, and other proprietary notices and this permission statement.4.The information contained in this document cannot be used in the development of like products orsoftware, whether for internal or external use, and shall not be used for the benefit of any other party, whether or not for consideration.Disclaimer: Information in this publication is subject to change without notice and does not represent a commitment on the part of Cadence. Except as may be explicitly set forth in such agreement, Cadence does not make, and expressly disclaims, any representations or warranties as to the completeness, accuracy or usefulness of the information contained in this document. Cadence does not warrant that use of such information will not infringe any third party rights, nor does Cadence assume any liability for damages or costs of any kind that may result from use of such information.Restricted Rights: Use, duplication, or disclosure by the Government is subject to restrictions as set forth in FAR52.227-14 and DFAR252.227-7013 et seq. or its successor.ContentsBefore you begin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 How to use this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Symbols and conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Related documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 What this user’s guide covers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 PSpice overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Add-on options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 PSpice Smoke Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 PSpice Advanced Optimizer Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 PSpice Advanced Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 SLPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 If you don’t have the standard PSpice A/D package . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Comparison of the different versions of PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 If you have PSpice Lite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Minimum hardware requirements for running PSpice: . . . . . . . . . . . . . . . . . . . . . . . . 32 PSpice Samples and T utorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Part one: Simulation primer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 1Things you need to know . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 What is PSpice? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Analyses you can run with PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Basic analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Advanced multi-run analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Analyzing waveforms with PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 What is waveform analysis? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Using PSpice with other programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Using design entry tools to prepare for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . 47What is the PSpice Stimulus Editor? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 What is the PSpice Model Editor? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Files needed for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Files that design entry tool generates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Other files that you can configure for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Files that PSpice generates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Directory structure for analog projects in Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 How are files configured at the design level maintained in the directory structure for analog projects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 How are files configured at the profile level maintained in the new directory structure for analog projects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 What happens when I convert an analog project that uses a design from another project or from another location? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 What should I do if the schematic for a converted analog project uses FILESTIM n parts from the SOURCE library? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Design Entry HDL libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Reference Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Local libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 PSpice model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 The cds.lib file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Encrypting PSpice Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Using PSpiceEnc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Using Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 722Simulation examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Example circuit creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Using Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Using Design Entry HDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Using Design T emplates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Finding out more about setting up your design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Running PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Performing a bias point analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Using the simulation output file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Finding out more about bias point calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99DC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Setting up and running a DC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Displaying DC analysis results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Finding out more about DC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 T ransient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Finding out more about transient analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 AC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Setting up and running an AC sweep analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 AC sweep analysis results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Finding out more about AC sweep and noise analysis . . . . . . . . . . . . . . . . . . . . . . . 122 Parametric analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Setting up and running the parametric analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Analyzing waveform families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Finding out more about parametric analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Finding out more about performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Part two: Design entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1383Preparing a design for simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 Checklist for simulation setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 T ypical simulation setup steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 Advanced design entry and simulation setup steps . . . . . . . . . . . . . . . . . . . . . . . . . 141 When netlisting fails or the simulation does not start . . . . . . . . . . . . . . . . . . . . . . . . 142 Using parts that you can simulate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Vendor-supplied parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Passive parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 Breakout parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Behavioral parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154 Simulating asymmetric parts in PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Simulating homogenous parts in PSpice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Specifying values for part properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Using global parameters and expressions for values . . . . . . . . . . . . . . . . . . . . . . . . . . 158Global parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Defining power supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 For the analog portion of your circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 For A/D interfaces in mixed-signal circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Defining stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Analog stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Digital stimuli . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Things to watch for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Unmodeled parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Unconfigured model, stimulus, or include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 Unmodeled pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Missing ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Missing DC path to ground . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1854Creating and editing models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 What are models? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 How are models organized? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Model library configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Global vs. design vs. profile models and libraries . . . . . . . . . . . . . . . . . . . . . . . . . . 191 Nested model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 PSpice-provided models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Model library data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Device characteristic curves-based models vs. Template-based models . . . . . . . . 195 T ools to create and edit models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Ways to create and edit models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Using the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 Ways to use the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201 Running the Model Editor alone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Creating models using the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 Creating models based on device characteristic curves . . . . . . . . . . . . . . . . . . . . . 203Creating models based on PSpice templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Importing an existing model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 Enabling and disabling automatic part creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 Running the Model Editor from the schematic editor . . . . . . . . . . . . . . . . . . . . . . . . 215 Model creation examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Example: Creating a PSpice model based on device characteristic curves . . . . . . . 219 Example: Creating template-based PSpice model . . . . . . . . . . . . . . . . . . . . . . . . . . 228 Editing model text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 Example: editing a Q2N2222 instance model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 Using the Create Subcircuit Format Netlist command (Capture only) . . . . . . . . . . . . . . 237 Changing the model reference to an existing model definition . . . . . . . . . . . . . . . . . . . 239 Reusing instance models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Reusing instance models in the same schematic . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Making instance models available to all designs . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Configuring model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 The Configuration Files tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 How PSpice uses model libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Adding model libraries to the configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Changing the model library scope from profile to design, profile to global, design to global and vice versa . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Changing model library search order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Changing the library search path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Handling smoke information using the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Adding smoke information to PSpice models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 Creating template-based PSpice models with smoke information . . . . . . . . . . . . . . 256 Using the Model Editor to edit smoke information . . . . . . . . . . . . . . . . . . . . . . . . . . 256 Examples: Smoke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Adding smoke information to the D1 diode model . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Adding smoke information to the OPA_LOCAL operational amplifier model . . . . . . 259 Smoke parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Diode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Bipolar Junction Transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Magnetic Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Ins Gate Bipolar T ransistor (IGBT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Junction FET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266 Operational Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 Voltage Regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Darlington T ransistor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2735Creating parts for models. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 What’s different about parts used for simulation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276 Ways to create parts for models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 Preparing your models for part creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Starting the Model Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Using the Model Editor to create parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Batch mode of part creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Interactive mode of part creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 Creating Design Entry T ool parts for all models in a library . . . . . . . . . . . . . . . . . . . . . . 282 Using batch mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Using interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 Setting up automatic part creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Creating parts in the batch mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 Creating parts using interactive mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Basing new parts on a custom set of parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 Editing part graphics (Capture only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 How Capture places parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 Defining grid spacing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 Attaching models to parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 Defining part properties needed for simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 PSPICETEMPLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310 IO_LEVEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319 MNTYMXDL Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 PSPICEDEFAULTNET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3216Analog behavioral modeling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Chapter overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 Overview of analog behavioral modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324 The ABM part library file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 Placing and specifying ABM parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326 Net names and device names in ABM expressions . . . . . . . . . . . . . . . . . . . . . . . . . 326 Forcing the use of a global definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 ABM part templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 Control system parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329 Basic components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332 Limiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 Chebyshev filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Integrator and differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 T able look-up parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 Laplace transform part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344 Math functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348 ABM expression parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349 An instantaneous device example: modeling a triode . . . . . . . . . . . . . . . . . . . . . . . 353 PSpice-equivalent parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 Implementation of PSpice-equivalent parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 Modeling mathematical or instantaneous relationships . . . . . . . . . . . . . . . . . . . . . . 358 Lookup tables (ET ABLE and GT ABLE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362 Frequency-domain device models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Laplace transforms (LAPLACE) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Frequency response tables (EFREQ and GFREQ) . . . . . . . . . . . . . . . . . . . . . . . . . 366 Cautions and recommendations for simulation and analysis . . . . . . . . . . . . . . . . . . . . . 369 Instantaneous device modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369 Frequency-domain parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 Laplace transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370 T rading off computer resources for accuracy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374 Basic controlled sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375 Creating custom ABM parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375。
第三次课程PSpice快速入门第一节PSpice开发环境本节通过一个简单的实例,逐步介绍PSpice的开发环境和使用方法一、启动Capture CIS点击开始->程序->Orcad Family Release 9.2->Capture CIS,启动仿真界面。
二、建立新工程点击菜单命令File/New/Project,图1或直接用工具栏上的快捷按钮。
弹出图3所示的对话框。
图2三、设置新工程文件的名称、路径以及所使用的模板图3图3中各项的含义如下:Name:工程文件名,可键入新建的设计项目名称。
Analog or Mixed A/D Project:所创建的工程可以进行模拟量仿真或模数混合仿真,仿真通过后也可以进行印制电路板的自动和手动布局布线。
本课程之介绍所绘制的电路图如何进行PSpice电路模拟,因此应选此项。
PC Board Wizard:所创建的工程可以直接进行印制电路板的布局布线,也可以选择相关选项进行模数混合仿真。
Schematic:所创建的工程只能设计原理图。
Location:选择新建工程文件的存放路径。
必须是已有的路径,此处无法自己创建新路径。
设置好后,单击OK按钮,出现图4所示界面,其中各项的含义如下:图4Create based upon an existing project:所创建的工程是基于已有的工程,这样选择已有工程后,新建工程可以再原有基础上进行修改。
Create a blank project:创建一个空白工程,相当于要在一张空白图纸上画图。
图5创建的空白工程包括三个窗口“SCHEMATIC1:PAGE1”窗口显示了一张空白的图纸,可以再图纸上绘制自己的电路图。
若没有工具栏,可单击“SCHEMATIC1:PAGE1”窗口,使其成为活动窗口,就会出现工具栏。
左下方“Session Log”窗口显示软件执行任务中的有关信息,在仿真中出现的错误也在此窗口显示。
《PSpice使用教程》课件•引言•PSpice基础操作•电路元件与模型库•仿真设置与运行分析目•高级功能应用•故障排查与问题解决录引言它能够对电路进行直流分析、交流分析、瞬态分析等,并输出相应的电压、电流等波形图。
PSpice 广泛应用于电子工程、通信工程、自动化控制等领域。
PSpice是一款电子电路仿真软件,全称为Personal Simulation Program with Integrated Circuit Emphasis。
PSpice简介模拟电路设计和分析数字电路设计和验证混合信号电路仿真电源电路设计和优化PSpice应用领域本课件旨在帮助学习者掌握PSpice软件的使用方法,提高电子电路设计和分析能力。
课件结构本课件包括引言、基础知识、电路仿真实践、高级应用和结论等部分,其中引言部分介绍PSpice软件的基本概念、应用领域和课件目的;基础知识部分介绍电路仿真所需的基本理论和PSpice软件的基本操作;电路仿真实践部分通过实例演示PSpice软件的使用方法;高级应用部分介绍PSpice 软件在复杂电路设计中的应用;结论部分总结本课件的主要内容和学习成果。
课件目的课件目的和结构VSPSpice基础操作软件安装与启动系统要求安装步骤启动方法属性栏显示选中对象的属性和参数设置等。
显示当前打开的项目文件和电路图等。
工具栏提供常用工具的快捷按钮,如画笔、选择、移动、旋转等。
主界面组成包括菜单栏、工具栏、项目栏、菜单栏提供文件、编辑、视图、插入、模拟、工具和帮助等菜单选项。
界面布局及功能介绍菜单栏和工具栏使用菜单栏操作01工具栏操作02自定义工具栏03通过菜单栏或工具栏中的新建选项来创建一个新的PSpice 项目。
新建项目保存项目另存为功能最近打开项目通过菜单栏或工具栏中的保存选项来保存当前项目文件和电路图等。
用户可以选择将当前项目另存为其他格式或版本的文件。
PSpice 软件会自动记录最近打开过的项目文件,方便用户快速打开。
Pspice9.2入门一、建立工程文件新建一个文件夹(名称为英文或数字组成)用于存放PSPICE文件,例如:F:/PSPICE/xin/xin1。
进入Capture画面中,按" File/NEW/Project "命令,产生(NEW Project)对话框,如下图。
在"名称"栏中,输入工程名(英文)。
在Location栏中,输入本项目要储存的磁盘文件夹路径。
在Create a New Project Using栏内选择Analog or Mixed-Signal Circuit Wizar选项(如果我们只是要绘制一张单纯的电路图,不需要在作任何进一步的处理,可以选Schematic)单击OK按钮,调出选择Create a blank project,建立一个空白的工程文件。
二、编辑原理图1.放置所需元件。
用鼠标单击Place/part,出现以下对话框:单击Add Library,选择添加库文件路径C:\Program Files\Orcad\Capture\Library\PSpice添加编缉原理图需要的库文件,例如Analog.olb,Source.olb,zetex.olb库文件,添加后界面如下:添加好库文件后即可从相应的库文件中选择元件编辑原理图,也可从编辑界面右侧工具栏中拖放元件。
•基本元器件库:1)商品化的元器件符号库:大都是不同型号的半导体器件和集成电路。
其库文件名称分为两类:①已元器件的类型为文件名.有:以74开头的各种TTL74系列的数字电路;CD4000库文件中的CMOS4000系列电路;BIPOLAR库文件中的各种型号双极晶体管(三极管);OPAMP库文件中的各种运算放大器等。
②在库文件名中包含公司名称。
有:SIEMEN库文件中的西门子公司生产的半导体器件;MOTOR开头的库文件中是摩托罗拉公司生产的器件等。
2)常用非商品化元器件符号ANALOGY库:模拟电路中各种无源器件,如电阻、电容、电感等。
将下载文件ps1.img~ps9.zip、undisk.zip分别解压缩至PSPICE50文件夹,形成1.img~9.img、undisk.exe共10个文件,执行如下命令:undisk *.img 回车在还原过程中,会3次提示有文件重复是否覆盖?均回答N,即完成安装。
第二章Pspice control shell (控制外壳)的使用上一章下一章回目录启动方法:在DOS下进入PSPICE子目录,输入PS回车。
下拉菜单:1.Files(文件)1.1.current File...(当前文件)执行后弹出定义输入文件对话框,提示输入电路网单文件名,输入后缀为.cir文件名,回车。
若文件已存在,则打开文件,并在提示区显示“Loaded”(已调入);反之,则新建文件,并在提示区显示“New”(新建)。
要打开当前工作目录下的电路网单文件,也可按F4回车使能,并在菜单命令前加上使能标记“>>”。
再次执行该命令使不能,并取消菜单命令前的使能标记。
3.3.>>log to file...(记录到文件)将用户操作stmEd的整个步骤记录到一个文件中。
执行后,提示创建记录文件?回答Y后,提示输入记录文件名,回车使能并在菜单命令前加上使能标记“>>”。
再次执行该命令使不能,并取消菜单命令前的使能标记。
4.Analysis(分析)键,弹出一个文件列表,用鼠标或键盘方向键选中其中的一个文件即可。
1.2.Edit(编辑)执行后,启动Pspice自带的电路编辑器(最大文件尺寸为32K),它实际上是一个与Edit类似的文本编辑器,其上方为状态栏,列出了当前光标的行列位置,插入/改写状态。
下方为编辑窗口,下面列出了它的主要编辑功能键:ctrl+A: 左移一个单词ctrl+F: 右移一个单词ctrl+Z: 上移一行ctrl+W: 下移一行ctrl+Y: 删除当前行ctrl+PGUP: 移至文件首ctrl+PGDN: 移至文件尾ctrl+HOME: 移至页首ctrl+END: 移至页尾alt+M: 开始标记一个块alt+C: 拷贝至剪贴板alt+X: 剪切至剪贴板alt+P: 粘贴至当前光标处alt+S: 匹配搜索F7:toggle justify鼠标操作:单击左或右键,开始标记块,同时击左右键,放弃。
PSPICE 簡易開始手冊步驟:一﹑畫出你所要的元件(包括電源)二﹑將線接好三﹑設定要執行的模擬內容四﹑設定PROBE五、模擬執行六﹑利用PROBE觀察模擬結果七﹑將數據取出用其他程式畫圖開始模擬電路以前,你必須先用[Schematic]將電路圖畫出來。
一﹑畫出你所要的元件(包括電源)1. 先開啟[Schematic],點選[Draw/Get New Part],或按工具列上的圖式:2. 你即可看到元件點選單如下:(這是Advanced選單,Basic選單則無Search功能)你可以直接在Part Name處鍵入元件名稱,例如需要一個電阻則鍵入R。
或你可以點選Libraries,再從其中點選。
ANALOG.slb 常用的被動元件BREAKOUT.slb 可改變參數之基本元件SOURCE.slb 電源及訊號源PORT.slb 接地及連接器eval.slb 常用的半導體元件3. 確定元件後,按[Place]即可將元件拖放在電路圖面上,按滑鼠左鍵一下就會放一個元件在圖面上,按右鍵則結束。
元件通通放完,按元件點選單之Close 關閉此視窗。
假如元件的方向不如你意,可點選該元件,再點選[Edit/Rotate](or Ctrl-R)或[Edit/Flip](or Ctrl-F)改變方向。
4. 如果你想要更改元件的參數(或稱Attributes),可點該元件兩次,即出現對話框,如下圖即為一電阻,點選VALUE可修改電阻值,在標示2處鍵入所要的值即可,然後一定要按[Save Attr],再選[OK]結束。
5. PSPICE所需要的電路接線和你在麵包板上接線是一樣的,由其再使用運算放大器時不要忘了直流電壓源。
二﹑將線接好1.利用接線工具(Draw Wire)將線路完成。
2. 點選接線工具後,即可看到一個鉛筆狀的指示。
移至欲接線之接腳,按左鍵,開始引線,要轉彎時可按左鍵一下,移至目標接腳後再按左鍵一下,完成接線。
实验13 pspice使用技巧1.IPLOT,VPLOT,IPRINT,VPRINT符号的使用观察各个部分电压电流波形,然后观察out文件里面的电压电流数据与波形。
2初始条件的设定(1)IC符号的使用(2)NODESET符号的使用(3)电容器,电感器自身的IC属性页可以用来设置初始电压和电流数值观察上面两组数据下的电压电流IC1作用是给所在点一个初始电压值,相当于并联一个内阻很小的直流电压。
大家可以使用叠加原理计算一下各个电压值,与输出波形对照一下。
IC2作用是:相当于给某个器件一个初始电压值(正或者负值),相当于并联一个内阻很小的直流电压源。
大家可以使用叠加原理计算一下各个电压值,与输出波形对照一下。
NODESET作用是:仅仅给某个器件赋予一个初始电压值。
后面数值不影响。
电容器IC属性是指定它起始时间的电压值,作用是:给某个器件赋予一个初始电压值。
刚开始一段时间对后面电压电流数值有一定影响,但是到达稳态以后没有什么影响了。
3.动态开关SW-TCLOSE和SW-TOPEN 位于ANL-MISC库里把转换时间tclose,topen都设置为1微秒(默认值0),TTRAN是转换过程需要的时间从下面波形可以看出换路开关的开关过程实际是一个暂态过程,并非一个理想的开关。
4.互感属性设置互感减小为0时的电流,电压值是5.空心变压器可以看出变压器的等效电阻(它与R2串联)很小大约3毫欧。
6。
理想变压器左右线圈匝数比为100:200,所以左右电压比为1:2注明:其它类型变压器XFRM_NONLIN和XFRM_LIN位于BREAKOUT与ANL-MISC库,左右都有多个抽头。
Pspice 教學講義一. 建立新的專案1.開啟Orcad -> Capture應用程式。
2.File->new建立一個新的Project。
3.彈出新視窗如下。
格子中,輸入專案(project)名稱,本範例之專案名稱為:“lab2-1_tran”。
5.Create a new project using有4種選擇,皆有不同的特性,實驗中要設計與模擬電路,所以要選擇第一個選項(Analog or Mixed A/D)。
6.Location是設定檔案儲存位置,按Browse可設定所要的目錄。
7.OK後,彈出新視窗8.左圖可設定是否繼承已存在的計畫,這邊選擇Createa blank project產生一個空白的計畫。
9.OK後,出現設計視窗。
/..(SCHEMATC1 : PAGE1)二. 加入元件資料庫與認識元件1.中間視窗為設計視窗,右邊工具列第二格為元件工具,點選後出現新視窗。
( place part )。
2.最初設計時元件欄通常沒有任何元件,因此點選Add Library選項。
3.彈出新視窗,選擇要加入的元件資料庫。
(元件符號庫C:\Cadence\Orcad_9.2.3\tools\capture\library\pspice)4.加入實驗需要的資料庫: analog.olb, source.olb,opamp.olb…5.常見資料庫如下。
6.在Part List選擇好元件,右下會出現元件圖示,OK即可使用。
(其他元件資料庫同學可以自己加加看,了解一下各資料庫裡面的元件)元件庫說明Analog.olb 有電阻、電容、電感、理想OP…Source.olb 各種電源,含接地元件…Opamp.olb 一般市面上的放大器(μA741、LM324…)三. 繪製電路與模擬3-1 繪製電路1.請嘗試設計出以上反相放大器電路(使用ua741,<注意>ua741元件在EV AL元件庫裡)。