PSPICE仿真
- 格式:docx
- 大小:1.15 MB
- 文档页数:21
PSpice基本仿真分析例程⼀、瞬态分析⼆、直流分析2.1、直流分析电路2.2、直流分析配置2.3、直流分析输出波形受供电电源的限制,输出最⼤值为±15V。
三、交流分析3.1.1、交流分析电路13.1.1、交流分析设置13.1.1、交流分析输出波形图1由于使⽤的运放为理想运放,没有频率特性,因此输出电压固定为输⼊2V。
3.2.1、交流分析电路2添加电容C1使放⼤电路有了频率特性,低频C1断路,⾼频C1短路。
3.2.1、交流分析配置23.2.1、交流分析波形图2四、参数分析4.1.1、直流参数分析电路4.1.2、直流参数分析配置增益对数递增100-1M4.1.3、直流参数分析波形图由图中所⽰环路增益越⼩误差越⼤。
五、温度分析5.1基本温度分析电路5.2、器件温度系数参数设定(TC)5.3、温度分析参数配置5.3.1、初始TNOM设定为0℃5.3.2、直流分析温度配置5.4、温度分析波形图六、交流&参数分析(低通滤波器)6.1.1、交流扫⾯低通滤波器电路图6.1.1、交流扫⾯低通滤波器仿真配置6.1.1、交流扫⾯低通滤波器输出波形每10倍频40db。
七、BUCK降压电路7.1.1、BUCK降压电路仿真原理图7.1.2、BUCK降压电路仿真配置(瞬态分析)7.1.3、BUCK降压电路输出波形Ⅰ、V(OUT)输出端波形Ⅱ、电感电流与V(OUT)稳态波形。
7.2.1、BUCK降压电路仿真2 通过调整电源输⼊与负载电阻,测试电路中重要参数变化。
Sbreak模拟负载,Sbreak的值在10Ω与20Ω之间变化。
Sbreak参数:7.2.2、仿真参数配置7.2.3、BUCK降压电路相关参数波形。
仿真⽂件:链接:https:///s/1iyoNV5LS5iU3obppImrNJA提取码:suc7。
PSpice直流仿真实践(1)使用PSpice软件最终目的就是对各种电路进行仿真分析。
本章列举了各种模拟电路PSpice仿真实践的例子,读者通过这些例子,可以进一步体会PSpice 的应用特点和强大的电路分析能力。
PSpice可以对以下类型的电路进行仿真分析:直流电路、交流电路、电路的暂态、模拟电子电路、模拟电路、数模混合电路。
一、直流工作点分析语句此语句规定计算并打印出电路的直流工作点(又称直流偏置点)。
这时电路中的电感按短路、电容按开路处理。
设置了该语句,输出文件可打印所有节点电压、所有电压源的电流及电路的直流功耗、所有晶体管各极的电流和电压、非线性受控源的小信号(线性化)参数。
注意:无论输入文件中有无.OP语句,程序在进行直流、交流和暂态分析时,都要自动进行直流偏置点分析。
只是没有.OP语句时,输出文件只打印所有节点电压和所有电压源的电流及电路的直流功耗三项内容。
二、直流扫描分析语句直流分析语句用于对电路作直流分析。
语句在执行过程中,对指定的变量在指定的范围内进行扫描,每给一个变量的扫描点,就对电路进行一次直流分析计算,计算内容是节点电压和支路电流。
直流分析语句可对如下变量进行扫描:●电源:任何独立电压源和独立电流源的电流、电压值均可设为扫描变量。
●模型参数:在.MODEL语句中描述的模型参数均可设为扫描变量。
●温度:设置TEMP作为扫描变量时,对每个扫描变量值,电路元器件的模型参数都要更新为当时温度下的值,所以执行该分析程序就是分析了扫描温度下的电路的直流特性。
●全程参数:扫描变量使用关键字PARAM,后跟参数名。
按照.PARAM的定义,该扫描变量就为全程参数。
说明:对哪个变量扫描,该变量就是自变量,即Probe输出图形的横坐标。
直流分析语句格式:分析语句对变量扫描时有四种扫描方式,它们是:LIN:线性扫描,每一个扫描点和它前后扫描点之间的距离是相等的。
每两个相邻扫描点间的距离为扫描增量。
pspice仿真实验报告Pspice仿真实验报告引言:电子电路设计与仿真是电子工程领域中的重要环节。
通过使用电路仿真软件,如Pspice,能够在计算机上对电路进行模拟,从而节省了大量的时间和成本。
本文将介绍一次使用Pspice进行的仿真实验,并对实验结果进行分析和讨论。
实验目的:本次实验的目的是设计一个低通滤波器,通过Pspice进行仿真,并验证其性能指标。
实验步骤:1. 设计电路图:根据低通滤波器的设计要求,我们选择了一个二阶巴特沃斯滤波器。
根据滤波器的截止频率和阻带衰减要求,我们确定了电路的参数,包括电容和电感的数值。
2. 选择元件:根据电路图,我们选择了适当的电容和电感元件,并将其添加到Pspice软件中。
3. 设置仿真参数:在Pspice中,我们需要设置仿真的时间范围和步长,以及输入信号的幅值和频率等参数。
4. 运行仿真:通过点击运行按钮,Pspice将开始对电路进行仿真。
仿真结果将以图表的形式显示出来。
实验结果:通过Pspice的仿真,我们得到了低通滤波器的频率响应曲线。
从图表中可以看出,在截止频率以下,滤波器对输入信号的衰减非常明显,而在截止频率以上,滤波器对输入信号的衰减较小。
这符合我们设计的要求。
此外,我们还可以通过Pspice的仿真结果,得到滤波器的幅频特性和相频特性。
通过分析这些结果,我们可以进一步了解滤波器的性能,并对其进行优化。
讨论与分析:通过本次实验,我们深入了解了Pspice仿真软件的使用方法,并成功设计了一个低通滤波器。
通过仿真结果的分析,我们可以看到滤波器的性能符合预期,并且可以通过调整电路参数来进一步优化滤波器的性能。
然而,需要注意的是,仿真结果可能与实际电路存在一定的误差。
因此,在实际应用中,我们需要结合实际情况,对电路进行实际测试和调整。
结论:通过Pspice的仿真实验,我们成功设计了一个低通滤波器,并验证了其性能指标。
通过对仿真结果的分析和讨论,我们进一步了解了滤波器的特性,并为实际应用提供了一定的参考。
PSpice A/D数模仿真技术主要包括以下几类仿真:
1、直流扫描分析(DC Sweep)
电路的某一个参数在一定范围内变化时,电路直流输出特性的分析和计算。
2、交流扫描分析(AC Sweep)
计算电路的交流小信号线性频率响应特性,包括幅频特性和相频特性,以及输入输出阻抗。
3、噪声分析(Noise)
在设定频率上,计算电路指定输出端的等效输出噪声和指定输入端的等效输入噪声电平。
4、直流偏置点分析(Bias Point)
当电路中电感短路,电容断路时,电路静态工作点的计算。
进行交流小信号和瞬态分析之前,系统会自动计算直流偏置点,以确定瞬态分析的初始条件和交流小信号条件下的非线性器件的线性化模型参数。
5、时域/瞬态分析(Transient)
在给定激励下,电路输出的瞬态时域响应的计算,其初始状态可由用户自定义,也可是直流偏置点。
6、蒙特卡洛分析(Monte-Carlo)
根据实际情况确定元件参数分布规律,然后多次重复进行指定电路特性的分析,每次分析时的元件参数都采用随机抽样方式,完成多次分析后进行统计分析,就可以得到电路特性的分散变化规律。
7、最坏情况分析(Worst)
电路中元件处于极限情况时,电路输入输出特性分析,是蒙特卡洛的极限情况。
8、参数扫描分析(Parametric Sweep)
电路中指定元件参数暗规律变化时,电路特性的分析计算。
9、温度分析(Temperature)
在指定温度条件下,分析电路特性。
10、灵敏度分析(Sensitivity)
计算电路中元件参数变化对电路性能的影响。
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 直流仿真实践(2)使用PSpice 软件最终目的就是对各种电路进行仿真分析。
本章列举了各种模拟电路PSpice 仿真实践的例子,读者通过这些例子,可以进一步体会PSpice 的应用特点和强大的电路分析能力。
PSpice 可以对以下类型的电路进行仿真分析:直流电路、交流电路、电路的暂态、模拟电子电路、模拟电路、数模混合电路。
为了检测某个支路的电流,可以在电路中插入一个零值电压源,在Pspice 中这样的电压源可以当作电流表。
因为零值电压源相当于短路线,对电路的工作不回产生任何影响。
(利用零值电压源做电流表)为了检测某开路电压,可以在电路中插入一个零值电流源。
在Pspice 中这样的电流源可以当作电压表。
因为零值电流源相当开路,对电路的工作不会产生任何影响。
(利用零值电流源做电压表)+V —+Vo-参数赋值语句和函数定义语句在电路分析中,常常用一个数学公式来表示电路变量之间的关系,如图所示的两个电阻分压电路中,分压比就可以用以下的公式来表示: 21221R R R V V )(k +==分压比在某些仿真分析中,不一定需要确定分压电路两个电阻的阻值,而只需要电路的分压比即可。
但电阻元件描述语句要求必须给出类似上电阻值,所以在这种情况下,应用参数赋值语句和函数定义语句是十分方便的。
利用函数定义语句可以将一些参数用数学表达式表示,而利用参数定义语句就可以用数学表达式代替元件描述中的参数值,而且还可以利用直流扫描语句对它进行扫描。
参数赋值语句格式如下:语句中的name 是定义的参数名,value 和expression 分别是参数值和表达式,表达式expression 必须仅含常数或前面已定义过的参数,其他参数不能出现在表达式中;语句定义好后,就可用其参数名代替电路说明过的大多数参数(包括所有的模型参数)。
但语句中的参数名(name)不能与程序中已定义过任何其他参数名同名,也不能用带“·”的命令名定义参数名。
【教程】PSpice的4种基本仿真分析详解PSpice A/D将直流工作点分析、直流扫描分析、交流扫描分析和瞬态TRAN分析作为4种基本分析类型,每一种电路的模拟分析只能包括上述4种基本分析类型中的一种,但可以同时包括参数分析、蒙特卡罗分析、及温度特性分析等其他类型的分析,现对4种基本分析类型简介如下。
1. 直流扫描分析(DC Sweep)直流扫描分析的适用范围:当电路中某一参数(可定义为自变量)在一定范围内变化时,对应自变量的每一个取值,计算出电路中的各直流偏压值(可定义为输出变量),并可以应用Probe功能观察输出变量的特性曲线。
例对图1所示电路作直流扫描分析图1(1)绘图应用OrCAD/Capture软件绘制好的电路图如图2所示。
图2(2)确定分析类型及设置分析参数a) Simulation Setting(分析类型及参数设置对话框)的进入•执行菜单命令PSpice/New Simulation Profile,或点击工具按钮,屏幕上弹出New Simulation(新的仿真项目设置对话框)。
如图3所示。
图3•在Name文本框中键入该仿真项目的名字,点击Create按钮,即可进入Simulation Settings (分析类型及参数设置对话框),如图4所示。
图4b)仿真分析类型分析参数的设置图2所示直流分压电路的仿真类型及参数设置如下(见图4):•Analysis type下拉菜单选中“DC Sweep”;•Options下拉菜单选中“Primary Sweep”;•Sweep variable项选中“Voltage source”,并在Name栏键入“V1”;•Sweep type项选中“Linear”,并在Start栏键入“0”、End栏键入“10”及Increment栏键入“1”。
以上各项填完之后,按确定按钮,即可完成仿真分析类型及分析参数的设置。
另外,如果要修改电路的分析类型或分析参数,可执行菜单命令PSpice/Edit Simulation Profile,或点击工具按钮,在弹出的对话框中作相应修改。
刚开始用PSPICE仿真的时候容易遇到的问题刚开始用PSPICE仿真的时候容易遇到的问题刚开始用PSPICE仿真的时候容易遇到的问题真正的压力是自己给的,而不是别人;同样,你得到的成果也完全是你的,谁也拿不去。
——winston1:元件到哪里去找?元件当然是库里,但不是Capturer的库,而是PSpice的库。
最好的办法是重新建一个PROJECT,建的时候选择那个模拟和混合仿真的,然后建一个新的SCH,这时加载元件库的时候加载的是PSPICE的库而不是Capture的库了。
路径:Capture\Library\pspice。
重新加载库,重新Place元件。
直接从Capture中直接Copy过来,是不行的,那些元件都是没有模型的,RUN的时候会在该元件的一个角上出现一个绿色的小圆圈,点击它,会出现这样的错误提示:No PSpiceTemplate for U3, ignoring。
就是没模型。
下面是官方的说法,不动手做一正步还真不好理解:调用的器件必须有PSpice 模型。
首先,调用OrCAD软件本身提供的模型库,这些库文件存储的路径为Capture\Library\pspice,此路径中的所有器件都有提供PSpice模型,可以直接调用。
其次,若使用自己的器件,必须保证*.olb、*.lib 两个文件同时存在,而且器件属性中必须包含PSpice Template属性。
2:激励源怎么加?一般是这样,建一个GND,从这里引出一个电流源或者电压源,然后引出一个NET,和原理图上NET响应。
这样做的好处是不破坏原理图,而且看起来方便。
注意:PSPICE和CAPTURE的电源是不一样的,它长得和MULTISIM的差不多,是一个实体,而不是CAPTURE中的逻辑概念。
3:怎么老提示FLOATING PIN?SCH NET中一定要有一个网络地,并且其名称一定要为“0”。
如果没有,那么你连的再好,也总提示有N多引脚悬空。
1、仿真软件ORCAD一、PSpice简介:PSpice是较早出现的EDA(ElectronicDesignAutomatic,电路设计自动化)软件之一,也是当今世界上著名的电路仿真标准工具之一。
目前广泛使用的PSpice5.1以后版本是Microsim公司于1996年开发的基于Windows环境的仿真程序,并且从6.0版本开始引入图形界面。
1998年著名的EDA商业软件开发商OrCAD公司与Microsim公司正式合并,自此Microsim公司的PSpice产品正式并入OrCAD公司的商业EDA系统中,成为OrCAD/PSpice。
但PSpice仍然单独销售和使用,并不断推出新的版本。
二、PSpice的优越性电路系统仿真方面,PSpice可以说独具特色,是其他软件无法比拟的,它是一个多功能的电路模拟试验平台,PSpice软件由于收敛性好,适于做系统及电路级仿真,具有快速、准确的仿真能力。
其主要优点有:1.图形界面友好,易学易用,操作简单2.实用性强,仿真效果好3.功能强大,集成度高三、PSPICE可执行的主要分析功能本综合试验以ORCAD16.3为仿真平台仿真实验,该平台中PSpice可以分析的类型有以下9种,每一种分析类型的定义如下:(1)直流(DC)分析:也叫直流扫描分析是指电路中的某参数在一定范围内变化时,对电路的直流输出特性的分析和计算。
(2)交流(AC)分析:主要功能是计算电路的交流小信号线性频率响应特性,包括幅频特性和相频特性,以及输入和输出阻抗等。
(3)噪音(Noise)分析:是指在每个设定的频率点上,计算电路指定输出端的等效输出噪音和制定输入端的等效输入噪声电平。
(4)直流工作点(OP)分析:是指当电感短路、电容开路时,电路中的静态工作点的计算。
在进行交流小信号分析和瞬态分析之前,系统将自动计算直流工作点,以确定瞬态分析的初始条件和交流小信号条件下的非线性器件的线性化模型参数。
要进行仿真,那么就必须给电路提供电源与信号。
这次我们就来说说常用的信号源有哪些。
首先说说可以应用与时域扫描的信号源。
在Orcad Capture的原理图中可以放下这些模型,然后双击模型,就可以打开模型进行参数设置。
参数被设置了以后,不一定会在原理图上显示出来的。
如果想显示出来,可以在某项参数上,点击鼠标右键,然后选择display,就可以选择让此项以哪种方式显示出来了。
1,Vsin这个一个正弦波信号源。
相关参数有:VOFF:直流偏置电压。
这个正弦波信号,是可以带直流分量的。
V AMPL:交流幅值。
是正弦电压的峰值。
FREQ:正弦波的频率。
PHASE:正弦波的起始相位。
TD:延迟时间。
从时间0开始,过了TD的时间后,才有正弦波发生。
DF:阻尼系数。
数值越大,正弦波幅值随时间衰减的越厉害。
2,Vexp指数波信号源。
相关参数有:V1:起始电压。
V2:峰值电压。
TC1:电压从V1向V2变化的时间常数。
TD1:从时间0点开始到TC1阶段的时间段。
TC2:电压从V2向V1变化的时间常数。
TD2:从时间0点开始到TC2阶段的时间段。
3,Vpwl这是折线波信号源。
这个信号源的参数很多,T1~T8,V1~V8其实就是各个时间点的电压值。
一种可以设置8个点的坐标,用直线把这些坐标连起来,就是这个波形的输出了。
4,Vpwl_enh周期性折线波信号源。
它的参数是这样的:FIRST_NPAIRS:第一转折点坐标,格式为(时间,电压)。
SECOND_NPAIRS:第二转折点坐标。
THIRD_NPAIRS:第三转折点坐标。
REPEAT_V ALUE:重复次数。
5,Vsffm单频调频波信号源参数如下:VOFF:直流偏置电压。
V AMPL:交流幅值。
正弦电压峰值。
FC:载波信号频率MOD:调制系数FM:被调制信号频率。
函数关系:V o=VOFF+V AMPL×sin×(2πFC×t+MOD×sin(2πFM×t))6,Vpulse脉波信号源。
目录介绍: (2)新建PSpice仿真 (3)新建项目 (3)放置元器件并连接 (3)生成网表 (5)指定分析和仿真类型 (5)Simulation Profile设置: (6)开始仿真 (7)参量扫描 (9)Pspice模型相关 (11)PSpice模型选择 (11)查看PSpice模型 (11)PSpice模型的建立 (12)介绍:PSpice是一种强大的通用模拟混合模式电路仿真器,可以用于验证电路设计并且预知电路行为,这对于集成电路特别重要。
PSpice可以进行各种类型的电路分析。
最重要的有:●非线性直流分析:计算直流传递曲线。
●非线性瞬态和傅里叶分析:在打信号时计算作为时间函数的电压和电流;傅里叶分析给出频谱。
●线性交流分析:计算作为频率函数的输出,并产生波特图。
●噪声分析●参量分析●蒙特卡洛分析PSpice有标准元件的模拟和数字电路库(例如:NAND,NOR,触发器,多选器,FPGA,PLDs和许多数字元件)分析都可以在不同温度下进行。
默认温度为300K电路可以包含下面的元件:●Independent and dependent voltage and current sources 独立和非独立的电压、电流源●Resistors 电阻●Capacitors 电容●Inductors 电感●Mutual inductors 互感器●Transmission lines 传输线●Operational amplifiers 运算放大器●Switches 开关●Diodes 二极管●Bipolar transistors 双极型晶体管●MOS transistors 金属氧化物场效应晶体管●JFET 结型场效应晶体管●MESFET 金属半导体场效应晶体管●Digital gates 数字门●其他元件(见用户手册)。
新建PSpice仿真新建项目如图1所示,打开OrCAD Capture CIS Lite Edition,创建新项目:File > New > project。
选择Analog or Mixed-AD模拟或混合-AD选项。
图1放置元器件并连接使用Place > Part命令放置元件。
Spice库的路径在Capture\Library\Pspice下。
常用的Library有下面几个:Analog:包含无源元件(R、L、C)互感器,传输线,以及电压和电流非独立的源(电压控制的调用源E、电流控制的电流源F、电压控制的电流源G和电流控制的电压源H)。
Source:给出不同类型的独立电压和电流源。
如:Vdc(直流电压),Idc(直流电流),Vac(交流电压),Iac(交流电流),Vsin(正弦电压),Vexp(指数电压),脉冲,分段线性等等。
Eval:提供二极管(D),双极型晶体管(Q),MOS晶体管,结型场效应晶体管(J),真实运算放大器,如:u714,开关(SW_tClose,SW_tOpen),各种数字门和元件。
Abm:包含应用于信号的数字运算符选择,例如:乘法(MULT),求和(SUM),平方根(SWRT),拉普拉斯(LAPLACE),反正切(ARCTAN)等。
Special:包含多种其他元件,像参数,节点组,等。
PSpice A/D支持的元器件类别及其字母代号:放置好所有的元器件后,需要添加GND图标,放置Ground地端子,并给它命名为0。
不要忘记改变名字为0,否则PSpice将给出错误或“Floating Node”,原因是PSpice需要一个地端子作为参考点,其名字和节点号必须是0。
如图2所示:图2完成的原理图如图3所示:图 3 LTC555定时器电路生成网表用PSpice > Create Netlist菜单命令生成网表。
在项目Project Manager管理窗口,双击Output/文件可以查看网表,如图4所示:图4指定分析和仿真类型PSpice允许做直流偏置,直流扫描,傅里叶瞬态分析,交流分析,蒙特卡洛/最差情况扫描,参量扫描和温度扫描等功能,详情见表1所示:表 1 PSpice的模拟分析功能Simulation Profile设置:(1)执行PSpice > New Simulation Profile命令。
(2)给Simulation Profile确定一个名称(3)设置Simulation Profile参数。
图3的Simulation Profile设置如图5所示:图 5 Simulation Settings设置Analysis type选择Time Domain(Transient)时域瞬态响应。
Options选项里,General Settings的Run to time为仿真时间,填写100ms,Maxmum step size 为1us的步进。
同时选择了Parametric Sweep选项,及参数扫描分析,详细介绍见参量扫描。
开始仿真执行PSpice > Run命令,启动仿真进程,或者直接点击快捷方式图如图6所示。
图6仿真会自动调用Probe模块,并显示仿真结果。
我们需要选择波形中需要显示的信号。
有两种方式:在原理图中添加观测点或者在Probe的Trace > Add Trace来添加需要显示的信号。
本例使用的第一种方式,如图7所示图7仿真波形如图8所示。
图8 仿真波形使用参数扫描功能后,可以比较不同参数对输出结果的影响。
如图9所示为RX1取值对输出信号周期和占空比的影响。
可以很清楚的看到输出信号周期的变化。
图9 参数扫描结果参量扫描需要查看电路中电阻或者电容等参数对输出结果的影响,参量扫描可以非常直观的做出显示。
步骤为:1、添加参量元件。
1)修改需要变化的器件Value值为{RX2}(RX2为自定义的标号)2)添加PARAM元件到电路中。
在SPECIAL库中可以找到该元件。
3)双击PARAM元件,打开Property Editor属性编辑窗口。
点击New Column按钮并输入Property Name属性名称RX2,不带花括号。
4)将新创建的RX2列,设置该元件的初始值5K,如图10所示。
图10 PARAM元件的Property Editor窗口5)选择RX2列,右键选择DISPLAY按钮,选择Name and Value。
点击OK。
6)在关闭Property Editor窗口前,点击APPLY按钮。
7)保存设计。
2、为产量分析创建仿真配置文件。
1)在Simulation Settings中选择Analysis标签。
2)对Analysis type分析类型选择Transient瞬态(或者想要做的分析类型)。
并输入开始和结束时间。
如图5所示。
3)在Options选项里,选择Parametric Sweep参量扫描。
图11 Parametric Sweep 参数设置4)对于扫描变量,选择全局参数Global parameter,并输入RX1。
在Sweep type中给出Start Value起始值、End Value结束值和Increment增量。
对于这些值本例中分别使用4K、20K和4K。
5)点击OK设置完成。
3、运行PSpice并显示波形。
1)运行PSpice。
2)当仿真结束时,Probe探针窗口会被打开并且弹出Availbale Sections窗口,来选择需要显示输出的仿真结果,本例选择第一和最后一个,如图12所示。
图12 Available Sections窗口3)仿真波形如图13所示,显示不同阻值对定时器震荡电路周期和占空比的影响。
图13 仿真波形Pspice模型相关PSpice模型选择在选择PSpice模型时,在模型图框的右下角显示,表示为PSpice模型库,否则不能使用,如图14所示。
图14 选择PSpice模型查看PSpice模型当需要查看PSpice模型时,右键需要查看的模型,选择Edit PSpice Model,如图15所示。
图15 查看PSpice模型会打开PSpice Model Editor,如图16所示图16 PSpice Model Editor可以从PSpice Model Editor中看到,.model以下的内容就是元件的模型参数,如果.model 后没有内容说明没有参数,是不能使用的。
PSpice模型的建立PSpice库中已有极多模型可用,没有必要自建模型,如果遇到库中没有的器件模型,可以到生产该器件上公司网站上下载,一般大型公司都会提供。
如果一定要自建模型,可以用PSpice中的模型编辑软件实现(“Model Editor”),一般可以用已有的模型作一些修改实现。
PSpice提供两种方式来建立模型。
1、PSpice 提供Model Editor 建立元件的Model,从元件供应商那边拿到该元件的Datasheet,透过描点的方式就可以简单的建立元件的仿真模型,来做电路的模仿真。
2、从网上下载的元件PSPICE模型,我们利用PSpice Model Editor 将该模型导入并建立用于仿真的元件模型。
其中,第一个方式适用于Pspice提供的十多种元件(二极管、三极管、磁心、IGBT、JFET、运算放大器、达灵顿管、MOSFET、VR、比较器、参考源等器件),具体方法如下面介绍所示:1、打开Model Editor,选择Model > New,打开图17所示的对话框。
图172、填写Model Name,选择Model类型。
如图18所示。
图183、出现图19对话框,出现Model List(图中左)、特性曲线表及曲线图(图中右)及ModelParameter(图中右)。
图19 Model List特性曲线表及特性曲线图Model Parameter按特性曲线图,描点並输入到下面表中下面会出现用数值分析法,邦您计算出符合描点设定的参数值另存为*.lib用文本编辑器打开刚才保存的文件,即可看到该元件的模型参数从网上下载的元件PSPICE模型,我们利用PSpice Model Editor 将该模型导入并建立用于仿真的元件模型。
下面用BJT Model作个说明。
Bipolar transistor formatGeneral form Q<name> < collector node> <base node> <emitter node>+ [substrate node] <model name> [area value] Examples Q1 14 2 13 PNPNOMQ13 15 3 0 1 NPNSTRONG 1.5Q7 VC 5 12 [SUB] LATPNPModel form.MODEL <model name> NPN [model parameters].MODEL <model name> PNP [model parameters].MODEL <model name> LPNP [model parameters]按上面的格式,修改成ORCAD-PSpice 可以读取的格式,并保存为*.lib。