Description: "Package with sources model for three-phase unbalanced AC systems"

- Home > Modelica

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources

Package with sources model for three-phase unbalanced AC systems

### Information

This package contains models that represent different types of three phases unbalanced AC sources.

Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).

### Package Content

Name | Description
--- | ---
FixedVoltage | Fixed voltage source
FixedVoltage_N | Fixed voltage source with neutral cable
Grid | Electrical grid
Grid_N | Electrical grid with neutral cable
PVsimple | Simple PV source without neutral cable
PVsimpleOriented | Simple PV source with orientation and without neutral cable
PVsimpleOriented_N | Simple PV source with orientation and neutral cable
PVsimple_N | Simple PV source with neutral cable
WindTurbine | Simple wind turbine source without neutral cable
WindTurbine_N | Simple wind turbine source with neutral cable
Examples | Package with example models
BaseClasses | Package with base class models

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.FixedVoltage

Fixed voltage source

### Information

This is a constant voltage source, specifying the complex voltage by the RMS voltage and the phase shift.

Explain, or provide a link to an explanation, for the parameters *Reference.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource (Partial model for a three-phase AC unbalanced voltage source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Frequency | f |  | Frequency of the source [Hz]
Voltage | V |  | RMS voltage of the source [V]
Angle | phiSou | 0 | Phase shift of the source [rad]
Reference Parameters
Boolean | potentialReference | true | Serve as potential root
Boolean | definiteReference | false | Serve as definite root

### Connectors

Type | Name | Description
--- | --- | ---
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model FixedVoltage "Fixed voltage source" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource; parameter Modelica.SIunits.Frequency f(start=60) "Frequency of the source"; parameter Modelica.SIunits.Voltage V(start=480) "RMS voltage of the source"; parameter Modelica.SIunits.Angle phiSou = 0 "Phase shift of the source"; parameter Boolean potentialReference = true "Serve as potential root"; parameter Boolean definiteReference = false "Serve as definite root"; constant Modelica.SIunits.Angle angle120 = 2*Modelica.Constants.pi/3 "Phase shift between the phase voltages"; OnePhase.Sources.FixedVoltage vPhase[3]( each f=f, potentialReference={potentialReference, potentialReference, potentialReference}, definiteReference={definiteReference, false, false}, phiSou={phiSou,phiSou - angle120,phiSou + angle120}, each V=V/sqrt(3)) "Voltage sources on the three-phase"; equation connect(vPhase[1].terminal, connection3to4.terminal4.phase[1]); connect(vPhase[2].terminal, connection3to4.terminal4.phase[2]); connect(vPhase[3].terminal, connection3to4.terminal4.phase[3]); end FixedVoltage;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.FixedVoltage_N

Fixed voltage source with neutral cable

### Information

This is a constant voltage source, specifying the complex voltage by the RMS voltage and the phase shift. The model has also the neutral cable, connected to a ground reference by default.

Explain, or provide a link to an explanation, for the parameters *Reference.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource_N (Partial model for a three-phase AC unbalanced voltage source with neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Frequency | f |  | Frequency of the source [Hz]
Voltage | V |  | RMS voltage of the source [V]
Angle | phiSou | 0 | Phase shift of the source [rad]
Reference Parameters
Boolean | potentialReference | true | Serve as potential root
Boolean | definiteReference | false | Serve as definite root

### Connectors

Type | Name | Description
--- | --- | ---
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable

### Modelica definition

model FixedVoltage_N "Fixed voltage source with neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource_N; parameter Modelica.SIunits.Frequency f(start = 60) "Frequency of the source"; parameter Modelica.SIunits.Voltage V(start = 480) "RMS voltage of the source"; parameter Modelica.SIunits.Angle phiSou = 0 "Phase shift of the source"; parameter Boolean potentialReference = true "Serve as potential root"; parameter Boolean definiteReference = false "Serve as definite root"; constant Modelica.SIunits.Angle angle120 = 2*Modelica.Constants.pi/3 "Phase shift between the phase voltages"; OnePhase.Sources.FixedVoltage vPhase[3]( each f=f, phiSou={phiSou, phiSou + angle120, phiSou + 2*angle120}, potentialReference={potentialReference, potentialReference, potentialReference}, definiteReference={definiteReference, false, false}, each V=V/sqrt(3)) "Voltage sources on the three-phase"; equation connect(vPhase[1].terminal, terminal.phase[1]); connect(vPhase[2].terminal, terminal.phase[2]); connect(vPhase[3].terminal, terminal.phase[3]); end FixedVoltage_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.Grid

Electrical grid

### Information

Model that can be used to represent the electrical grid supply.

The model has an output connector named `P[n]` with `n = 3` that contains information about the power supplied by the grid to the network. The convention is that `P[i].real` is positive if real power is consumed from the grid, and negative if it is fed into the grid. The connector has size equal to three because each element of the vector refers to a single phase.

The parameter `V` is the root means square of the voltage. In US, a typical value 480 Volts.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Frequency | f |  | Frequency of the source [Hz]
Voltage | V |  | RMS voltage of the source [V]
Angle | phiSou | 0 | Phase shift of the source [rad]

### Connectors

Type | Name | Description
--- | --- | ---
PowerOutput | P[3] | Power consumed from grid if negative, or fed to grid if positive
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model Grid "Electrical grid" parameter Modelica.SIunits.Frequency f(start = 60) "Frequency of the source"; parameter Modelica.SIunits.Voltage V(start = 480) "RMS voltage of the source"; parameter Modelica.SIunits.Angle phiSou = 0 "Phase shift of the source"; Buildings.Electrical.AC.Interfaces.PowerOutput P[3] "Power consumed from grid if negative, or fed to grid if positive"; Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_p terminal "Connector for three-phase unbalanced systems"; Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.FixedVoltage sou( potentialReference=true, definiteReference=true, f=f, V=V, phiSou=phiSou) "Voltage source"; equation for i in 1:3 loop P[i].real = -sou.vPhase[i].S[1]; P[i].apparent = sqrt(sou.vPhase[i].S[2]^2 + sou.vPhase[i].S[1]^2); P[i].phi = sou.vPhase[i].phi; P[i].cosPhi = cos(sou.vPhase[i].phi); end for; connect(sou.terminal, terminal); end Grid;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.Grid_N

Electrical grid with neutral cable

### Information

Model that can be used to represent the electrical grid supply with a neutral cable connection. The neutral cable is connected to the ground.

The model has an output connector named `P[n]` with `n = 3` that contains information about the power supplied by the grid to the network. The convention is that `P[i].real` is positive if real power is consumed from the grid, and negative if it is fed into the grid. The connector has size equal to three because each element of the vector refers to a single phase.

The parameter `V` is the root means square of the voltage. In US, a typical value 480 Volts.

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Frequency | f |  | Frequency of the source [Hz]
Voltage | V |  | RMS voltage of the source [V]
Angle | phiSou | 0 | Phase shift of the source [rad]

### Connectors

Type | Name | Description
--- | --- | ---
PowerOutput | P[3] | Power consumed from grid if negative, or fed to grid if positive
Terminal4_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model Grid_N "Electrical grid with neutral cable" parameter Modelica.SIunits.Frequency f(start = 60) "Frequency of the source"; parameter Modelica.SIunits.Voltage V(start = 480) "RMS voltage of the source"; parameter Modelica.SIunits.Angle phiSou = 0 "Phase shift of the source"; Buildings.Electrical.AC.Interfaces.PowerOutput P[3] "Power consumed from grid if negative, or fed to grid if positive"; Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems"; Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.FixedVoltage_N sou( potentialReference=true, definiteReference=true, f=f, V=V, phiSou=phiSou) "Voltage source"; equation for i in 1:3 loop P[i].real = -sou.vPhase[i].S[1]; P[i].apparent = sqrt(sou.vPhase[i].S[2]^2 + sou.vPhase[i].S[1]^2); P[i].phi = sou.vPhase[i].phi; P[i].cosPhi = cos(sou.vPhase[i].phi); end for; connect(sou.terminal, terminal); end Grid_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.PVsimple

Simple PV source without neutral cable

### Information

Simple PV model for three-phase unbalanced systems without neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.PVSimple.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV (Base model for an unbalanced PV source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal_p | terminal | Connector for three-phase unbalanced systems
input RealInput | G | Total solar irradiation per unit area [W/m2]

### Modelica definition

model PVsimple "Simple PV source without neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV ( redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase3); Modelica.Blocks.Interfaces.RealInput G(unit="W/m2") "Total solar irradiation per unit area"; equation connect(G, G_int); end PVsimple;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.PVsimpleOriented

Simple PV source with orientation and without neutral cable

### Information

Simple PV model with orientation for three-phase unbalanced systems without neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.PVSimpleOriented.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV (Base model for an unbalanced PV source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]
Orientation
Angle | til |  | Surface tilt [rad]
Angle | lat |  | Latitude [rad]
Angle | azi |  | Surface Azimith [rad]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal_p | terminal | Connector for three-phase unbalanced systems
Bus | weaBus | Bus with weather data

### Modelica definition

model PVsimpleOriented "Simple PV source with orientation and without neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV ( redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase3); parameter Modelica.SIunits.Angle til "Surface tilt"; parameter Modelica.SIunits.Angle lat "Latitude"; parameter Modelica.SIunits.Angle azi "Surface Azimith"; BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil( final til=til, final lat=lat, final azi=azi) "Diffuse irradiation on tilted surface"; BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil( final til=til, final lat=lat, final azi=azi) "Direct irradiation on tilted surface"; Modelica.Blocks.Math.Add G "Total irradiation on tilted surface"; BoundaryConditions.WeatherData.Bus weaBus "Bus with weather data"; equation connect(HDifTil.weaBus,weaBus); connect(weaBus,HDirTil. weaBus); connect(HDifTil.H, G.u2); connect(G.y, G_int); connect(HDirTil.H, G.u1); end PVsimpleOriented;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.PVsimpleOriented_N

Simple PV source with orientation and neutral cable

### Information

Simple PV model with orientation for three-phase unbalanced systems with neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.PVSimpleOriented.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV_N (Base model for an unbalanced PV source with neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]
Orientation
Angle | til |  | Surface tilt [rad]
Angle | lat |  | Latitude [rad]
Angle | azi |  | Surface Azimith [rad]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable
Bus | weaBus | Bus with weather data

### Modelica definition

model PVsimpleOriented_N "Simple PV source with orientation and neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV_N ( redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase3); parameter Modelica.SIunits.Angle til "Surface tilt"; parameter Modelica.SIunits.Angle lat "Latitude"; parameter Modelica.SIunits.Angle azi "Surface Azimith"; BoundaryConditions.SolarIrradiation.DiffusePerez HDifTil( final til=til, final lat=lat, final azi=azi) "Diffuse irradiation on tilted surface"; BoundaryConditions.SolarIrradiation.DirectTiltedSurface HDirTil( final til=til, final lat=lat, final azi=azi) "Direct irradiation on tilted surface"; Modelica.Blocks.Math.Add G "Total irradiation on tilted surface"; BoundaryConditions.WeatherData.Bus weaBus "Bus with weather data"; equation connect(HDifTil.weaBus,weaBus); connect(weaBus,HDirTil. weaBus); connect(HDifTil.H, G.u2); connect(G.y, G_int); connect(HDirTil.H, G.u1); end PVsimpleOriented_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.PVsimple_N

Simple PV source with neutral cable

### Information

Simple PV model for three-phase unbalanced systems with neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.PVSimple.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV_N (Base model for an unbalanced PV source with neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Area | A |  | Net surface area [m2]
Real | fAct | 0.9 | Fraction of surface area with active solar cells [1]
Real | eta | 0.12 | Module conversion efficiency [1]
Real | areaFraction[3] | ones(3)/3 | Fraction of area occupied by the PVs of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Nominal conditions
Voltage | V_nominal |  | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
output RealOutput | P | Generated power [W]
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable
input RealInput | G | Total solar irradiation per unit area [W/m2]

### Modelica definition

model PVsimple_N "Simple PV source with neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.UnbalancedPV_N ( redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.PVSimple pv_phase3); Modelica.Blocks.Interfaces.RealInput G(unit="W/m2") "Total solar irradiation per unit area"; equation connect(G, G_int); end PVsimple_N;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine

Simple wind turbine source without neutral cable

### Information

Simple wind turbine model for three-phase unbalanced systems without neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.WindTurbine.

Extends from BaseClasses.UnbalancedWindTurbine (Base model for an unbalanced wind power source without neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Real | scale | 1 | Scaling factor, used to allow adjusting the power output without changing the table
Boolean | tableOnFile | false | true, if table is defined on file or in function usertab
Real | table[:, 2] | [3.5, 0; 5.5, 0.1; 12, 0.9; ... | Table of generated power (first column is wind speed, second column is power)
String | tableName | "NoName" | Table name on file or in function usertab (see documentation)
String | fileName | "NoName" | File where matrix is stored
Real | scaleFraction[3] | ones(3)/3 | Fraction of power allocated to the wind turbines of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Wind correction
Real | h |  | Height over ground
Height | hRef | 10 | Reference height for wind measurement [m]
Real | nWin | 0.4 | Height exponent for wind profile calculation
Nominal conditions
Voltage | V_nominal | V_nominal(start=480) | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | vWin | Steady wind speed [m/s]
output RealOutput | P | Generated power [W]
Terminal_p | terminal | Connector for three-phase unbalanced systems

### Modelica definition

model WindTurbine "Simple wind turbine source without neutral cable" extends BaseClasses.UnbalancedWindTurbine( redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase3); end WindTurbine;

## Buildings.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine_N

Simple wind turbine source with neutral cable

### Information

Simple wind turbine model for three-phase unbalanced systems with neutral cable connection.

For more information, see Buildings.Electrical.AC.OnePhase.Sources.WindTurbine.

Extends from BaseClasses.UnbalancedWindTurbine_N (Base model for an unbalanced wind power source with neutral cable).

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Boolean | plugPhase1 | true | If true, phase 1 is connected
Boolean | plugPhase2 | true | If true, phase 2 is connected
Boolean | plugPhase3 | true | If true, phase 3 is connected
Real | scale | 1 | Scaling factor, used to allow adjusting the power output without changing the table
Boolean | tableOnFile | false | true, if table is defined on file or in function usertab
Real | table[:, 2] | [3.5, 0; 5.5, 0.1; 12, 0.9; ... | Table of generated power (first column is wind speed, second column is power)
String | tableName | "NoName" | Table name on file or in function usertab (see documentation)
String | fileName | "NoName" | File where matrix is stored
Real | scaleFraction[3] | ones(3)/3 | Fraction of power allocated to the wind turbines of each phase
AC-Conversion
Real | pf | 0.9 | Power factor
Real | eta_DCAC | 0.9 | Efficiency of DC/AC conversion
Wind correction
Real | h |  | Height over ground
Height | hRef | 10 | Reference height for wind measurement [m]
Real | nWin | 0.4 | Height exponent for wind profile calculation
Nominal conditions
Voltage | V_nominal | V_nominal(start=480) | Nominal voltage (V_nominal >= 0) [V]

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | vWin | Steady wind speed [m/s]
output RealOutput | P | Generated power [W]
Terminal4_p | terminal | Connector for three-phase unbalanced systems with neutral cable

### Modelica definition

model WindTurbine_N "Simple wind turbine source with neutral cable" extends BaseClasses.UnbalancedWindTurbine_N( redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase1, redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase2, redeclare Buildings.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase3); end WindTurbine_N;