Hierarchical and distributed control concept for distribution network congestion management

Congestion management is one of the core enablers of smart distribution systems where distributed energy resources are utilised in network control to enable cost-effective network interconnection of distributed generation (DG) and better utilisation of network assets. The primary aim of congestion management is to prevent voltage violations and network overloading. Congestion management algorithms can also be used to optimise the network state. This study proposes a hierarchical and distributed congestion management concept for future distribution networks having large-scale DG and other controllable resources in MV and LV networks. The control concept aims at operating the network at minimum costs while retaining an acceptable network state. The hierarchy consists of three levels: primary controllers operate based on local measurements, secondary control optimises the set points of the primary controllers in real-time and tertiary control utilises load and production forecasts as its inputs and realises network reconfiguration algorithm and connection to the market. Primary controllers are located at the connection point of the controllable resource, secondary controllers at primary and secondary substations and tertiary control at the control centre. Hence, the control is spatially distributed and operates in different time frames.


Introduction
The amount of distributed generation (DG) is constantly increasing and other controllable resources such as controllable loads, electric vehicles and energy storages are becoming more common in distribution networks. At present, the control possibilities of these resources are not utilised in distribution network operation and network reinforcement is used to solve problems caused by DG. Active network management methods can also be used to mitigate voltage rise caused by DG or prevent network overloading. In many cases, the active congestion management methods lead to considerably lower network total costs than the currently used passive approach [1].
Distribution network congestion management has been studied extensively in the past years. The proposed methods range from simple methods based only on local measurements (e.g. local reactive power control of DG units) to advanced methods utilising all DERs in a coordinated manner. Two approaches to coordinate the controllable resources have been proposed in publications. Methods can operate in real-time based on measurements or state estimation data (e.g. [2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17]) or predetermine a control schedule for the controllable resources based on forecasted load and production (e.g. [18][19][20][21]) or combine the two approaches [22]. The challenges are different depending on the selected approach. In the methods operating in real-time, the algorithm convergence needs to be guaranteed and the execution time has to be short enough. Moreover, the real-time algorithms often operate based only on the current network state and, hence, do not necessarily find the overall optimal operation of the network. For instance, consecutive on-load tap changer (OLTC) operations can be initiated although the momentary network condition change could have been managed also without OLTC operations. In the methods that operate based on forecasts, the execution time is not that critical and it is possible to consider the whole control horizon in the calculations. The accuracy of these methods, however, depends on the accuracy of the load and production forecasts. Without any real-time control part, they are not adequate for congestion management purposes since the congestions always need to be removed to avoid unacceptable voltage quality or network component overloading that can cause malfunction of customer equipment or even breakdown of network components or customer devices. The forecasts always have uncertainty and, hence, responsibility on guaranteeing an acceptable network state cannot be given to algorithms operating only based on forecasts.
The coordinated congestion management methods can be divided into centralised and distributed methods. In centralised methods (e.g. [2][3][4][5][6][7][8][9][10][11][12][13]), measurement data is gathered to one point in the network (usually the control centre), control decisions are made based on that data and control commands are then sent to the controllable resources. The advantages of centralised methods are that they can take into account the whole network when determining the control actions and that they can be relatively easily integrated into existing systems of distribution system operators (DSOs). The amount of input measurement data and controllable resources that they can handle is, however, limited by data transfer and computational limitations, i.e. they are not particularly scalable. They are also vulnerable to component failures since all the data transfer is to and from one centralised controller. In the distributed methods (e.g. [14][15][16][17]), the intelligence is distributed to several points in the network. The distributed methods are more scalable and more robust to component failures since a single component is not responsible for controlling the whole network. On the other hand, in distributed methods the controllers do not have a global view of the system and might not be able to find a global optimum for the system.
The congestion management concept proposed in this paper is hierarchical and distributed. The control hierarchy has three levels that are located in different places, operate in different time frames and utilise different types of input data. The architecture combines the advantages of centralised and distributed methods and includes algorithms operating both in real-time and based on forecasts. Also the DSO's interface to the market is defined which is often omitted in congestion management studies. The control concept is scalable and modular and enables easy addition of new DERs to the system.

