Overcurrent protection based on ANNs for smart distribution networks with grid-connected VSIs

Recently, the global concern for protection coordination is growing with the impact of distributed generators connected to medium voltage distribution system. Effective protection strategies need to be developed in order to avoid undesirable tripping when distributed generators based on Voltage Source Inverters are connected to the medium voltage grid. According to Spanish grid code requirements, the inverter controller response in this paper is assessed under grid faults integrating low voltage ride through capabilities. This paper presents a novel use of a communication-based directional relay system with artiﬁcial neural network, an appropriate option for smart grids protection. A protection strategy is proposed using two algorithms. The ﬁrst algorithm is based on gathering data of all the protective devices in the grid and send it to a centralized controller. The second algorithm is based on a zone controller using the communication between the peer protection devices in the same line. One of the main advantages of the zone controller is that no need to mod-ify the protection devices setting in case of temporary grid reconﬁgurations. The behaviour of the protection algorithms is validated through both simulations in MATLAB-Simulink and experimental results.


INTRODUCTION
Global growing penetration in renewable energy (30% per year) [1], and new types of loads such as the electric vehicles have prompted the transition of such "smart" solutions to the electrical industry. Specifically, Distributed Generation (DG) penetration has increased significantly in Distribution Systems (DSs) over the past decade [2]. Commonly, inverter interfaced DGs, such as photovoltaic (PV), are connected to DS [3]. However, to realize these accomplishments, several challenges arise on the route [4]. In DSs, fault location is critical and complicated, especially with DG penetration, due to multiple power generation that will affect Protective Devices (PDs) settings. If the exact fault location is determined using smart protection systems, these networks' performance can be significantly increased. Most faults in the power system components are located in the cables or the lines, so more effort needs to be exerted to enhance the performance and reduce the error [5]. It may seem that the short-circuit current of DG-based inverter may have a negligible  [6]. However, the power flow in the grid will vary. In the case of high DG penetration, it will also affect the relay short-circuit current value, affecting the coordination of system protection [7].
The most common protection techniques used are unable to ensure the fault isolation's selectivity and rapidity on the entire protected grid if DGs are installed. Therefore, software-based protection techniques are now a reality because of smarter and more reliable meters. The numerical PD is designed to include monitoring, metering, managing, communicating, and recording events and its basic protection function [8]. Numerical PD is integrated as computational hardware with a specialized Digital Signal Processor (DSP) to meet critical protection requirements. Numerical PDs will soon replace previous PDs technology such as (digital, static, electromechanical) PDs [9].
Various methods have been developed to locate and detect faults in DSs with DG. It is possible to divide these methods into two categories, conventional and Artificial Intelligence (AI) techniques, as seen in Table 4 of [10]. One tendency focuses on using direction relays to isolate the faulted part of the grid [11]. Another trend is to use AI techniques. One of these trends is to use Artificial Neural Network (ANN) to locate the fault for inverter-based DG network and without the need to communicate between PDs [12]. However, the problems regarding system dynamics have not been studied intensely. Recently, multiagent system (MAS) is applied to coordinate between PDs [13]. MAS is also used with ANN combining the fault direction distinguishing method with its communication system to locate asymmetrical faults [7]. A similar idea has been used with directional relay instead of ANN [11,14]. A comparison between the aforementioned methods can be shown in [15][16][17].
Previous studies focus only on radial grids. In [18], MAS protection scheme based on a variable differential protection scheme is proposed for micro-grid protection for radial and ring grid. The protection scheme is not tested for inverter-based DG either with high fault resistance. In [19], a novel algorithm is proposed, based on both sine matching and differential protection in DS with DG penetration. The algorithm guarantees the precision and alacrity necessary to recover. However, with high DG penetration or high fault resistance, the protection scheme would take a longer time to make decisions.
Recently many researches have been focused on the study of the protection issues in ring grids. In [20], ANN with communication between PDs has been presented to solve this issue. In [21], the overcome of this problem using directional relays has been studied. In [22], MAS has been used to indicate the faulted part of the grid. Considering the studies above do not focus on DGs based inverter. Different methods have been recently established by considering the presence of DGs based inverter. In [3], a fault detection scheme based on Discrete Wavelet Transform (DWT) and ANN have been proposed. Nevertheless, due to massive transient data to train ANN, the error percentage (6.43%) needs to be improved. In [23], a protection system based on communication is developed according to IEC61850 communication standard. However, more information is needed to be provided to study the dynamic behaviour and the communication characteristics of the system. In [24], a protection strategy for an islanded MVDC microgrid is studied. A communication-based DC directional overcurrent protection scheme is employed to isolate the faulted part of the grid. In [25], Wireless Fidelity (Wi-Fi) 's feasibility in a communicated protection coordination scheme has been investigated. However, the Wi-Fi protocol's security and interference proneness need to be considered, followed by the experimental validation. Previous studies rely entirely on communication, and no solutions have been provided during the loss of communications. In [26], the protection requirements of high PV penetration have been investigated. The proposed protection scheme is based on communication between overcurrent protections to eliminate the fault. The demonstrated results focused only on symmetrical faults.
First, this paper is going to investigate the motivation and contribution of the presented research. Second, the impact of DG penetration on the DS protection. Third, the proposed protection scheme will be explained for different fault scenarios, taking into account the majority of issues encountered in DSs with high DG penetration. Fourth, the analysis of the test results will be presented and commented. Fifth, the experimental validation of the proposed algorithm will be demonstrated, right before the conclusion.

