introduce rcxxx limiting as long as adms can't node collapsing

This commit is contained in:
dwarning 2017-08-14 12:51:10 +02:00
parent 4ac345fb29
commit c0013df2e7
3 changed files with 126 additions and 75 deletions

View File

@ -28,32 +28,38 @@ begin // Currents and charges
in case of vanishing resistance corresponding node in case of vanishing resistance corresponding node
is not addressed: */ is not addressed: */
if (RCBLX > 0.0) `ifdef insideADMS
begin //dw we have limited all the RCXXX to MIN_R
if (RCBLI > 0.0) Vc4c1 = TYPE * V(c4, c1);
begin Vc3c4 = TYPE * V(c3, c4);
Vc4c1 = TYPE * V(c4, c1); `else
Vc3c4 = TYPE * V(c3, c4); if (RCBLX > 0.0)
end begin
else if (RCBLI > 0.0)
begin begin
Vc4c1 = 0 ; Vc4c1 = TYPE * V(c4, c1);
Vc3c4 = TYPE * V(c3, c1); Vc3c4 = TYPE * V(c3, c4);
end end
end else
else begin
begin Vc4c1 = 0 ;
if (RCBLI > 0.0) Vc3c4 = TYPE * V(c3, c1);
begin end
Vc4c1 = TYPE * V(c4, c1); end
Vc3c4 = 0 ; else
end begin
else if (RCBLI > 0.0)
begin begin
Vc4c1 = 0 ; Vc4c1 = TYPE * V(c4, c1);
Vc3c4 = 0 ; Vc3c4 = 0 ;
end end
end else
begin
Vc4c1 = 0 ;
Vc3c4 = 0 ;
end
end
`endif
Vb1c4 = Vb1b2 + Vb2c2 - Vc1c2 - Vc4c1 ; Vb1c4 = Vb1b2 + Vb2c2 - Vc1c2 - Vc4c1 ;
Vcc3 = - Vbc + Vbb1 + Vb1c4 - Vc3c4 ; Vcc3 = - Vbc + Vbb1 + Vb1c4 - Vc3c4 ;
@ -137,7 +143,7 @@ Vsc3 = Vsc4 - Vc3c4 ;
end else begin end else begin
Iqs = 0.0 ; Iqs = 0.0 ;
p0star = 2.0 * eVb2c2VDC / (1.0 + K0); p0star = 2.0 * eVb2c2VDC / (1.0 + K0);
eVb2c2star = eVb2c2; eVb2c2star = eVb2c2;
if ((abs(Vc1c2) < 1.0e-5 * Vt) || if ((abs(Vc1c2) < 1.0e-5 * Vt) ||
@ -257,9 +263,9 @@ Vsc3 = Vsc4 - Vc3c4 ;
// nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram // nBex since MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram
nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1)); nBex = (g1 - If0) / (1.0 + sqrt(1.0 + g1));
pWex = g2 / (1.0 + sqrt(1.0 + g2)); pWex = g2 / (1.0 + sqrt(1.0 + g2));
/* Iex until and including MXT 504.9: // Iex until and including MXT 504.9:
Iex = (1.0 / BRI_T) * (0.5 * IK_TM * nBex - IS_TM); // Iex = (1.0 / BRI_T) * (0.5 * IK_TM * nBex - IS_TM);
*/ //
// Iex since MXT 504.10: RvdT@TUDelft Q1, 2011: // Iex since MXT 504.10: RvdT@TUDelft Q1, 2011:
Iex = IK_TM * nBex / (2.0 * BRI_T) ; Iex = IK_TM * nBex / (2.0 * BRI_T) ;
@ -295,7 +301,7 @@ if (ICSS < 0.0)
XIsub = 0.0; XIsub = 0.0;
`endif `endif
/* begin: RvdT, Q4 2012, Mextram 504.11: added EXMOD=2 option: */ // begin: RvdT, Q4 2012, Mextram 504.11: added EXMOD=2 option:
if (EXMOD == 1 || EXMOD == 2) if (EXMOD == 1 || EXMOD == 2)
begin begin
@ -310,9 +316,9 @@ if (ICSS < 0.0)
// XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1)); // XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1));
// XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram: // XnBex in MXT 504.10.1: Ackn. Jos Peters, Geoffrey Coram:
XnBex = (Xg1 - If0) / (1.0 + sqrt(1.0 + Xg1)); XnBex = (Xg1 - If0) / (1.0 + sqrt(1.0 + Xg1));
/* XIMex until and including MXT 504.9: // XIMex until and including MXT 504.9:
XIMex = XEXT * (0.5 * IK_TM * XnBex - IS_TM) / BRI_T; // XIMex = XEXT * (0.5 * IK_TM * XnBex - IS_TM) / BRI_T;
*/ //
// XIMex in MXT 504.10: RvdT@TUDelft Q1, 2011: // XIMex in MXT 504.10: RvdT@TUDelft Q1, 2011:
XIMex = XEXT * 0.5 * IK_TM * XnBex / BRI_T; XIMex = XEXT * 0.5 * IK_TM * XnBex / BRI_T;
@ -592,47 +598,58 @@ This construct supports the case
RCBLI = 0.0 and or RCBLX = 0.0 . RCBLI = 0.0 and or RCBLX = 0.0 .
It is up to the compiler to adjust the circuit topology It is up to the compiler to adjust the circuit topology
and perform a node-collapse in such cases. */ and perform a node-collapse in such cases. */
if (RCBLX > 0.0) `ifdef insideADMS
begin //dw we have limited all the RCXXX to MIN_R
I(b, c3) <+ TYPE * XIex; I(b, c3) <+ TYPE * XIex;
I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ; I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
I(b, c3) <+ ddt(TYPE * (XQtex + XQex)); I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
if (RCBLI > 0.0) I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
`else
if (RCBLX > 0.0)
begin begin
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM; I(b, c3) <+ TYPE * XIex;
I(b1, c4) <+ TYPE * (Ib3 + Iex); I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ;
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ; I(b, c3) <+ ddt(TYPE * (XQtex + XQex));
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex)); if (RCBLI > 0.0)
begin
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ;
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
end
else
begin
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end end
else else
begin begin
V(c4, c1) <+ 0.0 ; V(c3, c4) <+ 0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex); if (RCBLI > 0.0)
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex)); begin
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ; I(b, c4) <+ TYPE * XIex;
I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ;
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
I(b, c4) <+ ddt(TYPE * (XQtex + XQex));
end
else
begin
I(b, c1) <+ TYPE * XIex;
I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ;
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(b, c1) <+ ddt(TYPE * (XQtex + XQex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end end
end `endif
else
begin
V(c3, c4) <+ 0 ;
if (RCBLI > 0.0)
begin
I(b, c4) <+ TYPE * XIex;
I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ;
I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM;
I(b1, c4) <+ TYPE * (Ib3 + Iex);
I(b1, c4) <+ ddt(TYPE * (Qtex + Qex));
I(b, c4) <+ ddt(TYPE * (XQtex + XQex));
end
else
begin
I(b, c1) <+ TYPE * XIex;
I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ;
V(c4, c1) <+ 0.0 ;
I(b1, c1) <+ TYPE * (Ib3 + Iex);
I(b1, c1) <+ ddt(TYPE * (Qtex + Qex));
I(b, c1) <+ ddt(TYPE * (XQtex + XQex));
I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ;
end
end

