SlideShare a Scribd company logo
1 of 6
Download to read offline
Policy-Based Diabetes Detection using Formal
Runtime Verification Monitors
1st
Abhinandan Panda
School of Electrical Sciences
IIT Bhubaneswar
Bhubaneswar, India
Email: ap53@iitbbs.ac.in
2nd
Srinivas Pinisetty
School of Electrical Sciences
IIT Bhubaneswar
Bhubaneswar, India
Email: spinisetty@iitbbs.ac.in
3rd
Partha Roop
Dept. of Electr. & Comput. Eng.
University of Auckland
Auckland, New Zealand
Email: p.roop@aucklanduni.ac.nz
Abstract—Diabetes is a global health threat, and its prevalence
is rising at an alarming rate. Diabetes is the cause of severe
complications in vital organs of the body. So, diabetes must
be detected early for timely treatment and to prevent the
condition from escalating to severe consequences. Many AI
and machine learning approaches have been proposed for the
non-invasive continuous monitoring of diabetes. However, using
such informal methods in healthcare monitoring raises concerns
about reliability. Furthermore, deploying an AI-based solution
to continuously monitor a person’s health state on resource-
constrained embedded devices is a concern.
We overcome these shortcomings in this work by proposing a
formal runtime monitoring system for the first time for diabetes
detection using Electrocardiogram (ECG) sensing. We implement
a data mining model from the ECG features to infer ECG policies
and thereby synthesize a formal verification monitor based on
the policies. Using a diabetes dataset, we evaluate the verification
monitor’s performance compared to other proposed models.
Index Terms—Formal methods, Policy mining, Runtime mon-
itoring, Diabetes, ECG.
I. INTRODUCTION
It is a well-known fact that diabetes is a global health
issue. In diabetes, the body’s ability to process blood glucose
is reduced. The deficiency of insulin in the body leads to
Type 1 diabetes, whereas Type 2 diabetes arises because of
the body’s inability to use the insulin produced. Both types
of diabetes pose life-threatening risks as they lead to severe
complications in the heart, kidney, nerves, and many more
[1]. It is reported by International Diabetes Federation that
around 9.3% of people are affected by diabetes globally [2].
Considering the health threats posed by diabetes, a continuous
diabetes monitoring technique should be adopted [3].
The diabetes detection process appears to be burdensome
in the early stage since a patient must frequently visit a
physician. It’s also the case that most patients see a physician
after they develop diabetes. Furthermore, many patients with
diabetes mellitus go undiagnosed worldwide. According to
Beagley et al. [4], around 45.8% of diabetes cases with cardiac
complications are untreated.
In this regard, several techniques have been proposed in the
literature for the non-invasive monitoring of diabetes. With
the advancements in wearable biosensors, physiological signal
such as ECG has been investigated widely in monitoring
diabetes. The works in [5]–[7] use machine learning and deep
learning techniques to detect diabetes from the heart rate
variability data of ECG.
This work has been partially supported by The Ministry of Human Resource
Development, Government of India (SPARC P#701), IIT Bhubaneswar Seed
Grant (SP093).
However, concerns arise about the reliability of these in-
formal models when deployed in health monitoring. In re-
cent times, formally verifying machine learning and neural
network models are being studied [8]–[10]. Static verification
approaches find it challenging to formally specify such models,
while scalability is a concern. Another challenge is to deploy
such models on resource constraints wearable systems. As a
result, the objective is to develop a lightweight monitoring
framework that is formally correct by construction for moni-
toring health vital sign policies.
Formal method-based techniques have been widely used
as a reliable approach for verifying a system’s safety-critical
policies both statically and dynamically. Based on formal
methods, runtime verification (RV) [11]–[14] is a dynamic
monitoring approach. It checks if a system (under observation)
satisfies a given policy (φ) during execution. In this approach,
a RV monitor is synthesized from the given formal speci-
fications. The RV monitor is formally proved to be correct
by construction. The monitor can be employed to verify the
system’s stored execution or live execution against the policy.
In diabetes, several cardiac abnormalities such as reac-
tive hypertrophy, fibrosis, and coronary vessel changes are
commonly observed. Diabetic cardiomyopathy [15] is the
abnormal behaviour of the cardiac in diabetes even in the
absence of major cardiac risk factors such as artery disease,
hypertension, etc. It is linked with several irregularities in
the metabolism of the body. At an early stage, the diabetic
cardiomyopathy goes undiagnosed. Over the years, ECG has
proven to be a reliable tool for screening cardiovascular health
and should be analyzed for the early detection of diabetes.
To overcome the above limitations, we propose a formal
framework based on formal runtime verification (RV) for
diabetes monitoring for the first time. The RV monitor is devel-
oped from the ECG policies. The monitor senses the necessary
ECG events of a person and evaluates whether diabetes is
present. The synthesis and formalization of policies are one of
the most challenging aspects of using RV monitoring systems.
In this regard, we implement a data mining model using the
features of ECG for inferring the safety policies. The policies
are then formally specified for synthesizing a RV monitor.
The monitor continuously verifies the ECG policies defined
for diabetes monitoring using ECG sensing and provides a
verdict.
A. Overview of the proposed approach
We present a runtime verification monitor, as shown in Fig.
1, that senses the ECG of a person and monitors diabetes.
The RV monitor detects the required ECG events and, based
on the specified policies; it emits a verdict on whether diabetes
is present.
Since we are interested in developing a policy-based RV
framework for monitoring diabetes, we implement a data
mining model, a decision tree, using ECG features to infer the
ECG policies. We consider the ECG features set, i.e., the ECG
intervals PR, RR, TpTe, QT, and RT of diabetic and healthy
subjects (more details in Section II-A). These features, along
with the class labels, are fed as input to the decision tree,
and thereby we infer the ECG policies from the model. The
framework for learning ECG policies is shown in Fig. 2.
ECG
events True / False
(Diabetes
detection)
Inferred ECG Policies
ECG signal
ECG
Sensor
ECG
Processing
Module
RV monitor
Fig. 1: Proposed formal runtime monitoring framework for
diabetes monitoring
Raw ECG
ECG
intervals ECG
Policy
inference
ECG
Processing
Module
Data
Mining
Model
ECG
Dataset
(Diabetic,
Healthy)
Class label
(diabetes/healthy)
Fig. 2: Framework for learning ECG policies w.r.t diabetes
To synthesize a runtime monitor using inferred ECG poli-
cies, we use the RV technique for Timed Automata (TA).
The RV framework generates an executing monitor from ECG
policies defined as a TA. The RV monitor senses the relevant
events of ECG for monitoring the intended policies.
a) Deployment of the proposed RV monitor: We assume
that the RV monitor would be deployed on a wearable device
enabled with adequate sensors such as an ECG sensor. The de-
vice would have the required computational power to process
an ECG signal. The RV monitor implemented on the external
device would sense the required ECG events and monitor the
specified policies. In the event of a violation of policy, the
monitor will send an alarm to the user immediately.
The key contributions of the paper are:
• As per our knowledge, we propose a formal runtime
monitoring framework for monitoring diabetes for the
first time.
• We present the ECG patterns that are strongly associated
with diabetes.
• We mine ECG policies w.r.t diabetes using a data mining
model. The policies are formalized as timed automata
(TA), suitable for synthesizing a RV monitor.
• The proposed method allows us to build a wearable
monitor for monitoring diabetes using ECG sensing.
Section II discusses an overview of ECG, the ECG-diabetes
correlation, the datasets, and features of ECG considered in
this work. In Section III, we discuss the mining of ECG
policies for diabetes monitoring. Section IV explains the basics
of timed automata and RV monitors with examples. In Section
V, we illustrate the behavior of RV monitors through an ex-
ample for diabetes monitoring. The implementation, findings,
and comparison are discussed in Section VI, and we draw
conclusions in Section VII.
II. OVERVIEW OF ECG, ECG-DIABETES CORRELATION
AND FEATURE EXTRACTION
In this section, we present the features of ECG, the correla-
tions between ECG and diabetes, and discuss the ECG features
considered for monitoring diabetes.
A. A typical ECG
An Electrocardiogram (ECG) represents the heart’s elec-
trical activity, such as systole and diastole. An ECG signal
is attributed to several timed features such as PR interval,
QT interval, RT interval, RR interval, and TpTe interval. The
PR interval is between the beginning of the P-wave and the
beginning of the QRS-complex. The time duration between
starting of the QRS-complex to the end of the T-wave is known
as the QT interval. The RT interval is defined as the time
between the R-peak of ECG to the end of the T-wave. The
RR interval is the duration between two consecutive R-peaks
of ECG. The time between the peak and end of the T-wave
indicates the TpTe interval.
Time
Amplitude
S
R
Q
P
Q
R
S
QRS interval
P
PR interval
P-wave
interval
QT interval
RT interval
TpTe interval
Te
RR interval
Tp
Tp
Fig. 3: A typical ECG Signal
B. Correlation of ECG and Diabetes
The relationship between ECG and diabetes has been well
studied. Hypoglycemia (low blood glucose level) causes pro-
longation of QT interval [16]. In [17]–[19], authors studied RR
interval, corrected RT interval and TpTe interval of ECG to
detect hypoglycemia. According to [20], there is a significant
change in the corrected QT dispersion and PR interval in
hyperglycemia (low blood glucose level).
C. ECG-Diabetic Dataset
In this work, we study the ECG of both healthy and diabetes
patients available in the DICARDIA database [21]. The ECGs
of 51 diabetic participants with cardiac difficulties, aged 47-
67 years, three diabetic subjects without cardiac complications,
aged 37-61 years, and 11 healthy subjects, aged 44-56 years,
are included in the dataset. The duration of each ECG record
is 10 seconds.
D. Feature Extraction
We consider the following ECG features of both healthy
and diabetic patients.
• PR interval
• RR interval
• QT interval
• RT interval
• TpTe interval
The timed features mentioned above are extracted from each
cycle of ECG in the DICARDIA dataset.
The ECG_Processing module implemented in Python
reads and processes ECG data. An ECG signal may be influ-
enced with noises such as baseline wander, powerline interfer-
ence, and motion artefacts. As a result, signal pre-processing
is required to filter undesirable data and retrieve essential
information from the signals. The cleaning and processing of
the ECG signal are performed using the Neurokit2 tool [22]
in python. We apply a high pass Butterworth filter and a low
pass filter to remove baseline drift and high-frequency noise
from the ECG signal. The R-peaks in ECG are extracted using
the Pan-Tompkins algorithm [23]. We implemented discrete
wavelet analysis available in the Neurokit2 tool to identify
events, namely P-onset, Q-peak, T-peak, and T-end of ECG,
along with their time of occurrences. Once the peaks are
detected, we compute the intervals mentioned above for each
ECG cycle. A processed ECG signal marked with events is
shown in Fig. 4.
Fig. 4: A processed ECG Signal
III. SAFETY POLICIES MINING
Fig. 5: A decision tree of ECG features
In order to develop a policy-based RV framework for
monitoring diabetes using ECG sensing, we must mine the
ECG policies from the ECG features since this is not intuitive.
We implement a decision tree [24], a data mining model based
on the ECG features, i.e., the ECG intervals PR, RR, TpTe, QT,
and RT. Each feature set is associated with a class label, i.e.,
diabetic (D) or healthy (H). These features and the class labels
are input to the decision tree model. The model is implemented
in python using the scikit-learn module. Once the tree is built
with the features, the ECG policies are inferred by traversing
from the root to leaves of the tree (approach mentioned in
[24]). The decision tree generated from the considered ECG
features is shown in Fig. 5.
We inferred the following ECG policies from the decision
tree for diabetes monitoring.
• φECG1: If RR > 619 ms and PR > 127 ms and QT > 361
ms, then it is diabetes.
• φECG2: If RR > 619 ms and PR <= 127 ms, then it indicates
diabetes.
• φECG3: When RR > 528 ms and RR <= 619 ms and RT >
297.5 ms, diabetes is present.
• φECG4: When RR > 619 ms and PR > 127 ms and PR <=
140 ms and QT <= 361 ms, it is diabetes.
• φECG5: If RR > 401 ms and RR <= 408 ms and RT <=
297.5 ms, then it indicates diabetes.
Each ECG policy is a combination of multiple sub-policies.
For example, to monitor policy φECG1, we monitor the
intersection of the following sub-policies.
• PECG11: The RR interval of ECG should be less than or
equal to 619 ms.
• PECG12: The PR interval of ECG should be less than or
equal to 127 ms.
• PECG13: The QT interval of ECG should be less than or
equal to 361 ms.
We synthesize a RV monitor for each of the above ECG
policies φECG1, φECG2, φECG3, φECG4 and φECG5. While
monitoring the policy e.g. φECG1, when all the sub-policies
PECG11, · · · PECG13 are violated, the runtime monitor will
raise an alarm.
IV. FORMALISING POLICIES USING TIMED AUTOMATA
AND THE RUNTIME VERIFICATION MONITOR
In this section, we discuss via examples timed automaton
(TA) used to formalize timed policies of ECG, and the
behaviour of the RV monitor for policies specified as TA.
Formal Runtime Verification (RV) [11]–[13] techniques are
used to monitor and verify whether an execution of a system
conforms to or violates a particular policy (specification) (φ).
In this method, the system is treated as a black box, and
the approach does not influence the system’s execution. RV
is considered a lightweight verification approach where RV
monitors are synthesized automatically from a set of given
formal specifications. The runtime monitor senses the input
events (σ) from the monitored system and emits a verdict if
the execution of the system satisfies the policy. This approach
can be employed for online or offline verification.
This work synthesizes RV monitors by adopting the run-
time verification synthesis technique for timed automata. The
intricacies of the formal definitions and monitoring algorithms
are omitted here. We briefly discuss timed automata and
the formalization of a policy using TA through examples.
Similarly, the behavior of an RV monitor is illustrated via
a policy defined as TA.
A. Timed Automata (TA)
l0
start l1 l2
Σ  {e1 }
e1 ,
x := 0
Σ  {e2 }
e2 , x ≤ 10,
x := 0
e2 ,
x>10
Σ
Fig. 6: Policy PEX represented by a timed automata
Consider an example of timed policy PEX: Event e2 should
occur within 10 time units after event e1.
The policy PEX is represented by the timed automaton
in Fig. 6. In the TA, l0, l1, l2 are known as locations. The
set of locations is L = {l0, l1, l2}, where l0 is the initial
location. l0 and l1 are accepting locations (locations marked
as double circle with green colour. Similar pattern is followed
in other automata.). l2 is a non-accepting location. The set of
events is Σ = {e1 , e2 }. Clock x is used to measure the time
elapsed between the events e1 and e2. Clocks associated with
constraints are known as guards (in this case, x ≤ 5) and also
clocks can be reset to 0 (x :=0).
When the first event e1 occurs, there will be a transition
from l0 to l1 and the clock x would be reset to 0. At the
location l1, if the input event is e2 and the time elapsed
between e1 and e2 is within 10 units (x ≤ 10), then the
TA will remain in location l1 and the clock x value is set to 0
(clock resets), otherwise it goes to location l2. Whenever the
TA reaches location l2 for an input, as it is a non-accepting
location, the policy is violated.
B. Runtime verification (RV) monitor
Given a timed policy φ and a timed automaton (TA) Aφ
representing the policy, we develop an RV monitor Mφ using
the methodologies presented in [11], [13], [25]. The monitor-
ing algorithm is input with the timed automaton defining the
policy φ and input stream σ to be checked against the policy.
The RV monitor performs reachability analysis on the timed
automata to check the satisfiability of the input σ w.r.t the
policy φ.
The RV monitor reads an input finite timed word σ (se-
quence of events along with time) defined over the alphabet
Σ (set of events). The RV monitor process the input word by
word. After each step of processing, the RV monitor may emit
one of the following outputs :
• true (T) (conclusive verdict)
• false (F) (conclusive verdict)
• currently true (CT), (inconclusive verdict)
• currently false (CF) (inconclusive verdict)
The monitor Mφ emits verdict true (T), if after reading
timed word σ, it is in an accepting location and for any
extension of σ it would be still in the accepting location of
the TA (i.e. for any continuation of σ satisfies φ). Similarly,
after reading the current input, if the TA moves to a violating
location and for any continuation of the current input it would
be still in a violating location then the monitor Mφ returns
verdict false (σ violates φ).
The Monitor Mφ outputs verdict CT (currently true) if the
policy φ is satisfied by the current observation σ, and all
extensions of σ may not satisfy φ. Similarly, if the input σ
violates φ but there exist an extension of σ to satisfy φ, the
monitor will return a verdict CF (currently false).
TABLE I: RV monitor’s behaviour for policy PEX Fig. 6
σ Mφ(σ)
(e1, 2) CT
(e1, 2) · (e2, 10) CT
(e1, 2) · (e2, 10) · (e1, 19) CT
(e1, 2) · (e2, 10) · (e1, 19) · (e2, 30) F
Example 1 (Illustrating the behavior of runtime verification
(RV) monitor):
Consider an example timed word σ = (e1, 2) · (e2, 10) ·
(e1, 19)·(e2, 30) as input to the RV monitor. We illustrate the
sequential behaviour of the RV monitor for the input σ. It is
presented in Table I.
The first input σ = (e1, 2) is observed at t=2, since σ does
not violate the policy, the RV monitor emits verdict as CT in
first step.
At t = 9, the input event is (e2, 10) and σ = (e1, 2)·(e2, 10).
Since event e2 occurs after a delay of 8 unit of time, it does
not violate the policy and the RV monitor emits CT as verdict.
In the third step, the event (e1, 19) is observed at t=19 and
σ = (e1, 2) · (e2, 10) · (e1, 19). The RV monitor verdicts CT
as there is no violation of policy.
When the RV monitor observes the next input (e1, 30) at
t=30, the input σ = (e1, 2)·(e2, 10)·(e1, 19)·(e2, 30) violates
the policy as event e2 occurs after a delay of 11 unit of time.
For any extension of the current input time word (σ) will
violate the policy, so the RV monitor will emit conclusive
verdict F (false).
V. MONITORING SAFETY POLICIES USING ECG SENSING
As shown in Fig. 1, we design a runtime monitor for each
mined ECG policies φECG1, · · · , φECG5 presented in Section
III. Each RV monitor reads a person’s ECG and monitors
diabetes. The monitor detects the relevant ECG events and
emits verdicts on whether diabetes is present or not. The
verdicts of all the monitors are composed to compute the final
verdict.
The ECG policies are formalized as timed automata. The
timed automata shown in Fig. 7 model the sub-policies
PECG11, · · · , PECG13 of the ECG policy φECG1. The set
of events is represented by Σ = {P, Q, R, Te}. Since
the ECG policy φECG1 is the intersection of sub-policies
PECG11, · · · , PECG13, we compute the product of all TAs
presenting the sub-policies shown in Fig. 7 to represent the
TA for φECG1. A similar approach was followed for other
ECG policies.
As discussed, we adapt the technique of synthesizing an
RV monitor from timed policies formalized as timed automata
following the approaches mentioned in [11], [13], [25]. For
monitoring of diabetes, we monitor all the ECG policies
φECG1, · · · , φECG5. We synthesize the runtime monitors
MφECG1, · · · MφECG5 corresponding to the ECG policies.
The RV monitors read the ECG events, verify the specified
policy, and provide a verdict at each step. The behavior of the
RV monitor MφECG1 for policy φECG1 is illustrated in the
following example for a sample ECG trace (similar behavior
is shown by other RV monitors). At each step, the verdicts
of all the monitors are composed using union to compute the
final verdict. Whenever any policy is violated the monitor will
raise the alarm to the user, indicating that the ECG trace is
showing diabetes signs.
Example 2: (Illustrations of runtime verification (RV) mon-
itor’s (MφECG1) sequential behaviour for policy φECG1 =
PECG11 ∧ PECG12 ∧ PECG13)
Let us consider the policy φECG1 : If RR > 619 ms and
PR > 127 ms and QT > 361 ms and RT <= 416 ms, then it
is diabetes. As discussed, to monitor this policy, we monitor
sub-policies PECG11: The RR interval of ECG should be less
than or equal to 619 ms, and PECG12: The PR interval of
ECG should be less than or equal to 127 ms and PECG13:
l0 l1 l2
Σ  R
R, x := 0
ΣR
R,
x > 619
R, x ≤ 619
Σ
(a) Timed automata representing policy PECG11
l0 l1 l2
Σ  P
P, x := 0
ΣR
R,
x > 127
R, x ≤ 127
Σ
(b) Timed automata representing policy PECG12
l0 l1 l2
Σ  Q
Q, x := 0
ΣTe
T e,
x > 361
T e, x ≤ 361
Σ
(c) Timed automata representing policy PECG13
Fig. 7: Timed automata representing ECG policies PECG11,
PECG12 and PECG13
The QT interval of ECG should be less than or equal to 361
ms. The RV monitor is input with the policy φECG1 and an
ECG trace (σ), against which the policy is verified.
Consider an example of an ECG event trace: (P, 30) ·
(Q, 150) · (R, 155) · (Te, 500) · (R, 800). Each event is associ-
ated with a time of occurrence, and the RV monitor reads the
events sequentially as they arrive. While feeding the trace to
the RV monitor, the time associated with an event would be the
delay in regard to the previous event or system initialization.
Table II presents the behaviour of the RV monitor step-wise.
At t = 30, the monitor reads the first event P, and it emits
CT, indicating that the policy has not been violated. For the
event Q at t = 150, the monitor emits CT (no policy violation
as the PR interval is within 127 ms). At t = 155, the monitor
receives event R, and since the policy is not violated, the RV
monitor will emit CT. For the event, Te at t = 500, the verdict
of the monitor is CT as the QT interval satisfies the policy.
When the event R is observed at t = 800, the policy leads to a
violation because the RR interval should be less than or equal
619 ms. As a result, the monitor will report the verdict CF,
indicating that the presently observed trace violates policy.
TABLE II: RV monitor’s behaviour for the policy φECG1
σ MφECG1(σ)
(P, 30) CT
(P, 30) · (Q, 150) CT
(P, 30) · (Q, 150) · (R, 155) CT
(P, 30) · (Q, 150) · (R, 155) · (Te, 500) CT
(P, 30) · (Q, 150) · (R, 155) · (Te, 500) · (R, 800) CF
Remark 1: Here we show how an ECG policy is formalized
as timed automata. It shows that once the TA reaches the
violating location (location with red color), it remains in that
location. But for continuous real-time monitoring, whenever
the TA transits to the violating location on an input, the
monitor will reset after raising an alarm to the user.
VI. IMPLEMENTATION AND RESULTS
To illustrate the proposed approach, we develop a pro-
totype that demonstrates how required ECG events are ex-
tracted, inputting new events to the RV monitor, and identi-
fying violations of the policies. As shown in Figure 1, the
prototype includes the ECG_Processing module and the
RV_Monitor module.
The ECG_Processing module is responsible for process-
ing ECG signals and extract required ECG features (discussed
in Section II). The module is developed in python. The
ECG_Processing module reads the ECGs in the DICAR-
DIA dataset [21] and detects required ECG events (P-onset,
Q-peak, R-peak, T-peak, and T-end, etc.). These timed events
are input to the RV_Monitor module. The RV_Monitor
module is developed in Python 2.7. The framework uses
UPPAAL DBM libraries [26] to parse the timed automata. The
RV_Monitor takes timed automata defining the policy and
the ECG trace (input ECG event stream) as input. The monitor
checks if the input ECG trace satisfies the policy (i.e., the
conjunction of all the sub-policies). Finally, we evaluate the
union of the verdicts of all the RV monitors to compute the
final verdict. A sample execution of an ECG trace on an RV
monitor is shown in Fig. 8.
Fig. 8: Execution of an ECG trace on RV monitor
Performance analysis: The proposed RV monitor is evalu-
ated by the following performance metrics: accuracy (Acc.),
sensitivity (Se), specificity (Sp). The performance metrics are
calculated as follows:
Accuracy(%) =
TP + TN
TP + TN + FP + FN
× 100
Sensitivity(%) =
TP
TP + FN
× 100
Specificity(%) =
TN
TN + FP
× 100
where TP stands for true positive, TN is for true negative,
FP is for false positive, and FN is for false negative. Accuracy
of the RV framework is defined as the ability to distinguish
between healthy and diabetes cases. The sensitivity of the RV
framework denotes the percentage of successfully recognized
diabetes samples of the total samples. Similarly, specificity
represents the proportion of healthy instances identified by the
RV framework out of total cases.
The RV framework’s accuracy, sensitivity, and specificity
are found to be 88.07%, 89.36%, and 86.36%, respectively.
A formal comparison of our framework with other machine
learning models is presented in Table III and it is evident that
the RV framework’s performance is comparable to that of other
proposed models.
Remark 2: We recorded a few ECG samples of healthy
individuals in our lab. We analyzed the ECG policies φECG1,
· · · , φECG5 presented in Section III against ECG traces of
two ECG records. We observed that the monitoring accuracy is
not good considering all the ECG policies. Still, by evaluating
individual policies, the ECG policy φECG1 is most effective
for monitoring providing accuracy of 98.49% and 100% for
the two ECG records.
TABLE III: Comparison with other works
Authors Methods Accuracy
Acharya et al. [27] Nonlinear 86.0
Jian et al. [28] Higher order spectrum 79.93
Acharya et al. [29] Discrete wavelet transform 92.02
Pachori et al. [7] Empirical mode decomposition 95.63
Swapna et al. [5] Deep learning (CNN-LSTM) 95.1
Our RV framework Policy based 88.07
VII. CONCLUSION AND FUTURE WORK
Diabetes mellitus is a global health threat. In this work,
we propose a formal framework for diabetes monitoring using
ECG for the first time. We mine ECG policies using a data
mining model from the ECG features. The RV monitor syn-
thesized from ECG policies senses ECG events and provides a
verdict. The accuracy of the proposed monitor is comparable
to other proposed models.
Future work: We would like to add more ECG policies to
the framework to improve diabetes prediction accuracy. The
proposed diabetes monitoring system may be tested with a
large dataset. The approach can be extended to implement an
online monitoring system. We are yet to implement the RV
monitor on a wearable device.
REFERENCES
[1] A. D. Association, “Diagnosis and classification of diabetes mellitus,”
Diabetes care, vol. 37, no. Supplement_1, pp. S81–S90, 2014.
[2] P. Saeedi, I. Petersohn, P. Salpea, B. Malanda, S. Karuranga, N. Unwin,
S. Colagiuri, L. Guariguata, A. A. Motala, K. Ogurtsova et al., “Global
and regional diabetes prevalence estimates for 2019 and projections
for 2030 and 2045: Results from the international diabetes federation
diabetes atlas,” Diabetes research and clinical practice, vol. 157, p.
107843, 2019.
[3] M. J. Davies, D. A. D’Alessio, J. Fradkin, W. N. Kernan, C. Mathieu,
G. Mingrone, P. Rossing, A. Tsapas, D. J. Wexler, and J. B. Buse,
“Management of hyperglycemia in type 2 diabetes, 2018. a consensus
report by the american diabetes association (ada) and the european
association for the study of diabetes (easd),” Diabetes care, vol. 41,
no. 12, pp. 2669–2701, 2018.
[4] J. Beagley, L. Guariguata, C. Weil, and A. A. Motala, “Global estimates
of undiagnosed diabetes in adults,” Diabetes research and clinical
practice, vol. 103, no. 2, pp. 150–160, 2014.
[5] G. Swapna, S. Kp, and R. Vinayakumar, “Automated detection of dia-
betes using cnn and cnn-lstm network and heart rate signals,” Procedia
computer science, vol. 132, pp. 1253–1262, 2018.
[6] G. Swapna, R. Vinayakumar, and K. Soman, “Diabetes detection using
deep learning algorithms,” ICT express, vol. 4, no. 4, pp. 243–246, 2018.
[7] R. B. Pachori, M. Kumar, P. Avinash, K. Shashank, and U. R. Acharya,
“An improved online paradigm for screening of diabetic patients using
rr-interval signals,” Journal of Mechanics in Medicine and Biology,
vol. 16, no. 01, p. 1640003, 2016.
[8] T. Gehr, M. Mirman, D. Drachsler-Cohen, P. Tsankov, S. Chaudhuri, and
M. Vechev, “Ai2: Safety and robustness certification of neural networks
with abstract interpretation,” in 2018 IEEE Symposium on Security and
Privacy (SP), 2018, pp. 3–18.
[9] R. Ivanov, T. J. Carpenter, J. Weimer, R. Alur, G. J. Pappas, and I. Lee,
“Verifying the safety of autonomous systems with neural network
controllers,” ACM Trans. Embed. Comput. Syst., vol. 20, no. 1, pp.
7:1–7:26, 2021. [Online]. Available: https://doi.org/10.1145/3419742
[10] G. Katz, C. W. Barrett, D. L. Dill, K. Julian, and M. J. Kochenderfer,
“Reluplex: An efficient SMT solver for verifying deep neural networks,”
in CAV, ser. Lecture Notes in Computer Science, R. Majumdar and
V. Kuncak, Eds., vol. 10426. Springer, 2017, pp. 97–117.
[11] A. Bauer, M. Leucker, and C. Schallhart, “Runtime verification for LTL
and TLTL,” ACM Trans. Softw. Eng. Methodol., vol. 20, no. 4, pp. 14:1–
14:64, Sep. 2011.
[12] Y. Falcone, J.-C. Fernandez, and L. Mounier, “Runtime verification of
safety-progress properties,” in RV 2009. Springer, 2009, pp. 40–59.
[13] S. Pinisetty, T. Jéron, S. Tripakis, Y. Falcone, H. Marchand, and
V. Preoteasa, “Predictive runtime verification of timed properties,”
Journal of Systems and Software, vol. 132, pp. 353–365, 2017.
[14] D. Basin, F. Klaedtke, and E. Zălinescu, “Algorithms for monitoring
real-time properties,” Acta informatica, vol. 55, no. 4, pp. 309–338,
2018.
[15] M. Bayeva, K. T. Sawicki, and H. Ardehali, “Taking diabetes to
heart—deregulation of myocardial lipid metabolism in diabetic car-
diomyopathy,” Journal of the American Heart Association, vol. 2, no. 6,
p. e000433, 2013.
[16] T. F. Christensen, L. Tarnow, J. Randløv, L. Kristensen, J. Struijk, E. El-
drup, and O. K. Hejlesen, “Qt interval prolongation during spontaneous
episodes of hypoglycaemia in type 1 diabetes: the impact of heart rate
correction,” Diabetologia, vol. 53, no. 9, pp. 2036–2041, 2010.
[17] C. Alexakis, H. Nyongesa, R. Saatchi, N. Harris, C. Davies, C. Emery,
R. Ireland, and S. Heller, “Feature extraction and classification of
electrocardiogram (ecg) signals related to hypoglycaemia,” in Computers
in Cardiology, 2003. IEEE, 2003, pp. 537–540.
[18] C. Alexakis, M. Rodrigues, R. Saatchi, H. Nyongesa, C. Davies, R. Ire-
land, N. Harris, and S. Heller, “A knowledge-based electrocardiogram-
monitoring system for detection of the onset of nocturnal hypoglycaemia
in type 1 diabetic patients,” in 2006 Computers in Cardiology. IEEE,
2006, pp. 5–8.
[19] S. L. Nuryani and H. T. Nguyen, “Electrocardiographic t-wave peak-to-
end interval for hypoglycaemia detection,” in EMBC. IEEE, 2010, pp.
618–621.
[20] R. Marfella, F. Nappo, L. De Angelis, M. Siniscalchi, F. Rossi, and
D. Giugliano, “The effect of acute hyperglycaemia on qtc duration in
healthy man,” Diabetologia, vol. 43, no. 5, pp. 571–575, 2000.
[21] C. A. Ledezma, E. Severeyn, G. Perpinan, M. Altuve, and S. Wong, “A
new on-line electrocardiographic records database and computer routines
for data analysis,” in EMBC. IEEE, 2014, pp. 2738–2741.
[22] D. Makowski, T. Pham, Z. J. Lau, J. C. Brammer, F. Lespinasse,
H. Pham, C. Schölzel, and S. A. Chen, “Neurokit2: A python toolbox
for neurophysiological signal processing,” Behavior Research Methods,
pp. 1–8, 2021.
[23] J. Pan and W. J. Tompkins, “A real-time qrs detection algorithm,” IEEE
transactions on biomedical engineering, no. 3, pp. 230–236, 1985.
[24] J. R. Quinlan, “Generating production rules from decision trees.” in ijcai,
vol. 87. Citeseer, 1987, pp. 304–307.
[25] S. Pinisetty, P. S. Roop, V. Sawant, and G. Schneider, “Security of
pacemakers using runtime verification,” in MEMOCODE. IEEE, 2018,
pp. 1–11.
[26] UPPAAL DBM Library, “The library used to manipulate dbms in
uppaal,” 2020, http://people.cs.aau.dk/ adavid/UDBM/, Last accessed on
2020-06-18.
[27] U. R. Acharya, O. Faust, S. V. Sree, D. N. Ghista, S. Dua, P. Joseph, V. T.
Ahamed, N. Janarthanan, and T. Tamura, “An integrated diabetic index
using heart rate variability signal features for diagnosis of diabetes,”
Computer methods in biomechanics and biomedical engineering, vol. 16,
no. 2, pp. 222–234, 2013.
[28] L. W. Jian and T.-C. Lim, “Automated detection of diabetes by means of
higher order spectral features obtained from heart rate signals,” Journal
of medical imaging and health informatics, vol. 3, no. 3, pp. 440–447,
2013.
[29] U. R. Acharya, K. S. Vidya, D. N. Ghista, W. J. E. Lim, F. Molinari,
and M. Sankaranarayanan, “Computer-aided diagnosis of diabetic sub-
jects by heart rate variability signals using discrete wavelet transform
method,” Knowledge-based systems, vol. 81, pp. 56–64, 2015.

