Guddanti 2020
Guddanti 2020
Abstract—Due to the high penetration of distributed energy connecting them with advanced analytics languages are either
resources (DERs) in the distribution system, there is an increasing application-specific or lacking a clear data structure for inter-
need for advanced tools to thoroughly study the impacts of DERs operability and extensibility.
on distribution networks under various DER control/modeling
scenarios. This type of tools not only requires a powerful Therefore, this paper uses GridLAB-D, developed by the
network simulation engine in distribution grids, but also a U.S. Department of Energy, as an example to show how to
flexible and interactive environment for easy development of provide the needed flexibility to speed up the analysis for
advanced analysis/control algorithms, e.g., cutting-edge machine colleagues based on our codes and framework. The reason
learning packages. If the software can be open-sourced, the to choose GridLAB-D is due to its nice capabilities, such as
power industry can further enjoy transparency and faster-time-
to-market transition to expedite renewable integration. Past work (1) fine-grain modeling and simulation of distribution assets
does not give a fully independent data structure to separate the from substation to the household level, (2) modeling the effect
simulation layer and the application layer. Therefore, this work of climate variations on renewable such as PVs, household
aims at providing full independence while integrating the two equipment, and (3) time-series power flow simulations and
most powerful open-source tools in distribution grid simulation many other advanced study capabilities in distribution system.
and an extremely popular programming language: GridLAB-
D and Python. Specifically, we carefully create (1) an open However, similar to other distribution simulation tools, it has
and flexible design, (2) easy-to-develop analytical application a constrained network file format called GLM file, lacking a
scenarios, and (3) compatibility with a variety of third-party user-friendly graphical user interface (GUI). This limitation
tools. We demonstrate features (1) and (2) of this co-simulation prevents its user growth and its interoperability with third-
framework with a use case study on integration capacity analysis party tools. To solve this limitation, [1] proposes demand
(ICA) and we demonstrate feature (3) as an example to conduct
graphical analysis in Python for distribution system analysis response co-simulation and [2] provides a co-simulation for
with a near-zero effort. A highly accurate and fast system-wide residential energy control study in micro-grids. The drawbacks
ICA result demonstrates the supreme data structure and easy- of these works lie in a predefined and restricted use case (appli-
to-extend architecture for speeding renewable integration. The cations). Meanwhile, Matlab is proprietary software, limiting
code is available for download. its flexibility and compatibility with different simulation tools.
I. I NTRODUCTION Therefore, it is better to have an open-source programming
In recent years, energy regulations, environmental policies, language, such as Python to replace Matlab. For example,
and technology advances have driven a significant rise in the Python has access to intensive third-party libraries and is ca-
penetration level of distributed energy resources (DERs) in the pable of interacting with most other languages and platforms.
distribution system. Such DERs includes solar photovoltaic For this purpose, [3] proposes an Amazon cloud-based Python-
panels (PVs), energy storage system, electric vehicles (EVs), GridLAB-D framework that is dynamic for transmission-level
etc. Such transition brings various challenges to utilities, e.g., power analysis with MATPOWER. To be independent of
uncertain reverse power flow, outdated protection schemes, the cloud and use Python, GrridLAB-D also has its server
over-voltage violations, etc. These new problems in distribu- mode. But, it is not a modular design for Independence
tion systems can not be handled easily with transmission-grid [4]. Even worse, the server mode passes the modification of
approaches, due to the investment constraints per feeder, call- power system information, requiring the Python users to know
ing for advanced computational tools to counter the hardware network information beforehand. Such a one-way information
limitation. flow prevent Python users to get system information.
While some DER analysis is available in existing software, To resolve this problem, we propose to define an indepen-
e.g., CYME, Synergi, GridLAB-D, OPENDSS, these tools dent data structure layer for two-way graphical information
provide limited openness and flexibility for the expansion of flow between the GridLAB-D simulation environment and
the new system components and new applications. However, data. Additionally, such a new layer will also ensure Indepen-
a similar idea can be easily incorporated into other open- dence between the data management and the application layer,
sourced software, such as OPENDSS. For example, CYME greatly liberate the API design in Python, based on the network
and Synergi are proprietary, which provide limited openness information defined. Such a three-layer independent design not
for function additions. On the other hand, although GridLab- only let perform domain-specific simulations from GridLAB-
D and OPENDSS are open-sourced, the current practice of D but also extend the scenarios seamlessly and easily for all
power system domain problems.
This work is supported by the California Energy Commission (CEC)
grant EPC-17-043 and it will be applied into GLOW (GridLAB-D Open Therefore, the proposed co-simulation framework makes
Workspace). unique contributions: 1) Develop of an open and flexible
Authorized licensed use limited to: Rutgers University. Downloaded on May 15,2021 at 00:03:20 UTC from IEEE Xplore. Restrictions apply.
be read/modified (conceptualized) in Python easily, e.g., TABLE I: Different power system criteria while calculating
N DS = DN B(GLM ). ICA values at a candidate DG location.
2) Network Data Structure (NDS): Using the function of
Name Criteria Threshold
DNB, the output data format is defined as NDS, a
well-known Python dictionary that any Python program Steady state Voltage at all loads should be ≥ 0.95 p.u or
voltage (SSV) within acceptable range ≤ 1.05 p.u.
can understand. Such a NDS consists of power system
Voltage Percentage change in voltage at ≤ 3%
components, including but not limited to nodes, loads, fluctuation all loads when the DG is turned
lines, transformers (taps and tap controls), capacitors (size (VFL) ON from OFF condition
and controls), switches, regulators (settings) etc, which Thermal line Line currents cannot violate 800A-main
are stored in a structured format as shown in Table limits (TLL) thermal line limits of overhead and 400A-
to the left bottom of Fig. 1. From the NDS, different and underground lines service lines.
types of data formats can be further generated based on
application needs, e.g., JSON, graphic data, or exported
into databases. a structure, namely the ICA. Since it is computationally
3) Distribution Network Modification (DNM): After we expensive to calculate the ICA value for all 8, 756 hourly
enable two-way information exchange between GLM points, it is reduced to 24 hourly values as a demonstration
in GridLAB-D and standard data structure, NDS, in to account for HC variation during a typical day in the year.
Python, we program a function called DNM to perform ICA is a hosting capacity (HC) analysis. The most popular
the application design. Therefore, such a design is in- industrial approach to analyze it is via extensive simulations to
dependent of the GridLAB-D environment, leading to understand the maximum generation or load capacity, which
great generalization. For example, DNM can modify the can be installed independently at each point of distribution
physical and electrical properties of the nodes, loads, circuits without adversely impacting its reliability and power
lines, devices, etc by modifying the NDS to NDSmodel in quality.
python e.g., N DSmodel = DN M (N DS). Some exam- For simulating ICA, there are two calculation techniques
ples for DNM are, assigning the SCADA/AMI data to the one is the fast but inaccurate streamlined approach. The other
desired load locations, load allocation programs that can is the iterative simulation approach, which is relatively slow
identify houses downstream of a transformer and allocate but more accurate method. As CPUC prefers over iterative
AMI load data to these houses, network reconfiguration approach, we will use it to demonstrate our three-layer archi-
problems such as addition or removal of nodes for use tecture. Various IEEE test systems are validated and we use
cases e.g., GUI, power-rerouting algorithms, etc. 123 node test feeder to illustrate the concept and results. For
4) Network Graph Object (G): While the application layer this case study, which has a nominal voltage of 4.16 kV with
talks to the data structure layer in Fig. 1, it is important both three phases and single-phase connected loads. The loads
to notice that there is a graph object in the figure. This are modeled as constant power, constant current and constant
benefit is a natural result of a standardized data structure, impedance types based on the standard IEEE-123 test feeder
making any packages, compatible with graph definition to designed by the official DSAS authority.
be viable for the application designer. For example, one B. Deployed Algorithms based on the New Architecture
can implement state-of-the-art graph networks research. The following assumptions are made with respect to the
Specifically, we first developed NDS as a common data DER connecting phases and power factor e.g., 1) The added
interface between Python and GridLAB-D, but NDS is candidate DER has the same phase connections as that of the
not compatible with Networkx. Hence, similar to NDS, default load, and 2) the added candidate DER is modeled
we developed a new common data interface between as a constant power type load with a power factor of 0.98
Python and Networkx by converting NDS into a Net- in each of its connected phases. We study nodal ICA using
workx graph object (G), e.g., G = make G(N DS). two different iterative algorithms e.g., 1) linear search, and
The Networkx graph object (G) is built by separating its improved version 2) multiplicative binary search to not
the distribution network components present in NDS only allow simplicity in method but also achieve high accuracy
into nodes and edges with attributes. The attributes of with less computational time. We picked binary search as it is
these edges (overhead lines, transformers, regulators, etc) optimal for the search of n sorted list.
and nodes (node, load, capacitor, etc) are their electrical 1) Linear search
and physical properties from Fig. 1. Some use cases of In linear search, we allocate hourly load profiles (24 hourly
utilizing this graph object (G) for distribution system values) to all the loads in the IEEE-123 bus system. For each
analysis will be presented in Section IV. time instant (each hour), we increase the size of the integrating
III. U SE C ASE : I NTEGRATION C APACITY A NALYSIS OF DER value by a constant up-size step value (α) until any vio-
D ISTRIBUTION N ETWORK lation from Table. I is recorded. When a violation is recorded
A. Experiment Setup: Integration Capacity Analysis (ICA) then the algorithm returns the previous step integrating DER
After showing the design of the three-layer structure, we value with no violation as the hosting capacity value for the
will use one example on ICA to show the value of such DER location. Fig. 3 shows the calculated 24 hourly hosting
Authorized licensed use limited to: Rutgers University. Downloaded on May 15,2021 at 00:03:20 UTC from IEEE Xplore. Restrictions apply.
Fig. 3: Comparison of 24 hourly hosting capacity values at
bus n = 96 for linear and binary search algorithms.
Authorized licensed use limited to: Rutgers University. Downloaded on May 15,2021 at 00:03:20 UTC from IEEE Xplore. Restrictions apply.
Fig. 6: Edge and vertex betweenness centrality based weighted
graph of a real-world 295-bus distribution feeder for vulnera-
bility analysis.
Specifically, Fig. 6 is a weighted graph in which the weights
of branch and node are based on edge and vertex betweenness
Fig. 5: Heat map of the the IEEE-123 bus system based on centrality graph metrics calculated using ‘G’ and Networkx
ICA simulation. library. This centrality measure indicates the nodes that share
in the case of applications with parallel running platforms, a most information e.g., real power flow. The outage of a node
latency setting can be used in python to deal with different that has a high centrality measure results in the splitting of
sampling rates of platforms. the given network into undesirable huge islands as shown in
IV. I NTEGRATION WITH T HIRD PARTY T OOLS Fig. 6. Such a fast one-line analysis can let system operator
Hence, the proposed framework is designed in a modular know the system state quantitatively.
manner to facilitate the integration with any other libraries V. C ONCLUSION
using a common data interface as shown in Fig. 1. In this sec- In this paper, a co-simulation framework is proposed, which
tion, we demonstrate one such application where we integrate is based on GridLAB-D and Python. The co-simulation frame-
the distribution system analysis with graph-theoretic analysis. work has multi-layer architecture and follows the modular
As mentioned in Section II, in the data management layer, the design principle. On the simulation layer, the GridLAB-D
network graph object (G) is a module in the common data operates as distribution system simulation tools. On the data
interface of the proposed framework in Fig. 1 that flexibly conversion/management layer and modular application layer,
integrates the third-party Python libraries, e.g., Networkx, for different application functions are built and interacted within
conducting advanced graph-theoretic analysis on distribution Python environment. The interaction between the simulation
systems. layer and upper system applications are bridged within Python
A. Interactive Hosting Capacity for GridLAB-D environment through well-defined APIs. The decoupling of the
GridLAB-D is a code-based tool that does not have any simulation and analytical environment enhances the flexibility
support to visualize and process its results. However, the flex- of this co-simulation framework. A demonstration of integra-
ible data structure can enable transparent heat map of hosting tion capacity analysis on distribution system was implemented
capacity (ICA) with dynamic visualization by one line of code based on this proposed framework as use case. Advanced
“Heat map(ICA values, G)” in package “Networkx”. The methodologies are investigated to improve the computational
system-wide hosting capacity of IEEE-123 feeder is shown in efficiency and accuracy of ICA study, e.g., binary search,
Fig. 5. In this heat map, the intensity of color at each node multi-core etc. The code for this project is available at [5].
corresponds to its hosting capacity value. Such an analysis is R EFERENCES
validated by observations such as the fact that nodes closer [1] D. Wang, B. de Wit, S. Parkinson, J. Fuller, D. Chassin, C. Crawford,
and N. Djilali, “A test bed for self-regulating distribution systems:
to the substation can host larger capacity DERs than ones Modeling integrated renewable energy and demand response in the
farther away. Such a one-line analysis can significantly boost GridLAB-d/MATLAB environment,” IEEE PES Innovative Smart Grid
the renewable integration. Technologies, pp. 1–7, 2012.
[2] M. A. Al Faruque and F. Ahourai, “Gridmat: Matlab toolbox for gridlab-
B. Vulnerability for Cascading Outages d to analyze grid impact and validate residential microgrid level energy
Hosting capacity shows the extra generation a net- management algorithms,” IEEE PES Innovative Smart Grid Technologies,
work can tolerate before negative impact. Similar con- pp. 1–5, 2014.
[3] K. Anderson, J. Du, A. Narayan, and A. E. Gamal, “Gridspice: A
cept lies in vulnerability, e.g., tolerance. Due to our distributed simulation platform for the smart grid,” IEEE Transactions
flexible data structure, such an analysis can also be on Industrial Informatics, vol. 10, no. 4, pp. 2354–2363, 2014.
done in one line. For example, Fig. 6 is created [4] T. M. Hansen, B. Palmintier, S. Suryanarayanan, A. A. Maciejewski, and
H. J. Siegel, “Bus.py: A GridLAB-D communication interface for smart
by functions “centrality measure = nx.centrality(G); distribution grid simulations,” pp. 1–5, 2015.
W eight graph(G, centrality measure)” over a real-world [5] Hitachi America Ltd., “GridLAB-D-python co-simulation framework,”
distribution systems in California. 2019. [Online]. Available: https://github.com/Hitachi-ESL/Hitachi-ASU
Authorized licensed use limited to: Rutgers University. Downloaded on May 15,2021 at 00:03:20 UTC from IEEE Xplore. Restrictions apply.