Hardware Implementation For Lower Limb Surface EMG Measurement and Analysis Using Explainable AI For Activity Recognition
Hardware Implementation For Lower Limb Surface EMG Measurement and Analysis Using Explainable AI For Activity Recognition
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
2004909 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 71, 2022
TABLE I TABLE II
C OST (A PPROXIMATE ) C OMPARISON W ITH O THER AVAILABLE C OMMER - OVERVIEW OF S EMG D ATASET
CIAL D EVICES [11], [12]
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
VIJAYVARGIYA et al.: HARDWARE IMPLEMENTATION FOR LOWER LIMB SURFACE EMG MEASUREMENT AND ANALYSIS 2004909
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
2004909 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 71, 2022
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
VIJAYVARGIYA et al.: HARDWARE IMPLEMENTATION FOR LOWER LIMB SURFACE EMG MEASUREMENT AND ANALYSIS 2004909
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
2004909 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 71, 2022
TABLE V
P ERFORMANCE PARAMETERS OF THE S TUDIED ML M ODELS ( IN %)
Fig. 3. Box plot for all the studied classifies with 50 randomized tests. (a) Male 1. (b) Male 2. (c) Male 3. (d) Female 1. (e) Female 2.
advancements in the past decade, leading to its widespread Local explanation approaches such as LIME and SHAP are
industrial use, due to more powerful processors, stronger two of the most frequently used model-agnostic, local expla-
learning algorithms, and easier access to big amounts of data. nation strategies for explaining any given black-box classifier.
The ML models address real-time difficulties across several LIME is an innovative method that uses a locally interpretable
sectors. Increasing model complexity improves prediction per- process to describe the prediction process of any classification
formance. Deep learning helps machines recognize, analyze, model and gives information about the classifier’s prediction
and extract complicated data representations for detection strategy and feature correlations. It is based on the idea that
and classification. This hierarchy of increasing complexity any complicated model is linear on a local scale. LIME
and utilization of enormous amounts of data to train and attempts to fit a basic model around a single observation to
develop advanced systems boosts their predictive capacity, but simulate how the global model works at that location. The
lowers their ability to explain their underlying workings and basic model can then be used to explain the more complicated
methods. Therefore, it is harder to understand their activities model’s predictions locally.
and interpret their future recommendations. The LIME model should be model-agnostic, to learn the
It is difficult to trust systems whose outcomes are difficult to behavior of the underlying model, obfuscate the input, and
explain, especially in fields such as healthcare or self-driving see how the predictions change. To discover the behavior of
vehicles, where moral and justice questions have inevitably the underlying model, disrupt the input and examine how the
emerged. The development of efficient, fair, resilient, and predictions change using the LIME model, which is model-
high-performing models for real-world applications has res- agnostic. Interpretability benefits from this since input may be
urrected the subject of XAI. It is gaining popularity at the perturbed by things that humans comprehend (e.g., words or
moment owing to its simplicity of understanding and easy- parts of a picture), even if the model uses significantly more
to-interpret procedures [37], [38]. XAI is a set of tools and intricate components as features (e.g., a graph) (e.g., word
frameworks for understanding and interpreting ML model embeddings). It makes use of the following ways to do this:
predictions, as well as analyzing and optimizing model per- 1) permute the sample;
formance and assisting others in comprehending your models’ 2) the distance between permutations and the original data
interpretability. The interpretability of a model may be evalu- is calculated;
ated on two levels. 3) using a complex model, make predictions on new data;
4) the best features of the complex model results from
permuted data are chosen;
1) Global Interpretation: It offers a comprehensive descrip-
5) fit a simple model to permuted data using features
tion of the operation of AI systems, for example, by out-
chosen in the previous step and the similarity score as
lining the rules of features that govern their outcomes.
a weight;
2) Local Interpretation: In XAI, local interpretability does
6) the simplest model’s feature weights explain the com-
not attempt to describe the complete AI model. It instead
plex model’s local behavior.
trains XAI models to approximate individual prediction.
Local interpretability models show how the model’s The mathematical expression of LIME is presented as
outcomes change as the values of certain attributes
change within a given interval. explain(y) = argmingG L h, g, λ y + P(g). (3)
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
VIJAYVARGIYA et al.: HARDWARE IMPLEMENTATION FOR LOWER LIMB SURFACE EMG MEASUREMENT AND ANALYSIS 2004909
Fig. 4. Confusion matrix for subject M1 with studied classifier. (a) Decision tree. (b) Bagging. (c) Gradient boosting. (d) Extra trees.
Fig. 5. LIME outcomes for extra tree classifier for distinct lower limb activities of subject M1. (a) Jumping. (b) Situps. (c) Stairs down. (d) Stairs up.
(e) Walking.
TP
Here, explain(y) represents the explanation model for instance Recall(Sensitivity) = (6)
y; P(g) represents the complexity of model; L(h, g, λ y ) TP + FN
TN
represents the loss function; h represents the black-box model; Specificity = (7)
g represents the explainer; y is the similarity between data TN + FP
points. 2 ∗ Recall ∗ Precision
F1-score = . (8)
Recall + Precision
III. R ESULTS AND D ISCUSSIONS
Although accuracy may be considered one of the evalua-
The problem in this application is a multiclass classification
tion criteria, additional evaluation metrics such as sensitivity,
task, and the dataset was partitioned into 70% training dataset
selectivity, and F1-score are necessary and covered in this
and 30% testing sets, since the training set should be more
study. Table V summarizes the performance metrics for the
than that of the test dataset to get a higher classification rate.
five computational classifiers evaluated in this study for recog-
A classification system using ML produces four possible
nizing five distinct lower limb activities. Across all the five
outcomes: true negative (TN), true positive (TP), false
subjects, the extra tree classifier has the best accuracy and
negative (FN), and false positive (FP). Here, TP and TN are
F1-score value, while the decision tree classifier has the lowest
the correct predictions of the positive and negative classes
accuracy and F1-score value. The decision tree, bagging, and
while the FP and FN are the wrong predictions, respectively.
gradient boosting tree classifiers have a mean accuracy of
The classification performance indicators for each classifier
89.10%, 93.59%, and 94.99%, respectively, while the extra
were calculated based on the number of occurrences of each
tree classifier has a mean accuracy of 96.83%. The decision
of the following four potential outcomes:
tree, bagging, gradient boosting tree, and extra tree classifiers
TP + TN had mean F-scores of 88.78%, 93.48%, 94.88%, and 96.72%,
Accuracy = (4)
TP + TN + FP + FN respectively.
TP To determine statistical validity, an experiment was done
Precision = (5)
TP + FP with 50 randomized tests to determine the accuracy of all the
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
2004909 IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, VOL. 71, 2022
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.
VIJAYVARGIYA et al.: HARDWARE IMPLEMENTATION FOR LOWER LIMB SURFACE EMG MEASUREMENT AND ANALYSIS 2004909
[11] S. Pancholi and A. M. Joshi, “Portable EMG data acquisition module [33] J. R. Quinlan, “Induction of decision trees,” Mach. Learn., vol. 1, no. 1,
for upper limb prosthesis application,” IEEE Sensors J., vol. 18, no. 8, pp. 81–106, 1986.
pp. 3436–3443, Apr. 2018. [34] L. Breiman, “Bagging predictors,” Mach. Learn., vol. 24, no. 2,
[12] M. Ergeneci, K. Gokcesu, E. Ertan, and P. Kosmas, “An embedded, eight pp. 123–140, 1996.
channel, noise canceling, wireless, wearable sEMG data acquisition sys- [35] L. Mason, J. Baxter, P. L. Bartlett, and M. R. Frean, “Boosting
tem with adaptive muscle contraction detection,” IEEE Trans. Biomed. algorithms as gradient descent,” in Proc. Adv. Neural Inf. Process. Syst.,
Circuits Syst., vol. 12, no. 1, pp. 68–79, Feb. 2018. 2000, pp. 512–518.
[13] A. Vijayvargiya, V. Gupta, R. Kumar, N. Dey, and J. M. R. S. Tavares, [36] P. Geurts, D. Ernst, and L. Wehenkel, “Extremely randomized trees,”
“A hybrid WD-EEMD sEMG feature extraction technique for lower limb Mach. Learn., vol. 63, no. 1, pp. 3–42, Apr. 2006.
activity recognition,” IEEE Sensors J., vol. 21, no. 18, pp. 20431–20439, [37] M. T. Ribeiro, S. Singh, and C. Guestrin, “‘Why should i trust
Sep. 2021. you?’ Explaining the predictions of any classifier,” in Proc. 22nd
[14] W. Gao, L. Zhang, W. Huang, F. Min, J. He, and A. Song, “Deep neural ACM SIGKDD Int. Conf. Knowl. Discovery Data Mining, Aug. 2016,
networks for sensor-based human activity recognition using selective pp. 1135–1144.
kernel convolution,” IEEE Trans. Instrum. Meas., vol. 70, pp. 1–13, [38] M. S. Kamal, A. Northcote, L. Chowdhury, N. Dey, R. G. Crespo, and
2021. E. Herrera-Viedma, “Alzheimer’s patient analysis using image and gene
[15] J. Li et al., “Using body sensor network to measure the effect of expression data and explainable-AI to present associated genes,” IEEE
rehabilitation therapy on improvement of lower limb motor function Trans. Instrum. Meas., vol. 70, 2021, Art. no. 2513107.
in children with spastic diplegia,” IEEE Trans. Instrum. Meas., vol. 69,
no. 11, pp. 9215–9227, Nov. 2020.
[16] P. K. Shukla, A. Vijayvargiya, and R. Kumar, “Human activity recog-
nition using accelerometer and gyroscope data from smartphones,” in
Proc. Int. Conf. Emerg. Trends Commun., Control Comput. (ICONC),
Feb. 2020, pp. 1–6.
[17] A. Gautam, M. Panwar, D. Biswas, and A. Acharyya, “MyoNet:
A transfer-learning-based LRCN for lower limb movement recognition Ankit Vijayvargiya (Senior Member, IEEE) received the B.Tech. degree
and knee joint angle prediction for remote monitoring of rehabilitation (Hons.) in electrical engineering from Rajasthan Technical University (RTU),
progress from sEMG,” IEEE J. Transl. Eng. Health Med., vol. 8, Kota, India, in 2010, the M.Tech. degree in instrumentation from Devi Ahilya
pp. 1–10, 2020. University (DAVV), Indore, India, in 2014, and the Ph.D. degree in electrical
[18] G. R. Naik et al., “An ICA-EBM-based sEMG classifier for recognizing engineering from the Malaviya National Institute of Technology (MNIT),
lower limb movements in individuals with and without knee pathology,” Jaipur, India, in 2022.
IEEE Trans. Neural Syst. Rehabil. Eng., vol. 26, no. 3, pp. 675–686, His research interests include biomedical signal processing, pattern recog-
Jan. 2018. nition, and machine learning.
[19] J. Zhang, C. Ling, and S. Li, “EMG signals based human action
recognition via deep belief networks,” IFAC-PapersOnLine, vol. 52,
no. 19, pp. 271–276, 2019.
[20] Y. Luan, Y. Shi, W. Wu, Z. Liu, H. Chang, and J. Cheng, “HAR-sEMG:
A dataset for human activity recognition on lower-limb sEMG,” Knowl.
Inf. Syst., vol. 63, no. 10, pp. 2791–2814, Oct. 2021.
[21] X. Shi, P. Qin, J. Zhu, M. Zhai, and W. Shi, “Feature extraction and
classification of lower limb motion based on sEMG signals,” IEEE
Access, vol. 8, pp. 132882–132892, 2020. Puneet Singh is currently pursuing the B.Tech. degree in electronics and com-
[22] S. Park, D. Lee, W. K. Chung, and K. Kim, “Hierarchical motion munication engineering with the Malaviya National Institute of Technology
segmentation through sEMG for continuous lower limb motions,” IEEE (MNIT), Jaipur, Rajasthan, India.
Robot. Autom. Lett., vol. 4, no. 4, pp. 4402–4409, Oct. 2019. His research interests include embedded systems and machine learning.
[23] B. Hu, E. Rouse, and L. Hargrove, “Benchmark datasets for bilateral
lower-limb neuromechanical signals from wearable sensors during unas-
sisted locomotion in able-bodied individuals,” Frontiers Robot. AI, vol. 5,
p. 14, Feb. 2018.
[24] J. Ryu, B.-H. Lee, and D.-H. Kim, “sEMG signal-based lower limb
human motion detection using a top and slope feature extraction
algorithm,” IEEE Signal Process. Lett., vol. 24, no. 7, pp. 929–932,
Jul. 2017. Rajesh Kumar (Senior Member, IEEE) received the B.Tech. degree (Hons.)
[25] Y. Yu, L. Fan, S. Kuang, L. Sun, and F. Zhang, “The research of in electrical engineering from the National Institute of Technology (NIT),
sEMG movement pattern classification based on multiple fused wavelet Kurukshetra, India, in 1994, the M.E. degree (Hons.) in power systems from
function,” in Proc. IEEE Int. Conf. Cyber Technol. Autom., Control, the Malaviya National Institute of Technology (MNIT), Jaipur, Rajasthan,
Intell. Syst. (CYBER), Jun. 2015, pp. 487–491. India, in 1997, and the Ph.D. degree in intelligent systems from the University
[26] M. Lichman, “UCI machine learning repository,” School Inf. Comput. of Rajasthan, Jaipur, in 2005.
Sci., Univ. California, Irvine, Irvine, CA, USA, Tech. Rep., 2013. His research interests include theory and practice of intelligent systems,
[Online]. Available: http://archive.ics.uci.edu/ml computational intelligence and analytics, electric transportation, smart grid,
[27] A. Vijayvargiya, R. Kumar, and N. Dey, “Voting-based 1D CNN model and robotics.
for human lower limb activity recognition using sEMG signal,” Phys.
Eng. Sci. Med., vol. 44, no. 4, pp. 1297–1309, Nov. 2021.
[28] Myoware Muscle Sensor SEN 13723—SparkFun Electronics. Accessed:
Jan. 7, 2022. [Online]. Available: https://www.sparkfun.com/products/
13723
[29] A. Phinyomark, P. Phukpattaranont, and C. Limsakul, “Wavelet-based
denoising algorithm for robust EMG pattern recognition,” Fluctuation
Noise Lett., vol. 10, no. 2, pp. 157–167, Jun. 2011. Nilanjan Dey (Senior Member, IEEE) received the B.Tech. and M.Tech.
[30] A. Graps, “An introduction to wavelets,” IEEE Comput. Sci. Eng., vol. 2, degrees in information technology from the West Bengal University of
no. 2, pp. 50–61, Jun. 1995. Technology, Kolkata, India, in 2005 and 2011, respectively, and the Ph.D.
[31] O. Banos, J.-M. Galvez, M. Damas, H. Pomares, and I. Rojas, “Window degree in digital image processing from Jadavpur University, Kolkata, in 2015.
size impact in human activity recognition,” Sensors, vol. 14, no. 4, His research topics are signal processing, machine learning, and informa-
pp. 6474–6499, Apr. 2014. tion security.
[32] W. M. B. W. Daud, A. B. Yahya, C. S. Horng, M. F. Sulaima, and Dr. Dey is an Associate Editor of IET Image Processing, the Editor-in-
R. Sudirman, “Features extraction of electromyography signals in time Chief of the International Journal of Ambient Computing and Intelligence
domain on biceps brachii muscle,” Int. J. Model. Optim., vol. 3, no. 6, (IJACI), and a Series Co-editor of Springer Tracts in Nature-Inspired Com-
pp. 3–7, Dec. 2013. puting (STNIC).
Authorized licensed use limited to: MAULANA AZAD NATIONAL INSTITUTE OF TECHNOLOGY. Downloaded on May 30,2023 at 09:44:16 UTC from IEEE Xplore. Restrictions apply.