NKF beta rolloff
This commit is contained in:
parent
c7763a6e83
commit
afa8786972
|
|
@ -204,7 +204,8 @@ IFparm BJTmPTable[] = { /* model parameters */
|
|||
IOP("tmjs1",BJT_MOD_TMJS1, IF_REAL, "MJS 1. temperature coefficient"),
|
||||
IOP("tmjs2",BJT_MOD_TMJS2, IF_REAL, "MJS 2. temperature coefficient"),
|
||||
IOP("tns1", BJT_MOD_TNS1, IF_REAL, "NS 1. temperature coefficient"),
|
||||
IOP("tns2", BJT_MOD_TNS2, IF_REAL, "NS 2. temperature coefficient")
|
||||
IOP("tns2", BJT_MOD_TNS2, IF_REAL, "NS 2. temperature coefficient"),
|
||||
IOP("nkf", BJT_MOD_NKF, IF_REAL, "NKF High current beta rolloff exponent")
|
||||
};
|
||||
|
||||
char *BJTnames[] = {
|
||||
|
|
|
|||
|
|
@ -430,6 +430,7 @@ typedef struct sBJTmodel { /* model structure for a bjt */
|
|||
double BJTtmjs2;
|
||||
double BJTtns1;
|
||||
double BJTtns2;
|
||||
double BJTnkf;
|
||||
double BJTinvEarlyVoltF; /* inverse of BJTearlyVoltF */
|
||||
double BJTinvEarlyVoltR; /* inverse of BJTearlyVoltR */
|
||||
double BJTinvRollOffF; /* inverse of BJTrollOffF */
|
||||
|
|
@ -541,6 +542,7 @@ typedef struct sBJTmodel { /* model structure for a bjt */
|
|||
unsigned BJTtmjs2Given : 1;
|
||||
unsigned BJTtns1Given : 1;
|
||||
unsigned BJTtns2Given : 1;
|
||||
unsigned BJTnkfGiven : 1;
|
||||
} BJTmodel;
|
||||
|
||||
#ifndef NPN
|
||||
|
|
@ -671,6 +673,7 @@ typedef struct sBJTmodel { /* model structure for a bjt */
|
|||
#define BJT_MOD_TNS1 198
|
||||
#define BJT_MOD_TNS2 199
|
||||
#define BJT_MOD_SUBS 200
|
||||
#define BJT_MOD_NKF 100
|
||||
|
||||
/* device questions */
|
||||
#define BJT_QUEST_FT 201
|
||||
|
|
|
|||
|
|
@ -478,10 +478,19 @@ next1: vtn=vt*here->BJTtemissionCoeffF;
|
|||
q2=oik*cbe+oikr*cbc;
|
||||
arg=MAX(0,1+4*q2);
|
||||
sqarg=1;
|
||||
if(arg != 0) sqarg=sqrt(arg);
|
||||
if(!model->BJTnkfGiven) {
|
||||
if(arg != 0) sqarg=sqrt(arg);
|
||||
} else {
|
||||
if(arg != 0) sqarg=pow(arg,model->BJTnkf);
|
||||
}
|
||||
qb=q1*(1+sqarg)/2;
|
||||
dqbdve=q1*(qb*here->BJTtinvEarlyVoltR+oik*gbe/sqarg);
|
||||
dqbdvc=q1*(qb*here->BJTtinvEarlyVoltF+oikr*gbc/sqarg);
|
||||
if(!model->BJTnkfGiven) {
|
||||
dqbdve=q1*(qb*here->BJTtinvEarlyVoltR+oik*gbe/sqarg);
|
||||
dqbdvc=q1*(qb*here->BJTtinvEarlyVoltF+oikr*gbc/sqarg);
|
||||
} else {
|
||||
dqbdve=q1*(qb*here->BJTtinvEarlyVoltR+oik*gbe*2*sqarg*model->BJTnkf/arg);
|
||||
dqbdvc=q1*(qb*here->BJTtinvEarlyVoltF+oikr*gbc*2*sqarg*model->BJTnkf/arg);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* weil's approx. for excess phase applied with backward-
|
||||
|
|
|
|||
|
|
@ -357,6 +357,9 @@ BJTmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value)
|
|||
case BJT_MOD_TNS2:
|
||||
value->rValue = here->BJTtns2;
|
||||
return(OK);
|
||||
case BJT_MOD_NKF:
|
||||
value->rValue = here->BJTnkf;
|
||||
return(OK);
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,6 +426,10 @@ BJTmParam(int param, IFvalue *value, GENmodel *inModel)
|
|||
mods->BJTtns2 = value->rValue;
|
||||
mods->BJTtns2Given = TRUE;
|
||||
break;
|
||||
case BJT_MOD_NKF:
|
||||
mods->BJTnkf = value->rValue;
|
||||
mods->BJTnkfGiven = TRUE;
|
||||
break;
|
||||
default:
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,6 +296,14 @@ BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
if(!model->BJTtns2Given) {
|
||||
model->BJTtns2 = 0.0;
|
||||
}
|
||||
if(!model->BJTnkfGiven) {
|
||||
model->BJTnkf = 0.5;
|
||||
} else {
|
||||
if (model->BJTnkf > 1.0) {
|
||||
printf("Warning: NKF has been set to its maximum value: 1.0\n");
|
||||
model->BJTnkf = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* COMPATABILITY WARNING!
|
||||
|
|
|
|||
Loading…
Reference in New Issue