Table 2: ANN and SVM prediction time in microcontroller.
Algorithm Time (ms)
ANN 0.6
SVM 30
SVM and ANN can reach same accuracy; how-
ever prediction algorithm for SVM takes about 50
times more than ANN in the same microcontroller.
This is shown in Table 2. For this application ANN
is better because the execution time is less than SVM
with the same accuracy.
In this application, there is a time limit of two sec-
onds determined by the time windows used in the fea-
ture extraction stage. Table 2 show that VF/VT could
be detected in real time using both SVM and ANN.
The support vector machine was only imple-
mented in the microcontroller. The implementation of
SVM in an FPGA requires the realization of complex
mathematical operations for calculating the Gaussian
kernel. Its implementation in the FPGA using Sys-
tem Generation is difficult because the multiplications
consumes all the resources of DSP-slices which are
limited. It is necessary the used of a math processor
tha could be implemented in a FPGA.
The microcontroller’s advantages are the low
power consumption and the additional peripherals.
Furthermore, it allows easy programming of complex
mathematical operations because is programmed in C.
Currently, the authors are working on multiclass
classifier that will allow to differentiate between VT
and VF and to detect other types of arrhythmias, such
as premature atrial contractions, premature ventricu-
lar contractions, atrial fibrillation, atrial flutter, among
others. Therefore the develop of robust classifier in
real time is necessary. A mixed platform with a mi-
crocontroller and parallel co-processors implemented
on a FPGA has been developed to implement a real-
time pre-processing, feature extraction and classifica-
tion system.
5 CONCLUSIONS
In this work, two machine learning methods were im-
plemented in an embedded system: SVM and ANN.
Both methods can be used to detect VT/VF in real-
time with FWT scales energy as features and 2 sec-
onds windows analysis.
SVM and ANN are powerful tools for arrhythmias
classification and could be real-time implemented in
both, microcontroller and FPGA. ANN is faster than
SVM, for VT/VF detection is better use ANN because
it has lower execution time than SVM, nevertheless
SVM was implemented considering future work with
other types of arrhythmias, where a robust classifier
will be necessary.
REFERENCES
Alonso-Atienza, F., Rojo-
´
Alvarez, J. L., noz, A. R.-M.,
Vinagre, J. J., Garc
´
ıa-Alberola, A., and Camps-Valls,
G. (2012). Feature selection using support vector ma-
chines and bootstrap methods for ventricular fibril-
lation detection. Expert Systems with Applications,
39(2):1956 – 1967.
Balasundaram, K., Masse, S., Nair, K., Farid, T., Nan-
thakumar, K., and Umapathy, K. (2011). Wavelet-
based features for characterizing ventricular arrhyth-
mias in optimizing treatment options. In Engineer-
ing in Medicine and Biology Society,EMBC, 2011 An-
nual International Conference of the IEEE, pages 969
–972.
Benedetto, J. J. (1999). Sampling theory and wavelets. In
Signal Processing for Multimedia, pages 19–33.
Goldberger, A. L., Amaral, L. A. N., Glass, L., Hausdorff,
J. M., Ivanov, P. C., Mark, R. G., Mietus, J. E., Moody,
G. B., Peng, C.-K., and Stanley, H. E. (2000). Phys-
iobank, physiotoolkit, and physionet. Circulation,
101(23):e215–e220.
Oresko, J., Jin, Z., Cheng, J., Huang, S., Sun, Y., Duschl,
H., and Cheng, A. (2010). A wearable smartphone-
based platform for real-time cardiovascular disease
detection via electrocardiogram processing. Informa-
tion Technology in Biomedicine, IEEE Transactions
on, 14(3):734 –740.
S
´
aenz, J. F. and Bustamante, J. (2009). Algoritmo com-
putacional para la detecci
´
on de fibrilaci
´
on ventricular
basado en la t
´
ecnica de reconstrucci
´
on de espacio de
fases con tiempo de retardo variable. Revista de la
Federaci
´
on Argentina de Cardiolog
´
ıa, 38:60–65.
Singh, B. N. and Tiwari, A. K. (2006). Optimal selection of
wavelet basis function applied to ecg signal denoising.
Digital Signal Processing, 16(3):275 – 287.
Steinwart, I. and Christmann, A. (2008). Support vector
machines. Springer.
Valenza, G., Lanata, A., Ferro, M., and Scilingo, E. (2008).
Real-time discrimination of multiple cardiac arrhyth-
mias for wearable systems based on neural networks.
In Computers in Cardiology, 2008, pages 1053 –1056.
Xie, H.-B., Zhong-Mei, G., and Liu, H. (2011). Classifi-
cation of ventricular tachycardia and fibrillation using
fuzzy similarity-based approximate entropy. Expert
Systems with Applications, 38(4):3973 – 3981.
SupportVectorMachineandArtificialNeuralNetworkImplementationinEmbeddedSystemsforRealTimeArrhythmias
Detection
313