Zonal Machine Learning-Based Protection for Distribution Systems

Adaptive protection is defined as a real-time system that can modify the protective actions according to the changes in the system condition. An adaptive protection system (APS) is conventionally coordinated through a central management system located at the distribution system substation. An APS depends significantly on the communication infrastructure to monitor the latest status of the electric power grid and send appropriate settings to all of the protection relays existing in the grid. This makes an APS highly vulnerable to communication system failures (e.g., broken communication links due to natural disasters as well as wide-range cyber-attacks). To this end, this paper presents the addition of local adaptive modular protection (LAMP) units to the protection system to guarantee its reliable operation under extreme events when the operation of the APS is compromised. LAMP units operate in parallel with the conventional APS. As a backup, if APS fails to operate because of an issue in the communication system, LAMP units can accommodate a reliable fault detection and location on behalf of the protection relay. The performance of the proposed APS is verified using IEEE 123 node test system.


I. INTRODUCTION
The protection system is a crucial part of electric grid for fast detection and isolation of faults. A protection system should satisfy the sensitivity and selectivity requirements. Sensitivity is the ability of the protection system to quickly detect and isolate faults before the power grid's stability margins are violated. Selectivity is the capability of the protection system to isolate the fault such that the least number of loads are affected by a power outage [1]. As discussed in [2]- [4], the role of protection system is to enhance the power system's reliability and resilience and to avoid major outages with possible cascading effects. The conventional protection system lacks the intelligence required to modify its actions based on the prevailing system The associate editor coordinating the review of this manuscript and approving it for publication was Wenbing Zhao .
conditions. It uses fixed settings for protective relays that are well-tuned only for fixed and normal operating conditions. However, in a modern distribution system (DS), the operation of the conventional protection system can be highly ineffective due to the high penetration of distributed energy resources (DERs) [5]- [7]. The introduced challenges stem from the characteristics of fault currents supplied by inverterbased resources (IBRs) which are limited and may only include positive sequence components [8]. Moreover, the existence of DERs along the distribution circuits can potentially impose a reverse power flow condition that endangers the selectivity and sensitivity of the underlying protection system and results in unwanted events like sympathetic tripping [9], [10]. On the other hand, a modern DS can adopt different circuit topologies to accommodate a reliable and resilient supply of power to critical regions through multiple branches. The topology of a DS refers to the arrangement of physical devices like lines, cables, tie breakers, etc. which render a specific distribution of electric power. However, changes in circuit topology will highly affect the fault currents which deteriorates the performance of protection schemes. To tackle these challenges, adaptive protection is a promising solution to effectively modify protection responses in real-time based on the prevailing system conditions.
Adaptive protection of distribution systems is addressed in [11]- [24]. Most of the existing adaptive protection schemes are centralized and based on a set of pre-defined logical rules. In [11], an adaptive protection system is presented which oversees the circuit configuration and sends appropriate settings to the relays from a set of preselected settings. In [12], a centralized adaptive protection platform is proposed which calculates the settings of relays in an optimized fashion. Reference [13] creates an optimization algorithm to find the optimized settings for overcurrent relays in a distribution system. Reference [14] studies the impact of DERs on the distribution system protection and designs an adaptive protection system to mitigate those impacts. In [15], a linear programming technique is proposed to coordinate relays in an adaptive protection system. Adaptive protection of overcurrent relays in a distribution system is addressed in [16]. In [19], an adaptive protection scheme is proposed for distribution systems that modifies relay settings by predicting the DERs generation. In [20], a mathematical programming language based interior-point optimization solver is used to find optimal relay settings in an adaptive protection environment. In [22], a central protection center is presented for microgrids that changes relay settings in an adaptive manner. A Prims-Aided Dijkstra algorithm is used to identify the shortest path from fault point to the source node. Microgrid adaptive protection is also addressed in [23] where relay settings are calculated centrally using a centralized adaptive protection system.
An APS highly relies on the communication infrastructure to monitor the latest status of the electric power grid and send appropriate settings to all of the protection relays existing in the grid. This makes an APS highly vulnerable to communication system failures (e.g., broken communication links due to natural disasters as well as wide-range cyber-attacks). To this end, Local Adaptive Modular Protection (LAMP) units are introduced to guarantee the reliable operation of the protection system under extreme events when the operation of the APS is compromised. LAMP units operate in parallel with the conventional APS. As a backup, if APS fails to operate because of an issue in the communication system, LAMP units can accommodate a reliable fault detection and location on behalf of the protection relay. A LAMP unit is technically a local adaptive protection module that is operating in parallel with the protection relay. The advantage of the proposed approach is to accommodate a communication-free and setting less protection that can adjust its reach in real-time based on the prevailing circuit conditions. The objectives of each LAMP unit are: (i) to protect its own region, and (ii) to provide backup protection for the zones in front of it.
The previous works of authors in [25], [26] address the local adaptive protection of relays. However, both of these approaches only address fault detection and classification and lack the required algorithms to identify fault zone and do not include a backup protection feature for the faults on the neighboring cables and lines. This paper makes the following contributions which to the best of authors' knowledge have not been exploited yet: • A communication-free modular adaptive protection scheme is proposed which can detect faults and identify their type based on prevailing circuit condition.
• The proposed machine learning-based approach is fully adaptive in a sense of that it can intelligently adjust its protection zones based the distribution system's configuration in an online fashion.
• The proposed approach is fully setting-less. This will obviate the requirement of regular protection settings adjustment by protection engineers which is subject to human errors.
• The local LAMP units not only protect their assigned primary zone but also provide backup protection for the faults on the neighboring zones. LAMP can provide a faster protection without stacked CTI on the backup protection devices. The rest of this paper is organized as follows. Section II discusses the proposed local adaptive modular protection. In Section III, the preliminaries of Support Vector Machine (SVM) are elaborated. The simulation results are provided in IV. Finally, Section V concludes the paper.

