Electronic – Using the .step command to step a parameter of a transistor model in LTspice

ltspice

I read this document and I want to step the β parameter of a transistor for the below circuit(to see it bigger please left-click on the image below):

enter image description here

Here is the model of the transistor and BF is the β:

.model MyBJT NPN(IS=1E-14 VAF=100 BF=100 IKF=0.3 XTB=1.5 BR=3
CJC=8E-12 CJE=25E-12 TR=100E-9 TF=400E-12 ITF=1 VTF=2 XTF=3 RB=10
RC=.3 RE=.2 Vceo=30 Icrating=800m mfg=NXP)

Then in the above line I change BF to {BF}

And step BF as follows:

.step param BF 10 500 50

and then

.tran 1

But I'm not getting many plots just one.

Am I doing something wrong? Is it even possible what I'm trying to do? Is there a way?

Best Answer

Jramsay42 is correct.

See the help to .STEP:

.STEP -- Parameter Sweeps This command causes an analysis to be repeatedly performed while stepping the temperature, a model parameter, a global parameter, or an independent source. Steps may be linear, logarithmic, or specified as a list of values.

Example: .step oct v1 1 20 5

Step independent voltage source V1 from 1 to 20 logarithmically with 5 points per octave.

Example: .step I1 10u 100u 10u

Step independent current source I1 from 10u to 100u in step increments of 10u.

Example: .step param RLOAD LIST 5 10 15

Perform the simulation three times with global parameter Rload being 5, 10 and 15.

Example: .step NPN 2N2222(VAF) 50 100 25

Step NPN model parameter VAF from 50 to 100 in steps of 25.

Example: .step temp -55 125 10

Step the temperature from -55°C to 125°C in 10-degree step. Step sweeps may be nested up to three levels deep.

Which works as you expect it. You also don't have to replace the value of your model by {BF} in that case, it will just overwrite the value of the model.

Related Topic