RESEARCH MOTIVATION AND GAOLS
As explained in the introduction, protection algorithms can be classified into two methods: (1) using "classical" algorithms and (2) using algorithms based on AI [15]. Conventional techniques find limitation due to of fault resistance, the influence of prefault load condition, and signal contamination due to noise. The major reason for searching for a new solution is that an accurate location of a fault can reduce the time required to restore power supply to customers. Conventional techniques involve complicated calculations and may introduce errors in the estimated fault location. These can be overcome by the application of ANN [16]. It can be seen from Table 1 that few research work has been done about the behaviour of the protection system in the case of a ring grid with high penetration of DG based inverter. None of the previous studies has designed a protection algorithm using a communication system with a directional relay system based on ANN. This protection algorithm allows locating different types of faults (symmetrical and unsymmetrical) in a MV ring DS, which will provide a more secure, reliable, and redundant protection environment. Therefore, the need for a perfect, dependable, and secure method is still demanded. Thus, the objectives of this paper can be summarized as follows: 1. The proposed ANN protection controller is able to locate the fault using a simple training algorithm, a minimum number of layers to minimize the training time and minimum hidden layers. The new approach can increase availability, reliability, and accuracy of the system, and at the same time, rapid the protection system response for the sudden changes in the grid (addition of new parts, temporary modifications, and network reconfiguration due to failures or maintenance). 2. A new protection scheme different from [30] is proposed, and unlike [26], the algorithm is tested for symmetrical and unsymmetrical faults. Moreover, unlike [3,24,25], the proposed strategy can also be used for several neutral connections of the HV MV −1 transformer. 3. The use of centralized control (CE) and zone control (ZO) algorithms will be explained, modelled, and adapted by ANN to coordinate the PD setting and localize the faulted line automatically. Changing conditions of load consumption, DG penetration, different fault locations, fault types, and (HV MV −1 ) transformer configuration has been considered. Unlike [18,19], the protection algorithms are tested for both low and high fault resistance. Besides, the protection algorithms have been checked for stiff and weak grids. 4. Comparing both algorithm decisions gives an advantage of backup protection, as each algorithm is working as a backup for the other algorithm.   -Loss of Communications between the peer PDs, will produce lack in the decision precision.
The VSI controller's response was implemented under grid faults combining the capabilities of LVRT and the specifications of the Spanish grid code [31]. In order to have a more efficient and consistent process, the proposed strategy is based on evaluating CE and ZO algorithm decisions. During a fault, the CE unit will determine the fault location based on networkwide comparative measurements and trip the appropriate breakers. To improve the security and the redundancy of the protection system, ZO will be introduced to function in parallel, and the decision of both controllers will be evaluated. The algorithm depends on the peer PDs in the same line and sends their data to ZO located at each PD. The benefits are that it has a more secure communication, and it can be adapted for temporary reconfigurations of the grid, as shown in Table 2.

