summaryrefslogtreecommitdiff
path: root/plugins/ZamTube/wdfcircuits.h
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-01-14 02:32:37 +1100
committerDamien Zammit <damien@zamaudio.com>2019-01-14 02:32:37 +1100
commita76f0fba442bad95bab835cc23c29bfd02cead86 (patch)
tree7e67b1bf94537ce7117bc781ebed6175cdf96c27 /plugins/ZamTube/wdfcircuits.h
parent26392514131a1baa32d8bb0a926e7540597ba01e (diff)
Use final calculated plate voltage to get plate current and remove fudge
Diffstat (limited to 'plugins/ZamTube/wdfcircuits.h')
-rw-r--r--plugins/ZamTube/wdfcircuits.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/ZamTube/wdfcircuits.h b/plugins/ZamTube/wdfcircuits.h
index a54517b..e2b9547 100644
--- a/plugins/ZamTube/wdfcircuits.h
+++ b/plugins/ZamTube/wdfcircuits.h
@@ -69,14 +69,13 @@ public:
}
Real advanc(Real ViE) {
- Real fudge = 0.997; // Critical to make Vk = ~2V when -15dbFS sine wave is input
//Get Bs
//P1_3GetB
Real Ckb = Cka;
//P1_1SetA
//RkGetB
//P1_2SetA
- Real P1_3b3 = -fudge*P1_3Gamma1*(-Ckb);
+ Real P1_3b3 = -P1_3Gamma1*(-Ckb);
Real Cob = Coa;
//S3_1SetA
//RoGetB
@@ -85,7 +84,7 @@ public:
//P2_1SetA
//E500GetB
//P2_2SetA
- Real P2_3b3 = E500E - fudge*P2_3Gamma1*(E500E - S3_3b3);
+ Real P2_3b3 = E500E - P2_3Gamma1*(E500E - S3_3b3);
//S2_2SetA
Real S2_3b3 = -(P1_3b3 + P2_3b3);
//S1_3GetB
@@ -106,7 +105,7 @@ public:
Real S1_3b3 = -(P0_3b3);
//Call tube model
Vg = -S1_3b3;
- Real b = t.compute(-S2_3b3, S2_3Gamma1, Vg-Vk, Vk);
+ Real b = t.compute(-S2_3b3, S2_3Gamma1, Vg, Vk);
//Set As
//S2_3SetA
Real S2_3b1 = P1_3b3 - S2_3Gamma1*(P1_3b3 + P2_3b3 + b);