=Paper= {{Paper |id=Vol-3619/AISD_Paper_4 |storemode=property |title=FPGA-based Hardware Classifier for Diabetic Sensorimotor Polyneuropathy Severity Assessment |pdfUrl=https://ceur-ws.org/Vol-3619/AISD_Paper_4.pdf |volume=Vol-3619 |authors=Sandeep Kumar Pandey,Geetika Srivastava,Mamun Bin Ibne Reaz,Sawal Hamid Md Ali,Edi Kurniawan,Rabindra Gandhi Thangarajoo,Ganga Ram Mishra,Sacchidanand Shukla |dblpUrl=https://dblp.org/rec/conf/aisd/PandeySRAKTMS23 }} ==FPGA-based Hardware Classifier for Diabetic Sensorimotor Polyneuropathy Severity Assessment== https://ceur-ws.org/Vol-3619/AISD_Paper_4.pdf
                         FPGA-based Hardware Classifier for Diabetic
                         Sensorimotor Polyneuropathy Severity Assessment
                         Sandeep Kumar Pandey1, Geetika Srivastava1, Mamun Bin Ibne Reaz2, Sawal Hamid Md
                         Ali2, Edi Kurniawan3, Rabindra Gandhi Thangarajoo2, Ganga Ram Mishra1, SacchidaNand
                         Shukla1
                         1Dr. Rammanohar Lohia Avadh University, Ayodhya, India
                         2Universiti Kebangsaan Malaysia, Bangi, Selangor, Malaysia
                         3National Research and Innovation Agency (BRIN) of Indonesia, KST BJ Habibie, South Tangerang, Indonesia



                                         Abstract
                                         At present Diabetic Sensorimotor Polyneuropathy (DSPN) is a fast growing condition among diabetic
                                         patients, with potentially severe consequences such as permanent disability and leaving to death in
                                         some cases. However, there is hope on the horizon as early detection can prevent the amputation and
                                         deaths. Present study proposes an innovative solution for early detection of DSPN severity by the
                                         application of Machine Learning (ML) techniques over Electromyography (EMG) signals obtained from
                                         various lower limb muscles during gait. These signals provide valuable information about the nerve
                                         function and enable us to identify the presence of DSPN at an early stage. To bring this technology to
                                         life, a sophisticated neural network is further implemented on a hardware platform Xilinx ZCU102
                                         Field Programmable Gate Array (FPGA) device. The outcomes are promising, with the device accuracy
                                         rate of approximately 79% in detecting DSPN. This outcome may pave way for a brighter future in
                                         DSPN diagnosis. With continued advancements, this technology has the potential to transform the
                                         DSPN diagnosis process in near future, allowing for earlier intervention and better patient outcomes.

                                         Keywords
                                         DSPN, EMG, FPGA, ML 1


                         1. Introduction
                            Diabetes has emerged as a concerning and chronic disease, leading to permanent disabilities
                         and, unfortunately, even loss of life among patients. One of the disturbing actions of diabetes is
                         the rise of Diabetic Sensorimotor Polyneuropathy (DSPN) severity, a prevalent condition
                         affecting individuals worldwide [1]. DSPN serves as an early warning sign for diabetic foot
                         ulcers and non-healing wounds [2, 3]. Nearly, about half of diabetic patients suffer from DSPN,
                         and shockingly, half of them are unaware of the symptoms [4, 5]. Statistics reveal that 34% of
                         diabetic patients experience pain sensations, with type 2 diabetes patients exhibit a higher
                         incidence of painful neuropathic symptoms compared to type 1 diabetes patients. These painful
                         symptoms not only impact physical and psychological functioning but also contribute to anxiety
                         and depression.
                            The diagnostic methods for DSPN, such as Vibration Perception Threshold (VPT), Nerve
                         Conduction Studies (NCS), Neuropathy Disability Score (NDS), Michigan Neuropathy Screening
                         Instrument, Achilles tendon reflexes, pinprick and temperature sensation, are expensive,
                         require expertise, and, in some cases, cause discomfort [6]. While there have been notable
                         advancements in treating symptomatic pain with the use of drugs, therapeutic options targeting



                         AISD 2023: First International Workshop on Artificial Intelligence: Empowering Sustainable Development,
                         September 4-5, 2023, co-located with First International Conference on Artificial Intelligence: Towards Sustainable
                         Intelligence (AI4S-2023), Pune, India
                            sandeep.avadh@gmail.com (S. K. Pandey); geetika_gkp@rediffmail.com (G. Srivastava)
                            https://dblp.org/pid/158/4439.html (G. Srivastava)
                                    © 2023 Copyright for this paper by its authors.
                                    Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).
                                    CEUR Workshop Proceedings (CEUR-WS.org)



CEUR
                  ceur-ws.org
Workshop      ISSN 1613-0073
Proceedings
the underlying pathophysiology of DSPN remain limited. Early detection and prevention play
crucial roles in effectively managing DSPN [7].
   To address these challenges, authors proposed an approach: designing a DSPN severity
classifier using Machine Learning (ML) and its hardware implementation. Popularity of ML
techniques in biosignal processing making them ideal for DSPN diagnosis purpose [8]. Since
DSPN primarily affects lower limb muscles [9], therefore Electromyography (EMG) signals are
collected from various lower limb muscles during gait and processed using a ML algorithm. This
allows us to develop a DSPN severity classifier, which is then implemented in hardware using
the Xilinx ZCU102 FPGA board. Implemented hardware provided satisfactory accuracy during
testing. In our literature study we found that many studies reported approximately 99%
accuracy in software-based approaches, but as per research resources available no hardware
implemented algorithm has reported such high accuracy. Proposed work paves the way for the
development of a patient-friendly, portable device that can accurately classify patients as
normal or abnormal without the need for extensive expertise or complex procedures.
   The remaining part of the paper is organized as follows: discussion about EMG signal pre-
processing and processing using ML algorithms, proposed method, dataset preparation process,
design of the neural network, results and discussion and conclusion.

2. EMG Signal Pre-Processing
Electromyography (EMG) is a valuable technique used to study the electrical signals generated
by muscles in the body. By using electrodes, EMG pattern records and measures the electrical
activity produced by different muscles, providing information about their functions and
behavior [10]. In the recording process of EMG signals, two significant factors greatly impact
signal quality: the signal-to-noise ratio and distortion [10, 11, 12]. Addressing these factors is
important to ensure accurate and reliable results. For this, a meticulous approach towards
signal pre-processing is essential. Figure 1 show the key steps involved in the pre-processing of
EMG signals, which plays important role in improving the quality of the recorded EMG signal.


 Raw EMG Signal              Amplification             Rectification
                                                                                 Segmentation
 from Electrode                 Stage                  and Filtration
   2.1.

Figure 1: EMG Signal Pre-Processing Stage

    The initial stage involves the collection of raw EMG signals using electrodes and their
amplification. Usually, a differential amplifier is used to amplify the signals properly. The raw
signal may be prone to various types of noise, such as low or high-frequency interferences, as
well as other artifacts. To overcome these unwanted disturbances, various processing
techniques are applied to minimize noise and artifacts. Since the amplitude of the EMG signal is
mostly used by researchers and clinicians, therefore further processing steps are used to extract
relevant information. The signal is rectified to change it into a unidirectional waveform,
allowing the analysis of the absolute magnitude of the EMG signal. Additionally, Averaging
techniques are used to obtain a representative measure of the EMG amplitude, providing
important information about muscle activity. In this way recorded EMG signal is preprocessed
to ensure good quality for interpretation and analysis.

3. EMG Signal Processing Using Machine Learning
EMG signal processing using ML algorithms involves several steps to extract meaningful
features from it and then classify the signals accurately. Figure 2 shows the stages of EMG
signal processing using ML [13, 14, 15].
                                   Feature Selection                 Augmentation of
  Feature Extraction
                                    and Reduction                        Data




                                    Training Dataset

          Cross                                                    ML
                                                                                 Output
        Validation                                              Algorithm

                                    Testing Dataset




Figure 2: EMG signal processing by using Machine learning

   3.1. Feature Extraction

   Feature extraction is an important step in EMG signal processing, as it involves capturing the
relevant information that can be used for categorization. Various time-domains, frequency-
domain, or time-frequency domain features are extracted using feature extraction techniques
for processing.

   3.2. Feature Selection

   The extracted features may contain redundant or irrelevant information. Feature selection
methods employed to identify the most discriminative features that contribute to classification
accuracy. This step helps reduce the dimensionality of data and thereby reduces the
computational complexity.

   3.3. Data Augmentation

   It is a technique of artificially increasing the number of data in training set by generating
modified copies of dataset from existing data. It is important for AI applications, as accuracy
increases with the amount of training data.

   3.4. Training Data Preparation

  The pre-processed and normalized features are paired with corresponding labels (class
annotations) to create a labeled training dataset.

   3.5. Machine Learning Algorithm Selection

   Popular ML algorithms are used for EMG signal classification, such as Support Vector
Machines (SVM), K-Nearest Neighbours (KNN), Random Forests, or Deep Learning models like
Convolutional Neural Networks (CNN) [16]. In proposed work SVM is selected due to its ability
to handle complex decision boundaries and neural networks due to its power of computational
capabilities.
   3.6. Model Training

   The ML algorithm is trained on the DSPN dataset to learn the patterns and relationships
between the features and the corresponding classes.

   3.7. Model Evaluation

   After training, the performance of the trained model is evaluated using separate validation or
testing datasets. Cross-validation technique is used to obtain more reliable performance
estimates.

   3.8. Testing and Deployment

   The designed model is tested on new, unseen EMG signal data to assess its generalization
ability. Then final trained model deployed in real-world applications to classify EMG signals and
aid in the diagnosis or monitoring of conditions of DSPN.

4. Proposed Method
    Inspired by the work of Muthuramalingam et al. [17], the presented study developed a novel
approach for DSPN diagnosis using a linear Support Vector Machine (SVM) based bi-layered
neural network. This architecture offers the advantage of efficient resource utilization while
achieving promising results with respect to accuracy. In proposed method, the first step
involved is training the SVM using MATLAB, freezing the model and then proceed for hardware
implementation. The SVM was trained on the DSPN training dataset, learning to classify EMG
signals associated with DSPN. SVM provided weighted outputs that captured the discriminative
characteristics of the input signals. To further enhance the accuracy of diagnostic system, the
weighted outputs from the SVM integrated into a bi-layered neural network. The bi-layered
neural network takes the weighted outputs of the SVM as inputs and processes them to
generate the final diagnostic output.

5. Dataset Preparation
    During the gait cycle, lower limb muscles, namely the Vastus Lateralis (VL), Gastrocnemius
Lateralis (GL), and Tibialis Anterior (TA), are particularly affected [18]. To conduct the study on
Diabetic Sensorimotor Polyneuropathy (DSPN) diagnosis, the EMG data was obtained from the
research conducted by Watari et al. [19]. The dataset comprised 142 samples from 29 patients
without DSPN (considered as the normal condition) and 72 samples from 14 patients with
severe DSPN (considered as the abnormal condition) and did not include samples from patients
with mild or moderate DSPN. To ensure a balanced representation of normal and abnormal
cases, the Synthetic Minority Over-sampling Technique (SMOTE) data augmentation technique
[20, 21] was utilized. By applying SMOTE, the number of samples for the abnormal conditions
increases, bringing them to an equal proportion in the training dataset. By applying Relief
feature selection algorithm [22] on the EMG data obtained from the GL, VL, and TA muscles,
identify the most significant features from each dataset, highlighting the specific aspects of
muscle activity that are indicative of DSPN. Total 19 significant features identified from each
dataset, as illustrated in Figures 3, 4, and 5.
Figure 3: GL Extracted Feature Using Relief Method




Figure 4: VL Extracted Feature Using Relief method




Figure 5: TA Extracted Feature Using Relief Method
   The SVM classifier was trained using MATLAB 2021. For training total nine features selected
to represent the EMG data. These features were chosen using Relief feature selection
techniques. For the Gastrocnemius Lateralis (GL) data, the three most significant features
selected were GL Enhanced mean Absolute Value, GL Sigma (signal entropy) and GL Zero
crossing. Likewise, for the Vastus Lateralis (VL) data, the three most significant features chosen
were VL Sigma (signal entropy), VL Descriptor SE NCELL and VL Shape factor. Finally, for the
Tibialis Anterior (TA) data, the three most significant features included were TA Final/min, TA
Zero crossing and TA Descriptor SE NCELL. Using this set of nine features, trained a linear SVM
model in MATLAB, which exhibited an accuracy of 82% approximately. The trained SVM model
allowed us to classify the EMG data accurately based on the selected features and their
corresponding weights. This weighted output, which encapsulates the discriminative
information learned by the SVM, serves as valuable input to the neural network for further
analysis and classification.

6. Neural Network Design
    Using the weighted output from the SVM a bi-layered neural network was designed in
MATLAB. This neural network played a crucial role in further refining the classification process
for DSPN diagnosis. In proposed work, this MATLAB-based neural network achieved an
accuracy of approximately 80%. To extend the applicability of this ML algorithm, it was
implemented in hardware using Vivado Design Suite (version 2022.2) provided by Xilinx. The
neural network's hardware implementation was realized using the Xilinx ZCU102 FPGA board.
This comprehensive hardware integration provided the full potential of the neural network's
computational capabilities in a practical and real-time manner. Figure 6 shows the architecture
of hardware-implemented neural network.




Figure 6: Neural Network Schematic Design in Vivado

  Additionally, the device package is shown in Figure 7, which encapsulates the hardware
implementation of DSPN severity classifier.




Figure 7: Device Package
   The proposed study bridges the gap between software and hardware by successfully
translating MATLAB-based neural network into a practical and tangible device. This model
brings us one step closer to a future where improved diagnostic device can assist in the early
detection and prevention of DSPN.

7. Result and Discussion
     The hardware implementation of DSPN severity classifier on the ZCU102 FPGA board
resulted in an accuracy of approximately 79% while effectively utilizing the available resources.
The satisfactory performance across various metrics like power and latency signifies the
potential of proposed approach in diagnosing DSPN in patients. Although current
implementation focused on classifying patients into DSPN and non-DSPN categories, but there
are more categories in DSPN severity such as mild, moderate and sever. This opens up avenues
for future improvements and upgrades in hardware design. Table 1 presents a resource
utilization report, showing the efficient utilization of resources in presented hardware
implementation. Additionally, Figure 8 provides a graphical representation of the percentage
utilization of resources, showing optimal resource allocation.

Table 1
Resource Utilization Summary
 Name                                                 Total                             Utilization
 LUTs                                                 274080                            1468
 Register                                             548160                            128
 F7 Muxes                                             137040                            188
 BRAM Tiles                                           912                               147
 DSPs                                                 2520                              74
 Bonded IOB                                           328                               49


                                           18.00%                           16.12%
                                                                                             14.99%
                  Percentage Utilization




                                           16.00%
                                           14.00%
                                           12.00%
                                           10.00%
                                            8.00%
                                            6.00%
                                            4.00%                                    2.94%
                                            2.00%   0.54%   0.02%   0.14%
                                            0.00%
                                                    LUTs Register    F7   BRAM       DSPs Bonded
                                                                    Muxes Tiles             IOB
                                                                Resource Name

Figure 8: Resource Utilization Report

8. Conclusion and Future Work
    Early diagnosis plays an effective role in preventing the severity of Diabetic Sensorimotor
Polyneuropathy (DSPN). To accomplish this, a machine learning-based model has been
successfully hardware implemented on the Xilinx ZCU102 FPGA board. Implemented model
achieved accuracy of 79% approximately in binary class classification, indicating its potential
for early diagnosis of DSPN. While design's accuracy is moderate, it should be more to ensure
good quality diagnosis and also the device should classify the severity level. Presented study
encourages to design a model in near future that can identify DSPN patients and also assess the
severity level of their disease. This will enable medical professionals to provide targeted
interventions and personalized treatment plans.

Acknowledgements
This research is supported by the ASEAN-India Collaborative Research Project, Department of
Science and Technology, Science and Engineering Research Board (DST-SERB), Govt. of India,
Grant no. CRD/2020/000220 and by Research and Development Scheme, Department of Higher
Education, Government of Uttar Pradesh, India, ref. no. 80/2021/1543(1)/70-4-2021-
4(28)/2021.

References
[1] Pop-Busui, Rodica, Andrew JM Boulton, Eva L. Feldman, Vera Bril, Roy Freeman, Rayaz A.
    Malik, Jay M. Sosenko, and Dan Ziegler. "Diabetic neuropathy: a position statement by the
    American Diabetes Association." Diabetes care 40, no. 1 (2017): 136. doi:10.2337/dc16-
    2042.
[2] Haque, Fahmida, Mamun BI Reaz, Muhammad EH Chowdhury, Fazida H. Hashim, Norhana
    Arsad, and Sawal HM Ali. "Diabetic sensorimotor polyneuropathy severity classification
    using adaptive neuro fuzzy inference system." IEEE Access 9 (2021): 7618-7631.
    doi:10.1109/ACCESS.2020.3048742.
[3] Haque, Fahmida, Mamun Bin Ibne Reaz, Muhammad Enamul Hoque Chowdhury, Geetika
    Srivastava, Sawal Hamid Md Ali, Ahmad Ashrif A. Bakar, and Mohammad Arif Sobhan
    Bhuiyan. "Performance analysis of conventional machine learning algorithms for diabetic
    sensorimotor polyneuropathy severity classification." Diagnostics 11, no. 5 (2021): 801.
    URL: https://doi.org/10.3390/diagnostics11050801.
[4] Dyck, Peter J., James W. Albers, Henning Andersen, Joseph C. Arezzo, Geert‐Jan Biessels,
    Vera Bril, Eva L. Feldman et al. "Diabetic polyneuropathies: update on research definition,
    diagnostic criteria and estimation of severity." Diabetes/metabolism research and reviews
    27, no. 7 (2011): 620-628. URL: https://doi.org/10.1002/dmrr.1226.
[5] Haque, Fahmida, Mamun Bin Ibne Reaz, Muhammad Enamul Hoque Chowdhury, Serkan
    Kiranyaz, Mohamed Abdelmoniem, Emadeddin Hussein, Mohammed Shaat et al.
    "Evaluating Performance of Machine Learning Models for Diabetic Sensorimotor
    Polyneuropathy Severity Classification using Biomechanical Signals during Gait." arXiv
    preprint arXiv:2205.10581 (2022). URL: https://doi.org/10.48550/arXiv.2205.10581
[6] Boulton, Andrew JM, Peter Kempler, Alexander Ametov, and Dan Ziegler. "Whither
    pathogenetic treatments for diabetic polyneuropathy?." Diabetes/Metabolism Research
    and Reviews 29, no. 5 (2013): 327-333. URL: https://doi.org/10.1002/dmrr.2397.
[7] Vas, Prashanth RJ, and Michael E. Edmonds. "Early recognition of diabetic peripheral
    neuropathy and the need for one-stop microvascular assessment." The lancet Diabetes &
    endocrinology 4, no. 9 (2016): 723-725. URL: https://doi.org/10.1016/S2213-
    8587(16)30063-8.
[8] Karlik, Bekir. "Machine learning algorithms for characterization of EMG signals."
    International Journal of Information and Electronics Engineering 4, no. 3 (2014): 189.
    doi:10.7763/IJIEE.2014.V4.433.
[9] Almurdhi, Monirah M., Neil D. Reeves, Frank L. Bowling, Andrew JM Boulton, Maria
    Jeziorska, and Rayaz A. Malik. "Reduced lower-limb muscle strength and volume in patients
    with type 2 diabetes in relation to neuropathy, intramuscular fat, and vitamin D levels."
    Diabetes care 39, no. 3 (2016): 441-447. URL: https://doi.org/10.2337/dc15-0995.
[10] Reaz, Mamun Bin Ibne, M. Sazzad Hussain, and Faisal Mohd-Yasin. "Techniques of EMG
     signal analysis: detection, processing, classification and applications." Biological procedures
     online 8 (2006): 11-35. URL: https://doi.org/10.1251/bpo115.
[11] Phinyomark, Angkoon, Evan Campbell, and Erik Scheme. "Surface electromyography (EMG)
     signal processing, classification, and practical considerations." Biomedical Signal
     Processing: Advances in Theory, Algorithms and Applications (2020): 3-29. URL:
     https://doi.org/10.1007/978-981-13-9097-5_1.
[12] Merletti, Roberto, and Loredana R. Lo Conte. "Surface EMG signal processing during
     isometric contractions." Journal of Electromyography and Kinesiology 7, no. 4 (1997): 241-
     250. URL: https://doi.org/10.1016/S1050-6411(97)00010-2.
[13] Zgallai, Walid A., ed. Biomedical signal processing and artificial intelligence in healthcare.
     Academic Press, 2020. URL: https://doi.org/10.1016/B978-0-12-818946-7.00005-6.
[14] Subasi, Abdulhamit. Practical guide for biomedical signals analysis using machine learning
     techniques: A MATLAB based approach. Academic Press, 2019.
[15] Di Nardo, Francesco, Christian Morbidoni, Alessandro Cucchiarelli, and Sandro Fioretti.
     "Influence of EMG-signal processing and experimental set-up on prediction of gait events
     by neural network." Biomedical Signal Processing and Control 63 (2021): 102232. URL:
     https://doi.org/10.1016/j.bspc.2020.102232.
[16] Sarker, I.H. Machine Learning: Algorithms, Real-World Applications and Research
     Directions. SN COMPUT. SCI. 2, 160 (2021). URL: https://doi.org/10.1007/s42979-021-
     00592-x.
[17] Muthuramalingam, A., S. Himavathi, and E. Srinivasan. "Neural network implementation
     using FPGA: issues and application." International Journal of Electrical and Computer
     Engineering 2, no. 12 (2008): 2802-2808.
[18] Sacco, Isabel CN, Paula MH Akashi, and Ewald M. Hennig. "A comparison of lower limb EMG
     and ground reaction forces between barefoot and shod gait in participants with diabetic
     neuropathic and healthy controls." BMC musculoskeletal disorders 11, no. 1 (2010): 1-9.
     URL: https://doi.org/10.1186/1471-2474-11-24.
[19] Watari, Ricky, Cristina D. Sartor, Andreja P. Picon, Marco K. Butugan, Cesar F. Amorim, Neli
     RS Ortega, and Isabel CN Sacco. "Effect of diabetic neuropathy severity classified by a fuzzy
     model in muscle dynamics during gait." Journal of neuroengineering and rehabilitation 11,
     no. 1 (2014): 1-9. URL: https://doi.org/10.1186/1743-0003-11-11.
[20] Chawla, Nitesh V., Kevin W. Bowyer, Lawrence O. Hall, and W. Philip Kegelmeyer. "SMOTE:
     synthetic minority over-sampling technique." Journal of artificial intelligence research 16
     (2002): 321-357. URL: https://doi.org/10.1613/jair.953.
[21] Elreedy, Dina, and Amir F. Atiya. "A comprehensive analysis of synthetic minority
     oversampling technique (SMOTE) for handling class imbalance." Information Sciences 505
     (2019): 32-64. URL: https://doi.org/10.1016/j.ins.2019.07.070.
[22] Urbanowicz, Ryan J., Melissa Meeker, William La Cava, Randal S. Olson, and Jason H. Moore.
     "Relief-based feature selection: Introduction and review." Journal of biomedical informatics
     85 (2018): 189-203. URL: https://doi.org/10.1016/j.jbi.2018.07.014.