I assume you've already familiarized yourself with the MonteCarlo.asc
file in the educational subdirectory of LTspice. So I won't belabor those details.
What I'll do is grab up a schematic I have -- it's a circuit that once triggered by a manual switch will continue to power a circuit for a specified period of time. (\$R_{_\text{DEVICE}}\$ is the circuit being powered.)
It uses a MOSFET device as part of the circuit. So I've modified my schematic to perform a Monte Carlo on \$V_{_\text{TO}}\$ of the BSS123. Note that I constructed my own MODEL
statement and included the VTO parameter there, using a 5% tolerance around the typical value of \$1.6\:\text{V}\$.
You can see just how much variation in the circuit timing would be due to even that small amount of variation.
Hopefully, this shows you how. If you are using .SUBCKT
/.ENDS
models, the same thing applies. But you can also include parameters into these that can then be used with specific parts within the sub-circuit. It all just works fine.
(I didn't use resistor or capacitor tolerances here. This is just to demonstrate how to modify active device parameters. Not to exhibit this circuit, in particular. It's just an example to make a point.)
The device parameters for the BSS123 exist in the standard library file. But they may just as well have come from any library file you might include. You will need to write your own model statement, of course. But the ako:
allows you to pull in all the library parameters that you don't want to vary. So it's really easy to vary only the parameters you want to modify.
added
Here's an example. It includes two separate current sources that help to show what's going on (should be only integer currents.) Meanwhile, I've set up the two BJTs to grab up (possibly) two different models for the purposes of showing the behavior of a differential amplifier (long-tailed pair.) This produces different models (sometimes) for the two different BJTs. So it can be used to show a range of behaviors.
.model
statement so themc()
function could be evaluated independently for each MOSFET. Something like this: i.sstatic.net/Hrz97yOy.png \$\endgroup\$.lib
files. I'll have to put in some more research first before I can draft a good answer. \$\endgroup\$