SPICE newbie question

Hi,

I want to know how to vary a parameter inside a model and get the results in one run (one simulation). I've given a simple circuit below that I would also want to do .TRAN and .AC analysis on. (Like run an AC response for three transistor values of Bf.) I've managed to do .TEMP parameterization, but I can't figure out how to do something like Bf.

For the purpose of example, what syntax would I add to parameterize the Beta_forward (Bf) to values of 50, 125, and 300? (The model is the one that comes with LTSPICE, BTW.)

I have been trying to learn on the latest version LTSPICE, if that matters.

Thanks, Pete

Here is an example circuit:

---------------------------

2n3904_00
  • Vcc
  • .-----.
  • | |
  • ---V1 |
  • - 5V .-.
  • | | |R1
  • === | |2k7
  • GND '-'
  • |
  • .-----o
  • | |
  • .-. |Vc
  • | |R3 |
  • | |13k |
  • '-' |
  • |Vb |/ 2n3904
  • o---| Q1
  • | |>
  • .-. |
  • | |R2 |
  • | |6k8 |
  • '-' |
  • | |
  • '-----o
  • |
  • ===
  • GND
* * *(created by AACircuit v1.28.6 beta 04/19/05
formatting link

Q1 Vc Vb 0 0 2N3904 R1 Vcc Vc 2.7k R2 Vb 0 6.8k R3 Vc Vb 13k V1 Vcc 0 5 .model 2N3904 NPN (

+IS=1E-14 +VAF=100 +Bf=300 +IKF=0.4 +XTB=1.5 +BR=4 +CJC=4E-12 +CJE=8E-12 +RB=20 +RC=0.1 +RE=0.1 +TR=250E-9 +TF=350E-12 +ITF=1 +VTF=2 +XTF=3 +Vceo=40 +Icrating=200m +mfg=Philips +) .op .end
Reply to
Pete Clark
Loading thread data ...

Others are more familiar with it but if you stick the text ... ".STEP NPN 2N3904 (BF) LIST 50 100 300" somewhere on the circuit, then 3 superimposed runs will be made.

Or do ".STEP NPN 2N3904 (BF) 50 850 10" and 80 runs will made, from 50 to

850, in steps of 10. john
Reply to
John Jardine.

"Pete Clark" schrieb im Newsbeitrag news: snipped-for-privacy@dope.net...

Hello Pete,

There is an example with parameter variation in the directory "examples" of LTspice. ....\\examples\\Eucational\\stepmodelparam.asc

The syntax for the .step command line

-------------------------------------- Example for Bf = 50 to 100 step 25

.step NPN 2N2222(Bf) 50 100 25

Example for Bf = 50, 125, 300

.step NPN 2N2222(Bf) list 50 125 300

In the future you should better share your schematic file (.asc). Just copy the contents of your schematic file (.asc) into your message. It's pure ASCII text.

Best regards, Helmut

The Yahoo group with a lot of circuit examples.

formatting link

Reply to
Helmut Sennewald

Thanks so much to you and John. I really appreciate it!

Reply to
Pete Clark

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.