Browse Source

* bjtdset.c: reformatted.

pre-master-46
arno 26 years ago
parent
commit
37fe87bb96
  1. 8
      src/spicelib/devices/bjt/ChangeLog
  2. 50
      src/spicelib/devices/bjt/bjtdset.c

8
src/spicelib/devices/bjt/ChangeLog

@ -1,8 +1,12 @@
1999-09-07 Arno <A.W.Peters@ieee.org>
2000-09-02 Arno W. Peters <A.W.Peters@ieee.org>
* bjtdset.c: reformatted
1999-09-07 Arno W. Peters <A.W.Peters@ieee.org>
* bjtnoise.c: removed unused variable `error'.
1999-09-06 Arno Peters <A.W.Peters@ieee.org>
1999-09-06 Arno W. Peters <A.W.Peters@ieee.org>
* bjtnoise.c: Reformatted comment.

50
src/spicelib/devices/bjt/bjtdset.c

@ -193,36 +193,32 @@ for( ; model != NULL; model = model->BJTnextModel ) {
/* ic = f1(vbe,vbc,vbed) + f2(vbc) + f3(vbc)
*
* we shall calculate the taylor coeffs of
* ic wrt vbe, vbed, and vbc and store them away.
* the equations f1 f2 and f3 are given elsewhere;
* we shall start off with f1, compute
* derivs. upto third order and then do f2 and
* f3 and add their derivatives.
* we shall calculate the taylor coeffs of ic wrt vbe,
* vbed, and vbc and store them away. the equations f1 f2
* and f3 are given elsewhere; we shall start off with f1,
* compute derivs. upto third order and then do f2 and f3
* and add their derivatives.
*
* Since f1 above is a function of three variables, it
* will be convenient to use derivative structures
* to compute the derivatives of f1. For this
* computation, p=vbe, q=vbc, r=vbed.
* will be convenient to use derivative structures to
* compute the derivatives of f1. For this computation,
* p=vbe, q=vbc, r=vbed.
*
* ib = f1(vbe) + f2(vbc) (not the same f's as
* above, in case you are
* wondering!)
* the gbe's gbc's gben's and gbcn's are
* convenient subsidiary variables.
* ib = f1(vbe) + f2(vbc) (not the same f's as above, in
* case you are wondering!) the gbe's gbc's gben's and
* gbcn's are convenient subsidiary variables.
*
* irb = f(vbe, vbc, vbb) - the vbe & vbc dependencies
* arise from the qb term.
*
* irb = f(vbe, vbc, vbb) - the vbe & vbc
* dependencies arise from the
* qb term.
* qbe = f1(vbe,vbc) + f2(vbe)
*
* derivative structures will be used again in the
* above two equations. p=vbe, q=vbc, r=vbb.
* derivative structures will be used again in the above
* two equations. p=vbe, q=vbc, r=vbb.
*
* qbc = f(vbc) ; qbx = f(vbx)
*
* qss = f(vsc)
*/
* qss = f(vsc) */
/*
* determine dc current and derivitives
*/
@ -293,9 +289,11 @@ for( ; model != NULL; model = model->BJTnextModel ) {
d_dummy.value = dummy;
d_dummy.d1_p = - model->BJTinvEarlyVoltR;
d_dummy.d1_q = - model->BJTinvEarlyVoltF;
/* q1 = 1/dummy */
InvDeriv(&d_q1, &d_dummy); /* now q1 and its derivatives are
set up */
InvDeriv(&d_q1, &d_dummy);
/* now q1 and its derivatives are set up */
if(oik == 0 && oikr == 0) {
qb=q1;
EqualDeriv(&d_qb, &d_q1);
@ -393,7 +391,8 @@ d_ic.d3_q3 -= gbc3/here->BJTtBetaR + gbcn3;
DivDeriv(&d_z, &d_dummy2, &d_dummy);
TanDeriv(&d_tanz, &d_z);
/*now using dummy = tanz - z and dummy2 = z*tanz*tanz */
/* now using dummy = tanz - z and dummy2 =
z*tanz*tanz */
TimesDeriv(&d_dummy, &d_z, -1.0);
PlusDeriv(&d_dummy, &d_dummy, &d_tanz);
@ -406,7 +405,8 @@ d_ic.d3_q3 -= gbc3/here->BJTtBetaR + gbcn3;
MultDeriv(&d_vbb, &d_rbb, &d_p);
/* power series inversion to get the conductance derivatives */
/* power series inversion to get the
conductance derivatives */
if (d_vbb.d1_p != 0) {
gbb1 = 1/d_vbb.d1_p;

Loading…
Cancel
Save