# How to (.step) change bjt/fet/opamp models in simulations in LTSpice?

Is there a way to change bjt/jfet/opamp model in simulation in LTSpice (similarly to changing parameters with .step command)?

I would like to compare different bjt/jfet/opamp models, run a number of simulations with different models, then display the transient/fft curves in the same window, to compare their performance in a given circuit.

• Thanks for asking this question. Because of the answer you were handed, I learned something new about LTspice! – jonk Apr 17 '17 at 17:26

You can do this by using a little trick: the .param statement in Spice only works with numbers, but Spice has a way to rename models with numerical names, the ako (Also Known As) option. IIRC, this may not be documented in LTSpice docs, but it does exactly what you want. See ltwiki:AKO Aliases (A Kind Of) for a little more information
To sweep models, simply use .model n ako:<name> to rename each model you want to sweep, and then use a .step param MParam list 1 2 .. n to sweep through those models. See below for an example, where I sweep through three simple diode models plus a "real" diode model.
• Stepping through diode models works perfectly, but I couldn't figure out how to step through (opamp) subcircuits? Should this trick work with .subckt too? – remageFrs Apr 19 '17 at 13:06