Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines

Package with transmission line models for three-phase unbalanced AC systems

Information

This package contains models for transmission lines and electrical networks of AC three-phase unbalanced systems.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

Name Description
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line Line Model of an electrical line without neutral cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N Line_N Model of an electrical line with neutral cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network Network Three phases unbalanced AC network without neutral cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network_N Network_N Three phases unbalanced AC network with neutral cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance TwoPortInductance Model of an inductance with two electrical ports
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance_N TwoPortInductance_N Model of an inductance with two electrical ports and neutral line cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL TwoPortMatrixRL Model of an RL line parameterized with impedance matrices
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC TwoPortMatrixRLC PI model of a line parameterized with impedance and admittance matrices
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC_N TwoPortMatrixRLC_N PI model of a line parameterized with impedance and admittance matrices and neutral line
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL_N TwoPortMatrixRL_N Model of an RL line parameterized with impedance matrices and neutral line
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL TwoPortRL Model of a resistive-inductive element with two electrical ports
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC TwoPortRLC Model of an RLC element with two electrical ports
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC_N TwoPortRLC_N Model of an RLC element with two electrical ports and neutral line cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL_N TwoPortRL_N Model of a resistive-inductive element with two electrical ports and neutral line cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance TwoPortResistance Model of a resistance with two electrical ports
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance_N TwoPortResistance_N Model of a resistance with two electrical ports and neutral cable
Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples Examples Package with example models

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line

Model of an electrical line without neutral cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line

Information

This model represents an AC three-phase unbalanced cable without neutral connection. The model is based on Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC and provides functionalities to parametrize the values of R, L and C using either commercial cables or default values.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable), Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine (Partial cable line dispersion model).

Parameters

TypeNameDefaultDescription
Lengthl Length of the line [m]
PowerP_nominal Nominal power of the line [W]
Model
Assumptions
Booleanuse_CfalseSet to true to add a capacitance in the center of the line
LoadmodelModeBuildings.Electrical.Types.L...Select between steady state and dynamic model
Thermal
Booleanuse_TfalseIf true, enables the input for the temperature of the cable
TemperatureTCableT_refFixed temperature of the cable [K]
Tech. specification
Auto/Manual mode
CableModemodeBuildings.Electrical.Types.C...Select if choosing the cable automatically or between a list of commercial options
Manual mode
GenericcommercialCableBuildings.Electrical.Transmi...Commercial cables options

Connectors

TypeNameDescription
input RealInputTTemperature of the cable

Modelica definition

model Line "Model of an electrical line without neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); extends Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine( V_nominal(start = 480), commercialCable = Buildings.Electrical.Transmission.Functions.selectCable_low(P_nominal, V_nominal)); OnePhase.Lines.TwoPortRL phase1( final useHeatPort=true, final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=modelMode) "Impedance line 1"; OnePhase.Lines.TwoPortRL phase2( final useHeatPort=true, final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=modelMode) "Impedance line 2"; OnePhase.Lines.TwoPortRL phase3( final useHeatPort=true, final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=modelMode) "Impedance line 3"; equation connect(cableTemp.port, phase1.heatPort); connect(cableTemp.port, phase2.heatPort); connect(cableTemp.port, phase3.heatPort); connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); end Line;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N

Model of an electrical line with neutral cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N

Information

This model represents an AC three-phase unbalanced cable with neutral connection. The model is based on Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC and provides functionalities to parametrize the values of R, L and C using either commercial cables or default values.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable), Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine (Partial cable line dispersion model).

Parameters

TypeNameDefaultDescription
Lengthl Length of the line [m]
PowerP_nominal Nominal power of the line [W]
Model
Assumptions
Booleanuse_CfalseSet to true to add a capacitance in the center of the line
LoadmodelModeBuildings.Electrical.Types.L...Select between steady state and dynamic model
Thermal
Booleanuse_TfalseIf true, enables the input for the temperature of the cable
TemperatureTCableT_refFixed temperature of the cable [K]
Tech. specification
Auto/Manual mode
CableModemodeBuildings.Electrical.Types.C...Select if choosing the cable automatically or between a list of commercial options
Manual mode
GenericcommercialCableBuildings.Electrical.Transmi...Commercial cables options

Connectors

TypeNameDescription
input RealInputTTemperature of the cable

Modelica definition

model Line_N "Model of an electrical line with neutral cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); extends Buildings.Electrical.Transmission.BaseClasses.PartialBaseLine( V_nominal(start = 480), commercialCable = Buildings.Electrical.Transmission.Functions.selectCable_low(P_nominal, V_nominal)); OnePhase.Lines.TwoPortRL phase1( final useHeatPort=true, final T_ref=T_ref, final M=M, final mode=modelMode, final R=R/3, final L=L/3) "Impedance line 1"; OnePhase.Lines.TwoPortRL phase2( final useHeatPort=true, final T_ref=T_ref, final M=M, final mode=modelMode, final R=R/3, final L=L/3) "Impedance line 1"; OnePhase.Lines.TwoPortRL phase3( final useHeatPort=true, final T_ref=T_ref, final M=M, final mode=modelMode, final R=R/3, final L=L/3) "Impedance line 1"; OnePhase.Lines.TwoPortRL neutral( final useHeatPort=true, final T_ref=T_ref, final M=M, final mode=modelMode, final R=R/3, final L=L/3) "Impedance of the neutral cable"; equation connect(cableTemp.port, phase1.heatPort); connect(cableTemp.port, phase2.heatPort); connect(cableTemp.port, phase3.heatPort); connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(cableTemp.port, neutral.heatPort); // Neutral cable connection connect(terminal_n.phase[4], neutral.terminal_n); connect(terminal_p.phase[4], neutral.terminal_p); end Line_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network

Three phases unbalanced AC network without neutral cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network

Information

This model represents a generalized electrical AC three-phase unbalanced network without neutral cable.

See Buildings.Electrical.Transmission.BaseClasses.PartialNetwork for information about the network model.

See Buildings.Electrical.Transmission.Grids.PartialGrid for more information about the topology of the network, such as the number of nodes, how they are connected, and the length of each connection.

Extends from Transmission.BaseClasses.PartialNetwork (Partial model that represent an electric network).

