Machine Learning–Based Protection and Fault
Identification of 100% Inverter-Based Microgrids
Milad Beikbabaei,1 Graduate Student Member, IEEE, Michael Lindemann,2 Graduate Student Member, IEEE,
Mohammad Heidari Kapourchali,2 Member, IEEE, and Ali Mehrizi-Sani,1 Senior Member, IEEE
1
The Bradley Department of Electrical and Computer Engineering, Virginia Tech, Blacksburg, VA 24061
2
Department of Electrical Engineering, University of Alaska, Anchorage, AK 99508
e-mails:
[email protected],
[email protected],
[email protected],
[email protected]arXiv:2405.07310v1 [eess.SY] 12 May 2024
Abstract—100% inverter-based renewable units are becoming presents a challenge for fault protection when employing
more prevalent, introducing new challenges in the protection of traditional high fault current methods.
microgrids that incorporate these resources. This is particularly Reference [3] studies the challenges faced when converting
due to low fault currents and bidirectional flows. Previous work
has studied the protection of microgrids with high penetration an existing distribution feeder to an inverter-based micro-
of inverter-interfaced distributed generators; however, very few grid and suggests the use of adaptive settings for relays to
have studied the protection of a 100% inverter-based microgrid. tackle the protection challenges. Protection challenges are
This work proposes machine learning (ML)–based protection more prominent in isolated microgrids, which have lower
solutions using local electrical measurements that consider imple- fault levels compared to grid-connected microgrids with infeed
mentation challenges and effectively combine short-circuit fault
detection and type identification. A decision tree method is used power from the main grid [4]. A protection scheme for
to analyze a wide range of fault scenarios. PSCAD/EMTDC isolated microgrids with high penetration of inverter-interfaced
simulation environment is used to create a dataset for training distributed generators should be fast, adaptable, and accurate
and testing the proposed method. The effectiveness of the in order to uphold microgrid stability and safeguard critical
proposed methods is examined under seven distinct fault types, loads. However, the research on microgrid protection has not
each featuring varying fault resistance, in a 100% inverter-based
microgrid consisting of four inverters. yet led to a commercially available microgrid relay [5]. This
Index Terms—Fault identification, inverter-based resources is because many solutions rely on communication methods or
(IBR), microgrid, protection. complex learning-based relay systems [6]. Using communica-
tion makes the power system susceptible to delays and cy-
I. I NTRODUCTION berattacks, reducing the grid’s resiliency [7]. Communication
With the increasing prevalence of renewable energy re- delays can affect the dynamic behaviors of communication-
sources in the form of inverter-based distributed generation based IBR control during faults, which makes protection more
units, traditional protection strategies for microgrids connect- challenging [8]. Many existing microgrid protection schemes
ing multiple such resources may become insufficient. The pro- lack adaptability to diverse topologies and source types, are not
tection of 100% inverter-based microgrids presents significant cost-effective, or rely on communication, and have not been
challenges [1], primarily due to the reduced inertia of inverter- tested under scenarios with extremely high IBR penetration,
based units [2]. A microgrid with low inertia sources could which is likely in the near future [6].
experience stability problems if line faults are not quickly Machine learning (ML)–based protection methods have
cleared. In inverter-interfaced distributed generators, the cur- shown great potential in accurately detecting and identifying
rent contribution is limited during short circuits, resulting in faults. However, they have been mostly employed in trans-
much lower fault currents. Limited fault current, combined mission and distribution systems protection, and very few
with the bidirectional power flow and intermittent generation, studies have explored the applications of ML in detecting and
identifying faults in microgrids with high renewable resource
© 20XX IEEE. Personal use of this material is permitted. Permission from penetration [5]. Authors in [5] propose an intelligent fault
IEEE must be obtained for all other uses, in any current or future media,
including reprinting/republishing this material for advertising or promotional diagnosis method based on deep learning, utilizing wavelet
purposes, creating new collective works, for resale or redistribution to servers transformation and sequence components. Deep learning mod-
or lists, or reuse of any copyrighted component of this work in other works. els developed in Pytorch are employed to train and validate
This work of Virginia Tech is supported in part by the National Science
Foundation (NSF) under award ECCS-1953213, in part by the State of Vir- fault detection, classification, and location identification. Au-
ginia’s Commonwealth Cyber Initiative (www.cyberinitiative.org), in part by thors in [9] present a general-purpose support vector machine
the U.S. Department of Energy’s Office of Energy Efficiency and Renewable (SVM)-based adaptive scheme to identify normal and fault
Energy (EERE) under the Solar Energy Technologies Office Award Number
38637 (UNIFI Consortium led by NREL), and in part by Manitoba Hydro conditions in AC microgrids and detect fault types. Refer-
International. The views expressed herein do not necessarily represent the ence [10] develops an ML-based protection method for AC
views of the U.S. Department of Energy or the United States Government. The microgrids that detects and classifies faults. The proposed ML
work of UAA is supported in part by the U.S. National Science Foundation
(NSF) under awards OIA-2229772, RISE-2220624, RISE-2022705, and RISE- methods use complex deep learning algorithms or require high
2318385. sampling rates.
This paper presents decision tree-based protection solutions Vs,d
Pref Iref,d +
that combine fault detection and fault type classification in a +
-
PI +
-
PI +
-
fully inverter-based microgrid, using local measurements with- It,d
Pt Vt,d
out any communication. The effectiveness of the protection ωL f
It,abc abc Vt,abc
dq
solution is studied on a microgrid equipped with four inverters, dq abc
Qt ωLf
where half operate in grid-following mode, and the remaining It,q
Qref Vt,q
two function in grid-forming mode. The proposed method - Iref,q - +
+ PI + PI +
+
only uses the root mean square (RMS) value of the three-
Vs,q
phase current, three-phase voltage, active and reactive power
with 1 ms intervals, which reduces the computational process
Fig. 1. Decoupled control scheme of a grid-following inverter for d- and
and memory use. The low computational burden facilitates q-axes.
practical implementation on a microcontroller. The salient
features of the proposed method are: Vset Emax
• The proposed method, designed for simplicity, integrates Qinv +
m - PI E (a)
fault detection and identification for efficient implemen- -
Vin E min
tation in digital relays. Pinv
• The decision tree algorithm trains in less than 9 s makes Pset - Δω
+ m + 1/s δ
it applicable for real-world grid applications. +
(b)
• The proposed approach can detect faults in less than 5 ms Pmax + PI
-
for both low- and high-impedance faults. + +
+ ÷ f
Pinv +
II. T EST S YSTEM - ω0 2π
Pmin + PI
A. Basics of Inverter Control
This subsection discusses the basics of inverter control, Fig. 2. Droop control scheme of a grid-forming inverter for: (a) P − f , (b)
where it can be controlled either in the grid-following or the Q−V.
grid-forming mode [2].
1) Grid-Following Mode: The inverter receives real power IBR 1 IBR 2 IBR 3 IBR 4
set points Pref and reactive power set points Qref , and the
~ PCC
inverter adjusts its output power to be as close as possible R 1 Bus 1 Bus 2 Bus 3 Bus 4
to the received power set points. A phase-locked loop (PLL) Line 12 Line 23 Line 34
is used for estimating the voltage phase angle, helping with
converting the current and voltage form abc-frame to dq- Fig. 3. Single-line diagram of the microgrid.
frame and back. Fig.1 shows the grid-following conventional
decoupled current control loop for an inverter connected to the
grid through an RL filter, where the output real power is Pt , the has a DC voltage source where its primary side voltage is
output reactive power is Qt , inverter current is it , and Vt and fixed to 1.2 kV. The maximum output power of each inverter
Vs are the terminal and the grid voltages, respectively [11]. is limited to 1.5 MVA. Each grid-following unit is connected
2) Grid-Forming Mode: The voltage and frequency of the to a transformer through an RL filter, where its resistance is
grid are subject to disturbances and changes; however, the 1.5 mΩ, and its inductance is 20 µH. kP = 2 and kI = 0.0025
voltage and frequency magnitude need to be maintained within are the gains for the grid following PI blocks. Gains for the
nominal ranges. As a result, Q−V and P −f droop controls PI block in P −f droop control of grid-forming inverters are
are used in grid-forming inverters. The Q−V droop control kP = 0.6 and kI = 0.003, and they are kP = 0.6 and
updates the voltage set point of the inverter controller, resulting kI = 0.002 for the Q−V droop control. Line 12 resistance is
in adjusting the reactive power to maintain the voltage as 1.4 Ω, and line 12 inductance equals to 2 Ω. Line 23 resistance
shown in Fig. 2(a). The P −f droop control updates the voltage is 2.2 Ω, and line 23 inductance equals to 3.16 Ω. Line 34
angle of the inverter, resulting in modifying the real power resistance is 0.6 Ω, and line 34 inductance is 3.16 Ω. A load
output to maintain the frequency as shown in Fig. 2(b). The PI is connected to bus 3 through a breaker, where its real power
controllers are used in the grid-forming inverter droop control, can be between 0.1 pu to 0.6 pu, and its reactive power can
as shown in Fig. 2. vary from 0.01 pu to 0.06 pu. The protection relay R1 is at
bus 1.
B. 100% Inverter-Based Microgrid
A 4-bus microgrid is developed in PSCAD/EMTDC as III. M ETHODOLOGY
shown in Fig. 3, where the first and third inverters are grid-
forming, and the rest are grid-following. The microgrid base This work utilizes a decision tree–based method to detect
power is 1.5 MVA, the low-voltage base voltage is 480 V, and and identify faults in the microgrid, as elaborated in the
the medium-voltage base voltage is 12.47 kV. Each inverter following subsections.
A. Algorithm Selection TABLE I
FAULT T YPE N UMBER TABLE
Since the protection algorithm needs to detect a fault within
a few milliseconds it needs to be run every few milliseconds. Fault Number Description Fault Number Description
Due to this requirement, making algorithm less computational 0 No faults 4 ABG faults
expensive is preferable. Previous work has utilized deep learn- 1 AG faults 5 ACG faults
ing methods for protection; however, real-time implementa- 2 BG faults 6 BCG faults
3 CG faults 7 ABCG faults
tion using off-the-shelf microcontrollers is still a challenge.
Furthermore, microgrids are small grids with a few nodes,
and classification algorithms can show effective results for TABLE II
TABLE OF THE ACCURACY OF D IFFERENT I NPUT F EATURES
protection against short circuit faults. The most basic type
of algorithm is the support vector machine (SVM) model. Fault Prediction Fault Type Prediction
Inputs
However, SVM models scale between either quadratically or Accuracy Accuracy
cubically with training data complexity. Due to this scaling I 95.58% 95.50%
penalty and this projects datasets complexity, SVM was not I,V 95.92% 95.82%
a viable option. Therefore, this work uses a decision tree I,P ,Q 96.26% 96.05%
I,V ,P ,Q 96.33% 96.04%
model since decision tree models scale linearly with the data
complexity.
where it can be between 0 and 7. Fault type 0 represents no
B. Decision Tree Basics
faults.
Decision trees work via a tree like structure in which each
node represents a feature or attribute that has been determined D. Training and Hyperparamters Selection
as important. Branches correspond to a decision based on the Table II shows how different selections of the input features
previous feature and lead to the next node. The decision on affect the accuracy of the decision tree. Four combinations of
when to split in the tree is decided using the Gini impurity inputs are selected for the R1 relay, where the first one only
method. During training, the goal is to constantly minimize uses I. The second one uses both V and I. The third one uses
the Gini impurity [12]. The Gini impurity of the dataset is I, P , and Q. The fourth one uses I, V , P , and Q. In order
calculated using the equation: to achieve the highest accuracy the fourth feature set are used
J
in this work, where it shows the best performance for fault
detection compared to other combinations.
X
Gini(D) = 1 − p2i , (1)
i=1
Scikit-learn library is used in this work, where the decision
tree model maximum depth is set to 43 and it has a total of
where D represents the dataset for the node, J is the number 4044 leaves. Training and validation data consisted of 715,959
of classes, and pi is the proportion of samples that belong to 1 ms time samples. Input variables consisted of the three-phase
class i in the dataset D. current, the three-phase voltage, the real power output, and the
C. Dataset Preparation and Feature Selection reactive power output of the bus where the relay is located.
The data is split utilizing train-test-split function in
A dataset is developed by simulating short-circuit faults scikit-learn. 80 percent of the data is used for training, and
using PSCAD/EMTDC. The PSCAD automation Python API the remaining 20 percent is used for validation. A shuffle
is utilized to run multiple cases and create the dataset [7]. For is applied with a random state setting of 20 being utilized
each simulation run, a distinct fault type, fault location, fault for repeatability. No further preprocessing is required before
resistance, and fault duration are considered. The seven fault training the decision tree model. True output variables are split
types selected are AG, BG, CG, ABG, ACG, BCG, and into their respective categories and fed into the model.
ABCG. The chosen fault resistance values are 100 Ω, 10 Ω,
1 Ω, 0.1 Ω, and 0.001 Ω. The faults are located at buses 1–4. IV. S IMULATION RESULTS AND E VALUATION
For the fault duration, 0.05 s, 0.1 s, and 0.2 s are selected. This section presents the simulation results for different
All faults are introduced at t = 0.05 s, and each simulation is types of faults at different buses.
conducted for a duration of 1 second. As a result, a total of 1) Case 1: AG Fault on Bus 1.: Figs. 4 shows fault
420 cases are simulated and used for both training and testing detection and fault type for a phase A to ground fault with
the proposed protection algorithm. a 0.01 Ω resistance located at bus 1, staring at t = 50 ms
In every simulation, the three-phase current I, three-phase and clearing at t = 150 ms. The decision tree detects the
voltage V , real power P , and reactive power Q data are fault occurrence at t = 50 ms and detects fault clearance at
recorded with a 1 ms time intervals. Furthermore, a fault t = 155 ms, with 5 ms delays. The decision tree detects the
detection signal is added to the dataset, where it becomes 1 fault type number 1, AG fault. The decision tree detects the
during the short-circuited faults and is zero when there is no fault type and fault occurrence correctly during the fault period
fault. Additionally, a column is added for the fault type. A except for one sample at t = 0.104 s; however, it quickly
number is assigned to each fault type as shown in Table I, corrects its prediction in the next time step.
1 V. C ONCLUSION
detection
Decision tree
Fault Fault signal (a)
Low fault current and bidirectional current are major chal-
0 lenges in the protection of fully inverter-based microgrids. This
0 0.1 0.2 0.3 0.4
work proposes Decision tree–based protection solutions that
1 Decision tree
incorporate fault detection and identification. These solutions
Fault
type
Fault signal (b)
are designed for efficient implementation in digital relays
0 0.1 0.2 0.3 0.4
due to their simplicity. The effectiveness of the proposed
method is examined for both low and high-impedance faults
Fig. 4. AG fault located at bus 1: (a) fault detection and (b) fault type. across seven distinct fault types characterized by varying fault
resistance. The analyses are conducted in the context of a
1 100% inverter-based microgrid equipped with four inverters.
detection
Decision tree
Fault
Fault signal This work indeed facilitates the utilization of a ML-based
(a)
0 method for the protection of fully inverter-based microgrids.
0 0.1 0.2 0.3 Future work includes investigating the efficacy of the ML-
5 Decision tree based methods for a larger microgrid and assessing their
Fault
type
3 Fault signal (b) accuracy under various network configurations.
1
0 0.1 0.2 0.3 R EFERENCES
[1] J. Sharma and T. S. Sidhu, “A new protection scheme for feeders
Fig. 5. ACG fault located at bus 2: (a) fault detection and (b) fault type. of microgrids with inverter-based resources,” Electric Power System
Research, vol. 224, p. 109632, Nov. 2023.
1 [2] M. Beikbabaei, M. Montano, A. Mehrizi-Sani, and C.-C. Liu, “Mit-
detection
Decision tree igating false data injection attacks on inverter set points in a 100%
Fault
Fault signal (a) inverter-based microgrid,” in IEEE Innovative Smart Grid Technologies
0 Conference (ISGT), Washington DC, Feb. 2024.
0 0.1 0.2 0.3 0.4 [3] T. Patel, S. Brahma, J. Hernandez-Alvidrez, and M. J. Reno, “Adaptive
7
protection scheme for a real-world microgrid with 100% inverter-based
Decision tree resources,” in IEEE Kansas Power and Energy Conference (KPEC),
5
Fault
type
Fault signal (b) Aug. 2020.
3
1 [4] D. Liu, A. Dyśko, Q. Hong, D. Tzelepis, and C. D. Booth, “Transient
0 0.1 0.2 0.3 0.4
wavelet energy-based protection scheme for inverter-dominated micro-
grid,” IEEE Trans. on Smart Grid, vol. 13, no. 4, pp. 2533–2546, Mar.
2022.
Fig. 6. ABCG fault located at bus 3: (a) fault detection and (b) fault type. [5] L. M. Kandasamy and K. Jaganathan, “Intelligent fault diagnosis using
Deep Learning for a microgrid with high penetration of renewable
energy sources,” Electric Power System Research, vol. 51, no. 4, pp.
332–350, Feb. 2023.
2) Case 2: ACG Fault on Bus 2.: Figs. 5 shows fault [6] P. Gadde and S. M. Brahma, “Topology-agnostic, scalable, self-healing,
detection and fault type for phases A and C to ground fault and cost-aware protection of microgrids,” IEEE Transactions on Power
with a 1 Ω resistance located at bus 2, starting at t = 50 ms Delivery, vol. 37, no. 4, pp. 3391–3400, Nov. 2021.
[7] M. Beikbabaei, A. Venkataramanan, and A. Mehrizi-Sani, “EMT-based
and clearing at t = 100 ms. The decision tree detects the fault co-simulation of power system and communication networks,” in IEEE
occurrence at t = 50 ms and fault clearance at t = 100 ms. The International Conference on Communications, Control, and Computing
decision tree detects the fault type correctly. The decision tree Technologies for Smart Grids (SmartGridComm), Nov. 2023.
[8] M. Beikbabaei, A. Mohammadhassani, V. Krishnan, A. Gorski,
indicates that the fault type number is 5, which is equivalent A. Mehrizi-Sani, V. K. Shah, A. P. Da Silva, and J. H. Reed, “Experience
to an ACG fault shown in Fig. 5(b). in real-time simulation of the power system with 5g communication,”
3) Case 3: ABCG Fault on Bus 3.: Figs. 6 shows fault in IEEE Innovative Smart Grid Technologies Conference (ISGT), Feb.
2024, pp. 1–5.
detection and fault type for a three-phase to ground fault with [9] R. Aiswarya, D. S. Nair, T. Rajeev, and V. Vinod, “A novel SVM based
a 40 Ω impedance located at bus 3, starting at t = 50 ms and adaptive scheme for accurate fault identification in microgrid,” Electric
clearing at t = 200 ms. Unlike Case 1 and Case 2, the decision Power System Research, vol. 221, p. 109439, Aug. 2023.
[10] M. Uzair, M. Eskandari, L. Li, and J. Zhu, “Machine learning based
tree has not been trained for a 40 Ω fault value, decreasing protection scheme for low voltage AC microgrids,” Energies, vol. 15,
its accuracy. The decision tree detects the fault occurrence no. 24, p. 9397, Dec. 2022.
at t = 50 ms and fault clearance at t = 210 ms; however, it [11] N. Souri, A. Mehrizi-Sani, and K. Tehrani, “Stability enhancement
of LCL-type grid-following inverters using capacitor voltage active
cannot detect correctly after the fault occurrence in a few time damping,” in IEEE PES General Meeting, Seattle, WA, Jul. 2024.
steps shown in Fig. 6(a). Furthermore, the decision tree has [12] S. Lee, C. Lee, K. G. Mun, and D. Kim, “Decision tree algorithm
difficulty identifying the fault type at the first 40 ms of the considering distances between classes,” IEEE Access, vol. 10, pp.
69 750–69 756, Jun. 2022.
simulation; however, it can detect the fault with certainty after
that. The decision tree detects the fault clearance with a 10 ms
delay. The decision tree indicates that the fault type number
is 7 after 40 ms, which is equivalent to an ABCG fault using
shown in Fig. 6(b). Fig. 6 indicates that the proposed method
still works well for an untrained high-impedance fault.