IMPACT OF DG PENETRATION ON THE DS PROTECTION
DG can have significant impacts on system protection [32]. DGs could: (1) Feed faults after protection opens [33], (2) affect the coordination between PDs that will cause coordination loss [34], (3) cause loss of speed in PDs, and unintentional islanding, (4) impact the voltage profile, power quality considerably, and could cause power loss.
Due to the large penetration of DG in a ring DS, the control of the DG converters during abnormal conditions plays an essential rule in the stability and the power quality of the entire system. In this paper, the VSI control is validated under LVRT capabilities and Spanish grid code specifications. Power converters are designed and controlled not only to inject power into the grid during normal conditions, but also to support the grid during transient operation by reducing the active power injection, and increasing the reactive power injection according to the grid codes [35]. Figure 1 shows the general scheme of a three-phase inverter connected to a grid, and Table 3 shows the parameters of the analysed grid. A photovoltaic (PV) generator delivers power to the inverter's DC-side and converts it to AC power by regulating the active and reactive injected currents according to the grid code. The mathematical expressions of the abc variables that model the system of Figure 1 (considering the generatorsign convention) are given in (1): where v abc Ref are the abc components of the reference voltage of the inverter, v g abc are the abc components of the grid voltage, i abc are the injected abc currents from the inverter to the grid and R and L are the resistance and the inductance of the filter, respectively. The authors' previous work [36,37] demonstrated the behaviour of grid-connected converter under grid faults according to the Spanish grid code. The reference positivetransformed currents are imposed directly from grid code by  using Equation (2). The control strategy named Balanced Current Control (BCC) strategy had been proposed, which aims to inject balanced currents into the grid. To accomplish this aim, this strategy imposes zero negative-sequence current, as shown in (3).
where I a , I r are the active and reactive currents, i f are the forward positive-and negative-reference currents. After obtaining the reference transformed currents, the reference voltage is calculated using Equation (4), as shown in Figure 1.
where v f Ref is the transformed inverter reference voltage, s = d/dt is the derivative operator, i f is the transformed injected current, and v gf is the transformed grid voltage. A voltage sag with depth h = 0.5 was applied to show the behaviour of the VSI controller connected to the PV system. The inverter control strategies were used to demonstrate the grid-connected converter action under grid faults in compliance with the Spanish grid code, as shown in Figure 2. As shown, the injected current at steady state during faults always inject (1 pu), that guarantee the limits of power switching device is within Safe Operating Area (SOA). In addition, no high variation in currents are obtained, due to not only the protection strategy but also the limiting choke inductor located in the DC bus.
It is important to note that, in DG based inverter, the transient period is shorter, and the short-circuit currents are not high so that this study will concentrate on the system steadystate behaviour during the fault period. Another aspect that  Single line diagram of IEEE 9-bus system with DG penetration and zig-zag connection in Bus 1 at the secondary of the (HV MV −1 ) transformer during fault in DL3 (a) power flow without DG (b) power flow with DG must be taken under consideration is the ground connection of the (HV MV −1 ) transformer because this connection will affect the short-circuit current in the network, which will lead to a change in the protection system behaviour. Different connections have been studied in this research according to various topologies obtained from several facilities. The most common configuration used is to connect a zigzag transformer to make an artificial neutral in the delta side of the middle voltage transformer (YNd11 grounded thorough zigzag), as shown at Bus 2 in Figure 3 [38]. For the low voltage side transformer (MV/LV), the connection for all the loads and DGs connected to the grid is delta/star grounded on the low voltage side (Dyn11) [39]. IEEE 9-bus standard is used in this paper as an electricity distribution ring system, where the system has one main grid and different number of DGs connected to multiple buses. The IEEE 9-bus transmission system has been adapted to a distribution system, as shown in Figure 3 [20].
When a short-circuit occurs at the location indicated in Figure 4, both the grid and the DG units contribute to the fault current, as it is shown in Table 4. The division of the current contribution depends on the network configuration, grid impedance, and power generated by the DG unit. The DG presence can lead to fault current detection problems. As discussed in the literature, the penetration of DG changes the value and direction of the system's power flow (DPF) and the fault current [21], which leads to the miss-coordination of the relays [11]. Depending of the type of fault the values of positive, negative, and zero sequences change significantly when DGs are installed, so the coordination of the protection system needs to be updated.
The PDs must be able to adapt to the changes introduced by connected DGs to the grid, which implies a potential use of PDs with directional capabilities with several requirements as rapid reactions, sensitivity, selectivity, reliability, and cost-effective, thus enhancing DG fault ride through [40]. As shown in Figure 4, if a fault is located in DL4, the DPF in ring grids is affected significantly by the amount of DG penetration to the system, the green arrows indicate that the DPF do not change when the fault occurs, and the blue arrows are use when the DPF change. Moreover, the DPF depends on load consumption, which is varied continuously and cannot be controlled. Therefore, using this phenomenon will give the protection scheme a degree of certainty to locate the faulted part of the system under different circumstances. The same idea can be used in the case of microgrids because it does not depend on the magnitude of the voltage and currents of the grid. When a short-circuit faults occur across inverter output terminals, that cause a short-circuit across the DC link capacitor. As a result, create very high di/dt in a very short time (microseconds). In this case, a small concentrated turn-on snubber circuit could be used to reduce the di/dt [41].