Distributed automation architecture and control system hierarchy
The proposed congestion management concept operates on a distributed automation architecture represented in Fig. 1. Currently DSOs conduct all network operations from the control centre using distribution management system (DMS) and SCADA. In the proposed distributed automation architecture [23], many of the monitoring and control functionalities are executed in substation automation units (SAUs) located at primary and secondary substations. Primary SAUs (PSAUs) are responsible for the MV network and secondary SAUs (SSAUs) take care of the LV network. The SAUs include control functions, a database for storing and exchanging information and interfaces to measurement devices, controllable resources, other SAUs and in case of PSAUs to the control centre. New functionality is added also to the control centre.
The control system hierarchy consists of primary, secondary and tertiary controllers. Primary controllers such as automatic voltage control relays of the OLTCs, real and reactive power controllers of DG units, reactive power controllers of reactive power compensators and real power controllers of controllable loads are located next to the controllable resource and are the most distributed part of the control hierarchy. They operate independently based only on local measurements and, therefore, respond immediately to disturbances. The set points of primary controllers can be adjusted remotely. These devices already exist in the distribution networks, but are used with a constant set point. Secondary controllers are located at PSAUs and SSAUs depending on which network, MV or LV, they are managing. They operate in real-time and their primary aim is to keep the network state acceptable in all loading and generation situations. As a secondary goal they aim at optimising the network state. Secondary control operates through changing the set points of primary controllers and needs information on the current network state as its input.
Tertiary control is located at the control centre and can be implemented as a part of the current DMS or as an individual controller. While primary and secondary controllers operate in real-time, the tertiary controller operates day-ahead based on the load and production forecasts. The tertiary controller consists of several functionalities: The network reconfiguration algorithm determines the optimal network topology for the next 24 h based on forecasted states of the network. Tertiary control is responsible also for interactions with the market operators. It purchases flexibility services from the flexibility market if needed to solve congestions during the following 24 h. It also validates the flexibility products procured by other actors than the DSO. Also real-time operation can be requested from the tertiary controller in certain situations. In post-fault situations, network reconfiguration algorithm is used to maximise the area which can be supplied through backup connections. The secondary control can also send a help request to the tertiary control if it is unable to keep its network in an acceptable state. Due to scalability reasons the tertiary controller considers only the MV network.
In the distributed control architecture each SAU is responsible for monitoring and controlling either one MV or one LV network which makes the system scalable. In a centralised approach the data transfer to and from the control centre is directly proportional to the size of the controlled network and the number of controllable resources. Also, very high computational capacity would be required to calculate the state estimates and optimal primary controller set points in real-time for the whole distribution network. In the distributed approach the amount of data transfer is significantly reduced as only necessary data is transferred between the different level SAUs and the control centre.
The control architecture and SAU implementation is such that adding a new controllable resource to the network is simple. The static data model of the DER needs to be added to the database of the SAU to whose network the resource is connected and the interface between the SAU and the primary controller of the DER needs to be configured. The SAU database utilises standardised data models (IEC 61850 and CIM) which enhances the interoperability of the system. As soon as the information on the new DER is available in the SAU database, the SAU algorithms read the data from the database and start to utilise the DER. Relevant information on the new resource is automatically sent to other SAUs and to the control centre using CIM data exchange.
All information exchange inside the SAU is realised through the database. Hence, the SAU implementation is modular and the internal implementation of each function can be easily replaced with another implementation as long as the database interface remains intact.

Interactions of the control system
The proposed control hierarchy operates in different time frames and utilises different types of input data. Moreover, the different hierarchical levels (primary, secondary, tertiary) consist of several different functionalities. The different parts of the control system need to operate in correct order and exchange relevant information to achieve good control performance. The detailed description of interactions between the hierarchical levels of the control system and the functioning of the congestion management in different time frames is presented in Fig. 2. The time frames consist of three slots called day-ahead, intra-hour, and real-time. Different functionalities of the controllers are presented in separate blocks in order to illustrate the interactions of the control system more clearly. Also supporting functionalities such as forecasting, monitoring/estimation and market functionalities are depicted in Fig. 2 to achieve a complete view on the system operation. The aim of the whole control system is to prevent network congestions and to minimise the network total costs. If real-power control of DERs is needed (production curtailment or load shedding), operating through the market operators is preferred, but also direct control of real power is possible in emergency situations.