II. LOCAL ADAPTIVE MODULAR PROTECTION METHODOLOGY
In the approach proposed by this paper, each LAMP unit is installed in parallel with the conventional protection relay used in APS. LAMP will operate all of the time and provides a redundancy for the adaptive protection of DS. In particular, if the communication system is outaged, the conventional APS will be ineffective, and LAMP can effectively detect and isolate faults. Fig. 1 shows the location of each LAMP unit in the system. As seen, LAMP will utilize the local current and voltage transformers and can send a trip command to the local circuit breaker. To show the proposed LAMP functionality, a portion of IEEE 123 bus system shown in Fig. 2 is considered. Also, we have utilized PSS CAPE software [27] to simulate fault scenarios. As mentioned earlier, LAMP units can accommodate a setting-less protection for the system. Each LAMP unit is associated with an operating region. For example, in Fig. 2, LAMP R1 region includes all the lines/cables and buses between Bus 149 as the start bus and Bus 13 as the end bus at which the forward LAMP R2 is located. Each LAMP is expected to provide (i) primary protection for its own region and (ii) backup protection for the LAMP units in front of it. To accommodate a well-coordinated LAMP operation, this paper proposes to utilize two protection zones for each LAMP unit. For the protection Zone 1, the LAMP unit operates instantaneously VOLUME 10, 2022 while, for Zone 2, the LAMP unit operates with some delay to guarantee an acceptable Coordination Time Interval (CTI) margin with the LAMP units in front of it. This delay depends on the utility practice. In this paper, we have assumed a delay of 0.2 sec for the backup protection. As an example, the protection zones for R1 and R2 are shown in Fig. 2. To avoid the misoperation of LAMP units for the faults occurring in the neighboring LAMPs' regions, this paper proposes to include the branches connected to the remote bus of the LAMP region in the protection Zone 2. By doing so, one can ensure that LAMP units are well-coordinated, and they avoid instantaneous operation for faults on neighboring lines/cables. The LAMP architecture is shown in Fig. 3. As illustrated in Fig. 3, LAMPs are expected to (i) detect circuit topology, (ii) identify the fault type (e.g., 3-phase to ground, phase-to-phase, and bolted and resistive single phase and double phase to ground faults), and (iii) identify if the fault is within their primary or backup zones. The circuit topology estimation is performed using pre-fault data. In fact, LAMPs keep monitoring the circuit topology during system normal conditions. So, once a fault occurs, a LAMP is already aware of the circuit topology. To perform the classification of fault types and fault zones, an SVM classifier is utilized. SVM is a memory efficient classification approach that can classify the inputs with a very high accuracy. Once the fault type is identified, the zone classification is performed for that specific fault type.

