added the needed derivatives in acload

This commit is contained in:
mariok 2020-08-27 11:31:09 +02:00
parent 7180384ef3
commit f6381ece57
1 changed files with 21 additions and 6 deletions

View File

@ -217,11 +217,6 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
Ixf_Vxf = *(ckt->CKTstate0 + here->HICUMixf_Vxf); Ixf_Vxf = *(ckt->CKTstate0 + here->HICUMixf_Vxf);
Ixf_Vrth = *(ckt->CKTstate0 + here->HICUMixf_Vrth); Ixf_Vrth = *(ckt->CKTstate0 + here->HICUMixf_Vrth);
// correlated_noise
In1_Vn1 = *(ckt->CKTstate0 + here->HICUMin1_Vn1);
In1_Vn2 = *(ckt->CKTstate0 + here->HICUMin1_Vn2);
In2_Vn2 = *(ckt->CKTstate0 + here->HICUMin2_Vn2);
//////////////////////////////////// ////////////////////////////////////
////////// The real part ///////// ////////// The real part /////////
//////////////////////////////////// ////////////////////////////////////
@ -355,9 +350,17 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
if (correlated_noise) { if (correlated_noise) {
//In1 //In1
*(here->HICUMn1N1Ptr) += +In1_Vn1; *(here->HICUMn1N1Ptr) += +In1_Vn1;
*(here->HICUMn1N2Ptr) += +In1_Vn2;
*(here->HICUMBaseBIN1Ptr) += +Ibiei_Vn1;
*(here->HICUMEmitEIN1Ptr) += -Ibiei_Vn1;
//In2 //In2
*(here->HICUMn2N2Ptr) += +In2_Vn2; *(here->HICUMn2N2Ptr) += +In2_Vn2;
*(here->HICUMBaseBIN2Ptr) += +Ibiei_Vn2;
*(here->HICUMEmitEIN2Ptr) += -Ibiei_Vn2;
*(here->HICUMCollCIN2Ptr) += +Iciei_Vn2;
*(here->HICUMEmitEIN2Ptr) += -Iciei_Vn2;
} }
//////////////////////////////////// ////////////////////////////////////
////////// The complex part ////// ////////// The complex part //////
@ -641,6 +644,18 @@ HICUMacLoad(GENmodel *inModel, CKTcircuit *ckt)
} }
if (correlated_noise) {
//In1
*(here->HICUMBaseBIN1Ptr) += +XQbiei_Vn1;
*(here->HICUMEmitEIN1Ptr) += -XQbiei_Vn1;
//In2
*(here->HICUMBaseBIN2Ptr) += +XQbiei_Vn2;
*(here->HICUMEmitEIN2Ptr) += -XQbiei_Vn2;
*(here->HICUMCollCIN2Ptr) += +XQciei_Vn2;
*(here->HICUMEmitEIN2Ptr) += -XQciei_Vn2;
}
} }
} }
return(OK); return(OK);