PROPOSED FAULT LOCATION ALGORITHMS
The proposed strategy will be based on the decision of two algorithms to have more dependable and secure DS protection. The first algorithm, named CE, depends on the DPF data gathered from all PDs in the grid. These data will be sent to the CE, and then the controller process these data and send back the appropriate trip signal to isolate the faulted part of the grid. The second algorithm is the ZO, located at each PD in the grid, will depend on the exchange of the DPF data using the communication between both PDs in the same line to adjust their status according to the faulted part of the grid. If any communication problem is detected, the decision priority goes directly from one algorithm to the other. Figure 5 shows the conceptual diagram of the proposed protection strategy. If both decision signals are available, then they will be compared, and a priority check will be applied to give the appropriate decision, as will be explained later in this section.
Traditional protection schemes have been evolved into new features due to the advent of standards such as IEC 61850 and the use of Ethernet-based communication capabilities. This communication module is in charge of encrypting the information through different communication protocols for the electric sector; also, it takes a critical relevance to communicate with the control centre. It is possible to identify the communication loss by using a check signal to ensure communication availability, as mentioned in the communication standard (IEC 61850) [42]. The standard provides the necessary features and services to PDs communication and automation tools by providing a channel between PDs and control platforms. This standard offers significant services like (1) Manufacturing Message Specification (MMS), (2) Generic Object-Oriented Substation Event (GOOSE), and (3) Sampled Values Protocol (SVP). The GOOSE service is designed to replace the existing signal wiring in the control systems and add new features. Moreover, GOOSE can carry more information than just a cable, communicate rapidly between different PDs, and provide quality  of service. The protection system utilizes several ways to communicate between PDs and the CE. Some of these ways are TCP/IP-based Ethernet, Wi-Fi protocol, or Cellular networks communication [22,43]. Cellular networks were primarily used for public wireless data services; however, they are not a robust communication relay network because they could be exposed to discrepancy and hacking. The use of CE and ZO methods are modelled and adapted by ANN to coordinate the PD decision automatically and to localize the interference on the faulted line depending on several parameters. When a fault occurs, the control unit at each PD can determine the fault location based on comparative network measurements and trip the appropriate PDs to isolate the fault.
In the next subsections, ANN development, DPF calculation, fault location, and PD priority algorithms will be explained in detail.

