Distribution system reconfiguration in presence of Internet of things

Correspondence Mahmood Joorabian, Department of Electrical Engineering, Faculty of Engineering, Shahid Chamran University of Ahvaz, Ahvaz, Iran. Email: mjoorabian@scu.ac.ir Abstract Network reconfiguration (NR) has undergone new changes to adapt to smart grid evolution. Internet of things (IoT) has found its way to smart grids especially in the distribution systems. Demand-side management can be more efficient in the presence of IoT. IoTbased energy management systems can have bidirectional communication with smart grids and decide according to their preferences, time-of-use (TOU) pricing, and their flexible devices. Therefore, customers would consume electricity more interactively. Consequently, the total load profile will be changed and a new NR approach must be adopted to meet load demands. So, the selection of critical switches must be modified to achieve the most effective network resource utilisation. For this purpose, a mixed-integer linear programming model for feeder reconfiguration is presented considering the customers’ behaviours in the IoT environment. At first, the customer manner is investigated at different prices and preferences. Then the total load profile is calculated considering the normal distribution of uncertain customer preference factors. Finally, the identification of critical switches is obtained using the proposed method. The optimisation is done in YALMIP and MOSEK toolboxes. Results show the effectiveness of the proposed method to efficient utilisation of IoT potentials and renewable energy benefits.


INTRODUCTION
Internet of things (IoTs) is an outstanding technology for more integration of computing devices to transfer data over a network without requiring human-to-human or human-tocomputer interactions [1]. This technology will open a wide range of opportunities for modern smart grid and electricity markets [2]. Several perspectives of the smart grid such as smart cities, smart homes, home energy management systems, energy harvesting systems, smart sensor networks, distributed generation (DG) and so forth would be affected by IoTs [3]. This technology may be faced with several critical issues from the security perspective such as cyber-attacks or cyber threats that can be handled by various security mechanisms reviewed in [4]. However, there is an urgent need to implement this technology in smart grids for obtaining reliable connectivity, automation, management, and tracking of smart devices [5]. The role of IoTs for efficient development of smart cities is highlighted in [6]  and quality lifestyle perspectives. One of the main parts of smart cities is smart IoT-based power metres with advanced sensing systems for bidirectional energy flow described in [7]. Other parts of smart grids are smart IoT-based transducers and advanced sensing systems reviewed in [8]. Edge or cloud computing systems are modern technologies utilised for processing information and digitalisation in the IoT environment [9]. The general architecture of IoT-based smart homes is presented in [10].
One of the key issues of recent publications is the optimal resource management of smart grids in the presence of IoTs technology. Smart scheduling of electric vehicles in a smart city using IoT-based data exchange between charging stations and electric vehicles is introduced in [11] to minimise total charging costs. Furthermore, an IoT-based approach for electric vehicle charging is proposed in [12] considering a vehicle-to-vehicle energy exchange framework. An IoT infrastructure is presented in [13] for real-time management of the demand response programme in the smart grid. Only time flexible devices were considered in the study. A co-simulator platform is presented in [14] that combines the power and communication systems simulation for the implementation of IoT in smart grids management. The benefits of the integration of the load shedding and smart IoT-based direct load control are investigated in [15] from the frequency stability view. The authors in [16] present a method of pricing to encourage end-users to generate more renewable energy (RE). Both selling and buying prices were considered in the study to achieve technical and economic benefits such as peak shaving and cost reduction. Furthermore, both online and offline algorithms for energy management in the distribution system are compared in [17] in the view of utility maximisation, load shaving, and privacy protection. Comparison between several IoT-based energy management frameworks in smart cities is evaluated from delay and energy cost perspectives that show the superiority of edge computing technology [18]. Summary of several challenges for IoT deployment in power systems with their presented solutions is categorised in [19].
The future of IoT does not seem to be unforeseen. Various legal projects are running recently to implement the IoT in smart grids practically. A smart IoT-based substation is designed by the cooperation of Siemens and Glitre Energi Nett (a Norwegian distribution system operator (DSO)) as a pilot project that improves the reliability through earlier fault and risk detection, continuous monitoring, cloudbased operating system, and maintaining cybersecurity [20]. CyberSANE is another innovative dynamic security system for continuous learning of cyber attacks of IoT-based environments with more than six million euros budget. Several capabilities of these systems are threats prevention and detection, security exploitation, risk information analysis, and protection [21].
As far as the authors of this study are aware, no research has been conducted on network reconfiguration (NR) in the presence of IoT technology. Therefore, the focus of this study is on how to implement efficient feeder reconfiguration in the IoT-based system. The contributions of this study can be summarised as a. A mixed-integer linear programming (MILP) model for home energy management is presented containing the customer's preference in several time-of-use (TOU) conditions. b. The total load profile of the system is obtained under the assumption of a normal distribution for user preferences. c. A MILP model of NR is presented considering critical switch identification in IoT media. d. The effects of TOU pricing and end-user behaviour on the total load profile are presented through different analysis e. The effect of the difference between the real-world distribution function of customer preferences and the normal distribution is evaluated using Kulback-Leiber (KL) distance.
The remainder of this study is organised as follows. We present the system model in Section 3. Simulation results and conclusions are given in Section 4 and 5, respectively.

