IoT-based Pain Monitoring and Management System Fouad Jameel Ibrahim Alazzawia, Marwa Azzawib, Madiha Fouad Jameelc, and Yurii Khlaponind a Computer Engineering Department, Al-Rafidain University college, Baghdad, Iraq b Biomedical Engineering Department, Al-Nahrain University , Baghdad, Iraq c Department of Dentistry, Al-Rafidain University college, Baghdad, Iraq d Kyiv National University of Construction and Architecture, Povitriflotskyi Ave., 31, 03037, Kyiv, Ukraine Abstract Patient suffering from pain is in need for an immediate medical intervention, however in some cases self-pain assessment is not available due to unconsciousness or prone to errors due to observer’s biases. Therefore, automated pain assessment and management is needed. The internet of things (IoT) revolution along with biosensor technology could be convenient for pain assessment and management application. Therefore, this paper is a mini-survey of the literatures in this field published in six years (2016–2021) was conducted in three online databases. Hundreds of papers were found, however after title, abstracta and contents screening only 13 papers were included. This paper is aimed to review the papers that suggest a pain assessment model in a IoT philosophy, in order to summarize the present work and propose new suggestions for future work. Research with different pain levels, in a bigger and real patient population with different diseases were suggested in the conclusion for future work. Keywords1 Internet of Things, pain monitoring, pain management, biosensor. 1. Introduction Pain is the fifth vital sign besides the temperature, pulse rate, respiration rate and blood pressure. Furthermore, it is one of the most warning signs for seeking medical consideration [1]. Mostly, pain could significantly contribute the quality of life and cause psychological disturbance including depression, sleeping disorder, anxiety and fatigue which lead to physiological problems. Therefore, adequate assessment of pain is essential for precise determining of appropriate treatment [2]. Commonly, pain assessment is done through a self-report or different observational pain scales such as Numeric rating scale (NRS) [3] and Visual Analogue Scale for Pain (VAS) [4]. However, self-reporting method could be prone to different types of errors, including the subjective biases of the observer and patient’s ability to express the amount of perceived pain. Moreover, under special circumstance as in the patients who are noncommunicative it is not possible to assess the amount of pain. On the other hand, accurate pain management relies on continuous and precise pain assessment, however, it is impractical to continuously monitor pain by humans. Furthermore, overdosing of pain-killers could be a life-threatening problem that may cause a prolonged sedation or hepatic injury [5]. Emerging Technology Trends on the Smart Industry and the Internet of Things, January 19, 2022, Kyiv, Ukraine EMAIL: Fouad.alazzawi@ruc.edu.iq (F. J. I. Alazzawi); marwa.azzawi@yahoo.com (M. Azzawi); madiha.fouad.elc@ruc.edu.iq (M. F. Jameel), y.khlaponin@gmail.com (Y. Khlaponin) ORCID: 0000-0002-2975-3618 (F. J. I. Alazzawi); 0000-0002-3617-6046 (M. Azzawi); 0000-0002-2968-9599 (M. F. Jameel), 0000-0002-9287- 0817 (Y. Khlaponin) ©️ 2022 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) 124 Therefore, researchers through the last decade tried to identify the alter of different physiological signals as a consequence of pain suffering, including electromyography (EMG) [6], electrocardiography (ECG) [7], electroencephalography (EEG) [8] and photoplethysmography (PPG) [9] in real-time monitoring. ECG are the process of measuring the small electrical fluctuation produced by the cardiac muscle and it gives as indication about blood flow, while EEG evaluated brain’s electrical activity and the EMG tracks the electrical activity of the muscles. Moreover, PPG signal measures blood volume change using irradiation light applied non-invasively to peripheral body sites. All these signals show alteration and abnormalities during suffering from pain. Galvanic Skin Response (GSR) is another characteristic that exhibits fluctuation in the signal during pain due to change of skin conductance. In the last years, physiological parameters such as heartbeat is not assessed through a clinical and physical examination. Today, a smartwatch can identify heartbeat and the observed data is sent to a cloud through a wireless network to be observed by physician, hospital, and other stake holders. Furthermore, data is stored in a digital form and analyzed for machine deep learning (ML) purposes. All the previous process is done through what is known as the internet of things (IoT) which connect computer and healthcare provider together to make our life easier [10]. Figure 1 illustrates the lifecycle of the IoT assisted wearable sensor system in health care. Figure 1: Data processing lifecycle IoT assisted wearable sensor systems in healthcare [11] In this mini-review, the aim is to overview, consolidate and summarize the work that has been done over the last six years to automatically assess pain from different biomedical signals including EEG, EMG, PPG and GSR, to identify the challenges and determine the direction of future researches. In this paper, a survey of “IoT” and “pain” database is done in three different online databases. Then a focused reading, studying and categorization followed by concluding is performed and many papers were excluded in this stage according to the methodology described in the second section of this paper. All the results of the survey of the databases containing IoT using in paint monitoring and controlling were discussed and presented in section three. Section four concludes the paper and discusses the future opportunities of such work. 2. Methodology Papers in this mini-review were collected by searching three online database, including google scholar, ScienceDirect and IEEE Xplore. All the research articles, review articles, book chapters, conference papers were included in the research, however, the review articles were excluded during results analysis and discussion. The research was conducted during December 2021 and is limited to six years period, which 125 is between 2016 and 2021. Furthermore, the search was limited to English language papers and the search keywords was ‘IoT’ OR ‘Internet of Things’ AND ‘pain assessment’ OR ‘pain monitoring’. The inclusion criteria in this mini-review were based on 1) any scientific paper that describe IoT-based solution for pain management, 2) all included papers should mentioned the word ‘internet of things’ or ‘IoT’ or any technique used in IoT, 3) review articles, mini-review articles, papers with only an abstract and case reports were excluded. The papers were collected for review and the following points were focused on during reading:  The paper is about pain detection or assessment not targeted emotions, mental health, happiness or sadness and stress.  The paper is targeted a patient with pain or a disease that causes pain not affecting the healthy person with a painful stimulus like heat to cause pain and assess that pain accordingly.  The physiological parameters detected, or the biosensor used, on the other hand the IoT technology used in the work. 3. Results and Discussion Three databases were searched for suitable papers depending on the review methodology of this mini- review. Hundreds of papers were found then they were filtered after reading the abstract. For instance, in the ScienceDirect database 274 papers were found in the period between 2017–2021, and they are distributed as per Fig. 1. As per figure the subject started to gain interest more after 2019. However, after reading the abstract many papers have been excluded due to many criteria, for instance miss understanding between pain and mental health and emotions which is not an indication of pain specifically. Moreover, papers that were not about medical application of pain assessment were excluded too. The over all papers after all the exclusion were 12 papers as listed according to the year of publication in Table 1. Physiological parameter or biosensor used, medical problem targeted, IoT-based technology used and wither the paper worked on pain assessment or pain management or both were mentioned in Table 1. Figure 2: Numbers of papers published during the period 2017–2021 in the ScienceDirect database 126 As per Table 1 the “pain assessment” and “IoT” subject work started to increase after 2019. For instance, in 2020 (6/12) papers in pain assessment and IoT technology in medical application were published. Furthermore, (7/12) of the papers were on patients after surgeries especially orthopedic ones like joint replacement surgeries and in intensive care unit. Mostly, the reason behind that is poorly controlled post- operative pain correlated with prolonged duration of recovery, impairment of daily life and eventually increase morbidity, according to reference [24]. Therefore, continuous assessment and control of pain through applying of drug analgesia according to pain intensity is a cutting-edge subject that would cost lower health-care expenses in addition to adequate treatment and recovery. Furthermore, few papers were about specific disease and pain caused by them like tension-type headache (TTH) and Sickle cell disease. One paper was about remote rehabilitation of elbow and control of pain due excessive movement, through a feedback process. Fig. 3 shows an overview of the control architecture. Table 1: A list of the reviewed references according to year of publication. The physiological parameter or biosensor, medical problem, IoT-based technology and Pain monitoring and management are mentioned Physiological Year of IoT-based Pain Pain publication Parameter or Medical problem Technology monitoring management Ref. biosensor Facial expression Wi-Fi with a cloud 2016 using surface EMG Patient with pain serve Yes No [12] Mobile web Facial expression Intensive care 2018 using surface EMG unit patients application with Yes No [13] cloud server PPG depending on A model builds on Post operative 2019 pulse counting patient multiple logistic Yes No [14] analysis regression Physiological Year of IoT-based Pain Pain publication Parameter or Medical problem Technology monitoring management Ref. biosensor High-density pain- Auto encoder model 2020 evoked EEG Patient with pain based on CNN1 Yes No [15] potential 2 Sickle cell Four binary ML 2020 Clinical notes disease patient classifier Yes No [16] Peripheral blood flow and skin ability Several 2020 to conduct Patient with pain communication Yes No [17] electricity using protocol for IoT PPG and GSR Yes GSR, EMG and 2020 EEG signals TTH FOG computing Yes (Biofeedback [18] therapy) Remote elbow 2020 EMG signal rehabilitation Fuzzy logic Yes Yes [19] Force and sweat Indication of GSM through cloud 2020 sensor labor pain server Yes No [20] Electrodermal Post-operative 2021 activity of GSR patient ML algorithms Yes No [21] Post-operative 2021 PPG spectrogram pain in conscious CNN Yes No [22] patient Post-operative Heart rate and body bone and joint System based on Yes 2021 temperature replacement NOA3 Yes (Drug analgesia) [23] surgery 1 CNN is a convolutional neural network; 2 ML is a machine learning; 3 NOA is a neuro optimization algorithm. 127 Figure 3: Control architecture overview. Facial expression using a surface EMG biosensor for pain assessment was one of the technique used to quantify the pain, however no works were found after 2018. The reasons behind this is claimed to be that this technique faces several challenges related to data acquisition and development, on the other hand pain assessment system should be capable to be adapted according to patient facial morphology and texture [25]. However, Yang et al. [13] have designed a wearable mask based on surface EMG signal for continuous pain assessment as per Fig. 4. Figure 4: Facial mask for continuous pain assessment design concept and electrode embedded in addition to the complete wearable device Furthermore, a paper was about labor pain assessment using a belt around the belly that sense the sweat using a GSR sensor and the force generated by delivery contractions. Biosensors used in papers were 128 equally used in (4/12) for GSR, EMG and PPG, however EEG was the less commonly used due the artifacts and requirement of high data transmission rate and large storage capacity [17]. 4. Conclusions As a conclusion, pain monitoring and control is a worthy and wide-range research topic. The studies mentioned in this mini-review are poor in many aspect, for instance, number of applied patients, scale of pain level and connection with medication management system. However, several biosensors and IoT technologies have been covered by the researchers, but the effective application of the automated pain assessment is yet to come. This mini-review discussed a total of 12 paper in pain assessment ant management using IoT-technology in many medical applications. Future studies can be more precise in the medical application they targeted, for instance, considering cancer patients who suffers from sever pains and in need for medication control, also patients with high rate of heart stroke who suffers from severe chest pain and in need for immediate medical intervention. Furthermore, future studies concentration on Fog networking, that can support the big data structure and large cloud system with large geographical distribution are expected to further improve performance. 5. References 1. Tompkins, D.A.; Hobelmann, J.G.; Compton, P. Providing Chronic Pain Management in the “Fifth Vital Sign” Era: Historical and Treatment Perspectives on a Modern-Day Medical Dilemma. Drug and Alcohol Dependence 2017, 173, S11–S21, doi:10.1016/j.drugalcdep.2016.12.002. 2. Davis, K.D.; Aghaeepour, N.; Ahn, A.H.; Angst, M.S.; Borsook, D.; Brenton, A.; Burczynski, M.E.; Crean, C.; Edwards, R.; Gaudilliere, B.; et al. Discovery and Validation of Biomarkers to Aid the Development of Safe and Effective Pain Therapeutics: Challenges and Opportunities. Nat Rev Neurol 2020, 16, 381–400, doi:10.1038/s41582-020-0362-2. 3. Lazaridou, A.; Elbaridi, N.; Edwards, R.R.; Berde, C.B. Chapter 5 - Pain Assessment. In Essentials of Pain Medicine (Fourth Edition); Benzon, H.T., Raja, S.N., Liu, S.S., Fishman, S.M., Cohen, S.P., Eds.; Elsevier, 2018; pp. 39-46.e1 ISBN 978-0-323-40196-8. 4. Delgado, D.A.; Lambert, B.S.; Boutris, N.; McCulloch, P.C.; Robbins, A.B.; Moreno, M.R.; Harris, J.D. Validation of Digital Visual Analog Scale Pain Scoring With a Traditional Paper- Based Visual Analog Scale in Adults. J Am Acad Orthop Surg Glob Res Rev 2018, 2, e088, doi:10.5435/JAAOSGlobal-D-17-00088. 5. Barr, J.; Fraser, G.L.; Puntillo, K.; Ely, E.W.; Gélinas, C.; Dasta, J.F.; Davidson, J.E.; Devlin, J.W.; Kress, J.P.; Joffe, A.M.; et al. Clinical Practice Guidelines for the Management of Pain, Agitation, and Delirium in Adult Patients in the Intensive Care Unit. Critical Care Medicine 2013, 41, 263–306, doi:10.1097/CCM.0b013e3182783b72. 6. Candotti, C.T.; Loss, J.F.; Pressi, A.M.S.; Castro, F.A. de S.; La Torre, M.; Melo, M. de O.; Araújo, L.D.; Pasini, M. Electromyography for Assessment of Pain in Low Back Muscles. Phys Ther 2008, 88, 1061–1067, doi:10.2522/ptj.20070146. 7. Kasaeyan Naeini, E.; Subramanian, A.; Calderon, M.-D.; Zheng, K.; Dutt, N.; Liljeberg, P.; Salantera, S.; Nelson, A.M.; Rahmani, A.M. Pain Recognition With Electrocardiographic Features in Postoperative Patients: Method Validation Study. J Med Internet Res 2021, 23, e25079, doi:10.2196/25079. 129 8. Nir, R.-R.; Sinai, A.; Raz, E.; Sprecher, E.; Yarnitsky, D. Pain Assessment by Continuous EEG: Association between Subjective Perception of Tonic Pain and Peak Frequency of Alpha Oscillations during Stimulation and at Rest. Brain Res 2010, 1344, 77–86, doi:10.1016/j.brainres.2010.05.004. 9. Ye, J.-J.; Lee, K.-T.; Chou, Y.-Y.; Sie, H.-H.; Huang, R.-N.; Chuang, C.-C. Assessing Pain Intensity Using Photoplethysmography Signals in Chronic Myofascial Pain Syndrome. Pain Pract 2018, 18, 296–304, doi:10.1111/papr.12601. 10. Farahani, B.; Firouzi, F.; Chang, V.; Badaroglu, M.; Constant, N.; Mankodiya, K. Towards Fog-Driven IoT EHealth: Promises and Challenges of IoT in Medicine and Healthcare. Future Generation Computer Systems 2018, 78, 659–676, doi:10.1016/j.future.2017.04.036. 11. Mamdiwar, S.D.; R, A.; Shakruwala, Z.; Chadha, U.; Srinivasan, K.; Chang, C.-Y. Recent Advances on IoT-Assisted Wearable Sensor Systems for Healthcare Monitoring. Biosensors (Basel) 2021, 11, 372, doi:10.3390/bios11100372. 12. Jiang, M.; Gia, T.N.; Anzanpour, A.; Rahmani, A.-M.; Westerlund, T.; Salanterä, S.; Liljeberg, P.; Tenhunen, H. IoT-Based Remote Facial Expression Monitoring System with SEMG Signal. In Proceedings of the 2016 IEEE Sensors Applications Symposium (SAS); April 2016; pp. 1–6. 13. Yang, G.; Jiang, M.; Ouyang, W.; Ji, G.; Xie, H.; Rahmani, A.M.; Liljeberg, P.; Tenhunen, H. IoT-Based Remote Pain Monitoring System: From Device to Cloud Platform. IEEE Journal of Biomedical and Health Informatics 2018, 22, 1711–1719, doi:10.1109/JBHI.2017.2776351. 14. Seok, H.S.; Choi, B.-M.; Noh, G.-J.; Shin, H. Postoperative Pain Assessment Model Based on Pulse Contour Characteristics Analysis. IEEE Journal of Biomedical and Health Informatics 2019, 23, 2317–2324, doi:10.1109/JBHI.2018.2890482. 15. Wang, J.; Wei, M.; Zhang, L.; Huang, G.; Liang, Z.; Li, L.; Zhang, Z. An Autoencoder-Based Approach to Predict Subjective Pain Perception from High-Density Evoked EEG Potentials. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine Biology Society (EMBC); July 2020; pp. 1507–1511. 16. Alambo, A.; Andrew, R.; Gollarahalli, S.; Vaughn, J.; Banerjee, T.; Thirunarayan, K.; Abrams, D.; Shah, N. Measuring Pain in Sickle Cell Disease Using Clinical Text. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine Biology Society (EMBC); July 2020; pp. 5838–5841. 17. Rodríguez Rodríguez, J.J.; Castillo García, J.F.; Argüello Prada, E.J. Toward Automatic and Remote Monitoring of the Pain Experience: An Internet of Things (IoT) Approach. In Proceedings of the Applied Technologies; Botto-Tobar, M., Zambrano Vizuete, M., Torres- Carrión, P., Montes León, S., Pizarro Vásquez, G., Durakovic, B., Eds.; Springer International Publishing: Cham, 2020; pp. 194–206. 18. Rastogi, R.; Chaturvedi, D.K.; Gupta, M. Tension Type Headache: IOT and FOG Applications in Healthcare Using Different Biofeedback. In Fog Computing for Healthcare 4.0 Environments; Springer Nature Switzerland AG, 2020; pp. 315–385 ISBN 9781799821205. 19. Bouteraa, Y.; Ben Abdallah, I.; Ibrahim, A.; Ahanger, T.A. Development of an IoT-Based Solution Incorporating Biofeedback and Fuzzy Logic Control for Elbow Rehabilitation. Applied Sciences 2020, 10, 7793, doi:10.3390/app10217793. 20. Seles, S.C.; Shermi, S.D.; Soundarya, S.; Manickavasagam, M.R. Smart Maternal Real Time Monitoring Using IoT-Techniques. 2020, 07, 4. 21. Aqajari, S.A.H.; Cao, R.; Naeini, E.K.; Calderon, M.-D.; Zheng, K.; Dutt, N.; Liljeberg, P.; Salanterä, S.; Nelson, A.M.; Rahmani, A.M. Pain Assessment Tool With Electrodermal 130 Activity for Postoperative Patients: Method Validation Study. JMIR mHealth and uHealth 2021, 9, e25258, doi:10.2196/25258. 22. Choi, B.-M.; Yim, J.; Shin, H.; Noh, G. Novel Analgesic Index for Postoperative Pain Assessment Based on a Photoplethysmographic Spectrogram and Convolutional Neural Network: Observational Study. Journal of medical Internet research 2021, doi:10.2196/23920. 23. Li, Y.; Du, G.; Du, F.; Li, T. Construction of Hospital IoT Embedded System and Drug Analgesia after Bone and Joint Replacement. Microprocessors and Microsystems 2021, 82, 103917, doi:10.1016/j.micpro.2021.103917. 24. Gan, T.J. Poorly Controlled Postoperative Pain: Prevalence, Consequences, and Prevention. J Pain Res 2017, 10, 2287–2298, doi:10.2147/JPR.S144066. 25. Hassan, T.; Seus, D.; Wollenberg, J.; Weitz, K.; Kunz, M.; Lautenbacher, S.; Garbas, J.-U.; Schmid, U. Automatic Detection of Pain from Facial Expressions: A Survey. IEEE Trans Pattern Anal Mach Intell 2021, 43, 1815–1831, doi:10.1109/TPAMI.2019.2958341. 131