矿石收音机论坛

 找回密码
 加入会员

QQ登录

只需一步,快速开始

搜索
查看: 11036|回复: 7

关于 LTspice 里面的 "subcircuit" "SUBCKT"

[复制链接]
     
发表于 2012-5-2 18:45:05 | |阅读模式


http://www.simonbramble.co.uk/lt ... pice_tutorial_4.htm


LTSpice is not limited to simulating Linear Technology parts. Third party models can be imported into LTSpice too. There are 2 types of model that can be imported into LTSpice:

.MODEL parts - these are simple components such as transistors and diodes
.SUBCKT parts - these are more complex parts made up of simpler Spice parts (diodes, transistors, resistors etc)

It is important to note that LTSpice looks at the first line of the SPICE model to determine how the model should be handled. If the part is defined with a .MODEL statement, importing the model is handled one way; if the part is defined with a .SUBCKT statement, importing the model is handled in a slightly different way. Thus we could import 2 identical diodes, one defined with a .MODEL statement and one defined with a .SUBCKT statement and they are actually handled differently. LTSpice looks at the model definition, NOT the component to determine how to import the part.

.MODEL parts:
To import a simple third party SPICE model into LTSpice using the .MODEL directive , follow these steps:
Add a generic component to the schematic that represents the symbol of the SPICE model
Download the SPICE model into the same directory as the circuit you are simulating.
Make a note of the filename of the SPICE model, including the file extension.
Add a .include SPICE directive to the schematic that will use the model
Open the SPICE model and note the name of the model - this is the text immediately after the .MODEL directive and before the part designator (in the case below this is the text DI_SBG1030L). The SPICE model can be viewed from within LTSpice.
Press <CTRL> then right click over the generic component and change the 'Value' field to the SPICE model name
Ensure the .include SPICE directive contains the exact filename of the SPICE model
Ensure the name of the generic component exactly matches the SPICE model name

http://www.simonbramble.co.uk/lt ... pice_tutorial_4.htm









.SUBCKT - Begin Subcircuit Definition

General Format :

     .SUBCKT |name| {node ...}

.SUBCKT declares that a subcircuit of the netlist will be described
until the .ENDS command.  Subcircuits are called in the netlist by
'X'.  |name| is the subcircuit's name.  {node ...} is an optional
list of nodes local only to the subcircuit and used for connection
on the top level.  Subcircuits can be nested (can have 'X' inside),
but cannot be recursive.

Example :

     .SUBCKT RES10 1 2 3
     R 1 2 10
     C1 1 3 1p
     C2 2 3 1p
     .ENDS
     A subcircuit RES10 is described as a resistor with parasitic
     capacitors whose body (or tub) can be hooked up to any node.





http://www.5spice.com/Subckts.htm


     
 楼主| 发表于 2012-5-2 18:46:01 |
本帖最后由 e3po 于 2012-5-2 03:03 编辑

Multisim 里面的 BFR93 模型:




* Version 1.1.0a

LCL 100 199 2.8E-10
LBL 200 201 3.2E-10
LBB 201 299 8.4E-10
LEL 300 301 3.2E-10
LEB 301 399 8.4E-10
CCB 201 199 6E-14
CCE 199 301 2.4E-13
CBE 201 301 1.2E-13

X1 199 299 399 XBFR93

.SUBCKT XBFR93 1 2 3
CBPAD 1 3 1.1E-13
CEPAD 2 3 1.1E-13
Q1 1 2 3 DBFR93

.MODEL DBFR93 NPN
+ IS = 4.499E-16 BF = 100 NF = 0.9861 VAF = 36 IKF = 3  ISE = 7.014E-14
+ NE = 1.955 BR = 11.95 NR = 0.985 VAR = 2.8 IKR = 0.02  ISC = 9.97E-16
+ NC = 1.1 RB = 10  IRB = 1E-05  RBM = 10  RE = 0.48  RC = 4
+ XTB = 0  EG = 1.11  XTI = 3  CJE = 1.72E-12  VJE = 0.88  MJE = 0.37
+ CJC = 1.2E-12  VJC = 0.553  MJC = 0.297  XCJC = 0.25
+ TF = 1.6E-11  XTF = 500  VTF = 0.9  ITF = 0.9  PTF = 49  TR = 1E-09  FC = 0.9
.ENDS




"LCL LBL LBB LEL LEB  CCB CCE CBE X1 CBPAD CEPAD"  这些参数到底是什么?  有待进一步的阅读.


http://web.mit.edu/Magic/Public/ckt/npn.mod

http://www.datasheetarchive.com/500--poon*-datasheet.html

http://www.datasheetarchive.com/ ... 069/DSA00316672.pdf


MRF949-SPICE.png


LCL-LBL-LBB-LEL-LEB--CCB-CC.png



原来如此,  这些参数就是俺一直很好奇的管脚和封装的分布参数.






     
 楼主| 发表于 2012-5-3 05:47:27 |



视频教程:  增加第三方模型

http://video.linear.com/97


http://video.linear.com/97

     
 楼主| 发表于 2012-5-15 16:45:40 |
自己都忘记

留个书签
     
 楼主| 发表于 2012-6-4 04:28:01 |



       简言之, MULTISIM 里面的射频晶体管是带了分布参数的。
发表于 2012-6-10 19:29:29 |
原来也好奇Datasheet里一串串的数据干嘛用,现在看来应该是仿真用的数据。

---
类unix系统下有什么好的仿真软件吗?确实,我可以“仿真”一个LTspice,但我希望能有个原生的。
     
 楼主| 发表于 2012-6-10 19:57:26 |
Super505050 发表于 2012-6-10 03:29
原来也好奇Datasheet里一串串的数据干嘛用,现在看来应该是仿真用的数据。

---





      LTspice 可以在 Linux 下运行。  装 Wine 就可以用了 。


       至于原生的,  你可以用 SPICE3 的源代码编译,  不过好像没有 GUI.

       绝对没有 LTspice 容易用

http://embedded.eecs.berkeley.edu/pubs/downloads/spice/index.htm

http://eece.ksu.edu/~khc/spice/spice3pc.html

http://users.ece.gatech.edu/~mrichard/Xspice/

发表于 2012-6-11 15:12:47 |
“关于 LTspice 里面的 "subcircuit" "SUBCKT" ”

小黑屋|手机版|矿石收音机 ( 蒙ICP备05000029号-1 )

蒙公网安备 15040402000005号

GMT+8, 2024-5-6 02:33

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表