Parameters

TypeNameDefaultDescription
VoltageV_nominal Nominal voltage of the lines in the network [V]

Modelica definition

model Network "Three phases unbalanced AC network without neutral cable" extends Transmission.BaseClasses.PartialNetwork( redeclare Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_p terminal, redeclare replaceable Transmission.Grids.TestGrid2Nodes grid, redeclare Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line lines(commercialCable=grid.cables)); Modelica.Units.SI.Voltage VAbs[3,grid.nNodes] "RMS voltage of the grid nodes"; equation for i in 1:grid.nLinks loop connect(lines[i].terminal_p, terminal[grid.fromTo[i,1]]); connect(lines[i].terminal_n, terminal[grid.fromTo[i,2]]); end for; for i in 1:grid.nNodes loop VAbs[1,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[1].v); VAbs[2,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[2].v); VAbs[3,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[3].v); end for; end Network;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network_N

Three phases unbalanced AC network with neutral cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Network_N

Information

This model represents a generalized electrical AC three-phase unbalanced network with neutral cable.

See Buildings.Electrical.Transmission.BaseClasses.PartialNetwork for information about the network model.

See Buildings.Electrical.Transmission.Grids.PartialGrid for more information about the topology of the network, such as the number of nodes, how they are connected, and the length of each connection.

Extends from Transmission.BaseClasses.PartialNetwork (Partial model that represent an electric network).

Parameters

TypeNameDefaultDescription
VoltageV_nominal Nominal voltage of the lines in the network [V]

Modelica definition

model Network_N "Three phases unbalanced AC network with neutral cable" extends Transmission.BaseClasses.PartialNetwork( redeclare Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal4_p terminal, redeclare replaceable Transmission.Grids.TestGrid2Nodes grid, redeclare Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N lines( commercialCable=grid.cables)); Modelica.Units.SI.Voltage VAbs[3,grid.nNodes] "RMS voltage of the grid nodes"; equation for i in 1:grid.nLinks loop connect(lines[i].terminal_p, terminal[grid.fromTo[i,1]]); connect(lines[i].terminal_n, terminal[grid.fromTo[i,2]]); end for; for i in 1:grid.nNodes loop VAbs[1,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[1].v - terminal[i].phase[4].v); VAbs[2,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[2].v - terminal[i].phase[4].v); VAbs[3,i] = Buildings.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal[i].phase[3].v - terminal[i].phase[4].v); end for; end Network_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance

Model of an inductance with two electrical ports

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance

Information

Inductive model that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped inductances as shown in the figure above. Assuming that the inductance L is the overall inductance of the cable, each line has an inductance equal to L/3.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
InductanceL Inductance [H]

Connectors

TypeNameDescription
Terminal_pterminal_pElectric terminal side p
Terminal_nterminal_nElectric terminal side n

Modelica definition

model TwoPortInductance "Model of an inductance with two electrical ports" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort; parameter Modelica.Units.SI.Inductance L "Inductance"; OnePhase.Lines.TwoPortInductance phase1( final L=L/3) "Inductance line 1"; OnePhase.Lines.TwoPortInductance phase2( final L=L/3) "Inductance line 2"; OnePhase.Lines.TwoPortInductance phase3( final L=L/3) "Inductance line 3"; equation connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); end TwoPortInductance;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance_N

Model of an inductance with two electrical ports and neutral line cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortInductance_N

Information

Inductive model that connects two AC three-phase unbalanced interfaces with neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped inductances as shown in the figure above. Assuming that the inductance L is the overall inductance of the cable, each line has an inductance equal to L/3.

The inductance of the neutral cable is defined separately using the parameter Ln.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
InductanceL Inductance [H]
InductanceLn Inductance of neutral cable [H]

Connectors

TypeNameDescription
Terminal4_pterminal_pElectric terminal side p
Terminal4_nterminal_nElectric terminal side n

Modelica definition

model TwoPortInductance_N "Model of an inductance with two electrical ports and neutral line cable" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N; parameter Modelica.Units.SI.Inductance L "Inductance"; parameter Modelica.Units.SI.Inductance Ln "Inductance of neutral cable"; OnePhase.Lines.TwoPortInductance phase1( final L=L/3) "Inductance line 1"; OnePhase.Lines.TwoPortInductance phase2( final L=L/3) "Inductance line 2"; OnePhase.Lines.TwoPortInductance phase3( final L=L/3) "Inductance line 3"; OnePhase.Lines.TwoPortInductance phase4( final L=L/3) "Inductance line 3"; equation connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase4.terminal_p, terminal_p.phase[4]); connect(phase4.terminal_n, terminal_n.phase[4]); end TwoPortInductance_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL

Model of an RL line parameterized with impedance matrices

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL

Information

Resistive-inductive model that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system. The voltage between the ports is

image

where Vi{p,n} is the voltage phasor at the connector p or n of the i-th phase, while Iip the current phasor entering from the connector p of the i-th phase.

The model is parameterized with an impedance matrix Z. The matrix is symmetric thus just the upper triangular part of it has to be defined.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
ImpedanceZ11[2] Element [1,1] of impedance matrix [Ohm]
ImpedanceZ12[2] Element [1,2] of impedance matrix [Ohm]
ImpedanceZ13[2] Element [1,3] of impedance matrix [Ohm]
ImpedanceZ22[2] Element [2,2] of impedance matrix [Ohm]
ImpedanceZ23[2] Element [2,3] of impedance matrix [Ohm]
ImpedanceZ33[2] Element [3,3] of impedance matrix [Ohm]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Modelica definition