Day-ahead time frame
The sequence of congestion management starts before day-ahead market closing. After the market bidding process, the DSO validates whether the proposed load and production schedules lead to congestions in the distribution network. If congestions do not exist, the market is closed. Otherwise the tertiary control takes action to prevent the forecasted congestions. At first, it aims to solve the congestions using the network reconfiguration algorithm. The algorithm directly controls only the switching state of the distribution network, but considers also the expected secondary control actions regarding other DERs such as transformer OLTCs and reactive power control devices when validating network state acceptability and determining its control actions. Real-power control of DERs is not utilised at this point. If network switching state is changed, the new network topology is communicated to secondary control.
If the network reconfiguration algorithm is unable to solve network congestions, it sends an execution request to the tertiary control market agent. The market agent aims at finding the cheapest solution to solve network congestions using market tools. It can purchase scheduled and/or conditional re-profiling (SRPs and/or CRPs) services [24] from commercial aggregators in the day-ahead flexibility market or reject energy bids from the day-ahead market. The flexibility market does not exist yet and before it is available bilateral contracts can be used to procure flexibility products. Scheduled re-profiling means that a DER offers to produce/consume an assigned power during an assigned period of time and conditional re-profiling means that a DER offers to be ready to change its production/consumption in a certain range at an assigned period of time [24].
After finalising its operation, the market agent informs the short-term load and production forecast about purchased flexibility services in order to adapt intraday and intra-hour forecasts. The commercial aggregator combines the information on the accepted bids received from the day-ahead energy market and flexibility market clearing to create its final schedule. The price incentives are then sent to the consumers/prosumers in order to activate SRPs.

Intra-hour time frame
The intra-hour time frame contains three functionalities. The short-term load and production forecast is executed to produce pseudo measurements for the state estimator [25] operating in real-time. The commercial aggregator can receive CRP activation requests from other actors such as transmission system operators and balance responsible parties during the intra-hour time frame. From congestion management point of view, the most significant operation during the intra-hour time frame is the offline cost parameter update of secondary control which aims at preventing unnecessary OLTC actions. This function uses the forecasted load and production data to examine and modify the operation of the real-time secondary power control based on a longer time period and not only on single time step as is done in the real-time control part.

Real-time time frame
The real-time operations of the control architecture consist of monitoring, state estimation and primary and secondary controllers. Also tertiary control includes a real-time part. Monitoring, state estimation and secondary power control operate on an SAU (see Fig. 1 for SAU structure) that is responsible for a single MV or LV network. The monitoring functionality collects all measurement and status information from the control area. Since measurements are not usually available from every distribution network node and because they can have errors, state estimation is needed to provide necessary inputs to the secondary power control. In network nodes where measurement data is not available, the state estimator utilises pseudo measurements. In the proposed control architecture, the pseudo measurements are produced by the short-term load and production forecaster which also takes weather data into account. If the forecaster output is not available, fixed load and production profiles obtained from smart metering data are used as pseudo measurements.
The secondary controller operates through changing the set points of primary controllers. The controllable variables can be divided into two categories: The variables whose operation is optimised only by the secondary controller such as transformer OLTCs and reactive power resources and the variables that are preferably controlled by tertiary control through the market and by the secondary control only in emergency situations. The emergency mode of the secondary controller is activated if the congestion remains for a predefined time (e.g. 15 min). The required response time depends on the type and severity of the congestion and for instance in case of component overloading on the thermo-dynamic time constant of the overloaded component. The different types of control variables are indicated in Fig. 2 by representing DER real power controllers with an own block although they are also primary controllers. It should be noted that a DER can include both types of control variables. For example, for DG, reactive power control capability can be a network interconnection requirement, but real-power control available only in emergency situations. If the DG connection contract is non-firm [26], also real-power control can belong to the first group of variables. The commercial aggregator is informed of the direct real-power control implemented by secondary control.
The real-time parts of tertiary control are executed only by request in post-fault situations or when the MV network secondary control is unable to solve congestion problems in its network. In real-time operation, tertiary control utilises network reconfiguration first and if congestion remains after network reconfiguration, the market agent is activated. The real-time market agent operates through activating previously bought CRPs. Since the real-time tertiary control operates only by request, no conflicts between real-time secondary and tertiary control can occur. The secondary control is suspended during fault location, isolation and supply restoration.