MODEL DESCRIPTION
IoTs provide an infrastructure for communication and management of different parts of distribution systems. Several benefits of customers, DSOs, and electricity market can be obtained using IoT. Each part of the system can decide according to its limitations, preferences, and the received data from the IoT control unit and send back new data to the control unit. Then, some big data analysis is done in the IoT centre to aggregate the information for final optimum decisions. The schematic of the proposed IoT infrastructure is depicted in Figure 1. Several parts of the system such as customers, DSOs, and electricity market are interconnected to a central IoT unit to communicate with each other. Customers get TOU price from the centre and give back its load profile (purchased power from the grid) to the centre for big data analysis. Afterload aggregation, the wholesale price and load profile of the system is sent to DSOs by IoT centre, and the power purchased from the upstream grid is sent back to the centre. Thereafter, the amount of purchasing power from wholesalers and customer power consumption is sent to the electricity market to determine the best wholesale and TOU price. Then, these prices are sent to the centre to repeat the process until the maximum profit of the market is achieved. Each part of the system has its optimisation model. Here, the model of each part is presented.

MILP model of customers behaviour
Customers usually decide based on their preferences after getting TOU information. Generally, the weighted summation of payment and discomfort cost represents their main preferences. So, the objective function of the customer side can be expressed as where 1 , 2 are constant coefficients selected as Furthermore, f payment and f discom fort represent total payment and total discomfort cost of the customer, respectively, which can be calculated as follows: where  t is a predefined vector that shows the significance of time flexible load (TFL) delays that can be defined as follows: where  t is zero for the time before desired ON time t ≤ t  des and then increases linearly until the last time interval T . Also,  t is a constant penalty for each load type.
Also, ⌣   t is the desired load shape of each power flexible load (PFL) that can be predefined according to the customers as follows: Equation (6) states that ideal PFLs must be operated with nominal power in their allowed time interval, and must be Off at other times. By definition of Equations (1)-(6), the objective function of customer preferences can be called linear. Moreover, the power consumption of PFLs are continuous variables and running time vector of TFLs is a binary-type vector. Several boundary constraints must be met to obtain an acceptable solution that is listed as follows: Equation (7), as an equality constraint, shows that the sum of generated power of DG and power purchased from the grid must meet the power consumption of load and storage charging. Also, Equation (8) illustrates all of the components for the total load that includes three load types of PFL, TFL, and NFL. Equation (9) limits the power consumption of PFLs between zero and their ideal consumption pattern. Furthermore, the power consumption of TFLs can be obtained by multiplication of binary on/off status to its nominal power value as given in Equation (10). The operation of NFLs is limited to their ideal consumption patterns and cannot be violated according to Equation (11). The mathematical relation between storage system power and its state of charge (energy) can be stated as Equation (12). It means that when the battery operates in charging mode ( S t > 0) the energy level of battery will be increased, while the battery energy is reduced in discharge mode ( S t ≤ 0). Moreover, Equations (13) and (14) limits storage system power and energy level to their minimum and maximum allowed values. Because the operation of IoT system is considered as daily structure, the net load of energy storages must be zero. In other words, the initial and final state of charge must be equal as stated in Equation (15). The power production of each DG unit must be lower than their predicted value and be a non-negative number considering Equation (16). The power purchased from the grid must be limited to the predefined range as Equation (17). The on-off status of TFLs is a binary variable as given in Equation (18). Furthermore, by definition of an auxiliary variable known as the TFL startup variable  t in Equation (19), the constraints for TFL maximum uptime can be formed as Equation (20), which states that after each startup, TFL cannot be shut down until the desired working time of TFL is spent. The Equations (19) and (20) imply that when a TFL begins to turn After receiving TOU price information from the centre, each customer starts load scheduling upon his preferences. Customer can select the weighting 1 to show his/her desires between the reduction of electricity payment and discomfort cost. Furthermore, by comparison of DG and the TOU prices, the customer has the choice to supply electricity demand by either DG or purchasing from the grid. Energy storage provides an option of saving energy in low price intervals and discharging the energy in higher price time intervals. NFLs cannot violate from their predefined pattern but TFLs can shift their operating time and PFLs can adjust their power in their operating time to provide the desired tradeoff between cost and discomfort. After the scheduling, the information of the total hourly net power consumption of each customer is sent to the centre to be used in big data analysis.

