TDNetGen: An opensource, parametrizable, largescale, transmission and distribution test system
Abstract
In this paper, an opensource MATLAB toolbox is presented that is able to generate synthetic, combined transmission and distribution network models. These can be used to analyse the interactions between transmission and multiple distribution systems, such as the provision of ancillary services by active distribution grids, the cooptimization of planning and operation, the development of emergency control and protection schemes spanning over different voltage levels, the analysis of combined market aspects, etc. The generated testsystem models are highly customizable, providing the user with the flexibility to easily choose the desired characteristics, such as the level of renewable energy penetration, the size of the final system, etc.
additions
I Introduction
The most noticeable developments foreseen in the near future in power systems involve Distribution Networks (DNs). Future DNs are expected to host a big percentage of Renewable Energy Sources (RES) and other Distributed Energy Resources (electric vehicles, flexible loads, fuel cells, batteries, etc.). Moreover, it is expected that DNs will be called upon to actively support the bulk Transmission Network (TN) participating in ancillary services with the help of Information and Communication Technologies (ICT) and advanced management and control techniques. For these reasons, the interaction between the Transmission and Distribution (T&D) grids has become the focus in many research areas of power systems over the last years. It has drawn significant attention in the areas of voltage stability and support [1, 2, 3], combined system dynamic stability [4], optimisation of power and reserves [5, 6], dynamic simulations for security assessment [7, 8], and much more. This increased research interest has been coupled with an equally high number of national and international research projects, funded both by industry and governmental agencies, to define or analyse the interactions between Transmission System Operators (TSOs) and Distribution System Operators (DSOs), e.g. [9, 10, 11].
Ia Review of popular test system models
Several test systems exist for separately studying TNs or DNs. For TN studies, the most widely used systems are the ones developed by IEEE, for power flow [12, 13] and transient stability studies [14, 15]. More specialised test system have also been proposed, for instance, the RTS79 and RTS96 [16] for reliability studies, or the revised Nordic system for dynamic and voltage stability studies [17]. Several variants of these models have been published over the years depending on the type of study and the phenomena tackled by the method being tested. Other research groups and organisations have also developed their own test systems; for example, the 150bus synthetic system from the University of Illinois, UrbanaChampaign [18], the 9bus and 179bus systems from the Western System Coordinating Council [19], used for transient stability studies [20, 21], and more [22, 23, 24, 25].
Regarding distribution network models, a wide variety of distribution test systems have been proposed by IEEE and can be found in [26]. In addition, the 33bus and the 69bus test systems [27, 28] have been used, among other things, to study the impact of distributed generation [29] while the RBTS 6bus test system has been used for reliability analysis [30]. Several other, isolated or collective, efforts have been made to prepare and make available generic DN test systems, e.g. [31, 24].
While there is an abundance of individual TN and DN systems, there is a lack of combined T&D systems allowing to investigate the interplay between them. Such systems are required to examine the impact of active distribution networks on the TN, study various proposed methods for DNs to support the TN in steadystate or during fault dynamics, develop or validate DN equivalent models that can later be used in bulk TN stability studies, test T&D cooptimization algorithms (for planning or operation), analyze the techniques for including DNs to power markets, and many more.
In the past, specific test systems, such as in [1], have been developed by individual researchers or groups to analyse the T&D interactions. However, constructing such a system is a tedious task with many challenges and parameters to be selected. In addition, the data of these systems is rarely published and the customization performed to match the specific problem studied, makes them difficult to be used in other applications.
IB Contributions
In this paper, an opensource MATLAB toolbox named TDNetGen[32] is presented, that is able to generate largescale T&D network models (high and medium voltage) that can be used for a variety of studies. The generated model data can be freely modified and shared, allowing researchers to compare the performance of their algorithms against each other. TDNetGen allows to select several key characteristics of the generated system, such as the RES penetration, the scaling factors for loads and generators, etc. (some of these are detailed in \prettyrefsec:key_parameters).
Based on these characteristics, TDNetGen generates the combined T&D test system using the wellknown Nordic TN model, detailed in [17], and systematically replacing the aggregated TN loads with a detailed DN model, derived from [31] and customised to accommodate increased distributed generators (DGs) penetration. The toolbox is powered by MATPOWER [33], a wellknown, opensource, steadystate, planning and analysis tool. The generated models can be exported in the native MATPOWER format or custom exporters can be easily implemented to allow importing to other software.
IC Paper Structure
The remaining paper is organised as follows. In \prettyrefsec:systems, the "template" TN and DN models that are used to generate the combined T&D system are presented. Then, in \prettyrefsec:key_parameters, the key parameters for selecting the characteristics of the generated system are explained and in \prettyrefsec:Methodology, the procedure of generating the combined T&D system is detailed. Finally, some example test cases are given in \prettyrefsec:PowerFlowTestCases followed by some concluding remarks in \prettyrefsec:conclusion.
Ii Template test systems
In this section, we briefly present the TN and DN models that are combined to generate the resulting T&D system.
The TN is based on the model documented in [17] and sketched in Fig. 1. It is a variant of the wellknown Nordic test system that has been recently revised by the IEEE Power System Dynamic Performance Committee. The system is separated into four zones: Equiv, North, Central, and South. Most of the generation is situated in the North and consists of hydropower plants. The rest of the generation, in the Central and South areas, consists of thermal power plants. Most of the consumption is located in the Central and South areas. Equiv is an equivalent of an external system connected to the North area. In this model, the distribution networks are represented as aggregated loads (see Fig. 4, lefthand side). The TN model includes 74 buses: 32 at the transmission level, 20 are generator terminal buses, and 22 buses at the distribution level (medium voltage side of distribution transformers) where the aggregated loads are connected. It includes 102 branches, among which 22 are distribution and 20 stepup transformers.
The model used for the DNs was developed by the Centre for Sustainable Electricity and Distributed Generation (SEDG) [31]. It represents a radial 11kV urban network fed from a 33kV supply point and its oneline diagram is shown in Fig. 2. The system has been modified to include two types of DGs and to accommodate higher loading levels. The feeders 14 are serving bigger consumers and the DGs connected there are considered to be controllable microturbines or small synchronous machines. The remaining feeders are serving residential consumers and the DGs consist of aggregate models of rooftop photovoltaic (PV) systems, thus uncontrolled and generating at their maximum power with unity power factor. Overall, the DN system includes 75 buses with 4 DGs on feeders 14 and 18 aggregate PV systems on the remaining feeders.
Iii Key parameters
In this section, we present some key parameters that are used to generate the final test system. These userdefined parameters are located in the file parameters.m, at the root of the toolbox.

