|
发表于 2014-8-6 17:13:57
|
显示全部楼层
hspice examples
beta.sp
* beta.sp
* level 2 beta optimization
*
*.. optimize ib vs ie, (practically the same as optimizing beta vs ic)
*.. bf,ikf,nkf,ise,ne
*
*.. print: betam, betad vs icm or icd
*
*.. note: bf turns out to be much higher than max beta.
*.. bf is actually a weak parameter is this example, because
*.. high-current and low-current roll-off regions have merged
.option kcltest=0
.option nomod vntol=1e-12 reli=1e-4 relv=1e-4 gmindc=1e-14
+ post
.model optmod opt relin=1e-4 grad=1e-5 close=10 cut=2
+ cendif=1e-6 relout=1e-4 max=1e6
+ itropt=15
* common base circuit, forcing ie and vbc
vc1 0 c1 vbc1
vs1 s1 0 vsb1
iie1 e1 0 "ib1+ic1"
q1 c1 0 e1 s1 npn1
.model npn1 npn level=2
+ eg = 1.1 af=1 xcjc=0.95 subs=1
+ cjs=0.5p tf=1u itf=1m vtf=20 xtf=1.0e-01
+ tr=1u cje=1.2e-12 cjc=0.3p fc=0.9 mje=0.5 mjc=0.5
+ rb=rb rbm=rbm irb=irb
+ bf=bf ikf=ikf nkf=nkf
+ vaf=vaf
+ is=is ise=ise
+ rc=rc re=re
+ nf=nf ne=ne
+ br=1 ikr=1m var=10
+ iss=1e-17 brs=20
.param
+ bf=opt1(450,10,800)
+ ise=opt1(1e-17,1e-18,1e-16)
+ ne=opt1(1.15,1.10,1.5)
+ ikf=opt1(1m,10u,10m)
+ nkf=opt1(0.5,0.3,0.7)
+ vaf=100
+ re=5 rc=70 rb=100 rbm=10 irb=100u
+ is=3.0928e-16
+ nf=1.0184
* optimization using circuits 1,3
.dc data=dat1 sweep optimize=opt1
+ results=errb model=optmod
* beta error, ie forced
.meas dc errb err1 par(ib1) i2(q1)
* print-back, same as opt
.dc data=dat1
.print icm=par('i1(q1)') icd=par(ic1)
+ betam=par('i1(q1)/i2(q1)') betad=par('par(ic1)/par(ib1)')
.data dat1
vbe1 vbc1 ic1 ib1 vsb1 is1
0.48 -2.00 1.7338e-06 9.9448e-09 -5.00 9.9448e-09
0.50 -2.00 3.3684e-06 1.8730e-08 -5.00 1.8730e-08
0.52 -2.00 6.5428e-06 3.5076e-08 -5.00 3.5076e-08
0.54 -2.00 1.2652e-05 6.5198e-08 -5.00 6.5198e-08
0.56 -2.00 2.4450e-05 1.2070e-07 -5.00 1.2070e-07
0.58 -2.00 4.7040e-05 2.2264e-07 -5.00 2.2264e-07
0.60 -2.00 8.9598e-05 4.0884e-07 -5.00 4.0884e-07
0.62 -2.00 1.6920e-04 7.5054e-07 -5.00 7.5054e-07
0.64 -2.00 3.1084e-04 1.3622e-06 -5.00 1.3622e-06
0.66 -2.00 5.4988e-04 2.4304e-06 -5.00 2.4304e-06
0.68 -2.00 9.2706e-04 4.2354e-06 -5.00 4.2354e-06
0.70 -2.00 1.4734e-03 7.1378e-06 -5.00 7.1378e-06
0.72 -2.00 2.1940e-03 1.1550e-05 -5.00 1.1550e-05
0.74 -2.00 3.0646e-03 1.7992e-05 -5.00 1.7992e-05
0.76 -2.00 4.0358e-03 2.7142e-05 -5.00 2.7142e-05
0.78 -2.00 5.0692e-03 3.9746e-05 -5.00 3.9746e-05
0.80 -2.00 6.1632e-03 5.6590e-05 -5.00 5.6590e-05
0.82 -2.00 7.3108e-03 7.8304e-05 -5.00 7.8304e-05
0.84 -2.00 8.5092e-03 1.0542e-04 -5.00 1.0542e-04
0.86 -2.00 9.7526e-03 1.3844e-04 -5.00 1.3844e-04
0.88 -2.00 1.1040e-02 1.7808e-04 -5.00 1.7808e-04
0.90 -2.00 1.2362e-02 2.2452e-04 -5.00 2.2452e-04
.enddata
.end |
|