Skip to content

eranschweitzer/synfeeder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distribution Feeder Generation

This code repository automatically generates distribution feeders. The data comes from a medium voltage network in the Netherlands. As a result, at present all models are assumed balanced three phase, and underground cables as conductors.

Please cite [1] when using this tool.

File Structure

  • src The main functions used to to generate the feeders. Of these the key one is:
    • single_feeder_gen produces a single radial feeder
  • data contains various distributions, limiting functions, libraries and similar data needed by the algorithm
  • CIM contains some preliminary code to convert csv output of feeders to CIM documents
  • docs contatins documentation

Installation

Simply add the src folder to your Matlab path.

Usage

The basic functionality creates two Matlab structures, n and e, with information about the nodes and buses of the system.

  >> [n,e] = single_feeder_gen(N, Stotal, Pinj_total, opt);

The inputs are:

  • N Number of nodes on the feeder
  • Stotal Total MVA load.
  • Pinj_total Total MW of injection.
  • opt Structure of options to the algorithm.

If no inputs are passed, or only the opt argument is passed, a KDE based on the data is used to sample inputs. The function inputs_sample() is provided as a convinience to generate samples.

  >> [N, Stotal, Pinj_total] = inputs_sample(n, use_pinj);

Here n is the number of desired samples. Boolean use_pinj determines whether injections should be considered, if it is false then Pinj_total = 0 always.

It is also possible to specify just the number of desired nodes:

  >> [n,e] = single_feeder_gen(N, opt);

In this case, Stotal and Pinj_total are sampled from the KDE conditioned on the specified N using function ncond_sample().

Note: Since Pinj_total is a fixed net injection (rather than a combination of load and generation) it is not particularly flexible. As such we do not necessarily advise using it. In instances where Pinj_total is obtained by sampling a KDE the default behavior is that it is set to zero.

Matpower Format

Structures n and e can be converted to a MATPOWER case, mpc, using the matpower_fmt() function:

  >> mpc = matpower_fmt(n,e,freq);

The third argument, freq, is the nominal system frequency, which is needed to convert the line capacitance from μF to per-unit susceptance. If it is not provided 50 Hz is used, since this was the default frequency in the system the data came from. The feeder powerflow can then be easily solved (assuming MATPOWER is installed):

  >> r = runpf(mpc);

The created feeders are radial, which occasionally might cause convergence problems with the normal Newton-Raphson algorithm (so far solutions appear to be stable). Matpower comes with a few radial algorithms specifically for these situations. To use the current summation method, for example use:

  >> mpopt = mpoptions;
  >> mpopt.pf.alg = 'ISUM';
  >> mpopt.pf.radial.max_it = 500;

From experience we recommend increasing the iteration number to greater than the default 20.

While the algorithm produces radial systems, parallel elements can be produced. To check if any parallel elements exists try any(e.num_parallel > 1). The utility function parallel_branch_join() is provided to combine parallel branches to enable use of the radial algorithms.

A simple set of commands to create and solve a feeder using a radial powerflow is:

  >> [n,e] = single_feeder_gen();
  >> mpc = matpower_fmt(n,e);
  >> mpc2 = parallel_branch_join(mpc);
  >> r = runpf(mpc2, mpopt);

Documentation

There is (as of yet) no user manual. Instead the FEN-report in docs as well as reference [1] provide a fairly detailed overivew of the work.

Known Issues

  • The distribution transformer in real systems generally has taps and varies these taps to get the load on the feeder to a desired point. Currently the tap entry in the branch matrix is determined based on the ratio between the system voltages (HV=110 kV, MV=10 kV) and the nominal voltages of the transformer. The voltage behavior over the transfomer is the least predictable in the output. Eventually, there should probably be a step to come up with good settings but currently there are two quick ways to play with the set point:
    1. Tap Setting Reducing the tap setting from 1 to 0.98 or so will help raise the voltage on the low voltage side. Conversely, increasing the tap from 0.92 to 0.94 will lower the low voltage terminal.
    2. Reactive Support Adding a shunt reactance to support the voltage at the low-voltage bus can help raise or lower the voltage. For example, take a look at e.qdownstream(1) which is roughly the reactive power in the transformer in MVAr, and add a fraction of this to mpc.bus(2,BS) if trying to raise the low voltage terminal.

To Do

  • Better interface to the various distributions so that new ones, possibly even non-parametric, can be used in the future.
  • Handle tap and reactive support options automatically, or as an option.
    • Nominal tap settings are handled automatically, but there is still much room for improvement.
  • Add a module that connects multiple feeders with normally-open branches (partially started, see FEN-report).
  • Time-series modeling.
  • Translation to more modeling languages such as GridLAB-D (started already) and OpenDSS.
  • Include modeling of single phases rather then only balanced 3-phase.
  • ...

Publications

  1. E. Schweitzer, A. Scaglione, A. Monti and G. A. Pagani, "Automated Generation Algorithm for Synthetic Medium Voltage Radial Distribution Systems," IEEE Journal on Emerging and Selected Topics in Circuits and Systems, vol. 7, no. 2, pp. 271-284, June 2017.

About

Code base for automatic distribution feeder generation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors