CurrentSensor

model CurrentSensor "Current sensor"
    extends Interfaces.RelativeSensor;

    Modelica.SIunits.Current abs_y = Modelica.ComplexMath.'abs'(y) "Magnitude of complex current";
    Modelica.SIunits.Angle arg_y = Modelica.ComplexMath.arg(y) "Argument of complex current";
equation
    v = Complex(0);
    y = i;

    annotation (
        Icon(graphics = {
            Text(
                extent = {
                    {-29, -11}, 
                    {30, -70}},
                textString = "I")}),
        Documentation(info = "<html>\n<p>\nThis sensor can be used to measure the complex current.\n</p>\n\n<h4>See also</h4>\n\n<p>\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.ReferenceSensor\">ReferenceSensor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.FrequencySensor\">FrequencySensor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.PotentialSensor\">PotentialSensor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.VoltageSensor\">VoltageSensor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.PowerSensor\">PowerSensor</a>,\n<a href=\"modelica://Modelica.Electrical.QuasiStationary.SinglePhase.Sensors.MultiSensor\">MultiSensor</a>\n</p>\n\n</html>"));
end CurrentSensor;