A. TRAINING PROCEDURE
The proposed local adaptive protection approach includes three main classifiers, i.e., circuit topology estimator, fault type classifier, and fault zone classifier. The training procedure for each of these classifiers is provided as follows:

1) CIRCUIT TOPOLOGY ESTIMATOR
The circuit topology estimation is performed during the normal operating condition of system using SVM. The input to the SVM classifier includes the prefault three phase voltage and current root-mean-square (RMS) values and active and reactive power measured at the LAMP location. The topology of DS refers to the arrangement of physical devices like lines, cables, tie breakers. However, the change of circuit topology can significantly change the DS measurements (e.g., active and reactive power flow or current and voltage measured at different locations of the system). In fact, the changes observed in these measurements can be used as a local way of detecting the circuit topology. The training and testing data for the circuit topology estimator are gathered by simulating the IEEE 123 node test system in OpenDSS. In order to train the SVM classifier, all different circuit topologies of DS are simulated using variable load and IBR profiles for a period of one year assuming a system normal condition. The training dataset is selected out of this simulated data. By doing so, one can ensure that the impact of seasons on the load and generation profiles are accounted for.

2) FAULT TYPE CLASSIFIER
The fault type classifier utilizes another SVM to identify fault type (i.e., three-phase to ground, single line to ground, etc.) based on the locally measured three phase voltage and current RMS values as well as the zero sequence current. The RMS values of postfault current and voltages and zero sequence current measurement are the ones used in conventional digital relays for fault detection. This paper aims to utilize similar quantities in our algorithms to make it more practical and easier to implement. To train the SVM classifier, different types of faults are required to be simulated at different locations along each line segment within the operating zones of each LAMP unit. A line segment denotes a branch connecting two nodes of the system. The simulated faults include bolted and resistive ground faults. Faults are applied at every 5% of the line segments' length. Out of the simulated fault scenarios, 60% of them are randomly selected for training and the rest are used for testing the SVM classifier.

3) FAULT ZONE CLASSIFIER
The fault zone classification is performed after the fault type is detected. For each fault type, the simulated fault scenarios at different locations along each line segment are used to train the machine learning classifier. The data is labeled as Zone 1 and Zone 2 based on the location of fault. Similar to the fault type classifier, the locally measured three phase voltage and current RMS values as well as the zero sequence current are used as the inputs to the fault zone SVM classifier. Similar to the fault type classifier, this paper simulates faults at every 5% of the line segments in PSS CAPE and randomly selects 60% of simulated data for training.

B. LAMP's RESPONSE TIME AND COST
The major portion of LAMP unit response time will include the time to calculate the RMS value of the measurements (three-phase voltage and current). This usually requires around half a cycle (8 ms in a 60 Hz system). The response time of the machine learning algorithms depends on the microprocessor used for LAMP implementation. In our proposed approach, the topology estimation is performed during system normal condition. After the fault occurs, the SVM classifier for fault type identification first runs, and then the SVM for fault zone detection is deployed. It should be noted that each LAMP unit can be implemented on a microprocessor. The implementation cost of the proposed approach will be only limited to the cost microprocessors hosting LAMP units. Each LAMP unit can utilize the existing current and voltage transformers for current and voltage measurements.