More Related Content

Similar to mainIEEE.pdf

Transforming Healthcare with Online Health Monitoring Systems
Transforming Healthcare with Online Health Monitoring SystemsTransforming Healthcare with Online Health Monitoring Systems
Transforming Healthcare with Online Health Monitoring SystemsIRJET Journal
 
Health Monitoring System in Emergency Using IoT
Health Monitoring System in Emergency Using IoTHealth Monitoring System in Emergency Using IoT
Health Monitoring System in Emergency Using IoTIRJET Journal
 
A general framework for improving electrocardiography monitoring system with ...
A general framework for improving electrocardiography monitoring system with ...A general framework for improving electrocardiography monitoring system with ...
A general framework for improving electrocardiography monitoring system with ...journalBEEI
 
Iisrt zz srinivas ravi
Iisrt zz srinivas raviIisrt zz srinivas ravi
Iisrt zz srinivas raviIISRT
 
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMS
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMSHYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMS
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMSijcisjournal
 
Zigbee based wearable remote healthcare monitoring system for elderly patients
Zigbee based wearable remote healthcare monitoring system for elderly patientsZigbee based wearable remote healthcare monitoring system for elderly patients
Zigbee based wearable remote healthcare monitoring system for elderly patientsijwmn
 
the-role-of-remote-patient-monitoring.pdf
the-role-of-remote-patient-monitoring.pdfthe-role-of-remote-patient-monitoring.pdf
the-role-of-remote-patient-monitoring.pdfriyak40
 
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...IJECEIAES
 