Penetration level: This value defines the percentage of the active power demand to be generated by the DGs in each DN. It is defined as the ratio between the total active power injected by the DGs and the total power demand of the loads served by the DN, i.e.
(1) where (resp. ) is the number of DGs (resp. loads) within the DN. It has to be noted that the penetration level is defined per DN and not on the entire combined T&D system. Due to the existence of loads connected at the TN level, the penetration of the combined system will be less than this value.

Generation Split: This parameter defines the way of splitting the generation between the larger DGs (feeders 14 in Fig. 2) and the smaller ones (feeders 58 in Fig. 2). It allows assigning higher generation levels to the controllable units (feeders 14) or to the uncontrollable units (feeders 58).

Constant load: This parameter defines which possible vision of the future power grid is considered for the generated T&D system. The options are:

Scenario 1 (constant load=’false’) assumes that the growth of distributed generation will outpace the growth of electricity demand in DNs. If we consider this from the TN point of view, it means that the net demand of the DNs will decrease. If the penetration level is very high, a reverse power flow can be observed from the DNs to the TN. This option modifies the TN power flows as given in [17].

Scenario 2 (constant load=’true’) assumes that the electricity demand will also increase (e.g., because of electric vehicles) alongside distributed generation. Thus, the excess demand will be covered by the DGs and the TN will see the same total demand from the DNs (hence ’constant load’). This option does not modify the TN power flows as defined in [17].


Random: Since the same DN template is used to replace all of the TN aggregate loads, this can lead to artificial synchronisations between the various DNs. This setting allows for the parameters of the DNs (e.g., penetration level, generator split, etc.) to be slightly varied around the original values (maximum ), thus introducing some diversity between DNs.

Large system: In the default setting (Large system=’true’), all the loads of the original TN except the ones in the Equiv area (on buses 71 and 72 in Fig. 1) are systematically replaced by detailed DNs. This leads to a T&D system of approximately 22000 buses. Alternatively, if the parameter is set to ’false’, then only the loads in the Central area are replaced, thus leading to a T&D system of approximately 15000 buses.

Oversize: This option allows to oversize the power consumed by each DN, thus creating several security violations. This is useful when the user needs a severely congested test system to test management and operation techniques relying heavily on DGs. As a consequence of the overloading, the number of detailed DNs required to replace each TN load is decreased and consequently also the number of buses in the combined system.

Run OPF: Determines if the user wants to optimise the operating point of the generated T&D system before exporting the data. The optimisation procedure is further detailed in \prettyrefsec:OPF.

