Description: "Package with sensors for AC electrical systems"

- Home > Modelica

## 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
--- | ---
GeneralizedSensor | Sensor for power, voltage and current
Probe | Model of a probe that measures RMS voltage and angle
Examples | Package with example models

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

Sensor for power, voltage and current

### 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

Type | Name | Default | Description
--- | --- | --- | ---
replaceable package PhaseSystem_p | PartialPhaseSystem | Phase system of terminal p
replaceable package PhaseSystem_n | PartialPhaseSystem | Phase system of terminal n

### Connectors

Type | Name | Description
--- | --- | ---
replaceable package PhaseSystem_p | Phase system of terminal p
replaceable package PhaseSystem_n | Phase system of terminal n
output RealOutput | V | Voltage [V]
output RealOutput | I | Current [A]
output RealOutput | S[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

Model of a probe that measures RMS voltage and angle

### 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

Type | Name | Default | Description
--- | --- | --- | ---
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]
Boolean | perUnit | true | If true, display voltage in p.u.
Terminal_n | term | redeclare Interfaces.Termina... | Electrical connector

### Connectors

Type | Name | Description
--- | --- | ---
Terminal_n | term | Electrical connector
output RealOutput | V | Voltage phasor magnitude [1V]
output RealOutput | theta | Voltage 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;