III. PRELIMINARIES OF SUPPORT VECTOR MACHINE
SVM is a strong tool for the classification of datasets with different characteristics [28]. The objective of SVM is to identify a hyperplane for categorizing the input dataset into different classes. For example, in a classification problem with two classes, one can formulate a linear hyperplane class as [29] y where x is the training set that includes N input vectors x 1 , . . . , x N . The corresponding output targets are t 1 , . . . , t N with t n ∈ {−1, 1}. y(x) describes the output target values that correspond to the input data x and are not a part of the training set. If there is an overlap between different classes, slack variables, ξ n ≥ 0 , can be used, where ξ n = |t n − y (x n )|. The classification of a dataset considering ξ n can be written as t n y (x n ) 1 − ξ n , n = 1, . . . , N SVM tries to maximize the separating region between w T x+b = −1 and w T x+b = 1 margins as well as accounting for the misclassified points through the slack parameters by minimizing where C > 0 provides a trade-off between the slack variables impact and the separating region. The Lagrangian is defined as where a n ≥ 0 and µ n ≥ 0 are the Lagrange multipliers. Finding the first derivative of (4) with respect to w, b and ξ n and making them equal to zero, one has w = N n=1 a n t n x n (5) VOLUME 10, 2022 N n=1 a n t n = 0 (6) a n = C − µ n (7) Using (5), (6), and (7), (4) can be reformulated as a n a m t n t m x n x m (8) with the below constraints 0 ≤ a n ≤ C N n=1 a n t n = 0 From the optimization problem, the training points along with a i form the support vectors, and optimal b are where M are the data points inside the margin hyperplanes; 0 < a n < C and S denote the support vectors. In (1) to (11), it is assumed that the original data is linearly separable. If this assumption does not hold, one can transform the data to a higher dimensional space using a nonlinear function φ(x). Since in a higher dimension space, calculating the inner product of φ(x) is computationally inefficient, a kernel function can be used to calculate the inner product in the original data space. The common kernel functions are linear, polynomial, and radial basis functions. The kernel function can be written as Using kernel, (8) can be reformulated as L(a) = N n=1 a n − 1 2 N n=1 N m=1 a n a m t n t m k(x n , x m ) With this optimization problem, a i that form the support vectors along with the training points can be calculated. Moreover, optimal b is found as where M are the data points inside the margin hyperplanes with 0 < a n < C; S describes the support vectors. Once the solutions to the optimization problem are found, the optimal SVM decision function can be formulated as The SVM operation flowchart including its testing and training procedure is provided in Fig. 3.

IV. SIMULATION RESULTS
To verify the effectiveness of LAMP modules, IEEE 123 node test system [30], shown in Fig. 5    LAMP units are operational as one tile line is always out of service.

A. LAMP ZONES FOR ALL FOUR CONFIGURATIONS
We have performed the proposed zonal machine learning protection on IEEE 123 node system. The simulation results consider four different circuit topologies which are shown in

1) CIRCUIT TOPOLOGY ESTIMATION
Each LAMP unit utilizes the normal operating condition (prefault) data to estimate the prevailing circuit topology of the system. The system consists of IBRs as shown in Table 2. The power output from each IBR is scaled using the PV profile from [31]. In this paper, the prefault voltage, current, active power, and reactive power measurements at the LAMP location are utilized as the inputs to the SVM to estimate the corresponding circuit topology. The data includes measurements for all four configurations. The data collected on even weeks are used for training and the data collected on odd weeks are used for testing. The training data are further down-sampled to have only hourly data, i.e., only 19% of data are utilized for training using a function in sklearn [32]. For four configurations, four different class labels are generated by SVM. The SVM classifier uses a linear Kernel function and parameter C in (3) is equal to 0.12. It should be noted that the circuit topology estimation is only performed for LAMPs R4, R6, RTL3, and RTL4. The reason is that the change of circuit topology only has an impact on the zone definition of these LAMP units. This means that other LAMP units are not required to alter their zones definition if the circuit topology changes. This is illustrated in Figs. 5 to 8. The accuracy of the circuit topology estimation results are provided in Table 3. The confusion matrix for the circuit topology estimation results for LAMPs R4, R6, RTL3, and RTL4 are provided in Figs. 9a-9d. The high accuracy of SVM algorithm using the testing dataset shows that the algorithm is not overfitting.

2) FAULT TYPE CLASSIFICATION
Based on the prevailing circuit topology, the LAMP will identify fault type once a fault occurs. In PSS CAPE software [27], seven different types of faults including three-phase to ground (TPH), single line to ground (SLG_A, SLG_B, SLG_C), and double line to ground (DLG_AB, DLG_AC, DLG_BC) are simulated at different locations (every 5% of each line segment) within the operating regions of LAMP units. A line segment denotes a branch connecting  two nodes of the system. For example, in Fig. 5, the line segments for LAMP R1's Zone 1 include (1,2), (1,3), (3,4), (3,5), (3,6), (1,7), (7,8), (8,12), (8,9), (9,14), (14,10), (14,11) branches. On each line segment, faults are applied on its two VOLUME 10, 2022 terminal nodes as well as at 5%, 10%, . . . , 90%, and 95% of the line segment length. Out of the simulated fault scenarios, 60% of them are used for training and the rest are used for testing. The simulated faults also include bolted and resistive ground faults. The fault resistance is equal to 1 . The inputs to the fault type classifier are the three phase voltage and current RMS values as well as the zero sequence current measured at the location of LAMP unit. The SVM classifier uses a linear Kernel function and parameter C in (3) is equal to 0.12. The fault type classification results render 100% accuracy for all LAMP units. The fault type classification results for LAMP R1 are provided in Fig. 10. The high accuracy of SVM algorithm using the testing dataset shows that the algorithm is not overfitting.