Secondary control
The primary objective of the secondary control is to mitigate congestions in the distribution network, i.e. to keep network voltages between acceptable limits and feeder and transformer currents below the thermal limits. The second objective of the secondary control is to minimise the total costs of the network. The proposed secondary control consists of three parts (see Fig. 2): Real-time power control is the actual optimisation algorithm that controls the primary controller set points. It aims to keep the network in an acceptable state and to optimise its operation based on the current network state. Secondary control offline parameter update and block OLTCs are supplementary parts aiming to prevent unnecessary control actions such as multiple OLTC actions during a short period of time. Reliable, correct and relatively fast operation of the real-time power control is vital to the distribution network because if this algorithm fails the network can remain in an unacceptable network state. Hence, it is the most important part of the secondary control. The other parts enhance the operation of the control system, but are not critical to the distribution system operation.
The control architecture is modular and each algorithm is implemented as its own independent instance. All data transfer goes through the database and database flags are used to coordinate the operation between different algorithms (e.g. state estimation results need to be available before real-time power IET Gener. Transm. Distrib., pp. 1- 11 4 This is an open access article published by the IET under the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/) control can be executed). The implementation is such that if either of the non-critical secondary control algorithms (secondary control offline parameter update or block OLTCs) fails, the real-time power control still operates.

Real-time power control
The implemented real-time power control algorithm solves an optimal power flow (OPF) problem. The optimisation of distribution network operation is a mixed integer non-linear programming (MINLP) problem where x is the vector of dependent variables, u d is the vector of discrete control variables and u c is the vector of continuous control variables. The optimisation aims to minimise the objective function f (x, u d , u c ) subject to equality constraints g(x, u d , u c ) = 0 and inequality constraints h(x, u d , u c ) ≤ 0 [27].
In the implemented real-time power control algorithm, nonlinear programming is used to solve the MINLP problem and a heuristic method is used to assign the discrete variables [4,28]. The controllable variables are transformer OLTC positions, real and reactive powers of distributed generators, reactive powers of reactive power compensators and real powers of controllable loads. The algorithm is implemented as an Octave program [29] and utilises the sequential quadratic programming solver of Octave.
The vector of dependent variables consists of voltage magnitudes and angles of all distribution network nodes. The continuous variables are DG real powers, reactive powers of controllable resources and real power changes of controllable loads. The only discrete variable is the transformer tap changer. The objective function is formulated to minimise network losses, production curtailment, load control actions, the number of OLTC operations and the voltage variation at each node. Feeder voltage limits, branch current limits and the constraints on control variables (e.g. reactive power limits of DG) are taken into account in the inequality constraints of the OPF and the equality constraints model the power flow equations at each network node. The full formulation of the optimisation problem can be found in [4,28].
The output of an optimisation algorithm depends on the objective function and, hence, the operational principles of the implemented control algorithm can be determined by selecting suitable objective function weighting factors, i.e. cost parameters. In the proposed method, the cost parameters are selected such that real-power control is used only as a last resort and they can be altered by the cost parameter update function.
The real-time power control algorithms are located at SSAUs and PSAUs and optimise the set points of primary controllers connected to the network of that SAU. Static network data (e.g. feeder parameters, switching state etc.), state estimation results and data on the controllable resources is needed as input to the algorithm.