Export format: Defines the format in which the power flow data is exported (MATPOWER or a custom exporter). Two example custom exporters (one for power flow and one for timedomain dynamic simulations) are provided in \prettyrefsec:export.
Iv Methodology
In this section, the general methodology of generating the combined T&D system is presented. As mentioned earlier, TDNetGen systematically replaces the aggregated loads of the original TN system with detailed DNs, based on the template DN model presented in \prettyrefsec:systems. The procedure is summarised here and detailed below:

Initialize the TN model. Compute the amount of load, per TN bus, that needs to be replaced by detailed DNs based on the Large system parameter.

Initialize the template DN system and find the maximum DN capacity while avoiding voltage violations. Using the maximum DN capacity and the load per TN bus, calculate the minimum number of DNs required to replace the aggregated loads. Generate the corresponding DN models and compute their individual capacity.

Using the parameters Penetration level, Generation split, Constant load, Random, and Oversize, and their capacity customize each DN operating point by scaling the load and the DGs.

Generate the combined T&D system by interconnecting the models, treating the naming conventions, and ensuring continuity over the boundaries (distribution transformers).

(Optional) If the Run OPF parameter is selected, optimise the combined T&D system operating point to reduce generation cost and alleviate voltage problems.

Export the combined system data in MATPOWER format or one of the custom exporters, as selected by Export format.
Iva Transmission network initialization
To decrease the complexity of the T&D model generation, a masterslave approach is followed, illustrated in Fig. 3. This approach is only used for the construction of the T&D model. Once the model is exported, the user can analyse it using standard integrated approaches (e.g., MATPOWER’s standard powerflow solvers).
First, the TN model (located under input_data/tn_template.mat) is loaded in MATPOWER and a powerflow solution is performed to compute the voltages at the TN load buses. Then, depending on the Large system parameter, it is selected which TN loads will be replaced by detailed DNs. That is, either all the loads in the system will be replaced or only the ones in the Central area.
This approach allows the user to modify the TN operating point before calling TDNetGen in order to test different operating conditions. For instance, the parameters of the large TN generators could be modified and the TN load consumption changed to create different scenarios. However, the TN load buses and names should remain unchanged as the following procedure depends on these.
IvB Distribution network initialization
In a second step, the DN template model (located in input_data/dn_template.mat) is loaded into MATPOWER. The maximum capacity of the DN is calculated by gradually scaling the DN loads under constant power factor while keeping the output of the DGs to zero and making sure that the voltage constraints are not violated. Finally, if the parameter oversize is larger than , all the DN loads are scaled by this factor, ignoring the voltage violations.
Then, the number of DNs needed to replace each aggregated TN load (as shown in Fig. 4) is computed by dividing the TN load consumed power with the DN maximum capacity and rounding up to the nearest integer. The implicit assumptions made in this step are that i) the original TN loads are pure loads without any aggregated distributed generation, and ii) the DNs used to replace the TN loads are operating close to their maximum capacity (or oversized). Finally, using the number of DNs per TN bus, the individual DN models are generated and their load consumption is calculated.
Similarly to the TN model, this approach allows the user to modify the DN parameters before executing TDNetGen. However, much of the scaling and optimisation procedure that follows relies on the exact naming conventions and topology of the DN (location of DGs), thus these should be kept for the modified system.
IvC Customization of distribution networks
In this step, the created DN models are customised according to the parameters defined by the user. The amount of renewable generation is defined by the penetration level and the DN consumption; its allocation is determined by the generation splitting parameter, which allows the user to assign more or less power to the controllable DGs in feeders 14. Then, if the Random flag has been set by the user, a randomization of the DN parameters is performed to make sure that the DN models are not identical. In addition, if the constant load parameter is set to true, the active power demand of the DN models is increased to match the introduced DGs, so that the total demand seen by the TN remains the same before and after the replacement of the TN loads by the DN models. At the end of this step, a set of DN models with the user defined characteristics is available to be integrated into the TN.
IvD Combined system generation
As mentioned previously, the integration of the DNs is achieved by replacing the aggregated TN loads by several DNs in parallel (see Fig. 4).
Before connecting the DN models to the TN, the conditions over the boundary elements (distribution transformers) need to be consistent. That is, the magnitude and angle of the high voltage bus to which the DN will be attached (shown in Fig. 2) needs to match the voltage used for computing the DN power flows in \prettyrefsec:DN_custom. Consequently, the angles of the other DN buses need to be adjusted accordingly.
Moreover, the distribution transformers between the TN and the DNs (see Fig. 2) are considered to be equipped with OnLoad TapChanging (OLTC) controllers and used to regulate the voltage of the DNs. Basically, the transformer ratio is modified in discrete steps to maintain the voltage at the lowvoltage side of the transformer within some deadband as follows for the th transformer:
(2) 
where and are the controller setpoint and deadband, respectively; is the controlled voltage; and, is the discrete tap defining the transformer ratio.
After the customization of the DNs in \prettyrefsec:DN_custom, the DN voltage controlled by the OLTC () might be out of the deadband and require adjusting the transformer ratio. Unfortunately, MATPOWER does not support OLTC transformers. Thus, their functionality was implemented externally with an iterative procedure: a combined T&D power flow solution is performed, then the voltages of the DN substations are checked and the OLTC ratios adjusted accordingly. This is followed by another combined system power flow solution to update the values. This sequence is repeated until the DN voltage setpoints (which can be changed by the user in parameters.m) are reached. Some safeguards in the form of a maximum allowed changes have been implemented to avoid infinite cycling of the OLTCs.
Finally, the combined T&D network model is generated. In the case of constant load set to true, the TN power flows and voltages will be unchanged. Alternatively, the TN power flows will be different and at high penetration levels even reversed. Moreover, due to the integration of the DGs, there might be some voltage violations both in the DNs as well as in the TN. The latter only if constant load is set to false.
IvE Operating point optimization
The resulting T&D system from the previously described procedure might lead to increased generation costs as well as voltage violations. TDNetGen provides the option to run an AC OPF to optimise the combined system operation and alleviate any voltage problems before exporting the data. Unlike the previous steps, this is an optional step (controlled by the Run OPF parameter) as the users might want to implement their own OPF algorithm or test some operational schemes for alleviating voltage problems.
To optimise the operating point, the following OPF problem needs to be solved: {mini!}[2] x,c,rf(x,c,r) \addConstraintg(x,c,r)=0 \addConstrainth(x,c,r)≤0 \addConstraintc≤c ≤¯c \addConstraintr=[r_1 …r_i …r_nd] \addConstraintr_i ∈{r_i^1 …r_i^j …r_i^max}, ∀i=1,…,r_nd where is the vector of state variables (i.e., voltage magnitudes and phases at all buses), is an dimensional vector of continuous control variables (i.e., active and reactive powers of generators) and (resp. ) is its corresponding vector of lower (resp. upper) bounds, is an dimensional vector of discrete control variables (i.e., the OLTC transformer ratios), is the th discrete value of discrete variable , is the number of discrete positions of the OLTC, is the objective function, and are vectors of functions which model equality and inequality constraints.
The objective function (IVE) is to minimise the cost of supplying the load. Only the large TN generators and the DGs located in feeders 14 of each DN are dispatched. That is, the PV systems in feeders 58 do not participate and are assumed to always operate at maximum power and unity power factor. The generator quadratic cost functions were taken from [34] and [35], for the TN and DN generators respectively. Their values are defined in functions/add_gen_costs_for_OPF.m and can be modified by the user.
The equality constraints (IVE) are the AC bus power flow equations, the inequality constraints (IVE) refer to operational limits (i.e., the voltage magnitudes security constraints), the inequality constraints (IVE) refer to physical limits of equipment (i.e., bounds on generators active/reactive powers), and the constraints (IVE) describe the discrete variable values of the OLTC controllers.
Efficiently solving a largescale, mixedinteger, optimisation problem as described by (IVE) can be challenging. Several methods have been proposed in the literature based on the roundoff strategy, using penalty terms, or several other heuristic methods (several examples can be found in [36, 37] and their references). However, the focus of this paper is on providing a parametrizable, largescale, testsystem and not on developing solution techniques for OPF problems with discrete decision variables. Thus, a simple, heuristic, iterative relaxation method is employed in this work.
The procedure used in TDNetGen is summarised in Fig. 5. First, the voltage constraints (IVE) are relaxed and the discrete variables (IVE) are fixed constant. The latter transforms the mixedinteger OPF into a "standard AC OPF problem" that is solved with the included MATPOWER algorithm to compute an estimate of the continuous control variables . Based on this estimate, the discrete variables are updated using the control rules of (2). Finally, the security constraints are tightened and the procedure is repeated until the problem is solved with the final constraints, selected by the user, and the OLTC control rules (2) are satisfied.
Starting from MATPOWER version 6.0, a new tool called MOST [38] is also provided for optimal scheduling including uncertainty in demand and RES generation. However, this has not been tested in this work.
IvF Data exporters
The final step is to export the combined system into the output_data folder. In the default format, TDNetGen exports a MATPOWER case file that can be loaded, modified, and analysed, without the need of the TDNetGen being present.
In addition, the toolbox allows the user to build a custom exporter to any format, depending on the simulation software used. TDNetGen provides two examples of custom exporters, provided in the custom_data folder. The first is the power flow program ARTERE developed at the University of Liege and available at [39]. Compared to MATPOWER, this software includes the modelling and treatment of OLTC transformers and is computationally more efficient.
The second custom exporter is for the academic timedomain, dynamic simulation software RAMSES [40]. In order to execute a dynamic simulation, the dynamic data for both the TN generators and controllers as well as the DGs, are required. For the TN, the dynamic data are taken from [17]. For the DNs, the DGs in feeders 14 are modelled as small synchronous machines following [41], while the DGs in feeders 58 use the distributed PV system model (PVD) [42]. The initialization of the dynamic models takes place in RAMSES based on the operating point provided by TDNetGen.
Using the above two examples, users can create their own exporters to a variety of software packages. One of the future developments will be the implementation of an exporter to CIM format [43], to facilitate the integration of the models to other software.
V Example Test Cases
In this section, we present some combined T&D test systems generated by TDNetGen focusing on producing some operationally challenging test cases.
Va Powerflow scenarios
One of the main problems associated with increased penetration of DGs and in particular RES are possible overvoltage problems arising at high generation levels. TDNetGen is able to generate such scenarios by increasing the penetration level. As the penetration level increases, more buses experience overvoltages, in the DNs but also in the TN. Figure 6, shows the number of TN buses with overvoltages (above 1.15 pu) as the penetration level increases. In these scenarios, the operating point produced by TDNetGen is not optimised (Run OPF=’false’). If an OPF solution is selected, then the operating point can be corrected by redispatching the TN generators and the DGs in feeders 14 of each DN.
Figures 7 and 8 show the voltage profiles at all the buses located in a specific DN for different penetration levels. In these figures, the 75 DN buses are numbered consecutively starting from feeder 1 up to 8 and from the bus closest to the DN substation to the one furthest (see Fig. 2). The continuous curve represents the voltage profile of the DN without any DG and where the voltage setpoint of the OLTC is at 1.03 pu^{1}^{1}1There is a slight variation of the actual voltage controlled by the OLTC over the different scenarios due to the effect of the deadband.. It can be seen that as the penetration level increases, the voltage profile of the feeder is changing.
As the penetration level increases, the total power demand of the DNs from the TN decreases. In cases of higher than 100% penetration, when the DGs cover the local load consumption as well as the DN losses, then a reverse power flow arises. In these extreme cases, the power flows from the DNs to the TN and it can cause voltage violations and challenge the effectiveness of existing management, control, and protection schemes. Figure 9 shows the total power transferred from the TN to all the DNs for different penetration levels. It can be seen that at about 115%, the DNs cover their own local consumption and losses and there is no power exchange with the TN. It should be noted that individual DNs might reach a reverse power flow condition at lower or higher penetration levels due to their different operating points.
VB A dynamic simulation scenario using RAMSES
As explained in \prettyrefsec:export, custom exporters can be used to translate the data into other formats used in other software than MATPOWER. One of the example exporters with the toolbox produces the data to be used in RAMSES, an academic, timedomain, dynamic simulation software [40]. This simulator uses a topologicallybased, domain decomposition method to partition the system into the TN and the multiple DNs. Then, it solves the subproblems defined over each subdomain at each discrete time instance, while treating the interface variables with a Schurcomplement approach. Parallel computing techniques are employed to accelerate the system simulation.
A T&D model was generated with the parameters Constant load=’true’, Large system=’false’, Run OPF=’false’, Penetration level=50%, Oversize=2.0. The data was exported into RAMSES format, leading to a system with 141 DNs in the Central area, with a total of 10782 buses, 20 large (connected to the TN) and 564 small synchronous generators (connected to the DN feeders 14), 2538 distributed PV systems (connected to the DN feeders 58), and 10595 voltagedependent loads. The considered disturbance is a 5cycle (100 ms) shortcircuit near bus 4032, cleared by opening line 40324042. The response is simulated over a horizon of 250 s with a timestep of 1 cycle (20 ms).
This scenario leads to a longterm voltage collapse driven by the loadpower restoration caused by the OLTCs restoring the DN voltages. Figure 10 shows the evolution of the TN voltages while Fig. 11 shows the DN voltages at the buses in a DN attached to the TN bus 1041. More information on the analysis, instability detection and corrective control of such unstable scenarios in combined T&D systems is given in [1].
VC Computational cost of TDNetGen
Depending on the choice of parameters, the runtime to generate the T&D system can vary significantly. However, this is a cost occurred only once to generate the test system, which can then be used independently of TDNetGen. The most computationally intensive task is the OPF solution of the system to optimise the operating point (if selected). Table I shows the average execution times to generate a T&D system^{2}^{2}2Acquired on a MacBook Pro laptop with 2.2GHz Intel Core i7, 16GB of RAM, using MATLAB 2015a and MATPOWER 6.0 as well as the average number of times the OLTC setpoints are updated during an execution. The overall execution time does not exceed 4 minutes, using a standard laptop computer.
Operation  Runtime  OLTC updates 

