Modelica.Electrical.Analog.Sensors

Potential, voltage, current, and power sensors

Information


This package contains potential, voltage, and current sensors.

Extends from Modelica.Icons.Library (Icon for library).

Package Content

NameDescription
Modelica.Electrical.Analog.Sensors.PotentialSensor PotentialSensor Sensor to measure the potential
Modelica.Electrical.Analog.Sensors.VoltageSensor VoltageSensor Sensor to measure the voltage between two pins
Modelica.Electrical.Analog.Sensors.CurrentSensor CurrentSensor Sensor to measure the current in a branch
Modelica.Electrical.Analog.Sensors.PowerSensor PowerSensor Sensor to measure the power


Modelica.Electrical.Analog.Sensors.PotentialSensor Modelica.Electrical.Analog.Sensors.PotentialSensor

Sensor to measure the potential

Modelica.Electrical.Analog.Sensors.PotentialSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing rotational measurement device).

Connectors

TypeNameDescription
PositivePinppin to be measured
output RealOutputphiAbsolute voltage potential as output signal

Modelica definition

model PotentialSensor "Sensor to measure the potential"
  extends Modelica.Icons.RotationalSensor;

  Interfaces.PositivePin p "pin to be measured";
  Modelica.Blocks.Interfaces.RealOutput phi 
    "Absolute voltage potential as output signal";
equation 
  p.i = 0;
  phi = p.v;
end PotentialSensor;

Modelica.Electrical.Analog.Sensors.VoltageSensor Modelica.Electrical.Analog.Sensors.VoltageSensor

Sensor to measure the voltage between two pins

Modelica.Electrical.Analog.Sensors.VoltageSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing rotational measurement device).

Connectors

TypeNameDescription
PositivePinppositive pin
NegativePinnnegative pin
output RealOutputvVoltage between pin p and n (= p.v - n.v) as output signal

Modelica definition

model VoltageSensor "Sensor to measure the voltage between two pins"
  extends Modelica.Icons.RotationalSensor;

  Interfaces.PositivePin p "positive pin";
  Interfaces.NegativePin n "negative pin";
  Modelica.Blocks.Interfaces.RealOutput v 
    "Voltage between pin p and n (= p.v - n.v) as output signal";

equation 
  p.i = 0;
  n.i = 0;
  v = p.v - n.v;
end VoltageSensor;

Modelica.Electrical.Analog.Sensors.CurrentSensor Modelica.Electrical.Analog.Sensors.CurrentSensor

Sensor to measure the current in a branch

Modelica.Electrical.Analog.Sensors.CurrentSensor

Information

Extends from Modelica.Icons.RotationalSensor (Icon representing rotational measurement device).

Connectors

TypeNameDescription
PositivePinppositive pin
NegativePinnnegative pin
output RealOutputicurrent in the branch from p to n as output signal

Modelica definition

model CurrentSensor "Sensor to measure the current in a branch"
  extends Modelica.Icons.RotationalSensor;

  Interfaces.PositivePin p "positive pin";
  Interfaces.NegativePin n "negative pin";
  Modelica.Blocks.Interfaces.RealOutput i 
    "current in the branch from p to n as output signal";

equation 
  p.v = n.v;
  p.i = i;
  n.i = -i;
end CurrentSensor;

Modelica.Electrical.Analog.Sensors.PowerSensor Modelica.Electrical.Analog.Sensors.PowerSensor

Sensor to measure the power

Modelica.Electrical.Analog.Sensors.PowerSensor

Information

This power sensor measures instantaneous electrical power of a singlephase system and has a separated voltage and current path. The pins of the voltage path are pv and nv, the pins of the current path are pc and nc. The internal resistance of the current path is zero, the internal resistance of the voltage path is infinite.

Connectors

TypeNameDescription
PositivePinpcPositive pin, current path
NegativePinncNegative pin, current path
PositivePinpvPositive pin, voltage path
NegativePinnvNegative pin, voltage path
output RealOutputpower 

Modelica definition

model PowerSensor "Sensor to measure the power"

  Modelica.Electrical.Analog.Interfaces.PositivePin pc 
    "Positive pin, current path";
  Modelica.Electrical.Analog.Interfaces.NegativePin nc 
    "Negative pin, current path";
  Modelica.Electrical.Analog.Interfaces.PositivePin pv 
    "Positive pin, voltage path";
  Modelica.Electrical.Analog.Interfaces.NegativePin nv 
    "Negative pin, voltage path";
  Modelica.Blocks.Interfaces.RealOutput power;
  Modelica.Electrical.Analog.Sensors.VoltageSensor voltageSensor;
  Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor;
  Modelica.Blocks.Math.Product product;

equation 
  connect(pv, voltageSensor.p);
  connect(voltageSensor.n, nv);
  connect(pc, currentSensor.p);
  connect(currentSensor.n, nc);
  connect(currentSensor.i, product.u2);
  connect(voltageSensor.v, product.u1);
  connect(product.y, power);
end PowerSensor;

HTML-documentation generated by Dymola Sun Jan 17 21:10:10 2010.