Indonesian
J
our
nal
of
Electrical
Engineering
and
Computer
Science
V
ol.
25,
No.
2,
February
2022,
pp.
1047
∼
1058
ISSN:
2502-4752,
DOI:
10.11591/ijeecs.v25.i2.pp1047-1058
❒
1047
A
pr
edicti
v
e
maintenance
system
f
or
wir
eless
sensor
netw
orks:
a
machine
lear
ning
appr
oach
Mohammed
Almazaideh,
J
anos
Le
v
endo
vszk
y
Department
of
Netw
ork
ed
Systems
and
Services,
F
aculty
of
Electrical
Engineering
and
Informatics,
Budapest
Uni
v
ersity
of
T
echnology
and
Economics,
Budapest,
Hung
ary
Article
Inf
o
Article
history:
Recei
v
ed
Jul
21,
2021
Re
vised
No
v
24,
2021
Accepted
Dec
1,
2021
K
eyw
ords:
FFNN
Machine
learning
PdMs
Predicti
v
e
maintenance
systems
QoS
of
WSN
ABSTRA
CT
Predicti
v
e
maintenance
system
(PdM)
is
a
ne
w
concept
that
helps
system
operators
e
v
aluate
the
current
status
of
their
systems,
and
it
also
ass
ists
in
predicting
the
future
quality
of
these
systems
and
scheduling
maintenance
action.
This
paper
proposes
a
PdM
model
that
utilizes
machine
learning
to
predict
the
system’
s
operat
ional
status
after
M
acti
v
e
steps
based
on
L
pre
vious
obs
erv
ations
implemented
by
a
feedforw
ard
neural
netw
ork
(FFNN).
W
e
use
quantization
and
encoding
schemes
to
reduce
the
comple
xity
of
the
system.
W
e
apply
the
proposed
model
to
b
uild
a
PdM
system
for
wireless
sensors
netw
orks
(WSNs),
where
our
concern
is
to
predict
the
state
of
the
system
as
f
ar
as
the
quality
of
data
transfer
is
concerned.
The
FFNN
pro
vides
a
forw
ard
prediction
of
the
operational
status
of
the
netw
ork
after
M
consecuti
v
e
time
steps
in
the
future,
based
on
the
pre
vious
L
readings
of
quality
of
service
(QoS)
requirements
of
WSN.
W
e
also
demonstrate
the
relation
between
comple
xity
and
accurac
y
.
W
e
found
that
lar
ger
M
leads
to
higher
comple
xity
and
lar
ger
prediction
error
,
where
lar
ger
L
entails
higher
comple
xity
and
smaller
prediction
error
.
W
e
also
in
v
estig
ate
ho
w
quantization
and
encoding
can
reduce
comple
xity
to
implement
a
real-time
PdM
system.
This
is
an
open
access
article
under
the
CC
BY
-SA
license
.
Corresponding
A
uthor:
Mohammed
Almazaideh
Department
of
Netw
ork
ed
Systems
and
Services,
F
aculty
of
Electrical
Engineering
and
Informatics
Budapest
Uni
v
ersity
of
T
echnology
and
Economics
Budapest,
M
˝
ue
gyetem
rkp.
3,
1111
Hung
ary
Email:
Almazaida@hit.bme.hu
1.
INTR
ODUCTION
Predicti
v
e
maintenance
(PdM)
is
concerned
with
collecting
data
and
estimating
the
operationally
of
the
system
under
observ
ation.
PdM
enables
the
users
to
e
v
aluate
the
operating
conditions
and
diagnose
f
aults
of
the
system.
It
also
helps
estimate
the
time
of
the
ne
xt
f
ailure
and
approximate
the
remaining
life-time
of
the
system.
PdM
maximizes
the
system
life
c
ycle
and
minimizes
unplanned
do
wntime,
so
it
also
has
a
signicant
positi
v
e
impact
on
the
system’
s
reliability
under
monitoring
and
production
quality
.
Furthermore,
PdM
signicantly
reduces
the
cost
of
maintenance
[1].
W
ireless
sensors
netw
orks
(WSNs)
and
internet
of
things
(IoT)
[2]
technologies
are
crucial
tools
used
in
the
de
v
elopment
and
enhancement
of
PdM.
The
y
enable
lar
ge-scale
data
acqui
sition
from
sensors
distrib
uted
on
machines,
f
actories,
and
sites
under
observ
ation.
Ef
fecti
v
e
PdM
requires
the
a
v
ailability
of
an
acti
v
e
sensing
scheme
to
collect
the
measurements
to
describe
the
w
orking
conditions
of
the
maintained
systems.
The
types
of
sensors
and
their
numbers,
distrib
ution,
and
reliability
play
a
k
e
y
role
in
PdM’
s
producti
vity
and
quality
.
The
J
ournal
homepage:
http://ijeecs.iaescor
e
.com
Evaluation Warning : The document was created with Spire.PDF for Python.
1048
❒
ISSN:
2502-4752
sensing
and
monitoring
process
should
be
continuous,
periodic,
and
remote
to
guarantee
the
amount
and
the
accurac
y
of
the
data
needed
for
precise
prediction
and
decision
[3].
Man
y
researchers
and
designers
of
the
PdM
system
use
the
WSNs
and
IoT
as
the
backbone
of
their
approaches.
WSNs
pro
vide
their
solutions
with
an
automatic
monitoring
system
that
does
not
require
manual
measurements
in
dangerous
and
harsh
industrial
en
vironments.
Moreo
v
er
,
wireless
communications
used
with
WSNs
mak
e
it
easy
to
deplo
y
and
congure
PdM
systems.
Still,
it
may
suf
fer
from
some
dra
wbacks:
limited
ener
gy
resources,
security
,
bandwidth,
and
limited
processing
capacity
[4].
Besides
WSNs
and
IoT
,
machine
learning
(ML)
and
deep
learning
(DL)
[5]
also
are
essential
tools
utilized
in
the
impro
v
ement
and
imperfection
of
PdM.
Neural
netw
orks
are
the
foundation
of
ML/DL;
the
y
accept
inputs
in
a
tw
o
or
one-dimensional
form;
and
the
output
is
either
a
cate
gorical
response
in
the
clas-
sication
model
or
a
continuous
response
in
the
case
of
the
re
gression
model.
Recently
,
man
y
ML
and
DL
approaches
ha
v
e
emer
ged,
such
methods
can
deal
with
huge,
multi-dimensional,
and
multi-v
ariate
data,
and
the
y
can
realize
the
relationships
within.
Ho
we
v
er
,
it
is
essential
to
use
the
appropriate
approach
and
de
v
elop
ef
cient
prediction
and
classication
methods
to
earn
high
performance
and
attain
PdM’
s
objecti
v
es
[6].
This
paper
proposes
a
PdM
approach
consists
of
a
prediction
model
and
ML
algorithm.
The
prediction
model
es
timates
the
forw
ard
probability
distrib
ution
of
the
operational
status
of
the
monitored
system,
the
information
about
the
monitored
system
is
summarized
in
a
multi-v
ariant
time
series.
The
model
estimates
the
probability
that
the
system
is
still
fully
operational
in
the
ne
xt
M
steps;
it
checks
that
the
operability
in
the
ne
xt
M
steps
is
guaranteed
with
gi
v
en
reliability
determined
by
predened
parameter
ϵ
.
The
proposed
model
is
implemented
by
an
ML
algorithm
based
on
feedforw
ard
neural
netw
ork
(FFNN).
This
study
uses
the
proposed
approach
as
a
PdM
for
WSNs.
The
input
of
PdM
is
the
pre
vious
L
observ
ations
of
the
QoS
parameters;
the
QoS
parameters
of
the
WSN
include
pack
et
loss
(reliability),
delay
,
throughput,
and
ener
gy
consumpti
on;
the
y
are
represented
as
a
multi-v
ariant
times
series.
The
output
is
a
v
ector
that
represents
the
status
of
WSN
after
M
steps
from
the
present
time
instance.
W
e
also
implement
quantization
and
special
encoding
schemes
to
reduce
the
comple
xity
and
memory
usage
of
the
model
to
mak
e
it
compatible
with
the
limited
resources
of
WSNs.
The
remainder
of
the
paper
is
or
g
anized
as
follo
ws:
(i)
In
section
2,
we
pro
v
i
de
a
literature
o
v
ervie
w
of
the
related
w
ork;
(ii)
In
section
3,
we
present
a
formal
presentation
of
the
problem
and
the
model;
(iii)
In
section
4,
we
customize
the
model
as
PdM
system
for
WSNs;
(i
v)
In
section
5,
we
describe
the
set
up
of
the
training
data
set;
(v)
In
section
6,
we
gi
v
e
the
numerical
results
of
a
detailed
performance
of
the
algorithm
under
dif
ferent
scenarios;
and
(vi)
In
secti
o
n
7,
we
state
some
conclusions
and
gi
v
e
some
commentary
on
the
future.
2.
RELA
TED
W
ORK
Some
researchers
credit
the
in
v
ention
of
PdM
to
the
Rio
Grande
Rail
w
ay
Compan
y
in
the
’40s
of
the
20
th
century
[7].
The
resear
ch
are
v
aluable
surv
e
ys
of
architectures,
approaches,
and
purposes
of
PdM
systems;
the
y
ha
v
e
sho
wn
that
PdM
represents
an
essential
feature
of
smart
manuf
acturing
systems,
kno
wn
as
the
fourth
industrial
re
v
olution
(industry
4.0)
[1],
[8],
[9].
Presently
,
PdM
is
a
hot
research
topic
in
the
industry
,
co
v
ering
all
engineering
elds
ranging
from
ci
vil
engineering
to
structural
engineering.
In
ci
vil
engineering,
the
researchers
proposed
a
PdM
system
in
[10]
to
monitor
rail
w
ay
tunnels,
where
the
author
of
[11]
used
image
processing
to
design
a
PdM
system
to
detect
and
c
lassify
road
distresses.
PdM
systems
are
also
used
in
mechanical
engineering,
wherein
[12],
the
researchers
presented
a
PdM
solut
ion
for
metallic
structure
ag
ainst
corrosion.
Also,
in
electrical
engineering,
Massaro
et
al
.
[13]
described
ho
w
to
e
xploit
v
arious
technologies
to
design
a
PdM
system
for
ener
gy
router
b
uilding
equipments.
Ullah
et
al
.
[14]
used
the
thermal
images
and
machine
learning
approach
to
de
v
elop
a
PdM
system
for
po
wer
substation
equipments.
DL
and
ML
techniques
are
essential
tools
to
ease
humanitarian
acti
vities;
Their
applications
include:
natural
language
processing
[15],
self-dri
ving
cars
[16],
human
motion
detection
[17],
[18],
health
care
[19],
and
so
man
y
other
applications.
There
are
se
v
eral
techniques
of
DL
and
ML
utilized
in
designing
PdM
systems,
most
of
them
implemented
by
feedforw
arded
neural
netw
orks
(FFNNs).
Khumprom
et
al
.
[20]
used
FFNN
for
the
prognostics
of
aircraft
g
as
turbine
engines
and
pro
vide
a
data-dri
v
en
model,
where
the
comple
xity
of
the
model
increases
with
the
amount
of
the
collected
data.
Each
piece
of
data
is
related
to
a
dif
fere
n
t
feature
of
the
system
under
observ
ation,
and
the
y
reduced
the
comple
xity
by
cutting
do
wn
on
the
amount
of
data
by
using
an
appropriate
selection
of
the
features
and
dimension
reduction.
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
25,
No.
2,
February
2022:
1047–1058
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
❒
1049
The
PdM
approach
proposed
in
[21]
is
based
on
restricted
Boltzmann
machine
(RBM)
and
support
v
ector
machine
(SVM)
algorithms;
the
y
used
image-recognition
and
time
series
forecasting
to
classify
the
collected
data
as
normal
or
abnormal.
It
is
a
f
as
t
training
model
because
it
consists
of
just
one
layer
,
making
it
unsuitable
for
a
massi
v
e
amount
of
data
and
noisy
en
vironments.
Con
v
olutional
neural
netw
ork
(CNN)
model
is
used
in
[22];
the
authors
modied
the
idea
of
con
v
olution
(used
widely
in
image
processing)
by
adding
a
dislocated
tim
e
series
(DTS).
DTS
disco
v
ers
the
relationships
among
the
signals
wi
th
dif
ferent
int
erv
als
in
periodic
mechanical
signals.
This
technique
uses
sha
red
weights
to
mak
e
use
of
neighborhoods,
and
the
output
spends
on
the
current
observ
ations
rather
than
the
pre
vious
ones.
T
ahsien
et
al.
[23]
presente
d
a
surv
e
y
of
research
that
implemented
ML/DL
techniques
to
impro
v
e
the
functionality
of
WSNs
and
IoT
systems;
their
central
aspect
is
netw
ork
intrusion
detection.
Liu
and
Cerpa
[24]
used
Na
¨
ıv
e
Bayes
(NB)
model,
FFNN,
and
logistic
re
gression
(LR)
classier
.
Their
approach
predicts
the
probability
of
successful
reception
of
the
ne
xt
pack
et;
the
inputs
of
the
model
are
pack
et
reception
ratio
(PRR),
and
ph
ysical
feature
of
pre
vious
pack
ets
includes:
signal
to
noise
ratio
(SNR),
recei
v
ed
signal
strength
indicator
(RSSI)
and
link
quality
indicator
(LQI).
K
ulin
et
al.
[25]
proposed
an
ML
model
to
predict
the
performance
of
WSNs
in
terms
of
reliability
.
Their
model
is
based
on
re
gression
trees,
linear
re
gression,
and
neural
netw
orks.
The
input
of
the
model
is
a
v
ector
of
the
number
of
detected
nodes
(d),
inter
-pack
et-interv
al
(IPI),
number
of
recei
v
ed
pack
ets
(RP),
and
number
of
erroneous
pack
ets/frames
(errP).
The
output
is
the
estimation
of
pack
et
loss
rate
(PLR).
Akbas
et
al.
[26]
utilized
the
neural
netw
ork
model
(NN)
to
predict
the
life-time
of
sensors
based
on
transmission
po
wer
le
v
el
and
internode
distance.
An
in-depth
learning
approa
ch
w
as
proposed
in
[27]
to
estimate
the
ener
gy
con-
sumption
(EC)
and
pack
et
deli
v
ery
ratio
(PDR)
depending
on
ten
input
features
(distance,
actual
transmissions,
and
queue
size).
This
paper
presents
a
mathmatical
analysis
of
a
prediction
model
for
P
dMs,
and
we
use
it
with
ML
algorithm
to
b
uild
a
PdM
system
for
WSNs;
most
of
the
studies
abo
v
e
use
WSNs
as
the
backbone
and
the
k
e
y
component
of
PdM
[4],
[28],
to
the
best
of
our
kno
wledge,
there
are
v
ery
fe
w
studies
interested
in
nding
PdM
for
WSN,
most
of
them
dominating
intrusion
detection
of
IoT
systems.
In
this
study
,
WSN
is
not
only
a
tool
b
ut
also
the
PdM
system’
s
subject;
the
proposde
approach
tak
es
the
QoS
and
limited
resources
of
WSN
into
account.
3.
THE
SYSTEM
MODEL
This
paper
proposes
a
PdM
approach
consists
of:
(i)
Prediction
model
estimates
the
forw
ard
probabil-
ity
distrib
ution
of
the
operational
status
of
the
monitored
system,
the
information
about
the
monitored
system
entered
into
the
model
i
n
the
form
of
a
multi-v
ariant
time
series.
The
model
estimates
the
operational
status
of
the
system
during
the
ne
xt
M
steps;
it
checks
that
the
operability
in
the
ne
xt
M
steps
is
guaranteed
with
gi
v
en
reliability
determined
by
predened
parameter
ϵ
.
(ii)
ML
algorithm
to
implement
the
prediction
model.
The
proposed
model
is
implemented
by
an
ML
algorithm
based
on
FFNN.
3.1.
Pr
edicting
the
f
orward
pr
obability
distrib
ution
Let
us
ass
ume
that
the
information
about
the
monitored
system
is
summarized
in
times
series
x
(
k
)
,
this
time
series
can
result
from
direct
measurements
or
pre-processed
data
obtained
by
data
fusion.
Ev
aluation
on
the
system
state
can
be
summarized
as
follo
ws:
-
If
x
(
k
)
>
A
then
the
system
is
malfunctioning
and
ur
gent
maintenance
action
is
required;
-
If
x
(
k
)
≤
A
then
the
system
operates
normally
.
Based
on
the
observ
ations
x
(
k
−
1)
,
x
(
k
−
2)
,
...,
x
(
k
−
L
+
1)
the
underlying
challenge
is
to
estimate
the
probability
that
the
system
is
still
fully
operational
in
the
ne
xt
M
steps:
P
(
x
(
k
+
M
)
≤
A,
x
(
k
+
M
−
1)
≤
A,
...,
x
(
k
)
≤
A
|
x
(
k
−
1)
=
i,
...,
x
(
k
−
L
+
1
=
j
)
(1)
or
more
precisely
,
to
check
whether
operability
in
the
ne
xt
M
steps
is
guaranteed
with
gi
v
en
reliability
deter
-
mined
by
parameter
ϵ
i.e.
in
(2).
M
:
P
(
x
(
k
+
M
)
≤
A,
x
(
k
+
M
−
1)
≤
A,
.
.
.
,
x
(
k
)
A
|
x
(
k
−
1)
=
i,
.
.
.
,
x
(
k
−
L
+
1)
=
j
)
≥
1
−
ϵ
(2)
A
pr
edictive
maintenance
system
for
wir
eless
sensor
networks:
a
mac
hine
...
(Mohammed
Almazaideh)
Evaluation Warning : The document was created with Spire.PDF for Python.
1050
❒
ISSN:
2502-4752
By
introducing
the
notations:
x
+
(
k
)
:=
(
x
(
k
+
M
)
,
x
(
k
+
M
−
1)
,
.
.
.
x
(
k
))
x
−
(
k
)
:=
(
x
(
k
−
1)
,
...,
x
(
k
−
L
+
1))
(3)
one
can
write
this
probability
in
a
more
compact
form,
where
set
B
is
dened
as:
B
:=:
x
i
<
A,
...,
x
M
<
A
∀
1
≤
i
≤
M
.
M
:
P
(
x
+
(
k
)
∈
B
|
x
−
(
k
)
=
(
i,
...,
j
))
≥
1
−
ε
(4)
Introducing
the
follo
wing
tw
o
v
ectors:
s
(1)
=
(
s
(1)
1
,
s
(1)
2
=
(1
,
0)
→
ha
x
+
∈
B
s
(2)
=
(
s
(2)
1
,
s
(2)
2
=
(0
,
1)
→
ha
x
+
/
∈
B
(5)
one
can
form
a
training
set
as
(6).
τ
(
K
)
=
{
(
x
−
(
k
)
,
s
(
k
))
,
k
=
1
,
...,
K
}
,
s
(
k
)
∈
{
s
(1)
,
s
(2)
}
(6)
3.2.
FFNN
algorithm
W
e
use
FFNN
to
implement
the
ML
algorithm.
FFNNs
ha
v
e
the
most
straight
forw
ard
arc
h
i
tec-
ture.
The
y
ha
v
e
inputs,
outputs,
and
numbers
of
hidden
layers
between
them;
as
the
number
of
hi
dden
layers
increases,
the
data
mo
v
es
in
one
direction
from
the
input
layer
to
the
output
layer
.
This
study
uses
backprop-
ag
ation
(BP)
as
a
training
algorithm.
It
is
one
of
the
most
fundamental
and
common
training
algorithms.
The
estimated
output
is
calculated
based
on
the
acti
v
ation
function.
Then,
it
calculates
the
estimation
error
based
on
the
loss
function.
It
goes
backw
ard
to
update
the
weights
based
on
the
gradient
of
the
loss
function.
The
ef
cienc
y
of
FFNN
depends
on
se
v
eral
f
actors
such
as
the
selection
of
appropriate
acti
v
a
tion
function,
selection
of
proper
training
algorithm,
the
suitable
structure
of
hidden
layers,
size
of
the
training
set,
and
the
accurate
description
of
the
problem
[29].
Unfortunately
,
there
are
no
standard
rules
for
selecting,
com-
paring,
and
testing
the
solutions;
the
user’
s
satisf
action
in
accurac
y
and
comple
xity
is
the
primary
benchmark.
The
training
set
in
(6)
is
used
to
train
the
corresponding
FFNN,
where
the
input-output
mapping
of
the
FFNN
is
y
=
N
et
(
x,
w
)
,
where
v
ector
w
refers
to
the
weights
of
the
netw
ork
subject
to
learning.
The
weights
can
then
be
optimized
by
the
backpropag
ation
(BP)
algorithms
as:
w
opt
:
min
1
K
K
X
k
=1
∥
s
(
k
)
−
N
et
(
x
−
(
k
)
,
w
)
∥
2
(7)
yielding:
1
K
K
X
k
=1
∥
s
(
k
)
−
N
et
(
x
−
(
k
)
,
w
)
∥
2
→
E
∥
s
−
N
et
(
x
−
,
w
)
∥
2
(8)
and
then:
w
opt
:
min
w
E
∥
s
−
N
et
(
x
−
,
w
)
∥
2
→
N
et
(
x
−
,
w
)
=
E
(
s
|
x
−
)
(9)
subject
to
(5):
E
(
s
|
x
−
)
=
1
0
0
1
P
(
x
+
∈
B
|
x
−
)
P
(
x
+
∈
B
c
|
x
−
)
(10)
where:
E
1
(
s
|
x
−
)
=
P
(
x
+
∈
B
|
x
−
)
E
2
(
s
|
x
−
)
=
P
(
x
+
∈
B
c
|
x
−
)
(11)
as
a
result,
after
learning,
at
the
output
of
the
FFNN,
one
can
observ
e
the
estimated
conditioned
probabilities
once
the
past
observ
ations
are
gi
v
en
in
the
input.
If
P
(
x
+
∈
B
|
x
−
)
≥
1
−
ε
then
there
are
at
least
M
steps
to
f
ailure.
Figure
1
sho
ws
the
structure
of
FFNN
consists
of
three
hidden
layers;
the
input
is
8
pre
vious
observ
ations.
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
25,
No.
2,
February
2022:
1047–1058
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
❒
1051
Figure
1.
FFNN
of
three
hidden
layers
and
L=8
pre
vious
observ
ations
windo
w
4.
CUST
OMIZED
PDM
FOR
WSNS
In
this
section,
the
proposed
model
is
customized
as
a
PdM
for
WSNs.
WSN
consists
of
some
s
mall
nodes
and
one
or
mor
e
BS
to
form
a
data
collection
system;
the
nodes
communicate
with
each
other
and
with
the
BS
via
a
wireless
radio
transcei
v
er
attached
to
them.
The
nodes
are
rigged
up
with
application-specic
sensors
to
measure
or
track
a
specic
ph
ysical
phenomenon;
the
y
ha
v
e
a
limited-capacity
central
processing
unit.
These
nodes
often
operate
on
batteries
as
a
limited-ener
gy
source;
besides
that,
the
y
usually
w
ork
in
harsh
and
comple
x
en
vironments
[30].
Designers
and
operators
of
WSN
should
consider
their
limited
resources
(memory
and
processing
capabilities),
limited
communication
bandwidth,
limited
ener
gy
,
and
other
restrictions.
In
the
f
ace
of
an
y
limitations,
an
y
system’
s
performance
should
satisfy
the
minimum
le
v
el
of
service
s
and
requirements,
kno
wn
as
quality-of-service
(QoS);
in
the
case
of
WSN,
QoS’
s
include
reliability
,
ener
gy
ef
cienc
y
,
security
,
accurac
y
,
delay
,
and-so-forth.
Maintenance
procedures
may
include
selecting
ne
w
heads
of
clusters
and
leaders
of
chains,
rearrangement
of
clusters
and
chains,
ne
w
sensors
deplo
yments,
controlling
ON/OFF
schemes,
and
man
y
other
procedures
that
enhance
the
performance
of
WSNs.
The
limited
resources
of
WSNs
require
a
lo
w
comple
xity
PdM;
to
reduce
the
comple
xity
,
we
use
quantization
and
encoding
schemes.
4.1.
Quantized
FFNN
WSNs
are
limited
resource
systems
in
terms
of
ener
gy
,
memory
,
and
processing
capabilities.
T
o
mak
e
our
model
compatible
with
such
circumstances,
we
implement
a
quantization
algorithm
to
s
p
e
ed
up
the
training
process
and
reduce
the
comple
xity
of
the
model.
Quantization
enhances
training
speed
and
comple
xit
y
,
b
ut
it
weak
ens
the
accurac
y
,
so
the
user
has
to
trade-of
f
comple
xity
with
accurac
y
.
Usually
,
v
ariables
and
weights
are
represented
as
oating-point
numbers;
the
quantization
function
con
v
erts
them
to
inte
gers,
x
ed-point,
or
inte
ger
numbers;
such
representations
are
more
ef
cient
re
g
arding
memory
usage
and
computation
speed
[31],
[32].
Uniform
or
deterministic
quanti
zation
function
calculates
the
quantization
le
v
el
(
q
)
of
the
real
v
alues
r
as
follo
ws
[32]:
q
(
r
)
=
sig
n
(
r
)
.
∆
.
|
r
|
∆
+
1
2
(12)
where
∆
is
the
resolution
or
the
quantization
step.
Such
functions
are
kno
wn
as
equidistant
quantization.
The
quantization
range
is
di
vided
equally
between
quantization
le
v
els,
so
such
functions
are
used
in
case
of
uniform
distrib
utions
of
the
samples;
when
the
distrib
ution
is
not
uniform,
non-equidistant
quantization
is
used;
the
authors
of
[33]
used
Llo
yd-Max
algorithm
to
determine
the
best
quantization
in
such
cases,
it
tak
es
the
PDF
of
samples
distrib
ution
on
account
to
minimize
the
mean
square
quantization
error
σ
.
Finding
the
optimal
quantized
le
v
el
q
i
of
sample
r
is
an
iterati
v
e
process
where:
q
i
(
r
)
=
R
c
i
+1
c
i
r
f
(
r
)
dr
R
c
i
+1
c
i
f
(
r
)
dr
(13)
in
(9),
c
i
and
c
i
+1
are
the
re
gions
of
the
proposed
quantization
le
v
el
q
i
,
and
f
(
r
)
is
the
PDF
of
t
h
e
samples,
the
goal
is
the
minimization
of
(
σ
),
which
is:
A
pr
edictive
maintenance
system
for
wir
eless
sensor
networks:
a
mac
hine
...
(Mohammed
Almazaideh)
Evaluation Warning : The document was created with Spire.PDF for Python.
1052
❒
ISSN:
2502-4752
σ
2
q
=
Q
X
i
=1
Z
c
i
+1
c
i
(
r
−
q
i
)
2
f
(
r
)
dr
(14)
where
Q
is
the
numbers
of
the
quantization
le
v
els.
4.2.
Sparsity
of
FFNN
Memory
is
a
crucial
concern
when
dealing
with
FFNN
for
WSNs;
man
y
techniques
ha
v
e
been
used
to
impro
v
e
the
memory
ef
cienc
y
of
ML/DL
algorithms;
some
of
them
concern
memory
requirements
of
infer
-
ence,
others
concern
the
memory
requirements
of
training.
Sparse
FFNN
is
a
common
and
ef
cient
technique
used
widely
to
enhance
DL/ML
algorithms
[34].
In
sparse
FFNN,
the
i
nput
features
are
represented
as
a
sparse
v
ector;
most
spare
v
ector
elements
are
zeros,
which
need
fe
wer
computations
and
less
memory
space.
Be-
sides
memory
ef
cienc
y
,
spa
rsity
impro
v
es
the
comple
xity
and
the
computations
of
the
FFNN.
Unfortunately
,
at
the
same
time,
it
de
grades
the
accurac
y
of
FFNN;
the
designer
has
to
trade-of
f
between
the
sparsity
le
v
el
and
accurac
y
[35].
In
this
study
,
we
use
a
straightforw
ard
encoding
scheme
used
in
[33].
It
is
compatible
and
complementary
with
the
quantization
algorithm
,
each
quantization
le
v
el
is
encoded
into
an
orthonormal
v
ector
set:
q
l
→
sq
l
:
sq
l
(
i
)
=
(
1
if
i
=
l
0
other
w
ise
,
i
=
{
1
,
2
,
.
.
.
,
Q
}
by
the
encoding
(3)
becomes:
x
+
(
k
)
:=
(
sq
(
k
+
M
)
,
sq
(
k
+
M
−
1)
,
.
.
.
sq
k
)
,
x
−
(
k
)
:=
(
sq
(
k
−
1)
,
...,
sq
(
k
−
L
+1)
)
(15)
5.
SETUP
OF
THE
D
A
T
ASET
The
dataset
used
for
training,
v
alidation,
and
testing
is
imported
from
[36].
The
researchers
collected
the
data
e
xperimentally
as
described
in
their
paper
[37].
The
y
used
IEEE
802.15.4
link
implemented
on
T
in
yOS
to
connect
tw
o
T
elosB
motes,
each
mote
uses
a
TI
CC2420
radio
transcei
v
er
with
250
kbps.
The
researchers
trace
the
pack
et
deli
v
ery
performance
under
se
v
eral
pre-congured
stack
parameters;
these
parameters
are
related
to
ph
ysical,
MA
C,
and
application
layers.
W
e
ha
v
e
generated
an
observ
ations
table
consisting
of
10000
entries.
Each
entry
summarizes
the
a
v
erage
measured
parameters
of
300
pack
ets;
we
ha
v
e
x
ed
the
po
wer
transmission
le
v
el
at
-19
dBm
and
change
t
h
e
other
pre-congured
parameters
for
the
possible
combination
sho
wn
in
T
able
1.
Besides
the
pre-congured
paramet
ers,
the
observ
ations
table
has
se
v
eral
pack
et
deli
v
ery
performance
measured
parameters
corresponding
to
each
combination
of
pre-congured
parameters,
as
sho
wn
in
T
able
2.
A
short
sample
of
the
observ
ations
table
is
sho
wn
in
T
able
3.
T
able
1.
Pre-congured
parameters
P
arameters
Acron
ym
V
alues
Comments
Inter
-Arri
v
al
T
ime
IA
T
(ms)
10,
15,
20,
25,
30,
35,
40,
50
Pre-congured
P
ack
et
P
ayLoad
PL
(bytes)
20,
35,
50,
65,
80,
95,
110
Pre-congured
Maximum
Queue
Size
QS
1,
30,
60
Pre-congured
Maximum
T
ransmission
attempt
NMT
1,
3,
5
Pre-congured
Retry
delay
DR
30,
60
Pre-congured
Po
wer
of
transmission
Ptx
19
Pre-congured
Distance
D
10,20,35
Pre-congured
T
able
2.
Measured
parameters
P
arameters
Acron
ym
V
alues
Comments
Actual
Queue
Size
A
QS
actual
v
alues
(0–60)
measured
Buf
fer
Ov
erFlo
w
OF
actual
v
alues
(0–1)
measured
Actual
T
ransmission
attempt
N
A
actual
v
alues
(0–5)
measured
Actualackno
wledged
transmission
A
CK
measured
Recei
v
ed
Signal
Strength
Indicator
RSSI
measured
Noise
Floor
NF
measured
Link
Quality
Indicator
LQI
measured
P
ack
et
arri
v
al
time
T
ar
r
measured
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
25,
No.
2,
February
2022:
1047–1058
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
❒
1053
T
able
3.
Sample
of
observ
ations
table
T
ar
r
125304
130758
137716
146187
156155
I
AT
10
15
10
15
50
P
L
20
35
65
95
110
QS
1
1
30
1
60
N
M
T
1
1
5
1
5
D
R
30
30
30
60
60
P
tx
19
19
19
19
19
D
10
10
10
20
35
O
F
0
0
0
0
0
Q
0.41
0.23
25.7
0.01
0.08
AC
k
0.59
0.77
0.723
0.99
1
N
A
0.593
0.77
0.723
0.993
1.02
R
S
S
I
-7.5167
-9.8567
-9.29
-16.31
-22.943
N
F
-54.0767
-70.57
-61.0533
-88.9367
-93.71
LQI
63.08
82.3467
77.2833
106.13
106
W
e
ha
v
e
used
the
pre-congured
and
measured
parameters
to
calculate
the
QoS
requirements
of
the
WSN.
Ener
gy
ef
cienc
y
,
throughput,
delay
,
and
pack
et
loss
as
in
[27],
[37].
-
P
ack
et
error
rate
(
P
E
R
):
measures
the
reliability
of
the
system;
it
depends
on
the
queuing
characteristics
(Buf
fering)
of
the
nodes
and
the
quality
of
the
link
parameters
(
R
S
S
I
,
N
F
,
and
LQI
)
P
E
R
=
N
A
−
AC
K
N
A
(16)
-
Ener
gy
ef
cienc
y
(
E
n
):
determines
the
ener
gy
needed
to
transmits
one
benecial
bet;
it
depends
on
P
E
R
,
po
wer
transmission
le
v
el,
the
payload
of
the
pack
et,
length
of
the
header
,
and
transmission
rate:
E
n
=
P
tx
∗
(
P
L
+
P
H
)
∗
T
t
P
L
(1
−
P
E
R
)
(17)
P
H
is
the
length
of
the
header/trailer
,
which
is
(11-31
bytes)
in
IEEE
802.15.4
[38],
T
t
is
the
transmis-
sion
time
which
is
0
.
004
ms
in
the
case
of
250
k
b
/s
.
-
Throughput
(
T
p
)
is
the
number
of
benecial
bets
recei
v
ed
per
unit
of
time;
it
depends
on
P
L
,
P
E
R
,
and
transmission
service
time
(
T
s
),
as:
T
p
=
P
L
(1
−
P
E
R
)
T
s
(18)
where
:
T
s
=
C
+
T
t
+(
N
A
∗
D
R
)
(19)
and
C
is
a
constant
depends
on
the
protocol
and
the
specication
of
the
radio
system;
it
is
≈
13
.
5
ms
in
the
circumstances
of
the
e
xperiment
[38].
-
Delay
is
the
time
elapsed
from
pack
et
generation
to
successful
pack
et
reception;
LQI
and
queuing
characteristics
of
the
nodes
are
crucial
issues
when
in
v
estig
ating
delay
.
Researchers
mostly
use
queuing
system
model
to
state
the
delay
of
WSNs;
we
use
system
utilization
ρ
as
a
metric
to
quantify
the
delay
,
where
ρ
=
T
s/I
AT
and
as
ρ
→
1
delay
increases.
The
four
calculated
QoS
requirements
(
P
E
R
,
E
n,
T
p
and
ρ
)
are
arranged
into
a
10000
∗
4
input
feature
table;
each
entry
corresponds
to
an
entry
of
the
observ
ations
table.
The
pack
et
arri
v
al
time
(
T
ar
r
)
is
reformatted
as
a
time
series
and
added
as
a
fth
column
to
the
input
features
table.
QoS
metrics
are
contradictory;
impro
ving
reliability
decreases
ener
gy
ef
cienc
y
,
and
impro
ving
ener
gy
ef
cienc
y
reduces
throughput,
and
so
on;
the
user
should
trade-of
f
among
thes
e
metrics.
T
o
dene
t
he
operational
status
of
the
WSN,
we
dene
a
range
of
each
metric
as
follo
ws:
α
+
≤
P
E
R
<
α
−
β
+
≤
E
n
<
β
−
γ
+
≤
T
p
<
γ
−
δ
+
≤
ρ
<
δ
−
A
pr
edictive
maintenance
system
for
wir
eless
sensor
networks:
a
mac
hine
...
(Mohammed
Almazaideh)
Evaluation Warning : The document was created with Spire.PDF for Python.
1054
❒
ISSN:
2502-4752
If
the
four
metrics
are
wi
thin
the
specied
range,
then
the
operational
state
of
WSN
is
“OK”
cor
-
responding
to
s
(1)
=
(1
,
0)
as
dened
in
(5),
which
means
that
no
maintenance
is
needed;
otherwise,
the
operational
statue
is
“NOK”
corresponding
to
s
(2)
=
(0
,
1)
as
dened
in
(5),
which
means
that
maintenance
is
needed.
The
operational
status
for
each
entry
of
the
input
features
table
represents
an
entry
of
the
output
table
of
the
FFNN,
concatenation
of
the
input
features
table,
and
the
output
table
forms
the
dataset
of
training,
testing,
and
v
alidation
of
the
FFNN.
T
able
4
sho
ws
a
short
sample
of
the
training
set.
T
able
4.
Sample
of
the
training
dataset
T
ar
r
P
E
R
E
n
T
h
R
u
O
P
O
K
N
O
K
44488657
0.005618
0.084072
19.98877
3.1304
1
0
44544439
0.003333
0.08388
19.99833
1.0876
1
0
44559087
0
0.0836
20
0.87008
0
1
44597021
0
0.080343
35
1.74016
1
0
44607076
0.006667
0.080882
34.99222
1.450133
1
0
In
the
ne
xt
stage,
the
entries
of
the
training
dataset
are
quantized
by
the
Llo
yd-Max
algorithm
by
8
quantization
le
v
els.
Each
quantized
entry
is
encoded
into
an
8-bits
binary
v
ector
,
as
described
in
section
4.3.
The
numerical
numbers
representing
the
QoS
parameters
at
instant
(
t
)
are
con
v
erted
to
a
1
∗
4
∗
8
sparse
v
ector
.
Each
v
ector
has
four
1’
s
indicate
the
quantizat
ion
le
v
el
of
each
QoS
requirement.
T
able
5
sho
ws
a
s
ample
of
the
data
set
after
quantization
and
encoding.
T
able
5.
Sample
of
the
dataset
after
quantization
and
encoding
T
ar
r
P
E
R
E
n
T
h
R
u
O
P
44488657
10000000
00000010
00100000
00010000
10
44544439
01000000
00001000
01000000
00010000
10
44559087
10000000
00100000
00010000
01000000
01
44597021
10000000
00000010
00000100
00000010
01
44607076
00100000
00000010
00000010
00000001
10
6.
IMPLEMT
A
TION
AND
RESUL
TS
W
e
implemented
the
proposed
model
using
the
deep
learning
toolbox
of
MA
TLAB2020b;
we
used
the
dataset
e
xplained
in
the
pre
vious
section.
In
the
rst
e
xperiment,
we
in
v
estig
ate
the
ef
fect
of
quantization
and
encoding
on
the
accurac
y
and
comple
xity
of
the
PdM
system.
T
o
get
m
ore
use
of
the
sparsity
of
the
input
v
ector;
the
FFNN
deals
with
each
binary
input
v
ector
(as
the
sample
is
sho
wn
in
T
able
4
as
a
black
and
white
pattern,
where
the
ones
appear
as
white
points
in
a
black
line,
Figure
2
sho
ws
a
sample
of
these
patterns.
Figure
2.
Samples
of
the
input
v
ector
as
black
and
white
patterns
In
this
e
xperiment,
we
use
the
accurac
y
as
a
performance
metric,
Acc
=
R
/T
Where
R
is
the
number
of
correct
predictions,
and
T
is
the
number
of
the
data
set.
Fi
g
ur
e
3
sho
ws
the
comple
xity
of
the
algorithm
under
dif
ferent
numbers
of
hidden
layers;
we
measure
the
comple
xity
by
the
e
x
ecution
time
of
the
training
process.
The
gure
demonstrates
that
the
algorithm
uses
quantized
and
encoded
data
tak
es
less
time
than
the
one
ra
w
data,
re
g
ardless
of
the
number
of
header
layers.
The
quantized
and
encoded
data
ensures
better
comple
xity
because
of
the
sparsity
enlightened
in
section
4.3.
Both
algorithms
sho
w
an
ascending
tone
of
training
time
as
the
number
of
hidden
increase
s.
The
irre
gularity
noticed
in
both
curv
es
is
justied
by
the
randomness
of
initial
v
alues
of
the
training
process’
s
weight
and
biases.
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
25,
No.
2,
February
2022:
1047–1058
Evaluation Warning : The document was created with Spire.PDF for Python.
Indonesian
J
Elec
Eng
&
Comp
Sci
ISSN:
2502-4752
❒
1055
Figure
3.
Comple
xity
of
original
data
and
quantized
and
encoded
data
In
Figure
4,
one
notices
that
the
ra
w
(original)
data
sho
w
better
accurac
y
than
the
quantized
and
encoded
data;
this
happens
because
besides
the
prediction
error
,
there
is
also
quantization
error
e
xplaine
d
in
section
4.2.
W
ith
quantized
and
encoded
data,
the
input
data
appear
as
a
lookup
table,
so
one
notices
the
lo
w
v
ariance
of
accurac
y
with
quantized
and
encoded
data
re
g
ardless
o
f
the
number
of
the
hidden
layers.
The
algorithm
uses
the
ra
w
data
e
xhibits
better
accurac
y
as
the
number
of
hidden
layers
increases
Figure
4.
Accurac
y
of
original
data
and
quantized
and
encoded
data
In
the
third
e
xperiment,
we
in
v
estig
ate
the
relationship
between
the
performance
and
the
number
of
future
time
steps
M
;
tw
o
metrics
are
used
to
clarify
the
performance;
mean
square
error
(MSE)
and
the
e
x
ecution
time
presenter
of
the
comple
xity
.
The
output
of
the
FFNN
is
a
binary
v
ector
(
ops
)
consists
of
M
elements,
the
v
ector
(
ops
)
states
the
operational
status
of
the
WSN,
ops
(
m
)
=
{
m
1
,
m
2
,
.
.
.
,
m
M
}
,
m
i
=
(
1
T
he
sy
stem
w
il
l
be
O
K
until
l
step
i.
0
T
he
sy
stem
w
il
l
be
f
ual
ty
af
ter
i
step
s
.
for
e
xample,
if
M
=
8
,then
ops
can
be
ops
=
{
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
}
,
this
means
that
the
system
will
be
f
aulty
after
v
e
operational
steps,
and
maintenance
should
tak
e
place.
A
pr
edictive
maintenance
system
for
wir
eless
sensor
networks:
a
mac
hine
...
(Mohammed
Almazaideh)
Evaluation Warning : The document was created with Spire.PDF for Python.
1056
❒
ISSN:
2502-4752
Figure
5
clar
ies
the
performance
of
the
model
under
dif
ferent
v
alues
of
M
=
(1
−
10)
,
where
the
number
of
hidden
layers
is
set
to
ten
layers
,
and
the
number
of
pre
vious
observ
ations
is
set
to
3
.
The
left
y-axis
characterizes
the
M
S
E
,
where
the
right
y-axis
characterizes
the
e
x
ecution
time.
The
gure
sho
ws
that
as
M
increases,
both
the
e
x
ecution
time
and
the
M
S
E
increase.
Figure
6
demonstrates
the
ef
fect
of
the
number
of
pre
vious
observ
ations
k
on
M
S
E
and
e
x
ecution
time.
The
number
of
the
hidden
layer
is
set
to
ten,
and
M
is
set
to
5
.
The
left
y-axis
represents
the
M
S
E
,
and
the
right
y-axis
represents
the
e
x
ecution
time;
a
lar
ge
k
means
less
M
S
E
b
ut
a
longer
e
x
ecution
time.
Figure
5.
The
relation
among
M
S
E
,
e
x
ecution
time,
and
M
Figure
6.
The
relation
among
M
S
E
,
e
x
ecution
time,
and
L
7.
CONCLUSION
In
this
paper
,
we
used
the
FFNN
machine
learning
model
to
b
uil
d
a
PdM
system
for
WSN.
It
predicts
the
operational
status
(“OK”
or
f
aulty)
after
M
time
steps
based
on
L
pre
vious
readings
of
QoS
requirements
of
the
WSN.
W
e
used
real
estate
data
set
of
one-hop
WSN.
W
e
also
used
quantization
and
encoding
schemes
to
mak
e
the
system
incoherent
with
the
limited
resources
of
the
WSN.
W
e
re
v
ealed
that
the
comple
xity
of
systems
is
impro
v
ed
by
quantization,
encoding,
smale
M
and
small
L
.
The
accurac
y
is
impro
v
ed
by
using
the
ra
w
(original
data),
small
M
,
and
lar
ge
k
.
W
e
will
e
xtend
our
approach
to
include
multi-hop
WSN
and
implement
it
by
other
machine
and
deep
learning
models.
Indonesian
J
Elec
Eng
&
Comp
Sci,
V
ol.
25,
No.
2,
February
2022:
1047–1058
Evaluation Warning : The document was created with Spire.PDF for Python.