forked from modelica/ModelicaStandardLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs modelica#3865: Added QuasiRMS voltage and current single phase s…
…ensors
- Loading branch information
Showing
11 changed files
with
114 additions
and
7 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
Modelica/Electrical/QuasiStatic/SinglePhase/Sensors/CurrentRMSSensor.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
within Modelica.Electrical.QuasiStatic.SinglePhase.Sensors; | ||
model CurrentRMSSensor "Continuous current RMS sensor for single-phase system" | ||
extends Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.RelativeSensorElementary; | ||
Modelica.Blocks.Interfaces.RealOutput I(unit="A") | ||
"Continuous average RMS of current" annotation( | ||
Placement(transformation(origin = {0, -110}, extent = {{-10, -10}, {10, 10}}, rotation = -90), iconTransformation(origin = {0, -110}, extent = {{-10, -10}, {10, 10}}, rotation = -90))); | ||
SI.ComplexCurrent i "Complex current"; | ||
SI.ComplexVoltage v "Complex voltage"; | ||
equation | ||
I = sqrt(i.re^2 + i.im^2); | ||
i = pin_p.i; | ||
v = pin_p.v - pin_n.v; | ||
v = Complex(0,0); | ||
annotation (Documentation(info="<html> | ||
<p> | ||
This sensor determines the continuous root mean square (<a href=\"modelica://Modelica.Electrical.QuasiStatic.UsersGuide.Overview.Introduction\">RMS</a>) | ||
value of a single-phase current system. | ||
</p> | ||
<blockquote><pre> | ||
I = abs(i) | ||
</pre></blockquote> | ||
<h4>See also</h4> | ||
<p> | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.ReferenceSensor\">ReferenceSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.FrequencySensor\">FrequencySensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.PotentialSensor\">PotentialSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.VoltageSensor\">VoltageSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.VoltageRMSSensor\">VoltageRMSSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.CurrentSensor\">CurrentSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.PowerSensor\">PowerSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.MultiSensor\">MultiSensor</a> | ||
</p> | ||
</html>"), | ||
Icon(graphics={ | ||
Text(textColor = {64, 64, 64}, extent = {{-30, -10}, {30, -70}}, textString = "A"), | ||
Line(points={{-70,0},{70,0}}, color={85,170,255})})); | ||
end CurrentRMSSensor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
Modelica/Electrical/QuasiStatic/SinglePhase/Sensors/VoltageRMSSensor.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
within Modelica.Electrical.QuasiStatic.SinglePhase.Sensors; | ||
model VoltageRMSSensor "Continuous voltage RMS sensor for single-phase system" | ||
extends Modelica.Electrical.QuasiStatic.SinglePhase.Interfaces.RelativeSensorElementary; | ||
Modelica.Blocks.Interfaces.RealOutput V(unit="V") | ||
"Continuous average RMS of voltage" annotation( | ||
Placement(transformation(origin = {0, -110}, extent = {{-10, -10}, {10, 10}}, rotation = -90), iconTransformation(origin = {0, -110}, extent = {{-10, -10}, {10, 10}}, rotation = -90))); | ||
SI.ComplexVoltage v "Complex voltage"; | ||
SI.ComplexCurrent i "Complex current"; | ||
equation | ||
V = sqrt(v.re^2 + v.im^2); | ||
v = pin_p.v - pin_n.v; | ||
i = pin_p.i; | ||
i = Complex(0,0); | ||
annotation (Documentation(info="<html> | ||
<p> | ||
This sensor determines the continuous root mean square (<a href=\"modelica://Modelica.Electrical.QuasiStatic.UsersGuide.Overview.Introduction\">RMS</a>) | ||
value of a single-phase voltage system. | ||
</p> | ||
<blockquote><pre> | ||
V = abs(v) | ||
</pre></blockquote> | ||
<h4>See also</h4> | ||
<p> | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.ReferenceSensor\">ReferenceSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.FrequencySensor\">FrequencySensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.PotentialSensor\">PotentialSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.VoltageSensor\">VoltageSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.CurrentSensor\">CurrentSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.CurrentRMSSensor\">CurrentRMSSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.PowerSensor\">PowerSensor</a>, | ||
<a href=\"modelica://Modelica.Electrical.QuasiStatic.SinglePhase.Sensors.MultiSensor\">MultiSensor</a> | ||
</p> | ||
</html>"), | ||
Icon(graphics={ | ||
Text(textColor = {64, 64, 64}, extent = {{-30, -10}, {30, -70}}, textString = "V"), | ||
Line(points={{-100,0},{-70,0}}, color={85,170,255}), | ||
Line(points={{70,0},{100,0}}, color={85,170,255})})); | ||
end VoltageRMSSensor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters