Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unit error in Thyristor #4119

Merged
merged 3 commits into from Jan 14, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions Modelica/Electrical/Analog/Semiconductors/Thyristor.mo
Expand Up @@ -24,6 +24,7 @@ model Thyristor "Simple Thyristor Model"
SI.Voltage vControl(start=0);
SI.Voltage vContot;
SI.Voltage vConmain;
SI.Voltage vRef = 0.65;
qlambert-pro marked this conversation as resolved.
Show resolved Hide resolved

public
Modelica.Electrical.Analog.Interfaces.PositivePin Anode annotation (Placement(transformation(extent={{-110,-10},{-90,10}})));
Expand All @@ -47,8 +48,8 @@ equation

// Gate and Control voltage
iGK = Gate.i;
vGK = smooth(0,(if vGK < 0.65 then VGT/IGT*iGK else
0.65^2/VGT+iGK*(VGT-0.65)/IGT));
vGK = smooth(0,(if vGK < vRef then VGT/IGT*iGK else
vRef^2/VGT+iGK*(VGT-vRef)/IGT));
vContot = vConmain + smooth(0, if iGK < 0.95 * IGT then 0 else if iGK < 0.95*IGT + 1e-3 then 10000*(iGK-0.95*IGT)*vAK else 10* vAK);
der(vControl)= (vContot - vControl) / (if (vContot - vControl) > 0 then 1.87*TON else 0.638*TOFF);

Expand Down