# .step and .list param function for real components in LTSpice

I know that LTSpice can compute simulation in .step and .list param functions. However, those lists are ideal (not real).

Is there a means to use the .step and .list param function for real components (components in the library)?.

You can use numeric literals together with the keyword AKO (A Kind Of) to step between .MODEL definitions, and numeric literals instead of names for .SUBCKT, but with certain conditions.

Example #1:

The name of Q1 is {x} which, because it's between curly braces, it will be evaluated. If it was simply x, it would have had to have a .MODEL X ... defined. The .STEP command assigns the values 1 and 2 to it. Due to the AKO, these will mean 2n3904 and 2n2222, respectively.

Example #2:

It's using letters for pin names to avoid ambiguities with the name, itself. For .SUBCKT this is only possible if the options Save Subcircuit Node Voltage/Currents are not checked in the Control Panel > Save Defaults tab, or if the stepped subcircuits have identical topologies. The reason is as follows:

The two subcircuits are 1 and 2 and they are different under the hood -- 1 has one resistor and two nodes, 2 has two resistors and three nodes. When the parser is done with the circuit, the whole netlist is "flattened", i.e. there will be no subcircuits, but an extended version of each component. This can be seen by either checking Control Panel > Operation > Generate Expanded Listing, or by adding .opt list to the schematic, and then viewing the error log. If either of those two mentioned options is checked, then the matrix will have one size for 1, and another for 2, which is contradictory in the same run.

Note that in all these cases, the {x} must evaluate to a number, it can't be anything else.

• Thank you very much. That helps a lot