Biomedical Signal Processing and Artificial Intelligence in Healthcare Developments in Biomedical Engineering and Bioelectronics Series Biomedical Signal Processing and Artificial Intelligence in Healthcare Edited by Dr. Walid Zgallai Series Editor Dr. Dennis Fitzpatrick AcademicPressisanimprintofElsevier 125LondonWall,LondonEC2Y5AS,UnitedKingdom 525BStreet,Suite1650,SanDiego,CA92101,UnitedStates 50HampshireStreet,5thFloor,Cambridge,MA02139,UnitedStates TheBoulevard,LangfordLane,Kidlington,OxfordOX51GB,UnitedKingdom ©2020ElsevierInc.Allrightsreserved. Nopartofthispublicationmaybereproducedortransmittedinanyformorbyanymeans,electronicor mechanical,includingphotocopying,recording,oranyinformationstorageandretrievalsystem, withoutpermissioninwritingfromthepublisher.Detailsonhowtoseekpermission,furtherinformation aboutthePublisher’spermissionspoliciesandourarrangementswithorganizationssuchasthe CopyrightClearanceCenterandtheCopyrightLicensingAgency,canbefoundatourwebsite: www.elsevier.com/permissions. Thisbookandtheindividualcontributionscontainedinitareprotectedundercopyrightbythe Publisher(otherthanasmaybenotedherein). Notices Knowledgeandbestpracticeinthisfieldareconstantlychanging.Asnewresearchandexperience broadenourunderstanding,changesinresearchmethods,professionalpractices,ormedicaltreatment maybecomenecessary. Practitionersandresearchersmustalwaysrelyontheirownexperienceandknowledgeinevaluating andusinganyinformation,methods,compounds,orexperimentsdescribedherein.Inusingsuch informationormethodstheyshouldbemindfuloftheirownsafetyandthesafetyofothers,including partiesforwhomtheyhaveaprofessionalresponsibility. Tothefullestextentofthelaw,neitherthePublishernortheauthors,contributors,oreditors,assume anyliabilityforanyinjuryand/ordamagetopersonsorpropertyasamatterofproductsliability, negligenceorotherwise,orfromanyuseoroperationofanymethods,products,instructions,orideas containedinthematerialherein. LibraryofCongressCataloging-in-PublicationData AcatalogrecordforthisbookisavailablefromtheLibraryofCongress BritishLibraryCataloguing-in-PublicationData AcataloguerecordforthisbookisavailablefromtheBritishLibrary ISBN978-0-12-818946-7 ForinformationonallAcademicPresspublications visitourwebsiteathttps://www.elsevier.com/books-and-journals Publisher:MaraConner AcquisitionsEditor:FionaGeraghty EditorialProjectManager:JoshuaMearns ProductionProjectManager:PoulouseJoseph CoverDesigner:MatthewLimbert TypesetbySPiGlobal,India My contribution is dedicated to my parents, Mr. AbdulhamidZigalaie and Mrs. Amina Ibrahim. Dr. Walid Zgalllai Contributors Dr. NouraAlHinai Higher Colleges ofTechnology, Dubai, United Arab Emirates Dr. J. Teye Brown FacultyofEngineeringTechnologyandScience,HigherCollegesofTechnology, Dubai, United Arab Emirates Christoph Janott Munich School ofBioEngineering, TechnicalUniversity of Munich,Garching, Germany MusaSaniMusa Department ofBiomedical Engineering, FacultyofEngineering, Near East University, Nicosia,NorthernCyprus, Turkey MubarakTaiwo Mustapha DepartmentofBiomedicalEngineering,FacultyofEngineering;DESAMInstitute, Near East University, Nicosia,Northern Cyprus, Turkey Dr. Ilker Ozsahin DepartmentofBiomedicalEngineering,FacultyofEngineering;DESAMInstitute, Near East University, Nicosia,Northern Cyprus, Turkey Dr. DilberUzun Ozsahin DepartmentofBiomedicalEngineering,FacultyofEngineering;DESAMInstitute, Near East University, Nicosia,Northern Cyprus, Turkey Dr. Bashar Rajoub FacultyofEngineeringTechnologyandScience,HigherCollegesofTechnology, Dubai, United Arab Emirates Dr. BernaUzun DESAM Institute; Department ofMathematics, Near East University, Nicosia, Northern Cyprus, Turkey Dr. WalidZgallai FacultyofEngineeringTechnologyandScience,HigherCollegesofTechnology, Dubai, United Arab Emirates xiii Foreword This series on biomedical engineering provides an up-to-date and comprehensive reviewofthelatestinnovationswithinthefieldofbiomedicalengineeringandbioe- lectronics. Each book inthe series collectively brings togetherarticlesand supple- mentary learning materials to enhance or expand the reader’s knowledge of that subject.Eachsubjectiscomprehensivelyintroducedwithin-deptharticlesbylead- ing experts covering the latest technical innovations and biomedical engineering solutions. Thebookseriesisaimedatanybodywithaninterestinbiomedicalengineering and bioelectronics whether it is on an academic or a professional level. Students studying undergraduate or postgraduate courses will find the subject introductions invaluabletoenhancetheiracademicstudiesandresearchprojects.Professionalbio- medicalandotherengineersalikewillfindthattheyhaveaccesstothelatestup-to- datearticlesandin-depthreviewsintheirsubjectfield.Thebookswillbesupported byonlinemediamaterialtoincludeonlinepresentations,tutorials,applicationnotes, algorithms, andworking code examples. Biomedicalengineeringencompassesengineeringhardwareandsoftwareforthe diagnosisandremedyofmedicalconditionsanddiseasesassociatedwiththehuman body.Themeasurementandanalysisofphysiologicalsignalsinherentfromthebio- logicalsystemswithinthehumanbodycanhelpidentifythecauseandeffectofmed- icalconditions. Thefirstbookintheseries,BiomedicalSignalProcessingandArtificialIntelli- genceinHealthcare,providesanintroductiontothefoundationclassesofbiomedical signals based on the physiological recordings and measurements from the human body.Thebookthendevelopsthedifferenttechniquesusedtocaptureandanalyze thesephysiologicalsignalsusingthelatestartificialintelligencetechniquessuchas machine learning algorithmsthat analyze the hugeamountof data frombiological systemsandhumantraitstoprovideanunderstandingofthephysiologicalparame- ters.Thecomplexmodelsthataredevelopedultimatelyleadtothedevelopmentof therapeutictechniquesandmedicaldevicesforthetreatmentandtherapyofmedical conditions. Thesecondbookintheseries,DrugDeliveryDevicesandTherapeuticSystems, introducesthetechnologybehindtheincreasingnumberofbiomedicaldevicesthat areusedtodeliverdrugtherapyinthetreatmentofvariousmedicalconditionsand diseases.Thebookintroducesthetheorybehindmicrofluidicsandnanofluidicsand the MEMS technology used to fabricate micropumps, reservoirs, and actuators in implantable drug delivery systems. The release of therapeutic drugs can be con- trolled using a variety of external physical stimuli, the medication being adminis- tered to specific localized tissue sites or direct into the bloodstream, the spinal canal,orthesubarachnoidspace.Usingnanotechnology,nanoparticlescanbeused to carry anticancer drugs deep into tumors. The book also introduces drug-eluting stents;biodegradablehydrogels;andintranasalandtransdermaldrugdelivery,with xv xvi Foreword specificchaptersonmicroneedlesthatpiercetheskinusingsolidorhollowMEMS structuresandtheconverseneedle-freeinjectors.Finallythemaintherapeuticappli- cations of drug delivery systems are presented, including cancer, diabetes, Parkin- son’s disease, and epilepsy. The advancements in biomedical engineering provides not only more sophisti- cateddiagnostictechniquesbutalsomorerealistictechnologicalsolutionstothetreat- mentandtherapyofmedicalconditionsanddiseases.Thesebiomedicalengineering advancements will be coveredin subsequent volumes in the book series with each bookpresentingthelatestadvancesinbiomedicalengineeringandbioelectronics. Dr. DennisFitzpatrick Preface Book chapters The human body consists of a complex network of subsystems that perform vital physiological processes. Biomedical signals acquired from organs using multiple sensorscommunicateinformationaboutthephysiologicalprocessesandunderlying pathologies. Such measurements can be plotted against time on a patient’s chart. Analysis of these measurements provides useful information about the state of a patient’s health. Datamodelingandanalysistoolscanbeusedtoextractinformationfromsignals andrevealtheunderlyingpathologythatisreflectedbytherecordedsignals.Typi- callytheprocessstartswithextractingmeaningfulfeaturesfromthesignalandsub- sequentlyusingthesefeaturestolearnamodelthatrelatestheextractedfeaturesto specificconditions.However,duetothevastamountofdatarecordedandthelimited resources,physiciansnormallyendupinactuallymakingtreatmentdecisionsbased onobservingshortisolatedsnapshotsofbiomedicalsignals.Assuch,providingphy- sicians with reliable automated data analysis tools offers many potential benefits suchasprovidinguswithearlywarningsignsoftheonsetofheartattacks,improve clinical diagnostic accuracy, and help clinicians make correct and timely medical interventions. Chapter 1, hence, introduces the basics of biomedical signal processing. ThemainobjectiveofChapter2istointroducethereadertothefundamentalsof biomedicalsignalcharacterization.Featureengineering,featureextraction,generat- ingalternativerepresentationsofbiomedicalsignalsformthemaintheme.Wewill first examine time-series data and how to represent them mathematically. We will discussfeatureengineeringfromdifferentperspectives:First,webeginbystatistical featuregenerationusingstatisticalmoments.Next,wediscusstransform-basedfea- tureextractionusingtheFouriertransform,time-frequencyanalysis,principalcom- ponentanalysis,independentcomponentanalysis,andfactoranalysis.Theconcepts ofpowerspectrum,periodogram,anddimensionality reduction willbeintroduced, andexamplesofbiomedicalsignalswillbediscussed.Wewillalsodiscussfeature engineeringusingfeaturedescriptorandconcludewithadiscussionoffeatureselec- tion techniques. Chapter 3 focuses on different supervised and unsupervised machine learning algorithmsforbiomedicalsignalanalysis.Commonalgorithmsinsupervisedlearn- ing include classification and regression, where different algorithms will be explainedindetails,permittingtoeffectivelyproducecorrectoutputdata.Similarly, unsupervisedlearningalgorithmssuchasclusteringwillbediscussed.Performance ofmachinelearningmodelswillbeillustratedusingclassificationaccuracy,region operating characteristics, and area under the curve. Finally, applications in xvii xviii Preface biomedicalsignalprocessingwillbepresentedintheformofacasestudyforauto- mated detectionofQRS complex inECG signals based on temporal features. Chapter 4 focuses on machine learning (ML) in biomedical signal processing withECGapplicationsandtheadvantagesofmachinelearningtobiomedicalsignal analysis.ThetasksperformedonECGsignalsarecommonlygeneratedbythemus- clesoftheheartresultinginanelectricalsignal.Thisisconsideredasoneofthemost importantphysiologicalparametersforfeatureextractionofECG,anditisthemost essentialtaskinthemanualandautomatedECGanalysisforuseininstrumentssuch asECGmonitors,Holtertaperecordersandscanners,andambulatoryECGrecorders andanalyzers.Machinelearningapplicationsapplyartificialintelligenttoolssuchas neuralnetworks,geneticalgorithms,fuzzysystems,andexpertsystemsthatarefre- quentlyusedfordetectionanddiagnostictasks.Thischapterwillalsoaddresschal- lengesassociated with machinelearningapplications performed on ECG signals. Chapter5willdiscusshowtoapplydeeplearning,convolutionalneuralnetworks to process EEG signals in applications like controlling a robotic wheelchair. The processincludesobtainingrawelectroencephalogram(EEG)datainrealtimeutiliz- ing a brain-computer interface (BCI) device, providing a communication medium between brain activity signals and an external computer. These data are then pro- cessedusingthefastFouriertransformalgorithm(FFT).Toconverttheseprocessed dataintodataconducivetoprocessingwithconvolutionalneuralnetworks(CNNs), Python programming language and the NumPy and scikit-learn library are used. Finally, classification of the EEG data into four different commands is carried out using the popular TensorFlow and Keras machine learning libraries to train a con- volutionalneuralnetwork.Thechapterpresentsdeepconvolutionalneuralnetworks. ThisisfollowedbyexplainingthedeploymentofTensorflowandKerasinconvolu- tionalneuralnetworks.AstepbystepexplanationofacquiringEEGdatawithaBCI deviceispresented.DataprocessingandtrainingutilizingTensorflowandKerasis shown.Deploymentandrealtimeapplicationswithembeddedsystemsisintroduced. Thechapter offers alsoa tutorial on how towork with Pandas. Fuzzylogictechniqueoffersgoodsolutionswhenitcomestovaguenessinnat- urallanguageandseveralotherapplicationdomains.Thisisduetoitscharacteristics toconsidernotionsoftruthandfalsehoodinagradedfashionwhenitcomestorea- soningsystems.Variousdiseasesvarydifferentlyinbehavioramongpatients.Also, similarsymptomscanbecausedbydifferentdiseases,leadingtodifficultyindiag- nosisandasaresultinmedicaltreatment.Thereforetheapplicationoffuzzylogicin the medical field has gained popularity. For example, fuzzy expert systems were developedandtestedinhospitalstodiagnosediseasesaffectingthelungs,syndrome differentiation, and disease classification. Under vague conditions the physician requiresassistancetomakeadiagnosis.Thereforefuzzylogiccanbecombinedwith othermodelingapproachessuchasfuzzylinearprogrammingwhereitaimstodis- tribute several treatments to different disease population to minimize human productivity loss. Fuzzymultiple-criteriadecisionanalysis(MCDA)isanotherimportantaspectof operational research that has been employed in medicine because of its efficiency