29 #include "component.h"
37 using namespace device;
48 matrix jfet::calcMatrixY (nr_double_t frequency) {
81 matrix jfet::calcMatrixCy (nr_double_t frequency) {
92 nr_double_t
i = 8 *
kelvin (T) /
T0 * gm / 3 +
93 Kf *
pow (Ids, Af) /
pow (frequency, Ffe) /
kB /
T0;
105 void jfet::initModel (
void) {
115 nr_double_t T1, T2, Eg;
146 nr_double_t DT = T2 - T1;
147 Vt0 = Vt0 + Vt0tc * DT;
153 Beta = Beta *
exp (Betatce * DT *
log (1.01));
182 pol = !strcmp (type,
"pfet") ? -1 : 1;
230 nr_double_t Ut, IeqG, IeqD, IeqS, UgsCrit, UgdCrit;
231 nr_double_t Igs, Igd, gtiny;
241 UgsPrev = Ugs =
pnVoltage (Ugs, UgsPrev, Ut * n, UgsCrit);
242 UgdPrev = Ugd =
pnVoltage (Ugd, UgdPrev, Ut * n, UgdCrit);
247 gtiny = Ugs < - 10 * Ut * n ? (Is + Isr) : 0;
251 pnCurrent (Ugs, Isr, Ut * nr) + gtiny * Ugs;
254 gtiny = Ugd < - 10 * Ut * n ? (Is + Isr) : 0;
258 pnCurrent (Ugd, Isr, Ut * nr) + gtiny * Ugd;
262 nr_double_t Ugst = Ugs - Vt0;
270 nr_double_t
b = beta * (1 + l * Uds);
273 Ids = b * Ugst * Ugst;
275 gds = l * beta * Ugst * Ugst;
279 Ids = b * Uds * (2 * Ugst - Uds);
281 gds = b * 2 * (Ugst - Uds) + l * beta * Uds * (2 * Ugst - Uds);
287 nr_double_t Ugdt = Ugd - Vt0;
295 nr_double_t
b = beta * (1 - l * Uds);
298 Ids = - b * Ugdt * Ugdt;
300 gds = beta * l * Ugdt * Ugdt + b * 2 * Ugdt;
304 Ids = b * Uds * (2 * Ugdt + Uds);
306 gds = 2 * b * Ugdt - beta * l * Uds * (2 * Ugdt + Uds);
312 IeqG = Igs - ggs * Ugs;
313 IeqD = Igd - ggd * Ugd;
314 IeqS = Ids - gm * Ugs - gds * Uds;
338 nr_double_t Vgs, Vgd;
355 nr_double_t Cgs, Cgd;
359 Qgd =
pnCharge (Ugd, Cgd0, Pb, z, Fc);
363 Qgs =
pnCharge (Ugs, Cgs0, Pb, z, Fc);
388 #define qgdState 0 // gate-drain charge state
389 #define cgdState 1 // gate-drain current state
390 #define qgsState 2 // gate-source charge state
391 #define cgsState 3 // gate-source current state