Artificial neural network development
The use of ANN gives a benefit of fast decision-making and enormous data processing, which makes ANN preferable especially in DS that can contain a large number of buses. The train-ing process depends on the input data and the expected outputs to obtain the ANN function. For this kind of application, it is easier and faster to use ANN than a scripted program that needs many modifications for every change in the grid, which will complicate and reduce the precision of the algorithm decision, especially when the number of buses increases. The structure that explains the ANN fault location technique is shown in Figure 6. Each input to neuron (x) has a weight (W) that corresponds to the contribution of the input, then a bias (b) is added to the sum of all inputs (from 1 to 24); every input contains 64 samples per cycle.
The control of DS protections will be studied using ANN, mainly because of their ability to recognize and classify patterns, which make ANN ideal for this application. The aim is to identify the fault location and to isolate the faulted part of the system as fast as possible. In order to train ANN for specific grid behaviour, some considerations need to be addressed. Grid performance needs to be analysed during multiple scenarios, as changing fault type, fault location, fault resistance, number of DG connected to the grid, location of DG, DG contribution, load consumption, and different neutral connections for the MV side of the HV MV −1 transformer. The algorithm is tested for several neutral connections, and then in this paper is applied   to a specific connection (YNd11 grounded thorough zigzag). To implement this task, a MATLAB Toolbox named Neural Net Fitting tool (nftool) is used. Next, the most appropriate training method has been chosen, which is "Levenberg Marquardt". This technique takes more memory but less training time [44]. Exactly there is no rule to decide the number of hidden layers and the number of neurons in each layer, ANNs with more hidden layers are harder to train [45], therefore according to [46], in order to calculate the number of hidden layers, the following equation is used

No. of hidden layers
where X and Y are the number of inputs and outputs, respectively, and σ is a constant between 1 and 10 that can be determined using trial and error to find the optimal number of hidden layer neurons for the minimum mean square error (MSE). After finishing the training of ANN, test scenarios need to be implemented in order to verify the reliability and accuracy of the ANN, and the test patterns must be different from the training patterns. The ANN is trained for approximately 5000 cases, to manage the parameter changes that will affect the decision of the protection algorithm. Figure 7 shows the aspects that must be taken into consideration to train the ANN, and Table 5 shows the ANN parameters. Figure 8 shows the MSE for different number of neurons, different number of iteration in a 3D preview and Figure 9 shows the decision of different ANN models with the estimated output. The ANN will give a faster decision instead of using a script with loops that will delay the decision-making process.

Calculation of DPF
For ring grids, identification of DPF becomes an attractive option due to the bi-directionality of fault currents. In this paper, in order to identify DPF and to implement the proposed protection algorithm, an Intelligent Electronic Device (IED) is used for the real experimental implementation and investigation of the algorithm using DSP TMS320F28335. Instrument transformers obtain voltage and current measurements (VT and CT) and reduce the measurement level signals to suitable lower level signals that are convenient for processing by PD controller. The direction of the fault current injection can be estimated using the phase angle between the fault current i(t) and the corresponding voltage v(t) to determine the direction of the fault. Figure 10(a) shows that the overlapping interval between voltage and current during normal conditions is longer than the non-overlapping interval. However, in reversed power flow conditions is the contrary. The figure also shows the steps to model the directional element. Figure 10(b) shows the sampling signal of voltage and current, where "1″ corresponds to the positive value of the signal, and "-1″ corresponds to the negative value;  Figure 10(c) shows the multiplication of both signals, the duration of "1″ and "-1″ related to the overlapping and nonoverlapping intervals of Figure 10(a) [47]. This difference in the overlapping interval is integrated to be used to apply a relay's directional element under normal and reversed power flow conditions, as shown in Figure 10(d,e) [48]. To calculate DPF at each PD, abc voltage and current need to be measured. During the normal condition, the power flow at both ends of the line will be the same, and, during a fault, the DPF will change at one end of the faulted line.

Fault location
Control algorithms have been developed based on identifying the DPF and calculating (I 1 ) in all the PDs to locate and isolate the faulted part of the grid. In the case of ring grids, the ANN decision depends on the DPF for the identification of the fault location. For radial grids, the decision depends on (I 1 ) because in some sections of the radial grid without DG penetration, the DPF will not change. Figure 3 shows the conceptual diagram of CE and ZO controllers in the analysed grid.