3) ZONE CLASSIFICATION
Once the fault type is identified at the LAMP unit, zone classification is performed.  Tables 4 to 7. The zone classification results are only provided for the LAMPs that accommodate both Zone 1 and Zone 2. The high accuracy of SVM algorithm using the testing dataset shows that the algorithm is not overfitting.

4) LAMP RESPONSE TIME SUBSEQUENT TO FAULT
We implemented a LAMP unit on a Raspberry Pi microprocessor. The utilized Raspberry Pi has a BCM2835 CPU with Raspbian GNU/Linux 10 operating system. On this Raspberry Pi, the SVM classifiers for fault type and zone detection take 1.5 ms and 1.126 ms to return the results, respectively. This means that after the fault happens and RMS values of measurements are calculated, it will take around 2.626 ms to detect fault type and fault zone in the LAMP unit.

5) COMPARISON OF SVM WITH OTHER CLASSIFIERS
Herein, SVM accuracy is compared against other classification algorithms like Nearest Neighbors, Decision Tree, Random Forest, and Naive Bayes. For the fault type classification at RTL1, the accuracy of these techniques is summarized in Table 8. For zone identification at R1, the accuracy of classification algorithms is compared in Table 9. As seen, SVM renders a very good accuracy compared to other classifiers.

C. IMPACT OF TOPOLOGY CHANGE ON THE COORDINATION OF CONVENTIONAL APS
The APS and protection setting optimizer proposed in [12] is utilized to create optimal relay settings assuming conventional time overcurrent (TOC) elements exist at the protection device locations in Figs. 5 to 8. In this case study, it is assumed that the IEEE 123 node system is first operating in Configuration 1 (Fig. 5). The APS sends the optimized settings to the TOC elements. Using PSS CAPE, a coordination study is performed to identify any misoperations or CTI violations in the protection system. The coordination study includes applying different types of faults at different locations of the system and calculating the CTI between the backup and primary TOC elements for each fault scenario. The coordination study results showed that with the settings provided by the APS, no misoperations are observed. Moreover, all CTIs are above 0.2 sec, which shows that the system is well coordinated. The calculated CTIs for different fault scenarios are summarized in a cumulative distribution function (CDF) plot in Fig. 11. However, if the communication system fails and the configuration of system changes to Configuration 2, the TOC elements won't be able to receive updated settings from APS. Running the coordination study for IEEE 123 node system in Configuration 2 while using the settings that are suited for Configuration 1 returned 99 misoperations in addition to 5 CTI violations. Each misoperation case denotes that for a fault scenario, the backup element has operated faster than the primary element. This study shows that the failure of the communication system can highly impact the effectiveness of conventional APS. The results presented in Section IV.B show that LAMP units can effectively provide a well-coordinated protection in the system by effectively estimating the DS topology and detecting fault types and zones with a very high accuracy after the fault occurs.

V. CONCLUSION
This paper presents local adaptive modular protection (LAMP) units to significantly improve the reliable operation of the protection system under extreme events. LAMP units operate in parallel with the conventional relays that are coordinate by APS. If an issue is identified in the communication system of APS, the LAMP units will act as a reliable backup to adaptively protect their assigned equipment under different circuit conditions. The proposed approach utilizes SVM as a machine learning algorithm to (i) estimate the circuit topology, (ii) identify fault type, and (iii) detect fault zone. For each LAMP unit, we have defined two zones. The faults within Zone 1 are cleared instantaneously while the faults in Zone 2 are cleared with some delay. The defined zones help with the selectivity of the protection system in clearing faults where each LAMP unit not only protects its own equipment but also provides backup protection for the neighboring equipment. The performance of the proposed APS is verified using IEEE 123 node test system. The simulation results verify the accuracy of LAMP units in circuit topology estimation, fault type classification, and zone classification.