Errors when simulating simple fuse

I am using KiCad stable and ngspice with PSPICE compatibility enabled.

I was trying to simulate a simple fuse with this library:

Attached is a minimal example trying to use F8AG1. (3.2 KB)

However I get the following errors:

Error on line 0 :
g.xf1.g2 xf1.59 xf1.12 xf1.59 xf1.12 0, 4.7847m, -10.873u, 21.648n, -18.204p, 5.9532f
unknown parameter (4.7847m) 
Error on line 0 :
g.xf1.g3 xf1.11 xf1.12 xf1.11 xf1.12 0, 4.7847m, -10.873u, 21.648n, -18.204p, 5.9532f
unknown parameter (4.7847m) 
Error on line 0 :
e.xf1.e1 xf1.42 0 xf1.59 0 -620.00 1
unknown parameter (1) 

Does someone know how to hack the spice model so that it is compatible with ngspice?

I was checking here for possible syntaxes, but I couldn’t figure it out:

I tried with other subcircuits such as FUSEN, but it complains about the question marks.

Error: unknown subckt: xf1 net-_f1-pad1_ net-_f1-pad2_ fusen {???temp=???hcte=2.0} 5.3u .5}

Should I remove the question marks? Or is this a bug in ngspice/pspice parser?

I think I figured it out, but not 100% sure it’s going to work how it’s intended to. These are super duper old behavior modeling syntax. I could only find examples of them in the old SPICE2 manual, before the B-source was introduced. I added POLY(1) to the G2, G3, and E1 sources, as such (ignore the green):

*SRC=8AG1;F8AG1;Fuses;Normal Blow;250V 1A
*HELP issyntax.hlp "Fuse Modeling"
.SUBCKT F8AG1 1     4     
*BEL 8AG 1A FUSE Normal Glass Tube Type, Voltage Rating 250V   
V1 1 8  
H1 14 0 V1 1    
E10 8 37  POLY(2) 14 0 9 0 0 0 0 0 100.000M     
G8 0 59  POLY(2) 14 0 8 37 0 0 0 0 1    
R2 59 12 1MEG   
G2 59 12 POLY(1) 59 12 0, 4.7847M, -10.873U,    
+ 21.648N, -18.204P, 5.9532F    
C1 59 0 900.00U 
G3 11 12 POLY(1) 11 12 0, 4.7847M, -10.873U,    
+ 21.648N, -18.204P, 5.9532F    
C2 12 0 900.00U 
V3 11 0 300     
E2 9 0 59 0 3.333M      
R3 8 37 1MEG    
R4 14 0 1E12    
R5 9 0 1E12     
R7 11 12 1MEG   
R6 11 59 1MEG   
E1 42 0 POLY(1) 59 0 -620.00  1 
R8 43 44 10K    
V4 43 0 1       
Q1 39 45 0 NPN; OFF      
R9 42 45 100MEG 
R10 43 39 1MEG  
Q2 45 39 44 PNP; OFF     
X1 37 4 39 LSWITCH2     

For the 2nd problem, this file appears to be meant to be used with IsSpice. The IsSpice manual explains the deal with the three question marks. IsSpice supports unknown default values for subcircuit parameters via the ???, and it flags their UI to force you to enter something into the values prior to running a simulation. So you’re going to have to change these manually to a real default parameter. Unfortunately, I have no idea what the IB is supposed to be, or what TEMP is meant to refer to either (or if it’s supposed to be specified in C or K). Looks like there is supposed to be a help file that ships with IsSpice that might help explain all this.

1 Like

If i understand correctly POLY(1) is a polynomial acting on one node, but that does not mean is a grade-1 polynomial, right? Its grade is as high as the number of coefficientes behind?

In the links below, I did not find this explained specifically.

This is the final list of modifications I did to make it work:

V1 1 8 0
G2 59 12 POLY(1) 59 12 0, 4.7847M, -10.873U, 
G3 11 12 POLY(1) 11 12 0, 4.7847M, -10.873U,
E1 42 0 POLY(1) 59 0 -620.00  1 

The breakdown current is apparently at 1.8A rather than at 1A as in the description, but otherwise I have it working now, thanks!

Yeah, pretty much. More info here:
And here (Appendix B) is where I noticed that POLY(1) is assumed the default if you don’t specify POLY(n) in at all but start listing out node pairs:

As for the unexpected voltage…this model appears to have lots of parameters including temperature. So depending on HOW you blow the fuse might affect the result.

1 Like

Thanks so much for the two links, they are pretty well explained!

No problem!

I should’ve elaborated more. What I meant is that if these models are indeed sophisticated and accurate enough to model many real world effects, then there are many more factors than just the stated current rating. A common one with fuses is the time it takes to blow at certain currents. Here is an example snip from this datasheet:

According to this, it will take a couple minutes to blow the 1A fuse when dumping 1.5A through it. So maybe DC sweep simulations, like in your screenshot, might not be the best for testing out these models.

1 Like

The issue with POLY(1) is fixed now in ngspice by holger in branch pre-master, see

1 Like

Dang, that’s pretty fast resolution for an obscure problem. Maybe I should’ve created my ngspice sourceforge tickets as bugs instead of feature requests???

Yes, definitely, hehe.

1 Like