Automated health alerts using in home sensor data for embedded health assessment
Automated health alerts using in home sensor data for embedded health assessmentAutomated health alerts using in home sensor data for embedded health assessment
Automated health alerts using in home sensor data for embedded health assessmentredpel dot com
 
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...Cemal Ardil
 
Intelligent Healthcare Monitoring in IoT
Intelligent Healthcare Monitoring in IoTIntelligent Healthcare Monitoring in IoT
Intelligent Healthcare Monitoring in IoTIJAEMSJORNAL
 
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMS
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMSmHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMS
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMSIAEME Publication
 
Diabetes Prediction Using ML
Diabetes Prediction Using MLDiabetes Prediction Using ML
Diabetes Prediction Using MLIRJET Journal
 

Similar to mainIEEE.pdf (20)

Transforming Healthcare with Online Health Monitoring Systems
Transforming Healthcare with Online Health Monitoring SystemsTransforming Healthcare with Online Health Monitoring Systems
Transforming Healthcare with Online Health Monitoring Systems
 
Multi-Parameter Measurement of ICU Patient Using GSM and Embedded Technology
Multi-Parameter Measurement of ICU Patient Using GSM and Embedded TechnologyMulti-Parameter Measurement of ICU Patient Using GSM and Embedded Technology
Multi-Parameter Measurement of ICU Patient Using GSM and Embedded Technology
 