model TwoPortMatrixRL "Model of an RL line parameterized with impedance matrices" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; parameter Modelica.Units.SI.Impedance Z11[2] "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12[2] "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13[2] "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22[2] "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23[2] "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33[2] "Element [3,3] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z21=Z12 "Element [2,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z31=Z13 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z32=Z23 "Element [3,1] of impedance matrix"; Modelica.Units.SI.Current i1[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[1].i "Current in line 1"; Modelica.Units.SI.Current i2[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[2].i "Current in line 2"; Modelica.Units.SI.Current i3[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[3].i "Current in line 3"; Modelica.Units.SI.Voltage v1_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_n.phase[1].v "Voltage in line 1 at connector N"; Modelica.Units.SI.Voltage v2_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[2].v "Voltage in line 2 at connector N"; Modelica.Units.SI.Voltage v3_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[3].v "Voltage in line 3 at connector N"; Modelica.Units.SI.Voltage v1_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_p.phase[1].v "Voltage in line 1 at connector P"; Modelica.Units.SI.Voltage v2_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[2].v "Voltage in line 2 at connector P"; Modelica.Units.SI.Voltage v3_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[3].v "Voltage in line 3 at connector P"; protected function productAC1p = Buildings.Electrical.PhaseSystems.OnePhase.product "Product between complex quantities"; equation // Link the connectors to propagate the overdetermined variable for i in 1:3 loop Connections.branch(terminal_p.phase[i].theta, terminal_n.phase[i].theta); terminal_p.phase[i].theta = terminal_n.phase[i].theta; // No current losses, they are preserved in each line terminal_p.phase[i].i = - terminal_n.phase[i].i; end for; // Voltage drop caused by the impedance matrix v1_n - v1_p = productAC1p(Z11, i1) + productAC1p(Z12, i2) + productAC1p(Z13, i3); v2_n - v2_p = productAC1p(Z21, i1) + productAC1p(Z22, i2) + productAC1p(Z23, i3); v3_n - v3_p = productAC1p(Z31, i1) + productAC1p(Z32, i2) + productAC1p(Z33, i3); end TwoPortMatrixRL;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC

PI model of a line parameterized with impedance and admittance matrices

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC

Information

RLC line model (π-model) that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model is parameterized with an impedance matrix Z and an admittance matrix B. The impedance matrix is symmetric, and therefore only the upper triangular part of the matrix needs to be defined.

This model is a more detailed version of the model Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL that includes the capacitive effects of the lines.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
ImpedanceZ11[2] Element [1,1] of impedance matrix [Ohm]
ImpedanceZ12[2] Element [1,2] of impedance matrix [Ohm]
ImpedanceZ13[2] Element [1,3] of impedance matrix [Ohm]
ImpedanceZ22[2] Element [2,2] of impedance matrix [Ohm]
ImpedanceZ23[2] Element [2,3] of impedance matrix [Ohm]
ImpedanceZ33[2] Element [3,3] of impedance matrix [Ohm]
AdmittanceB11 Element [1,1] of admittance matrix [S]
AdmittanceB12 Element [1,2] of admittance matrix [S]
AdmittanceB13 Element [1,3] of admittance matrix [S]
AdmittanceB22 Element [2,2] of admittance matrix [S]
AdmittanceB23 Element [2,3] of admittance matrix [S]
AdmittanceB33 Element [3,3] of admittance matrix [S]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Modelica definition

model TwoPortMatrixRLC "PI model of a line parameterized with impedance and admittance matrices" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; parameter Modelica.Units.SI.Impedance Z11[2] "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12[2] "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13[2] "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22[2] "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23[2] "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33[2] "Element [3,3] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z21=Z12 "Element [2,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z31=Z13 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z32=Z23 "Element [3,1] of impedance matrix"; parameter Modelica.Units.SI.Admittance B11 "Element [1,1] of admittance matrix"; parameter Modelica.Units.SI.Admittance B12 "Element [1,2] of admittance matrix"; parameter Modelica.Units.SI.Admittance B13 "Element [1,3] of admittance matrix"; parameter Modelica.Units.SI.Admittance B22 "Element [2,2] of admittance matrix"; parameter Modelica.Units.SI.Admittance B23 "Element [2,3] of admittance matrix"; parameter Modelica.Units.SI.Admittance B33 "Element [3,3] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B21=B12 "Element [2,1] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B31=B13 "Element [3,1] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B32=B23 "Element [3,2] of admittance matrix"; Modelica.Units.SI.Voltage v1_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_n.phase[1].v "Voltage in line 1 at connector N"; Modelica.Units.SI.Voltage v2_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[2].v "Voltage in line 2 at connector N"; Modelica.Units.SI.Voltage v3_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[3].v "Voltage in line 3 at connector N"; Modelica.Units.SI.Voltage v1_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_p.phase[1].v "Voltage in line 1 at connector P"; Modelica.Units.SI.Voltage v2_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[2].v "Voltage in line 2 at connector P"; Modelica.Units.SI.Voltage v3_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[3].v "Voltage in line 3 at connector P"; protected function productAC1p = Buildings.Electrical.PhaseSystems.OnePhase.product "Product between complex quantities"; Modelica.Units.SI.Current Isr[3,2](start=zeros(3, Buildings.Electrical.PhaseSystems.OnePhase.n), each stateSelect=StateSelect.prefer) "Currents that pass through the lines"; Modelica.Units.SI.Current Ish_p[3,2](start=zeros(3, Buildings.Electrical.PhaseSystems.OnePhase.n), each stateSelect=StateSelect.prefer) "Shunt current on side p"; Modelica.Units.SI.Current Ish_n[3,2](start=zeros(3, Buildings.Electrical.PhaseSystems.OnePhase.n), each stateSelect=StateSelect.prefer) "Shunt current on side n"; equation // Link the connectors to propagate the overdetermined variable for i in 1:3 loop Connections.branch(terminal_p.phase[i].theta, terminal_n.phase[i].theta); terminal_p.phase[i].theta = terminal_n.phase[i].theta; end for; // Kirkoff current law for the terminal n (left side) Isr[1,:] = terminal_n.phase[1].i - Ish_n[1,:]; Isr[2,:] = terminal_n.phase[2].i - Ish_n[2,:]; Isr[3,:] = terminal_n.phase[3].i - Ish_n[3,:]; // Kirkoff current law for the terminal p (right side) Isr[1,:] + terminal_p.phase[1].i = Ish_p[1,:]; Isr[2,:] + terminal_p.phase[2].i = Ish_p[2,:]; Isr[3,:] + terminal_p.phase[3].i = Ish_p[3,:]; // Voltage drop caused by the impedance matrix terminal_n.phase[1].v - terminal_p.phase[1].v = productAC1p(Z11, terminal_n.phase[1].i) + productAC1p(Z12, terminal_n.phase[2].i) + productAC1p(Z13, terminal_n.phase[3].i); terminal_n.phase[2].v - terminal_p.phase[2].v = productAC1p(Z21, terminal_n.phase[1].i) + productAC1p(Z22, terminal_n.phase[2].i) + productAC1p(Z23, terminal_n.phase[3].i); terminal_n.phase[3].v - terminal_p.phase[3].v = productAC1p(Z31, terminal_n.phase[1].i) + productAC1p(Z32, terminal_n.phase[2].i) + productAC1p(Z33, terminal_n.phase[3].i); // Current loss at the terminal n Ish_n[1,:] = productAC1p({0, B11/2}, v1_n) + productAC1p({0, B12/2}, v2_n) + productAC1p({0, B13/2}, v3_n); Ish_n[2,:] = productAC1p({0, B21/2}, v1_n) + productAC1p({0, B22/2}, v2_n) + productAC1p({0, B23/2}, v3_n); Ish_n[3,:] = productAC1p({0, B31/2}, v1_n) + productAC1p({0, B32/2}, v2_n) + productAC1p({0, B33/2}, v3_n); // Current loss at the terminal n Ish_p[1,:] = productAC1p({0, B11/2}, v1_p) + productAC1p({0, B12/2}, v2_p) + productAC1p({0, B13/2}, v3_p); Ish_p[2,:] = productAC1p({0, B21/2}, v1_p) + productAC1p({0, B22/2}, v2_p) + productAC1p({0, B23/2}, v3_p); Ish_p[3,:] = productAC1p({0, B31/2}, v1_p) + productAC1p({0, B32/2}, v2_p) + productAC1p({0, B33/2}, v3_p); end TwoPortMatrixRLC;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC_N

