text
stringlengths
1
4.74k
code
stringlengths
69
637k
Model of a resistance with two electrical ports and neutral cable. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; model TwoPortResistance_N "Model of a resistance with two electrical ports and neutral cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends AixLib.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;
Model of a resistive-inductive element with two electrical ports. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; model TwoPortRL "Model of a resistive-inductive element with two electrical ports" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends AixLib.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 AixLib.Electrical.Types.Load mode( min=AixLib.Electrical.Types.Load.FixedZ_steady_state, max=AixLib.Electrical.Types.Load.FixedZ_dynamic) = AixLib.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;
Model of an RLC element with two electrical ports. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; model TwoPortRLC "Model of an RLC element with two electrical ports" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends AixLib.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 AixLib.Electrical.Types.Load mode( min=AixLib.Electrical.Types.Load.FixedZ_steady_state, max=AixLib.Electrical.Types.Load.FixedZ_dynamic)= AixLib.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;
Model of an RLC element with two electrical ports and neutral line cable. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; model TwoPortRLC_N "Model of an RLC element with two electrical ports and neutral line cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends AixLib.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 AixLib.Electrical.Types.Load mode( min=AixLib.Electrical.Types.Load.FixedZ_steady_state, max=AixLib.Electrical.Types.Load.FixedZ_dynamic)= AixLib.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;
Model of a resistive-inductive element with two electrical ports and neutral line cable. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; model TwoPortRL_N "Model of a resistive-inductive element with two electrical ports and neutral line cable" extends Modelica.Electrical.Analog.Interfaces.ConditionalHeatPort; extends AixLib.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 AixLib.Electrical.Types.Load mode( min=AixLib.Electrical.Types.Load.FixedZ_steady_state, max=AixLib.Electrical.Types.Load.FixedZ_dynamic) = AixLib.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;
Test model for a three-phase unbalanced commercial cable without neutral. This example demonstrates how to use a cable model without neutral line to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine "Test model for a three-phase unbalanced commercial cable without neutral" extends Modelica.Icons.Example; Sources.FixedVoltage E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance R1(R=10) "Resistive load 1" Loads.Impedance R2(R=10) "Resistive load 2" Loads.Impedance R3(R=10) "Resistive load 3" Line line_1( l=1000, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 1" Line line_2a( l=500, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 2" Line line_2b( l=500, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 2" Line line_3a( l=2000, P_nominal=1000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 3" Line line_3b( l=2000, P_nominal=1000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 3" equation connect(E.terminal, line_1.terminal_n) connect(line_1.terminal_p, R1.terminal) connect(E.terminal, line_2a.terminal_n) connect(line_2a.terminal_p, line_2b.terminal_n) connect(line_2b.terminal_p, R2.terminal) connect(E.terminal, line_3a.terminal_n) connect(E.terminal, line_3b.terminal_n) connect(line_3a.terminal_p, R3.terminal) connect(line_3b.terminal_p, R3.terminal) end ACLine;
Test model for a three-phase unbalanced inductive-resistive line specified by a Z matrix. This example demonstrates how to use an inductive resistive line model to connect a source to a load. The model is parameterized using the impedance matrix <i>Z</i>.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLineMatrix_RL "Test model for a three-phase unbalanced inductive-resistive line specified by a Z matrix" extends Modelica.Icons.Example; Sources.FixedVoltage E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance sc_load1(R=0, L=0) "Short circuit load" Loads.Impedance sc_load2(R=0, L=0) "Short circuit load" Loads.Impedance sc_load3(R=0, L=0) "Short circuit load" Lines.TwoPortMatrixRL Rline_1( Z11={10,10}, Z12={0,0}, Z13={0,0}, Z22={10,10}, Z23={0,0}, Z33={10,10}, V_nominal=100*sqrt(3)) "RL line that connects to load 1" Lines.TwoPortMatrixRL Rline_2a( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=0.5*{10,10}, Z22=0.5*{10,10}, Z33=0.5*{10,10}, V_nominal=100*sqrt(3)) "RL line that connects to load 2" Lines.TwoPortMatrixRL Rline_2b( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=0.5*{10,10}, Z22=0.5*{10,10}, Z33=0.5*{10,10}, V_nominal=100*sqrt(3)) "RL line that connects to load 2" Lines.TwoPortMatrixRL Rline_3a( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=2*{10,10}, Z22=2*{10,10}, Z33=2*{10,10}, V_nominal=100*sqrt(3)) "RL line that connects to load 3" Lines.TwoPortMatrixRL Rline_3b( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=2*{10,10}, Z22=2*{10,10}, Z33=2*{10,10}, V_nominal=100*sqrt(3)) "RL line that connects to load 3" equation connect(E.terminal, Rline_1.terminal_n) connect(Rline_1.terminal_p, sc_load1.terminal) connect(E.terminal, Rline_2a.terminal_n) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) connect(Rline_2b.terminal_p, sc_load2.terminal) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) connect(Rline_3a.terminal_p, sc_load3.terminal) connect(Rline_3b.terminal_p, sc_load3.terminal) end ACLineMatrix_RL;
Test model for a three-phase unbalanced RLC line specified by Z and B matrices. This example demonstrates how to use a RLC line model to connect a source to a load. The model is parameterized using the impedance matrix Z and the admittance matrix B.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLineMatrix_RLC "Test model for a three-phase unbalanced RLC line specified by Z and B matrices" extends Modelica.Icons.Example; Sources.FixedVoltage E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance sc_load1(R=0, L=0) "Short circuit load" Lines.TwoPortMatrixRLC Rline_1( Z11={10,10}, Z12={0,0}, Z13={0,0}, Z22={10,10}, Z23={0,0}, Z33={10,10}, V_nominal=100*sqrt(3), B12=0, B13=0, B23=0, B11=10, B22=10, B33=10) "RL line that connects to load 1" Lines.TwoPortMatrixRLC Rline_2( Z12={0,0}, Z13={0,0}, Z23={0,0}, V_nominal=100*sqrt(3), B12=0, B13=0, B23=0, Z11={0,0}, Z22={0,0}, Z33={0,0}, B11=0.1, B22=0.1, B33=0.1) "RL line that connects to load 2" equation connect(E.terminal, Rline_1.terminal_n) connect(Rline_1.terminal_p, sc_load1.terminal) connect(E.terminal, Rline_2.terminal_n) end ACLineMatrix_RLC;
Test model for a three-phase unbalanced RLC line with neutral cable specified by Z and B matrices. This example demonstrates how to use a RLC line model with neutral line to connect a source to a load. The model is parameterized using the impedance matrix Z and the admittance matrix B.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLineMatrix_RLC_N "Test model for a three-phase unbalanced RLC line with neutral cable specified by Z and B matrices" extends Modelica.Icons.Example; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance_N sc_load1(R=0, L=0) "Short circuit load" Lines.TwoPortMatrixRLC_N Rline_1( Z11={10,10}, Z12={0,0}, Z13={0,0}, Z22={10,10}, Z23={0,0}, Z33={10,10}, V_nominal=100*sqrt(3), B12=0, B13=0, B23=0, B11=10, B22=10, B33=10, Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44={10,10}, B14=0, B24=0, B34=0, B44=10) "RL line that connects to load 1" Lines.TwoPortMatrixRLC_N Rline_2( Z12={0,0}, Z13={0,0}, Z23={0,0}, V_nominal=100*sqrt(3), B12=0, B13=0, B23=0, Z11={0,0}, Z22={0,0}, Z33={0,0}, B11=0.1, B22=0.1, B33=0.1, Z14={0,0}, Z24={0,0}, B14=0, B24=0, B34=0, B44=0.1, Z34={0,0}, Z44={0,0}) "RL line that connects to load 2" equation connect(E.terminal, Rline_1.terminal_n) connect(E.terminal, Rline_2.terminal_n) connect(Rline_1.terminal_p, sc_load1.terminal) end ACLineMatrix_RLC_N;
Test model for a three-phase unbalanced inductive-resistive line with neutral cable specified by a Z matrix. This example demonstrates how to use an inductive resistive line model with neutral line to connect a source to a load. The model is parameterized using the impedance matrix <i>Z</i>.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLineMatrix_RL_N "Test model for a three-phase unbalanced inductive-resistive line with neutral cable specified by a Z matrix" extends Modelica.Icons.Example; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance_N sc_load1(R=0, L=0) "Short circuit load" Loads.Impedance_N sc_load2(R=0, L=0) "Short circuit load" Loads.Impedance_N sc_load3(R=0, L=0) "Short circuit load" Lines.TwoPortMatrixRL_N Rline_1( Z11={10,10}, Z12={0,0}, Z13={0,0}, Z22={10,10}, Z23={0,0}, Z33={10,10}, V_nominal=100*sqrt(3), Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44={10,10}) "RL line that connects to load 1" Lines.TwoPortMatrixRL_N Rline_2a( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=0.5*{10,10}, Z22=0.5*{10,10}, Z33=0.5*{10,10}, V_nominal=100*sqrt(3), Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44=0.5*{10,10}) "RL line that connects to load 2" Lines.TwoPortMatrixRL_N Rline_2b( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=0.5*{10,10}, Z22=0.5*{10,10}, Z33=0.5*{10,10}, V_nominal=100*sqrt(3), Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44=0.5*{10,10}) "RL line that connects to load 2" Lines.TwoPortMatrixRL_N Rline_3a( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=2*{10,10}, Z22=2*{10,10}, Z33=2*{10,10}, V_nominal=100*sqrt(3), Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44=2*{10,10}) "RL line that connects to load 3" Lines.TwoPortMatrixRL_N Rline_3b( Z12={0,0}, Z13={0,0}, Z23={0,0}, Z11=2*{10,10}, Z22=2*{10,10}, Z33=2*{10,10}, V_nominal=100*sqrt(3), Z14={0,0}, Z24={0,0}, Z34={0,0}, Z44=2*{10,10}) "RL line that connects to load 3" equation connect(E.terminal, Rline_1.terminal_n) connect(E.terminal, Rline_2a.terminal_n) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) connect(Rline_3b.terminal_p, sc_load3.terminal) connect(Rline_3a.terminal_p, sc_load3.terminal) connect(Rline_2b.terminal_p, sc_load2.terminal) connect(Rline_1.terminal_p, sc_load1.terminal) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) end ACLineMatrix_RL_N;
Test model for a three-phase unbalanced inductive line. This example demonstrates how to use a purely inductive line model to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_L "Test model for a three-phase unbalanced inductive line" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Inductance Lbase=10/2/Modelica.Constants.pi/60 "Base value for the line inductances"; Sources.FixedVoltage E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance L1(R=0, L=Lbase) "Inductive load 1" Loads.Impedance L2(R=0, L=Lbase) "Inductive load 2" Loads.Impedance L3(R=0, L=Lbase) "Inductive load 3" Loads.Impedance sc_load(R=0) "Short circuit load" Lines.TwoPortInductance Lline_sc(L=6*Lbase) "Inductive line that connects to the short circuit" Lines.TwoPortInductance Rline_1(L=3*Lbase) "Inductive line that connects to load 1" Lines.TwoPortInductance Rline_2a(L=3*Lbase/2) "Inductive line that connects to load 2" Lines.TwoPortInductance Rline_2b(L=3*Lbase/2) "Inductive line that connects to load 2" Lines.TwoPortInductance Rline_3a(L=6*Lbase) "Inductive line that connects to load 3" Lines.TwoPortInductance Rline_3b(L=6*Lbase) "Inductive line that connects to load 3" equation connect(E.terminal,Lline_sc. terminal_n) connect(Lline_sc.terminal_p, sc_load.terminal) connect(E.terminal, Rline_1.terminal_n) connect(Rline_1.terminal_p,L1. terminal) connect(E.terminal, Rline_2a.terminal_n) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) connect(Rline_2b.terminal_p,L2. terminal) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) connect(Rline_3a.terminal_p,L3. terminal) connect(Rline_3b.terminal_p,L3. terminal) end ACLine_L;
Test model for a three-phase unbalanced inductive line with neutral cable. This example demonstrates how to use a purely inductive line model with neutral cable to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_L_N "Test model for a three-phase unbalanced inductive line with neutral cable" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Inductance Lbase=10/2/Modelica.Constants.pi/60 "Base value for the line inductances"; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance_N L1(R=0, L=Lbase) "Inductive load 1" Loads.Impedance_N L2(R=0, L=Lbase) "Inductive load 2" Loads.Impedance_N L3(R=0, L=Lbase) "Inductive load 3" Loads.Impedance_N sc_load(R=0) "Short circuit load" Lines.TwoPortInductance_N Lline_sc(L=6*Lbase, Ln=Lbase) "Inductive line that connects to the short circuit" Lines.TwoPortInductance_N Rline_1(L=3*Lbase, Ln=0.5*Lbase) "Inductive line that connects to load 1" Lines.TwoPortInductance_N Rline_2a(L=3*Lbase/2, Ln=0.5*Lbase/2) "Inductive line that connects to load 2" Lines.TwoPortInductance_N Rline_2b(L=3*Lbase/2, Ln=0.5*Lbase/2) "Inductive line that connects to load 2" Lines.TwoPortInductance_N Rline_3a(L=6*Lbase, Ln=Lbase) "Inductive line that connects to load 3" Lines.TwoPortInductance_N Rline_3b(L=6*Lbase, Ln=Lbase) "Inductive line that connects to load 3" equation connect(E.terminal, Lline_sc.terminal_n) connect(E.terminal, Rline_1.terminal_n) connect(E.terminal, Rline_2a.terminal_n) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) connect(Rline_3b.terminal_p, L3.terminal) connect(Rline_3a.terminal_p, L3.terminal) connect(Rline_2b.terminal_p, L2.terminal) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) connect(Rline_1.terminal_p, L1.terminal) connect(Lline_sc.terminal_p, sc_load.terminal) end ACLine_L_N;
Test model for a three-phase unbalanced commercial cable with neutral. This example demonstrates how to use a cable line model with neutral to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_N "Test model for a three-phase unbalanced commercial cable with neutral" extends Modelica.Icons.Example; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance_N R1(R=10) "Resistive load 1" Loads.Impedance_N R2(R=10) "Resistive load 2" Loads.Impedance_N R3(R=10) "Resistive load 3" Line_N line_1( l=1000, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 1" Line_N line_2a( l=500, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 2" Line_N line_2b( l=500, P_nominal=2000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 2" Line_N line_3a( l=2000, P_nominal=1000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 3" Line_N line_3b( l=2000, P_nominal=1000, V_nominal=480, mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu35 commercialCable) "Cable that connects to load 3" equation connect(E.terminal, line_2a.terminal_n) connect(E.terminal, line_1.terminal_n) connect(line_1.terminal_p, R1.terminal) connect(E.terminal, line_3a.terminal_n) connect(E.terminal, line_3b.terminal_n) connect(line_2a.terminal_p, line_2b.terminal_n) connect(line_3a.terminal_p, R3.terminal) connect(line_3b.terminal_p, R3.terminal) connect(line_2b.terminal_p, R2.terminal) end ACLine_N;
Test model for a three-phase unbalanced resistive line. This example demonstrates how to use a resistive line model to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_R "Test model for a three-phase unbalanced resistive line" extends Modelica.Icons.Example; Sources.FixedVoltage E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance R1(R=10) "Resistive load 1" Loads.Impedance R2(R=10) "Resistive load 2" Loads.Impedance R3(R=10) "Resistive load 3" Loads.Impedance sc_load(R=0) "Short circuit load" Lines.TwoPortResistance Rline_sc( useHeatPort=false, R=60) "Resistive line that connects to the short circuit" Lines.TwoPortResistance Rline_1(R=30) "Resistive line that connects to load 1" Lines.TwoPortResistance Rline_2a(R=15) "Resistive line that connects to load 2" Lines.TwoPortResistance Rline_2b(R=15) "Resistive line that connects to load 2" Lines.TwoPortResistance Rline_3a(R=60) "Resistive line that connects to load 3" Lines.TwoPortResistance Rline_3b(R=60) "Resistive line that connects to load 3" equation connect(E.terminal, Rline_sc.terminal_n) connect(Rline_sc.terminal_p, sc_load.terminal) connect(E.terminal, Rline_1.terminal_n) connect(Rline_1.terminal_p, R1.terminal) connect(E.terminal, Rline_2a.terminal_n) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) connect(Rline_2b.terminal_p, R2.terminal) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) connect(Rline_3a.terminal_p, R3.terminal) connect(Rline_3b.terminal_p, R3.terminal) end ACLine_R;
Test model for a three-phase unbalanced inductive-resistive line. This example demonstrates how to use a resistive-inductive line model to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_RL "Test model for a three-phase unbalanced inductive-resistive line" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Resistance Rbase=3*10 "Base value for the line resistance"; parameter Modelica.Units.SI.Inductance Lbase=Rbase/2/Modelica.Constants.pi/60 "Base value for the line inductance"; Sources.FixedVoltage E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance load_sc_1(R=0) "Short circuit 1" Loads.Impedance load_sc_2(R=0) "Short circuit 2" Lines.TwoPortRL RL_2( R=Rbase, L=Lbase) "Resistive-Inductive line connected to short circuit 2" Lines.TwoPortResistance R_1(R=Rbase) "Resistance line connected to short circuit 1" Lines.TwoPortInductance L_1(L=Lbase) "Inductance line connected to short circuit 1" Lines.TwoPortRL RL_3( R=Rbase, L=Lbase, mode=AixLib.Electrical.Types.Load.FixedZ_dynamic) "Dynamic resistive-inductive line connected to short circuit 3" Loads.Impedance load_sc_3(R=0) "Short circuit 3" equation connect(E.terminal, R_1.terminal_n) connect(R_1.terminal_p, L_1.terminal_n) connect(L_1.terminal_p, load_sc_1.terminal) connect(E.terminal, RL_2.terminal_n) connect(RL_2.terminal_p, load_sc_2.terminal) connect(E.terminal, RL_3.terminal_n) connect(RL_3.terminal_p, load_sc_3.terminal) end ACLine_RL;
Test model for a three-phase unbalanced RLC line. This example demonstrates how to use an RLC line model to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_RLC "Test model for a three-phase unbalanced RLC line" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Resistance RBase=3*10 "Base value for the line resistance"; parameter Modelica.Units.SI.Inductance LBase=RBase/(2*Modelica.Constants.pi* 60) "Base value for the line inductances"; parameter Modelica.Units.SI.Capacitance CBase=3*0.1/(2*Modelica.Constants.pi* 60) "Base value for the line inductances"; Sources.FixedVoltage E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance sc_load1(R=0, L=0) "Short circuit load" Loads.Impedance sc_load2(R=0, L=0) "Short circuit load" Loads.Impedance sc_load3(R=0, L=0) "Short circuit load" Loads.Impedance sc_load(R=0, L=0) "Short circuit load" Lines.TwoPortRLC RLCLine_sc( R=RBase, C=CBase, L=LBase, mode=AixLib.Electrical.Types.Load.FixedZ_dynamic, V_nominal=480) "RLC line that connects to the short circuit" Lines.TwoPortRLC RLCLine_1( R=RBase, C=CBase, L=LBase, V_nominal=480) "RLC line that connects to load 1" Lines.TwoPortRLC RLCLine_2a( V_nominal=480, R=RBase/2, L=LBase/2, C=CBase/2) "RLC line that connects to load 2" Lines.TwoPortRLC RLCLine_2b( V_nominal=480, R=RBase/2, L=LBase/2, C=CBase/2) "RLC line that connects to load 2" Lines.TwoPortRLC RLCLine_3a( R=2*RBase, L=2*LBase, V_nominal=480, C=CBase/2) "RLC line that connects to load 3" Lines.TwoPortRLC RLCLine_3b( R=2*RBase, L=2*LBase, V_nominal=480, C=CBase/2) "RLC line that connects to load 3" equation connect(E.terminal, RLCLine_sc.terminal_n) connect(RLCLine_sc.terminal_p, sc_load.terminal) connect(E.terminal, RLCLine_1.terminal_n) connect(RLCLine_1.terminal_p, sc_load1.terminal) connect(E.terminal, RLCLine_2a.terminal_n) connect(RLCLine_2a.terminal_p, RLCLine_2b.terminal_n) connect(RLCLine_2b.terminal_p, sc_load2.terminal) connect(E.terminal, RLCLine_3a.terminal_n) connect(E.terminal, RLCLine_3b.terminal_n) connect(RLCLine_3a.terminal_p, sc_load3.terminal) connect(RLCLine_3b.terminal_p, sc_load3.terminal) end ACLine_RLC;
Test model for a three-phase unbalanced RLC line with neutral cable. This example demonstrates how to use an RLC line model with neutral cable to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_RLC_N "Test model for a three-phase unbalanced RLC line with neutral cable" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Resistance RBase=3*10 "Base value for the line resistance"; parameter Modelica.Units.SI.Inductance LBase=RBase/(2*Modelica.Constants.pi* 60) "Base value for the line inductances"; parameter Modelica.Units.SI.Capacitance CBase=3*0.1/(2*Modelica.Constants.pi* 60) "Base value for the line inductances"; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance_N sc_load1(R=0, L=0) "Short circuit load" Loads.Impedance_N sc_load2(R=0, L=0) "Short circuit load" Loads.Impedance_N sc_load3(R=0, L=0) "Short circuit load" Loads.Impedance_N sc_load(R=0, L=0) "Short circuit load" Lines.TwoPortRLC_N RLCLine_sc( R=RBase, C=CBase, L=LBase, mode=AixLib.Electrical.Types.Load.FixedZ_dynamic, V_nominal=480, Rn=RBase, Cn=CBase, Ln=LBase) "RLC line that connects to the short circuit" Lines.TwoPortRLC_N RLCLine_1( R=RBase, C=CBase, L=LBase, V_nominal=480, Rn=RBase, Cn=CBase, Ln=LBase) "RLC line that connects to load 1" Lines.TwoPortRLC_N RLCLine_2a( V_nominal=480, R=RBase/2, L=LBase/2, C=CBase/2, Rn=RBase/2, Cn=CBase/2, Ln=LBase/2) "RLC line that connects to load 2" Lines.TwoPortRLC_N RLCLine_2b( V_nominal=480, R=RBase/2, L=LBase/2, C=CBase/2, Rn=RBase/2, Cn=CBase/2, Ln=LBase/2) "RLC line that connects to load 2" Lines.TwoPortRLC_N RLCLine_3a( R=2*RBase, L=2*LBase, V_nominal=480, C=CBase/2, Rn=2*RBase, Cn=CBase/2, Ln=2*LBase) "RLC line that connects to load 3" Lines.TwoPortRLC_N RLCLine_3b( R=2*RBase, L=2*LBase, V_nominal=480, C=CBase/2, Rn=2*RBase, Cn=CBase/2, Ln=2*LBase) "RLC line that connects to load 3" equation connect(RLCLine_2a.terminal_p, RLCLine_2b.terminal_n) connect(RLCLine_2b.terminal_p, sc_load2.terminal) connect(RLCLine_3a.terminal_p, sc_load3.terminal) connect(RLCLine_3b.terminal_p, sc_load3.terminal) connect(RLCLine_1.terminal_p, sc_load1.terminal) connect(RLCLine_sc.terminal_p, sc_load.terminal) connect(E.terminal, RLCLine_sc.terminal_n) connect(E.terminal, RLCLine_1.terminal_n) connect(E.terminal, RLCLine_2a.terminal_n) connect(E.terminal, RLCLine_3a.terminal_n) connect(E.terminal, RLCLine_3b.terminal_n) end ACLine_RLC_N;
Test model for a three-phase unbalanced inductive-resistive line with neutral cable. This example demonstrates how to use a resistive-inductive line model with neutral cable to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_RL_N "Test model for a three-phase unbalanced inductive-resistive line with neutral cable" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Resistance Rbase=3*10 "Base value for the line resistance"; parameter Modelica.Units.SI.Inductance Lbase=Rbase/2/Modelica.Constants.pi/60 "Base value for the line inductance"; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=100*sqrt(3)) "Voltage source" Loads.Impedance_N load_sc_1(R=0) "Short circuit 1" Loads.Impedance_N load_sc_2(R=0) "Short circuit 2" Lines.TwoPortRL_N RL_2( R=Rbase, L=Lbase, Rn=0.5*Rbase, Ln=0.5*Lbase) "Resistive-Inductive line connected to short circuit 2" Lines.TwoPortResistance_N R_1(R=Rbase, Rn=0.5*Rbase) "Resistance line connected to short circuit 1" Lines.TwoPortInductance_N L_1(L=Lbase, Ln=0.5*Lbase) "Inductance line connected to short circuit 1" equation connect(RL_2.terminal_p, load_sc_2.terminal) connect(L_1.terminal_p, load_sc_1.terminal) connect(L_1.terminal_n, R_1.terminal_p) connect(R_1.terminal_n, E.terminal) connect(E.terminal, RL_2.terminal_n) end ACLine_RL_N;
Test model for a three-phase unbalanced resistive line with neutral cable. This example demonstrates how to use a resistive line model with neutral cable to connect a source to a load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACLine_R_N "Test model for a three-phase unbalanced resistive line with neutral cable" extends Modelica.Icons.Example; Sources.FixedVoltage_N E( definiteReference=true, f=60, V=480) "Voltage source" Loads.Impedance_N R1(R=10) "Resistive load 1" Loads.Impedance_N R2(R=10) "Resistive load 2" Loads.Impedance_N R3(R=10) "Resistive load 3" Loads.Impedance_N sc_load(R=0) "Short circuit load" Lines.TwoPortResistance_N Rline_sc( useHeatPort=false, R=60, Rn=20) "Resistive line that connects to the short circuit" Lines.TwoPortResistance_N Rline_1(R=30, Rn=10) "Resistive line that connects to load 1" Lines.TwoPortResistance_N Rline_2a(R=15, Rn=5) "Resistive line that connects to load 2" Lines.TwoPortResistance_N Rline_2b(R=15, Rn=5) "Resistive line that connects to load 2" Lines.TwoPortResistance_N Rline_3a(R=60, Rn=20) "Resistive line that connects to load 3" Lines.TwoPortResistance_N Rline_3b(R=60, Rn=20) "Resistive line that connects to load 3" equation connect(Rline_sc.terminal_p, sc_load.terminal) connect(Rline_1.terminal_p, R1.terminal) connect(Rline_2b.terminal_p, R2.terminal) connect(Rline_2a.terminal_p, Rline_2b.terminal_n) connect(Rline_3b.terminal_p, R3.terminal) connect(Rline_3a.terminal_p, R3.terminal) connect(E.terminal, Rline_sc.terminal_n) connect(E.terminal, Rline_1.terminal_n) connect(E.terminal, Rline_2a.terminal_n) connect(E.terminal, Rline_3a.terminal_n) connect(E.terminal, Rline_3b.terminal_n) end ACLine_R_N;
Test model for a network model for three-phase unbalanced systems without neutral cable. This example demonstrates how to use a network model to connect a source to a load. In this simple case the network has two nodes that are connected by a commercial cable without a neutral line.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACSimpleGrid "Test model for a network model for three-phase unbalanced systems without neutral cable" extends Modelica.Icons.Example; Network network( redeclare AixLib.Electrical.Transmission.Grids.TestGrid2Nodes grid, V_nominal=480) "Network model that represents the connection between the source and the load" Loads.Inductive load( V_nominal=480, mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase3=false) "Load connected to the network" Sources.FixedVoltage E(f=60, V=480, definiteReference=true) "Voltage source" Modelica.Blocks.Sources.Ramp load_inputs( height=5000, offset=-2000, duration=0.5, startTime=0.25) "Input signal for the power consumption of the loads" equation connect(E.terminal, network.terminal[1]) connect(load.terminal, network.terminal[2]) connect(load_inputs.y, load.Pow1) connect(load_inputs.y, load.Pow2) end ACSimpleGrid;
Test model for a network model for three-phase unbalanced systems with neutral cable. This example demonstrates how to use a network model to connect a source to a load. In this simple case the network has two nodes that are connected by a commercial cable with neutral line.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Examples; model ACSimpleGrid_N "Test model for a network model for three-phase unbalanced systems with neutral cable" extends Modelica.Icons.Example; Network_N network( redeclare AixLib.Electrical.Transmission.Grids.TestGrid2Nodes grid, V_nominal=480) "Network model that represents the connection between the source and the load" Loads.Inductive_N load( V_nominal=480, mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase3=false) "Load connected to the network" Sources.FixedVoltage_N E( f=60, V=480, definiteReference=true) "Voltage source" Modelica.Blocks.Sources.Ramp load_inputs( height=5000, offset=-2000, duration=0.5, startTime=0.25) "Input signal for the power consumption of the loads" equation connect(E.terminal, network.terminal[1]) connect(load.terminal, network.terminal[2]) connect(load_inputs.y, load.Pow1) connect(load_inputs.y, load.Pow2) end ACSimpleGrid_N;
Package with example models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines; package Examples "Package with example models" extends Modelica.Icons.ExamplesPackage; end Examples;
Model of a three-phase unbalanced capacitive load without neutral cable. This model represents a three-phase unbalanced capacitive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Capacitive "Model of a three-phase unbalanced capacitive load without neutral cable" extends BaseClasses.LoadCtrl( redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load1(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load2(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load3(pf=pf, use_pf_in=use_pf_in)); parameter Boolean use_pf_in = false "If true, the power factor is defined by an input" parameter Real pf(min=0, max=1) = 0.8 "Power factor" Modelica.Blocks.Interfaces.RealInput pf_in_1( min=0, max=1, unit="1") if (use_pf_in and plugPhase1) "Power factor of load on phase 1" Modelica.Blocks.Interfaces.RealInput pf_in_2( min=0, max=1, unit="1") if (use_pf_in and plugPhase2) "Power factor of load on phase 2" Modelica.Blocks.Interfaces.RealInput pf_in_3( min=0, max=1, unit="1") if (use_pf_in and plugPhase3) "Power factor of load on phase 3" equation connect(pf_in_1, load1.pf_in) connect(pf_in_2, load2.pf_in) connect(pf_in_3, load3.pf_in) end Capacitive;
Model of a three-phase unbalanced capacitive load with neutral cable. This model represents a three-phase unbalanced capacitive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Capacitive_N "Model of a three-phase unbalanced capacitive load with neutral cable" extends BaseClasses.LoadCtrl_N( redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load1(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load2(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Capacitive load3(pf=pf, use_pf_in=use_pf_in)); parameter Boolean use_pf_in = false "If true, the power factor is defined by an input" parameter Real pf(min=0, max=1) = 0.8 "Power factor" Modelica.Blocks.Interfaces.RealInput pf_in_1( min=0, max=1, unit="1") if (use_pf_in and plugPhase1) "Power factor of load on phase 1" Modelica.Blocks.Interfaces.RealInput pf_in_2( min=0, max=1, unit="1") if (use_pf_in and plugPhase2) "Power factor of load on phase 2" Modelica.Blocks.Interfaces.RealInput pf_in_3( min=0, max=1, unit="1") if (use_pf_in and plugPhase3) "Power factor of load on phase 3" equation connect(pf_in_1, load1.pf_in) connect(pf_in_2, load2.pf_in) connect(pf_in_3, load3.pf_in) end Capacitive_N;
Model of a three-phase unbalanced impedance without neutral cable. This model represents a three-phase unbalanced impedance without neutral cable. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.Impedance\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.Impedance</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads.Impedance\"> AixLib.Electrical.AC.OnePhase.Loads.Impedance</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Impedance "Model of a three-phase unbalanced impedance without neutral cable" extends BaseClasses.Impedance( redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load1, redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load2, redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load3); equation end Impedance;
Model of a three-phase unbalanced impedance with neutral cable. This model represents a three-phase unbalanced impedance with neutral cable. The current in the neutral cable is computed as the algebraic sum of the currents of the loads. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.Impedance_N\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.Impedance_N</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads.Impedance\"> AixLib.Electrical.AC.OnePhase.Loads.Impedance</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Impedance_N "Model of a three-phase unbalanced impedance with neutral cable" extends BaseClasses.Impedance_N( redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load1, redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load2, redeclare AixLib.Electrical.AC.OnePhase.Loads.Impedance load3); equation end Impedance_N;
Model of a three-phase unbalanced inductive load without neutral cable. This model represents a three-phase unbalanced inductive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Inductive "Model of a three-phase unbalanced inductive load without neutral cable" extends BaseClasses.LoadCtrl( redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load1( pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load2( pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load3( pf=pf, use_pf_in=use_pf_in)); parameter Boolean use_pf_in = false "If true, the power factor is defined by an input" parameter Real pf(min=0, max=1) = 0.8 "Power factor" Modelica.Blocks.Interfaces.RealInput pf_in_1( min=0, max=1, unit="1") if (use_pf_in and plugPhase1) "Power factor of load on phase 1" Modelica.Blocks.Interfaces.RealInput pf_in_2( min=0, max=1, unit="1") if (use_pf_in and plugPhase2) "Power factor of load on phase 2" Modelica.Blocks.Interfaces.RealInput pf_in_3( min=0, max=1, unit="1") if (use_pf_in and plugPhase3) "Power factor of load on phase 3" equation connect(pf_in_1, load1.pf_in) connect(pf_in_2, load2.pf_in) connect(pf_in_3, load3.pf_in) end Inductive;
Model of a three-phase unbalanced inductive load with neutral cable. This model represents a three-phase unbalanced inductive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Inductive_N "Model of a three-phase unbalanced inductive load with neutral cable" extends BaseClasses.LoadCtrl_N( redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load1(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load2(pf=pf, use_pf_in=use_pf_in), redeclare AixLib.Electrical.AC.OnePhase.Loads.Inductive load3(pf=pf, use_pf_in=use_pf_in)); parameter Boolean use_pf_in = false "If true, the power factor is defined by an input" parameter Real pf(min=0, max=1) = 0.8 "Power factor" Modelica.Blocks.Interfaces.RealInput pf_in_1( min=0, max=1, unit="1") if (use_pf_in and plugPhase1) "Power factor of load on phase 1" Modelica.Blocks.Interfaces.RealInput pf_in_2( min=0, max=1, unit="1") if (use_pf_in and plugPhase2) "Power factor of load on phase 2" Modelica.Blocks.Interfaces.RealInput pf_in_3( min=0, max=1, unit="1") if (use_pf_in and plugPhase3) "Power factor of load on phase 3" equation connect(pf_in_1, load1.pf_in) connect(pf_in_2, load2.pf_in) connect(pf_in_3, load3.pf_in) end Inductive_N;
Package with load models for three-phase unbalanced AC systems
within AixLib.Electrical.AC.ThreePhasesUnbalanced; package Loads "Package with load models for three-phase unbalanced AC systems" extends Modelica.Icons.VariantsPackage; end Loads;
Model of a three-phase unbalanced resistive load without neutral cable. This model represents a three-phase unbalanced resistive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Resistive "Model of a three-phase unbalanced resistive load without neutral cable" extends BaseClasses.LoadCtrl( redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load1, redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load2, redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load3); equation end Resistive;
Model of a three-phase unbalanced resistive load with neutral cable. This model represents a three-phase unbalanced resistive load. The model extends from <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.LoadCtrl_N</a> and uses the load model from the package <a href=\"modelica://AixLib.Electrical.AC.OnePhase.Loads\"> AixLib.Electrical.AC.OnePhase.Loads</a>. The model computes the voltages, currents and powers on each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; model Resistive_N "Model of a three-phase unbalanced resistive load with neutral cable" extends BaseClasses.LoadCtrl_N( redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load1, redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load2, redeclare AixLib.Electrical.AC.OnePhase.Loads.Resistive load3); equation end Resistive_N;
Partial model of a three-phase unbalanced impedance. This model represents a partial interface for a three-phase AC unbalanced impedance.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model BaseImpedance "Partial model of a three-phase unbalanced impedance" extends AixLib.Electrical.Interfaces.PartialPluggableUnbalanced; replaceable AixLib.Electrical.AC.OnePhase.Loads.Impedance load1( inductive=inductive, R=R, L=L, C=C, use_R_in=use_R_in, RMin=RMin, RMax=RMax, use_C_in=use_C_in, CMin=CMin, CMax=CMax, use_L_in=use_L_in, LMin=LMin, LMax=LMax) if plugPhase1 "Load 1" replaceable AixLib.Electrical.AC.OnePhase.Loads.Impedance load2( inductive=inductive, R=R, L=L, C=C, use_R_in=use_R_in, RMin=RMin, RMax=RMax, use_C_in=use_C_in, CMin=CMin, CMax=CMax, use_L_in=use_L_in, LMin=LMin, LMax=LMax) if plugPhase2 "Load 2" replaceable AixLib.Electrical.AC.OnePhase.Loads.Impedance load3( inductive=inductive, R=R, L=L, C=C, use_R_in=use_R_in, RMin=RMin, RMax=RMax, use_C_in=use_C_in, CMin=CMin, CMax=CMax, use_L_in=use_L_in, LMin=LMin, LMax=LMax) if plugPhase3 "Load 3" parameter AixLib.Electrical.Types.LoadConnection loadConn= AixLib.Electrical.Types.LoadConnection.wye_to_wyeg "Type of load connection (Yg or D)"; parameter Boolean inductive=true "If =true the load is inductive, otherwise it is capacitive" parameter Modelica.Units.SI.Resistance R( start=1, min=0) = 1 "Resistance" parameter Modelica.Units.SI.Inductance L( start=0, min=0) = 0 "Inductance" parameter Modelica.Units.SI.Capacitance C( start=0, min=0) = 0 "Capacitance" parameter Boolean use_R_in = false "if true, R is specified by an input" parameter Modelica.Units.SI.Resistance RMin( start=R, min=Modelica.Constants.eps) = 1e-4 "Minimum value of the resistance" parameter Modelica.Units.SI.Resistance RMax( start=R, min=Modelica.Constants.eps) = 1e2 "Maximum value of the resistance" parameter Boolean use_C_in = false "if true, C is specified by an input" parameter Modelica.Units.SI.Capacitance CMin( start=C, min=Modelica.Constants.eps) = 1e-4 "Minimum value of the capacitance" parameter Modelica.Units.SI.Capacitance CMax( start=C, min=Modelica.Constants.eps) = 1e2 "Maximum value of the capacitance" parameter Boolean use_L_in = false "if true, L is specified by an input" parameter Modelica.Units.SI.Inductance LMin( start=L, min=Modelica.Constants.eps) = 1e-4 "Minimum value of the inductance" parameter Modelica.Units.SI.Inductance LMax( start=L, min=Modelica.Constants.eps) = 1e2 "Maximum value of the inductance" Modelica.Blocks.Interfaces.RealInput y_R(min=0, max=1) if use_R_in "Input that sepecifies variable R" Modelica.Blocks.Interfaces.RealInput y_C(min=0, max=1) if use_C_in "Input that sepecifies variable C" Modelica.Blocks.Interfaces.RealInput y_L(min=0, max=1) if use_L_in "Input that sepecifies variable L" AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.WyeToDelta wyeToDelta if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_delta) "Wye to delta load connection" AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.WyeToWyeGround wyeToWyeGround if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_wyeg) "Wye to grounded wye connection" protected Interfaces.Adapter3to3 adaDel if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_delta) "Adapter" Interfaces.Adapter3to3 adaWye if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_wyeg) "Adapter" equation // Conditional connections to load 1 if plugPhase1 then if use_R_in then connect(y_R, load1.y_R) end if; if use_C_in then connect(y_C, load1.y_C) end if; if use_L_in then connect(y_L, load1.y_L) end if; end if; // Conditional connections to load 2 if plugPhase2 then if use_R_in then connect(y_R, load2.y_R) end if; if use_L_in then connect(y_L, load2.y_L) end if; if use_C_in then connect(y_C, load2.y_C) end if; end if; // Conditional connections to load 3 if plugPhase3 then if use_R_in then connect(y_R, load3.y_R) end if; if use_C_in then connect(y_C, load3.y_C) end if; if use_L_in then connect(y_L, load3.y_L) end if; end if; // Connection of the single loads to the 3phases connector if plugPhase1 then connect(load1.terminal, adaDel.terminals[1]) connect(load1.terminal, adaWye.terminals[1]) end if; if plugPhase2 then connect(load2.terminal, adaDel.terminals[2]) connect(load2.terminal, adaWye.terminals[2]) end if; if plugPhase3 then connect(load3.terminal, adaDel.terminals[3]) connect(load3.terminal, adaWye.terminals[3]) end if; connect(adaDel.terminal, wyeToDelta.delta) connect(adaWye.terminal, wyeToWyeGround.wyeg) end BaseImpedance;
Partial model of a three-phase unbalanced load with voltage controllers
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model BaseLoadCtrl "Partial model of a three-phase unbalanced load with voltage controllers" extends AixLib.Electrical.Interfaces.PartialPluggableUnbalanced; parameter AixLib.Electrical.Types.LoadConnection loadConn= AixLib.Electrical.Types.LoadConnection.wye_to_wyeg "Type of load connection (Yg or D)"; parameter Boolean linearized = false "If =true introduce a linearization in the load" parameter AixLib.Electrical.Types.Load mode( min=AixLib.Electrical.Types.Load.FixedZ_steady_state, max=AixLib.Electrical.Types.Load.VariableZ_y_input)= AixLib.Electrical.Types.Load.FixedZ_steady_state "Parameters that specifies the mode of the load (e.g., steady state, dynamic, prescribed power consumption, etc.)" parameter Modelica.Units.SI.Power P_nominal=0 "Nominal power (negative if consumed, positive if generated)" parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "Nominal voltage (V_nominal >= 0)" parameter Boolean voltageCtrl = false "This flag enables the voltage control" parameter Real vThresh(min=0.0, max=1.0) = 0.1 "Threshold that activates voltage ctrl (ratio of nominal voltage)" parameter Modelica.Units.SI.Time tDelay=300 "Time to wait before plugging the load again after disconnection" parameter Types.InitMode initMode=AixLib.Electrical.Types.InitMode.zero_current "Initialization mode for homotopy operator" replaceable AixLib.Electrical.Interfaces.Load load1( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, final linearized=linearized, final mode=mode, final P_nominal = P_nominal, final V_nominal=V_nominal/sqrt(3), final initMode=initMode) if plugPhase1 "Load 1" replaceable AixLib.Electrical.Interfaces.Load load2( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, final linearized=linearized, final mode=mode, final P_nominal = P_nominal, final V_nominal=V_nominal/sqrt(3), final initMode=initMode) if plugPhase2 "Load 2" replaceable AixLib.Electrical.Interfaces.Load load3( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, final linearized=linearized, final mode=mode, final P_nominal = P_nominal, final V_nominal=V_nominal/sqrt(3), final initMode=initMode) if plugPhase3 "Load 3" Modelica.Blocks.Interfaces.RealInput y1 if plugPhase1 and mode == AixLib.Electrical.Types.Load.VariableZ_y_input "Fraction of the nominal power consumed" Modelica.Blocks.Interfaces.RealInput Pow1(unit="W") if plugPhase1 and mode == AixLib.Electrical.Types.Load.VariableZ_P_input "Power consumed" Modelica.Blocks.Interfaces.RealInput y2 if plugPhase2 and mode == AixLib.Electrical.Types.Load.VariableZ_y_input "Fraction of the nominal power consumed" Modelica.Blocks.Interfaces.RealInput Pow2(unit="W") if plugPhase2 and mode == AixLib.Electrical.Types.Load.VariableZ_P_input "Power consumed" Modelica.Blocks.Interfaces.RealInput y3 if plugPhase3 and mode == AixLib.Electrical.Types.Load.VariableZ_y_input "Fraction of the nominal power consumed" Modelica.Blocks.Interfaces.RealInput Pow3(unit="W") if plugPhase3 and mode == AixLib.Electrical.Types.Load.VariableZ_P_input "Power consumed" AixLib.Electrical.Utilities.VoltageControl vCTRL_1( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, vThresh=vThresh, tDelay=tDelay, V_nominal=V_nominal/sqrt(3)) if plugPhase1 and voltageCtrl "Voltage controller for load 1" Modelica.Blocks.Math.Product cmd1 if plugPhase1 and voltageCtrl "Block that impose voltage ctrl" AixLib.Electrical.Utilities.VoltageControl vCTRL_2( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, vThresh=vThresh, tDelay=tDelay, V_nominal=V_nominal/sqrt(3)) if plugPhase2 and voltageCtrl "Voltage controller for load 2" Modelica.Blocks.Math.Product cmd2 if plugPhase2 and voltageCtrl "Block that impose voltage ctrl" AixLib.Electrical.Utilities.VoltageControl vCTRL_3( redeclare package PhaseSystem = AixLib.Electrical.PhaseSystems.OnePhase, redeclare AixLib.Electrical.AC.OnePhase.Interfaces.Terminal_n terminal, vThresh=vThresh, tDelay=tDelay, V_nominal=V_nominal/sqrt(3)) if plugPhase3 and voltageCtrl "Voltage controller for load 3" Modelica.Blocks.Math.Product cmd3 if plugPhase3 and voltageCtrl "Block that impose voltage ctrl" Interfaces.WyeToDelta wyeToDelta if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_delta) "Wye to delta load connection" Interfaces.WyeToWyeGround wyeToWyeGround if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_wyeg) "Wye to wye grounded connection" protected Interfaces.Adapter3to3 adaDel if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_delta) "Adapter" Interfaces.Adapter3to3 adaWye if (loadConn == AixLib.Electrical.Types.LoadConnection.wye_to_wyeg) "Adapter" equation // Connections enabled when the input provided is y (between 0 and 1) if mode==AixLib.Electrical.Types.Load.VariableZ_y_input then if plugPhase1 and voltageCtrl then connect(cmd1.y, load1.y) connect(cmd1.u2, y1) end if; if plugPhase1 and not voltageCtrl then connect(y1, load1.y) end if; if plugPhase2 and voltageCtrl then connect(cmd2.y, load2.y) connect(cmd2.u2, y2) end if; if plugPhase2 and not voltageCtrl then connect(y2, load2.y) end if; if plugPhase3 and voltageCtrl then connect(cmd3.y, load3.y) connect(cmd3.u2, y3) end if; if plugPhase3 and not voltageCtrl then connect(y3, load3.y) end if; end if; // Connections enabled when the input provided is the power if mode==AixLib.Electrical.Types.Load.VariableZ_P_input then if plugPhase1 and voltageCtrl then connect(cmd1.y, load1.Pow) connect(cmd1.u2, Pow1) end if; if plugPhase1 and not voltageCtrl then connect(Pow1, load1.Pow) end if; if plugPhase2 and voltageCtrl then connect(cmd2.y, load2.Pow) connect(cmd2.u2, Pow2) end if; if plugPhase2 and not voltageCtrl then connect(Pow2, load2.Pow) end if; if plugPhase3 and voltageCtrl then connect(cmd3.y, load3.Pow) connect(cmd3.u2, Pow3) end if; if plugPhase3 and not voltageCtrl then connect(Pow3, load3.Pow) end if; end if; // Connections enabled when phase 1 is plugged and voltage ctrl activated if plugPhase1 and voltageCtrl then connect(load1.terminal, vCTRL_1.terminal) connect(vCTRL_1.y, cmd1.u1) end if; if plugPhase2 and voltageCtrl then connect(load2.terminal, vCTRL_2.terminal) connect(vCTRL_2.y, cmd2.u1) end if; if plugPhase3 and voltageCtrl then connect(load3.terminal, vCTRL_3.terminal) connect(vCTRL_3.y, cmd3.u1) end if; // Connection of the single loads to the 3phases connector if plugPhase1 then connect(load1.terminal, adaDel.terminals[1]) connect(load1.terminal, adaWye.terminals[1]) end if; if plugPhase2 then connect(load2.terminal, adaDel.terminals[2]) connect(load2.terminal, adaWye.terminals[2]) end if; if plugPhase3 then connect(load3.terminal, adaDel.terminals[3]) connect(load3.terminal, adaWye.terminals[3]) end if; connect(adaDel.terminal, wyeToDelta.delta) connect(adaWye.terminal, wyeToWyeGround.wyeg) end BaseLoadCtrl;
Partial model of a three-phase unbalanced impedance without neutral cable. This model represents a partial interface for a three-phase AC unbalanced impedance without neutral cable.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model Impedance "Partial model of a three-phase unbalanced impedance without neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.BaseImpedance; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_n terminal "Electrical connector" equation connect(terminal, wyeToDelta.wye) connect(terminal, wyeToWyeGround.wye) end Impedance;
Partial model of a three-phase unbalanced impedance with neutral cable. This model represents a partial interface for a three-phase AC unbalanced impedance with a neutral cable. The current in the neutral cable is computed as the algebraic sum of the currents in the loads.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model Impedance_N "Partial model of a three-phase unbalanced impedance with neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.BaseImpedance; Interfaces.Terminal4_n terminal "Electrical connector" Interfaces.Connection3to4_n connection3to4 "Connection from three-phase and neutral to three-phase" equation connect(connection3to4.terminal3, wyeToDelta.wye) connect(connection3to4.terminal3, wyeToWyeGround.wye) connect(connection3to4.terminal4, terminal) end Impedance_N;
Partial model of a three-phase load with voltage controller without neutral cable. This model represents a partial interface for a three-phase AC unbalanced load without neutral cable.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model LoadCtrl "Partial model of a three-phase load with voltage controller without neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.BaseLoadCtrl; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_n terminal "Connector for three-phase unbalanced systems without neutral cable" equation connect(terminal, wyeToDelta.wye) connect(terminal, wyeToWyeGround.wye) end LoadCtrl;
Partial model of a three-phase unbalanced load with voltage controller and neutral cable. This model represents a partial interface for a three-phase AC unbalanced load with neutral cable. The current in the neutral cable is computed as the algebraic sum of the currents in the loads.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses; partial model LoadCtrl_N "Partial model of a three-phase unbalanced load with voltage controller and neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.BaseClasses.BaseLoadCtrl; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal4_n terminal "Connector for three-phase unbalanced systems with neutral cable" AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Connection3to4_n connection3to4 "Connection from three-phase and neutral to three-phase" equation connect(connection3to4.terminal3, wyeToDelta.wye) connect(connection3to4.terminal3, wyeToWyeGround.wye) connect(connection3to4.terminal4, terminal) end LoadCtrl_N;
Package with base class models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; package BaseClasses "Package with base class models" extends Modelica.Icons.BasesPackage; end BaseClasses;
This model tests three-phase unbalanced impedances with and without neutral cable. This example model shows how to use three-phase unbalanced impedances with and without neutral cable.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.Examples; model Impedances "This model tests three-phase unbalanced impedances with and without neutral cable" extends Modelica.Icons.Example; Sources.FixedVoltage_N sou_N(definiteReference=true, f=60, V=480) "Voltage source with neutral cable" Sensors.GeneralizedSensor_N sen_N "Power sensor with neutral cable" Impedance_N imp_N( plugPhase2=false, use_R_in=true, RMin=1, RMax=10, use_L_in=true, LMin=0.1, LMax=1) "Impedance with neutral cable" Sources.FixedVoltage sou(definiteReference=true, f=60, V=480) "Voltage source without neutral cable" Sensors.GeneralizedSensor sen "Power sensor without neutral cable" Impedance imp( plugPhase2=false, use_R_in=true, RMin=1, RMax=10, use_L_in=true, LMin=0.1, LMax=1) "Impedance without neutral cable" Modelica.Blocks.Sources.Ramp var_RL( duration=0.5, startTime=0.25, height=1, offset=0) "Power signal for loads on phase 1" equation connect(sou.terminal, sen.terminal_n) connect(sen.terminal_p, imp.terminal) connect(var_RL.y, imp.y_R) connect(var_RL.y, imp.y_L) connect(var_RL.y, imp_N.y_R) connect(var_RL.y, imp_N.y_L) connect(sou_N.terminal, sen_N.terminal_n) connect(sen_N.terminal_p, imp_N.terminal) end Impedances;
Voltage source. This example model shows how the voltage controller can act on a three-phase unbalanced load.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.Examples; model LoadCtrl extends Modelica.Icons.Example; Sources.FixedVoltage_N sou(f=60, V=480) "Voltage source" Modelica.Blocks.Sources.Sine pow_1( f=0.1, amplitude=4500, offset=6000) "Power on phase 1" Resistive_N load_ctrl( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, vThresh=0.05, tDelay=2, voltageCtrl=true, plugPhase2=false, plugPhase3=false, V_nominal=480) "Voltage controlled load" Lines.Line_N line1( mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu10 commercialCable, l=400, P_nominal=10000, V_nominal=480) "Transmission line to voltage controlled load" Resistive_N load( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase2=false, plugPhase3=false, V_nominal=480) "Load" Lines.Line_N line( mode=AixLib.Electrical.Types.CableMode.commercial, redeclare AixLib.Electrical.Transmission.LowVoltageCables.Cu10 commercialCable, l=400, P_nominal=10000, V_nominal=480) equation connect(pow_1.y, load_ctrl.Pow1) connect(pow_1.y, load.Pow1) connect(sou.terminal, line1.terminal_n) connect(sou.terminal, line.terminal_n) connect(line.terminal_p, load.terminal) connect(line1.terminal_p, load_ctrl.terminal) end LoadCtrl;
This model tests the load models without neutral cable connection. This example model shows how three-phase unbalanced loads can be used.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.Examples; model Loads "This model tests the load models without neutral cable connection" extends Modelica.Icons.Example; Sources.FixedVoltage sou(definiteReference=true, f=60, V=480) "Voltage source" Modelica.Blocks.Sources.Sine ph_1( amplitude=2000, f=10, offset=-2500) "Power signal for loads on phase 1" Modelica.Blocks.Sources.Constant ph_23(k=0) "Power signal for loads on phase 2 and 3" Resistive loaR( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, V_nominal=480) "Resistive load" Inductive loaRL(mode=AixLib.Electrical.Types.Load.VariableZ_P_input, V_nominal=480) "Inductive load" Capacitive loaRC(mode=AixLib.Electrical.Types.Load.VariableZ_P_input, V_nominal=480) "Capacitive load" Sensors.GeneralizedSensor sen "Power sensor" Sensors.GeneralizedSensor senSingleConn "Power sensor" Capacitive loaRC1( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase2=false, plugPhase3=false, V_nominal=480) "Capacitive load" Inductive loaRL1( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase2=false, plugPhase3=false, V_nominal=480) "Inductive load" Resistive loaR1( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, plugPhase2=false, plugPhase3=false, V_nominal=480) "Resistive load" equation connect(ph_1.y, loaR.Pow1) connect(ph_23.y, loaR.Pow3) connect(ph_23.y, loaR.Pow2) connect(ph_1.y, loaRL.Pow1) connect(ph_1.y, loaRC.Pow1) connect(ph_23.y, loaRL.Pow2) connect(ph_23.y, loaRL.Pow3) connect(ph_23.y, loaRC.Pow2) connect(ph_23.y, loaRC.Pow3) connect(sou.terminal, sen.terminal_n) connect(sen.terminal_p, loaR.terminal) connect(sen.terminal_p, loaRL.terminal) connect(sen.terminal_p, loaRC.terminal) connect(senSingleConn.terminal_p, loaR1.terminal) connect(senSingleConn.terminal_p, loaRL1.terminal) connect(senSingleConn.terminal_p, loaRC1.terminal) connect(ph_1.y, loaRC1.Pow1) connect(ph_1.y, loaRL1.Pow1) connect(ph_1.y, loaR1.Pow1) connect(sou.terminal, senSingleConn.terminal_n) end Loads;
This model tests unbalanced load models with neutral cable connection. This example model shows how three-phase unbalanced loads with the neutral cable can be used.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.Examples; model Loads_N "This model tests unbalanced load models with neutral cable connection" extends Modelica.Icons.Example; Sources.FixedVoltage_N sou(definiteReference=true, f=60, V=480) "Voltage source" Modelica.Blocks.Sources.Ramp ph_1( offset=-1000, duration=0.5, startTime=0.25, height=-500) "Power signal for loads on phase 1" Modelica.Blocks.Sources.Constant ph_23(k=-1000) "Power signal for loads on phase 2 and 3" Resistive_N loaR_N(mode=AixLib.Electrical.Types.Load.VariableZ_P_input, V_nominal=480) "Resistive load with neutral cable" Inductive_N loaRL_N(mode=AixLib.Electrical.Types.Load.VariableZ_P_input, pf=0.9, V_nominal=480) "Inductive load with neutral cable" Capacitive_N loaRC_N( mode=AixLib.Electrical.Types.Load.VariableZ_P_input, pf=0.7, V_nominal=480) "Capacitive load with neutral cable" Sensors.GeneralizedSensor_N sen "Power sensor with neutral cable" equation connect(ph_1.y, loaR_N.Pow1) connect(ph_23.y, loaR_N.Pow3) connect(ph_23.y, loaR_N.Pow2) connect(ph_1.y, loaRL_N.Pow1) connect(ph_1.y, loaRC_N.Pow1) connect(ph_23.y, loaRL_N.Pow2) connect(ph_23.y, loaRL_N.Pow3) connect(ph_23.y, loaRC_N.Pow2) connect(ph_23.y, loaRC_N.Pow3) connect(sou.terminal, sen.terminal_n) connect(sen.terminal_p, loaR_N.terminal) connect(sen.terminal_p, loaRL_N.terminal) connect(sen.terminal_p, loaRC_N.terminal) end Loads_N;
Package with example models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads; package Examples "Package with example models" extends Modelica.Icons.ExamplesPackage; end Examples;
Sensor for power, voltage and current (3 wire system, no neutral cable). Ideal sensor that measures power, voltage and current in a three-phase unbalanced system without a neutral cable. The two components of the power <i>S</i> are the active and reactive power for each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; model GeneralizedSensor "Sensor for power, voltage and current (3 wire system, no neutral cable)" Interfaces.Terminal_n terminal_n "Electrical connector side N" Interfaces.Terminal_p terminal_p "Electrical connector side P" Modelica.Blocks.Interfaces.RealOutput V[3](each final quantity="ElectricPotential", each final unit="V") "Voltage" Modelica.Blocks.Interfaces.RealOutput I[3](each final quantity="ElectricCurrent", each final unit="A") "Current" Modelica.Blocks.Interfaces.RealOutput S[3, AixLib.Electrical.PhaseSystems.OnePhase.n]( each final quantity="Power", each final unit="W") "Phase powers" equation for i in 1:3 loop V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal_n.phase[i].v); I[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemCurrent(terminal_n.phase[i].i); S[i,:] = AixLib.Electrical.PhaseSystems.OnePhase.phasePowers_vi(v=terminal_n.phase[i].v, i=terminal_n.phase[i].i); end for; connect(terminal_n, terminal_p) end GeneralizedSensor;
Sensor for power, voltage and current (4 wire system, with neutral cable). Ideal sensor that measures power, voltage and current in a three-phase unbalanced system with neutral cable. The two components of the power <i>S</i> are the active and reactive power for each phase.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; model GeneralizedSensor_N "Sensor for power, voltage and current (4 wire system, with neutral cable)" Interfaces.Terminal4_n terminal_n "Electrical connector side N" Interfaces.Terminal4_p terminal_p "Electrical connector side P" Modelica.Blocks.Interfaces.RealOutput V[4](each final quantity="ElectricPotential", each final unit="V") "Voltage" Modelica.Blocks.Interfaces.RealOutput I[4](each final quantity="ElectricCurrent", each final unit="A") "Current" Modelica.Blocks.Interfaces.RealOutput S[4, AixLib.Electrical.PhaseSystems.OnePhase.n]( each final quantity="Power", each final unit="W") "Phase powers" equation for i in 1:4 loop V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(terminal_n.phase[i].v); I[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemCurrent(terminal_n.phase[i].i); S[i,:] = AixLib.Electrical.PhaseSystems.OnePhase.phasePowers_vi(v=terminal_n.phase[i].v, i=terminal_n.phase[i].i); end for; connect(terminal_n, terminal_p) end GeneralizedSensor_N;
Package with sensor models for three-phase unbalanced AC systems
within AixLib.Electrical.AC.ThreePhasesUnbalanced; package Sensors "Package with sensor models for three-phase unbalanced AC systems" extends Modelica.Icons.SensorsPackage; end Sensors;
Model of a probe that measures voltage magnitude and angle (Delta configuration). This model represents a probe that measures the RMS voltage and the angle of the voltage phasors at a given point. The probes are connected in the Wye (Y) grounded configuration.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; model ProbeDelta "Model of a probe that measures voltage magnitude and angle (Delta configuration)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_n term "Electrical connector" Interfaces.WyeToDelta wyeToDelta "Y to D transformation" equation for i in 1:3 loop theta[i] = AixLib.Electrical.PhaseSystems.OnePhase.phase(wyeToDelta.delta.phase[i].v); if perUnit then V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(wyeToDelta.delta.phase[i].v)/V_nominal; else V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(wyeToDelta.delta.phase[i].v); end if; end for; connect(term, wyeToDelta.wye) end ProbeDelta;
Model of a probe that measures voltage magnitude and angle (Wye configuration). This model represents a probe that measures the RMS voltage and the angle of the voltage phasors at a given point. The probes are connected in the Wye (Y) grounded configuration.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; model ProbeWye "Model of a probe that measures voltage magnitude and angle (Wye configuration)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_n term "Electrical connector" Interfaces.WyeToWyeGround wyeToWyeGround "Y to Y grounded transformation" equation for i in 1:3 loop theta[i] = AixLib.Electrical.PhaseSystems.OnePhase.phase(wyeToWyeGround.wyeg.phase[i].v); if perUnit then V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(wyeToWyeGround.wyeg.phase[i].v)/(V_nominal/sqrt(3)); else V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(wyeToWyeGround.wyeg.phase[i].v); end if; end for; connect(term, wyeToWyeGround.wye) end ProbeWye;
Model of a probe that measures voltage magnitude and angle (Wye configuration) witn neutral cable connection. This model represents a probe that measures the RMS voltage and the angle of the voltage phasors at a given point. The probes are connected in the Wye (Y) grounded configuration.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; model ProbeWye_N "Model of a probe that measures voltage magnitude and angle (Wye configuration) witn neutral cable connection" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe; AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal4_n term "Electrical connector" equation for i in 1:4 loop term.phase[i].i = zeros(AixLib.Electrical.PhaseSystems.OnePhase.n); end for; for i in 1:3 loop theta[i] = AixLib.Electrical.PhaseSystems.OnePhase.phase(term.phase[i].v - term.phase[4].v); if perUnit then V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(term.phase[i].v - term.phase[4].v)/(V_nominal/sqrt(3)); else V[i] = AixLib.Electrical.PhaseSystems.OnePhase.systemVoltage(term.phase[i].v - term.phase[4].v); end if; end for; end ProbeWye_N;
Partial model of a generalized three-phase probe. This model contains the parameters and connectors that are used by probe models such as <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye</a> and <a href=\"modelica://AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta\"> AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta</a>. The output connectors are for the RMS voltage and the angle of the voltage phasors.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses; partial model GeneralizedProbe "Partial model of a generalized three-phase probe" extends Icons.GeneralizedProbe; parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=480) "RMS Nominal voltage (V_nominal >= 0)"; parameter Boolean perUnit = true "This flag display voltage in p.u."; Modelica.Blocks.Interfaces.RealOutput V[3](each unit="1") "Voltage in per unit" Modelica.Blocks.Interfaces.RealOutput theta[3](each unit="rad", each displayUnit="deg") "Angle" end GeneralizedProbe;
Package that contains base classes
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; package BaseClasses "Package that contains base classes" extends Modelica.Icons.BasesPackage; end BaseClasses;
Package with example models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors; package Examples "Package with example models" extends Modelica.Icons.ExamplesPackage; end Examples;
Test models for sensors and probes. This example shows how different types of sensors and probes can be used to measure the voltages, currents and powers in a three-phase unbalanced system.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.Examples; model Sensors "Test models for sensors and probes" extends Modelica.Icons.Example; Sources.FixedVoltage source( f=60, V=480) "Voltage source without neutral cable" Loads.Resistive load( V_nominal=480, mode=AixLib.Electrical.Types.Load.VariableZ_P_input) "Load model" ProbeWye probeWye(V_nominal=480) "Probe that measures the phase voltages" ProbeDelta probeDelta(V_nominal=480) "Probe that measures the line voltages" Sources.FixedVoltage_N source_N( f=60, V=480) "Voltage source with neutral cable" Loads.Resistive_N load_N( V_nominal=480, mode=AixLib.Electrical.Types.Load.VariableZ_P_input) "Load model" ProbeWye_N probeWye_N(V_nominal=480) GeneralizedSensor sen "Generalized sensor withour neutral cable" GeneralizedSensor_N sen_N "Generalized sensor with neutral cable" Modelica.Blocks.Sources.Ramp ramp( height=2e4, duration=0.5, offset=-1e4, startTime=0.25) equation connect(probeWye.term, source.terminal) connect(probeDelta.term, source.terminal) connect(source_N.terminal, probeWye_N.term) connect(source_N.terminal, sen_N.terminal_n) connect(sen_N.terminal_p, load_N.terminal) connect(sen.terminal_p, load.terminal) connect(sen.terminal_n, source.terminal) connect(ramp.y, load.Pow1) connect(ramp.y, load.Pow2) connect(ramp.y, load.Pow3) connect(ramp.y, load_N.Pow1) connect(ramp.y, load_N.Pow2) connect(ramp.y, load_N.Pow3) end Sensors;
Fixed voltage source. This is a constant voltage source, specifying the complex voltage by the RMS voltage and the phase shift.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model FixedVoltage "Fixed voltage source" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource; parameter Modelica.Units.SI.Frequency f(start=60) "Frequency of the source"; parameter Modelica.Units.SI.Voltage V(start=480) "RMS voltage of the source"; parameter Modelica.Units.SI.Angle phiSou=0 "Phase shift of the source"; parameter Boolean potentialReference = true "Serve as potential root for the reference angle theta" parameter Boolean definiteReference = false "Serve as definite root for the reference angle theta" constant Modelica.Units.SI.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" protected Interfaces.Adapter3to3 ada "Adapter between the different connectors" equation connect(vPhase.terminal, ada.terminals) connect(ada.terminal, connection3to4.terminal4) end FixedVoltage;
Fixed voltage source with neutral cable. 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.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model FixedVoltage_N "Fixed voltage source with neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource_N; parameter Modelica.Units.SI.Frequency f(start=60) "Frequency of the source"; parameter Modelica.Units.SI.Voltage V(start=480) "RMS voltage of the source"; parameter Modelica.Units.SI.Angle phiSou=0 "Phase shift of the source"; parameter Boolean potentialReference = true "Serve as potential root for the reference angle theta" parameter Boolean definiteReference = false "Serve as definite root for the reference angle theta" constant Modelica.Units.SI.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;
Electrical grid. Model that can be used to represent the electrical grid supply.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model Grid "Electrical grid" parameter Modelica.Units.SI.Frequency f(start=60) "Frequency of the source"; parameter Modelica.Units.SI.Voltage V(start=480) "RMS voltage of the source"; parameter Modelica.Units.SI.Angle phiSou=0 "Phase shift of the source"; AixLib.Electrical.AC.Interfaces.PowerOutput P[3] "Power consumed from grid if positive, or fed to grid if negative" AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal_p terminal "Connector for three-phase unbalanced systems" AixLib.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;
Electrical grid with neutral cable. Model that can be used to represent the electrical grid supply with a neutral cable connection. The neutral cable is connected to the ground.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model Grid_N "Electrical grid with neutral cable" parameter Modelica.Units.SI.Frequency f(start=60) "Frequency of the source"; parameter Modelica.Units.SI.Voltage V(start=480) "RMS voltage of the source"; parameter Modelica.Units.SI.Angle phiSou=0 "Phase shift of the source"; AixLib.Electrical.AC.Interfaces.PowerOutput P[3] "Power consumed from grid if positive, or fed to grid if negative" AixLib.Electrical.AC.ThreePhasesUnbalanced.Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems" AixLib.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;
Package with sources model for three-phase unbalanced AC systems
within AixLib.Electrical.AC.ThreePhasesUnbalanced; package Sources "Package with sources model for three-phase unbalanced AC systems" extends Modelica.Icons.SourcesPackage; end Sources;
Simple wind turbine source without neutral cable. Simple wind turbine model for three-phase unbalanced systems without neutral cable connection.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model WindTurbine "Simple wind turbine source without neutral cable" extends BaseClasses.UnbalancedWindTurbine( redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase1, redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase2, redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase3); end WindTurbine;
Simple wind turbine source with neutral cable. Simple wind turbine model for three-phase unbalanced systems with neutral cable connection.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; model WindTurbine_N "Simple wind turbine source with neutral cable" extends BaseClasses.UnbalancedWindTurbine_N( redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase1, redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase2, redeclare AixLib.Electrical.AC.OnePhase.Sources.WindTurbine wt_phase3); end WindTurbine_N;
Partial model for an unbalanced wind power source. This model is a partial class extended by three-phase unbalanced wind turbine power sources.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses; partial model BaseUnbalancedWindTurbine "Partial model for an unbalanced wind power source" extends AixLib.Electrical.Interfaces.PartialPluggableUnbalanced; extends AixLib.Electrical.Interfaces.PartialAcDcParameters; extends AixLib.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase( V_nominal(start = 480)); parameter Real scaleFraction[3](each min=0, each max=1.0) = ones(3)/3 "Fraction of power allocated to the wind turbines of each phase"; replaceable OnePhase.Sources.WindTurbine wt_phase2( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[2], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase2 "Wind turbine phase 2" replaceable OnePhase.Sources.WindTurbine wt_phase3( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[3], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase3 "Wind turbine phase 3" replaceable OnePhase.Sources.WindTurbine wt_phase1( pf=pf, eta_DCAC=eta_DCAC, scale=scale*scaleFraction[1], h=h, hRef=hRef, nWin=nWin, tableOnFile=tableOnFile, table=table, tableName=tableName, fileName=fileName, V_nominal=V_nominal/sqrt(3)) if plugPhase1 "Wind turbine phase 1" Modelica.Blocks.Math.Add3 sumBlock "Sum of th epower generated on each phase" equation assert(abs(sum(scaleFraction)-1) < Modelica.Constants.eps, "Model that extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine, has an invalid value for the vector scaleFraction[:]. The sum of the elements has to be equal to 1.0.", level=AssertionLevel.error); if plugPhase1 then connect(wt_phase1.P, sumBlock.u1) else sumBlock.u1 = 0; end if; if plugPhase2 then connect(wt_phase2.P, sumBlock.u2) else sumBlock.u2 = 0; end if; if plugPhase3 then connect(wt_phase3.P, sumBlock.u3) else sumBlock.u3 = 0; end if; connect(sumBlock.y, P) connect(vWin, wt_phase1.vWin) connect(vWin, wt_phase2.vWin) connect(vWin, wt_phase3.vWin) end BaseUnbalancedWindTurbine;
Package with base class models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; package BaseClasses "Package with base class models" extends Modelica.Icons.BasesPackage; end BaseClasses;
Partial model for a three-phase AC unbalanced voltage source without neutral cable. This model is a partial class extended by three-phase unbalanced voltage sources without neutral cable connection.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses; partial model PartialSource "Partial model for a three-phase AC unbalanced voltage source without neutral cable" Interfaces.Connection3to3Ground_p connection3to4 "Connection between three to four AC connectors with ground connection" OnePhase.Basics.Ground ground "Ground reference" Interfaces.Terminal_p terminal "Connector for three-phase unbalanced systems" equation connect(connection3to4.terminal3,terminal) connect(ground.terminal, connection3to4.ground4) end PartialSource;
Partial model for a three-phase AC unbalanced voltage source with neutral cable. This model is a partial class extended by three-phase unbalanced voltage sources that have a neutral cable.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses; partial model PartialSource_N "Partial model for a three-phase AC unbalanced voltage source with neutral cable" OnePhase.Basics.Ground ground "Ground reference" Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems with neutral cable" equation connect(ground.terminal, terminal.phase[4]) end PartialSource_N;
Base model for an unbalanced wind power source without neutral cable. This model is a class extended by three-phase unbalanced wind turbine power sources without neutral cable.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses; model UnbalancedWindTurbine "Base model for an unbalanced wind power source without neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine; extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.PartialSource; protected Interfaces.Adapter3to3 ada "Adapter" equation if plugPhase1 then connect(wt_phase1.terminal, ada.terminals[1]) end if; if plugPhase2 then connect(wt_phase2.terminal, ada.terminals[2]) end if; if plugPhase3 then connect(wt_phase3.terminal, ada.terminals[3]) end if; connect(ada.terminal, connection3to4.terminal4) end UnbalancedWindTurbine;
Base model for an unbalanced wind power source with neutral cable. This model is a class extended by three-phase unbalanced wind turbine power sources with neutral cable connection.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses; model UnbalancedWindTurbine_N "Base model for an unbalanced wind power source with neutral cable" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.BaseClasses.BaseUnbalancedWindTurbine; Interfaces.Terminal4_p terminal "Connector for three-phase unbalanced systems with neutral cable" Interfaces.Connection3to4_p conn3to4 "Connection between 3 to 4 wire" protected Interfaces.Adapter3to3 ada "Adapter" equation if plugPhase1 then connect(wt_phase1.terminal, ada.terminals[1]) end if; if plugPhase2 then connect(wt_phase2.terminal, ada.terminals[2]) end if; if plugPhase3 then connect(wt_phase3.terminal, ada.terminals[3]) end if; connect(conn3to4.terminal4, terminal) connect(ada.terminal, conn3to4.terminal3) end UnbalancedWindTurbine_N;
This example illustrates how using a fixed voltage source. This example shows how to use a fixed voltage generator model.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.Examples; model FixedVoltageSource "This example illustrates how using a fixed voltage source" extends Modelica.Icons.Example; FixedVoltage grid( f=60, V=480, definiteReference=true, phiSou=0.17453292519943) "AC one phase electrical grid" Sensors.ProbeWye sen(V_nominal=480) "Probe that measures the voltage at the load" Loads.Inductive loa(P_nominal=-2000, V_nominal=480) "Inductive load" FixedVoltage_N grid_N( f=60, V=480, definiteReference=true, phiSou=0.17453292519943) "AC one phase electrical grid" Sensors.ProbeWye_N sen_N(V_nominal=480) "Probe that measures the voltage at the load" Loads.Inductive_N loa_N(P_nominal=-2000, V_nominal=480) "Inductive load" equation connect(grid.terminal, loa.terminal) connect(grid.terminal, sen.term) connect(grid_N.terminal, loa_N.terminal) connect(grid_N.terminal, sen_N.term) end FixedVoltageSource;
Package with example models
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources; package Examples "Package with example models" extends Modelica.Icons.ExamplesPackage; end Examples;
Example for the WindTurbine AC model. This model illustrates the use of the wind turbine model, which is connected to a AC voltage source and a resistive load. This voltage source can represent the grid to which the circuit is connected. Wind data for San Francisco, CA, are used. The turbine cut-in wind speed is <i>3.5</i> m/s, and hence it is off in the first day when the wind speed is low.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.Examples; model WindTurbine "Example for the WindTurbine AC model" extends Modelica.Icons.Example; AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine tur( table=[3.5, 0; 5.5, 100; 12, 900; 14, 1000; 25, 1000], h=10, scale=10, V_nominal=480, scaleFraction={0.5,0.25,0.25}) "Wind turbine" AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat( computeWetBulbTemperature=false, filNam=Modelica.Utilities.Files.loadResource("modelica://AixLib/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Weather data" AixLib.BoundaryConditions.WeatherData.Bus weaBus "Weather bus"; Loads.Resistive res(P_nominal=-500, V_nominal=480) "Resistive line" Grid sou(f=60, V=480) "Voltage source" Sensors.GeneralizedSensor sen "Generalized sensor" AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Line line( l=200, P_nominal=5000, V_nominal=480) equation connect(weaDat.weaBus,weaBus) connect(weaBus.winSpe,tur. vWin) connect(sou.terminal, res.terminal) connect(sen.terminal_p, tur.terminal) connect(sou.terminal, line.terminal_n) connect(line.terminal_p, sen.terminal_n) end WindTurbine;
Example for the WindTurbine AC model with neutral cable. This model illustrates the use of the wind turbine model with neutral cable, which is connected to a AC voltage source and a resistive load. This voltage source can represent the grid to which the circuit is connected. Wind data for San Francisco, CA, are used. The turbine cut-in wind speed is <i>3.5</i> m/s, and hence it is off in the first day when the wind speed is low.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.Examples; model WindTurbine_N "Example for the WindTurbine AC model with neutral cable" extends Modelica.Icons.Example; AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.WindTurbine_N tur( table=[3.5, 0; 5.5, 100; 12, 900; 14, 1000; 25, 1000], h=10, scale=10, V_nominal=480, plugPhase2=false, scaleFraction={0.4,0.0,0.6}) "Wind turbine" AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat( computeWetBulbTemperature=false, filNam=Modelica.Utilities.Files.loadResource("modelica://AixLib/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos")) "Weather data" AixLib.BoundaryConditions.WeatherData.Bus weaBus "Weather bus"; Loads.Resistive_N res(P_nominal=-500, V_nominal=480) "Resistive line" Grid_N sou(f=60, V=480) "Voltage source" Sensors.GeneralizedSensor_N sen "Generalized sensor" AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.Line_N line( l=200, P_nominal=5000, V_nominal=480) equation connect(weaDat.weaBus,weaBus) connect(weaBus.winSpe,tur. vWin) connect(tur.terminal, sen.terminal_p) connect(sen.terminal_n, line.terminal_p) connect(line.terminal_n, sou.terminal) connect(res.terminal, sou.terminal) end WindTurbine_N;
Package with validation examples and tests for the AC three-phase unbalanced models
within AixLib.Electrical.AC.ThreePhasesUnbalanced; package Validation "Package with validation examples and tests for the AC three-phase unbalanced models" extends Modelica.Icons.ExamplesPackage; end Validation;
This package contains models of the IEEE tests for feeders
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation; package IEEETests "This package contains models of the IEEE tests for feeders" extends Modelica.Icons.ExamplesPackage; end IEEETests;
This package contains models for the IEEE 4 nodes test feeder
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests; package Test4NodesFeeder "This package contains models for the IEEE 4 nodes test feeder" extends Modelica.Icons.ExamplesPackage; end Test4NodesFeeder;
IEEE 4 node test feeder model with balanced load and D - D connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepDown; model DD "IEEE 4 node test feeder model with balanced load and D - D connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={12339,12349,12321}, final V3_ref={3911,3914,3905}, final V4_ref={3442,3497,3384}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.7,-90.4,149.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{26.5,-93.6,146.4}, final Theta4_ref=Modelica.Constants.pi/180.0*{22.3,-99.4,140.7}, loadRL(use_pf_in=false, loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerDD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DD;
IEEE 4 node test feeder model with balanced load and D - Y connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepDown; model DY "IEEE 4 node test feeder model with balanced load and D - Y connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={12340,12349,12318}, final V3_ref={2249,2263,2259}, final V4_ref={1920,2054,1986}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.7,-90.4,149.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{-33.7,-153.4,86.4}, final Theta4_ref=Modelica.Constants.pi/180.0*{-39.1,-158.3,80.9}, loadRL(use_pf_in=false, load1(v(start={1500, 1200})))); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepDownDY transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DY;
Package that contains the examples for balanced loads and step down transformer
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder; package BalancedStepDown "Package that contains the examples for balanced loads and step down transformer" extends Modelica.Icons.ExamplesPackage; end BalancedStepDown;
IEEE 4 node test feeder model with balanced load and Y - D connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepDown; model YD "IEEE 4 node test feeder model with balanced load and Y - D connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={7113,7132,7123}, final V3_ref={3906,3915,3909}, final V4_ref={3437,3497,3388}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.3,-120.3,119.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{-3.5,-123.6,116.3}, final Theta4_ref=Modelica.Constants.pi/180.0*{-7.8,-129.3,110.6}, loadRL(use_pf_in=false, loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepDownYD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase, conv1( terminal_p(i(start={-477, 327})), V1(start={7000, -400}))) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YD;
IEEE 4 node test feeder model with balanced load and Y - Y connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepDown; model YY "IEEE 4 node test feeder model with balanced load and Y - Y connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={7107,7140,7121}, final V3_ref={2247,2269,2256}, final V4_ref={1918,2061,1981}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.3,-120.3,119.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{-3.7,-123.5,116.4}, final Theta4_ref=Modelica.Constants.pi/180.0*{-9.1,-128.3,110.9}, loadRL(use_pf_in=false)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformer transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YY;
IEEE 4 node test feeder model with balanced load and D - D connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepUp; model DD "IEEE 4 node test feeder model with balanced load and D - D connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={12361,12372,12348}, final V3_ref={23723,23746,23698}, final V4_ref={23657,23688,23625}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.7,-90.4,149.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{26.7,-93.4,146.6}, final Theta4_ref=Modelica.Constants.pi/180.0*{26.6,-93.6,146.5}, loadRL(use_pf_in=false, loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerDD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DD;
IEEE 4 node test feeder model with balanced load and D - Y connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepUp; model DY "IEEE 4 node test feeder model with balanced load and D - Y connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={12361,12372,12348}, final V3_ref={13697,13710,13681}, final V4_ref={13653,13678,13644}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.7,-90.4,149.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{26.7,-93.4,146.6}, final Theta4_ref=Modelica.Constants.pi/180.0*{26.6,-93.5,146.5}, loadRL(use_pf_in=false)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepUpDY transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase, conv1(V1(start={11E3, 6E3})), conv2(V1(start={-700, -11E3}))) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DY;
Package that contains the examples for balanced loads and step up transformer
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder; package BalancedStepUp "Package that contains the examples for balanced loads and step up transformer" extends Modelica.Icons.ExamplesPackage; end BalancedStepUp;
IEEE 4 node test feeder model with balanced load and Y - D connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepUp; model YD "IEEE 4 node test feeder model with balanced load and Y - D connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={7128,7145,7137}, final V3_ref={23746,23722,23698}, final V4_ref={23680,23663,23625}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.3,-120.3,119.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{56.7,-63.4,176.7}, final Theta4_ref=Modelica.Constants.pi/180.0*{56.6,-63.6,176.5}, loadRL(use_pf_in=false, loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta, load1(v(start = {13000, 20000})))); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepUpYD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YD;
IEEE 4 node test feeder model with balanced load and Y - Y connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BalancedStepUp; model YY "IEEE 4 node test feeder model with balanced load and Y - Y connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={7126,7145,7137}, final V3_ref={13675,13715,13698}, final V4_ref={13631,13682,13661}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.3,-120.4,119.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{-3.3,-123.4,116.6}, final Theta4_ref=Modelica.Constants.pi/180.0*{-3.5,-123.5,116.5}, loadRL(use_pf_in=false)); Modelica.Blocks.Sources.Constant load(k=-1800e3) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformer transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load.y, loadRL.Pow1) connect(load.y, loadRL.Pow2) connect(load.y, loadRL.Pow3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, source.terminal) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YY;
Base model of the IEEE 4 nodes test feeder. This is a partial model that is extended by all the other validation test cases. This model defined replaceable probes and transformer so they can be easily changed when implementing the different tests.
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses; partial model IEEE4 "Base model of the IEEE 4 nodes test feeder" extends Modelica.Icons.Example; parameter Modelica.Units.SI.Voltage VLL_side1=12.47e3 "Voltage line to line side 1"; parameter Modelica.Units.SI.Voltage VLL_side2=4.16e3 "Voltage line to line side 2"; parameter Modelica.Units.SI.ApparentPower VARbase=6000e3 "Base VA power of the transformer"; parameter Boolean line1_use_Z_y = true "Choose between Zy or Zd impedance matrix for line 1"; parameter Boolean line2_use_Z_y = true "Choose between Zy or Zd impedance matrix for line 2"; parameter Modelica.Units.SI.Voltage V2_ref[3]={7107,7140,7121} "Reference RMS voltage node 2 - IEEE results"; parameter Modelica.Units.SI.Voltage V3_ref[3]={2247,2269,2256} "Reference RMS voltage node 3 - IEEE results"; parameter Modelica.Units.SI.Voltage V4_ref[3]={1918,2061,1981} "Reference RMS voltage node 4 - IEEE results"; parameter Modelica.Units.SI.Angle Theta2_ref[3](each displayUnit="deg") = {-0.3, -120.3,119.6} "Reference voltage phase angle node 2 - IEEE results"; parameter Modelica.Units.SI.Angle Theta3_ref[3](each displayUnit="deg") = {-3.7, -123.5,116.4} "Reference voltage phase angle node 3 - IEEE results"; parameter Modelica.Units.SI.Angle Theta4_ref[3](each displayUnit="deg") = {-9.1, -128.3,110.9} "Reference voltage phase angle node 4 - IEEE results"; Modelica.Units.SI.Voltage err_V2[3]=node2.V - V2_ref "Error on voltage at node 2"; Modelica.Units.SI.Voltage err_V3[3]=node3.V - V3_ref "Error on voltage at node 3"; Modelica.Units.SI.Voltage err_V4[3]=node4.V - V4_ref "Error on voltage at node 4"; Modelica.Units.SI.Angle err_Theta2[3](each displayUnit="deg") = node2.theta - Theta2_ref "Error on voltage at node 2"; Modelica.Units.SI.Angle err_Theta3[3](each displayUnit="deg") = node3.theta - Theta3_ref "Error on voltage at node 3"; Modelica.Units.SI.Angle err_Theta4[3](each displayUnit="deg") = node4.theta - Theta4_ref "Error on voltage at node 4"; Real err_V2_percent[3] = 100*{err_V2[i]/V2_ref[i] for i in 1:3} "Error in RMS voltage at node 2 -- percent"; Real err_V3_percent[3] = 100*{err_V3[i]/V3_ref[i] for i in 1:3} "Error in RMS voltage at node 3 -- percent"; Real err_V4_percent[3] = 100*{err_V4[i]/V4_ref[i] for i in 1:3} "Error in RMS voltage at node 4 -- percent"; Real err_Theta2_percent[3] = 100*{err_Theta2[i]/Theta2_ref[i] for i in 1:3} "Error in voltage phase angle at node 2 -- percent"; Real err_Theta3_percent[3] = 100*{err_Theta3[i]/Theta3_ref[i] for i in 1:3} "Error in voltage phase angle at node 3 -- percent"; Real err_Theta4_percent[3] = 100*{err_Theta4[i]/Theta4_ref[i] for i in 1:3} "Error in voltage phase angle at node 4 -- percent"; AixLib.Electrical.AC.ThreePhasesUnbalanced.Sources.FixedVoltage source( f=60, V=VLL_side1) "Voltage source" AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL line1( Z11=L1*(if line1_use_Z_y then Z11_y else Z11_d), Z12=L1*(if line1_use_Z_y then Z12_y else Z12_d), Z13=L1*(if line1_use_Z_y then Z13_y else Z13_d), Z22=L1*(if line1_use_Z_y then Z22_y else Z22_d), Z23=L1*(if line1_use_Z_y then Z23_y else Z23_d), Z33=L1*(if line1_use_Z_y then Z33_y else Z33_d), V_nominal=VLL_side1) "Line at primary side" AixLib.Electrical.AC.ThreePhasesUnbalanced.Lines.TwoPortMatrixRL line2( Z11=L2*(if line2_use_Z_y then Z11_y else Z11_d), Z12=L2*(if line2_use_Z_y then Z12_y else Z12_d), Z13=L2*(if line2_use_Z_y then Z13_y else Z13_d), Z22=L2*(if line2_use_Z_y then Z22_y else Z22_d), Z23=L2*(if line2_use_Z_y then Z23_y else Z23_d), Z33=L2*(if line2_use_Z_y then Z33_y else Z33_d), V_nominal=VLL_side2) "Line at secondary side" AixLib.Electrical.AC.ThreePhasesUnbalanced.Loads.Inductive loadRL( pf=0.9, V_nominal=VLL_side2, mode=AixLib.Electrical.Types.Load.VariableZ_P_input, use_pf_in=true) "Load" replaceable AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe node1(perUnit=false, V_nominal=VLL_side1) "Probe at source" replaceable AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe node2(perUnit=false, V_nominal=VLL_side1) "Probe at the primary side of the transformer" replaceable AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe node3(perUnit=false, V_nominal=VLL_side2) "Probe at the secondary side of the transformer" replaceable AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.BaseClasses.GeneralizedProbe node4(perUnit=false, V_nominal=VLL_side2) "Probe at the load" protected parameter Real L1 = 2000*(1.0/5280.0) "Length line 1 in miles"; parameter Real L2 = 2500*(1.0/5280.0) "Length line 2 in miles"; parameter Modelica.Units.SI.Impedance Z11_d[2]={0.4013,1.4133} "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12_d[2]={0.0953,0.8515} "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13_d[2]={0.0953,0.7266} "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22_d[2]={0.4013,1.4133} "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23_d[2]={0.0953,0.7802} "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33_d[2]={0.4013,1.4133} "Element [3,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z11_y[2]={0.4576,1.078} "Element [1,1] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z12_y[2]={0.1559,0.5017} "Element [1,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z13_y[2]={0.1535,0.3849} "Element [1,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z22_y[2]={0.4666,1.0482} "Element [2,2] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z23_y[2]={0.158,0.4236} "Element [2,3] of impedance matrix"; parameter Modelica.Units.SI.Impedance Z33_y[2]={0.4615,1.0651} "Element [3,3] of impedance matrix"; equation connect(source.terminal, line1.terminal_n) connect(line2.terminal_p, loadRL.terminal) end IEEE4;
This package contains the base classes used by the IEEE 4 nodes test feeder
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder; package BaseClasses "This package contains the base classes used by the IEEE 4 nodes test feeder" extends Modelica.Icons.BasesPackage; end BaseClasses;
IEEE 4 node test feeder model with unbalanced load and D - D connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepDown; model DD "IEEE 4 node test feeder model with unbalanced load and D - D connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={12341,12370,12302}, final V3_ref={3902,3972,3871}, final V4_ref={3431,3647,3294}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.8,-90.5,149.5}, final Theta3_ref=Modelica.Constants.pi/180.0*{27.2,-93.9,145.7}, final Theta4_ref=Modelica.Constants.pi/180.0*{24.3,-100.4,138.6}, loadRL(loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta, use_pf_in=true)); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerDD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(load1.y, loadRL.Pow1) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DD;
IEEE 4 node test feeder model with unbalanced load and D - Y connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepDown; model DY "IEEE 4 node test feeder model with unbalanced load and D - Y connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={12350,12314,12333}, final V3_ref={2290,2261,2214}, final V4_ref={2157,1936,1849}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.6,-90.4,149.8}, final Theta3_ref=Modelica.Constants.pi/180.0*{-32.4,-153.8,85.2}, final Theta4_ref=Modelica.Constants.pi/180.0*{-34.2,-157.0,73.4}, loadRL(use_pf_in=true), line2(terminal_p(phase(v(each start=-1))))); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepDownDY transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) Modelica.Blocks.Sources.Constant load1(k=-1275e3) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(load1.y, loadRL.Pow1) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DY;
Package that contains the examples for unbalanced loads and step down transformer
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder; package UnbalancedStepDown "Package that contains the examples for unbalanced loads and step down transformer" extends Modelica.Icons.ExamplesPackage; end UnbalancedStepDown;
IEEE 4 node test feeder model with unbalanced load and Y - D connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepDown; model YD "IEEE 4 node test feeder model with unbalanced load and Y - D connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={7113,7144,7111}, final V3_ref={3896,3972,3875}, final V4_ref={3425,3646,3298}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.2,-120.4,119.5}, final Theta3_ref=Modelica.Constants.pi/180.0*{-2.8,-123.8,115.7}, final Theta4_ref=Modelica.Constants.pi/180.0*{-5.8,-130.3,108.6}, loadRL(loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta, use_pf_in=true, load1(v(each start = 3000))), line1(i1(each start=200))); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepDownYD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(load1.y, loadRL.Pow1) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YD;
IEEE 4 node test feeder model with unbalanced load and Y - Y connection (step down). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepDown; model YY "IEEE 4 node test feeder model with unbalanced load and Y - Y connection (step down)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=4.16e3, final VARbase=6000e3, final V2_ref={7164,7110,7082}, final V3_ref={2305,2255,2203}, final V4_ref={2175,1930,1833}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.1,-120.2,119.3}, final Theta3_ref=Modelica.Constants.pi/180.0*{-2.3,-123.6,114.8}, final Theta4_ref=Modelica.Constants.pi/180.0*{-4.1,-126.8,102.8}, loadRL(use_pf_in=true), line1(i1(start={180, -130}), i2(start={-300, -160}), i3(start={40, 450})), line2(i2(start={-900, -480}), i3(start={130, 1400}))); Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformer transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) equation connect(load1.y, loadRL.Pow1) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YY;
IEEE 4 node test feeder model with unbalanced load and D - D connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepUp; model DD "IEEE 4 node test feeder model with unbalanced load and D - D connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={12362,12392,12334}, final V3_ref={23675,24060,23573}, final V4_ref={23610,24015,23492}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.8,-90.4,149.5}, final Theta3_ref=Modelica.Constants.pi/180.0*{27.2,-93.6,146.0}, final Theta4_ref=Modelica.Constants.pi/180.0*{27.2,-93.7,145.9}, loadRL(loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta, use_pf_in=true)); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerDD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(load1.y, loadRL.Pow1) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(node1.term, source.terminal) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DD;
IEEE 4 node test feeder model with unbalanced load and D - Y connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepUp; model DY "IEEE 4 node test feeder model with unbalanced load and D - Y connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=false, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={12364,12391,12333}, final V3_ref={13792,13733,13641}, final V4_ref={13768,13684,13600}, final Theta2_ref=Modelica.Constants.pi/180.0*{29.8,-90.5,149.6}, final Theta3_ref=Modelica.Constants.pi/180.0*{27.7,-93.5,145.4}, final Theta4_ref=Modelica.Constants.pi/180.0*{27.7,-93.6,145.2}, loadRL(use_pf_in=true)); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepUpDY transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase, conv1(V1(start={10E3, 5.5E3}))) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) Modelica.Blocks.Sources.Constant load1(k=-1275e3) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(load1.y, loadRL.Pow1) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end DY;
Package that contains the examples for unbalanced loads and step up transformer
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder; package UnbalancedStepUp "Package that contains the examples for unbalanced loads and step up transformer" extends Modelica.Icons.ExamplesPackage; end UnbalancedStepUp;
IEEE 4 node test feeder model with unbalanced load and Y - D connection (step up). IEEE 4 nodes validation test case with the following characteristics
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepUp; model YD "IEEE 4 node test feeder model with unbalanced load and Y - D connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=false, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeDelta node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={7121,7147,7150}, final V3_ref={23703,24040,23576}, final V4_ref={23637,23995,23496}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.4,-120.3,119.5}, final Theta3_ref=Modelica.Constants.pi/180.0*{57.2,-63.6,176.1}, final Theta4_ref=Modelica.Constants.pi/180.0*{57.1,-63.8,175.9}, loadRL(loadConn=AixLib.Electrical.Types.LoadConnection.wye_to_delta, use_pf_in=true)); AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformerStepUpYD transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) equation connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(load1.y, loadRL.Pow1) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YD;
IEEE 4 node test feeder model with unbalanced load and Y - Y connection (step up)
within AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.UnbalancedStepUp; model YY "IEEE 4 node test feeder model with unbalanced load and Y - Y connection (step up)" extends AixLib.Electrical.AC.ThreePhasesUnbalanced.Validation.IEEETests.Test4NodesFeeder.BaseClasses.IEEE4( final line1_use_Z_y=true, final line2_use_Z_y=true, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node1, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node2, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node3, redeclare AixLib.Electrical.AC.ThreePhasesUnbalanced.Sensors.ProbeWye node4, final VLL_side1=12.47e3, final VLL_side2=24.9e3, final VARbase=6000e3, final V2_ref={7161,7120,7128}, final V3_ref={13839,13663,13655}, final V4_ref={13815,13614,13615}, final Theta2_ref=Modelica.Constants.pi/180.0*{-0.1,-120.3,119.3}, final Theta3_ref=Modelica.Constants.pi/180.0*{-2.1,-123.3,115.1}, final Theta4_ref=Modelica.Constants.pi/180.0*{-2.2,-123.4,114.9}, loadRL(use_pf_in=true)); Modelica.Blocks.Sources.Constant load2(k=-1800e3) Modelica.Blocks.Sources.Constant load3(k=-2375e3) Modelica.Blocks.Sources.Constant load1(k=-1275e3) Modelica.Blocks.Sources.Constant pf1(k=0.85) Modelica.Blocks.Sources.Constant pf2(k=0.9) Modelica.Blocks.Sources.Constant pf3(k=0.95) AixLib.Electrical.AC.ThreePhasesUnbalanced.Conversion.ACACTransformer transformer( VHigh=VLL_side1, VLow=VLL_side2, XoverR=6, Zperc=sqrt(0.01^2 + 0.06^2), VABase=VARbase, conv1(V1(start={6.9E3, -250})), conv2(V1(start={-3.8E3, -5.7E3}))) equation connect(load2.y, loadRL.Pow2) connect(load3.y, loadRL.Pow3) connect(load1.y, loadRL.Pow1) connect(pf1.y, loadRL.pf_in_1) connect(pf2.y, loadRL.pf_in_2) connect(pf3.y, loadRL.pf_in_3) connect(line1.terminal_p, transformer.terminal_n) connect(transformer.terminal_p, line2.terminal_n) connect(node1.term, line1.terminal_n) connect(node2.term, transformer.terminal_n) connect(node3.term, line2.terminal_n) connect(node4.term, loadRL.terminal) end YY;
Package with base classes for AixLib.Electrical
within AixLib.Electrical; package BaseClasses "Package with base classes for AixLib.Electrical" extends Modelica.Icons.BasesPackage; end BaseClasses;
info
within AixLib.Electrical.BaseClasses; package WindTurbine end WindTurbine;
Partial model of a wind turbine with power output based on table as a function of wind speed
within AixLib.Electrical.BaseClasses.WindTurbine; model PartialWindTurbine "Partial model of a wind turbine with power output based on table as a function of wind speed" extends AixLib.Electrical.BaseClasses.WindTurbine.PartialWindTurbineBase; replaceable package PhaseSystem = AixLib.Electrical.PhaseSystems.PartialPhaseSystem constrainedby AixLib.Electrical.PhaseSystems.PartialPhaseSystem "Phase system" replaceable AixLib.Electrical.Interfaces.Terminal terminal( redeclare package PhaseSystem = PhaseSystem) "Generalized terminal" protected Modelica.Blocks.Tables.CombiTable1Ds per( final tableOnFile=tableOnFile, final table=cat(1, cat(1, [0, 0], table), [vOut+10*Modelica.Constants.eps, 0; vOut+20*Modelica.Constants.eps, 0]), final tableName=tableName, final fileName=fileName, final columns=2:2, final smoothness=Modelica.Blocks.Types.Smoothness.LinearSegments) "Performance table that maps wind speed to electrical power output" Modelica.Blocks.Math.Gain gain(final k=scale) "Gain, used to allow a user to easily scale the power" DC.Sources.BaseClasses.WindCorrection cor( final h=h, final hRef=hRef, final n=nWin) "Correction for wind" initial equation assert(abs(table[1,2]) < Modelica.Constants.eps, "First data point of performance table must be at cut-in wind speed, and be equal to 0 Watts. Received + " + String(table[1,1]) + " m/s with " + String(table[1,2]) + " Watts"); equation assert(gain.y>=0, "Wind power must be positive"); connect(per.y[1],gain. u) connect(vWin,cor. vRef) connect(cor.vLoc,per. u) connect(gain.y, P) end PartialWindTurbine;
Base class for turbine model that contains basic parameters. This partial model contains the minimum set of parameters necessary to describe a wind turbine. The model defines also an output <code>P</code> for the power generated by the wind turbine.
within AixLib.Electrical.BaseClasses.WindTurbine; partial model PartialWindTurbineBase "Base class for turbine model that contains basic parameters" final parameter Modelica.Units.SI.Velocity vIn=table[1, 1] "Cut-in steady wind speed"; final parameter Modelica.Units.SI.Velocity vOut=table[size(table, 1), 1] "Cut-out steady wind speed"; parameter Real scale(min=0)=1 "Scaling factor, used to allow adjusting the power output without changing the table"; parameter Real h "Height over ground" parameter Modelica.Units.SI.Height hRef=10 "Reference height for wind measurement" parameter Real nWin(min=0) = 0.4 "Height exponent for wind profile calculation" parameter Boolean tableOnFile=false "true, if table is defined on file or in function usertab"; parameter Real table[:,2]= [3.5, 0; 5.5, 0.1; 12, 0.9; 14, 1; 25, 1] "Table of generated power (first column is wind speed, second column is power)"; parameter String tableName="NoName" "Table name on file or in function usertab (see documentation)"; parameter String fileName="NoName" "File where matrix is stored"; parameter Modelica.Units.SI.Voltage V_nominal(min=0, start=110) "Nominal voltage (V_nominal >= 0)" Modelica.Blocks.Interfaces.RealInput vWin(unit="m/s") "Steady wind speed" Modelica.Blocks.Interfaces.RealOutput P(unit="W") "Generated power" end PartialWindTurbineBase;
Package for analog direct current (DC) electrical circuits
within AixLib.Electrical; package DC "Package for analog direct current (DC) electrical circuits" extends Modelica.Icons.Package; end DC;