Indonesian
J
our
nal
of
Electrical
Engineering
and
Computer
Science
V
ol.
36,
No.
1,
October
2024,
pp.
115
126
ISSN:
2502-4752,
DOI:
10.11591/ijeecs.v36.i1.pp115-126
r
115
Enhanced
fault
identification
in
grid-connected
micr
ogrid
with
SVM-based
contr
ol
algorithm
Di
vya
Shoba
Nair
,
Thankappan
Nair
Rajee
v,
Sindhura
Miraj
Department
of
Electrical
Engineering,
Colle
ge
of
Engineering
T
ri
v
andrum,
APJ
Abdul
Kalam
T
echnological
Uni
v
ersity
,
K
erala,
India
Article
Inf
o
Article
history:
Recei
v
ed
Feb
2,
2024
Re
vised
Mar
28,
2024
Accepted
May
12,
2024
K
eyw
ords:
D
WT
F
ault
detection
Machine
learning
Microgrids
Rene
w
able
ener
gy
SVM
ABSTRA
CT
The
penetration
of
rene
w
able
ener
gy
sources,
electric
v
ehicles
(EVs)
and
load
dynamics,
and
netw
ork
comple
xities
often
lead
to
nuisance
tripping
in
grid-
connected
microgrids.
T
raditional
protection
methods
f
ail
to
discriminate
f
ault
and
other
dynamic
v
olatilities
in
the
system.
The
paper
presents
a
no
v
el
tw
o-
le
v
el
adapti
v
e
relay
algorithm
to
a
v
oid
nuisance
tripping
in
a
grid-connected
microgrid
under
v
arying
grid
dynamics.
The
no
v
elty
of
the
adapti
v
e
relay
algorithm
is
that
nuisance
tripping
is
eliminated
by
precisely
determining
normal
system-le
v
el
dynamics
at
the
first
le
v
el
using
a
phase
de
viation
reference
block.
The
first
le
v
el
determines
the
necessity
for
acti
v
ating
the
second
le
v
el,
which
consists
of
a
detection
scheme
combining
a
multiclass
support
v
ector
machine
(SVM)
and
discrete
w
a
v
elet
transform
(D
WT).
The
h
ybrid
D
WT
-
SVM
methodology
ensures
ef
fecti
v
e
f
ault
diagnosis,
adapting
to
v
ariations
in
ener
gy
sources,
load
fluctuations,
and
f
ault
scenarios.
Real-time
hardw
are-
in-the-loop
(HIL)
simulation
v
alidates
the
system’
s
ef
fecti
v
eness
in
dynamic
microgrid
en
vironments.
Extensi
v
e
e
xperiments
on
scenarios,
including
f
aults,
fluctuations
in
rene
w
able
ener
gy
generation,
and
intermittent
simulations
of
EV
char
ging
and
capacitor
switching,
were
conducted
to
test
the
ef
ficac
y
of
the
adapti
v
e
relay
algorithm.
Finally
,
e
xperiments
using
OP
AL-R
T
HIL
real-
time
simulator
and
the
Raspberry
Pi
microcontroller
v
alidated
the
adapti
v
e
relay
algorithm
in
a
grid-connected
microgrid
under
v
arying
grid
dynamics.
This
is
an
open
access
article
under
the
CC
BY
-SA
license
.
Corresponding
A
uthor:
Di
vya
Shoba
Nair
Department
of
Electrical
Engineering,
Colle
ge
of
Engineering
T
ri
v
andrum
APJ
Abdul
Kalam
T
echnological
Uni
v
ersity
Thiruv
ananthapuram,
K
erala,
India
Email:
di
vyaperoor@gmail.com
1.
INTR
ODUCTION
The
era
of
profound
change
for
po
wer
systems
has
be
gun
with
the
e
xtensi
v
e
inte
gration
of
rene
w-
able
ener
gy
sources,
electric
v
ehicle
(EV)
proliferation,
and
dynamic
load
changes.
This
inte
gration
led
to
the
microgrid
concept,
an
interc
o
nnec
ted
system
of
sources
and
loads
with
controllable
attrib
utes.
Micro-
grids
e
xhibit
the
fle
xibility
to
operate
in
both
grid-connected
and
isolated
modes.
Ho
we
v
er
,
when
operating
in
grid-connected
modes,
microgrids
are
vulnerable
to
f
aults
occurring
on
the
grid
side
[1].
In
such
instances,
immediate
disconnection
becomes
imperati
v
e
due
to
the
limited
capacity
of
lo
w-rating
distrib
uted
ener
gy
re-
sources
(DER)
to
withstand
high
f
ault
currents,
particularly
true
for
in
v
erter
-based
DERs
[2],
which
ha
v
e
a
lo
wer
current-carrying
capacity
compared
to
con
v
entional
synchronous-based
units
[3].
Furthermore,
the
f
ault
current
le
v
el
in
an
microgrid
is
highly
reliant
on
the
netw
ork
layout
and
changes
dramatically
across
operation
J
ournal
homepage:
http://ijeecs.iaescor
e
.com
Evaluation Warning : The document was created with Spire.PDF for Python.
116
r
ISSN:
2502-4752
modes
(grid-connected/islanded)
[4],
[5].
Hence,
an
adequate
protection
strate
gy
is
essential
for
microgrids,
considering
the
distincti
v
e
characteristics
of
their
sources,
dynamic
operating
conditions,
and
t
he
need
to
ac-
commodate
rene
w
able
ener
gy
sources
[6],
[7].
EVs
are
g
aining
popularity
as
fossil
fuel
prices
k
eep
rising
and
en
vironmental
concerns
about
greenhouse
g
as
emissions
from
the
transporta
tion
sector
increase.
Ho
we
v
er
,
there
are
more
security
and
protection
issues
due
to
the
e
xtensi
v
e
EV
inte
gration
into
the
grid
[8].
The
traditional
protection
strate
gies
used
in
distrib
ution
systems
become
inef
fecti
v
e
due
to
b
i
direc-
tional
f
ault
currents
in
microgrids.
Furthermore,
the
participation
of
DERs
in
f
ault
currents
interferes
with
protection
de
vice
trip
times
[9],
which
deteriorates
the
coordinat
ion
[10].
Immediately
disconnect
ing
the
DERs
in
case
of
a
problem
is
a
simple
w
ay
to
deal
with
these
issues.
This
strate
gy
guards
ag
ainst
problems
lik
e
sympathetic
tripping
and
blinding
protection
while
maintaining
the
ef
ficac
y
of
le
g
ac
y
protection
programmes
[11].
Ho
we
v
er
,
when
there
is
a
significant
penetration
of
DERs,
disconnection
of
DERs
may
cause
a
decrease
in
grid
v
oltage
duri
ng
f
ault
conditions,
resulting
in
instability
[12].
De
v
eloping
protection
strate
gies
that
con-
sider
t
he
impact
of
DERs
and
v
ariations
in
grid
t
o
pol
ogy
becomes
i
mperati
v
e
to
address
the
dif
ficulties
abo
v
e.
In
order
to
do
this,
a
v
arie
ty
of
machine
learning
and
computational
intelligence
techniques,
including
fuzzy
systems,
multi-agent
systems,
artificial
neural
netw
orks
(ANNs)
[13],
and
metaheuristics,
ha
v
e
been
proposed
as
microgrid
protection
mechanisms
[14].
The
inte
gration
of
rene
w
able
ener
gy
,
coupled
with
v
ariations
in
l
oad
patterns,
poses
significant
chal-
lenges
for
microgrid
protection
[15].
Centralized
protection
schemes
used
in
con
v
entional
po
wer
systems
are
deemed
insuf
ficient
for
dynamic
microgrids
[16].
The
widespread
adoption
of
rene
w
able
ener
gy
alters
protec-
tion
characteristics,
requiring
a
rob
ust
f
ault
prediction
scheme
that
considers
dynamic
v
ariations
in
the
system
[17].
A
real-time
f
ault
detection
and
isolation
protection
s
ystem
is
crucial
to
pre
v
ent
cascading
f
ailures
and
sympathetic
tripping.
Numerous
ongoing
research
ef
forts
are
dedicated
to
de
v
eloping
comprehensi
v
e
protec-
tion
systems
that
address
the
unique
challenges
grid-connected
microgrids
f
ace
[18].
The
critical
component
in
these
protection
systems
is
the
relay
,
b
ut
traditional
relays
with
single-threshold
and
current-dependent
func-
tions
are
unsuitable
for
dynamic
microgrids.
Thus,
there
is
a
pressing
need
to
de
v
elop
ne
w
dynamic
protection
schemes
[19].
V
arious
schemes
ha
v
e
been
proposed
in
the
literature
to
address
microgrid
challenges,
including
data
mining-based
dif
ferential
protection,
time-frequenc
y-based
dif
ferential
schemes,
f
ault
clearing
methods
for
con
v
erter
-dominant
microgrids
[20],
and
machine
learning
approaches
[21].
Recent
studies
ha
v
e
e
xplored
the
application
of
con
v
olutional
neural
net
w
orks
(CNN)
[22],
random
forest,
k-nearest
neighbour
algorithms,
and
ANN
for
f
ault
identification.
Among
these
classifiers,
support
v
ector
machine
(SVM)-based
classifiers
ha
v
e
demonstrated
superior
performance
[23].
V
ijayachandran
and
Sheno
y
[24],
a
relay
coordination
scheme
utilizing
SVM
for
distrib
ution
systems
with
rene
w
able
ener
gy
sources
is
introduced.
Li
et
al.
[25]
discusses
a
learning
approach
that
incorporates
f
ault
detection
and
diagnosis,
considering
v
ariations
in
irradiance.
Aisw
arya
et
al.
[26]
presents
a
unique
adapti
v
e
scheme
based
on
SVM
for
precise
f
ault
identification
in
microgrids.
SVM
yield
se
v
eral
benefits:
reduced
outlier
impact,
f
aster
prediction,
higher
accurac
y
,
shorter
e
x
ecution
time,
and
a
v
oided
o
v
er
-fitting.
The
discrete
w
a
v
elet
transform
(D
WT)
is
utilized
for
feature
e
xtraction
to
impro
v
e
prediction
speed
and
accurac
y
while
reducing
the
amount
of
data
the
machine
learning
model
must
handle
[27].
Numerous
studies
ha
v
e
made
a
substantial
contrib
ution
to
diagnosing
f
aults
in
grid-connected
micro-
grids;
ho
we
v
er
,
considerable
research
g
aps
still
open
up
possibilities
for
further
in
v
estig
ation.
When
it
comes
to
selecting
and
representing
data
for
analysis,
there
remains
a
crucial
g
ap.
The
dependability
and
quality
of
the
data
will
influence
ho
w
well
the
protection
mechanism
functions.
More
res
earch
on
dif
ferent
f
ault
scenarios,
load
patterns,
and
fluctuations
in
rene
w
able
ener
gy
sources
should
be
conducted
methodically
to
impro
v
e
the
fle
xibility
of
the
f
ault
diagnosis
system.
Unco
v
ering
the
comple
x
dynamics
of
DERs
and
dynamic
demand
changes
is
also
necessary
.
In
order
to
close
these
research
g
aps,
it
is
recommended
that
D
WT
be
used
for
feature
e
xtraction
from
the
current
and
v
oltage
signals
in
f
ault
identification
methodologies.
Extracting
signifi-
cant
features
from
the
input
signal-based
approaches
simplifies
the
SVM
classification
process
and
reduces
the
data
training
requirements.
The
approach
precisely
dif
ferentiates
the
f
ault
cases
from
system-le
v
el
dynamics.
The
approach
will
reduce
the
data
handled
by
t
he
machine
learning
model
and
impro
v
e
prediction
speed
and
accurac
y
.
This
paper
proposes
a
tw
o-le
v
el
adapti
v
e
relay
algorithm
to
a
v
oid
nuisance
tripping
in
a
grid-connected
microgrid
under
v
arying
grid
dynamics.
The
relay
uses
multiclass
SVM
in
conjunction
with
D
WT
feature
e
xtraction
for
f
ault-type
detection.
Real-time
e
xperiments
using
the
prototype
relay
significantly
impro
v
ed
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
36,
No.
1,
October
2024:
115–126
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
r
117
microgrid
resilience
and
o
v
erall
performance.
A
grid-
conn
e
cted
microgrid
f
ault
prediction
and
identification
method
based
on
sequential
multiclass
machine
learning
is
de
v
eloped.
The
relay
w
as
trained
using
a
h
ybrid
D
WT
and
SVM-based
approach,
which
pro
vided
quick
and
precise
training
information
for
f
ault
diagnosis.
The
major
contrib
utions
of
this
paper
are
outlined
belo
w:
The
no
v
el
tw
o-le
v
el
adapti
v
e
f
ault
identi
fication
scheme
is
tailored
for
grid-connected
microgrids,
address-
ing
challenges
lik
e
bidirectional
f
ault
currents,
dynamic
load
v
ariations,
and
DER
participation.
The
pro-
posed
approach
combines
the
D
WT
and
multiclass
SVM
to
enhance
f
ault
diagnosis
ef
ficienc
y
.
An
adapti
v
e
relay
system
based
on
D
WT
and
multiclass
SVM
ensures
quick,
accurate,
and
reliable
protec-
tion,
enhancing
microgrid
resilience
under
di
v
erse
operating
conditions.
A
k
e
y
de
v
elopment
is
the
h
ybrid
D
WT
and
SVM
methodology
,
which
impro
v
es
f
ault
diagnosis
speed
and
accurac
y
e
v
en
with
limited
training
data.
Real-time
HIL
simulations
v
alidate
the
proposed
scheme,
utilizing
a
Raspberry
Pi
microcontroller
inter
-
f
aced
with
the
OP
AL-R
T
si
mulator
.
This
e
xperimental
v
alidation
demonstrates
the
practical
implementation
and
real-time
prediction
capabilities,
ensuring
reliability
and
precision
in
dynamic
microgrid
scenarios.
This
paper
is
structured
as
follo
ws:
section
2
discusses
the
de
v
elopment
of
a
f
ault
identification
scheme
with
multiclass
SVM
and
D
WT
.
Section
3
describes
the
analysis
and
outcomes
of
the
simulation.
The
e
xperi-
mental
v
alidation
of
the
approach
utilising
real-time
HIL
simulation
is
co
v
ered
in
section
4.
2.
DEVELOPMENT
OF
A
F
A
UL
T
DETECTION
ALGORITHM
UTILIZING
MUL
TI
CLASS
SVM
AND
D
WT
TECHNIQ
UES
The
microgrid
promotes
rene
w
able
ener
gy
with
DERs
b
ut
f
aces
challenges
from
source
v
ariability
and
load
changes
lik
e
EV
char
ging,
causing
v
oltage
instability
and
po
wer
quality
issues.
Existing
protecti
v
e
relays
struggle,
risking
islanding
and
safety
hazards.
The
proposed
adapti
v
e
relaying
method
incorporates
a
tw
o-tier
adapti
v
e
relay
algorithm
to
pre
v
ent
nuisance
tripping.
The
first
le
v
el
is
a
phase
de
viation
reference
block,
which
uses
a
PLL-based
control
strate
gy
to
continuously
monitor
the
phase
angle
between
the
main
grid
and
the
microgrid.
If
the
main
grid
and
microgrid
lose
synchronization,
the
phase
de
viation
reference
block
sends
a
initiating
signal
to
the
second
le
v
el,
which
is
a
h
ybrid
detection
scheme
that
combines
SVM
and
D
WT
techniques.
This
h
ybrid
detection
scheme
is
responsible
for
detecting
an
y
anomalies
in
the
system.
Therefore,
the
phase
de
viation
reference
block
determines
whether
the
h
ybrid
detection
scheme
needs
to
be
acti
v
ated,
allo
wing
the
system
to
a
v
oid
unnecessary
disconnections
and
unintentional
islanding
while
maintaining
oper
-
ational
speed.
Figure
1
depicts
a
tw
o
le
v
el
h
ybrid
SVM
and
D
WT
method
to
detect
system
issues
ef
ficiently
.
W
ith
minimal
data,
it
identifies
f
aults,
source
dynamics,
and
load
fluctuations
reliably
.
Multiclass
SVM
distin-
guishes
f
aults
using
v
oltage
and
current
measurements
processed
through
D
WT
.D
WT
-based
feature
e
xtraction
captures
fine
signal
details,
enabling
f
ast
and
accurate
SVM
decisions
with
minimal
data.
Signal
under
goes
tw
o-le
v
el
decomposition
via
lo
w-pass
and
high-pass
filters.
SVM
classifier
is
trained
on
four
essential
features
per
scenario.
2.1.
Discr
ete
wa
v
elet
transf
orm
The
process
of
D
WT
in
v
olv
es
di
viding
a
signal
into
w
a
v
elets
that
are
localized
in
both
time
and
fre-
quenc
y
domains.
This
di
vision
is
achie
v
ed
through
a
combination
of
filtering
and
do
wnsampling
techniques.
T
o
establish
a
hierarchical
representation,
the
signal
is
systematically
decomposed
into
high-frequenc
y
detail
coef
ficients
and
lo
w-frequenc
y
approximation
coef
ficients.
Features
that
capture
v
arious
aspects
of
the
signal
are
then
e
xtracted
from
these
coef
ficients
at
dif
ferent
le
v
els.
The
Daubechies
w
a
v
elet,
specifically
the
db4
w
a
v
elet,
is
selected
a
s
the
mother
w
a
v
elet
for
its
adv
antageous
properties
suc
h
as
good
time-frequenc
y
local-
ization,
similarity
to
signals
observ
ed
during
f
ault
conditions,
and
its
ability
to
ef
fecti
v
ely
capture
both
lo
w
and
high-frequenc
y
components
of
the
signal.
In
this
c
o
nt
e
x
t
,
a
tw
o-le
v
el
decomposition
in
D
WT
is
chosen
for
feature
e
xt
raction.
This
decision
is
made
because
the
initial
tw
o
le
v
els
typically
contain
the
most
critical
information,
leading
to
reduced
noise
and
computational
comple
xit
y
.
By
e
xamining
both
the
approximation
and
detail
coef
ficients
obtained
through
D
WT
,
rel
e
v
ant
features
are
e
xtracted
to
f
acilitate
f
ault
detection
within
the
signal.
This
methodology
enables
the
identification
of
k
e
y
characteristics
that
can
indicate
the
presence
of
f
aults
or
anomalies,
thereby
enhancing
the
ef
fecti
v
eness
of
f
ault
detection
and
diagnosis
processes.
The
features
selected
for
the
D
WT
analysis
are
the
mean
of
detailed
v
oltage
coef
ficients,
the
mean
of
approximate
Enhanced
fault
identification
in
grid-connected
micr
o
grid
with
...
(Divya
Shoba
Nair)
Evaluation Warning : The document was created with Spire.PDF for Python.
118
r
ISSN:
2502-4752
v
oltage
coef
ficients,
the
mean
of
detailed
current
coef
ficients,
and
the
L1
norm.
V
appr
ox
=
P
n
i
=1
V
appr
ox
i
n
(1)
V
det
=
P
n
i
=1
V
det
i
n
(2)
I
det
=
n
X
i
=1
I
det
i
(3)
k
V
k
det
1
=
n
X
i
=1
V
det
i
(4)
F
or
e
v
ery
microgrid
e
v
ent
in
this
w
ork,
four
features
are
g
athered
from
thirteen
b
uses,
for
a
total
of
fifty-tw
o
D
WT
features.
The
total
number
of
data
points
collected
is
calculated
as
52
(selected
D
WT
features)
multiplied
by
the
sum
of
556
data
points
from
245
f
ault
cases
and
311
normal
cases,
resulting
in
a
total
of
28,912
data
points.
The
g
athered
data
under
go
preprocessing
and
are
classified
with
suitable
labels
to
train
the
supervised
learning
model.
F
or
this
training,
80%
of
the
data
is
utilized,
while
the
remaining
20%
is
allocated
for
e
v
aluating
the
model’
s
ef
fecti
v
eness.
Figure
1.
F
ault
identification
scheme
with
D
WT
and
SVM
2.2.
Multiclass
SVM
classifier
SVM
present
a
practical
option
for
f
ault
diagnosis
in
comple
x
data
en
vironments
where
t
raditional
machine
learning
and
deep
learning
methods
may
f
all
short.
Their
sound
theoretical
base
mak
es
it
possible
to
manage
high-dimensional
data
ef
fecti
v
ely
,
which
is
a
common
feature
of
f
ault
identification
tasks
in
v
olving
man
y
measurements
and
indicators.
SVM’
s
resilience
to
o
v
erfitting
is
one
of
its
main
adv
antages
in
f
ault
de-
tection,
helping
to
a
v
oid
costly
errors.
This
resilience
results
from
its
statistical
learning
principles,
which
are
particularly
helpful
when
the
number
of
dimensions
e
xceeds
the
num
ber
of
samples.
The
k
ernel
trick
enables
SVM
to
na
vig
ate
and
classify
a
wide
range
of
comple
x
and
v
ariable
data
structures
by
con
v
erting
them
into
spaces
where
the
y
become
separabl
e.
SVM
pro
vides
transparenc
y
in
its
decision-making
process,
dif
ferenti-
ating
it
f
rom
the
frequently
opaque
deep
learning
models.
The
process
is
a
crucial
aspect
of
a
f
ault
diagnosis,
where
it
is
crucial
to
comprehend
the
reasoning
behind
predictions.
SVM
may
also
of
fer
computational
ef
fi-
cienc
y
for
smaller
to
medium-sized
datasets,
of
fering
a
f
aster
solution
without
compromising
performance
in
comparison
to
its
deep
learning
peers.
Furthermore,
SVM’
s
skill
in
managing
imbalanced
datasets,
which
are
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
36,
No.
1,
October
2024:
115–126
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
r
119
pre
v
alent
in
f
ault
identification,
ensures
its
sensiti
vity
to
minority
classes,
such
as
f
aults,
due
to
its
thoughtful
k
ernel
and
param
eter
selection.
As
a
result,
SVM
are
a
standout
option
for
problem
diagnosis,
supported
by
their
capacity
to
handle
com
p
l
icated
and
high-dimensional
data
as
well
as
their
open
and
theoretically
sound
decision-making
process.
The
multiclass
SVM
classifier
is
practical
for
tasks
with
multiple
classes.
Originally
for
binary
clas
-
sification,
SVM
has
been
adapted
for
multiclass
tasks.
SVMs
ef
ficiently
cate
gorize
occurrences
into
multiple
classes,
utilizing
support
v
ectors
near
the
decision
boundary
.
F
or
multiclass
SVMs,
there
are
tw
o
approaches:
one-vs-one
(OvO)
and
one-vs-rest
(OvR).
F
or
each
pair
of
classes,
OvO
trains
a
binary
classifier
,
producing
K
:
(
K
1)
=
2
classifiers
for
K
classes.
OvR
produces
K
classifiers
by
training
a
binary
classifier
for
each
class
ag
ainst
a
ll
others.
Comput
ationally
,
OvR
usually
performs
better
,
especially
when
dealing
with
se
v
eral
classes.The
radial
basis
function
(RBF)
k
ernel
adopted
demonstrates
e
xceptional
performance
when
dealing
with
o
v
erlapping
data.
Specifically
,
the
most
influential
f
actors
in
classifying
ne
w
observ
ations
are
the
closest
data
points,
while
those
situated
at
a
greater
distance
ha
v
e
minimal
impact
on
the
classification
process.
W
ith
a
set
of
training
samples
(
x
1
;
y
1
)
;
(
x
2
;
y
2
)
:
:
:
::
(
x
m
;
y
m
)
,
where
y
i
represents
the
associated
class
label
and
x
i
represents
the
feature
set
of
the
i
th
sample,
the
decision-making
function
f
(
x
)
for
a
binary
SVM
with
labels
+1
and
-1
is
as
follo
ws:
f
(
x
)
=
sig
n
n
X
i
=1
w
i
:x
i
+
b
!
(5)
in
this
case,
the
maximum
number
of
features
is
n
,
the
bias
term
is
b
,
the
input
features
are
x
i
,
and
the
weight
parameters
are
w
i
.
The
decision
function
for
class
k
in
a
multiclass
SVM
is
represented
by
f
k
(
X
)
,
where
K
is
the
total
number
of
classes.An
SVM
that
is
binary
and
trained
t
o
dif
ferentiate
class
k
from
the
others
is
represented
by
each
f
k
(
X
)
.
The
predicted
class
y
for
a
data
point
x
is
the
one
with
the
maximum
decision
function
v
alue:
^
y
=
ar
g
max
k
n
X
i
=1
w
k
i
:x
i
+
b
k
!
(6)
Figure
2
sho
ws
the
multiclass
SVM
training
and
prediction
flo
wchart
using
a
O
VR
strate
gy
.
F
ault
states
are
classified,
whi
le
normal
conditions
and
dynamic
fluctuati
ons
are
grouped
together
.
This
aids
in
distinguishing
when
relay
operation
is
required.
It
also
enables
f
ault
detection
and
identification.
Figure
2.
Multiclass
SVM
training
and
prediction
Enhanced
fault
identification
in
grid-connected
micr
o
grid
with
...
(Divya
Shoba
Nair)
Evaluation Warning : The document was created with Spire.PDF for Python.
120
r
ISSN:
2502-4752
3.
IMPLEMENT
A
TION
OF
F
A
UL
T
DIA
GNOSIS
METHODOLOGY
USING
MUL
TICLASS
SVM
AND
D
WT
3.1.
Modelling
of
system
under
study
A
radial
microgrid
with
13
b
uses,
operating
at
13.8
kV
and
50
Hz,
is
simulated
using
the
MA
T
-
LAB/Simulink
platform.
Three
distrib
uted
generation
(DG)
sources
are
part
of
the
microgrid
configuration:
tw
o
diesel
generators
and
photo
v
oltaic
(PV)
units
at
b
uses
1,
2,
and
10.
Furthermore,
b
uses
1,
2,
7,
and
8
ha
v
e
a
dynamic
EV
char
ging
load.
T
able
1
contains
the
microgrid’
s
comprehensi
v
e
specifications.
T
able
1.
Microgrid
parameters
Component
P
arameter
Three
phase
grid
supply
V
oltage
=
13.8
kV
(transformer
69/13.8
kV
)
Photo
v
oltaic
system
70
kW
each
at
b
us
1,2
and
10
Generator
(diesel)
500
MV
A
,440
V
,
at
b
us
8,13
EV
station
22
kW
each
at
Bus
1,2,7,8
Load
20
kW
load
at
1,
2,
7,
8,
9,
11,
12,
13
10
kW
load
at
b
us
7
and
10
3.2.
Design
of
pr
ediction
scheme
An
adapti
v
e
protection
scheme
is
de
v
eloped
for
f
ault
identification
in
a
grid-connected
microgrid,
particularly
when
inte
grating
dynamic
sources
lik
e
PV
and
loads
lik
e
EV
.
As
the
system
beha
vior
becomes
dy-
namic,
a
reliable
f
ault
detection
technique
is
crucial
to
minimize
ener
gy
loss
and
monitoring
costs
in
a
gro
wing
microgrid.
This
section
introduces
a
f
ault
detection
system
based
on
D
WT
and
multiclass
SVM
.
The
flo
wchart
depicting
of
fline
training
and
online
prediction
processes
is
sho
wn
in
Figure
3.
Figure
3.
Multiclass
SVM
and
D
WT
scheme
A
Simulink
model
of
a
13-b
us
system
is
constructed
for
this
objecti
v
e.
Sensing
de
vices
g
ather
the
v
oltage
and
current
signals,
which
are
then
supplied
to
the
phase
de
viation
reference
block-basically
a
PLL.
The
D
WT
and
SVM
module
will
recei
v
e
an
i
nitiating
signal
when
the
reference
v
alue
abo
v
e
a
predetermined
limit.
In
this
scenario,
a
pretrained
SVM
classifier
recei
v
es
the
data.
V
oltage
and
current
readings
from
e
v
ery
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
36,
No.
1,
October
2024:
115–126
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
r
121
b
us
under
a
v
ariety
of
conditions,
such
as
f
aults,
load
v
ariations,
and
re
gular
grid
operations,
are
included
in
the
training
dataset.
These
measurements
are
used
to
e
xtract
features
using
the
D
WT
,
whi
ch
is
the
n
input
into
SVM
models.
In
the
course
of
testing,
b
us
dat
a
is
sent
in
real-time
communication
to
the
transformation
block,
which
uses
it
to
e
xtract
features
for
the
SVM
models
that
are
e
x
ecuted
in
microcontrollers.
These
models
forecast
microgrid
problems
and
sho
w
them
to
operators
through
a
graphical
user
interf
ace
(GUI).
This
or
g
anized
process
ensures
systematic
defect
detection
in
dynamic
micr
og
r
id
settings,
aiding
quick
and
ef
fecti
v
e
decision-making.
3.2.1.
Data
collection
and
classifier
modelling
The
IEEE
13-b
us
system
is
modified
and
modeled
in
MA
TLAB
to
simulate
the
microgrid
under
study
.
The
D
WT
is
used
to
e
xtract
features
from
the
three-phase
v
oltages
and
currents
from
each
of
the
thirteen
b
uses.
W
ith
Google
Colab’
s
assistance,
SVM
models
are
b
uilt
and
trained
using
Python’
s
sci-kit
learn
module.
The
sv
c
function
is
utilized
for
training.
Each
microgrid
e
v
ent
g
athers
four
features
from
each
of
the
13
b
uses,
resulting
in
a
total
of
52
D
WT
features.
This
comprehensi
v
e
dataset
comprises
28,912
data
points
co
v
ering
v
arious
f
ault
and
normal
scenarios,
enabl
ing
a
thorough
e
xamination
of
microgrid
beha
vior
.
T
able
2
displays
the
obtained
D
WT
characteristics
for
the
b
us
at
the
point
of
common
coupling,
along
with
the
decision
made
by
the
SVM
classifier
,
feature
v
alues,
and
corresponding
label
for
each
scenario.
T
able
2.
Extracted
D
WT
-based
features
Sl
no
Ev
ent
Feature
1
Feature
2
Feature
3
Feature
4
Label
Decision
1
LG
f
ault
at
0.2
sec
19,854
6.4732
-0.0086
647.32
LG
f
ault
-1
2
LLG
f
ault
at
0.2
sec
11,928
19.28
-0.0183
1,928
LLG
f
ault
-1
3
LLLG
f
ault
at
0.2
sec
150.18
56.904
-0.1286
5,690.4
LLLG
f
ault
-1
4
Normal
20,701
13.587
0.0014
1,358.7
Normal
1
5
EV1
and
EV2
char
ging
at
0.2
sec
20,556
13.575
-0.0115
1,357.5
Normal
1
6
T
ransformer
ener
gisation
at
0.2
sec
20,695
13.593
0.0017
1,359.3
Normal
1
7
Capacitor
switching
at
0.2
sec
20,855
-29.325
0.2759
-2932.5
Normal
1
8
Irradiation
v
ariation
in
PV
unit
1
(
1,000
W/m
2
to
100
W/m
2
)
20,700
13.588
0.0014
1358.8
Normal
1
9
Load
v
ariation
of
10%
at
0.2
sec
20,688
13.573
-0.0008
1,357.3
Normal
1
10
Load
v
ariation
of
20%
at
0.2
sec
20,629
13.327
0.0066
1,332.7
Normal
1
4.
RESUL
TS
AND
DISCUSSION
4.1.
Simulation
r
esults
The
microgrid
model
is
tested
under
v
arious
scenarios,
including
f
aults,
fluctuations
in
rene
w
able
ener
gy
generation,
and
intermittent
simulations
of
EV
char
ging
and
capacitor
switching.
These
simulations
aim
to
enhance
the
machine
learning
model’
s
understanding
of
microgrid
dynami
cs.
F
ault
scenari
os
such
as
three-phase
to
ground
(LLLG),
double
line
to
ground
(ABG,
BCG,
A
CG),
and
single
line
to
ground
f
aults
in
three-phase
lines
(A
G,
BG,
CG)
are
incorporated
into
both
islanded
and
grid-connected
modes.
Belo
w
are
e
xamples
of
simulated
test
scenarios
used
for
data
collection.
F
ault
in
line:
single
line
to
ground
(LG),
double
line,
and
triple
line
f
aults
are
simulated
on
Line
1
in
both
grid-connected
and
islanded
modes
of
the
microgrid.
F
aults
start
at
0.4
seconds
and
end
by
0.8
seconds,
causing
a
tenfold
increase
in
f
ault
c
urrent.
V
oltage
and
current
w
a
v
eforms
during
the
LLLG
f
ault
are
depicted
in
Figure
4,
reflecting
changes
in
output,
which
will
serv
e
as
features
for
SVM
analysis.
PV
irradiation
v
ariations
and
PV
outages:
PV
units
are
disconnected
sequentially
at
0.2
seconds,
with
v
oltage
and
current
measurements
recorded.
Irradiati
on
decreases
abruptly
from
1,000W/m
2
to
100W/m
2
for
0.2
seconds
during
each
disconnection.
Significant
po
wer
and
current
v
ariations
are
observ
ed
at
b
us
1.
Figure
5
sho
ws
v
oltage
and
current
w
a
v
eforms
during
PV
irradiation
fluctuation,
reflecting
changes
in
output.
These
v
ariations
serv
e
as
features
for
SVM
analysis.
Dynamic
v
ariations
in
system:
dynamic
simulations
induce
v
ariations
such
as
load
fluctuations,
f
ast
EV
char
ging,
and
transformer/capacitor
switching.
Data
is
collected,
wi
th
loads
arbitrarily
altered
by
+/-
10%
to
simulate
fluctuations.
F
ast-char
ging
EVs
are
acti
v
ated
at
b
uses
1,
2,
7,
and
8
for
0.2
seconds,
noting
re-
sulting
changes.
Adding
EV
load
causes
v
oltage
drop
and
increased
current.
T
ransformer
ener
gization
and
capacitor
switching
simulations
illustrate
system
dynamics
further
.
Switching
e
v
ents
occur
at
0.2
seconds,
Enhanced
fault
identification
in
grid-connected
micr
o
grid
with
...
(Divya
Shoba
Nair)
Evaluation Warning : The document was created with Spire.PDF for Python.
122
r
ISSN:
2502-4752
observing
v
oltage
and
current
fluctuations.
Relay
operation
is
unnecessary
as
it
produces
transient
changes
considered
a
natural
part
of
operation.
Figure
4.
V
oltage,
current
and
po
wer
output
at
b
us
1
during
LLLG
f
ault
Figure
5.
V
oltage
and
current
output
at
b
us
1
during
irradiation
v
ariation
at
PV1
Simulations
conducted
for
v
arious
e
v
ents
present
prediction
outcomes
in
T
able
3.
The
multiclass
SVM
D
WT
model’
s
performance
summ
ary
and
e
v
aluation
metrics
is
illustrated
in
Figure
6.
W
ithin
the
confusion
matrices
illustrated
in
Figure
6(a),
the
diagonal
entries
represent
the
count
of
accurately
predicted
observ
ations,
kno
wn
as
true
positi
v
es
(TP),
while
the
of
f-diagonal
entries
indicate
incorrect
predictions,
referred
to
as
f
alse
positi
v
es
(FP).
The
comparison
report
sho
wing
the
accurac
y
,
precision
and
performance
matrix
components
are
sho
wn
in
Figure
6(b).
The
computation
time
tak
en
by
classifier
for
both
testing
and
training
is
illustrated
in
Figure
6(c).
The
proposed
multiclass
SVM
with
D
WT
approach
outperforms
pre
v
i
ous
SVM
models
based
on
RMS
v
oltage
and
current
v
alues
[26],
of
fering
higher
accurac
y
as
sho
wn
in
T
able
4,
which
denotes
e
xcellent
predic-
tion
alignment.
Moreo
v
er
,
a
comparison
betwe
en
the
SVM
classifier
and
the
Decision
T
ree
(DT)
classifier
across
v
arious
e
v
ents
as
sho
wn
in
T
able
5
demonstrates
SVM’
s
superior
performance
in
predicting
microgrid
parameter
v
ariations.
T
able
3.
Predictions
by
the
de
v
eloped
SVM
based
scheme
Ev
ent
simulated
Specification
Label
Predicted
e
v
ent
No
of
cases
simulated
Prediction
accurac
y
LG
f
ault
F
ault
at
line
1
and
5
LG
f
ault
LG
85
100%
LLG
f
ault
LLG
f
ault
LLG
75
99.50%
LLLG
f
aults
LLLG
F
ault
LLLG
85
99.10%
Normal
operating
condition
Normal
Normal
101
99.50%
PV
irradiation
V
ariation
and
outages
At
b
us
1,
2
and
10
Normal
Normal
35
99.30%
Load
v
ariations
10%
and
20%
at
b
us
1,
2,
7,
9
Normal
Normal
70
100%
EV
load
additions
At
b
us
1,
2,
7,
8
Normal
Normal
60
99.40%
T
ransformer
ener
gisation
At
b
us
3
Normal
Normal
25
100%
Capacitor
switching
At
b
us
3
Normal
Normal
20
100%
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
36,
No.
1,
October
2024:
115–126
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
r
123
(a)
(b)
(c)
Figure
6.
Ev
aluation
metrics
and
performance
o
v
ervie
w
of
the
multi-class
SVM
D
WT
model:
(a)
confusion
matrix
displaying
classification
accurac
y
and
errors;
(b)
comparison
report
with
precision,
recall,
and
F1-score
metrics
for
each
class;
and
(c)
compilation
time
sho
wing
the
model’
s
training
ef
ficienc
y
T
able
4.
Comparison
with
prior
w
ork
Ev
ent
No
of
cases
tak
en
SVM
with
Vrms
and
Irms
SVM
and
D
WT
LG
f
ault
85
98.70%
100%
LLG
f
ault
75
98.20%
99.50%
LLLG
f
ault
85
98.20%
99.30%
Normal
311
98.50%
99.10%
T
able
5.
Comparisons
SVM
vs
DT
ML
model
Accurac
y
SVM
99.1
DT
97
5.
EXPERIMENT
V
ALID
A
TION
OF
D
WT
B
ASED
SCHEME
USING
REAL-TIME
HARD
W
ARE
IN
LOOP
SIMULA
TION
The
microcontroller
and
OP
AL-R
T
w
ork
together
to
simulate
in
real
time.
The
simulated
13
b
us
microgrid
model
comprises
tw
o
main
subsystems:
SM
Master
and
SC
Console.
All
computational
components
are
inte
grated
into
the
SM
Master
,
which
is
inserted
into
the
OP
AL-R
T
simulator
OP
4510.
Con
v
ersely
,
the
SC
Console
operates
within
the
host
system,
f
acilitating
user
interaction
and
inte
grating
Simulink
blocks
for
data
collection
and
display
.
Enhanced
fault
identification
in
grid-connected
micr
o
grid
with
...
(Divya
Shoba
Nair)
Evaluation Warning : The document was created with Spire.PDF for Python.
124
r
ISSN:
2502-4752
F
or
real-time
operation,
the
micro
grid
model
in
the
SM
Master
subsystem
is
con
v
ert
ed
to
C
and
put
into
the
OP
4510
OP
AL-R
T
real-time
simulator
.
The
Raspberry
Pi
model
4
b,
kno
wn
for
its
lar
ge
RAM
and
f
ast
onboard
processor
,
is
the
optimal
choice
for
machine
learning
applications,
pro
viding
ef
ficient
tools
for
running
machine
learning
programs.
T
rained
machine
learning
models,
sa
v
ed
as
Python
Pickle
files
(.pkl)
from
Google
Colab,
are
included
in
the
Python
pre
diction
code
for
seamless
inte
gration.
This
method
enables
the
easy
deplo
yment
of
trained
models
in
the
Python
en
vironment
for
accurate
and
ef
ficient
predictions,
ultimately
installed
onto
the
Raspberry
Pi
for
real-time
use.
In
real-time
simulation
outputs
are
for
f
ault
cases
are
depicted
in
Figure
7,
the
v
oltage
and
current
w
a
v
eforms
under
single
line
to
ground
f
ault
is
sho
wn
in
Figure
7(a)
and
double
line
to
ground
f
ault
case
is
sho
wn
in
Figure
7(b).
The
f
aults
are
created
while
system
is
running
in
real
time
mode
with
OP
AL
R
T
unit
and
corresponding
v
ariati
ons
are
observ
ed
in
the
w
a
v
eforms.
The
occurence
of
LLG
f
ault
in
line
1
is
predicted
by
the
in
around
11.79
ms
and
LG
f
ault
in
line
1
is
predicted
in
around
7.26
ms.
The
corresponding
e
xperimental
set
up,
GUI
display
,
13
b
us
v
oltage
and
current
measurements
are
displayed
in
the
host
PC.
(a)
(b)
Figure
7.
Real
time
v
oltage
and
current
output
at
b
us
1
from
PCC
for
(a)
LG
f
ault
and
(b)
LLG
f
ault
The
real-time
simulator
transmits
thirteen
b
us
measurements
as
a
1D
array
to
the
Raspberry
Pi
using
the
UDP/IP
protocol.
Tkinter
Python
library
constructs
a
user
-friendly
GUI
on
the
Raspberry
Pi,
displaying
SVM
model
predictions
c
learly
.
The
microgrid
model
is
loaded
into
the
OP
AL-R
T
OP4510
simulator
for
HIL
simulation.
The
Raspberry
Pi’
s
GUI
and
control
are
displayed
on
the
PC
for
the
R
T
Lab
.
The
Raspberry
Pi
controller
e
x
ecutes
the
trained
SVM
models
as
part
of
the
system
implementation.
OP
AL-R
T
and
the
Raspberry
Pi
microcontroller
communicate
via
ethernet
and
UDP/IP
.
Figure
8
sho
ws
the
HIL
simulation
configuration
for
real-time
prediction.
Figure
8(a)
illustrates
the
HIL
e
xperimen-
tal
setup,
whereas
Figure
8(b)
sho
ws
the
output
at
the
GUI
interf
ace.
OP
AL-R
T’
s
analog
output
range
is
-16
V
to
+16
V
,
so
the
DSO
displays
scaled
v
oltage
and
current
outputs.
Real-time
output
serv
es
as
test
data,
with
classifier
output
displayed
on
the
Raspberry
Pi
GUI.
(a)
(b)
Figure
8.
Hardw
are
in
loop
simulation
of
system
(a)
e
xperimental
setup
and
(b)
prediction
output
at
user
interf
ace
of
Raspberry
Pi
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
36,
No.
1,
October
2024:
115–126
Evaluation Warning : The document was created with Spire.PDF for Python.