How to step parameters of a diode model

I’m trying to step the RS (series resistance) for a diode and can’t seem to get it working. I can do it in LTspice with no problem. What is the easiest way to do this. The .model for this diode is:

.MODEL D1n4007 d
+IS=7.02767e-09 RS=0.0341512 N=1.80803 EG=1.05743
+XTI=5 BV=1000 IBV=5e-08 CJO=1e-11
+VJ=0.7 M=0.5 FC=0.5 TT=1e-07
+KF=0 AF=1

I tried .step param RS list 0.03 0.1 0.5
The simulation runs without error, but does not give 3 different plots for current through the diode.
What’s the secret?

You sure you can step in LTspice without modifying RS in .model statement?


So for every parameter I want to sweep, I must set it equal to itself ?? Why is this?

I can only put on image at a time (new user).
Here’s the result:

Wow, I didn’t realize LTspice had this .step syntax. I’m not sure if Qspice has implemented something similar, but this example provides an alternative approach that you can consider by adding an extra .model with ako.

diode_step (ako).qsch (2.0 KB)

With this method, you can modify or step parameters, or even step different models. I hope this can be helpful.

Yes that is helpful, thanks very much!

just to be sure; when we over-write the value for RS in this case, does that force all other parameters to go to default values?
That stepping different models is very powerful, is this normal spice syntax or just for Qspice?

Above I show example with .step RS by modifying .model RS=RS and .model with ako. As you can see, both simulations yield the same results. This indicates that ako will only override the specified parameters while keeping all others at their .model values.

ako is undocumented in LTspice. go to LTwiki and search ako (near bottom of page), and I learnt this from there.
Undocumented LTspice - LTwiki-Wiki for LTspice