System Modelling¶
This page presents the modelling of the different components of the grid.
The Classes are found in pyflow_acdc.Classes
AC System Modelling¶
AC node¶
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
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
str |
Node type (‘Slack’ or ‘PQ’ or ‘PV’) |
|
float |
Initial voltage magnitude in p.u. |
|
float |
Initial voltage angle in degrees |
|
float |
Base voltage in kV |
|
float |
Active power injection in MW |
|
float |
Reactive power injection in MVAr |
|
float |
Active power demand in MW |
|
float |
Reactive power demand in MVAr |
|
float |
Minimum voltage magnitude in p.u. |
|
float |
Maximum voltage magnitude in p.u. |
|
float |
Shunt conductance in p.u. |
|
float |
Shunt susceptance in p.u. |
|
float |
x-coordinate preferably in decimal longitude |
|
float |
y-coordinate preferably in decimal latitude |
- Example Usage:
import pyflow_acdc as pyf # Create an AC node 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¶
The AC branch is modeled with pi model from [1], [2] :
Class Reference: pyflow_acdc.Classes.Line_AC
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
|
The starting node of the line |
|
|
The ending node of the line |
|
(float) |
Resistance of the line in pu |
|
(float) |
Reactance of the line in pu |
|
(float) |
Conductance of the line in pu |
|
(float) |
Susceptance of the line in pu |
|
(float) |
MVA rating of the line |
|
(float) |
Length of the line in km |
|
(float) |
Number of conductors in the line |
|
(float) |
Phase shift of the line in radians |
|
(int) |
Number of cables in the line |
|
(str) |
Name of the line |
|
(str) |
Geometry of the line |
|
(bool) |
True if the line is a transformer, False otherwise |
|
(float) |
Base power of the line in MVA |
|
(str) |
Type of cable in the line |
- Example Usage:
import pyflow_acdc as pyf # Create an AC node 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_XLPE_630mm_66kV')
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¶
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 |
Initial number of lines |
|
float |
Maximum number of lines |
Where \(n_b \leq n_i \leq n_{max}\)
AC reconducting branch¶
AC reconducting branch model¶
The AC reconducting branch \(u\) is modeled with in admittance matrix model from [4]:
Class Reference: pyflow_acdc.Classes.Rep_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¶
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.Line_sizing
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.
DC System Modelling¶
DC node¶
DC node equivalent circuit¶
The AC node is modeled using voltage \(U_d\) where [1]:
\(U_d\) is the voltage magnitude in pu
\(P_{rg}\) is the active power injection of renewable generation in pu
\(P_{cn}\) is the active power injection of converter in pu
\(P_l\) is the active power demand in pu
Class Reference: pyflow_acdc.Classes.Node_DC
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
str |
Node type (‘Slack’ or ‘P’ or ‘Droop’ or ‘PAC’) |
|
float |
Initial voltage magnitude in pu |
|
float |
Active power injection in pu |
|
float |
Active power demand in pu |
|
float |
Base voltage in kV |
|
float |
Minimum voltage magnitude in p.u. |
|
float |
Maximum voltage magnitude in p.u. |
|
float |
x-coordinate, preferably in longitude decimal format |
|
float |
y-coordinate, preferably in latitude decimal format |
- Example Usage:
import pyflow_acdc as pyf # Create an DC node node = pyf.Node_DC('P', 1, 0,0,525,name='Bus1')
DC line¶
DC line model¶
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
Node_DC |
The starting node of the line |
|
Node_DC |
The ending node of the line |
|
float |
Resistance of the line in pu |
|
float |
MW rating of the line |
|
float |
Length of the line in km |
|
str |
Polarity of the line (‘m’ or ‘b’ or ‘sm’) |
|
int |
Number of parallelcables in the line |
|
str |
Type of cable in the line |
|
float |
Base power of the line in MVA |
- Example Usage:
import pyflow_acdc as pyf # Create an AC node node1 = pyf.Node_DC('Slack', 1, 0,0,525,name='Bus1') node2 = pyf.Node_DC('P', 1, 0,0,525,name='Bus2') # In pu line_1 = pyf.Line_DC(node1, node2, r=0.01, MW_rating=100, N_cables=1, name='Line1') # Or by cable type in database line_2 = pyf.Line_DC(node1, node2, S_base=100, Length_km=100, Cable_type='NREL_HVDC_2000mm_320kV')
DC line expansion¶
DC expansion model¶
The expanded branch object is inside the Line_DC class.
The expanded branch \(e\) is modelled as:
DCDC converter¶
DCDC converter model¶
The DCDC converter is modelled very simply, with the set power injected into the toNode and the power drawn from the fromNode.
To include losses there is a simple resistive model. For power flow calculations the power injected in either node is kept constant as the losses are pre calculated with the assumption of \(V_{to} = 1 pu\).
Class Reference: pyflow_acdc.Classes.DCDC_converter
Key attributes:
Attribute |
Type |
Description |
|---|---|---|
|
Node_DC |
The starting node |
|
Node_DC |
The ending node |
|
float |
Resistance of the converter |
|
float |
Power set point of the converter |
|
float |
Power rating of the converter |
|
str |
Name of the converter |
|
str |
Geometry of the converter |
- Example Usage:
import pyflow_acdc as pyf # Create an AC node node1 = pyf.Node_DC('Slack', 1, 0,0,525,name='Bus1') node2 = pyf.Node_DC('P', 1, 0,0,525,name='Bus2') conv = pyf.add_DCDC_converter(grid,fromNode , toNode ,Pset=0.1, r=0.0001, MW_rating=99999,name='DCDC1')
Inputs can be given in MW or pu. For pu use the r and Pset parameters. For MW use the R_Ohm and P_MW parameters.
ACDC Converter¶
Asymmetrical monopolar converter configuration¶
Symmetrical monopolar converter configuration¶
Bipolar converter configuration¶
Equivalent converter model¶
Equivalent converter model is taken from [1].
Class Reference: pyflow_acdc.Classes.AC_DC_converter
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
str |
Type of AC node (‘Slack’ or ‘PV’ or ‘PQ’) |
|
str |
Type of DC node (‘Slack’ or ‘P’ or ‘Droop’ or ‘PAC’) |
|
Node_AC |
AC node connected to the converter |
|
Node_DC |
DC node connected to the converter |
|
float |
Active power injection in AC node in pu |
|
float |
Reactive power injection in AC node in pu |
|
float |
Active power injection in DC node in pu |
|
float |
Transformer resistance in pu |
|
float |
Transformer reactance in pu |
|
float |
Phase reactor resistance in pu |
|
float |
Phase reactor reactance in pu |
|
float |
Filter in pu |
|
float |
Droop in pu |
|
float |
Base voltage in kV |
|
float |
Maximum MVA rating of the converter |
|
float |
Number of parallel converters |
|
int |
Polarity of the converter (1 or -1) |
|
float |
No load loss factor for active power |
|
float |
Linear currentr loss factor |
|
float |
Switching loss factor for rectifier |
|
float |
Switching loss factor for inverter |
|
float |
Minimum voltage magnitude in pu |
|
float |
Maximum voltage magnitude in pu |
|
str |
Name of the converter |
Renewable Source¶
Renewable source model¶
For all renewable sources:
For renewables sources connected to AC nodes:
Class Reference: pyflow_acdc.Classes.RenSource
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
Node_AC or Node_DC |
Node connected to the renewable source |
|
float |
Active power injection in MW |
Generator¶
Generator model¶
Generator limits¶
Class Reference: pyflow_acdc.Classes.Gen_AC
Key Attributes:
Attribute |
Type |
Description |
|---|---|---|
|
Node_AC or Node_DC |
Node connected to the generator |
|
float |
Active power injection in MW |
|
float |
Reactive power injection in MVAr |
|
float |
Active power injection in MW |
Price Zone¶
Price zone model¶
Price zone model is taken from [3]. The cost of generation quadratic curve is calculated in Market Coefficients Module.
Class Reference: pyflow_acdc.Classes.Price_Zone
Key Attributes:
References