Compare commits

...

2 Commits

Author SHA1 Message Date
dwarning 600ff13796 Revert "Remove instance parameter temp. To specify offset to ambient temperature use dtemp instead."
This reverts commit 3340df46ca.
2025-10-26 08:34:34 +01:00
dwarning ddfb52d134 Revert "correct and simplify temp derivatives"
This reverts commit a6590d354f.
2025-10-26 08:33:58 +01:00
7 changed files with 28 additions and 23 deletions

View File

@ -16,6 +16,7 @@ IFparm VDMOSpTable[] = { /* parameters */
IP("off", VDMOS_OFF, IF_FLAG, "Device initially off"),
IOPU("icvds", VDMOS_IC_VDS, IF_REAL, "Initial D-S voltage"),
IOPU("icvgs", VDMOS_IC_VGS, IF_REAL, "Initial G-S voltage"),
IOPU("temp", VDMOS_TEMP, IF_REAL, "Instance temperature"),
IOPU("dtemp", VDMOS_DTEMP, IF_REAL, "Instance temperature difference"),
IP( "ic", VDMOS_IC, IF_REALVEC, "Vector of D-S, G-S voltages"),

View File

@ -23,6 +23,9 @@ VDMOSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
NG_IGNORE(select);
switch(which) {
case VDMOS_TEMP:
value->rValue = here->VDMOStemp - CONSTCtoK;
return(OK);
case VDMOS_DTEMP:
value->rValue = here->VDMOSdtemp;
return(OK);

View File

@ -148,6 +148,7 @@ typedef struct sVDMOSinstance {
int VDMOSmode; /* device mode : 1 = normal, -1 = inverse */
unsigned VDMOSoff:1; /* non-zero to indicate device is off for dc analysis*/
unsigned VDMOStempGiven :1; /* instance temperature specified */
unsigned VDMOSdtempGiven :1; /* instance delta temperature specified */
unsigned VDMOSmGiven :1;
unsigned VDMOSdNodePrimeSet :1;
@ -346,10 +347,10 @@ typedef struct sVDMOSmodel { /* model structure for a resistor */
double VDMOSgateResistance;
double VDMOSqsResistance;
double VDMOSqsVoltage;
double VDMOStransconductance; /* input - use tTransconductance */
double VDMOStransconductance; /* input - use tTransconductance */
double VDMOSoxideCapFactor;
double VDMOSvth0; /* input - use tVth */
double VDMOSphi; /* input - use tPhi */
double VDMOSvth0; /* input - use tVth */
double VDMOSphi; /* input - use tPhi */
double VDMOSlambda;
double VDMOStheta;
double VDMOSfNcoef;
@ -365,10 +366,10 @@ typedef struct sVDMOSmodel { /* model structure for a resistor */
double VDMOSrds;
/* body diode */
double VDIOjunctionCap; /* input - use tCj */
double VDIOjunctionPot; /* input - use tJctPot */
double VDIOjunctionCap; /* input - use tCj */
double VDIOjunctionPot; /* input - use tJctPot */
double VDIOdepletionCapCoeff;
double VDIOjctSatCur; /* input - use tSatCur */
double VDIOjctSatCur; /* input - use tSatCur */
double VDIObv;
double VDIOibv;
double VDIObrkdEmissionCoeff;
@ -497,6 +498,7 @@ enum {
VDMOS_CG,
VDMOS_CS,
VDMOS_POWER,
VDMOS_TEMP,
VDMOS_M,
VDMOS_DTEMP,
VDMOS_THERMAL,

View File

@ -296,22 +296,16 @@ VDMOSload(GENmodel *inModel, CKTcircuit *ckt)
/* Calculate temperature dependent values for self-heating effect */
if (selfheat) {
Beta = here->VDMOStTransconductance;
dBeta_dT = model->VDMOStransconductance * here->VDMOSm
* model->VDMOSmu * pow(Temp/model->VDMOStnom, model->VDMOSmu) / Temp;
rd0T = here->VDMOSdrainResistance;
if (model->VDMOStexp0Given)
drd0T_dT = model->VDMOSdrainResistance / here->VDMOSm
* model->VDMOStexp0 * pow(Temp/model->VDMOStnom, model->VDMOStexp0) / Temp;
else
drd0T_dT = model->VDMOSdrainResistance / here->VDMOSm
* (model->VDMOStrd1 + 2 * model->VDMOStrd2 * (Temp - model->VDMOStnom));
double TempRatio = Temp / here->VDMOStemp;
Beta = here->VDMOStTransconductance * pow(TempRatio,model->VDMOSmu);
dBeta_dT = Beta * model->VDMOSmu / Temp;
rd0T = here->VDMOSdrainResistance * pow(TempRatio, model->VDMOStexp0);
drd0T_dT = rd0T * model->VDMOStexp0 / Temp;
rd1T = 0.0;
drd1T_dT = 0.0;
if (model->VDMOSqsGiven) {
rd1T = here->VDMOSqsResistance;
drd1T_dT = model->VDMOSqsResistance / here->VDMOSm
* model->VDMOStexp1 * pow(Temp/model->VDMOStnom, model->VDMOStexp1) / Temp;
rd1T = here->VDMOSqsResistance * pow(TempRatio, model->VDMOStexp1);
drd1T_dT = rd1T * model->VDMOStexp1 / Temp;
}
} else {
Beta = here->VDMOStTransconductance;

View File

@ -30,6 +30,10 @@ VDMOSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
scale = 1;
switch (param) {
case VDMOS_TEMP:
here->VDMOStemp = value->rValue+CONSTCtoK;
here->VDMOStempGiven = TRUE;
break;
case VDMOS_DTEMP:
here->VDMOSdtemp = value->rValue;
here->VDMOSdtempGiven = TRUE;

View File

@ -304,10 +304,6 @@ VDMOSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt,
here->VDIOconductance = 0.0;
}
if (!here->VDMOSdtempGiven) here->VDMOSdtemp = 0.0;
here->VDMOStemp = ckt->CKTtemp + here->VDMOSdtemp;
if (model->VDMOSdrainResistance > 0) {
if (here->VDMOSdNodePrime == 0) {
error = CKTmkVolt(ckt, &tmp, here->VDMOSname, "drain");

View File

@ -191,6 +191,11 @@ VDMOStemp(GENmodel *inModel, CKTcircuit *ckt)
/* loop through all the instances */
for(here=VDMOSinstances(model);here;here=VDMOSnextInstance(here)) {
if(!here->VDMOSdtempGiven) here->VDMOSdtemp = 0.0;
if(!here->VDMOStempGiven)
here->VDMOStemp = ckt->CKTtemp + here->VDMOSdtemp;
VDMOStempUpdate(model, here, here->VDMOStemp, ckt);
} /* instance */