Big data analysis for load aggregation
By receiving the net load consumption of each customer, a big data analysis is done in the centre to calculate the overall load profile of the distribution network.
Here, for more simplicity of calculation, the total load of the distribution system is obtaining merely by summation of customer information in Equation (21). Then the aggregated load is distributed in all busses based on the traditional baseload of each bus Equations (22) and (23). Aggregated load of the system can be obtained with the summation of all customer load at each interval as where  Grid i,t refers to purchased power of customer i at the time interval t from the distribution grid. However, if we consider the same facility for each customer, the load profile of each customer may have different load pattern bases on his/her preferences by a selection of 1 , 2 . Furthermore, customers show the reaction to TOU pricing. Calculation or prediction of the total load consumption needs an extensive analysis of customer behaviour according to Equations (1)-(20). In this study, we present several useful plots that show the relation of  Grid i,t versus two effective parameters 1 and c TOU t . Without loss of general-ity, we assume a probability distribution function Pr( ) for the selection of all customers 1 . So, Equation (21) can be rewritten as with following probability law for each density function: As it is clear from Equations (24) and (25), the total load can be calculated from the multiplication of customer numbers by the expected value of the net load of customers.
In this study, the total load of the distribution system for each TOU pricing is obtained based on assuming the standard normal probability density function. Then, the effect of changing this distribution function is evaluated. KL divergence is used to show the distance of probability function for Pr new ( ) and Pr( ) defined as follows: So the effect of difference from nominal distribution function can be represented for each KL divergence. The results show that the more the distance from the standard normal distribution, the more the intensive peak and valley for the load profile. After the calculation of the total aggregated load of the system, this information is sent to the DSO in addition to wholesaler TOU price. Now, it is the DSO's turn to determine its plan for the effective operation of the distribution system that is modelled in the next subsection.