PI model of a line parameterized with impedance and admittance matrices and neutral line

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRLC_N

Information

RLC line model (π-model) that connects two AC three-phase unbalanced interfaces and neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model is parameterized with an impedance matrix Z and an admittance matrix B. The impedance matrix is symmetric, and therefore only the upper triangular part of the matrix needs to be defined.

This model is a more detailed version of the model Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL_N that includes the capacitive effects of the lines.

Note

The fourth line is the neutral one.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
ImpedanceZ11[2] Element [1,1] of impedance matrix [Ohm]
ImpedanceZ12[2] Element [1,2] of impedance matrix [Ohm]
ImpedanceZ13[2] Element [1,3] of impedance matrix [Ohm]
ImpedanceZ14[2] Element [1,4] of impedance matrix [Ohm]
ImpedanceZ22[2] Element [2,2] of impedance matrix [Ohm]
ImpedanceZ23[2] Element [2,3] of impedance matrix [Ohm]
ImpedanceZ24[2] Element [2,4] of impedance matrix [Ohm]
ImpedanceZ33[2] Element [3,3] of impedance matrix [Ohm]
ImpedanceZ34[2] Element [3,4] of impedance matrix [Ohm]
ImpedanceZ44[2] Element [4,4] of impedance matrix [Ohm]
AdmittanceB11 Element [1,1] of admittance matrix [S]
AdmittanceB12 Element [1,2] of admittance matrix [S]
AdmittanceB13 Element [1,3] of admittance matrix [S]
AdmittanceB14 Element [1,4] of admittance matrix [S]
AdmittanceB22 Element [2,2] of admittance matrix [S]
AdmittanceB23 Element [2,3] of admittance matrix [S]
AdmittanceB24 Element [2,4] of admittance matrix [S]
AdmittanceB33 Element [3,3] of admittance matrix [S]
AdmittanceB34 Element [3,4] of admittance matrix [S]
AdmittanceB44 Element [4,4] of admittance matrix [S]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Modelica definition

