ADN _ Modelica : An Open Source Sequence-Phase Coupled Frame Program for Active Distribution Network Steady State Analysis

Open source software such as OpenDSS has given a lot of help to distribution network researchers and educators. With high penetration of distributed renewable energy resources into distribution network, tradition distribution steady state analysis software such as OpenDSS is faced with difficulty in handling distributed generators. Three-phase distributed generators are often modeled in sequence frame while unbalanced distribution network are usually modeled in phase frame. So a load flow in sequence-phase coupled frame is proposed to handle models described in both frames. Voltage controlled DGs which are difficult to cope with in OpenDSS are handled in proposed program. The steady state analysis platform is programmed with open source Modelica language and the main aim of this paper is to introduce an open source platform for active distribution network steady analysis include load flow and short circuit analysis which can be easily adopted and improved by other educators and researchers.


Introduction
Open source software has given a lot of help to power system researchers.As commercial software is closed source, algorithms of which are not easily to be improved for research.From the point of education, commercial software does not show clear flowchart of power system analysis such as load flow, transient simulation etc.
Power System Analysis Toolbox [1] presented by Federico Milano has provides a huge support to students and researchers of electrical engineering.This software is mainly used for transmission network while unbalanced distribution network analysis is not supported.
Matpower [2] proposed by Ray Daniel Zimmerman provides quick algorithm of load flow with the help of fast matrix and vector computation ability of Matlab.
OpenDSS [3] presented by Roger C. Dugan helps a lot on unbalanced distribution network analysis.As fixed point iteration method is deployed in OpenDSS, constant power distributed generators can be well coped with while voltage controlled distributed generators (DGs) may encounter severe convergence problem [4].Load flow algorithm of Gridlab-D [5] encounters the similar problem.So fixed point iteration is not a suitable method to handle voltage controlled DGs, a newton approach proposed is presented in [6] to cope with this.Other open source work [7] has given a introduction on using Modelica language to analyze AC circuits while it can not cope with unbalanced distribution system.
As distributed generators are usually modelled in sequence-frame [8], while distribution network is usually modelled in phase-frame [9].An sequence-phase frame adaptor is proposed to cope with sequence-phase coupled active distribution network analysis.This is a novel software that can handle sequence-phase frame models simultaneously compared with other commercial distribution analysis software.
Open source software gives a lot of help to power system analysis.The main aim of this paper is to provide an open source platform which can be easily modified by other researchers.

Three-phase Modeling of Distribution Network
There are mainly two kinds of constraints to describe electric network.KCL and KVL belong to topology constraints and other constraints such as ohm's constraints, PQ constraints belong to branch constraints.Firstly, KVL and KCL can be written as b,re n,re , b,re 0 , b,im 0 , where subscript b denotes branch quantities, subscript n denotes node quantities, subscript re and subscript im denote real and imagine quantities, matrix A represents node-branch incidence matrix.U and I represent voltage and current vector respectively.Modelica is an equation-based simulator [10].KCL and KVL constraints are naturally supported by Modelica, with definition of connector and flow.Node voltage quantities in network analysis is defined as connector while current is defined as flow variables.
Other branch constraints are generally expressed as which represents relationship between branch voltage and branch current.The detail of various branch constraints in steady state analysis are described as followings.

One-phase Impedance Branch
Single phase branch is frequently existed in low voltage distribution network.Denoting resistance and reactance of branch as R and X respectively, the branch voltage and branch current relationship can be written as b,re b,re b,im , b,im b,im b,re .
The branch constraints' equations are described with Modelica language as follows.It can be seen from above that Modelica is equation-based simulator.So the branch constraints in the following section will be all described with equations clearly.

Two-phase Impedance Branch
Two-phase impedance branch can be seen as two branches with coupled impedance.The impedance matrix of branch 1 and branch 2 is given by 11 12 21 22 , where subscript 1 and 2 denote branch 1 and 2 respectively.The coupled branch voltage and current relationship can be written as where symbols with dot above represent complex quantities.The complex variable form of (10) can be unfolded to four equations as follows., , where subscript 1, 2, 3 denote branch 1, 2 ,3 respectively.The three phase impedance branch constraints can be unfolded to six equations.

One-phase Admittance Branch
Shunt admittance of distribution line, capacitors are model as admittance branch.The branch voltage and branch current relationship can be written as b,re b,re b,im , where G represents conductance and B represents susceptance.For capacitor branch, 0 G = .

Two-phase Admittance Branch
Two-phase admittance branch can be seen as two branches with coupled admittance.The admittance matrix of branch 1 and branch 2 is given by , where subscript 1 and 2 denote branch 1 and 2 respectively.The coupled branch voltage and current relationship can be written as where symbols with dot above represent complex quantities.
The complex variable form of ( 27) can be unfolded to four equations as follows.

Transformer
Distribution transformer is composed of one-phase ideal transformer and one-phase impedance.Firstly, we give the model of one-phase ideal transformer.

One-phase Ideal Transformer
The ideal transformer is depicted in Figure 1.It can be seen as two coupled branches.

