Skip to content

Commit

Permalink
Merge pull request #4119 from qlambert-pro/patch-3
Browse files Browse the repository at this point in the history
Fix unit error in Thyristor
  • Loading branch information
arunkumar-narasimhan committed Jan 14, 2024
2 parents 0c425e1 + fa0765e commit 5197646
Showing 1 changed file with 3 additions and 2 deletions.
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;
parameter SI.Voltage vRef = 0.65;

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

0 comments on commit 5197646

Please sign in to comment.