main.pdf
main.pdfmain.pdf
main.pdf
 
zinullah presentation.pdf
zinullah presentation.pdfzinullah presentation.pdf
zinullah presentation.pdf
 
Health Monitoring System in Emergency Using IoT
Health Monitoring System in Emergency Using IoTHealth Monitoring System in Emergency Using IoT
Health Monitoring System in Emergency Using IoT
 
A general framework for improving electrocardiography monitoring system with ...
A general framework for improving electrocardiography monitoring system with ...A general framework for improving electrocardiography monitoring system with ...
A general framework for improving electrocardiography monitoring system with ...
 
Iisrt zz srinivas ravi
Iisrt zz srinivas raviIisrt zz srinivas ravi
Iisrt zz srinivas ravi
 
Health Monitoring
Health MonitoringHealth Monitoring
Health Monitoring
 
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMS
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMSHYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMS
HYBRID MORTALITY PREDICTION USING MULTIPLE SOURCE SYSTEMS
 
Esc 2015
Esc 2015 Esc 2015
Esc 2015
 
Grp2
Grp2 Grp2
Grp2
 
Zigbee based wearable remote healthcare monitoring system for elderly patients
Zigbee based wearable remote healthcare monitoring system for elderly patientsZigbee based wearable remote healthcare monitoring system for elderly patients
Zigbee based wearable remote healthcare monitoring system for elderly patients
 
