照明论坛-LED论坛-照明家族

标题: 03-LTspice 电容参数代码 [打印本页]

作者: 888888    时间: 2021-6-24 14:08
标题: 03-LTspice 电容参数代码
Symbol names: CAP, POLCAP
[attach]10579[/attach]
Syntax: Cnnn n1 n2 <capacitance> [ic=<value>]
+ [Rser=<value>] [Lser=<value>] [Rpar=<value>]
+ [Cpar=<value>] [m=<value>]
+ [RLshunt=<value>] [temp=<value>]

C指示电容,紧接的nnn是自定义名字;n1和n2是电容的两个端点;expression就是函数表达式了
ic指电容的初始电压;
Rser指等效串联电阻;
Lser指等效串联电感;
Rpar=等效并联电阻;
Cpar=等效并联电容;
m指并联电容个数;
RLshunt 通过Lser的分流电阻;
temp指案例温度(与.model描述的临时温度参数对应)


举例:Syntax: 语法
Cnnn n1 n2 Q=<expression> [ic=<value>] [m=<value>]
There is a special variable, x, that means the voltage across the device. Therefore, a 100pF constant capacitance can be written as
Cnnn n1 n2 Q=100p*x 含义:容量为100pF电容,x表示设备上的电压。
A capacitance with an abrupt change from 100p to 300p at zero volts can be written as
Cnnn n1 n2 Q=x*if(x<0,100p,300p) 含义:电容在零伏时从100p突变到300p


作者: fdsadfdsid    时间: 2021-7-3 23:11
在LTSPICE中导入模型(Murata 电容)
接下来,是具体步骤。
首先,我们在murata网站上下载网表文件,是mod的后缀名。用记事本打开,里面内容如下:

*----------------------------------------------------------------------
* SPICE Model generated by Murata Manufacturing Co., Ltd.
* Copyright(C) Murata Manufacturing Co., Ltd.
* Description :1608/C0G/220pF/50V
* Murata P/N :GRM1885C1H221JA01
* Property : C = 220[pF]
*----------------------------------------------------------------------
* Applicable Conditions:
*   Frequency Range = 100000000Hz-8500000000Hz
*   Temperature = 25 degC
*   DC Bias Voltage = 0V
*   Small Signal Operation
*----------------------------------------------------------------------
.SUBCKT GRM1885C1H221JA01 Port1 Port2
C1 Port1 11 2.20e-10
L2 11 12 8.00e-11
R3 12 13 3.80e-2
C4 13 14 1.48e-8
R4 13 14 1.07e-1
L5 14 15 4.74e-11
R5 14 15 1.34e-1
L6 15 16 6.44e-11
R6 15 16 1.90
C7 16 17 5.02e-13
L7 16 17 4.20e-10
C8 17 18 2.64e-11
L8 17 18 9.76e-12
R8 17 18 1.59
C9 18 19 2.82e-10
L9 18 19 2.63e-11
R9 18 19 8.59e-1
C10 19 Port2 2.97e-9
L10 19 Port2 6.55e-12
R10 19 Port2 2.11e-1
R100 Port1 11 1.00e+10
.ENDS GRM1885C1H221JA01

这个文件里有些内容需要稍微修改下。我们先来分析下网表文件里的内容,这个是和很简单的网表,我们看到第一行:
.SUBCKT GRM1885C1H221JA01 Port1 Port2这一句, “.SUBCKT” 表示起始,后面跟得”GRM1885C1H221JA01”表明了器件的名称,这里要和后面建立的器件名称相对应。接下来是 “Port1 Port2”,这里要注意,要改成“1 2”。
接下来,就是内部各个器件的连接,相同的数字代表相同的节点。同样的Port1 改为 1 ,Port2 改为 2,修改完后的内容为:

*----------------------------------------------------------------------
* SPICE Model generated by Murata Manufacturing Co., Ltd.
* Copyright(C) Murata Manufacturing Co., Ltd.
* Description :1608/C0G/220pF/50V
* Murata P/N :GRM1885C1H221JA01
* Property : C = 220[pF]
*----------------------------------------------------------------------
* Applicable Conditions:
*   Frequency Range = 100000000Hz-8500000000Hz
*   Temperature = 25 degC
*   DC Bias Voltage = 0V
*   Small Signal Operation
*----------------------------------------------------------------------
.SUBCKT GRM1885C1H221JA01 1 2
C1 P1 11 2.20e-10
L2 11 12 8.00e-11
R3 12 13 3.80e-2
C4 13 14 1.48e-8
R4 13 14 1.07e-1
L5 14 15 4.74e-11
R5 14 15 1.34e-1
L6 15 16 6.44e-11
R6 15 16 1.90
C7 16 17 5.02e-13
L7 16 17 4.20e-10
C8 17 18 2.64e-11
L8 17 18 9.76e-12
R8 17 18 1.59
C9 18 19 2.82e-10
L9 18 19 2.63e-11
R9 18 19 8.59e-1
C10 19 2 2.97e-9
L10 19 2 6.55e-12
R10 19 2 2.11e-1
R100 1 11 1.00e+10
.ENDS GRM1885C1H221JA01

这样,将该文件保存,修改后缀名为sub。注意,保存的文件名最好要和器件名一致。将该文件复制到如下目录: 安装LTSPICE的目录/lib/sub,比如我的就是D:/Program Files/LTC/LTspiceIV/lib/sub

接下来就是在LTSPICE中建立器件,这个简单说一下,点击 File->New symbol,画一个器件符号,我画的如下:

[attach]10586[/attach]

接下来添加管脚,Edit->Add pin/port, label是管脚名,随便填;Netlist order和上面提到的网表文件中的第一行 “1 2”对应。
最后编辑属性,Edit->Attributes->Edit Attributes,Prefix 填大写的“X”,表明从网表文件中读取;SpiceModel 填写网表文件名,注意要包括后缀名。其他的可填可不填。保存为和网表文件一样的文件名,保存到如下目录:比如我的就是:D:/Program Files/LTC/LTspiceIV/lib/sym
这样,就可以把这个器件在仿真时丢出来了,简单的RC电路如下图2:
这只是个简单的电容模型,同样的其他器件也可以按照这样的方式导入。


作者: 888888    时间: 2021-7-16 13:46
Resistor (and Capacitor) Model Statements
It's not in the .model section of the Help file, but LTspice seems to recognize standard model statements for resistors (RES) and capacitors (CAP), but not inductors (IND).
LTspice似乎识别了电阻(RES)和电容(CAP)的标准模型语句,但没有识别电感(IND)。

As in many other SPICE simulators, "RES" and "CAP" are allowed as model keywords.  For example, with the following line of spicetext和许多其他SPICE模拟器一样,“RES”和“CAP”也可以作为模型关键字。

.model X7R cap (T_measured=20 Tc1=0 Tc2=-19u)
on a schematic, if a capacitor then has "X7R" entered into its "SpiceModel" field (via ctrl-right mouse click) its base value will be multiplied by the following temperature factor, TF

TF = 1 + Tc1*(T-Tmeasured) + Tc2*(T-Tmeasured)**2
where T = the global temperature TEMP or the local instance if specified.






欢迎光临 照明论坛-LED论坛-照明家族 (http://lightingfamily.net/) Powered by Discuz! X3.4