.SUBCKT BSC034N06NS_L1 drain gate source PARAMS: dVth=0 dRdson=0 dgfs=0 dC=0 Ls=0.3n Ld=1n Lg=3n

.PARAM Rs=216u      Rg=1.3       Rd=20u       Rm=45u
.PARAM Inn=50       Unn=10       Rmax=3.4m    gmin=65
.PARAM act=4.13     Rsp=0.7

X1  d1 g s sp Tj1 S5_60_e1_var PARAMS: a={act} Rsp={Rsp} dVth={dVth} dR={dRdson} dgfs={dgfs} Inn={Inn} Unn={Unn} Rmax={Rmax} gmin={gmin} Rs={Rs} Rp={Rd} dC={dC} Rm={Rm}
Rg    g1     g    {Rg}
Lg    gate   g1   {Lg*if(dgfs==99,0,1)}
Gs    s1     s    VALUE={V(s1,s)/(Rs*(1+(limit(V(Tj),-200,999)-25)*4m)-Rm)}
Rsa   s1     s    1Meg
Ls    source s1   {Ls*if(dgfs==99,0,1)}
Rda   d1     d2   {Rd}
Ld    drain  d2   {Ld*if(dgfs==99,0,1)}

E2    Tj     w    VALUE={TEMP}
Vp    Tj1    Tj   0
R1    Tj     Tj1  1u
G_power 0    Tj   VALUE ={V(s1,s)*V(s1,s)/(Rs*(1+(limit(V(Tj),-200,999)-25)*4m)-Rm)+V(g,g1)*V(g,g1)/Rg+V(d1,d2)*V(d1,d2)/Rd+I(Vp)}
R2      w    0    1u


.SUBCKT S5_60_e1_var dd g s0 sp Tj PARAMS: a=1 Rsp=1 dVth=0 dR=0 dgfs=0 Inn=1 Unn=1 Rmax=1 gmin=1 Rs=1 Rp=1 dC=0 Rm=1u

.PARAM b0=70.2        p0=7.92        p1=-29.8m      p2=53u         mubet=1.3      fbet=0
.PARAM Vth0=3.98      c=1.47         Fm=220m        Fn=500m        al=500m        auth=3.5m
.PARAM dvx=550m       dvgs=100m      auth_sub=3.5m

.PARAM Rd=7.7m        nmu=3.15       Rf=600m

.PARAM lnIsj=-27.24   ndi=1.08       Rdi=5m         nmu2=0         n_Isj=0        UB=66
.PARAM ab=30m         UT=100m        lB=-23         td=10n         ta=10n

.PARAM kbq=85.8u      Tref=298       T0=273

.PARAM f3=465p        rc1=80p        f3a=90p

.PARAM f4=29.27p      f5=29.27p      sl=1.21p       ps1=56.43p     ps2=-152.19m   ps3=34.74p
.PARAM ps4=-956.13m   ps5=3.5p       ps6=10p        ps7=0          pc0=25p

.PARAM q83=60p        q84=-37.93m    qs7=59.67p     qs8=-841.35m   f2b=0

.PARAM q80=210p       q81=210p       q82=6.5p       qs1=74.03p     qs2=4.28p      qs3=-37.93m
.PARAM f2r=30.04

.PARAM  x1={(q80-q81)/q82}       x2={q80/q82}
.PARAM  y1={(f4-f5)/sl}          y2={f4/sl}
.PARAM  Vmin=2.98     Vmax=4.98  dCmax=0.33
.PARAM  Vth={Vth0+(Vmax-Vth0)*limit(dVth,0,1)-(Vmin-Vth0)*limit(dVth,-1,0)}
.PARAM  q0={b0*((1-fbet)*(T0/Tref)**mubet+fbet)*a}
.PARAM  q1={(Unn-Inn*Rs-Vth0)*q0}
.PARAM  q2={(Fm*SQRT(0.4)-c)*Inn*q0}
.PARAM  Rlim=(q1+(2*q2*Rmax)-sqrt((q1**2)+4*q2))/(2*q2)
.PARAM  dRd={Rd/a+if(dVth==0,limit(dR,0,1)*max(Rlim-Rd/a-Rs-Rp,0),0)}
.PARAM  bm={c/((1/gmin-Rs)**2*Inn*a*((1-fbet)*(T0/Tref)**mubet+fbet))}
.PARAM  bet={b0+(b0-bm)*if(dR==0,if(dVth==0,limit(dgfs,-1,0),0),0)}
.PARAM  dC1={1+dCmax*limit(dC,0,1)}
.PARAM  dC2={1+1.5*dCmax*limit(dC,0,1)}

