Description: "Package with sensors for DC electrical systems"

- Home > Modelica

## Buildings.Electrical.DC.Sensors

Package with sensors for DC electrical systems

### Information

This package contains models for sensors for DC circuits.

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

### Package Content

Name | Description
--- | ---
GeneralizedSensor | Sensor for power, voltage and current
Examples | Collection of models that illustrate model use and test models

## Buildings.Electrical.DC.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. As this sensor is configured to measure DC power, the reactive power is always zero.

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 | P | Power [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.TwoConductor, redeclare package PhaseSystem_n = PhaseSystems.TwoConductor, redeclare Interfaces.Terminal_n terminal_n, redeclare Interfaces.Terminal_p terminal_p); Modelica.Blocks.Interfaces.RealOutput V(final quantity="ElectricPotential", final unit="V") "Voltage"; Modelica.Blocks.Interfaces.RealOutput I(final quantity="ElectricCurrent", final unit="A") "Current"; Modelica.Blocks.Interfaces.RealOutput P(each final quantity="Power", each final unit="W") "Power"; equation Connections.branch(terminal_p.theta, terminal_n.theta); terminal_p.theta = terminal_n.theta; V = Buildings.Electrical.PhaseSystems.TwoConductor.systemVoltage(terminal_n.v); I = Buildings.Electrical.PhaseSystems.TwoConductor.systemCurrent(terminal_n.i); P = Buildings.Electrical.PhaseSystems.TwoConductor.activePower(v=terminal_n.v, i=terminal_n.i); connect(terminal_n, terminal_p); end GeneralizedSensor;