Offline cost parameter update
Secondary control offline parameter update determines the cost parameter values used in the real-time power control objective function. It utilises load and production forecasts as its input and its purpose is to prevent unnecessary control actions. The proposed control algorithm concentrates on preventing continuous OLTC actions. The algorithm uses load and production forecasts to determine the control actions that the real-time power control algorithm will take in future time steps. If it observes frequent OLTC operations back and forth, it changes the optimisation function cost parameters such that other resources than the OLTC are used during the short-term changes in the network state. In practice this means that the weighting factor for OLTC operation is increased. Other objectives could also be taken into account in the cost parameter update function. Due to the modular implementation, only the internal implementation of the function would need to be changed to implement different objectives. The parameter update functions are located both at PSAUs and SSAUs similarly as the real-time power control functions [28].

Block OLTCs
Since the secondary controllers only utilise information of one MV or LV network in their operation, adverse interactions between the controllers can occur. The most problematic case is when there are cascaded transformer OLTCs in the network, i.e. also the secondary substation has a tap changer. For these cases, a coordinating function (in Fig. 2 Block OLTCs) is proposed. The block OLTCs unit is located at the PSAU and sends block signals to the SSAU real-time power control algorithms and the AVC relays of MV/LV transformers when the HV/MV OLTC is operating to avoid back-and-forth operation of the MV/LV OLTCs. The same operation could be obtained also by traditional time grading of cascaded OLTCs [30]. The benefit of the block OLTCs unit is the enhancement of power quality during rapid changes, but requires fast real-time monitoring of the network. In many cases, time grading is an equally good solution [28,31]. The tertiary control functions are implemented on control centre level and consider only the MV network. Tertiary control consists of network reconfiguration (NR) and market agent (MA) algorithms and the general flowchart of tertiary control is represented in Fig. 3.
The tertiary controller operates both in offline mode (day-ahead scheduling) and in real-time mode. The day-ahead scheduling is triggered before the day-ahead market closing when provisional aggregated generation/demand schedule is available. The real-time operation can be triggered either by the fault location, isolation and supply restoration (FLISR) algorithm (fast restoration completed message) or by the secondary MV network control (help request from secondary control). The tertiary control uses network reconfiguration as primary means to solve detected congestions. If the NR algorithm is not able to find a network topology that removes all congestions, the market agent algorithm that utilises flexibility products to solve the congestion is invoked. When all congestions have been removed, the network topology and the generation/demand schedule are validated. If congestions remain also after MA algorithm operation, an alarm signal is sent to the operator.

Network reconfiguration
The goal of the NR algorithm is to change the topological structure of the distribution feeders by closing some normally open switches and opening some normally closed switches in their place. The network configuration should remain radial after the switching operations. The problem of distribution network reconfiguration is a highly complex, combinatorial, non-differentiable MINLP optimisation problem because of the large number of discrete switching elements [32]. In addition, the radial constraint typically introduces additional complexity in the reconfiguration problem for large distribution networks [33]. Classical methods such as mixed-integer linear programming have been used for solving reconfiguration problems in large-scale distribution systems, but these methods are prone to converge to a local minimum and not to the global minimum. Heuristic algorithms have been applied to the problem of network reconfiguration for loss reduction in several studies (e.g. [34]). The radial topology constraint of the system is imposed implicitly by the heuristic algorithms and not explicitly in the model. Evolutionary algorithms, genetic algorithms, simulated annealing and ant colony optimisation are examples of heuristic algorithms that have been used for network reconfiguration.
In the proposed control scheme, the tertiary controller finds the optimal network configuration by means of genetic algorithms. The optimisation problem minimises network losses and switch operations. The optimal topology found by the NR must be radial and keep voltage and branch current within established limits. The expected secondary control actions are taken into account in the optimisation but only switch statuses are directly controlled by the NR algorithm. Static network data (e.g. feeder parameters, switching state etc.), state estimation results (in real-time operation) or load and production forecaster results (in offline mode), fault details (in post-fault operation) and operational costs are needed as inputs to the algorithm [28].
In offline mode, NR algorithm will be executed to reduce system losses, balance loads (exchange between feeders) and avoid overload of network elements. In post-fault situations the NR algorithm is run after the FLISR algorithm has completed its operation. It aims to restore the remaining unrestored customers and to solve congestions (voltage violations or component overloading) caused by the fast restoration (FLISR). If a help request is received from the secondary control, the NR algorithm tries to solve congestions that the secondary control was unable to solve.