.PARAM  Cgs0={(f3*a+rc1)*dC1}
.PARAM  Cgs1={f3a*a*dC1}

.PARAM  Cds2={qs7*a*dC1}
.PARAM  Cds3={q83*a*dC1}
.PARAM  Cds5={qs1*a*dC1}
.PARAM  Cds6={(a*qs2*(1+f2r/sqrt(a)))*dC1}
.PARAM  Cds8={q80*a*dC1}

.PARAM  Cdg1={(a*ps1*(1+pc0*sqrt(a)))*dC2}
.PARAM  Cdg2={ps3*a*dC2}
.PARAM  Cdg3={(ps5*a+ps6)*dC2}
.PARAM  Cdg4={f4*a*dC2}
.PARAM  dRdi={Rdi/a}

.FUNC Ue(g,y,w)  {(g-Vth+auth*(w-Tref)+Fm*y**Fn)}
.FUNC Ue1(g,y,w) {Ue(g,y,w)+(1+limit(Ue(g,y,w)+dvx,0,1)**2*(2*limit(Ue(g,y,w)+dvx,0,1)-3))*(dvgs+(auth_sub-auth)*(w-Tref))}

.FUNC I0(Uee,p,pp,z1) {if(Uee>pp,(Uee-c*z1)*z1,p*(pp-p)/c*exp((Uee-pp)/p))}
.FUNC Ih(Uds,T,p,Uee) {bet*((1-fbet)*(T0/T)**mubet+fbet)*I0(Uee,p,min(2*p,p+c*Uds),min(Uds,Uee/(2*c)))}
.FUNC Jh(d,g,w,y,s,x) {a*((Ih(s*y+min(d,0),w,(p0+(p1+p2*w)*w)*kbq*w,Ue1(g,y,w))+exp(min(lB+(d-UB-ab*(w-Tref))/UT,25))))}

.FUNC Idiode(Usd,Tj,Iss) {exp(min(log(Iss)+Usd/(ndi*kbq*Tj),7))-Iss}
.FUNC Idiod(Usd,Tj)      {a*Idiode(Usd,Tj,exp(min(lnIsj+(Tj/Tref-1)*1.12/(ndi*kbq*Tj),7))*(Tj/Tref)**n_Isj)}

.FUNC Pr(Vss0,Vssp)  {Vss0*Vss0/Rm+Vssp*Vssp/Rsp}
.FUNC Q1(Uds) {a*(limit(Uds,x1,x2)*(q80-q82/2*limit(Uds,x1,x2))+min(Uds-x1,0)*q81-max(x1,0)*(q80-q81)/2)}
.FUNC Q2(Udg) {a*(limit(Udg,y1,y2)*(f4-sl/2*limit(Udg,y1,y2))+min(Udg-y1,0)*f5-max(y1,0)*(f4-f5)/2)}

C_Cgs  g      s      {Cgs0}
C_Cgs1 g      sp     {Cgs1}

E_Eds2 d      edep2  VALUE {if(qs8==0,0,V(d,s)-(exp(qs8*max(V(d,s),-1))-1)/min(qs8,-1u)-min(V(d,s)+1,0)*exp(-qs8))}
C_Cds2 edep2  s      {Cds2}
E_Eds3 d      edep3  VALUE {V(d,s)-I(V_sense3)/Cds3}
C_Cds3 edep3  s      {Cds3}

C_Cds5 d      sp     {Cds5}
E_Eds6 d      edep6  VALUE {if(qs3==0,0,V(d,sp)-(exp(qs3*max(V(d,sp),0))-1)/min(qs3,-1u)-min(V(d,sp),0))}
C_Cds6 edep6  sp     {Cds6}
E_Eds8 d      edep8  VALUE {V(d,sp)-Q1(V(d,sp))/Cds8}
C_Cds8 edep8  sp     {Cds8}

E_Edg1 d    ox1 VALUE {if(ps2==0,0,V(d,g)-(exp(ps2*max(V(d,g),0))-1)/min(ps2,-1u)-min(V(d,g),0))}
C_Cdg1 ox1  g   {Cdg1}
E_Edg2 d    ox2 VALUE {if(ps4==0,0,V(d,g)-((exp(ps4*(max(V(d,g)+ps7,0)))-exp(ps4*max(ps7,0)))/min(ps4,-1u)+min(V(d,g)+max(ps7,0),max(0,-ps7))))}
C_Cdg2 ox2  g   {Cdg2}
C_Cdg3 d    g   {Cdg3}
E_Edg4 d    ox4 VALUE {V(d,g)-Q2(V(d,g))/Cdg4}
C_Cdg4 ox4  g   {Cdg4}