MILP model of DSO
The operation of the distribution system usually contains several procedures such as power resource management and NR to achieve high reliability. Here, it is assumed that DSO can do NR and RE management, simultaneously. DSO has its preferences. After receiving load information and wholesale TOU cost of energy, the procedure of distribution system management is performed. The objective function of the DSO can be expressed as follows: The objective function includes the cost of purchasing electricity from the upstream grid, the cost of harvesting energy from DG, the cost of line congestion, and the switching cost of NR. As it is clear from Equation (27) that the TOU price of the wholesale and the load profile data from the centre can have high impacts on DSO plans. Furthermore, several constraints must be met to get accurate results as follows: mn,t ≤ mn,0 + z mn ∀mn ∈ Ω Line , t ∈ T (44) Equations (28) and (29) represent active and reactive power balance formulation, respectively. Loads are considered to have a constant power factor as claimed in Equation (30). Equations (31)-(34) are linear forms of the non-linear constraint of line capacity limits (PL t nm ) 2 + (QL t nm ) 2 ≤ ( t nm SL max nm ) 2 . Voltage drops of the distribution system can be stated as Equations (35) and (36) based on DistFlow model [22]. Furthermore, bus voltage limitations can be claimed in the form of Equations (37) and (38). For obtaining the radial structure of the distribution system, the corresponding graph must be a tree. So, as an essential condition, the number of lines must be equal to the number of load buses according to Equations (39). Enough conditions for satisfying graph connectivity are written as Equations (40)-(43). These constraints check the graph connectivity using the simple concept of directed graphs. Each line has two ends (or nodes). According to Equation (40), each node cannot be its parent. Also, the main bus has no parents. Furthermore, based on Equation (41), one of the nodes connected to a line can be the parent of another one. Finally, each node must just have one parent from its neighbours. So, these constraints would prevent the system from forming a loop or disconnection of graphs. Critical switches boundary constraints can be forced to the problem using Equations (44)-(46) [22]. When a switch is not selected as a critical one, both Equations (44) and (45) will be a sandwich to one solution nm,t = nm,0 that forces no changes during the reconfiguration process. Equation (46) shows the budget limitation of critical switches that determine the number of critical switches.
From Equations (47) and (48), changes in switch status are detected and used for switching numbers. Power constraints and constant power factors of DG unis are defined as Equations (49) and (50). Finally, the power exchanged with the upstream grid (substation limitations) is given in Equation (51). After solving the DSO optimisation problem, the results of the upstream grid power are sent to the centre for power market decision-making.

Market preferences
Power market decision-makers usually regulate the TOU prices of the energy to maximise the total benefit of supplying the demand. The benefit of the distribution system can be expressed as a difference between the cost of purchasing electricity from the upstream grid and income of selling electricity to customers Some boundary constraints must be met to encourage the competition between DG units and the grid as follows: Note that the solution of market mode in Equations (52)-(58) is not straightforward due to non-linear dependency of customer and DSO behaviour to change of pricing policy. An iterative process must be done to find an optimal solution for the problem. The process starts with the selection of TOU prices with the desired average and standard deviation values. Then these TOU prices are sent to customers and DSO units to decide on their preferences. Finally, the total demand of customers (PD total t ) and the total purchasing power from the upstream grid ( UpGrid t ) is calculated and inserted to Equation (52) to evaluate the benefits of the system. This process is done for a limited number of candidates of TOU data with different standard deviation. Finally, the solution with maximum profit is selected as TOU prices. This process can be implemented in Note that because all the aforementioned equations are written as a linear combination of real and integer variables, the model can be called MILP. One of the most common methods of solving MILP models is based on branch and bones and cuts algorithms that are implemented in MOSEK solver. We use this toolbox to solved models.

