#====================================================
#VISHAY NTCLE101E3C90173saber
#Voltage driven NTC. Package: Radial Leaded
#revision1: coefficients corrected
#Connections:
# Pin 1
# | Pin 2
# | | Temperature input
# | | |
template ntcle101e3csabernew m_1 m_2 tin
electrical m_1,m_2,tin
{
foreign sstmath
foreign sstput,sstget
electrical ttot,vcth,n001,n002,n003
number a=-12.89228328,a1=-12.89228328,b=4245.148,b1=4245.148,beta=3435.0,
c=-8.7493e+04,c1=-8.7493e+04,cth=0.0476,d=-9.588114e+06,
d1=-9.588114e+06,gth=0.0068,rref=1e+04,tolb=0.01,tolrref=0.01,tref=25.0,
sstputrv
string inst
function (y_) = rntc(x,y)
number y_,x,y
{
number f_0_0
number b,c,d,beta,b1,c1,d1,rref,tref
string inst
inst=instance()
b = sstget(inst,"b")
c = sstget(inst,"c")
d = sstget(inst,"d")
beta = sstget(inst,"beta")
b1 = sstget(inst,"b1")
c1 = sstget(inst,"c1")
d1 = sstget(inst,"d1")
rref = sstget(inst,"rref")
tref = sstget(inst,"tref")
f_0_0=sstmath("psp_if",(x<25.0),
((rref*limexp(((y-beta)*((1.0/(x+273.15))-(1.0/(273.15+tref))))))*limexp((((b*(((1.0/(273.15+x))**1.0)-((1.0/(273.15+tref))**1.0)))+(c*(((1.0/(273.15+x))**2.0)-((1.0/(273.15+tref))**2.0))))+(d*(((1.0/(273.15+x))**3.0)-((1.0/(273.15+tref))**3.0)))))),
((rref*limexp(((y-beta)*((1.0/(x+273.15))-(1.0/(273.15+tref))))))*limexp((((b1*(((1.0/(273.15+x))**1.0)-((1.0/(273.15+tref))**1.0)))+(c1*(((1.0/(273.15+x))**2.0)-((1.0/(273.15+tref))**2.0))))+(d1*(((1.0/(273.15+x))**3.0)-((1.0/(273.15+tref))**3.0)))))))
y_=f_0_0
} # end function rntc
var i ri_0,ri_1,ri_2,ri_3
parameters {
inst=instance()
sstputrv = sstput(inst,"b",b)
sstputrv = sstput(inst,"c",c)
sstputrv = sstput(inst,"d",d)
sstputrv = sstput(inst,"beta",beta)
sstputrv = sstput(inst,"b1",b1)
sstputrv = sstput(inst,"c1",c1)
sstputrv = sstput(inst,"d1",d1)
sstputrv = sstput(inst,"rref",rref)
sstputrv = sstput(inst,"tref",tref)
}
pspr.1 tin 0 = r=1e+12
v.sense m_1 n002 = dc=0.0
i(n002->m_2) += ri_0 ; ri_0 : v(n002,m_2) = i(v.sense)*rntc(v(ttot),beta) # b3 # Rntc(V(Ttot),
# beta)
i(n003) += ri_1 ; ri_1 : v(n003) = v(tin) # b1
i(ttot->n003) += ri_2 ; ri_2 : v(ttot,n003) = +abs(v(vcth)) # b2
pspr.2 ttot 0 = r=1e+12
pspr.4 vcth n001 = r=1.0
pspc.1 0 vcth = c=(cth/gth)
i(n001) += ri_3 ; ri_3 : v(n001) = (+abs(((v(m_1)-v(m_2))*i(v.sense)))/gth) #
# b4
} # end ntcle101e3csabernew
Comments