I would like to add these spice models so i can simulate them in LTspice.

I have looked into this tutorial on how to add the models, but when I opened the library which contains all models, it looks different on the text files. The PBSS has a .SUBCKT and a .MODEL Diode on them. Do I have to add them to the diode file too?

The .mod file is even much more confusing, the files contains an NMOS where the mosfet where it came from is a PMOS.

enter image description here

It may be of note that doing method 1 in the turtorial where the spice text is just place on the drawing area results in an error.

enter image description here

  • \$\begingroup\$ Ah yes, FesZ Electronics is making its way as a point of reference onto this site too. Nice! \$\endgroup\$
    – pfabri
    Commented Feb 3, 2022 at 14:36

2 Answers 2


The first thing to realize is all the manufacturer models you are using are of the .subckt form, i.e. subcircuits. A subcircuit is a collection of other primitive devices, such as resistors, capacitors, diodes, transistors, etc. More complex behaviors can be simulated using a subcircuit over a single primitive device, like a simple .model for a diode as shown in your linked video tutorial. Discrete MOSFETs actually require a subcircuit of some kind, because built-in SPICE primitives for MOSFETs are for monolithic (integrated circuit) applications only. LTspice has an exception to this with its proprietary VDMOS primitive model architecture. However, only the built-in models use this type and a 3rd party manufacturer will rarely provide you a discrete MOSFET model in this form. The AO4407A file you linked is a subcircuit, and I wouldn't worry too much about what's inside the subcircuit (like the monolithic NMOS you mentioned) unless you are the subcircuit designer or want to modify it in some way.

The least brain-intensive way to add subcircuit models on your system is to first put the library file into your Documents\LTspiceXVII\lib\sub folder and then use this tutorial: https://www.analog.com/en/technical-articles/ltspice-simple-steps-to-import-third-party-models.html

If you want to use standard symbols instead of the generic boxes generated by the above method, you need to Ctrl+rightclick each symbol and change the prefix to X as described in this tutorial: https://www.analog.com/en/technical-articles/ltspice-using-an-intrinsic-symbol-for-a-third-party-model.html

  • \$\begingroup\$ Got it to work now ! got a slight problem though simulation time is moving slowly at statistics shown on the bottom left only a movement of 100ps/s. Is this normal? im having it switch at 1MHz though. \$\endgroup\$
    – DrakeJest
    Commented Jul 31, 2021 at 20:08
  • 1
    \$\begingroup\$ @DrakeJest Sounds like you are having generic convergence issues. You can find tips online to help with that, such as this or this. But most problems are usually caused by user-error. Make sure your circuit is drawn correctly. For example, it looks to me like your PMOS is upside down. I would expect the source node to be connected to the 24V supply. Also add some series resistors, at least on the base of Q3 but maybe also on the emitters of Q1 & Q2. \$\endgroup\$
    – Ste Kulov
    Commented Jul 31, 2021 at 20:53
  • \$\begingroup\$ Yes the circuit in the image has so many thing wrong, I fixed the circuit and let it run overnight, \$\endgroup\$
    – DrakeJest
    Commented Aug 1, 2021 at 13:05

I think your problem is that you are trying to use subcircuits as models. These are very different things in SPICE. If you want to use a subcircuit then the elements instance should begin with an X rather than a Q or M.

A subcircuit is a hierarchical element that contains other primitive elements (transistors, diodes, resistors, etc.). These primitive elements may have their own model files.

A model contains only parameter values that will be used in equations built-in to the simulator.

Your AO4407A.mod file is not a model file, it is a subcircuit for something called an HP21AC. Your PBSxxxx files are also subcircuits.


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.