SIMULATION RESULTS
Optimisation models are implemented in MATLAB software with YALMIP toolbox and MOSEK software as the main solver on a computer with an AMD A8-7410 processor and 4.00GB RAM. Simulation of section 4-1, 4-2, and 4-3 is done in 35, 15, and 64 s, respectively. The overall time for convergence of the problem is about 1800 s. In this study, a modified 33-bus IEEE distribution system is investigated. We consider 1000 customers for the system with the same facilities listed in Table 1. Each customer uses a 0.5 kW/3 kWh battery. Furthermore, we consider the 2 kW roof-mount photovoltaic system for each customer. Time intervals of the study include 24 × 1 h slots. The difference between customers is created merely from their preferences factors. Some of the technical and economic information of the distribution network are given in Table 2, and we consider some DG units in the system presented. Furthermore, the period of the peak, mid, and no-load intervals are illustrated in this table.
Several TOU pricings are investigated. The standard deviation of TOU price is changed from zero to one with a step of 0.1. Also, the performance of customers and DSO are investigated in several conditions. Before describing the simulation results, it seems necessary to be noted that for each TOU standard deviations, there may be several forms of TOU pricing according to Equations (52)-(58). Some of the feasible solutions for each standard variation are listed in Table 3. As it is clear from the table, there may exist more than one optimal TOU prices for each variance. So, the Equations (52)-(58) have no unique solution. Therefore, the performance of customers is analysed for all of the TOU prices of Table 3. Then, a least squared error-based interpolation is used to obtain a thumb rule for the results explained in the next subsection. To make a competition between the utilisation of DG units and purchasing electricity from the grid, the mean value of TOU price is set to the same value of DG prices, that is, one per unit. Meanwhile, just the standard deviation has changed to show the impact of TOU pricing on customer behaviours and the total load consumption.

Customer behaviour
Customer reactions to TOU pricing are important. Undoubtedly changing the TOU price variance can have an impact on customer behaviour. To have a concept for comparison, we focus on five technical and economic parameters: (a) Total pay-  Figures 3 and 4. Each circle or star is a solution of Equations (52)-(58) for each variance (as stated before that sometimes there is more than one solution). However, linear regression in Figure 3(a) shows that (by about 7.37% error) daily payment decreased 2.2179 per unit for 0.1 unit increase in 2 TOU . From Figure 3(b), it can be concluded that (by about 6.9% error) daily discomfort cost increases 0.5250 per unit for 0.1 unit increase in 2 TOU . These technical facts are very useful for IoT centre. They can decide about TOU to meet customer benefits. Another task is an aggregation of electricity consumption and controlling it by pricing to meet DSO benefits. Moreover, the influence of customer satisfaction factor 1 on payment, discomfort, and load profile is evaluated in Figures 5 and 6. By 0.1 unit increase in  1 , the peak load, average load, and load factor decrease about 0.2121 MW, 0.1860 MW, and 0.4964%, respectively. So, it can be figured out that the central control unit must decide based on both TOU price variance and customer satisfaction factors efficiently and economically. When the centre starts to determine the TOU price, it must be informed of customer preferences. In other words, the more the contribution of the end-users, the more the efficient management of the distribution system.
According to outcomes, IoT centre needs the graphs that show the effect of 2 TOU and 1 simultaneously. These graphs  (Figure 7(a)), discomfort cost (Figure 7(b)), peak load (Figure 8(a)), average load (Figure 8(b)), and load factor (Figure 8(c)) of a home in several TOU prices and customer satisfaction factor. Supposed that customer has selected ε_1 (e.g. 0.5) and send it to the IoT centre. So, there might be a variety of selections for TOU price. The IoT centre communicates with DSOs and receives its predefined constraints. For simplicity, it is assumed that DSO limit peak load to a predefined value (e.g. 2.5 MW per home). Some TOU prices leading to the peak load greater than this level are removed from the candidates TOU can be equal to 0.3). So, a TOU price is selected that does not violate the DSO conditions and provide the best satisfaction as much as possible. Here, the best candidate for 2 TOU is selected as 0.3. Still, several criteria will remain. Several constraints FIGURE 9 The total load in normal probability density function (pdf) of 1 at several TOU can be added such as loss reduction, voltage profile and so forth.