Centralize control algorithm
The main idea is based on processing the DPF and (I 1 ), as inputs to the CE. They were received from all PDs to give the appropriate decision. The changes in short-circuit current and in the DPF are considered in each PD for ANN training. Figure 11(a) shows the flowchart of CE. The calculation of the DPF and I 1 is performed locally using voltage and current at each PD, and only the processed data will be sent to the controller. This step will make the learning process more accessible and reduce the error percentage because there is no need to send voltages and currents to the CE, which will complicate the communication process. The next step is the training and testing of ANN. The method uses back-propagation, which is a supervised learning algorithm used by a multilayer perceptron. Finally, the ANN decision is obtained, which must have a minimal error value corresponds to the faulted line number and PD trip signal. The ANN parameters for CE are: 24 inputs correspond to the all PDs in the grid, two hidden layers, and one output corresponds to the number of the faulted line. The main advantages of this system are that it centralizes the security of the entire system into a single device, ensuring that this system has a single point of failure, performing state estimation and security assessments. On the other side, communications problems (due to failure or security issues) or CE unit failure will result in complete loss of protection for the length of time it takes to restore services [49]. Furthermore, in order to send all the data to a CE, special communication need to be implemented between all PDs and the controller [13,23,50]. Besides, communication delay must be taken into consideration; the total communication delay consists of four components: transmission delay, queuing delay, propagation delay, and processing delay. The total communication delay will be small enough to enable the trip signals to be transferred within timescale < 1 ms [14]. In order to resolve the disadvantages of the CE, another algorithm will coordinate with CE, and the decision will be based on both algorithms.

Zone control algorithm
In order to increase the redundancy of the system, ZO is cooperating in parallel with CE. By using the ZO, every PD can take their decision locally with the help of the data obtained from the peer PD on the same line. ZO can detect the power flow at each end of the line and update its decision. In this case, no need for communication between all the PDs and a CE. Usually, the communication system between the two PDs in the same line is processed using Power Line Carrier (PLC) with high-frequency signals or using an optical fibre cables, which will make this communication more secure [4,14]. Figure 11(b) shows the flowchart of the ZO algorithm. ANN of each PD can identify if there is a fault and the direction of the fault, which means it can know if the fault is upstream or downstream of the PD. The ZO ANN consists of: Two hidden layers, four inputs correspond to both PDs of each line (DPF and (I 1 )), and four outputs (Figure 11(b)). Each PD receives data from the peer PD and compares this data with its data to give an appropriate trip signal decision that able to isolate the faulted line. The main advantage of this strategy is the ability to adapt to any grid modification even for temporary changes, unlike the CE algorithm is trained for the current grid configuration. For example, if another line added to the grid, the CE needs to be trained again to add new inputs. However, for the ZO, the same ANN used for each PD can be implemented for the newly installed line. Another advantage of

FIGURE 11
Concept diagram of (a) CE algorithm, (b) each PD fault location controller including ZO algorithm, (c) post processing algorithm this algorithm is the separate decision for each line, less training time, and more straightforward training compared to CE. Furthermore, no need for special communication between the PDs and the controller that makes the PD response is more quickly and effectively.

PD priority algorithm
Depending on the decisions of the two algorithms, each PD must take a local decision individually. This step will give more redundancy to the system to enhance the security and reliability during an abnormal condition. Moreover, each algorithm must send a communication check signal to ensure the availability of the decision, as shown in Figure 11(b). The PD controller must check the availability of the signals before the algorithm is executed. In case of a discrepancy (loss of one communication check signal) and to ensure that there is not a temporary error, the signals will be rechecked with a delay (half a cycle). Both controller decisions (CE and ZO) will be checked if both communication signals are received. If both decisions agree, then the decision will be taken, if not, the priority goes to the decision of the ZO, because it has more secure communication signals [25,51]. If communication signals did not receive, then only the peer signal will be checked; if it received, then the decision of ZO will be performed. If not, then the CE will be checked, but if there are no decision signals received, then the decision is to send a trip signal to the PD. Figure 11(b) shows the flowchart of each PD fault location controller. A noticeable advantage of this strategy is that the algorithms are working correctly regardless of the connection of the (HV MV −1 ) transformer. However, this connection will change the values of the short-circuit current in the grid. If the CE controller send a trip signal to the PD, but the PD did not respond, in this case the CE controller will start a post processing stage, as shown in Figure 11(c), to disconnect the closest line to the fault. For example, if a fault occur at DL4 then PD7 and PD8 should disconnect, however, if PD7 does not disconnect, the CE controller will disconnect PD5 and PD6, which is the closest line to the fault.
The pseudocode of each PD can be explained as follows: (1) Calculate DPF, (2)

