30 #include "component.h"
40 using namespace device;
61 void triac::calcTheModel (
bool last) {
71 nr_double_t Ut, Ud_bo, Ieq, Vd;
74 Ud_bo =
log (Ibo / Is + 1.0);
82 isOn = (Ud_last / Ut) > Ud_bo;
87 Id *=
exp (80.0) * (1.0 + Ud - 80.0) - 1.0;
93 gd = Is / Ut *
exp (Ud);
103 Ut = Ubo /
log (Ibo / Is);
109 Id *=
exp (80.0) * (1.0 + Ud - 80.0) - 1.0;
113 Id *=
exp (Ud) - 1.0;
115 gi = Is / Ut *
exp (Ud);
164 matrix triac::calcMatrixY (nr_double_t frequency) {
194 #define qState 0 // charge state
195 #define cState 1 // current state
206 if (time_prev < time) {