View File

@ -22,6 +22,10 @@
`define AJS 2.0 `define AJS 2.0
`define VEXLIM 400.0 `define VEXLIM 400.0
`define PI 3.1415926 `define PI 3.1415926
`ifdef insideADMS
//dw needed for RCXXX limiting
`define MIN_R 0.001
`endif
// Desriptions and units // Desriptions and units
`ifdef __VAMS_COMPACT_MODELING__ `ifdef __VAMS_COMPACT_MODELING__
@ -34,9 +38,16 @@
`define PAI(des,uni) parameter integer `define PAI(des,uni) parameter integer
`endif `endif
`define MODEL // ADMS specific definitions
`define INSTANCE `ifdef insideADMS
`define NOISE `define MODEL @(initial_model)
`define INSTANCE @(initial_instance)
`define NOISE @(noise)
`else
`define MODEL
`define INSTANCE
`define NOISE
`endif
// Smooth limitting functions // Smooth limitting functions
`define max_hyp0(result, x, epsilon)\ `define max_hyp0(result, x, epsilon)\

View File

@ -77,9 +77,25 @@
RBC_T = RBC * exp(lntN * AEX); RBC_T = RBC * exp(lntN * AEX);
// RvdT, 30-11-2007: new collector resistances RCCxx_T, RCCex_T, RCCin_T // RvdT, 30-11-2007: new collector resistances RCCxx_T, RCCex_T, RCCin_T
RCCxx_T = RCC * exp(lntN * AC); `ifdef insideADMS
RCCex_T = RCBLX * exp(lntN * ACBL); //dw limiting all the RCXXX to MIN_R
RCCin_T = RCBLI * exp(lntN * ACBL); if (RCC > 0.0)
RCCxx_T = RCC * exp(lntN * AC);
else
RCCxx_T = `MIN_R * exp(lntN * AC);
if (RCBLX > 0.0)
RCCex_T = RCBLX * exp(lntN * ACBL);
else
RCCex_T = `MIN_R * exp(lntN * ACBL);
if (RCBLI > 0.0)
RCCin_T = RCBLI * exp(lntN * ACBL);
else
RCCin_T = `MIN_R * exp(lntN * ACBL);
`else
RCCxx_T = RCC * exp(lntN * AC);
RCCex_T = RCBLX * exp(lntN * ACBL);
RCCin_T = RCBLI * exp(lntN * ACBL);
`endif
RCV_T = RCV * exp(lntN * AEPI); RCV_T = RCV * exp(lntN * AEPI);
@ -207,6 +223,12 @@
// RvdT, 03-12-2007: new collector conductances // RvdT, 03-12-2007: new collector conductances
`ifdef insideADMS
//dw we have limited all the RCXXX to MIN_R
GCCxx_TM = 1.0 / RCCxx_TM ;
GCCex_TM = 1.0 / RCCex_TM ;
GCCin_TM = 1.0 / RCCin_TM ;
`else
if (RCC > 0.0) if (RCC > 0.0)
begin begin
GCCxx_TM = 1.0 / RCCxx_TM ; GCCxx_TM = 1.0 / RCCxx_TM ;
@ -233,6 +255,7 @@
begin begin
GCCin_TM = 0 ; GCCin_TM = 0 ;
end end
`endif
`ifdef SELFHEATING `ifdef SELFHEATING
RTH_Tamb_M = RTH_Tamb * invMULT; RTH_Tamb_M = RTH_Tamb * invMULT;