# LTSpice, MAC97A8 TRIAC model, Vgs error

I'm having some difficulty getting LTSpice to like a TRIAC model.

The specific error it throws is "Missing model definition for VGT-0.65". The trouble is that VGT is a subcircuit parameter, not a model.

The thyristor library is one I found while googling for a SPICE model for the MAC97 (MAC97A8 specifically). It's located here and looks like a decent, well-built thyristor library. It abstracts a single SCR and single Triac subcircuit, and then lists dozens of models of various thyristors which call up one of these two models.

The subcircuit line that is throwing the error is this one:

Rseries  gate    gate1   {(Vgt-0.65)/Igt}


Now I've tried putting Vgt in parentheses all by itself (to try to separate the "-0.65" from the "Vgt", but then the LTSpice error just says it's got a missing model for VGT.

The specific model for the MAC97A8 also looks fine, and defines Vgt:

.subckt MAC97A8         MT2 gate MT1
* Min and Max parameters
X1 MT2 gate MT1 Triac params:
+ Vdrm=600v  Idrm=10u     Ih=10ma      dVdt=25e6   Ton=2u
+ Igt=5ma    Vgt=2.0v     Vtm=1.9v     Itm=.85
* 90-5-18    Motorola     DL137, Rev 2, 3/89
.ends
*\$


I've tried a few other TRIAC models to see if there was something specifically goofy about this one but that does not appear to be the case. At this point I'm starting to wonder if there is something odd about LTSpice's handling of the Triac subcircuit, but LTSpice is a pretty decent SPICE program so I'm hesitant to blame it, especially with a thyristor library found out on the random 'net.

Has anyone simulated TRIAC circuits with LTSpice before? Is there something specific that I am missing?

From the LTSPice IV manual:

X. Subcircuit
Syntax: Xxxx n1 n2 n3... <subckt name>
[<parameter>=<expression>]
Subcircuits allow circuitry to be defined and stored in a
library for later retrieval by name. Below is an example of
defining and calling a voltage divider and invoking it in a
circuit.
* calling a subcircuit
*
* This is the circuit
X1 in out 0 divider top=9K bot=1K
V1 in 0 pulse(0 1 0 .5m .5m 0 1m)
* This is the subcircuit
.subckt divider A B C
R1 A B {top}
R2 B C {bot}
.ends divider
.tran 3m
.end


Notice that params: never appears in the LTSpice syntax for a subcircuit call.

I am guessing that including this token in your X card has confused LTSpice about how the subcircuit should be called.

• Sometimes the solution is staring you right in the face but you can't see it. This is exactly what the problem was. Removing the "params:" from the library was all it took. Thank you very much, excellent answer and hopefully it helps others in the future. – akohlsmith Nov 11 '13 at 3:06
• To be fair, while googling around to find this answer, I found a document for another simulator that claims that LTSpice does use params: here. – The Photon Nov 11 '13 at 3:25
• Sorry about the delay in assigning the bounty; I thought that accepting the answer automatically did that. – akohlsmith Nov 15 '13 at 16:44
• No worries...I think it would have eventually happened on its own. – The Photon Nov 15 '13 at 17:28