the-role-of-remote-patient-monitoring.pdf
the-role-of-remote-patient-monitoring.pdfthe-role-of-remote-patient-monitoring.pdf
the-role-of-remote-patient-monitoring.pdf
 
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...
Real-time Heart Pulse Monitoring Technique Using Wireless Sensor Network and ...
 
Automated health alerts using in home sensor data for embedded health assessment
Automated health alerts using in home sensor data for embedded health assessmentAutomated health alerts using in home sensor data for embedded health assessment
Automated health alerts using in home sensor data for embedded health assessment
 
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...
A neural-network-approach-in-predicting-the-blood-glucose-level-for-diabetic-...
 
CBMS_Presentation (5).pdf
CBMS_Presentation (5).pdfCBMS_Presentation (5).pdf
CBMS_Presentation (5).pdf
 
Intelligent Healthcare Monitoring in IoT
Intelligent Healthcare Monitoring in IoTIntelligent Healthcare Monitoring in IoT
Intelligent Healthcare Monitoring in IoT
 
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMS
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMSmHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMS
mHEALTH: REVIEW OF MOBILE HEALTH MONITORING SYSTEMS
 
Diabetes Prediction Using ML
Diabetes Prediction Using MLDiabetes Prediction Using ML
Diabetes Prediction Using ML
 

Recently uploaded

Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdfVinayVadlagattu
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxMustafa Ahmed
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...IJECEIAES
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentationsj9399037128
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsVIEW
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelDrAjayKumarYadav4
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalSwarnaSLcse
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxProfASKolap
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisDr.Costas Sachpazis
 
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样A
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...mikehavy0
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfJNTUA
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdfAlexander Litvinenko
 

Recently uploaded (20)

Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Databricks Generative AI Fundamentals .pdf
Databricks Generative AI Fundamentals  .pdfDatabricks Generative AI Fundamentals  .pdf
Databricks Generative AI Fundamentals .pdf
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...Fuzzy logic method-based stress detector with blood pressure and body tempera...
Fuzzy logic method-based stress detector with blood pressure and body tempera...
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Introduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptxIntroduction-to- Metrology and Quality.pptx
Introduction-to- Metrology and Quality.pptx
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
一比一原版(NEU毕业证书)东北大学毕业证成绩单原件一模一样
 
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
☎️Looking for Abortion Pills? Contact +27791653574.. 💊💊Available in Gaborone ...
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 

