* bjtdset.c: reformatted.

This commit is contained in:
arno 2000-09-01 23:17:27 +00:00
parent 2462eb7b01
commit 37fe87bb96
2 changed files with 412 additions and 408 deletions

View File

@ -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'. * 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. * bjtnoise.c: Reformatted comment.

View File

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