I came up with a model for the BAV21. Most of the extraction was done by grabbing the I-V and C-V plot data using the Engauge Digitizer software and fitting the data using the Excel solver. LTspice uses the same model as PSPICE for high-level injection, but in trying to fit the parameters, both manual tweaking and using the Excel solver yielded nonsense results. I finally ended up modeling the high-current behavior using a series resistor, which worked fine.
Reverse current doesn't fit the data sheets all that well. At the reverse breakdown voltage of 250V, the reverse current is 100uA like the datasheet says. I also used NBV to match the reverse current to the datasheet at 220V. But for reverse voltages less than that, the simulated reverse current goes back to Is rapidly, unlike what the datasheet indicates. I was too lazy to try to work IBVL and NBVL into the model. LTspice supports these PSPICE parameters, although this fact is not documented. I don't consider the reverse current behavior all that important as it's quite small.
To determine TT, I set up a simulation of the reverse recovery time and tweaked TT to match the simulated reverse recovery time to the datasheet value. I found out that the manufacturers use test setups specified in a JEDEC spec, JESD282-B. That spec can be downloaded from the JEDEC site, but requires registration, so I can't link to it. My sim used the circuit in Test Condition A for reverse recovery as called out in the JEDEC spec. I have two sets of parameters for CJO and TT. One covers the typical behavior and the other worst case. Here's the model.
.MODEL BAV21 d
+IS=7.294112E-09 RS=0.706 N=1.904350
+BV=250 IBV=100e-6 NBV=145.396351
+VJ=0.666016 M=0.084417
* Typical capacitance and reverse recovery time
* Trr = 26ns
+CJO=1.172445e-12 TT=36.5e-9
* Worst case capacitance and reverse recovery time
* Trr = 50 ns
*+CJO=5.0e-12 TT=68.1e-9
Reverse current doesn't fit the data sheets all that well. At the reverse breakdown voltage of 250V, the reverse current is 100uA like the datasheet says. I also used NBV to match the reverse current to the datasheet at 220V. But for reverse voltages less than that, the simulated reverse current goes back to Is rapidly, unlike what the datasheet indicates. I was too lazy to try to work IBVL and NBVL into the model. LTspice supports these PSPICE parameters, although this fact is not documented. I don't consider the reverse current behavior all that important as it's quite small.
To determine TT, I set up a simulation of the reverse recovery time and tweaked TT to match the simulated reverse recovery time to the datasheet value. I found out that the manufacturers use test setups specified in a JEDEC spec, JESD282-B. That spec can be downloaded from the JEDEC site, but requires registration, so I can't link to it. My sim used the circuit in Test Condition A for reverse recovery as called out in the JEDEC spec. I have two sets of parameters for CJO and TT. One covers the typical behavior and the other worst case. Here's the model.
.MODEL BAV21 d
+IS=7.294112E-09 RS=0.706 N=1.904350
+BV=250 IBV=100e-6 NBV=145.396351
+VJ=0.666016 M=0.084417
* Typical capacitance and reverse recovery time
* Trr = 26ns
+CJO=1.172445e-12 TT=36.5e-9
* Worst case capacitance and reverse recovery time
* Trr = 50 ns
*+CJO=5.0e-12 TT=68.1e-9