ANALYSED GRID AND TEST RESULTS
In this section, the analysis of the test results of the fault location strategy obtained using MATLAB Simulink will be presented. Figure 3 shows the analysed IEEE 9-bus ring grid, with DGs connected at buses 5, 8, and 10. The same protection algorithms can be adapted to another grid configuration with a different number of buses. Both algorithms have been checked using the analysed grid in the ring and radial configurations, changing the load consumption, DG penetration, fault location, fault type, fault resistance, and (HV MV −1 ) transformer configuration. Table 6 shows some of the cases used to verify the protection algorithms. In all cases, the protection algorithms can detect the location of fault accurately.
As an example of the obtained results, Figure 12 shows the behaviour of CE and ZO algorithms in two scenarios to show the performance of both algorithms. Figure 12(a) shows CE and ZO decisions with two DGs during a three-phase fault in DL3,  and Figure 12(b) shows the decisions of both algorithms without DG. As seen in Figure 12, the abc voltages, currents, DPF, CE decision, ZO decision, and trip signal have been shown; to illustrate the values of the short-circuit current in different situations and the behaviour of the protection algorithms in these cases. In case of three-phase to ground fault in DL3, as seen in Figure 3, the voltage of the three faulted phases are reduced, (abc voltages of PD5 and PD6 in Figure 12(a)). Moreover, for three phase currents, the values increase to ≈6.1 pu (PD5 currents in Figure 12(a)), due to the DG penetration to the fault. However, for the same type of fault without DG penetration (PD5 and PD6 in Figure 12(b)), in this case, the short-circuit currents go to a value < 6.1 pu (≈4.8 pu), because the faulted current is supplied only from the main grid. Also, the DPF is changing due to the fault; for example, in the case of three-phase fault, the DPF for the three phases will change (PD6 in Figure 12), as explained in subsection A of Section III. CE decision corresponds to the faulted line number, as 0 means there is no fault, and the values from 1 to 6 correspond to the faulted line number, as explained in Section 3.2. For example, when there is a fault in DL3, the decision of CE is three, which refers to the faulted line number.
However, the ZO decision corresponds to the PD in the faulted line, as explained in Section 3.2. For example, when the fault is in DL3, only ZO decision signals of PD5 and PD6 will be activated, and the rest of the PDs will not trip. As both fault location algorithms (CE and ZO) can detect the fault, a trip signal is sent to PD5 and PD6, when the fault in DL3 (Figure 12). In order to guarantee that the fault is permanent, the trip signal is delayed for nearly 100 ms and after that, the decision is executed [50]. Figure 13 shows the DPF, CE, ZO decisions, and trip signals for the analysed ring grid shown in Figure 3, during symmetrical and unsymmetrical faults in DL3 and DL4, respectively. The figure shows in 3D preview the patterns of each signal for the 12 PDs in the grid. In Figure 13, the x-axis represents the time in seconds, the y-axis represents the 12 PDs in the grid, or in the case of CE, it represents the CE control device, and the z-axis represents the analysed signal (DPF, CE decision, ZO decision, and trip). For example, during a symmetrical fault in DL3, the DPF will be different only for PD5 and PD6. In addition, if the fault is in DL4, the DPF will be different only for PD7 and PD8. The decision of the CE corresponds to the  Single-phase to ground number of the faulted line; in the case of a fault at DL3 its value is equal to three, while the ZO decision signals of ZO of PD5 and PD6 are one, because the rest of the PDs will not trip. Besides, when the fault is in DL4, the CE decision will be equal to four, and the ZO decision signals of ZO of PD7 and PD8 are one. According to the availability of both decision signals in each PD, a post-processing step is performed to address the trip signal sent to the corresponding breaker in the faulted line. As shown in Table 7, in case of single-phase faults the differences in short-circuit currents are not significant due to the zigzag connection, which maintains the short-circuit currents to limited values. However, for two-phase to ground fault the values are significantly changed, due to the different path of the fault current.
The protection scheme is tested for different fault resistances, and their values have been changed from 4 to 0.05 Ω, as shown in Figure 14(a) and (b), respectively. As shown, in both cases, the decision is not affected. Also, the behaviour of the protection algorithms has been checked for stiff and weak grids. Figure 15(a) shows the short-circuit current during two-phase to ground fault at DL3, and algorithms decision for stiff grid, and Figure 15(b) shows the same signals for weak grid. When the short-circuit currents of both grids are compared, it is clear to notice the difference in short-circuit current values between stiff and weak grids. For example, the short-circuit current during the two-phase fault is ≈5.6 pu for stiff grid, and 1.2 pu for a weak grid. As shown, due to the protection scheme dependability of DPF, the algorithms can detect the faulted part of the grid in both cases.
The recommendation of the utility industry with respect to the harmonic levels in the system is usually <5%, as seen in Table 2 of [52]. In addition, the harmonics of the injected current from DG is depending on the control strategy of the inverter, as seen in Table 3 of [53]. As shown in Figure 16, the THD of the injected current during fault is <4%.