Market agent
The market agent utilises flexibility services (SRPs and CRPs [24]) for MV network congestion management. Its main objective is to propose changes of scheduled generation/demand values of DER units through flexibility offers/bids to provide a feasible combination of schedules. Also the market agent solves an OPF problem. The controllable variables are the DER real power changes activated by the purchased flexibility products and the objective function is formulated to minimise the cost of purchased flexibility products. The algorithm is implemented as a Matlab program and utilises the primal/dual interior point solver of Matlab [28].
The operation of the MA algorithm is different in offline and real-time modes since different flexibility services are available depending on the time frame. In the offline mode, the market agent can purchase SRPs and CRPs from the flexibility market or reject energy bids from the day-ahead market. As an input, the offline MA needs static network data, load and production forecasts, the provisional schedule from the market and the market clearing prices. In the real-time mode, the MA can activate previously purchased CRPs. State estimation data is used as an input instead of the forecast data [28].

Simulation results
The operation of the proposed control framework is demonstrated using simulations of one example distribution network. The study network is a real distribution network of the Italian DSO Unareti and is located in Brescia. The study MV network consists of three 15 kV feeders ranging from the same primary substation and is depicted in Fig. 4. In the MV network model, the low voltage customers are aggregated at the MV/LV substations. A detailed    model of one of the LV networks (connected to MV network node 1056) is also composed to enable simulating the LV network operation of secondary control. The simulation cases have been selected such that the demonstrated parts of the hierarchical congestion management system are the day-ahead operation of the tertiary control and the real-time operation of the secondary control.

Tertiary control results
The tertiary control operates only on MV network level and the network model of Fig. 4 has been used to test its operation. The day-ahead operation of the tertiary controller has been simulated using a high demand scenario of a winter day in January. Load and production forecasts for 24 h have been composed and the tertiary controller runs a load flow for each of the forecasted hours to determine whether congestions are foreseen. The voltage limits are set to ±5% and the real nominal capacities of lines and transformers are used in the simulations as overloading limits. The load and production ratings are larger than in the real network because with the real values congestions, naturally, do not occur. Using the composed 24-hour load and production profiles, the tertiary controller detects a congestion during two different hours (12 p.m. and 22 p.m.). These hours with congestions are used to test the tertiary controller operation.
6.1.1 Network reconfiguration: At time 22 p.m., the first section of feeder 1 between nodes PS0023 and 545 is loaded at 102.5% of its nominal capacity. The tertiary control invokes NR algorithm that shifts part of the load of feeder 1 to feeder 2 by opening the breaker 468-827 and closing the breaker 603-117. Fig. 5 shows the branch loading using the original switching state and with the new topology calculated by the NR algorithm. After the NR operation, all line loadings are below 90% of the nominal rating and all node voltages are at an acceptable level. The losses of the study network have been increased by 5%.
6.1.2 Market agent: At time 12 p.m., a line section at the beginning of feeder 3 between nodes PL2 and 1056 is loaded at 104.24% of its nominal capacity. Also this congestion could have been solved by the NR algorithm, but its operation was suppressed to be able to demonstrate also the operation of the MA algorithm.
The MA utilises flexibility services to solve the congestion. In the study case, the sources of flexibility are heating and cooling devices, the electrical appliances and other sources of flexibility coming from industrial processes of non-domestic customers in LV and MV. The assumed decomposition into flexible and non-flexible demand for each load type is given in Table 1.
It is assumed that the aggregator collects the flexibility from its customers and aggregates it by type of customer (domestic, non-domestic and MV). Since no real flexibility bids were  available, flexibility bids have been built from information of Table 1 and electricity prices by type of customer taken from EUROSTAT database [35], using data from the second semester of 2015. The average base price (price without taxes and levies) in Italy for medium standard industrial consumers (with an annual electricity consumption between 500 and 2000 MWh) is about 0.09 €/kWh, and the average base price for household consumers (with annual electricity consumption between 2500 and 5000 kWh) is about 0.15 €/kWh. Hence, flexibility bids have been built applying the prices shown in Table 2. In the study, the single national price in Italy (Prezzo Unico Nazionale, PUN) in 2015 has been used as the wholesale electricity market price. The average value of PUN in 2015 was 0.052 €/kWh. In the example case, the total amount of flexibility needed is 221.3 kW and is distributed among different nodes on feeder 3 as indicated in Table 3. The total cost of the purchased flexibility is 25.13 €/h.
The loading of each network branch before and after applying the MA is shown in Fig. 6. The MA is able to solve the congestion, but the originally overloaded line section remains loaded at 100%. By applying security factors and purchasing more flexibility the final loading can be further decreased.