Power Flow  30 seconds  22 
Optimal Power Flow  200 seconds  3 
Export data  15 seconds   
Vi Conclusion
In this paper, an opensource MATLAB toolbox was presented, that is able to generate synthetic largescale T&D network test cases. These models can be used to develop or test solutions targeting problems specific to combined T&D systems (optimisation, market clearing, system security, ancillary services by DNs, etc.). The toolbox is based on the widely used MATPOWER software and uses the wellknown Nordic system as the TN upon which the combined T&D system is built. TDNetGen is highly parametrizable, allowing to generate models with a variety of characteristics, replicating common problems in systems with high penetration of RES. In addition, medium ( buses) to largescale ( buses) testsystem models can be produced, allowing to test the scalability of algorithms proposed by the users. Moreover, the model data can be shared among researchers to provide a common testing platform.
Finally, the opensource nature of the toolbox allows the users to expand the code, adding new functionality, or building custom export functions to import the generated models into their own software. The latest version of the toolbox can be found at [32].
Acknowledgment
The authors would like to thank Prof Thierry Van Cutsem for the valuable input in the development of the toolbox and Gilles Chaspierre for being the first user of the toolbox and identifying several bugs.
References
 [1] P. Aristidou, G. Valverde, and T. Van Cutsem, “Contribution of Distribution Network Control to Voltage Stability: A Case Study,” IEEE Transactions on Smart Grid, vol. 8, no. 1, pp. 106–116, 1 2017.
 [2] C. Lin, W. Wu, B. Zhang, B. Wang, W. Zheng, and Z. Li, “Decentralized Reactive Power Optimization Method for Transmission and Distribution Networks Accommodating LargeScale DG Integration,” IEEE Transactions on Sustainable Energy, vol. 8, no. 1, pp. 363–373, 1 2017.
 [3] T. Ding, C. Li, C. Huang, Y. Yang, F. Li, and F. Blaabjerg, “A Hierarchical Modeling for Reactive Power Optimization With Joint Transmission and Distribution Networks by Curve Fitting,” IEEE Systems Journal, pp. 1–10, 2017.
 [4] IEEE PES Task Force, “Contribution to Bulk System Control and Stability by Distributed Energy Resources connected at Distribution Network,” IEEE Power & Energy Society, Tech. Rep., 2017. [Online]. Available: http://resourcecenter.ieeepes.org/pes/product/technicalpublications/PESTRPDFMRH0022
 [5] M. Caramanis, E. Ntakou, W. W. Hogan, A. Chakrabortty, and J. Schoene, “CoOptimization of Power and Reserves in Dynamic T&D Power Markets With Nondispatchable Renewable Generation and Distributed Energy Resources,” Proceedings of the IEEE, vol. 104, no. 4, pp. 807–836, 4 2016.
 [6] Z. Li, Q. Guo, H. Sun, and J. Wang, “Coordinated Economic Dispatch of Coupled Transmission and Distribution Systems Using Heterogeneous Decomposition,” IEEE Transactions on Power Systems, vol. 31, no. 6, pp. 4817–4830, 11 2016.
 [7] Z. Li, J. Wang, H. Sun, and Q. Guo, “Transmission Contingency Analysis Based on Integrated Transmission and Distribution Power Flow in Smart Grid,” IEEE Transactions on Power Systems, vol. 30, no. 6, pp. 3356–3367, 11 2015.
 [8] P. Aristidou and T. Van Cutsem, “A parallel processing approach to dynamic simulations of combined transmission and distribution systems,” International Journal of Electrical Power & Energy Systems, vol. 72, pp. 58–65, 11 2015.
 [9] Ofgem UK, “Transmisson and Distribution Interface 2.0 (TDI 2.0) Project,” 2017.
 [10] “SmartNet.” [Online]. Available: http://smartnetproject.eu/
 [11] “evolvDSO.” [Online]. Available: http://www.evolvdso.eu/
 [12] Illinois Center for a Smarter Electric Grid (ICSEG), “Power Flow Cases.” [Online]. Available: http://icseg.iti.illinois.edu/powercases/
 [13] University of Washington  Electrical Engineering, “Power Systems Test Case Archive.” [Online]. Available: http://www.ee.washington.edu/research/pstca/
 [14] I. P. . E. Society, “Transient stability test systems for direct stability methods,” Tech. Rep. 1, 1992.
 [15] P. Demetriou, M. Asprou, J. QuirosTortos, and E. Kyriakides, “Dynamic IEEE Test Systems for Transient Analysis,” IEEE Systems Journal, vol. PP, no. 99, pp. 1–10, 2015.
 [16] C. Grigg, P. Wong, P. Albrecht, R. Allan, M. Bhavaraju, R. Billinton, Q. Chen, C. Fong, S. Haddad, S. Kuruganty, W. Li, R. Mukerji, D. Patton, N. Rau, D. Reppen, A. Schneider, M. Shahidehpour, and C. Singh, “The IEEE Reliability Test System1996. A report prepared by the Reliability Test System Task Force of the Application of Probability Methods Subcommittee,” IEEE Transactions on Power Systems, vol. 14, no. 3, pp. 1010–1020, 1999.
 [17] IEEE PES Task Force, “Test Systems for Voltage Stability Analysis and Security Assessment,” IEEE Power & Energy Society, Tech. Rep. PESTR19, 2015. [Online]. Available: http://resourcecenter.ieeepes.org/pes/product/technicalpublications/PESTR19
 [18] K. M. Gegner, A. B. Birchfield, Ti Xu, K. S. Shetye, and T. J. Overbye, “A methodology for the creation of geographically realistic synthetic power flow models,” in 2016 IEEE Power and Energy Conference at Illinois (PECI). IEEE, 2 2016, pp. 1–6.
 [19] Y. Xia, K. Chan, and M. Liu, “Direct nonlinear primaldual interiorpoint method for transient stability constrained optimal power flow,” IEE Proceedings  Generation, Transmission and Distribution, vol. 152, no. 1, p. 11, 2005.
 [20] D. Chatterjee and A. Ghosh, “Improvement of transient stability of power systems with STATCOMcontroller using trajectory sensitivity,” International Journal of Electrical Power & Energy Systems, vol. 33, no. 3, pp. 531–539, 3 2011.
 [21] S. K. Singh, B. P. Padhy, S. Chakrabarti, S. Singh, A. Kolwalkar, and S. M. Kelapure, “Development of dynamic test cases in OPALRT realtime power system simulator,” in 2014 Eighteenth National Power Systems Conference (NPSC). IEEE, 12 2014, pp. 1–6.
 [22] Institute of Electrical Engineers of Japan (IEEJ), “Bulk power systems models.” [Online]. Available: http://www2.iee.or.jp/ver2/pes/23st_model/english/index020.html
 [23] A. Semerow, S. Hohn, M. Luther, W. Sattinger, H. Abildgaard, A. D. Garcia, and G. Giannuzzi, “Dynamic Study Model for the interconnected power system of Continental Europe in different simulation tools,” in 2015 IEEE Eindhoven PowerTech. IEEE, 6 2015, pp. 1–6.
 [24] Cigre TF C6.04.02 / TB 575, “Benchmark Systems for Network Integration of Renewable and Distributed Energy Resources,” CIGRE, Tech. Rep. April, 2014.
 [25] C. Josz, S. Fliscounakis, J. Maeght, and P. Panciatici, “AC Power Flow Data in MATPOWER and QCQP Format: iTesla, RTE Snapshots, and PEGASE,” pp. 1–7, 3 2016.
 [26] IEEE Power & Energy Society, “Distribution Test Feeders.” [Online]. Available: http://ewh.ieee.org/soc/pes/dsacom/testfeeders/
 [27] M. Baran and F. Wu, “Network reconfiguration in distribution systems for loss reduction and load balancing,” IEEE Transactions on Power Delivery, vol. 4, no. 2, pp. 1401–1407, 1989. [Online]. Available: http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=25627
 [28] M. Baran and F. F. Wu, “Optimal capacitor placement on radial distribution systems,” IEEE Transactions on Power Delivery, vol. 4, no. 1, pp. 725–734, 1989.
 [29] N. Acharya, P. Mahat, and N. Mithulananthan, “An analytical approach for DG allocation in primary distribution network,” International Journal of Electrical Power & Energy Systems, vol. 28, no. 10, pp. 669–678, 12 2006.
 [30] R. Allan, R. Billinton, I. Sjarief, L. Goel, and K. So, “A reliability test system for educational purposesbasic distribution system data and results,” IEEE Transactions on Power Systems, vol. 6, no. 2, pp. 813–820, 5 1991.
 [31] “Distributed Generation and Sustainable Electrical Energy Centre: United Kingdom Generic Distribution System (UK GDS).” [Online]. Available: http://www.sedg.ac.uk/
 [32] “TDNetGen: An opensource, parametrizable, largescale, transmission and distribution test system.” [Online]. Available: https://github.com/apetros/tdnetgen
 [33] R. D. Zimmerman, C. E. MurilloSanchez, and R. J. Thomas, “MATPOWER: SteadyState Operations, Planning, and Analysis Tools for Power Systems Research and Education,” IEEE Transactions on Power Systems, vol. 26, no. 1, pp. 12–19, 2 2011.
 [34] S. X. Chen, H. B. Gooi, and M. Q. Wang, “Sizing of Energy Storage for Microgrids,” IEEE Transactions on Smart Grid, vol. 3, no. 1, pp. 142–151, 3 2012.
 [35] Wang Feng, Le Anh Tuan, L. B. Tjernberg, A. Mannikoff, and A. Bergman, “Costbenefit analysis of a MultiTerminal VSCHVDC system using a proposed Mixed ac/dc Optimal Power Flow,” in 2013 10th International Conference on the European Energy Market (EEM), vol. 29, no. 1. IEEE, 5 2013, pp. 1–8.
 [36] F. Capitanescu and L. Wehenkel, “SensitivityBased Approaches for Handling Discrete Variables in Optimal Power Flow Computations,” IEEE Transactions on Power Systems, vol. 25, no. 4, pp. 1780–1789, 11 2010.
 [37] L. Platbrood, F. Capitanescu, C. Merckx, H. Crisciu, and L. Wehenkel, “A Generic Approach for Solving NonlinearDiscrete SecurityConstrained Optimal Power Flow Problems in LargeScale Systems,” IEEE Transactions on Power Systems, vol. 29, no. 3, pp. 1194–1203, 2014. [Online]. Available: http://ieeexplore.ieee.org/document/6670108/
 [38] C. E. MurilloSanchez, R. D. Zimmerman, C. Lindsay Anderson, and R. J. Thomas, “Secure Planning and Operations of Systems With Stochastic Sources, Energy Storage, and Active Demand,” IEEE Transactions on Smart Grid, vol. 4, no. 4, pp. 2220–2229, 12 2013.
 [39] T. Van Cutsem, “ARTERE power flow software.” [Online]. Available: http://www.montefiore.ulg.ac.be/~vct/software/
 [40] P. Aristidou, S. Lebeau, and T. Van Cutsem, “Power System Dynamic Simulations Using a Parallel TwoLevel SchurComplement Decomposition,” IEEE Transactions on Power Systems, vol. 31, no. 5, pp. 3984–3995, 9 2016.
 [41] G. Valverde and T. Van Cutsem, “Model Predictive Control of Voltages in Active Distribution Networks,” IEEE Transactions on Smart Grid, vol. 4, no. 4, pp. 2152–2161, 12 2013.
 [42] R. Elliott, A. Ellis, P. Pourbeik, J. SanchezGasca, J. Senthil, and J. Weber, “Generic photovoltaic system models for WECC  A status report,” in 2015 IEEE Power & Energy Society General Meeting, vol. 2015Septe. IEEE, 7 2015, pp. 1–5.
 [43] EPRI, Common Information Model Primer: Third Edition, 3rd ed., Palo Alto, 2015.
