I've not used LTspice a lot so my knowledge is lacking. Could you shine some light on how to do that and what exactly to do? What parameters besides .model are of interest?
The transistor I'd like to do next is: https://www.nxp.com/part/BFU590Q#/
OK, that gives you a typical example to work with. First, locate the Spice model if the vendor provides it. You can find it here:
https://www.nxp.com/products/radio-frequency/rf-discrete-components-low-power/rf-wideband-transistors/2-ghz-rf-wideband-transistors/npn-wideband-silicon-rf-transistor:BFU590Q?fpsp=1#documentationDownload the archive "BFU5xx family SPICE GP model v2", it contains all Spice models for their BFU5xx family. Inside you'll find the one for the BFU590Q which is the file: BFU590Q_SPICE_GP.PRM. You can open it in a text editor, it's just a Spice model. What you'll typically see here is that on top of the model for the transistor (".MODEL BFU590D NPN ...") they implement parasitics (capacitance and inductance) for the particular package it comes in SOT89), so that the actual Spice model to use is BFU590Q (".SUBCKT BFU590Q 1 2 3"). The Spice pin order (netlist order) is commented just above ("* 1: COLLECTOR; 2: BASE; 3: EMITTER").
So to answer you question about the additional parameters, here they model the parasitics due to the package itself. Of course this will potentially matter for high-frequency designs, a lot less so for lower frequencies.
Another thing typically modeled in vendor Spice models are any additional diodes that the transistor may embed (such as explicit diodes between source and drain, for instance, for MOSFETs.)
AD has a tutorial for adding third-party models:
https://www.analog.com/en/education/education-library/videos/5579239882001.htmlNow, first, you'll need to edit the BFU590Q_SPICE_GP.PRM Spice model file - turns out that LTspice doesn't recognize the IMAX parameter, so just delete the "+IMAX 2.00" line in the file and save.
In this case, what you'll typically do is:
- Copy the Spice model file to the: C:\users\xxx\AppData\Local\LTspice\lib\sub directory
- Open the generic NPN transistor symbol: C:\users\xxx\AppData\Local\LTspice\lib\sym\npn.asy in LTspice (filter symbols in the open dialog)
- Save it as a new symbol in the same directory (for instance BFU590Q.asy)
- Edit the attributes of the symbol: menu Edit/Attributes/Edit Attributes: set BFU590Q_SPICE_GP.PRM for the ModelFile attribute, and BFU590Q for the SpiceModel attribute (it's the subckt name), and change the prefix to "X" (instead of QN, this is a quirk of LTspice, or of Spice itself actually, if the prefix is not X - or, I think U should also work - you can't use a Spice subckt)
- Check that the pin numbering matches the Spice model (in this case, it does): right-click on each pin of the symbol to see the pin parameters (Label, Netlist Order) - the "Netlist Order" number corresponds to the Spice netlist order for the subckt
- Save the symbol
- Restart LTspice (yes you need to restart it for it to reload all symbols...)
You can also manually edit the symbol file (.asy) in a text editor, I find it easier than the quirky symbol editor, unless you actually need to create new graphics for a symbol.
Yes, that's not exactly a picnic but once you get the hang of it, that's ok. I suggest creating a shortcut for the "C:\users\xxx\AppData\Local\LTspice\lib" directory so that next time you don't waste a few minutes wondering where the heck this LTspice library directory is.
The BFU590Q symbol should appear in the Component Symbol list, you can select it and add it to your schematics.