tag 标签: PSPICE

相关帖子
相关博文
  • 热度 2
    2019-1-15 16:41
    1781 次阅读|
    0 个评论
    Circuit models are the heart of worst-case circuit analysis (WCCA). For simulations to be valid, you must gather and vet models or create them yourself; you can't usually rely on the manufacturer's model. Your models must correlate to datasheets or test data, and then you need to add tolerances to those models. Your goal is to create an accurate model with the "proper" fidelity. Too much fidelity results in high costs, but models that are too simple or inaccurate can result in bogus outcomes. Modeling was my first assignment out of college and much of the material I published while at Intusoft is still relevant today. Reference 1 includes a link for a free download I wrote some years ago on modeling diodes and BJTs. The WCCA for analog functional blocks (power systems, linear circuits) is most optimally performed using simulation (usually SPICE or some board level simulator such as ADS). In some cases, we have reviewed WCCAs that used 100% math (Mathcad) or 100% simulation. Neither technique is optimum for all types of analyses, nor are they even appropriate. You can't easily use math to perform many nonlinear analyses like transients or frequency domain stability. On the other hand, SPICE is overkill for many steady state assessments. Most analog WCCAs are about 50-50 math vs. simulation from a methodology standpoint. Digital WCCA is a bit of a different story, there, it is commonplace for all the analysis to be simulation based and you are largely dependent on the manufacturer provided IBIS models. SPICE is a powerful tool, but you can easily get yourself into trouble and not know it. All it takes is one incorrect parameter in a sea of models, each with its own subcircuit or model parameter set, to invalidate the simulation’s results (Ref. 2). For most SPICE based analyses, more than half the work scope is taken up deriving a believable, supportable, and correlated nominal model. Correlation is critical. Part and circuit models must be anchored to something known, at least nominally. How can we expect to perform parametric extreme value analysis (‘EVA’) or Monte Carlo analysis using worst-case tolerances if the nominal model isn’t within the range of the band of initial tolerances? You can’t just take a nominal model from a vendor, slap tolerances onto it, and assume the results are valid for all circuit configurations and operating ranges. Figure 1 shows a simple test circuit for simulating MOSFET transconductance (gFS). L1 and C2 are used to “open the loop” allowing you to measure the transfer function from the gate to the output, while maintaining a closed DC loop (Ref. 3). Figure 1. This circuit model lets you simulate a MOSFET's transconductance (gFS) . Figure 2a (left) shows the circuit simulation of a fitted model made by AEi Systems while Figure 2b (right) shows the breadboard measured at load currents of 30 µA, 250 µA, 1mA, 10 mA, and 50 mA for comparison to the model performance. The motivation here is that most SPICE models for FETs are not accurate for linear operation so we created one. The SPICE models are generally set up for hard switching applications and V GS isn't accurate for the low operating currents. The data usually isn't in the data sheet, but that's another story. Figure 2. We created our own simulation (a) because many MOSFET models don't cover low operating current. (b) shows the measured performance. Figure 3 shows the same gFS data from a vendor-supplied SPICE model. The difference between Fig. 3 and Fig. 2a (our model) is clear. Figure 3. The same simulation using the SPICE model for the IRF230 from IRF.com. Note that in this case, the model kind of portrays the gFS characteristic but doesn’t get the actual performance quite right. The MOSFET manufacturer didn’t prioritize or evaluate the gFS performance at low currents and their subcircuit topology did not model it well. Transients, whether for part stress assessments or to assess circuit startup/EMC performance, AC analyses like stability, or any analysis that is not monotonic with respect to the outcome vs. tolerances, usually requires some sort of simulation model. So herein lies the problem. Most analysts rely on the component manufacturers to supply the part models, often without checking the validity of the model in their circuit application. A model needs checking for both the characteristics needed and the operating range over which the characteristics need to be accurate. This may come as a surprise, but vendor models often lack the fidelity you need. Important characteristics aren't modeled or only modeled at certain specific operating conditions. This is not to say that the models are wrong, but that they are often not accurate under the conditions you need. In most cases, documentation is scant, buried in the netlist, or nonexistent. This is a huge problem. Models need documentation and its often inexplicably not available. Without documentation, you don't know over which operating conditions the models are good or even what characteristics the models portray. SPICE models, by their very nature, have limitations. The trick is to know them and adapt the models accordingly. How do you know if a model is any good? You must build test circuits that emulate the data sheet's test circuits and correlate all the parameters that must be right for your simulation. Then, you must correlate the entire application circuit model to test data or practical theory of some kind. It is only at that point that you can apply tolerances and run worst-case scenarios. In Figure 4a , you can see the top left plot how the vendor voltage reference model did not have the output impedance modeled. Therefore, it could not be used in transient or AC analyses. In Figure 4b , the vendor model is first order only and not very accurate. Figure 4. There are two aspects to SPICE models that need to be verified. Does the model exhibit the characteristic of interest and then how accurately is the characteristic modeled over the operating conditions needed? In (a), the model didn't at all portray the output impedance. In (b), the model varied the forward voltage with current, but not very accurately. Knowing how to do this requires knowledge of how to model each individual part using the simulator's syntax and available constructs, what characteristics are important, and how to spot when the circuit model doesn't behave properly. The debugging can be time-consuming and frustrating. It's simply not likely you will "luck into" a usable model without extensive experience in both the application and the parts involved. This is particularly true if you are trying to perform a WCCA on a circuit that has yet to be built and you have no test data. End-of-life or worst-case tolerance models are normally not provided, so if the model isn't encrypted, you will have to learn where the parameter "knobs" are in the netlist so that you can apply tolerances to the characteristics for which the circuit is sensitive. This is a bit of a learned art, as sub-circuits from different manufacturers for the same part type (e.g. FETs) are different. In addition, most SPICE parameters don't directly relate to a datasheet counter-part. For instance, in a diode there are three SPICE parameters that are used to fit the diode’s forward V-I response: N, IS, and RS. So, if you're only matching a few data points, there are multiple combinations that will get you there, though some can be physically unrealizable. More importantly, if you chose the wrong set, the model may not operate correctly outside of those data points. Nominal isn't enough For WCCA, it's not enough to get a nominal model from the part manufacturer. You must be able to apply tolerances to it. Many datasheet characteristics are modeled with groups of components. Thus, applying data sheet tolerances may not be simple or obvious. You must get into the netlist and figure it out. If you build your own models, you can configure them to be easily toleranced. In this case, a capacitor is modeled with a ladder subcircuit ( Figure 5 ) and its impedance/ESR can be scaled between its minimum to spec maximum using a voltage source multiplier. The model is tested to see its tolerance distribution so that when it is used in a Monte Carlo analysis ( Figure 6 ), it's clear how it will perform. Figure 5. A ladder subcircuit lets you model a capacitor. Figure 6. To truly know how a part will perform during a Monte Carlo analysis, you can perform a simplified Monte Carlo analysis of just the part’s characteristic of interest--equivalent series resistance (ESR) in this case. This way, the statistical performance of the model can be proven before use in a full circuit simulation. A distribution-free Monte Carlo analysis using 1440 runs shows the worst end points just matching the spec maximum and assumed worst case minimum. (My next article will cover Monte Carlo analysis.) If the model is encrypted (meaning you can’t read its underlying data), you’re at a dead-end. Applying Tolerances to all the parts around the fixed part may be useful, but it won’t be worst case. For instance, many power IC models are encrypted. That means their control loop response (bandwidth, poles/zeros, etc.) is fixed. Over life, bandwidths can vary substantially. Stability, for instance may vary widely depending on the gain/phase response. Inevitably, you'll have to vet and create your own part models – whether it’s just for passive parts, semiconductors, or op-amps, you'll run into cases where models are suspect and must be altered or where they don't exist at all. For power supply modeling you will have to learn and understand state space averaging techniques (there are many books and papers related to this topic by Christophe Basso and Steve Sandler) (Ref 4, 5). It just takes a fair amount of time and experience to learn how to tweak a model because each part type is different and for most ICs there is no standard template. Two tools that are quite useful in this regard are the OrCAD PSpice Model Editor and Intusoft’s SpiceMod program. Finally, you must create the model for entire circuit portion you want to simulate. That means assessing whether interconnects and PCB parasitics play a material role in the fidelity of the results, as well as, correlating the circuit to any test data that might be available (hopefully). Again, the idea is to build confidence in the model’s fidelity and realism before you estimate the worst behavior. Invalid assumption “The effects of the PCB are assumed not to impact the analysis.” Over the years, much of the analog WCCA performed hasn't included PCB effects. This was an assumption and for the most part, a reasonable one. That assumption is becoming less and less accurate. The bandwidth of power ICs and the edge speeds of the dynamic load current they supply are increasing, while the voltage regulation margins are dropping. In an increasing number of cases, you must account for the impact of the power distribution network’s (PDN) impedance, distributed interconnect impedances, power rail planes, interconnects, connectors, backplanes, and decoupling. That means basic power integrity analyses like stability, ripple, startup, and load step, will require much more advanced (i.e. expensive) finite element analysis tools that are able to incorporate the PCB, component interconnect parasitics, and the voltage regulator module's output impedance into the simulation (Ref 6). With SPICE it’s garbage in, garbage out. But with good correlation and high-fidelity models, the results can be dead on accurate. In this simulation of the power bus in the Space Station ( Figure 7 ), AEi Systems predicted that a master computer reset would be triggered via a bus dropout every time the spacecraft went through an eclipse. Two years after the simulation was performed and the analysis results ignored, and the hardware subsequently built, the picture on the right showed up with a little yellow sticky note. Figure 7. The simulation showed a glitch in a spacecraft's master reset that occurred whenever the spacecraft passed through an eclipse. In summary, model development, correlation, and tolerancing is the hardest and most time-consuming part of WCCA. It can take a long time to achieve a viable model, but it is necessary to complete much of the analysis. References Hymowitz, Ober, Robson, Horita, “ Definitive Handbook of Transistor Modeling ” Ho, Sandler, Hymowitz, “ SPICE models need correlation to measurements ,” EDN, June 2014. Sandler, Hymowitz, “ SPICE Model Supports LDO Regulator Designs ,” Power Electronics, 2005. Basso, “Switch-Mode Power Supplies Spice Simulations and Practical Designs”, ASIN: B012HU9XIU, 2010. Sandler, “Switched-Mode Power Supply Simulation with SPICE: The Faraday Press Edition”, ISBN-13: 978-1941071847, 2018 Sandler, “Power Integrity: Measuring, Optimizing, and Troubleshooting Power Related Parameters in Electronics Systems”, ISBN-13: 978-0071830997, 2014. Book review . elated articles: PCs Let You Gamble on Component Tolerances Simulator Test Tools Speed Circuit Design Measure PDN on a budget Circuit Sensitivity Analysis--An Important Tool for Analog Circuit Design: Part 2 Validate electronics robustness: Part 2—Find the worst case Worst-case analysis
  • 热度 24
    2015-3-14 20:11
    1253 次阅读|
    0 个评论
      差分放大电路利用电路参数的对称性和负反馈作用,有效地稳定静态工作点,以放大差模信号抑制共模信号为显著特征,广泛应用于直接耦合电路和测量电路的输入级。但是差分放大电路结构复杂、分析繁琐,特别是其对差模输入和共模输入信号有不同的分析方法,难以理解,因而一直是模拟电子技术中的难点。Muhisim作为著名的电路设计与仿真软件,它不需要真实电路环境的介入,具有仿真速度快、精度高、准确、形象等优点。因此,Multisim被许多高校引入到电子电路实验的辅助教学中,形成虚拟实验和虚拟实验室。通过对实际电子电路的仿真分析,对于缩短设计周期、节省设计费用、提高设计质量具有重要意义。    1 Multisim8软件的特点   Muhisim是加拿大IIT(Interactive Image Tech—nologies) 公司在EWB(Electronics Workbench)基础 上推出的电子电路仿真设计软件,Muhisim现有版本为Muhisim2001,Muhisim7和较新版本Muhisim8。它具有这样一些特点: (1)系统高度集成,界面直观,操作方便。将电路原理图的创建、电路的仿真分析和分析结果的输出都集成在一起。采用直观的图形界面创建电路:在计算机屏幕上模仿真实验室的工作台,绘制电路图需要的元器件、电路仿真需要的测试仪器均可直接从屏幕上选取。操作方法简单易学。   (2)支持模拟电路、数字电路以及模拟/数字混合电路的设计仿真。既可以分别对模拟电子系统和数字电子系统进行仿真,也可以对数字电路和模拟电路混合在一起的电子系统进行仿真分析。   (3)电路分析手段完备,除了可以用多种常用测试仪表(如示波器、数字万用表、波特图仪等)对电路进行测试以外,还提供多种电路分析方法,包括静态工作点分析、瞬态分析、傅里叶分析等。   (4)提供多种输入/输出接口,可以输入由PSpice 等其他电路仿真软件所创建的Spice网表文件,并自动形成相应的电路原理图,也可以把Muhisim环境下创建的电路原理图文件输出给Protel等常见的印刷电路软件PCB进行印刷电路设计。    2  差分放大电路仿真分析   运行Muhisim 8,在绘图编辑器中选择信号源、直流电源、三极管、电阻,创建双端输入双端输出差分放大电路(双入双出差分放大电路)如图1所示,标出电路中的结点编号。   该次仿真中,采用虚拟直流电压源和虚拟晶体管,差分输入信号采用一对峰值为5 mV、频率为1 kHz的 虚拟正弦波信号源。设置虚拟晶体管的模型参数BF= 150,RR=300Ω。    2.1 差模放大性能仿真分析   2.1.1 直流分析   直流分析实际上就是确定静态工作点。选择Sim-ulate菜单中的Analysis命令,然后选择Dc OperatingPoint子命令,分析结果如图2所示。   用静态工作点分析方法得VBEQ1=UBEQ2=O.69 V,UCEQ1=UCEQ2=V3一V2Δ8.94 V,与题中理论计算结果完全相同。    2.1.2 差模放大倍数分析   加差模信号 ui1,ui2,分别接入电路的左右输入端,电阻R1作为输出负载,则电路的接法属于双入双出。将四通道示波器XSC1的3个通道分别接在信号源ui1和负载R1两端,如图1所示。运行并双击示波器图标XSC1,调整各通道显示比例,得差分放大电路的输入/输出波形如图3所示。   用示波器观察和测量输入电压和输出电压值,差模信号单边电压V1△一3.597 mV(5 mV/Div),单边输出交流幅值约为170.124 mV(500 mV/Div),所以双入双出差分放大电路的差模放大倍数AuΔ一170.124/3.597=一47,与单管共射的放大倍数相同,即差分放大电路对差模信号具有很强的放大能力。仿真结果与题中理论计算结果相同。    2.2 共模抑制特性仿真分析   2.2.1 共模放大倍数分析   在图1中,将信号源ui2的方向反过来,即加上共模信号,运行并双击示波器图标XSC1,调整A,B通道显示比例,可得如图4所示波形。   由图4波形可知,在峰一峰14 mV(有效值为5 mV)的共模信号作用下,输出的峰值极小,峰一峰值为13 mV,因此单边共模放大倍数小于1。且uc1和uc2大小相等,极性相同。所以,在参数对称且双端输出时,共模放大倍数等于0,说明差分放大电路对共模信号具有很强的抑制能力。显然,仿真结果与理论分析结果一致。    2.2.2 共模抑制比分析   选择Simulate菜单中的Analysis命令,然后选择Transient Analysis子命令,选择结点3,4作为输出,单击Simulate按钮;选择Simulate菜单中的后处理器Postprocessor子命令,在Expression列表框中编辑“V($4)一V($3)”,然后打开Graph选项卡,可画出差分放大电路共模输入双端输出波形,见图5。可见,波形属于噪声信号,且幅值极小,可忽略不计。因此,差分放大电路双端输出时,其共模抑制比KCNR趋于无穷大。如果再将图1所示的电路中发射极电阻R2改为恒流源,重复前面步骤,再分析共模特性,可得出结论:具有恒流源的差分放大电路的共模抑制比KCNR更高。    3 结 语   应用Multisim8软件对差分放大电路进行仿真分析,结果表明仿真与理论分析和计算结果一致,应用Multisim进行虚拟电子技术实验可以十分方便快捷地获取实验数据,突破了在传统实验中硬件设备条件的限制,大大提高了实验的深度和广度。利用仿真可以使枯燥的电路变得有趣,复杂的波形变得形象生动,并且不受场地(可以在教室、宿舍),不受时间(课内、课外)的限制,通过教师演示和学生动手设计、调试,不但可以使学生更好地掌握所学的知识,同时提高了学生的动手能力、分析问题和解决问题的能力。
  • 热度 17
    2015-3-14 20:10
    1037 次阅读|
    0 个评论
      概览   SPICE(针对集成电路的仿真程序)是加利福尼亚大学伯克莱分校开发的模拟电路仿真器,是作为CANCER(除射频电路外的非线性电路计算分析)程序的一部分进行开发的。   过去的50年中,众多公司开发了大量不同的SPICE变体(包括HSPICE和PSPICE)。   SPICE以网表形式定义电路并使用参数仿真电路特性。网表描述电路中的部件及其连接方式。SPICE可以仿真DC工作点、AC响应、瞬态响应以及其它有用的仿真项目。   目录 1.为何采用本教程作为PSPICE到Multisim间的过渡? 2.1.0PSPICE过渡至Multisim教程:放置电阻和电容 3.2.0PSPICE过渡至Multisim教程:增加电源部件 4.3.0PSPICE过渡至Multisim教程:接线部件 5.4.0PSPICE过渡至Multisim教程:设置仿真 6.5.0PSPICE过渡至Multisim教程:运行仿真 7.6.0PSPICE过渡至Multisim教程:结语   为何采用本教程作为PSPICE到Multisim间的过渡?   本教程的目标受众为那些使用过PSPICE的Multisim用户,我们的目标是为这些正在积极寻找如何在Multisim中创建和仿真电路的用户提供进阶指南。本教程除了讲述如何在PSPICE中完成任务,同时亦为您提供使用Multisim的简单设置步骤。无论您是否有过操作其它仿真工具的经验,本教程均可帮助您迅速上手Multisim。这一评价来自于我们在斯坦福大学创建的优秀教程,见此处。   Multisim   如果您是首次使用Multisim,您可能会很快发现仿真环境和原理图捕获环境非常相似,只是传统的多级步骤和复杂过程已被简化,仿真变得更加简单。   1.0PSPICE过渡至Multisim教程:放置电阻和电容   1.1打开软件   在PSPICE中,仿真设计开始前,用户通常需要通过下列步骤(程序PSPICE学生版原理图),打开“原理图”程序。   必须通过开始所有程序NationalInstruments电路设计套件11.0Multisim11.0这一步骤打开Multisim   1.2放置Op-Amp   在PSPICE中,用户需要打开“获取新部件”窗口,然后在描述框中搜索“opamp”。搜索到合适的型号后,将其连接到对应的设备符号上,然后单击“放置并关闭”。此时需要正确定向部件。双击Op-Amp,用户就可以设置相应的仿真参数。   在Multisim中放置部件: 1.选择放置部件。 2.在“选择部件”对话框中,按照下图红圈内的参数设置界面(图1)。图中选择的为模拟组中的模拟_虚拟类。 3.在“部件区域”中,选择OPAMP_3T_VIRTUAL(红圈)。 4.单击OK,在黄框内放置部件。 5.左击鼠标,在原理图区域放置OPAMP。 6.右击部件,选择“垂直翻转” 7.此时会出现图2所示的原理图。 图1选择部件界面 图2.运算放大器   1.3放置电阻和电容   在PSPICE中,此时已返回“使用获取新部件”,可在此搜索名称为“R”和“C”的部件(对应为电阻和电容)。当用户在原理图中放置了两个电阻和一个电容之后,需要双击各个部件设定及更改参数数值。   在Multisim中,放置电阻和电容: 1.选择放置部件。 2.在“选择部件”对话框中,按照红圈内给出的参数进行设置。图示为选择基本组和电阻类(见图3) 3.在“部件区域”中输入电阻值-本例中为2K(蓝色区域)。 4.单击OK,在黄框内放置部件。 5.左击鼠标,在原理图区域放置电阻。 6.同样返回至部件选择指南。 7.在“选择部件”对话框中,对应红圈内的参数进行设置。图示为选择基本组和电阻类。 8.在“部件区域”中输入电阻值-本例中为1K。 9.点击OK,在黄框内放置部件。 10.左击鼠标,在原理图区域放置电阻。 图3.放置电阻 11.选择放置部件。 12.在“选择部件”对话框中,对应红圈内参数进行设置。图示为选择基本组和电容类(图4)。 13.在“部件区域”中输入电容值-本例中为0.08u(蓝色区域)。 图4.放置电阻   14.用户的设计界面应如图5所示。 图5.第一阶段设计结束   2.0PSPICE过渡至Multisim教程:增加电源部件   2.1增加电源和接地   在PSPICE中,现在已返回“使用获取新部件”界面,在此处搜索AC电压源(对应标识为VAC)。此处需要查找名为ACMAG的参数,即AC幅值。放置部件。然后搜索名为“GND_EARTH”的接地标识。   在Multisim中放置源: 1.选择放置部件。 2.在“选择部件”对话框中,按照对话框提示进行设置:选择源组和信号电压源类。 3.在“部件区域”选择交流电压,然后放置在原理图中。其预配置为1V。 4.选择放置部件。 5.在“选择部件”对话框中,按照对话框提示进行设置:选择源组和电源类。 6.在“部件区域”中,选择地,然后放置在原理图中。 7.此时的设计应如图6所示。 图6.第二阶段设计结束   3.0PSPICE过渡至Multisim教程:接线部件   3.1接线过程   在PSPICE中,用户现在必须开始搜索并选择“绘制接线”按钮,或在绘图菜单中选择一个选项。此后方可连接不同节点。   Multisim采用无模式接线环境,允许用户方便绘制网络接线图: 1.在引脚附近悬停鼠标(如V1AC_Voltage源的+引脚)。鼠标靠近引脚时,会变成十字形图标。现在即可绘制到电阻R2的网络接线。 2.左击鼠标,会在引脚后出现红线。随着鼠标移动,红色网络(线)会随之移动。将红线移至另一部件引脚,然后左击完成连接。 3.重复利用该方法完成整个设计的接线,直至如图7所示。 图7.完成的原理图   4.0PSPICE过渡至Multisim教程:设置仿真   4.1设定分析   在PSPICE中,用户现在就可以建立分析。分析设置需要设置节点名称,在单独“分析界面”中选择特定分析类型然后设置起始频率(StarFreq),截止频率(EndFreq),十倍频扫描点数(Pts/Decade),和扫描类型(十倍频)。   在Multisim中,过程略有简化。 1.选择仿真仪器测量探针 2.在电路输出点单击鼠标左键以放置探针。该节点此时命名为“Probe1”。 3.双击黄色区域,然后在“RefDes”中,将探针名称“探针1”更改为“Vout”(图8)。 图8.放置测量探针   4.选择仿真分析AC分析…此时已打开AC分析对话框。   5.设置“起始频率(FSTART)”为10   6.设置“截止频率(FSTOP)”为1,单位为MHz   7.设置“10倍频扫描点数”为101   8.设置“垂直刻度”为“对数”   5.0PSPICE过渡至Multisim教程:运行仿真   5.1运行AC分析   在PSPICE中,为查看仿真数据,用户必须打开绘图窗口然后通过“添加画线”按钮或画线菜单,在坐标轴上绘制不同数值和不同参数。此外用户还须进行其它相关设置(如通过表达式创建对数坐标)。   在Multisim中,用户只需进行如下简单步骤:   1.在AC分析对话框,设置“垂直刻度”为“对数”   2.选中“输出”选项卡   3.在“电路变量”部分,选择参数“V(Vout)”。   4.单击添加按钮   5.单击仿真按钮。此时即可看到仿真数据(图9)。 图9.绘图仪中的仿真分析数据   6.为查找-3db点,首先须选择光标。首先在工具栏单击光标项。然后光标就会在Y轴顶端出现(图10所示的红框内) 图10.设置光标   7.右击Y轴上的绿色光标箭头。   8.选择设定Y值=   9.在值域内键入-3   10.单击Ok。光标就会自动移至-3dB点(图11)。 图11.-3dB点   6.0PSPICE过渡至Multisim教程:结语   恭喜您!经过本文一系列进阶步骤学习后,您现在已经可以使用Multisim进行原理图捕获和仿真了。   您也籍此了解了Multisim的一些简单功能。与PSPICE类似,许多高级功能用户也可轻松上手。使用Multisim最大特性就是,完成高级任务原来可以变得那么简单。
  • 热度 12
    2015-3-14 20:10
    1925 次阅读|
    0 个评论
      信号产生电路的作用是产生具有一定频率和幅度的正弦波、矩形波和锯齿波等波形。信号产生电路广泛应用于通信系统、数字系统和自动控制系统。OrCAD/PSpice作为一种功能强大的电子电路仿真分析设计软件,它可以根据给定电路的结构和参数,对电路进行基本性能分析,它无需任何实际元器件,可用预先设计出的各种功能的应用程序取代了大量的仪器仪表。电路设计工作者可以通过这些应用程序进行各种分析、计算和校验,完成所需特殊电路的设计工作。在PSpice环境下,本文实现了信号产生电路中正弦波、矩形波和锯齿波发生电路的设计并应用PSpice对其进行了仿真和分析。   1OrCAD/PSpice简介   OrCAD/PSpice是较早出现的EDA软件之一,整个软件由原理图编辑、电路仿真、激励编辑、元器件库编辑、波形图等几个模块组成,使用时是一个整体,但各个部分有各自的窗口。设计者利用鼠标和热键一起操作,既提高了工作效率,又缩短了设计周期。它是全功能通用的仿真软件,集成了直流分析、交流分析、噪声分析、瞬态分析、温度分析等仿真功能。软件还集成了诸多数学运算,不仅为用户提供了加、减、乘、除等基本的数学运算,还提供了正弦、余弦、绝对值、对数、指数等基本的函数运算,这些都是其他软件所无法比拟的。另外,设计者还可以对仿真结果的窗口进行编辑,如添加窗口、修改坐标、叠加图形等,还具有保存和打印图形的功能,给用户提供制作所需图形的更快捷、更简便的方法。   2信号产生电路设计与OrCAD/PSpice分析   2.1文氏桥正弦波振荡电路   文氏桥正弦波振荡电路能产生振荡频率调节范围宽、波形好的正弦波,广泛应用于通信系统。文氏桥正弦波振荡由文氏电桥与一个集成运放μA741组成的同相放大电路组成,如图1所示。文氏电桥的两个臂RC串一并联网络构成,另外两个臂由放大电路的反馈电阻构成。令R1=R2=R,C1=C2=C,R3+R4=Rf,根据文氏桥正弦波振荡电路的振荡条件,可以推出放大电路的电压增益Av=1+Rf/R5≥3,即Rf≥2R5。在PSpice环境中将图中R5的SET属性设置为0.14,即可满足条件。文氏桥正弦波振荡电路的理论振荡频率为f0=1/(2πRC)。由于电源电压的波动、电路参数的变化、环境温度的变化等因素的影响,使正弦波的输出幅度不稳定。这里采用二极管来稳幅和加速起振。在PSpice环境中设置瞬态分析类型和参数(0~500ms)进行分析,得到Vo输出波形。将横坐标轴时间改为300~500ms,如图2所示。观察起振时间约为400ms,利用标尺(Cursor)测量出波形的振荡周期为T=460.011-453.755=6.256ms,求出振荡频率。同时计算出理论振荡频率,可以看出误差很小。   2.2555矩形波振荡电路   利用多用途的单片集成电路555时基电路组成矩形波振荡电路如图3所示。接通电源后,电源V1通过R1,R2对电容充电,C点电压Vc按指数规律上升。当Vc上升到(2/3)V1时,由于555时基电路内部的比较器和触发器的作用,电容C1经R2开始放电,直到Vc下降到(1/3)V1时,又开始重复充电、放电从而形成无稳态的多谐振荡。理论振荡周期为:   T=t1+t2=0.7(R1+R2)C1+0.7R2C1=21μs   理论占空比为:   其中t1和t2分别为电容的充电时间和放电时间。调节R1或R2或C1可改变振荡周期。   在PSpice环境中设置瞬态分析类型和参数,进行分析,得到输出Vo,Vc和Vd波形如图4所示。利用标尺测量出输出波形的振荡周期为:   T=47.192-25.626=21.566μs   占空比为:   与理论值非常接近。   2.3锯齿波发生电路   由集成运算放大器组成的锯齿波发生电路如图5所示。     运放U1为同相输入滞回比较器,运放U2为积分运算电路。主要利用二极管的单向导电性使积分电路两个方向的积分通路不同,可得到锯齿波发生电路。设二极管导通时的等效电阻可忽略不计,电位器的滑动端在中间位置。稳压管的稳压值为Uz。当Uo1=+Uz时,D2导通,D1,D3截止,输出电压Uo随时间线性下降;当Uo1=-Uz时,D1,D3导通,D2截止,输出电压Uo随时间线性上升。在PSpice环境中设置瞬态分析类型和参数,进行分析,得到Uo1和Uo的波形如图6所示。   测量得到振荡周期为T=4.9592-2.2924=2.6668ms,则振荡频率为。调整R1和R2的阻值可以改变锯齿波的幅值;调整R1,R2和电位器的阻值以及C的容量,可以改变振荡频率;调整电位器滑动端的位置,可以改变Uo1的占空比以及锯齿波上升和下降的斜率。   3结语   本文采用集成运算放大器和555时基电路等,完成了正弦波、矩形波和锯齿波三种信号产生电路的设计并利用OrCAD/PSpice进行了仿真。该信号产生电路具有电路简单,易于实现,振荡频率稳定等特点,可应用于通信系统,自动控制系统等。
  • 热度 7
    2013-11-2 14:02
    2215 次阅读|
    0 个评论
    Time:    2013-10-28 激励源: Pulse: Vname N1 N2 PULSE(V1 V2 TD Tr Tf PW Period) V1 - initial voltage;V2 - peak voltage; TD - initial delay time; Tr - rise time; Tf - fall time; pwf - pulse-wise; and Period - period.     Other sources such as polynominal controlled source, exponential source, FM-modulated source, etc. can be specified. For information on these components, check the SPICE manual. Pspice常用符号库文件: analog.olb: 模拟电路元件符号库 abm.olb:拓展元件符号库 breakout.olb:自定义模型元件符号库 connect.olb:电路连接器符号库 eval.olb:模/数电路元件符号库 port.olb:电路接口符号库 source.olb:源符号库 sourcestm.olb:激励源符号库 special.olb:特殊用途符号库 受控源: E:电压控制电压源 EPOLY:用线性多项式描述的电压控制电压源 F:电流控制电流源 FPOLY:用线性多项式描述的电流控制电流源 G:电压控制电流源 GPOLY:用线性多项式描述的电压控制电流源 H:电流控制电压源 HPOLY:用线性多项式描述的电压控制电流源    
相关资源