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

标题: Ltspice- if语句应用 [打印本页]

作者: 888888    时间: 2021-7-8 07:59
标题: Ltspice- if语句应用
电解模拟案例
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
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)
This device is useful for rapidly evaluating the behavior of a new a hypothetical charge model for, e.g., a transistor.
[attach]10616[/attach]


1) Q=x*if(x>0.5,0.5u,1u)    :当电容上的电压高于0.5V,电容容量为0.5uF,否则电容容量为1uF
2) Q=xsin(time)                  :容量随电容上电压与时间的正弦函数

关于电解得等效串联电阻 是随温度变化而变的 ESR与温度的两个坐标点可以拟合一条直线;
Eletrolytic capacitor
ESR @ -40℃ = 2.1Ω
ESR @ 20℃  = 0.14Ω


电阻案例:Syntax: Rxxx n1 n2 <value> [tc=tc1, tc2, ...] [temp=<value>]
R, at will be
R = R0 * (1. + dt * tc1 + dt**2 * tc2 + dt**3 * tc3 + ...)

[attach]10590[/attach]

定义两个温度系数,第一个小于20℃时,温度系数是变的,例如-40℃时是2.1;大于20℃时,温度系数为0.14
{if(temp<20,-0.03267*temp+0.7933,0.14)}






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