model TwoPortMatrixRLC_N "PI model of a line parameterized with impedance and admittance matrices and neutral line" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; parameter Modelica.Units.SI.Impedance Z11[2] "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12[2] "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13[2] "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z14[2] "Element [1,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22[2] "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23[2] "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z24[2] "Element [2,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33[2] "Element [3,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z34[2] "Element [3,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z44[2] "Element [4,4] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z21=Z12 "Element [2,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z31=Z13 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z32=Z23 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z41=Z14 "Element [4,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z42=Z24 "Element [4,2] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z43=Z34 "Element [4,3] of impedance matrix"; parameter Modelica.Units.SI.Admittance B11 "Element [1,1] of admittance matrix"; parameter Modelica.Units.SI.Admittance B12 "Element [1,2] of admittance matrix"; parameter Modelica.Units.SI.Admittance B13 "Element [1,3] of admittance matrix"; parameter Modelica.Units.SI.Admittance B14 "Element [1,4] of admittance matrix"; parameter Modelica.Units.SI.Admittance B22 "Element [2,2] of admittance matrix"; parameter Modelica.Units.SI.Admittance B23 "Element [2,3] of admittance matrix"; parameter Modelica.Units.SI.Admittance B24 "Element [2,4] of admittance matrix"; parameter Modelica.Units.SI.Admittance B33 "Element [3,3] of admittance matrix"; parameter Modelica.Units.SI.Admittance B34 "Element [3,4] of admittance matrix"; parameter Modelica.Units.SI.Admittance B44 "Element [4,4] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B21=B12 "Element [2,1] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B31=B13 "Element [3,1] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B32=B23 "Element [3,2] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B41=B14 "Element [4,1] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B42=B24 "Element [4,2] of admittance matrix"; final parameter Modelica.Units.SI.Admittance B43=B34 "Element [4,3] of admittance matrix"; Modelica.Units.SI.Voltage v1_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_n.phase[1].v "Voltage in line 1 at connector N"; Modelica.Units.SI.Voltage v2_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[2].v "Voltage in line 2 at connector N"; Modelica.Units.SI.Voltage v3_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[3].v "Voltage in line 3 at connector N"; Modelica.Units.SI.Voltage v4_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(0), each stateSelect=StateSelect.never) = terminal_n.phase[4].v "Voltage in line 4 (neutral) at connector N"; Modelica.Units.SI.Voltage v1_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_p.phase[1].v "Voltage in line 1 at connector P"; Modelica.Units.SI.Voltage v2_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[2].v "Voltage in line 2 at connector P"; Modelica.Units.SI.Voltage v3_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[3].v "Voltage in line 3 at connector P"; Modelica.Units.SI.Voltage v4_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(0), each stateSelect=StateSelect.never) = terminal_p.phase[4].v "Voltage in line 4 (neutral) at connector P"; protected function productAC1p = Buildings.Electrical.PhaseSystems.OnePhase.product "Product between complex quantities"; Modelica.Units.SI.Current Isr[4,2](each stateSelect=StateSelect.prefer) "Currents that pass through the lines"; Modelica.Units.SI.Current Ish_p[4,2](each stateSelect=StateSelect.prefer) "Shunt current on side p"; Modelica.Units.SI.Current Ish_n[4,2](each stateSelect=StateSelect.prefer) "Shunt current on side n"; equation // Link the connectors to propagate the overdetermined variable for i in 1:4 loop Connections.branch(terminal_p.phase[i].theta, terminal_n.phase[i].theta); terminal_p.phase[i].theta = terminal_n.phase[i].theta; end for; // Kirkoff current law for the terminal n (left side) Isr[1,:] = terminal_n.phase[1].i - Ish_n[1,:]; Isr[2,:] = terminal_n.phase[2].i - Ish_n[2,:]; Isr[3,:] = terminal_n.phase[3].i - Ish_n[3,:]; Isr[4,:] = terminal_n.phase[4].i - Ish_n[4,:]; // Kirkoff current law for the terminal p (right side) Isr[1,:] + terminal_p.phase[1].i = Ish_p[1,:]; Isr[2,:] + terminal_p.phase[2].i = Ish_p[2,:]; Isr[3,:] + terminal_p.phase[3].i = Ish_p[3,:]; Isr[4,:] + terminal_p.phase[4].i = Ish_p[4,:]; // Voltage drop caused by the impedance matrix terminal_n.phase[1].v - terminal_p.phase[1].v = productAC1p(Z11, terminal_n.phase[1].i) + productAC1p(Z12, terminal_n.phase[2].i) + productAC1p(Z13, terminal_n.phase[3].i) + productAC1p(Z14, terminal_n.phase[4].i); terminal_n.phase[2].v - terminal_p.phase[2].v = productAC1p(Z21, terminal_n.phase[1].i) + productAC1p(Z22, terminal_n.phase[2].i) + productAC1p(Z23, terminal_n.phase[3].i) + productAC1p(Z24, terminal_n.phase[4].i); terminal_n.phase[3].v - terminal_p.phase[3].v = productAC1p(Z31, terminal_n.phase[1].i) + productAC1p(Z32, terminal_n.phase[2].i) + productAC1p(Z33, terminal_n.phase[3].i) + productAC1p(Z34, terminal_n.phase[4].i); terminal_n.phase[4].v - terminal_p.phase[4].v = productAC1p(Z41, terminal_n.phase[1].i) + productAC1p(Z42, terminal_n.phase[2].i) + productAC1p(Z43, terminal_n.phase[3].i) + productAC1p(Z44, terminal_n.phase[4].i); // Current loss at the terminal n Ish_n[1,:] = productAC1p({0, B11/2}, v1_n) + productAC1p({0, B12/2}, v2_n) + productAC1p({0, B13/2}, v3_n) + productAC1p({0, B14/2}, v4_n); Ish_n[2,:] = productAC1p({0, B21/2}, v1_n) + productAC1p({0, B22/2}, v2_n) + productAC1p({0, B23/2}, v3_n) + productAC1p({0, B24/2}, v4_n); Ish_n[3,:] = productAC1p({0, B31/2}, v1_n) + productAC1p({0, B32/2}, v2_n) + productAC1p({0, B33/2}, v3_n) + productAC1p({0, B34/2}, v4_n); Ish_n[4,:] = productAC1p({0, B41/2}, v1_n) + productAC1p({0, B42/2}, v2_n) + productAC1p({0, B43/2}, v3_n) + productAC1p({0, B44/2}, v4_n); // Current loss at the terminal n Ish_p[1,:] = productAC1p({0, B11/2}, v1_p) + productAC1p({0, B12/2}, v2_p) + productAC1p({0, B13/2}, v3_p) + productAC1p({0, B14/2}, v4_p); Ish_p[2,:] = productAC1p({0, B21/2}, v1_p) + productAC1p({0, B22/2}, v2_p) + productAC1p({0, B23/2}, v3_p) + productAC1p({0, B24/2}, v4_p); Ish_p[3,:] = productAC1p({0, B31/2}, v1_p) + productAC1p({0, B32/2}, v2_p) + productAC1p({0, B33/2}, v3_p) + productAC1p({0, B34/2}, v4_p); Ish_p[4,:] = productAC1p({0, B41/2}, v1_p) + productAC1p({0, B42/2}, v2_p) + productAC1p({0, B43/2}, v3_p) + productAC1p({0, B44/2}, v4_p); end TwoPortMatrixRLC_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL_N

Model of an RL line parameterized with impedance matrices and neutral line

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL_N

Information

Resistive-inductive model that connects two AC three-phase unbalanced interfaces with neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system. The voltage between the ports is

image

where Vi{p,n} is the voltage phasor at the connector p or n of the i-th phase, while Iip the current phasor entering from the connector p of the i-th phase.

The model is parameterized with an impedance matrix Z. The matrix is symmetric thus just the upper triangular part of it has to be defined.

Note

The fourth line is the neutral one.

Extends from Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
ImpedanceZ11[2] Element [1,1] of impedance matrix [Ohm]
ImpedanceZ12[2] Element [1,2] of impedance matrix [Ohm]
ImpedanceZ13[2] Element [1,3] of impedance matrix [Ohm]
ImpedanceZ14[2] Element [1,4] of impedance matrix [Ohm]
ImpedanceZ22[2] Element [2,2] of impedance matrix [Ohm]
ImpedanceZ23[2] Element [2,3] of impedance matrix [Ohm]
ImpedanceZ24[2] Element [2,4] of impedance matrix [Ohm]
ImpedanceZ33[2] Element [3,3] of impedance matrix [Ohm]
ImpedanceZ34[2] Element [3,4] of impedance matrix [Ohm]
ImpedanceZ44[2] Element [4,4] of impedance matrix [Ohm]
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Modelica definition

model TwoPortMatrixRL_N "Model of an RL line parameterized with impedance matrices and neutral line" extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; parameter Modelica.Units.SI.Impedance Z11[2] "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12[2] "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13[2] "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z14[2] "Element [1,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22[2] "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23[2] "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z24[2] "Element [2,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33[2] "Element [3,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z34[2] "Element [3,4] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z44[2] "Element [4,4] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z21=Z12 "Element [2,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z31=Z13 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z32=Z23 "Element [3,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z41=Z14 "Element [4,1] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z42=Z24 "Element [4,2] of impedance matrix"; final parameter Modelica.Units.SI.Impedance[2] Z43=Z34 "Element [4,3] of impedance matrix"; Modelica.Units.SI.Current i1[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[1].i "Current in line 1"; Modelica.Units.SI.Current i2[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[2].i "Current in line 2"; Modelica.Units.SI.Current i3[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[3].i "Current in line 3"; Modelica.Units.SI.Current i4[2](each stateSelect=StateSelect.prefer)= terminal_n.phase[4].i "Current in line 4 (neutral)"; Modelica.Units.SI.Voltage v1_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_n.phase[1].v "Voltage in line 1 at connector N"; Modelica.Units.SI.Voltage v2_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[2].v "Voltage in line 2 at connector N"; Modelica.Units.SI.Voltage v3_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_n.phase[3].v "Voltage in line 3 at connector N"; Modelica.Units.SI.Voltage v4_n[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(0), each stateSelect=StateSelect.never) = terminal_n.phase[4].v "Voltage in line 4 (neutral) at connector N"; Modelica.Units.SI.Voltage v1_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=0), each stateSelect=StateSelect.never) = terminal_p.phase[1].v "Voltage in line 1 at connector P"; Modelica.Units.SI.Voltage v2_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=-2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[2].v "Voltage in line 2 at connector P"; Modelica.Units.SI.Voltage v3_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(V_nominal/ sqrt(3), phi=2*Modelica.Constants.pi/3), each stateSelect=StateSelect.never) = terminal_p.phase[3].v "Voltage in line 3 at connector P"; Modelica.Units.SI.Voltage v4_p[2]( start=Buildings.Electrical.PhaseSystems.OnePhase.phaseVoltages(0), each stateSelect=StateSelect.never) = terminal_p.phase[4].v "Voltage in line 4 (neutral) at connector P"; protected function productAC1p = Buildings.Electrical.PhaseSystems.OnePhase.product "Product between complex quantities"; equation // Link the connectors to propagate the overdetermined variable for i in 1:4 loop Connections.branch(terminal_p.phase[i].theta, terminal_n.phase[i].theta); terminal_p.phase[i].theta = terminal_n.phase[i].theta; // No current losses, they are preserved in each line terminal_p.phase[i].i = - terminal_n.phase[i].i; end for; // Voltage drop caused by the impedance matrix v1_n - v1_p = productAC1p(Z11, i1) + productAC1p(Z12, i2) + productAC1p(Z13, i3)+ productAC1p(Z14, i4); v2_n - v2_p = productAC1p(Z21, i1) + productAC1p(Z22, i2) + productAC1p(Z23, i3)+ productAC1p(Z24, i4); v3_n - v3_p = productAC1p(Z31, i1) + productAC1p(Z32, i2) + productAC1p(Z33, i3)+ productAC1p(Z34, i4); v4_n - v4_p = productAC1p(Z41, i1) + productAC1p(Z42, i2) + productAC1p(Z43, i3)+ productAC1p(Z44, i4); end TwoPortMatrixRL_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL

Model of a resistive-inductive element with two electrical ports

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL

Information

Resistive-inductive model that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped impedances as shown in the figure above. Assuming that the overall cable has a resistance R and an inductance L, each line has an inductance equal to L/3 and a resistance equal to R/3.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
InductanceL Inductance [H]
Currenti1_start[2]{0,0}Initial current phasor of phase 1 (positive if entering from terminal p) [A]
Currenti2_start[2]{0,0}Initial current phasor of phase 2 (positive if entering from terminal p) [A]
Currenti3_start[2]{0,0}Initial current phasor of phase 3 (positive if entering from terminal p) [A]
Modeling assumption
LoadmodeBuildings.Electrical.Types.L...Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port
Terminal_pterminal_pElectric terminal side p
Terminal_nterminal_nElectric terminal side n

Modelica definition

model TwoPortRL "Model of a resistive-inductive element with two electrical ports" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort; parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Inductance L "Inductance"; parameter Modelica.Units.SI.Current i1_start[2]={0,0} "Initial current phasor of phase 1 (positive if entering from terminal p)"; parameter Modelica.Units.SI.Current i2_start[2]={0,0} "Initial current phasor of phase 2 (positive if entering from terminal p)"; parameter Modelica.Units.SI.Current i3_start[2]={0,0} "Initial current phasor of phase 3 (positive if entering from terminal p)"; parameter Buildings.Electrical.Types.Load mode( min=Buildings.Electrical.Types.Load.FixedZ_steady_state, max=Buildings.Electrical.Types.Load.FixedZ_dynamic) = Buildings.Electrical.Types.Load.FixedZ_steady_state "Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)"; OnePhase.Lines.TwoPortRL phase1( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i1_start) "Impedance line 1"; OnePhase.Lines.TwoPortRL phase2( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i2_start) "Impedance line 2"; OnePhase.Lines.TwoPortRL phase3( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i3_start) "Impedance line 3"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); end TwoPortRL;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC

Model of an RLC element with two electrical ports

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC

Information

RLC line model (T-model) that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped impedances as shown in the figure above. Assuming that the overall cable has a resistance R, an inductance L, and a capacitance C, each line has an inductance equal to L/3, a resistance equal to R/3 and a capacity equal to C/3.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
CapacitanceC Capacity [F]
InductanceL Inductance [H]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
VoltageVc1_start[2]V_nominal/sqrt(3)*{1,0}Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
VoltageVc2_start[2]V_nominal/sqrt(3)*{-1/2,-sqr...Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
VoltageVc3_start[2]V_nominal/sqrt(3)*{-1/2,+sqr...Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
Modeling assumption
LoadmodeBuildings.Electrical.Types.L...Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port

Modelica definition

model TwoPortRLC "Model of an RLC element with two electrical ports" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; parameter Modelica.Units.SI.Capacitance C "Capacity"; parameter Modelica.Units.SI.Inductance L "Inductance"; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Voltage Vc1_start[2]=V_nominal/sqrt(3)*{1,0} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Modelica.Units.SI.Voltage Vc2_start[2]=V_nominal/sqrt(3)*{-1/2,- sqrt(3)/2} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Modelica.Units.SI.Voltage Vc3_start[2]=V_nominal/sqrt(3)*{-1/2,+ sqrt(3)/2} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Buildings.Electrical.Types.Load mode( min=Buildings.Electrical.Types.Load.FixedZ_steady_state, max=Buildings.Electrical.Types.Load.FixedZ_dynamic)= Buildings.Electrical.Types.Load.FixedZ_steady_state "Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)"; parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; OnePhase.Lines.TwoPortRLC phase1( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc1_start) "Impedance line 1"; OnePhase.Lines.TwoPortRLC phase2( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc2_start) "Impedance line 2"; OnePhase.Lines.TwoPortRLC phase3( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc3_start) "Impedance line 3"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); end TwoPortRLC;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC_N

Model of an RLC element with two electrical ports and neutral line cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRLC_N

Information

RLC line model (T-model) that connects two AC three-phase unbalanced interfaces with neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped impedances as shown in the figure above. Assuming that the overall cable has a resistance R, an inductance L, and a capacitance C, each line has an inductance equal to L/3, a resistance equal to R/3 and a capacity equal to C/3.

The resistance, capacitance and inductance of the neutral cable are defined separately using the parameters Rn Cn, and Ln.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
ResistanceRn Resistance of neutral cable at temperature T_ref [Ohm]
CapacitanceC Capacity [F]
CapacitanceCn Capacityof neutral cable [F]
InductanceL Inductance [H]
InductanceLn Inductance of neutral cable [H]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
VoltageVc1_start[2]V_nominal/sqrt(3)*{1,0}Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
VoltageVc2_start[2]V_nominal/sqrt(3)*{-1/2,-sqr...Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
VoltageVc3_start[2]V_nominal/sqrt(3)*{-1/2,+sqr...Initial voltage phasor of the capacitance located in the middle of phase 1 [V]
Modeling assumption
LoadmodeBuildings.Electrical.Types.L...Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)
Nominal conditions
VoltageV_nominal Nominal voltage (V_nominal >= 0) [V]

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port

Modelica definition

model TwoPortRLC_N "Model of an RLC element with two electrical ports and neutral line cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N( terminal_p(phase(v(each nominal = V_nominal))), terminal_n(phase(v(each nominal = V_nominal)))); parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; parameter Modelica.Units.SI.Resistance Rn "Resistance of neutral cable at temperature T_ref"; parameter Modelica.Units.SI.Capacitance C "Capacity"; parameter Modelica.Units.SI.Capacitance Cn "Capacityof neutral cable"; parameter Modelica.Units.SI.Inductance L "Inductance"; parameter Modelica.Units.SI.Inductance Ln "Inductance of neutral cable"; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Voltage Vc1_start[2]=V_nominal/sqrt(3)*{1,0} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Modelica.Units.SI.Voltage Vc2_start[2]=V_nominal/sqrt(3)*{-1/2,- sqrt(3)/2} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Modelica.Units.SI.Voltage Vc3_start[2]=V_nominal/sqrt(3)*{-1/2,+ sqrt(3)/2} "Initial voltage phasor of the capacitance located in the middle of phase 1"; parameter Buildings.Electrical.Types.Load mode( min=Buildings.Electrical.Types.Load.FixedZ_steady_state, max=Buildings.Electrical.Types.Load.FixedZ_dynamic)= Buildings.Electrical.Types.Load.FixedZ_steady_state "Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)"; parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)"; OnePhase.Lines.TwoPortRLC phase1( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc1_start) "Impedance line 1"; OnePhase.Lines.TwoPortRLC phase2( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc2_start) "Impedance line 2"; OnePhase.Lines.TwoPortRLC phase3( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final C=C/3, final mode=mode, final V_nominal = V_nominal/sqrt(3), final useHeatPort=useHeatPort, Vc_start=Vc3_start) "Impedance line 3"; OnePhase.Lines.TwoPortRLC neutral( final T_ref=T_ref, final M=M, final mode=mode, final V_nominal=V_nominal/sqrt(3), final useHeatPort=useHeatPort, final R=Rn, final C=Cn, final L=Ln, Vc_start=-Vc1_start - Vc2_start - Vc3_start) "Neutral line RLC model"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower + neutral.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); connect(neutral.terminal_p, terminal_p.phase[4]); connect(neutral.terminal_n, terminal_n.phase[4]); connect(neutral.heatPort, heatPort); end TwoPortRLC_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL_N

Model of a resistive-inductive element with two electrical ports and neutral line cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortRL_N

Information

Resistive-inductive model that connects two AC three-phase unbalanced interfaces with neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped impedances as shown in the figure above. Assuming that the overall cable has a resistance R and an inductance L, each line has an inductance equal to L/3 and a resistance equal to R/3.

The resistance and the inductance of the neutral cable are defined separately using the parameters Rn and Ln.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
ResistanceR Resistance at temperature T_ref [Ohm]
ResistanceRn Resistance of neutral cable at temperature T_ref [Ohm]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
InductanceL Inductance [H]
InductanceLn Inductance of neutral cable [H]
Currenti1_start[2]{0,0}Initial current phasor of phase 1 (positive if entering from terminal p) [A]
Currenti2_start[2]{0,0}Initial current phasor of phase 2 (positive if entering from terminal p) [A]
Currenti3_start[2]{0,0}Initial current phasor of phase 3 (positive if entering from terminal p) [A]
Modeling assumption
LoadmodeBuildings.Electrical.Types.L...Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port
Terminal4_pterminal_pElectric terminal side p
Terminal4_nterminal_nElectric terminal side n

Modelica definition

model TwoPortRL_N "Model of a resistive-inductive element with two electrical ports and neutral line cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N; parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; parameter Modelica.Units.SI.Resistance Rn "Resistance of neutral cable at temperature T_ref"; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Inductance L "Inductance"; parameter Modelica.Units.SI.Inductance Ln "Inductance of neutral cable"; parameter Modelica.Units.SI.Current i1_start[2]={0,0} "Initial current phasor of phase 1 (positive if entering from terminal p)"; parameter Modelica.Units.SI.Current i2_start[2]={0,0} "Initial current phasor of phase 2 (positive if entering from terminal p)"; parameter Modelica.Units.SI.Current i3_start[2]={0,0} "Initial current phasor of phase 3 (positive if entering from terminal p)"; parameter Buildings.Electrical.Types.Load mode( min=Buildings.Electrical.Types.Load.FixedZ_steady_state, max=Buildings.Electrical.Types.Load.FixedZ_dynamic) = Buildings.Electrical.Types.Load.FixedZ_steady_state "Type of model (e.g., steady state, dynamic, prescribed power consumption, etc.)"; OnePhase.Lines.TwoPortRL phase1( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i1_start) "Impedance line 1"; OnePhase.Lines.TwoPortRL phase2( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i2_start) "Impedance line 2"; OnePhase.Lines.TwoPortRL phase3( final T_ref=T_ref, final M=M, final R=R/3, final L=L/3, final mode=mode, final useHeatPort=useHeatPort, i_start=i3_start) "Impedance line 3"; OnePhase.Lines.TwoPortRL neutral( final T_ref=T_ref, final M=M, final mode=mode, final useHeatPort=useHeatPort, final R=Rn, final L=Ln, i_start=-i1_start - i2_start - i3_start) "neutral cable RL model"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower + neutral.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); connect(neutral.heatPort, heatPort); connect(neutral.terminal_p, terminal_p.phase[4]); connect(neutral.terminal_n, terminal_n.phase[4]); end TwoPortRL_N;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance

Model of a resistance with two electrical ports

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance

Information

Resistive model that connects two AC three-phase unbalanced interfaces. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped resistance as shown in the figure above. Assuming that the resistance R is the overall resistance of the cable, each line has a resistance equal to R/3.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort (Partial model interface for a two port component without neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
ResistanceR Resistance at temperature T_ref [Ohm]

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port
Terminal_pterminal_pElectric terminal side p
Terminal_nterminal_nElectric terminal side n

Modelica definition

model TwoPortResistance "Model of a resistance with two electrical ports" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; OnePhase.Lines.TwoPortResistance phase1( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 1"; OnePhase.Lines.TwoPortResistance phase2( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 2"; OnePhase.Lines.TwoPortResistance phase3( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 3"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); end TwoPortResistance;

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance_N Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance_N

Model of a resistance with two electrical ports and neutral cable

Buildings.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortResistance_N

Information

Resistive model that connects two AC three-phase unbalanced interfaces with neutral line. This model can be used to represent a cable in a three-phase unbalanced AC system.

image

The model represents the lumped resistance as shown in the figure above. Assuming that the resistance R is the overall resistance of the cable, each line has a resistance equal to R/3.

The resistance of the neutral cable is defined separately using the parameter Rn.

Extends from Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort (Partial model to include a conditional HeatPort in order to describe the power loss via a thermal network), Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N (Partial model interface for a two port component with neutral cable).

Parameters

TypeNameDefaultDescription
BooleanuseHeatPortfalse= true, if heatPort is enabled
TemperatureT293.15Fixed device temperature if useHeatPort = false [K]
TemperatureT_ref298.15Reference temperature [K]
TemperatureM507.65Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref)) [K]
ResistanceR Resistance at temperature T_ref [Ohm]
ResistanceRn Resistance of neutral cable at temperature T_ref [Ohm]

Connectors

TypeNameDescription
HeatPort_aheatPortConditional heat port
Terminal4_pterminal_pElectric terminal side p
Terminal4_nterminal_nElectric terminal side n

Modelica definition

model TwoPortResistance_N "Model of a resistance with two electrical ports and neutral cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends Buildings.Electrical.AC.ThreePhasesUnbalanced.Interfaces.TwoPort_N; parameter Modelica.Units.SI.Temperature T_ref=298.15 "Reference temperature"; parameter Modelica.Units.SI.Temperature M=507.65 "Temperature constant (R_actual = R*(M + T_heatPort)/(M + T_ref))"; parameter Modelica.Units.SI.Resistance R "Resistance at temperature T_ref"; parameter Modelica.Units.SI.Resistance Rn "Resistance of neutral cable at temperature T_ref"; OnePhase.Lines.TwoPortResistance phase1( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 1"; OnePhase.Lines.TwoPortResistance phase2( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 2"; OnePhase.Lines.TwoPortResistance phase3( final T_ref=T_ref, final M=M, final R=R/3, final useHeatPort=useHeatPort) "Resistance line 3"; OnePhase.Lines.TwoPortResistance neutral( final T_ref=T_ref, final M=M, final useHeatPort=useHeatPort, final R=Rn) "Resistance neutral cable"; equation // Joule Losses LossPower = phase1.LossPower + phase2.LossPower + phase3.LossPower + neutral.LossPower; connect(terminal_n.phase[1], phase1.terminal_n); connect(terminal_n.phase[2], phase2.terminal_n); connect(terminal_n.phase[3], phase3.terminal_n); connect(phase1.terminal_p, terminal_p.phase[1]); connect(phase2.terminal_p, terminal_p.phase[2]); connect(phase3.terminal_p, terminal_p.phase[3]); connect(phase1.heatPort, heatPort); connect(phase3.heatPort, heatPort); connect(phase2.heatPort, heatPort); connect(neutral.heatPort, heatPort); connect(neutral.terminal_p, terminal_p.phase[4]); connect(neutral.terminal_n, terminal_n.phase[4]); end TwoPortResistance_N;