Skip to content

Powerflow for unbalanced three-phase power distribution systems with distributed generation

License

Notifications You must be signed in to change notification settings

gisel-uninorte/SimpleDistributionPowerFlow.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleDistributionPowerFlow.jl

SimpleDistributionPowerFlow.jl logo

SimpleDistributionPowerFlow.jl is a Julia language package for steady-state unbalanced radial distribution systems powerflow analysis focused on usage simplicity with reliable and fast results.

The simplicity of the package is based on the data entry and package usage:

The data entry is made with standard definition csv files. It identifies some input situations such as distributed loads, isolated segments, open/closed switches and works automatically according to such situations, per example adding auxiliar buses, purging segments and/or reordering buses. It accept some types of distributed generation also.

Two commands are provided: gridtopology() for topology verification only, and powerflow() for voltages, currents, power and losses evaluation.

Grid topology is discovered based on input line segments, transformers and the switches states information, and the graph is plotting even without bus_coords file or with missing bus location information. Power flow evaluation takes in account the discovered topology, spot and distributed loads and distributed generation if any.

Installation

julia> ]
pkg> add SimpleDistributionPowerFlow

Configuration files

filename required column names comments
line_segments.csv yes bus1,bus2,length,unit,config bus1 and bus 2: Int, unit: String
(ft, mi, m, km only accepted)
line_configurations.csv yes config,unit,
raa,xaa,rab,xab,rac,xac,
rbb,xbb,rbc,xbc,
rcc,xcc,
baa,bab,bac,bbb,bbc,bcc
unit: String
represents ohm/unit or micro-siemens/unit
(ft, mi, m, km only accepted)
substation.csv yes bus,kva,kv kv: line-to-line voltage in kilovolts
spot_loads.csv yes bus,conn,type,
kw_ph1,kvar_ph1,
kw_ph2,kvar_ph2,
kw_ph3,kvar_ph3
conn: Y/D,
type: PQ/Z/I,
ph1/2/3 represents A/B/C for Y connection,
and A-B/B-C/C-A for D connection
distributed_loads.csv optional bus1,bus2,conn,type,
kw_ph1,kvar_ph1,
kw_ph2,kvar_ph2,
kw_ph3,kvar_ph3
capacitors.csv optional bus,kvar_ph1,kvar_ph2,kvar_ph3
transformers.csv optional config,kva,phases,
conn_high,conn_low,
kv_high,kv_low,
rpu,xpu
currently only grY-grY, Y-D, D-grY and D-D three-phase step-down transformer configurations are accepted
switches.csv optional config,phases,state,resistance phases: abc, resistance in ohms
bus_coords.csv optional bus,x_pos,y_pos
regulators.csv optional config,phases,mode,tap_1,tap_2,tap_3 mode: manual only
distributed_generation.csv optional bus,conn,mode,kw_set,
kvar_set,kv_set,amp_set,
kvar_min,kvar_max,xd
bus, conn, mode and kw_set are mandatories, others params depends on distributed generation mode

Usage

To load the package: using SimpleDistributionPowerFlow

For grid's topology discovery only: gridtopology()

options type default purpose/example
input String ""
(pwd)
input files location
gridtopology(input = "examples/ieee-34")
output String ""
(pwd)
results files location
gridtopology(output = "results")
save_topology Bool true save in output directory a png file with the identified grid topology
powerflow(display_topology = false)
display_topology Bool false display in screen the identified grid topology
gridtopology(display_topology = true)
timestamp Bool false add a timestamp to results file names
gridtopology(timestamp = true)
graph_title String ""
(nothing)
set a title in topology graph
gridtopology(graph_title = "modified ieee-34 test feeder")
marker_size Float 1.5 set the size of bus identifier in graph
gridtopology(marker_size = 10)
verbose Int 0 set the level of program verbosity (only 0 or 1 are available)
powerflow(verbose = 1)

For powerflow analysis: powerflow()

options type default purpose/example
input String ""
(pwd)
input files location
powerflow(input = "examples/ieee-34")
output String ""
(pwd)
results files location
powerflow(output = "results")
tolerance Float 1e-6 maximum porcentual difference between calculated and nominal substation bus voltage
powerflow(tolerance = 0.001)
max_iteration Int 30 maximum number of iteration before procedure halt
powerflow(max_iteration = 100)
display_summary Bool true display in terminal screen a results summary
powerflow(display_results = false)
save_topology Bool false save in output directory a png file with the identified grid topology
powerflow(display_topology = true)
display_topology Bool false display in terminal screen the identified grid topology
powerflow(display_topology = true)
timestamp Bool false add a timestamp to results file names
powerflow(timestamp = true)
graph_title String "" (nothing) set a title in topology graph
powerflow(graph_title = "modified ieee-34 test feeder")
marker_size Float 1.5 set the size of bus identifier in graph
powerflow(marker_size = 10)
verbose Int 0 set the level of program verbosity (only 0 or 1 are available)
powerflow(verbose = 1)

Special features

Distributed Loads
If there are distributed loads, auxiliar buses are automatically added in the middle of segments (50% of segment lenght) with 100% of the load applied as spot load on them. These buses are retired and segments are restored after powerflow execution and before results are printed.

Distributed Generation
To include DG in power flow analysis distributed_generation.csv file is needed. Currently following modes of DG in balanced three-phase operation are modeled: PQ (constant active and reactive power), PQV (constant active power, voltage dependant reactive power), and PI (constant active power and current). PQV is modeled as a synchronous generator.

Format of distributed_generation.csv file and required (req) values are shown in following table.

bus conn mode kw_set kvar_set kv_set amp_set kvar_min kvar_max xd
req req PQ req req --- --- --- --- ---
req req PQV req --- req --- req req req
req req PI req --- --- req req req ---

Topology graph
This package graphs the grid topology even if there is no bus_coords.csv file, it also calculates the graph in case of missing or duplicate bus information:

Topology changes
If grid's topology is changed by opening and closing switches, the from-to buses relation in affected segments are adjusted before powerflow analysis. If a loop is detected, the procedure is halted (for now the package only works with radial topology).

If line_segments.csv file has isolated segments by open switch or by error, they are pruned before powerflow analysis. Two graph are generated: input topology is the detected topology from input files, and working topology is the corrected one):

Examples

Full configuration files for selected IEEE test feeders are in examples section.

Minimun Dependency

Simplicity of SimpleDistributionPowerFlow.jl is based also on its low dependency of other packages. It only relies in DataFrames, Plots, GraphRecipes and CSV

Future Updates

  • Regulators: different configurations and automatic tap operation (for now only works with 3-phase wye connection in manual mode).
  • DERs: add more Distributed Generation modes, for now only works with PQ, PI and PQV (synchronous) DG.
  • Transformers: add single-phase and open-delta transformers (for now only three-phase transformers are accepted)
  • Isolated segments: for now isolated segments are pruned before powerflow analysis, in future releases they would be treated as islands

Support

Contributions, issues, and feature requests are welcome!

License

See license