EXPERIMENTAL VALIDATION
In order to verify the proposed algorithm experimentally, the data of the simulated IEEE 9-bus grid have been implemented in the lab using dSPACE1104, and then these data sent to the DSP for processing and decision-making. In this section, this lab setup will be explained in detail. Several cases have been analysed for radial and ring grids with and without DG, and for different types of faults. For each experimental case, both algorithms have been tested. As an example of the analysed cases and to verify the proposed algorithm practically, the ring grid shown in Figure 17(a) has been simulated using MATLAB Simulink (Figure 17(b)), and voltages and currents of the faulted line have been redeveloped practically using dSPACE1104. To execute the proposed algorithms (CE and ZO), and give the appropriate decision (trip signals), a numerical relay have been implemented using DSP TMS320F28335 and Crydom   Figure 17(c) shows the lab setup of the system and Figure 17(b) shows the conceptual diagram of the proposed algorithms to be implemented practically, respectively. Before sending the dSPACE signals to the DSP, a pre-processing step has to be performed first, to configure the analog output signals from the dSPACE to the level of the DSP analog inputs by using an Operation Amplifier (Op-Amp) circuit, as shown in Figure 17(b). In order to implement CE and ZO algorithms, only the data of the faulted line is sent from the dSPACE to be processed by the DSP, and the data of the other healthy lines have been set internally inside the DSP. Figure 18 shows the delay time between the fault occurrence and the output decision of the CE and ZO algorithms from the DSP in case of three-phase fault and single-phase fault in DL5, as shown in Figure 17(a). Using a graphical user interface (GUI), the signals produced from the dSPACE (Figure 17(c)) are used to generate a fault indication signal to detect the start of the fault (grey colour in Figure 18). When the fault occurs, the level signal goes from 0 to 1 V (grey colour), which means the fault starts. Nevertheless, when the output of the DSP is 3.3 V, which means the trip signal has been activated (black colour), this trip signal is obtained from the decision signals of the CE and ZO algorithms, as seen in Figure 13. For both algorithms, the response of the system is similar, which gives a strong influence on the accuracy and reliability of the proposed protection strategy.

CONCLUSION
This study has proposed different algorithms for fault location in the MV DS ring grid with high DG penetration, to avoid undesirable tripping when inverter-based DGs are connected to a grid. The inverter control integrates the capabilities of the low voltage ride through (LVRT) and the requirements of the Spanish grid code. The study presents a novel use of a communication-based directional relay system with ANN, which is an efficient solution in SG to have a more secure and redundant protection system. Two algorithms have been presented to locate the exact fault location and isolate the system's faulted part with high accuracy. The first algorithm (Centralize control (CE)) is based on collecting data from all the PDs in the grid and send it to a CE. The second algorithm (Zone control (ZO)) is based on using the communication between the peer PDs in the same line to transfer data between each of them. One of the main advantages of the ZO is that the same algorithm can be used for any additional line added to the grid without any modifications to the control of the protection system.
The proposed strategy is based on comparing the two algorithms' decisions to have a more reliable and redundant system. Also, each algorithm is working as a backup for the other. Each PD can make decisions locally according to the signals received at each of them. The algorithms have been tested for symmetrical and unsymmetrical faults, with different fault resistance, different fault locations, and stiff and weak grids. Both algorithms have been validated in simulation and experimentally in the laboratory. The results have shown that the faulted line is located and isolated rapidly and accurately for ring and radial grids. The proposed protection strategy can provide a more secure and dependent protection system against system errors.