mainIEEE.pdf

  • 1. Policy-Based Diabetes Detection using Formal Runtime Verification Monitors 1st Abhinandan Panda School of Electrical Sciences IIT Bhubaneswar Bhubaneswar, India Email: ap53@iitbbs.ac.in 2nd Srinivas Pinisetty School of Electrical Sciences IIT Bhubaneswar Bhubaneswar, India Email: spinisetty@iitbbs.ac.in 3rd Partha Roop Dept. of Electr. & Comput. Eng. University of Auckland Auckland, New Zealand Email: p.roop@aucklanduni.ac.nz Abstract—Diabetes is a global health threat, and its prevalence is rising at an alarming rate. Diabetes is the cause of severe complications in vital organs of the body. So, diabetes must be detected early for timely treatment and to prevent the condition from escalating to severe consequences. Many AI and machine learning approaches have been proposed for the non-invasive continuous monitoring of diabetes. However, using such informal methods in healthcare monitoring raises concerns about reliability. Furthermore, deploying an AI-based solution to continuously monitor a person’s health state on resource- constrained embedded devices is a concern. We overcome these shortcomings in this work by proposing a formal runtime monitoring system for the first time for diabetes detection using Electrocardiogram (ECG) sensing. We implement a data mining model from the ECG features to infer ECG policies and thereby synthesize a formal verification monitor based on the policies. Using a diabetes dataset, we evaluate the verification monitor’s performance compared to other proposed models. Index Terms—Formal methods, Policy mining, Runtime mon- itoring, Diabetes, ECG. I. INTRODUCTION It is a well-known fact that diabetes is a global health issue. In diabetes, the body’s ability to process blood glucose is reduced. The deficiency of insulin in the body leads to Type 1 diabetes, whereas Type 2 diabetes arises because of the body’s inability to use the insulin produced. Both types of diabetes pose life-threatening risks as they lead to severe complications in the heart, kidney, nerves, and many more [1]. It is reported by International Diabetes Federation that around 9.3% of people are affected by diabetes globally [2]. Considering the health threats posed by diabetes, a continuous diabetes monitoring technique should be adopted [3]. The diabetes detection process appears to be burdensome in the early stage since a patient must frequently visit a physician. It’s also the case that most patients see a physician after they develop diabetes. Furthermore, many patients with diabetes mellitus go undiagnosed worldwide. According to Beagley et al. [4], around 45.8% of diabetes cases with cardiac complications are untreated. In this regard, several techniques have been proposed in the literature for the non-invasive monitoring of diabetes. With the advancements in wearable biosensors, physiological signal such as ECG has been investigated widely in monitoring diabetes. The works in [5]–[7] use machine learning and deep learning techniques to detect diabetes from the heart rate variability data of ECG. This work has been partially supported by The Ministry of Human Resource Development, Government of India (SPARC P#701), IIT Bhubaneswar Seed Grant (SP093). However, concerns arise about the reliability of these in- formal models when deployed in health monitoring. In re- cent times, formally verifying machine learning and neural network models are being studied [8]–[10]. Static verification approaches find it challenging to formally specify such models, while scalability is a concern. Another challenge is to deploy such models on resource constraints wearable systems. As a result, the objective is to develop a lightweight monitoring framework that is formally correct by construction for moni- toring health vital sign policies. Formal method-based techniques have been widely used as a reliable approach for verifying a system’s safety-critical policies both statically and dynamically. Based on formal methods, runtime verification (RV) [11]–[14] is a dynamic monitoring approach. It checks if a system (under observation) satisfies a given policy (φ) during execution. In this approach, a RV monitor is synthesized from the given formal speci- fications. The RV monitor is formally proved to be correct by construction. The monitor can be employed to verify the system’s stored execution or live execution against the policy. In diabetes, several cardiac abnormalities such as reac- tive hypertrophy, fibrosis, and coronary vessel changes are commonly observed. Diabetic cardiomyopathy [15] is the abnormal behaviour of the cardiac in diabetes even in the absence of major cardiac risk factors such as artery disease, hypertension, etc. It is linked with several irregularities in the metabolism of the body. At an early stage, the diabetic cardiomyopathy goes undiagnosed. Over the years, ECG has proven to be a reliable tool for screening cardiovascular health and should be analyzed for the early detection of diabetes. To overcome the above limitations, we propose a formal framework based on formal runtime verification (RV) for diabetes monitoring for the first time. The RV monitor is devel- oped from the ECG policies. The monitor senses the necessary ECG events of a person and evaluates whether diabetes is present. The synthesis and formalization of policies are one of the most challenging aspects of using RV monitoring systems. In this regard, we implement a data mining model using the features of ECG for inferring the safety policies. The policies are then formally specified for synthesizing a RV monitor. The monitor continuously verifies the ECG policies defined for diabetes monitoring using ECG sensing and provides a verdict. A. Overview of the proposed approach We present a runtime verification monitor, as shown in Fig. 1, that senses the ECG of a person and monitors diabetes.
  • 2. The RV monitor detects the required ECG events and, based on the specified policies; it emits a verdict on whether diabetes is present. Since we are interested in developing a policy-based RV framework for monitoring diabetes, we implement a data mining model, a decision tree, using ECG features to infer the ECG policies. We consider the ECG features set, i.e., the ECG intervals PR, RR, TpTe, QT, and RT of diabetic and healthy subjects (more details in Section II-A). These features, along with the class labels, are fed as input to the decision tree, and thereby we infer the ECG policies from the model. The framework for learning ECG policies is shown in Fig. 2. ECG events True / False (Diabetes detection) Inferred ECG Policies ECG signal ECG Sensor ECG Processing Module RV monitor Fig. 1: Proposed formal runtime monitoring framework for diabetes monitoring Raw ECG ECG intervals ECG Policy inference ECG Processing Module Data Mining Model ECG Dataset (Diabetic, Healthy) Class label (diabetes/healthy) Fig. 2: Framework for learning ECG policies w.r.t diabetes To synthesize a runtime monitor using inferred ECG poli- cies, we use the RV technique for Timed Automata (TA). The RV framework generates an executing monitor from ECG policies defined as a TA. The RV monitor senses the relevant events of ECG for monitoring the intended policies. a) Deployment of the proposed RV monitor: We assume that the RV monitor would be deployed on a wearable device enabled with adequate sensors such as an ECG sensor. The de- vice would have the required computational power to process an ECG signal. The RV monitor implemented on the external device would sense the required ECG events and monitor the specified policies. In the event of a violation of policy, the monitor will send an alarm to the user immediately. The key contributions of the paper are: • As per our knowledge, we propose a formal runtime monitoring framework for monitoring diabetes for the first time. • We present the ECG patterns that are strongly associated with diabetes. • We mine ECG policies w.r.t diabetes using a data mining model. The policies are formalized as timed automata (TA), suitable for synthesizing a RV monitor. • The proposed method allows us to build a wearable monitor for monitoring diabetes using ECG sensing. Section II discusses an overview of ECG, the ECG-diabetes correlation, the datasets, and features of ECG considered in this work. In Section III, we discuss the mining of ECG policies for diabetes monitoring. Section IV explains the basics of timed automata and RV monitors with examples. In Section V, we illustrate the behavior of RV monitors through an ex- ample for diabetes monitoring. The implementation, findings, and comparison are discussed in Section VI, and we draw conclusions in Section VII. II. OVERVIEW OF ECG, ECG-DIABETES CORRELATION AND FEATURE EXTRACTION In this section, we present the features of ECG, the correla- tions between ECG and diabetes, and discuss the ECG features considered for monitoring diabetes. A. A typical ECG An Electrocardiogram (ECG) represents the heart’s elec- trical activity, such as systole and diastole. An ECG signal is attributed to several timed features such as PR interval, QT interval, RT interval, RR interval, and TpTe interval. The PR interval is between the beginning of the P-wave and the beginning of the QRS-complex. The time duration between starting of the QRS-complex to the end of the T-wave is known as the QT interval. The RT interval is defined as the time between the R-peak of ECG to the end of the T-wave. The RR interval is the duration between two consecutive R-peaks of ECG. The time between the peak and end of the T-wave indicates the TpTe interval. Time Amplitude S R Q P Q R S QRS interval P PR interval P-wave interval QT interval RT interval TpTe interval Te RR interval Tp Tp Fig. 3: A typical ECG Signal B. Correlation of ECG and Diabetes The relationship between ECG and diabetes has been well studied. Hypoglycemia (low blood glucose level) causes pro- longation of QT interval [16]. In [17]–[19], authors studied RR interval, corrected RT interval and TpTe interval of ECG to detect hypoglycemia. According to [20], there is a significant change in the corrected QT dispersion and PR interval in hyperglycemia (low blood glucose level). C. ECG-Diabetic Dataset In this work, we study the ECG of both healthy and diabetes patients available in the DICARDIA database [21]. The ECGs of 51 diabetic participants with cardiac difficulties, aged 47- 67 years, three diabetic subjects without cardiac complications, aged 37-61 years, and 11 healthy subjects, aged 44-56 years, are included in the dataset. The duration of each ECG record is 10 seconds. D. Feature Extraction We consider the following ECG features of both healthy and diabetic patients. • PR interval • RR interval • QT interval • RT interval • TpTe interval The timed features mentioned above are extracted from each cycle of ECG in the DICARDIA dataset.
  • 3. The ECG_Processing module implemented in Python reads and processes ECG data. An ECG signal may be influ- enced with noises such as baseline wander, powerline interfer- ence, and motion artefacts. As a result, signal pre-processing is required to filter undesirable data and retrieve essential information from the signals. The cleaning and processing of the ECG signal are performed using the Neurokit2 tool [22] in python. We apply a high pass Butterworth filter and a low pass filter to remove baseline drift and high-frequency noise from the ECG signal. The R-peaks in ECG are extracted using the Pan-Tompkins algorithm [23]. We implemented discrete wavelet analysis available in the Neurokit2 tool to identify events, namely P-onset, Q-peak, T-peak, and T-end of ECG, along with their time of occurrences. Once the peaks are detected, we compute the intervals mentioned above for each ECG cycle. A processed ECG signal marked with events is shown in Fig. 4. Fig. 4: A processed ECG Signal III. SAFETY POLICIES MINING Fig. 5: A decision tree of ECG features In order to develop a policy-based RV framework for monitoring diabetes using ECG sensing, we must mine the ECG policies from the ECG features since this is not intuitive. We implement a decision tree [24], a data mining model based on the ECG features, i.e., the ECG intervals PR, RR, TpTe, QT, and RT. Each feature set is associated with a class label, i.e., diabetic (D) or healthy (H). These features and the class labels are input to the decision tree model. The model is implemented in python using the scikit-learn module. Once the tree is built with the features, the ECG policies are inferred by traversing from the root to leaves of the tree (approach mentioned in [24]). The decision tree generated from the considered ECG features is shown in Fig. 5. We inferred the following ECG policies from the decision tree for diabetes monitoring. • φECG1: If RR > 619 ms and PR > 127 ms and QT > 361 ms, then it is diabetes. • φECG2: If RR > 619 ms and PR <= 127 ms, then it indicates diabetes. • φECG3: When RR > 528 ms and RR <= 619 ms and RT > 297.5 ms, diabetes is present. • φECG4: When RR > 619 ms and PR > 127 ms and PR <= 140 ms and QT <= 361 ms, it is diabetes. • φECG5: If RR > 401 ms and RR <= 408 ms and RT <= 297.5 ms, then it indicates diabetes. Each ECG policy is a combination of multiple sub-policies. For example, to monitor policy φECG1, we monitor the intersection of the following sub-policies. • PECG11: The RR interval of ECG should be less than or equal to 619 ms. • PECG12: The PR interval of ECG should be less than or equal to 127 ms. • PECG13: The QT interval of ECG should be less than or equal to 361 ms. We synthesize a RV monitor for each of the above ECG policies φECG1, φECG2, φECG3, φECG4 and φECG5. While monitoring the policy e.g. φECG1, when all the sub-policies PECG11, · · · PECG13 are violated, the runtime monitor will raise an alarm. IV. FORMALISING POLICIES USING TIMED AUTOMATA AND THE RUNTIME VERIFICATION MONITOR In this section, we discuss via examples timed automaton (TA) used to formalize timed policies of ECG, and the behaviour of the RV monitor for policies specified as TA. Formal Runtime Verification (RV) [11]–[13] techniques are used to monitor and verify whether an execution of a system conforms to or violates a particular policy (specification) (φ). In this method, the system is treated as a black box, and the approach does not influence the system’s execution. RV is considered a lightweight verification approach where RV monitors are synthesized automatically from a set of given formal specifications. The runtime monitor senses the input events (σ) from the monitored system and emits a verdict if the execution of the system satisfies the policy. This approach can be employed for online or offline verification. This work synthesizes RV monitors by adopting the run- time verification synthesis technique for timed automata. The intricacies of the formal definitions and monitoring algorithms are omitted here. We briefly discuss timed automata and the formalization of a policy using TA through examples. Similarly, the behavior of an RV monitor is illustrated via a policy defined as TA. A. Timed Automata (TA) l0 start l1 l2 Σ {e1 } e1 , x := 0 Σ {e2 } e2 , x ≤ 10, x := 0 e2 , x>10 Σ Fig. 6: Policy PEX represented by a timed automata
  • 4. Consider an example of timed policy PEX: Event e2 should occur within 10 time units after event e1. The policy PEX is represented by the timed automaton in Fig. 6. In the TA, l0, l1, l2 are known as locations. The set of locations is L = {l0, l1, l2}, where l0 is the initial location. l0 and l1 are accepting locations (locations marked as double circle with green colour. Similar pattern is followed in other automata.). l2 is a non-accepting location. The set of events is Σ = {e1 , e2 }. Clock x is used to measure the time elapsed between the events e1 and e2. Clocks associated with constraints are known as guards (in this case, x ≤ 5) and also clocks can be reset to 0 (x :=0). When the first event e1 occurs, there will be a transition from l0 to l1 and the clock x would be reset to 0. At the location l1, if the input event is e2 and the time elapsed between e1 and e2 is within 10 units (x ≤ 10), then the TA will remain in location l1 and the clock x value is set to 0 (clock resets), otherwise it goes to location l2. Whenever the TA reaches location l2 for an input, as it is a non-accepting location, the policy is violated. B. Runtime verification (RV) monitor Given a timed policy φ and a timed automaton (TA) Aφ representing the policy, we develop an RV monitor Mφ using the methodologies presented in [11], [13], [25]. The monitor- ing algorithm is input with the timed automaton defining the policy φ and input stream σ to be checked against the policy. The RV monitor performs reachability analysis on the timed automata to check the satisfiability of the input σ w.r.t the policy φ. The RV monitor reads an input finite timed word σ (se- quence of events along with time) defined over the alphabet Σ (set of events). The RV monitor process the input word by word. After each step of processing, the RV monitor may emit one of the following outputs : • true (T) (conclusive verdict) • false (F) (conclusive verdict) • currently true (CT), (inconclusive verdict) • currently false (CF) (inconclusive verdict) The monitor Mφ emits verdict true (T), if after reading timed word σ, it is in an accepting location and for any extension of σ it would be still in the accepting location of the TA (i.e. for any continuation of σ satisfies φ). Similarly, after reading the current input, if the TA moves to a violating location and for any continuation of the current input it would be still in a violating location then the monitor Mφ returns verdict false (σ violates φ). The Monitor Mφ outputs verdict CT (currently true) if the policy φ is satisfied by the current observation σ, and all extensions of σ may not satisfy φ. Similarly, if the input σ violates φ but there exist an extension of σ to satisfy φ, the monitor will return a verdict CF (currently false). TABLE I: RV monitor’s behaviour for policy PEX Fig. 6 σ Mφ(σ) (e1, 2) CT (e1, 2) · (e2, 10) CT (e1, 2) · (e2, 10) · (e1, 19) CT (e1, 2) · (e2, 10) · (e1, 19) · (e2, 30) F Example 1 (Illustrating the behavior of runtime verification (RV) monitor): Consider an example timed word σ = (e1, 2) · (e2, 10) · (e1, 19)·(e2, 30) as input to the RV monitor. We illustrate the sequential behaviour of the RV monitor for the input σ. It is presented in Table I. The first input σ = (e1, 2) is observed at t=2, since σ does not violate the policy, the RV monitor emits verdict as CT in first step. At t = 9, the input event is (e2, 10) and σ = (e1, 2)·(e2, 10). Since event e2 occurs after a delay of 8 unit of time, it does not violate the policy and the RV monitor emits CT as verdict. In the third step, the event (e1, 19) is observed at t=19 and σ = (e1, 2) · (e2, 10) · (e1, 19). The RV monitor verdicts CT as there is no violation of policy. When the RV monitor observes the next input (e1, 30) at t=30, the input σ = (e1, 2)·(e2, 10)·(e1, 19)·(e2, 30) violates the policy as event e2 occurs after a delay of 11 unit of time. For any extension of the current input time word (σ) will violate the policy, so the RV monitor will emit conclusive verdict F (false). V. MONITORING SAFETY POLICIES USING ECG SENSING As shown in Fig. 1, we design a runtime monitor for each mined ECG policies φECG1, · · · , φECG5 presented in Section III. Each RV monitor reads a person’s ECG and monitors diabetes. The monitor detects the relevant ECG events and emits verdicts on whether diabetes is present or not. The verdicts of all the monitors are composed to compute the final verdict. The ECG policies are formalized as timed automata. The timed automata shown in Fig. 7 model the sub-policies PECG11, · · · , PECG13 of the ECG policy φECG1. The set of events is represented by Σ = {P, Q, R, Te}. Since the ECG policy φECG1 is the intersection of sub-policies PECG11, · · · , PECG13, we compute the product of all TAs presenting the sub-policies shown in Fig. 7 to represent the TA for φECG1. A similar approach was followed for other ECG policies. As discussed, we adapt the technique of synthesizing an RV monitor from timed policies formalized as timed automata following the approaches mentioned in [11], [13], [25]. For monitoring of diabetes, we monitor all the ECG policies φECG1, · · · , φECG5. We synthesize the runtime monitors MφECG1, · · · MφECG5 corresponding to the ECG policies. The RV monitors read the ECG events, verify the specified policy, and provide a verdict at each step. The behavior of the RV monitor MφECG1 for policy φECG1 is illustrated in the following example for a sample ECG trace (similar behavior is shown by other RV monitors). At each step, the verdicts of all the monitors are composed using union to compute the final verdict. Whenever any policy is violated the monitor will raise the alarm to the user, indicating that the ECG trace is showing diabetes signs. Example 2: (Illustrations of runtime verification (RV) mon- itor’s (MφECG1) sequential behaviour for policy φECG1 = PECG11 ∧ PECG12 ∧ PECG13) Let us consider the policy φECG1 : If RR > 619 ms and PR > 127 ms and QT > 361 ms and RT <= 416 ms, then it is diabetes. As discussed, to monitor this policy, we monitor sub-policies PECG11: The RR interval of ECG should be less than or equal to 619 ms, and PECG12: The PR interval of ECG should be less than or equal to 127 ms and PECG13:
  • 5. l0 l1 l2 Σ R R, x := 0 ΣR R, x > 619 R, x ≤ 619 Σ (a) Timed automata representing policy PECG11 l0 l1 l2 Σ P P, x := 0 ΣR R, x > 127 R, x ≤ 127 Σ (b) Timed automata representing policy PECG12 l0 l1 l2 Σ Q Q, x := 0 ΣTe T e, x > 361 T e, x ≤ 361 Σ (c) Timed automata representing policy PECG13 Fig. 7: Timed automata representing ECG policies PECG11, PECG12 and PECG13 The QT interval of ECG should be less than or equal to 361 ms. The RV monitor is input with the policy φECG1 and an ECG trace (σ), against which the policy is verified. Consider an example of an ECG event trace: (P, 30) · (Q, 150) · (R, 155) · (Te, 500) · (R, 800). Each event is associ- ated with a time of occurrence, and the RV monitor reads the events sequentially as they arrive. While feeding the trace to the RV monitor, the time associated with an event would be the delay in regard to the previous event or system initialization. Table II presents the behaviour of the RV monitor step-wise. At t = 30, the monitor reads the first event P, and it emits CT, indicating that the policy has not been violated. For the event Q at t = 150, the monitor emits CT (no policy violation as the PR interval is within 127 ms). At t = 155, the monitor receives event R, and since the policy is not violated, the RV monitor will emit CT. For the event, Te at t = 500, the verdict of the monitor is CT as the QT interval satisfies the policy. When the event R is observed at t = 800, the policy leads to a violation because the RR interval should be less than or equal 619 ms. As a result, the monitor will report the verdict CF, indicating that the presently observed trace violates policy. TABLE II: RV monitor’s behaviour for the policy φECG1 σ MφECG1(σ) (P, 30) CT (P, 30) · (Q, 150) CT (P, 30) · (Q, 150) · (R, 155) CT (P, 30) · (Q, 150) · (R, 155) · (Te, 500) CT (P, 30) · (Q, 150) · (R, 155) · (Te, 500) · (R, 800) CF Remark 1: Here we show how an ECG policy is formalized as timed automata. It shows that once the TA reaches the violating location (location with red color), it remains in that location. But for continuous real-time monitoring, whenever the TA transits to the violating location on an input, the monitor will reset after raising an alarm to the user. VI. IMPLEMENTATION AND RESULTS To illustrate the proposed approach, we develop a pro- totype that demonstrates how required ECG events are ex- tracted, inputting new events to the RV monitor, and identi- fying violations of the policies. As shown in Figure 1, the prototype includes the ECG_Processing module and the RV_Monitor module. The ECG_Processing module is responsible for process- ing ECG signals and extract required ECG features (discussed in Section II). The module is developed in python. The ECG_Processing module reads the ECGs in the DICAR- DIA dataset [21] and detects required ECG events (P-onset, Q-peak, R-peak, T-peak, and T-end, etc.). These timed events are input to the RV_Monitor module. The RV_Monitor module is developed in Python 2.7. The framework uses UPPAAL DBM libraries [26] to parse the timed automata. The RV_Monitor takes timed automata defining the policy and the ECG trace (input ECG event stream) as input. The monitor checks if the input ECG trace satisfies the policy (i.e., the conjunction of all the sub-policies). Finally, we evaluate the union of the verdicts of all the RV monitors to compute the final verdict. A sample execution of an ECG trace on an RV monitor is shown in Fig. 8. Fig. 8: Execution of an ECG trace on RV monitor Performance analysis: The proposed RV monitor is evalu- ated by the following performance metrics: accuracy (Acc.), sensitivity (Se), specificity (Sp). The performance metrics are calculated as follows: Accuracy(%) = TP + TN TP + TN + FP + FN × 100 Sensitivity(%) = TP TP + FN × 100 Specificity(%) = TN TN + FP × 100 where TP stands for true positive, TN is for true negative, FP is for false positive, and FN is for false negative. Accuracy of the RV framework is defined as the ability to distinguish between healthy and diabetes cases. The sensitivity of the RV framework denotes the percentage of successfully recognized
  • 6. diabetes samples of the total samples. Similarly, specificity represents the proportion of healthy instances identified by the RV framework out of total cases. The RV framework’s accuracy, sensitivity, and specificity are found to be 88.07%, 89.36%, and 86.36%, respectively. A formal comparison of our framework with other machine learning models is presented in Table III and it is evident that the RV framework’s performance is comparable to that of other proposed models. Remark 2: We recorded a few ECG samples of healthy individuals in our lab. We analyzed the ECG policies φECG1, · · · , φECG5 presented in Section III against ECG traces of two ECG records. We observed that the monitoring accuracy is not good considering all the ECG policies. Still, by evaluating individual policies, the ECG policy φECG1 is most effective for monitoring providing accuracy of 98.49% and 100% for the two ECG records. TABLE III: Comparison with other works Authors Methods Accuracy Acharya et al. [27] Nonlinear 86.0 Jian et al. [28] Higher order spectrum 79.93 Acharya et al. [29] Discrete wavelet transform 92.02 Pachori et al. [7] Empirical mode decomposition 95.63 Swapna et al. [5] Deep learning (CNN-LSTM) 95.1 Our RV framework Policy based 88.07 VII. CONCLUSION AND FUTURE WORK Diabetes mellitus is a global health threat. In this work, we propose a formal framework for diabetes monitoring using ECG for the first time. We mine ECG policies using a data mining model from the ECG features. The RV monitor syn- thesized from ECG policies senses ECG events and provides a verdict. The accuracy of the proposed monitor is comparable to other proposed models. Future work: We would like to add more ECG policies to the framework to improve diabetes prediction accuracy. The proposed diabetes monitoring system may be tested with a large dataset. The approach can be extended to implement an online monitoring system. We are yet to implement the RV monitor on a wearable device. REFERENCES [1] A. D. Association, “Diagnosis and classification of diabetes mellitus,” Diabetes care, vol. 37, no. Supplement_1, pp. S81–S90, 2014. [2] P. Saeedi, I. Petersohn, P. Salpea, B. Malanda, S. Karuranga, N. Unwin, S. Colagiuri, L. Guariguata, A. A. Motala, K. Ogurtsova et al., “Global and regional diabetes prevalence estimates for 2019 and projections for 2030 and 2045: Results from the international diabetes federation diabetes atlas,” Diabetes research and clinical practice, vol. 157, p. 107843, 2019. [3] M. J. Davies, D. A. D’Alessio, J. Fradkin, W. N. Kernan, C. Mathieu, G. Mingrone, P. Rossing, A. Tsapas, D. J. Wexler, and J. B. Buse, “Management of hyperglycemia in type 2 diabetes, 2018. a consensus report by the american diabetes association (ada) and the european association for the study of diabetes (easd),” Diabetes care, vol. 41, no. 12, pp. 2669–2701, 2018. [4] J. Beagley, L. Guariguata, C. Weil, and A. A. Motala, “Global estimates of undiagnosed diabetes in adults,” Diabetes research and clinical practice, vol. 103, no. 2, pp. 150–160, 2014. [5] G. Swapna, S. Kp, and R. Vinayakumar, “Automated detection of dia- betes using cnn and cnn-lstm network and heart rate signals,” Procedia computer science, vol. 132, pp. 1253–1262, 2018. [6] G. Swapna, R. Vinayakumar, and K. Soman, “Diabetes detection using deep learning algorithms,” ICT express, vol. 4, no. 4, pp. 243–246, 2018. [7] R. B. Pachori, M. Kumar, P. Avinash, K. Shashank, and U. R. Acharya, “An improved online paradigm for screening of diabetic patients using rr-interval signals,” Journal of Mechanics in Medicine and Biology, vol. 16, no. 01, p. 1640003, 2016. [8] T. Gehr, M. Mirman, D. Drachsler-Cohen, P. Tsankov, S. Chaudhuri, and M. Vechev, “Ai2: Safety and robustness certification of neural networks with abstract interpretation,” in 2018 IEEE Symposium on Security and Privacy (SP), 2018, pp. 3–18. [9] R. Ivanov, T. J. Carpenter, J. Weimer, R. Alur, G. J. Pappas, and I. Lee, “Verifying the safety of autonomous systems with neural network controllers,” ACM Trans. Embed. Comput. Syst., vol. 20, no. 1, pp. 7:1–7:26, 2021. [Online]. Available: https://doi.org/10.1145/3419742 [10] G. Katz, C. W. Barrett, D. L. Dill, K. Julian, and M. J. Kochenderfer, “Reluplex: An efficient SMT solver for verifying deep neural networks,” in CAV, ser. Lecture Notes in Computer Science, R. Majumdar and V. Kuncak, Eds., vol. 10426. Springer, 2017, pp. 97–117. [11] A. Bauer, M. Leucker, and C. Schallhart, “Runtime verification for LTL and TLTL,” ACM Trans. Softw. Eng. Methodol., vol. 20, no. 4, pp. 14:1– 14:64, Sep. 2011. [12] Y. Falcone, J.-C. Fernandez, and L. Mounier, “Runtime verification of safety-progress properties,” in RV 2009. Springer, 2009, pp. 40–59. [13] S. Pinisetty, T. Jéron, S. Tripakis, Y. Falcone, H. Marchand, and V. Preoteasa, “Predictive runtime verification of timed properties,” Journal of Systems and Software, vol. 132, pp. 353–365, 2017. [14] D. Basin, F. Klaedtke, and E. Zălinescu, “Algorithms for monitoring real-time properties,” Acta informatica, vol. 55, no. 4, pp. 309–338, 2018. [15] M. Bayeva, K. T. Sawicki, and H. Ardehali, “Taking diabetes to heart—deregulation of myocardial lipid metabolism in diabetic car- diomyopathy,” Journal of the American Heart Association, vol. 2, no. 6, p. e000433, 2013. [16] T. F. Christensen, L. Tarnow, J. Randløv, L. Kristensen, J. Struijk, E. El- drup, and O. K. Hejlesen, “Qt interval prolongation during spontaneous episodes of hypoglycaemia in type 1 diabetes: the impact of heart rate correction,” Diabetologia, vol. 53, no. 9, pp. 2036–2041, 2010. [17] C. Alexakis, H. Nyongesa, R. Saatchi, N. Harris, C. Davies, C. Emery, R. Ireland, and S. Heller, “Feature extraction and classification of electrocardiogram (ecg) signals related to hypoglycaemia,” in Computers in Cardiology, 2003. IEEE, 2003, pp. 537–540. [18] C. Alexakis, M. Rodrigues, R. Saatchi, H. Nyongesa, C. Davies, R. Ire- land, N. Harris, and S. Heller, “A knowledge-based electrocardiogram- monitoring system for detection of the onset of nocturnal hypoglycaemia in type 1 diabetic patients,” in 2006 Computers in Cardiology. IEEE, 2006, pp. 5–8. [19] S. L. Nuryani and H. T. Nguyen, “Electrocardiographic t-wave peak-to- end interval for hypoglycaemia detection,” in EMBC. IEEE, 2010, pp. 618–621. [20] R. Marfella, F. Nappo, L. De Angelis, M. Siniscalchi, F. Rossi, and D. Giugliano, “The effect of acute hyperglycaemia on qtc duration in healthy man,” Diabetologia, vol. 43, no. 5, pp. 571–575, 2000. [21] C. A. Ledezma, E. Severeyn, G. Perpinan, M. Altuve, and S. Wong, “A new on-line electrocardiographic records database and computer routines for data analysis,” in EMBC. IEEE, 2014, pp. 2738–2741. [22] D. Makowski, T. Pham, Z. J. Lau, J. C. Brammer, F. Lespinasse, H. Pham, C. Schölzel, and S. A. Chen, “Neurokit2: A python toolbox for neurophysiological signal processing,” Behavior Research Methods, pp. 1–8, 2021. [23] J. Pan and W. J. Tompkins, “A real-time qrs detection algorithm,” IEEE transactions on biomedical engineering, no. 3, pp. 230–236, 1985. [24] J. R. Quinlan, “Generating production rules from decision trees.” in ijcai, vol. 87. Citeseer, 1987, pp. 304–307. [25] S. Pinisetty, P. S. Roop, V. Sawant, and G. Schneider, “Security of pacemakers using runtime verification,” in MEMOCODE. IEEE, 2018, pp. 1–11. [26] UPPAAL DBM Library, “The library used to manipulate dbms in uppaal,” 2020, http://people.cs.aau.dk/ adavid/UDBM/, Last accessed on 2020-06-18. [27] U. R. Acharya, O. Faust, S. V. Sree, D. N. Ghista, S. Dua, P. Joseph, V. T. Ahamed, N. Janarthanan, and T. Tamura, “An integrated diabetic index using heart rate variability signal features for diagnosis of diabetes,” Computer methods in biomechanics and biomedical engineering, vol. 16, no. 2, pp. 222–234, 2013. [28] L. W. Jian and T.-C. Lim, “Automated detection of diabetes by means of higher order spectral features obtained from heart rate signals,” Journal of medical imaging and health informatics, vol. 3, no. 3, pp. 440–447, 2013. [29] U. R. Acharya, K. S. Vidya, D. N. Ghista, W. J. E. Lim, F. Molinari, and M. Sankaranarayanan, “Computer-aided diagnosis of diabetic sub- jects by heart rate variability signals using discrete wavelet transform method,” Knowledge-based systems, vol. 81, pp. 56–64, 2015.