Distributed Generator
There are many kinds of distributed generator.We only consider the typical synchronous generator.It is usually modeled in sequence frame and the detail derivation can refer to work in [8].As distributed generator is modelled in sequence frame while other components of distribution network are modelled in phase frame.A sequence-phase frame adaptor is needed to connect these two frames.

Sequence-Phase Frame Adaptor
The sequence-phase frame adaptor is depicted in Figure 4.The adaptor equation is given by  The negative symbol in (47) is because injecting is the positive direction for the current flow in Modelica Language.

Distributed Generator Sequence Frame Model
The synchronous generator modeled in sequence frame consist of three part as shown in Figure 5.This model can be connected to phase-frame model with sequence-phase frame adaptor presented in 2.7.1. where U is positive sequence voltage magnitude control target.As Modelica uses Newton algorithm to solve equations, voltage controlled equation ( 55) are easy to be coped with while OpenDSS has difficulty which uses fixed point iteration method.

Step Voltage Regulator
One-phase step voltage regulator can be seen as a modified ideal transformer.The detail model can refer to kersting's book [11] where PT is potential transformer ratio, CT is current transformer ratio, ( ) tap represents tap position of step voltage regulator.

Load
There are mainly three kinds of load branch include constant impedance, constant current and constant real and reactive power load.Constant impedance load belongs to one-phase impedance branch, which has been discussed.Three-phase load can be composed with three one-phase loads.

Constant Current Load
The power factor and current magnitude are constant for constant current load.The equations are given by where P and Q are given active and reactive power.sp I is specified current magnitude.

Constant Active and Reactive Power Load
The active and reactive power are constant for constant power load.The equations are given by b,re b,re b,im b,im b,re b,im b,im b,re where P and Q are given active and reactive power.

Circuit Breaker
The open circuit breaker is modeled with zero current source while the closed circuit breaker is modeled with zero voltage source.This model is more accurate than small impedance branch model used in OpenDSS.

Short-circuit Analysis
Line to line or line to ground faults can be modeled as two node connected with zero voltage source.Taking one-phase to ground fault as example, the fault point branch equations are given by b,re In fact, the open circuit fault can be modelled with fault points connected with zero current source and equations are given by b,re

Steady state analysis of Distribution Network
According to section 2, load flow and short circuit analysis can be both realized with Modelica.As Newton method is used to solve equations, the steady state analysis initialization is very important.Linear component such as voltage source, impedance branch, transformer are not needed to be initialized.While nonlinear components such as constant power load, constant current load, and distributed generators.

Constant Power Load Initialization
To assure convergence of steady state initialization, the constant power load is modelled as zero current source at initialization step.

Constant Current Load Initialization
Similar to constant power load, the constant current load is modelled as zero current source and equations are given by

PQ mode Synchronous Generator Initialization
Similar to constant power load, the synchronous generator is modelled as zero current source in positive sequence and equations are given by

PV mode Synchronous Generator Initialization
Considering the voltage control target, the synchronous generator is modelled as constant voltage source and equations are given by

Results
The proposed program has been implemented on IEEE 4-bus, 13-bus test feeders.The load flow results are illustrated in Table 1, 2 and 3 and they are close to the IEEE given results.IEEE Distribution Test Feeder Task Force do not give the load flow program and the authors believe that the open source distribution steady state analysis platform is a supplement for active distribution system analysis.The IEEE 13-bus test feeder with 1-10 voltage controlled distributed generators are illustrated in Table 4.It can be seen that Newton-based ADN_Modelica has better ability of coping with PV mode DG than OpenDSS.

Discussion
The proposed program can deal with phase-sequence coupled model and can give more accurate results than OpenDSS when floating network exists.The reason is that OpenDSS adds anti-floating impedance branch to Delta connection load which breaks the original KCL constraints as depicted in Figure 6.Another reason is that closed circuit breaker is modelled as small impedance branch in OpenDSS which will bring small error.

Conclusions
The proposed open source program can be downloaded from [14] and it has several contributions: (1)It can cope with sequence-phase coupled active distribution network.In the future, voltage source converters, doubly-fed generator will be added to this platform.Open source electromagnetic transient and electromechanical transient simulation are under development.The steady state analysis ADN_Modelica will be an initialization program for transient simulation.
(2)An accurate method to cope with floating network is proposed which is better than OpenDSS with adding many anti-floating impedance branch.
(3)Newton method is used and PV mode generators can be easily handled in ADN_Modelica.Finally this is an open source program and it will help researchers and educators to implement further modelling, optimization and control experiments of active distribution network.

Figure 5 .
Figure 5. Synchronous Generator Mode in Sequence Frame . The constraints equation are given by

Table 1 .
The Load-Flow Results of IEEE 4 Node Test Feeder(GrY/GrY connection type for threephase transformer).

Table 2 .
The Load-Flow Results of IEEE 4 Node Test Feeder(GrY/D connection type for three-phase transformer).

Table 3 .
The Load-Flow Results of IEEE 13 Node Test Feeder.

Table 4 .
Load Flow Iteration Number with different number of PV Generator