2
\$\begingroup\$

Can someone explain to me what the "limit" command in the following SPICE model of a Varistor means? Also, what are v(4) and v(8)?

.SUBCKT MOV  1 2 PARAMS: T=1 C=1pF L=1nH a1=1 a2=0 a3=0 a4=0 a5=0 a6=100u a7=100u
E_non_lin   3 1     VALUE {T*(
a1+a2*(log10(limit(v(4),a7,1g))-3)
a3/limit(v(4)*.001,a7/1e3,1g)
+a4*exp(-log10(limit(v(4),a7,1g))+3)
+a5*exp(log10(limit(v(4),a7,1g))-3)
-(a1+a2*(log10(-limit(v(4),-1g,-a7))-3)
-a3/limit(v(4)*.001,-1g,-a7/1e3)
+a4*exp(-log10(-limit(v(4),-1g,-a7))+3)
+a5*exp(log10(-limit(v(4),-1g,-a7))-3))
+limit(v(4)/a7*v(8),-v(8),v(8)))}
L_series    5 6  {L}  
H_H1        4 0  VH_H1 1k
VH_H1       5 7 0V
R_R2        0 4  1G  
R_series    6 2  {a6}  
V_V1        3 7  0V
E_x_zero    8 0     VALUE {a1+a2*(log10(a7/1e3))+a3/(a7/1e3)+a4*exp(-log10(a7/1e3))+a5*exp(log10(a7/1e3))}
R_x_zero    8 0  1G
C_parallel  1 5 {C}
.ENDS
*
.SUBCKT V571BA60 1 2 PARAMS: TOL=0
X1  1 2 MOV PARAMS: T={1+TOL/100} L=75nH C=4.5nF a1=1050.5 a2=52.58 a3=-1.056e-3 a4=0.8805 a5=11.65 a6=3.266e-3 a7=25e-3
.ENDS
*
.SUBCKT V661BA60 1 2 PARAMS: TOL=0
X1  1 2 MOV PARAMS: T={1+TOL/100} L=75nH C=4nF a1=1212.2 a2=60.67 a3=-1.219e-3 a4=1.016 a5=13.44 a6=3.768e-3 a7=25e-3
.ENDS
*

I have the SPICE model from this website https://www.littelfuse.com/technical-resources_old/spice-models/varistor-spice-models.aspx

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

limit is a function whose definition is given by this reference manual (for example):

LIMIT(x,min,max)
result is min if x < min, max if x > max, and x otherwise

The documentation for your simulator should have similar information.

v(4) and v(8) are node voltages for nodes 4 and 8 in your .SUBCKT:

H_H1        4 0  VH_H1 1k
R_x_zero    8 0  1G
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.