Ltspice- if语句应用
电解模拟案例Syntax: Cnnn n1 n2 Q=<expression>
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.
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>
R, at will be
R = R0 * (1. + dt * tc1 + dt**2 * tc2 + dt**3 * tc3 + ...)
定义两个温度系数,第一个小于20℃时,温度系数是变的,例如-40℃时是2.1;大于20℃时,温度系数为0.14
{if(temp<20,-0.03267*temp+0.7933,0.14)}
页:
[1]