summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2020-11-25 19:53:27 +1100
committerDamien Zammit <damien@zamaudio.com>2020-12-01 14:18:41 +1100
commit04583351e7e4d053cf2c54fb4076bfc83ea0fdfa (patch)
tree0d4f47eb71f7f1344a3b24f2e7f96808b6ec91fa
parentf9d9e12410f86ac53f6c8bd6bb61dbe2791b71d4 (diff)
Model getting there, except output is -400Vzamtube-experiment
-rw-r--r--plugins/ZamTube/wdfcircuits.h30
1 files changed, 8 insertions, 22 deletions
diff --git a/plugins/ZamTube/wdfcircuits.h b/plugins/ZamTube/wdfcircuits.h
index a7b7933..d479739 100644
--- a/plugins/ZamTube/wdfcircuits.h
+++ b/plugins/ZamTube/wdfcircuits.h
@@ -128,6 +128,10 @@ public:
Real P1_3b3 = -P1_3Gamma1*(-Ckb);
//Pt_2SetA
Real Pt_3b3 = P1_3b3 - Pt_3Gamma1*(P1_3b3 - St1_3b3);
+
+ Vk = Pt_3b3;
+ Vg = -(Rda);
+
//St2_1SetA
//P2_3GetB
//S3_3GetB
@@ -141,31 +145,13 @@ public:
//P2_2SetA
Real P2_3b3 = E500E - P2_3Gamma1*(E500E - S3_3b3);
//St2_2SetA
- Real St2_3b3 = -(Pt_3b3 + P2_3b3);
- //Pt_3GetB
- //St1_3GetB
- //RdGetB
- //St1_1SetA
- //S1_3GetB
- //RgGetB
- //S1_1SetA
- //P0_3GetB
- //S0_3GetB
- //S0_1SetA
- //ViGetB
- //S0_2SetA
- //P0_1SetA
- //RiGetB
- //P0_2SetA
- //S1_2SetA
- //St1_2SetA
+ Real St2_3b3 = (-Vk + P2_3b3);
+
//Call tube model
- Vg = -(Rda);
- Vk = Pt_3b3;
Real b = t.compute(St2_3b3, St2_3Gamma1, Vg, Vk);
//Set As
//St2_3SetA
- Real St2_3b1 = Pt_3b3 - St2_3Gamma1*(Pt_3b3 + P2_3b3 + b);
+ Real St2_3b1 = Vk - St2_3Gamma1*(Vk + P2_3b3 + b);
//Pt_3SetA
Real Pt_3b1 = St2_3b1 + P1_3b3 - St1_3b3 - Pt_3Gamma1*(P1_3b3 - St1_3b3);
//St1_3SetA
@@ -187,7 +173,7 @@ public:
Real P1_3b1 = Pt_3b2 - Ckb - P1_3Gamma1*(-Ckb);
Cka = P1_3b1;
//RkSetA
- Real St2_3b2 = Pt_3b3 + b - St2_3Gamma1*(Pt_3b3 + P2_3b3 + b);
+ Real St2_3b2 = Vk + b - St2_3Gamma1*(Vk + P2_3b3 + b);
//P2_3SetA
Real P2_3b1 = St2_3b2 + E500E - S3_3b3 - P2_3Gamma1*(E500E - S3_3b3);
//S3_3SetA