Big data analysis for the total load calculation
Due to the large data in the distribution system and several uncertain parameters, the total load calculation is complicated. So, some assumptions can be made to obtain an approximate solution. The effect of some approximation must be analysed to provide a better understanding of the error consequences. For simplicity, it is assumed that the customer satisfaction coefficient follows a standard normal distribution function. So, the total load profile is calculated in several TOU pricing and depicted in Figure 9. As shown in this figure, by increasing the standard deviation of TOU pricing, the load deviation would be increased. In other words, a severe peak or valley may occur in a high variation of TOU price.
In order to show the effect of the approximation error, several distribution functions are considered for customer satisfaction behaviour. We consider several non-standard distribution functions with the same mean value ( = 0.5) but different variances 2 = 1.0.8,0.6,0.4,0.2, and 0.1. According to Equation (26), the KL distance of these distribution functions to standard normal function is equal to 0.0001, 0.0013, 0.0111, 0.1840, and 1.4792, respectively. Therefore, the total load under these distribution functions is shown in Figure 10. It is clear that the more the KL distance from the standard distribution function, the more the deviation of the load from its mean value and the more severe the peak and valley in the load profile. It can be concluded that assuming the standard normal distribution function for customer behaviour is an optimistic idea and not a pessimistic view of the problem. The more pessimistic view, the higher cost of network operation. According to the assumption of customer behaviours, the load profile can be calculated. Now, the load data will be sent to DSO by the IoT centre to analyse the security and management of the network.

FIGURE 10
The total load in several non-standard pdf of 1

Network reconfiguration
By receiving the estimated load profile by DSO, the process of finding optimal NR is started. DSO usually decide based on several parameters such as the cost of electricity from the upstream network, the ancillary facilities (the switches, DG resources, etc).
Maintaining security with the minimum cost is a challenging task that an operator must deal with it. NR is a promising action for efficient supplying of loads with the lowest loss, switching cost, and most utilisation of RE resources. At first, the effect of prediction error is investigated in several wholesale TOU pricing shown in Table 4. As it is illustrated in this table, the optimal solution of NR is influenced by both wholesale pricing and load profile. The more the KL distance from the standard normal distribution, the more the electricity from the upstream grid, the more the DG utilisation, and the higher the total cost. Furthermore, the lower the wholesale price variance, the lower the power grid utilisation and the higher the DG and total cost. Also, the critical switches may change according to these factors but there are several common switches between them. Second, the effect of several wholesale and retail pricing is investigated shown in Table 5. According to the table, the difference between retail and wholesale prices can lead to several benefits for the system. These tables are very useful and informative for the power market. The power market can decide on pricing according to its preferences. For example, if the benefit of transferring energy is the aim of the market, the best choice for pricing can be found in this table.

CONCLUSION
In this study, a simple framework for NR in IoT-based infrastructure is presented. It is shown that bidirectional data transfer between IoT centre and other parts of the system (e.g. customers and DSO) can achieve the goals of all segments of the network efficiently. IoT centre can be handled in a way that provides its desired benefits by controlling the income from customers and the cost of purchasing electricity from the upstream grid using the selection of suitable pricing for wholesale and retail prices. There are several choices for customers in the IoT system, and various customer demands can be performed in this framework. Moreover, a big data analysis is done to calculate the aggregated load. For simplicity, we assume a standard  normal distribution function for the customer satisfaction factor. The effect of this prediction error is investigated here. Then, the aggregated load profile is sent to DSO for NR. The results of NR for several pricing and loading condition is presented. Based on this information, the power market can determine a pricing method to achieve the most benefits. This simple framework can be more generalised to contain other technologies such as electric vehicle charging stations.
Nomenclature ⌣   t ideal power consumption pattern of the load  at time t indices show a random incident E S t ,Ē S t min/max energy level of the storage system S at time t Pr new ( ) new probability related to the variable V 2 n ,V 2 n the min/max limit of the square voltage of the node n   t nominal power of the load  at the time interval t P t DG ,P DG t the min/max limit of the distributed generation (DG) power at the time interval t P G t rid,P Grid initial/final state of charge for storage system S f customer the objective function of customer f discom fort discomfort cost f Payment electricity payment cost I mat incidence matrix of the network M a large finite number MU T  minimum uptime of load  n number of each node N main main grid node N the total number of nodes N ( i 1 ) number of customers with the i 1 coefficient L Total t the total load considering normal customer behaviour PS t power flow through the substation PS max max limit of the substation power PD total t total demand of the network at the time interval t PD t n ,PG t n load/generation of the node n at the time interval t PG max n max limit for the generation of node n  base n the base power of node n