Secondary control results
The operation of the tertiary control was demonstrated using load flow simulations which is an adequate method to demonstrate its operation since also in reality it is operating based on hourly load and production forecasts. The secondary control operates in The model of Unareti network has been reduced to 15 MV network nodes and 14 LV nodes due to the node limitations of RTDS (see Fig. 7). The controllable resources at the MV network include the HV/MV transformer OLTC and real and reactive power of the PV unit depicted in Fig. 7. The controllable resources at the LV network include the MV/LV transformer OLTC (not present in the real Unareti network) and real and reactive powers of the 6 PV units (size increased compared with the real Unareti network) depicted in Fig. 7. The cost parameters of the optimisation algorithm objective functions are set to minimise only losses and curtailed generation and the cost parameter for generation curtailment is larger than the cost parameter for losses.
According to the measurement data from the DSO, the maximum PV production in the area occurs between 10 a.m. and 1 p.m. and the minimum loading during this time period occurs at 10 a.m. Therefore, 10 a.m. is selected as the simulation hour to be able to demonstrate the operation of the secondary control in case of voltage rise problems. Tertiary controller did not observe any congestions in the MV network at this time and the switching state calculated by the tertiary controller is the one depicted in Fig. 4.
The example simulation shows the operation of the real-time power control both in the MV and in the LV networks at the selected simulation hour. The load and production in the MV network differ somewhat from the forecasted values used by the tertiary controller, but the situation remains such that no MV network congestions appear. In the simulation sequence, step-wise changes in the PV production in the LV network occur. The time domain operation of the real-time power control algorithms both in the MV and in the LV networks is depicted in Fig. 8. The algorithms have been configured to be executed once a minute such that the LV network algorithm is started at the beginning of each minute and the MV network algorithm 30 s after the start of each minute. Fig. 8 shows that the proposed secondary control algorithm is able to restore network voltages in all the simulated production conditions after a delay consisting of the time to wait for the next execution round of the algorithm, i.e. the start of the minute, the state estimation execution time, the power control execution time, the delay caused by the data transfer between the SAU and the RTDS and the AVC relay delay (8 s in the example case). Network voltages without the secondary control are presented in Fig. 9. When secondary control is not used, the network voltage can remain at an unacceptably high level until a further change in the production occurs which is not acceptable.

Conclusions
The control principles of distribution networks need to be altered when large-scale DG and other DER is connected to MV and LV networks. In this paper, a distributed control architecture and hierarchical congestion management concept for the future distribution networks has been presented. The proposed control concept enables scalable active network management utilising existing control centre software and distribution automation in an innovative way. Hence, there is no need to totally rebuild the distribution automation which makes the proposed solution applicable also in practice. The proposed concept integrates flexibility market to real-time automation of distribution network. Conflicts of interests between DSO and other market participants have been considered and therefore acceptance from all market participants is guaranteed. The control architecture is scalable, modular and enables easy addition of new DERs to the system. This paper presents both the proposed control concept and simulation results that validate its operation.