Nicolas Pilatte was born in Etterbeek, Belgium. He received his B.Sc. in Electrical Engineering from the University of Mons, Belgium in 2015. He is currently enrolled as a M.Sc. student in Energy Science and Technology at the ETH Zurich, Switzerland. His research interests include power system stability and integration of renewable technologies. 
Petros Aristidou(M’10) is a Lecturer at the University of Leeds, UK. Before that he was a postdoctoral researcher at ETH Zurich, Switzerland. He holds a PhD from the University of Liège, Belgium (2015) and a Diploma in Electrical and Computer Engineering from the National Technical University of Athens (NTUA), Greece (2010). His research interests include power system dynamics, control, and simulation. 
Gabriela Hug (S’05, M’08, SM’14) was born in Baden, Switzerland. She received the M.Sc. degree in electrical engineering in 2004 and the Ph.D. degree in 2008, both from Swiss Federal Institute of Technology (ETH), Zurich, Switzerland. After the Ph.D. degree, she worked in the Special Studies Group of Hydro One, Toronto, ON, Canada, and from 2009 to 2015, she was an Assistant Professor at Carnegie Mellon University, Pittsburgh, PA, USA. She is currently an Associate Professor in the Power Systems Laboratory, ETH Zurich. Her research is dedicated to control and optimization of electric power systems. 