Buildings.Electrical.AC.OnePhase.Sensors

Package with sensors for AC electrical systems

Information

This package contains models for voltage, current and power sensors.

Extends from Modelica.Icons.SensorsPackage (Icon for packages containing sensors).

Package Content

Name Description
Buildings.Electrical.AC.OnePhase.Sensors.GeneralizedSensor GeneralizedSensor Sensor for power, voltage and current
Buildings.Electrical.AC.OnePhase.Sensors.Probe Probe Model of a probe that measures RMS voltage and angle
Buildings.Electrical.AC.OnePhase.Sensors.Examples Examples Package with example models

Buildings.Electrical.AC.OnePhase.Sensors.GeneralizedSensor Buildings.Electrical.AC.OnePhase.Sensors.GeneralizedSensor

Sensor for power, voltage and current

Buildings.Electrical.AC.OnePhase.Sensors.GeneralizedSensor

Information

Ideal sensor that measures power, voltage and current. The two components of the power S are the active and reactive power.

Extends from Buildings.Electrical.Icons.GeneralizedSensor (Icon representing a generalized sensor that measures voltage, current and power), Buildings.Electrical.Interfaces.PartialTwoPort (Model of a generic two port component with phase systems).

Parameters

TypeNameDefaultDescription
replaceable package PhaseSystem_pPartialPhaseSystemPhase system of terminal p
replaceable package PhaseSystem_nPartialPhaseSystemPhase system of terminal n

Connectors

TypeNameDescription
replaceable package PhaseSystem_pPhase system of terminal p
replaceable package PhaseSystem_nPhase system of terminal n
output RealOutputVVoltage [V]
output RealOutputICurrent [A]
output RealOutputS[PhaseSystems.OnePhase.n]Phase powers [W]

Modelica definition

model GeneralizedSensor "Sensor for power, voltage and current" extends Buildings.Electrical.Icons.GeneralizedSensor; extends Buildings.Electrical.Interfaces.PartialTwoPort( redeclare package PhaseSystem_p = PhaseSystems.OnePhase, redeclare package PhaseSystem_n = PhaseSystems.OnePhase, redeclare Interfaces.Terminal_n terminal_n, redeclare Interfaces.Terminal_p terminal_p); Modelica.Blocks.Interfaces.RealOutput V(final quantity="ElectricPotential", final unit="V")= Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal_n.v) "Voltage"; Modelica.Blocks.Interfaces.RealOutput I(final quantity="ElectricCurrent", final unit="A")= Buildings.Electrical.PhaseSystems.OnePhase.systemCurrent(terminal_n.i) "Current"; Modelica.Blocks.Interfaces.RealOutput S[PhaseSystems.OnePhase.n]( each final quantity="Power", each final unit="W")= Buildings.Electrical.PhaseSystems.OnePhase.phasePowers_vi(v=terminal_n.v, i=terminal_n.i) "Phase powers"; equation connect(terminal_n, terminal_p); end GeneralizedSensor;

Buildings.Electrical.AC.OnePhase.Sensors.Probe Buildings.Electrical.AC.OnePhase.Sensors.Probe

Model of a probe that measures RMS voltage and angle

Buildings.Electrical.AC.OnePhase.Sensors.Probe

Information

This model represents a probe that measures the RMS voltage and the angle of the voltage phasor at a given point.

Optionally, given a reference voltage, the model can compute the voltage in per unit.

Extends from Icons.GeneralizedProbe (Icon representing a generalized probe that measures voltage, and phase angle).

Parameters

TypeNameDefaultDescription
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]
BooleanperUnittrueIf true, display voltage in p.u.
Terminal_ntermredeclare Interfaces.Termina...Electrical connector

Connectors

TypeNameDescription
Terminal_ntermElectrical connector
output RealOutputVVoltage phasor magnitude [1V]
output RealOutputthetaVoltage phasor angle [rad]

Modelica definition

model Probe "Model of a probe that measures RMS voltage and angle" extends Icons.GeneralizedProbe; parameter Modelica.SIunits.Voltage V_nominal(min=0, start = 110) "Nominal voltage (V_nominal >= 0)"; parameter Boolean perUnit = true "If true, display voltage in p.u."; replaceable Interfaces.Terminal_n term "Electrical connector"; Modelica.Blocks.Interfaces.RealOutput V(unit=if perUnit then "1" else "V") "Voltage phasor magnitude"; Modelica.Blocks.Interfaces.RealOutput theta(unit="rad", displayUnit="deg") "Voltage phasor angle"; equation theta = Buildings.Electrical.PhaseSystems.OnePhase.phase(term.v); if perUnit then V = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(term.v)/V_nominal; else V = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(term.v); end if; term.i = zeros(Buildings.Electrical.PhaseSystems.OnePhase.n); end Probe;