AC System Modelling¶
AC node¶
AC node equivalent circuit with voltage source and impedance¶
AC node equivalent circuit with voltage source and impedance¶
The active and reactive power injections at the AC node are given by [1]:
The AC node is modeled using a complex voltage phasor \(V_i = V_i \angle \theta_i\) where:
\(V_i\) is the voltage magnitude in pu
\(\theta_i\) is the voltage angle
\(P_{rg}\) is the active power injection of renewable generation in pu
\(Q_{rg}\) is the reactive power injection of renewable generation in pu
\(P_{cn}\) is the active power injection of converter in pu
\(Q_{cn}\) is the reactive power injection of converter in pu
\(P_g\) is the active power injection of generator in pu
\(S_l\) is the complex power demand in pu
Class Reference: pyflow_acdc.Classes.Node_AC
- class Node_AC(node_type, Voltage_0, theta_0, kV_base, Power_Gained=0, Reactive_Gained=0, Power_load=0, Reactive_load=0, name=None, Umin=0.9, Umax=1.1, Gs=0, Bs=0, x_coord=None, y_coord=None, S_base=100)¶
AC bus in the network.
- Parameters:
node_type (str) – Bus type:
'Slack','PQ', or'PV'(stored astype).Voltage_0 (float) – Initial voltage magnitude in pu (stored as
V_ini).theta_0 (float) – Initial voltage angle in radians (stored as
theta_ini).kV_base (float) – Base voltage in kV.
Power_Gained (float, optional) – Active power injection in pu (stored as
PGi).Reactive_Gained (float, optional) – Reactive power injection in pu (stored as
QGi).Power_load (float, optional) – Active power demand in pu (stored as
PLivia load factors).Reactive_load (float, optional) – Reactive power demand in pu (stored as
QLi).name (str, optional) – Bus identifier.
Umin (float, optional) – Minimum voltage magnitude in p.u.
Umax (float, optional) – Maximum voltage magnitude in p.u.
Gs (float, optional) – Shunt conductance in p.u.
Bs (float, optional) – Shunt susceptance in p.u.
x_coord (float, optional) – x-coordinate, preferably in longitude decimal format.
y_coord (float, optional) – y-coordinate, preferably in latitude decimal format.
S_base (float)
- price¶
Nodal energy price when the bus belongs to a price zone.
- Type:
float
- PLi_factor¶
Time-series/scenario load scaling factor.
- Type:
float
- PLi_inv_factor¶
Investment-period load scaling factor.
- Type:
float
Example Usage:
import pyflow_acdc as pyf
# Create an AC node
pyf.initialize_pyflowacdc()
node = pyf.Node_AC('PQ', 1, 0,66, Power_Gained=0, Reactive_Gained=0, Power_load=100, Reactive_load=50, name='Bus1', Umin=0.9, Umax=1.1,Gs=0,Bs=0)
AC branch¶
AC line π-model¶
AC line π-model¶
The AC branch is modeled with pi model from [1], [2] :
Class Reference: pyflow_acdc.Classes.Line_AC
- class Line_AC(fromNode, toNode, r=0.001, x=0.001, g=0, b=0, MVA_rating=9999, Length_km=1.0, m=1, shift=0, N_cables=1, name=None, geometry=None, isTf=False, S_base=100, Cable_type=CableType.CUSTOM)¶
AC transmission line or cable (optionally a tap-changing transformer).
- Parameters:
fromNode (Node_AC) – Starting bus of the line.
toNode (Node_AC) – Ending bus of the line.
r (float, optional) – Resistance in pu.
x (float, optional) – Reactance in pu.
g (float, optional) – Conductance in pu.
b (float, optional) – Susceptance in pu.
MVA_rating (float, optional) – MVA rating of the line.
Length_km (float, optional) – Length of the line in km.
m (float, optional) – Tap magnitude (transformer lines).
shift (float, optional) – Phase shift in radians.
N_cables (int, optional) – Number of parallel cables (TEP: stored as
np_line).name (str, optional) – Line identifier.
geometry (str, optional) – Line geometry metadata for plotting.
isTf (bool, optional) –
Trueif the branch is a transformer.S_base (float, optional) – Per-unit power base in MVA.
Cable_type (str, optional) – Cable type from the built-in database, or
'Custom'.
Example Usage:
import pyflow_acdc as pyf
# Create an AC node
pyf.initialize_pyflowacdc()
node1 = pyf.Node_AC('PQ', 1, 0,66, Power_Gained=0.5, name='Bus1')
node2 = pyf.Node_AC('Slack', 1, 0,66,name='Bus2')
# In pu
line_1 = pyf.Line_AC(node1, node2, r=0.01, x=0.1, g=0, b=0, MVA_rating=100, N_cables=1, name='Line1')
# Or by cable type in database
line_2 = pyf.Line_AC(node1, node2, S_base=100, Length_km=100, Cable_type='NREL_66kV_630mm2')
Transmission Expansion Planning Modelling¶
In transmision expansion planning, each branch subject to modification is modeled independently in their power flow equations. The standard \(\pi\)-model is used to represent branch through its corresponding branch admittance \(Y_{\text{bus-branch}}\).
AC expandable branch¶
AC expandable branch model¶
AC expandable branch model¶
The AC expandable branch \(h\) is modeled with in admittance matrix model from [4]:
Class Reference: pyflow_acdc.Classes.Exp_Line_AC
Inherits from Line_AC with the following additional attributes:
Attribute |
Type |
Description |
|---|---|---|
|
float |
Base cost of the line |
|
float |
Lifetime of the line |
|
float |
Base number of lines |
|
float |
Maximum number of lines |
Where \(n_b \leq n_{max}\).
Note:
The previous
np_line_iattribute (used as a solver initialization / first guess) has been removed from the element classes.Solver initial values are now computed in the modelling layer (see
get_TEP_variables) and passed to Pyomo variables via the*_model_first_guessdata structures.
AC reconducting branch¶
AC reconducting branch model¶
AC reconducting branch model¶
The AC reconducting branch \(u\) is modeled with in admittance matrix model from [4]:
Class Reference: pyflow_acdc.Classes.rec_Line_AC
Inherits from Line_AC with the following additional attributes:
Attribute |
Type |
Description |
|---|---|---|
|
float |
Resistance of the new conductor in pu |
|
float |
Reactance of the new conductor in pu |
|
float |
Conductance of the new conductor in pu |
|
float |
Susceptance of the new conductor in pu |
|
float |
MVA rating of the new conductor |
|
float |
Lifetime of the conductor |
|
float |
Base cost of the conductor |
AC conductor size selection¶
AC conductor size selection model¶
AC conductor size selection model¶
The AC conductor size selection \(a\) is modeled with in admittance matrix model from [4]:
For the branches $a$ an additional equality constraint is introduced to keep one type of branch per connection, such that :
Additionally, to limit the number of branch types in the evaluated system, inequality constraints are included such that:
Class Reference: pyflow_acdc.Classes.Size_selection
Inherits from Line_AC with the following additional attributes:
Attribute |
Type |
Description |
|---|---|---|
|
|
The starting node of the line |
|
|
The ending node of the line |
|
list |
List of possible cable types for sizing |
|
int |
Index of the currently active cable configuration |
|
float |
Length of the line in kilometers |
|
float |
Base power in MVA |
|
str |
Name of the line |
|
str |
Geometry of the line |
Important to note that this class only takes in the cable types and not the line parameters. The parameters for these have to be uploaded as yalm files in the Cable_database folder.
References