Rfp     s sp    {Rsp}

G_chan   d5a   s  VALUE={Jh(V(d5a,s),V(g,s),T0+limit(V(Tj),-200,300),(SQRT(1+4*al*max(V(d5a,s),0))-1)/2/al,sgn(V(d5a,s)),0)}
Rd06     d5a  d5  1u
V_sm     d    d5  0
G_RMos   d1    d  VALUE={V(d1,d)/(Rf*dRd+(1-Rf)*dRd*((limit(V(Tj),-200,999)+T0)/Tref)**nmu)}
V_sense  dd   d1  0
G_diode   s   d3  VALUE={Idiod(V(s,d3),T0+limit(V(Tj),-200,499))}
G_Rdio   d2   d1  VALUE={V(d2,d1)/(dRdi*((limit(V(Tj),-200,999)+T0)/Tref)**nmu2)}
V_sense2 d2   d3  0

L_L001 a c {td/(ta+td)}
R_R001 a b {1/ta}
V_sense3 c 0 0
E_E001 b 0 VALUE {I(V_sense2)}
E_E002 e 0 VALUE {Cds3*((exp(q84*max(V(d,s),-1))-1)/min(q84,-1u)-min(V(d,s)+1,0)*exp(-q84))}
R_R002 e c 1
R_R003 a 0 500Meg

R1        g    s  1G
Rd01      d    s  500Meg
Rd02     d2    s  500Meg
Rd03     d1    d  1k
Rssp      g   sp  100Meg

Rmet      s    s0 {Rm}

G_TH      0   Tj  VALUE = {(I(V_sense)-I(V_sense2))*V(d1,d)+I(V_sm)*V(d,s)+I(V_sense2)*V(d1,s)+Pr(V(s,s0),V(s,sp))}


Blockquote Circuit: * C:\Users\Arvind Gupta\Documents\LTspiceXVII\lib\sym\Arvind Parts\Draft5.asc

Blockquote WARNING: Can't resolve .param rlim=(q1+(2*q2*rmax)-sqrt((q1**2)+4*q2))/(2*q2)

Blockquote WARNING: Can't resolve .param drd=rd/a+if(dvth==0,limit(dr,0,1)*max(rlim-rd/a-rs-rp,0),0)

Blockquote Questionable use of curly braces in ".param drd={rd/a+if(dvth==0,limit(dr,0,1)*max(rlim-rd/a-rs-rp,0),0)}"

Blockquote Error: yet unevaluated parameter in: "rd/a+if(dvth==0,limit(dr,0,1)*max([rlim-]rd/a-rs-rp,0),0)"

Blockquote Questionable use of curly braces in "b§g_rmos d1 d i=v(d1,d)/({rf}{drd}+(1-{rf}){drd}*((limit(v(tj),-200,999)+{t0})/{tref})**{nmu})"

Blockquote Error: yet unevaluated parameter in: "[drd]"

Blockquote Questionable use of curly braces in "b§g_rmos d1 d i=v(d1,d)/({rf}(drd)+(1-{rf}){drd}*((limit(v(tj),-200,999)+{t0})/{tref})**{nmu})"

Blockquote Error: yet unevaluated parameter in: "[drd]"

I just used the INFINEON Optimos SPICE models available on their website. Copy pasted and used the auto-generate to make the model. Now when I use this mosfet in my circuit for an LLC converter, I get the following error, I've enclosed it in Blockquote. The mosfet Model is in the codeblock.

The mosfet I am using is BSC034N06NS.

  • \$\begingroup\$ I get nausea looking at the model, but the error, as seen, says it cannot calculate {drd} because of {Rlim}. Why, I don't know, it seems Rlim is defined with a proper .param statement, but mostly because I feel the nausea escalating if I try. Someone else may be less sensible. If I were you, I'd look for different models, that look like models or proper subcircuits. \$\endgroup\$ – a concerned citizen Nov 6 '19 at 18:23
  • \$\begingroup\$ I was using the level 1 model of the mosfet. Tried level 0 and it works fine. But why does the level 1 model give this error ? \$\endgroup\$ – Arvind Gupta Nov 8 '19 at 2:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.