Dr Jacques Bou Abdo

Keywords: Competent QoS-Aware and Energy Efficient Protocols Collaborative Body Sensor Networks, Routing and Quality of service Protocols, Adaptive sampling algorithms, Energy efficiency, Anomaly detection, Mobility

Body Sensor Networks (BSNs) are formed of medical sensors that gather physiological and activity data from the human body and its environment, and send them wirelessly to a personal device like Personal Digital Assistant (PDA) or a smartphone that acts as a gateway to health care. Collaborative Body Sensor Networks (CBSNs) are collection of BSNs that move in a given area and collaborate, interact and exchange data between each other to identify group activity, and monitor the status of single and multiple persons. In both BSN and CBNS networks, sending data with the highest Quality of Service (QoS) and performance metrics is crucial since the data sent affects people's life. For instance, the sensed physiological data should be sent reliably and with minimal delay to take appropriate actions before it is too late, and the energy consumption of nodes should be preserved as they have limited capacities and they are expected to serve for a long period of time. The QoS in BSNs and CBSNs largely depends on the choice of the Medium Access Control (MAC) protocols, the adopted routing schemes, and the efficient and accuracy of anomaly detection. The current MAC, routing and anomaly detection schemes proposed for BSNs and CBSNs in the literature present many limitations and open the door toward more research and propositions in these areas. Thus this thesis work focuses on three main axes. The first axe consists in studying and designing new and robust MAC algorithms able to address BSNs and CBSNs' challenges. Standard MAC protocols are compared in high traffic BSNs and a new MAC protocol is proposed REMERCIEMENTS First of all, I would like to thank the jury members, Dr. Ye-Qiong Song, Dr. Pascal Lorenz and Dr.

for such environments; then an emergency aware MAC scheme is presented to address the dynamic traffic requirements of BSN in ensuring delivery of emergency data within strict delay requirements, and energy efficiency of nodes during regular observations; moreover, a traffic and mobility aware MAC scheme is proposed for CBSNs to address both traffic and mobility requirements for these networks. The second axe consists in proposing a thorough and efficient routing scheme suitable for BSNs and CBSNs. First, different routing models are compared for CBSNs and a new routing scheme is proposed in the aim of reducing the delay of data delivery, and increasing the network throughput and the energy efficiency of nodes. The proposed scheme is then adapted to BSN's requirements to become a solid solution for the challenges faced by this network. The third axe involves proposing an adaptive sampling approach that guarantees high accuracy in the detection of emergency cases, while ensuring at the same time high energy efficiency of the sensors. In the three axes, the performance of the proposed schemes is qualitatively compared to existing algorithms in the literature; then simulations are carried a posteriori with respect to different performance metrics and under different scenarios to assess their efficiency and ability to face BSNs and CBSNs' challenges. Simulation results demonstrate that the proposed MAC, routing and anomaly detection schemes outperform the existing algorithms, and present strong solutions that satisfy BSNs and CBSNs' requirements.

INTRODUCTION 1.1/ MOTIVATION AND CONTRIBUTIONS

The fast development of IoT allowed Wireless Sensor Networks (WSNs) to become a popular field of research. WSN is a collection of distributed small computing devices called sensor nodes, capable of monitoring physical and environmental conditions and send the data to a central location called Base Station (BS) or sink node for analysis.

The strong evolution in medical sensors allowed the emergence of an important field of WSN called Body Sensor Network (BSN), in which small sensor nodes are implanted in or placed around the human body. These intelligent sensors gather physiological and activity data from the human body and its environment, and send them wirelessly to medical personnel, who will be able to identify the current state of the person, predict his future evolution, and make proper decisions.

BSNs are mostly used to monitor a single body. However, to support the development of collaborative applications such as sports teams, squad of soldiers, rescue teams, etc., where not only single assisted living monitoring is needed but also data exchange and cooperative processing among multiple BSNs should be managed, Collaborative Body Sensor Networks (CBSNs) were developed. CBSN is in fact a sub-category of Mobile WSN (MWSN) ; it is formed of multiple BSNs that move in a given area and collaborate, interact and exchange data between each other to identify group activity and monitor the status multiple persons to take appropriate actions.

Each of BSN and CBSN has its own challenges ; however, they both share the common objective of saving and enhancing people's lives. For this reason, in both networks, sending data to the BS with adequate Quality of Service (QoS) is very important. For instance, reliable data transmission with the lowest delay is crucial to take fast actions before it is too late. Also limiting the energy consumption of nodes is very important since they have very limited power.

Ensuring high QoS largely depends on the choice of the appropriate Medium Access Control (MAC) protocol. There are five standard MAC protocols for WSNs that are the basis of the protocols developed for both BSNs and CBSNs, namely : Static Time Division Multiple Access (Static-TDMA), Dynamic Time Division Multiple Access (DTDMA), Frequency Division Multiple Access (FDMA), Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA), and Direct Sequence Code Division Multiple Access (DS-CDMA). Even though many articles in the literature discuss the advantages and disadvantages of these protocols, none of them compare their performance under the same experimental conditions. Therefore, the first contribution of this thesis is to compare the performance of these standard protocols in a high traffic environment in BSN. Such scenario can be induced in case of emergency for example, since many sensors in the network will have to send their data simultaneously to the BS in order to properly access the person's situation and take appropriate actions. This study can also be extended to cover CBSN systems where information from different bodies is sent simultaneously leading to high traffic.

In BSN, two types of events are reported : periodic and emergency events. During periodic observations, the traffic rate is stable and low (between 1-20 packets/s) ; whereas when an emergency occurs, the traffic rate increases drastically (between 50-100 packets/s) [START_REF] Masud | Traffic adaptive mac protocols in wireless body area networks[END_REF], Salayma et al., 2016, Rezvani et al., 2012]. In periodic observations, the main aim is to increase the energy efficiency of the network ; whereas in emergency situations, the main aim is to send the critical data reliably and within strict delay requirements (less than 125 ms) [START_REF] Liu | Mac protocol in wireless body area networks for e-health : Challenges and a context-aware design[END_REF], Salayma et al., 2018]. Few MAC protocols were suggested in the literature to deal with emergency and dynamic traffic in BSN, however they present many limitations ; they either do not guarantee timely delivery of emergency data, or they fail in decreasing the energy consumption of nodes. Therefore, the second main contribution of this thesis is to propose an emergency aware MAC protocol that addresses the traffic requirements of BSNs through transmitting emergency data within strict delay limits, while maintaining high energy efficiency during periodic observation.

CBSNs face traffic challenges similar to those of BSNs. However, they also face an additional important challenge related to the mobility of nodes, since in CBSN nodes can move freely in a given area. Therefore, it is very important to design a dynamic MAC protocol that is able to adapt to both mobility and traffic variations in CBSN. The suggested MAC protocols found in the literature for MWSN present many limitations and do not face CBSNs' challenges. Therefore, the third contribution of this thesis is the proposition of an efficient hybrid Traffic and Mobility Aware MAC (TMA-MAC) protocol for CBSNs, that aims to address different traffic requirements and at the same time, to support nodes mobility.

Another main field that largely affects the QoS in BSNs and CBSNs is data routing. Ensuring data transmission over optimal paths is crucial to guarantee fast and reliable delivery of information, and with high energy efficiency. Thus there is a need to develop routing protocols that aim to decrease the propagation delay, the packet drop rate, as well as the energy consumption of nodes.

In general, routing models are divided into three categories : direct or single-hop, flat, and cluster-based. In the literature, many routing schemes based on these different models were suggested for MWSNs ; however, none is found to compare them specifically for CBSN applications. Therefore, as a fourth contribution of this thesis, we start by comparing the delay and energy consumption of these three models using CBSNs' experimental conditions to identify the most suitable one for these networks ; we then propose a competent and efficient routing protocol that is able to face CBSNs challenges and outperforms the existing routing protocols.

The proposed routing scheme can be also applied to BSNs. For this reason, our fifth contribution in this thesis is to adapt the proposed routing protocol to BSN requirements and present it as an efficient protocol that is able to overcome the limitations of the existing schemes in this field.

In BSNs, normal physiological data lies in specific ranges. When a sensed value is found to be out of its normal range, it can either indicate a sensor anomaly, or a critical case that should be treated as fast as possible. Thus, correct and fast detection of emergency cases are two main challenges of BSNs. This is in addition to the limited energy capacity of the sensors. Communicating data via the radio transceiver accounts for the major part of the energy consumption of nodes, and it mostly depends on the number of bits that are sent within the network [START_REF] Razzaque | Energy-efficient sensing in wireless sensor networks using compressed sensing[END_REF], Kumar et al., 2017]. Therefore, reducing the size of the transmitted data is very important to increase energy efficiency and prolong the sensors' lifetime. Addressing these challenges depends on two main points : appropriate choice of the anomaly detection method that guarantees reliable and accurate identification of emergencies, and proper design of a data reduction algorithm, i.e. a sampling algorithm, to reduce the sensors' energy consumption and to ensure fast detection of critical cases.

Several anomaly detection schemes and sampling algorithms are proposed in the literature for BSNs ; however none of them combine these two concepts together to address the different challenges simultaneously. Thus our sixth contribution in this thesis is the proposition of an adaptive sampling algorithm that adapts the sampling rate to the sensed data variance. Emergencies are therefore detected based on a reduced amount of data, and the corresponding sampling rate is dynamically adjusted according to the detected variation in the physiological parameters.

It worth noting that despite its great importance, security in BSNs and CBSNs will not be the subject of this manuscript, as it would require a full-fledged thesis by itself. The remaining of the thesis is composed of five parts. Part II formed of Chapter 2 is dedicated to give a general overview of BSNs and CBSNs. BSN architecture and applications are discussed and an exhaustive study on medical sensors is conducted. Also, a general overview on CBSNs' concept and architecture is presented, as well as its corresponding applications and challenges, the main differences between CBSNs and other sensor networks, and the open research issues in this network. A brief discussion on the importance of designing appropriate MAC, routing, and anomaly detection schemes is then introduced.

Part III discusses the MAC protocols for BSNs and CBSNs. This part is divided by itself to three chapters. Chapter 3 compares the performance of standard MAC protocols in high traffic BSN environments and proposes an efficient MAC scheme for high traffic BSNs. Chapter 4 proposes an emergency aware MAC protocol for BSNs and compares its performance to existing schemes for varying number of emergency nodes and varying payload sizes. Whereas Chapter 5 proposes a Traffic and Mobility Aware MAC (TMA-MAC) protocol for CBSNs and compares its performance to other proposed schemes in the literature.

Part IV tackles the routing protocols for BSNs and CBSNs. This part is formed of two chapters. Chapter 6 compares the different routing models for CBSN applications and proposes a robust routing scheme for such networks. The protocol design, simulations and comparison with different routing schemes found in the literature are presented. The proposed routing scheme is then adapted to fit BSN needs and challenges in Chapter 7, and different simulations were conducted in these two chapters to assess the performance of the proposed protocol.

Part V formed of Chapter 8 covers data sampling and anomaly detection in BSN, in which an adaptive data sampling approach based on the sensed data variations is proposed to increase the efficiency of emergency detection in BSNs while maintaining high accuracy of the system.

The conclusions drawn from this research work along with the future perspectives are finally presented in Part VI of this dissertation. In this part, a synopsis of BSNs and CBSNs is provided. We start by discussing BSN's architecture and applications and we provide an exhaustive study on medical sensors. Then, we explain CBSN's concept and architecture, present its corresponding applications and challenges, and compare it to other sensor networks namely WSN and BSN. CBSNs main challenges and open research issues are presented afterwards. This chapter ends by a concise discussion on the importance of designing appropriate MAC, routing, and anomaly detection schemes.

BSN AND CBSN -TAXONOMY AND SYNOPSIS

The rapid advances in medical sensors and micro-electronics allowed the emergence of a distinguished field of WSN called Body Sensor Network (BSN) or Wireless Body Sensor Network (WBSN), that allows monitoring the health status of a single person to take appropriate actions when needed. Furthermore, the pervasion of applications where multiple individuals' monitoring is required, such as monitoring employees status in hostile environment industries, supervising rescue teams condition and sports team performance, interactive games etc., has expanded the BSN scope and generated another WSN category named Collaborative BSN (CBSN).

Both BSNs and CBSNs have gained a lot of research interest lately due to their large applications. In this chapter, we present a synopsis of these two networks, and we then focus on the importance of maintaining high QoS in such networks. This chapter is therefore divided into three sections : Section 2.1 in which we present the architecture and applications of BSNs, and we conduct a study on medical sensors including their different types and characteristics, their communication technologies, and the available sensors in the market ; Section 2.2 in which we present CBSN's concept and architecture, and we show how it is distinguished from other types of sensor networks, in addition to discussing its different applications, challenges, and open research issues ; and Section 2.3 in which we discuss the importance of designing suitable MAC and routing protocols, along with appropriate anomaly detection schemes for both BSN and CBSN.

2.1/ BSN ARCHITECTURE AND TECHNOLOGIES

2.1.1/ INTRODUCTION

BSNs are formed of small computing devices called sensor nodes that can be implanted in or placed around the human body. These intelligent sensors collect physiological data from the body and its environment, and send them wirelessly to medical personnel through personal devices like Personal Digital Assistant (PDA) or smartphone, allowing continuous health monitoring of the current state of the person to make proper decisions [Martínez Ch ávez et al., 2019, Latr é et al., 2011].

A general architecture of BSN is shown in Figure 2.1.

13 FIGURE 2.1 -BSN General Architecture

2.1.2/ BSN APPLICATIONS

BSNs have numerous applications ranging from healthcare, to sports, entertainment, military, and different other areas involving the human body [START_REF] Khan | The state-of-the-art wireless body area sensor networks : A survey[END_REF], Javed et al., 2019]. Figure 2.2 illustrates the different BSN applications. It shows that in general, they are divided into two categories, medical and non-medical, as follows [START_REF] Movassaghi | Wireless body area networks : A survey[END_REF] : In medical applications, sensors collect physical attributes from the human body like blood pressure, respiration, and temperature to detect any anomaly as early as possible and take appropriate actions before it is too late. These applications can be generally subcategorized as implant, wearable, or remotely controlled BSNs as follows :

1. Implant BSNs : sensors can be implanted in the human body either under the skin or in the blood stream, to detect abnormalities like cancer, cardiovascular diseases, and diabetes control ; for instance, many devices were implanted in the human body like drug pumps, cardiac defibrillators, pacemakers, and neuro stimulators.

2.

Wearable BSNs : sensors can be placed on the human body to be used for various purposes like :

-Disability assistance : like fall detection and blinds' assistance in obstacles avoidance.

-Performance assessment : like soldiers' status evaluation in a battle and athletes' condition assessment during sports training.

-Anomaly detection : like asthma and heart beat problems.

3.

Remotely controlled BSNs : these networks consist of remotely controlled medical sensor devices that can be used in different applications such as :

-Providing Ambient Assisted Living (AAL) : it allows self-care with the help of modern technologies. AAL is mainly suitable for elderly and disabled people. It can therefore be found in smart homes and hospitals for longterm care.

-Telemedicine : it allows remote or long-distance delivery of healthcare services, such as health consultations, intervention, and reminders.

-Patient monitoring : it involves monitoring the physical activities of the person to predict his health status, since studies showed that these two parameters are significantly linked.

2.1.2.2/ NON-MEDICAL APPLICATIONS

Numerous non-medical applications are provide by BSNs ; examples include the following :

-Emotion detection applications : it involves assessing the human emotions through visual and speech data analysis. More specifically, wearable sensors can measure signals induced by the body when exposed to a certain condition. For example, the respiration and heart rates increase with fear ; therefore in this case, respiration or heart rate sensors can be used to detect the emotional state of the person.

-Secure authentication : it involves using physiological or behavioral biometrics like fingerprints, voice, iris recognition for locking and unlocking smartphones and laptops, in the banking sector, and any other secure service.

-Entertainment applications : sensors can be activated based on the person's activity or posture, like turning an enthusiastic music while exercising, and a calm music while resting on the bed ; or starting playing a certain type of videos on the TV while doing sports, etc.

CHAPITRE 2. BSN AND CBSN -TAXONOMY AND SYNOPSIS

-Non-medical emergencies : through gathering data from the environment and warning people in case of disaster or danger like fire or possibility of flood.

2.1.3/ SENSORS TYPES AND PROPERTIES

There are numerous sensors used in BSN applications. Table 2.1 summarizes the most used sensors along with their position [START_REF] Lai | A survey of body sensor networks[END_REF]. Depending on their type, sensors are either placed on the human body (wearable), or in the surrounding, or implanted inside the human body. These sensors include the accelerometer that is used to perceive the expenditure of human energy, the artificial cochlea utilized for hearing aid, the artificial retina used for visual aid, the camera pill deployed to monitor the gastrointestinal track, the carbon dioxide sensor used to measure the content of carbon dioxide from various gas, the Electrocardiogram (ECG) utilized to detect heart diseases, the Electroencephalogram (EEG) used to detect brain anomalies, and the Electromyography (EMG) deployed to perceive muscles and nerve cells problems. This is in addition to many other sensors measuring blood pressure, humidity, blood oxygen, pressure, respiration, and temperature.

Sensor nodes possess unique characteristics resulting from their application purposes. They usually have the following properties [Latr é et al., 2011] :

-The size of the sensor nodes is very small (not more than 1 cm 3 ), thus the battery size inside sensors is miniature and the energy available is often restricted. Also, sensors are requested to serve for a long period of time, and it is very hard to replace sensors' batteries specially when they are implanted inside the human body. Therefore, finding ways to reduce energy consumption and to harvest additional energy is always needed in medical sensors.

-Sensor nodes are usually heterogeneous and require different data rates, bandwidth, and energy resources from the network depending on the type of data they are collecting. Table 2.2 illustrates sensors' heterogeneity based on the different data rate requirements [START_REF] Movassaghi | Wireless body area networks : A survey[END_REF], Lai et al., 2013]. The table shows that the data rate can vary considerably from few Kbps to several Mbps.

-There are no redundant nodes. All nodes have the same level of importance and are added depending on their need in the application.

-Nodes have very limited transmit power in order to avoid interference and to address health concerns.

-Nodes should support self-organization and self-maintenance characteristics since they are usually operated by medical staff and not engineers. Once a node is added to the human body and turned on, it should be able to join the network and set up connections without any involvement.

2.1.4/ SENSORS' WIRELESS COMMUNICATION TECHNOLOGIES

In general, there are three types of networks formed by the sensors wireless communication [START_REF] Caytiles | A study of the design of wireless medical sensor network based u-healthcare system[END_REF], Hamida et al., 2015] :

Wearable Humidity sensor

Using changes in capacitance and resistivity caused by humidity variations to measure humidity.

Wearable

Blood oxygen saturation sensor Computing the ratio of absorption of infrared and red light passing through a thin part of human body to measure blood oxygen saturation.

Wearable

Pressure sensor Using piezoelectric effect of dielectric medium to measure the value of pressure.

Wearable/ Surrounding

Respiration sensor Perceiving the expansion and contraction of chest or abdomen to assess the respiration.

Wearable

Temperature sensor

Using the variations in the physical properties of materials to measure temperature.

Wearable

Visual sensor Assessing different parameters like length, area, and location.

Wearable/ Surrounding -In-body network communication : used for communication between wearable sensors, or between implanted sensors in the body and the receiver located outside the body.

-On-body network communication : used for communication between wearable sensors and the coordinator or sink device used to gather data and transfer sensing -External Network communication : Used for communication between the coordinator and a remote back-end server.

2.1.5/ AVAILABLE SENSORS IN THE MARKET

There are many companies specialized in wearable medical sensors designed to collect data from the human body and the surrounding environment. Table 2.4 presents the sensors provided by some of the well-known companies in the sensor business, along with the corresponding connection type [mov, 2019, shi, 2019, tec, 2019, mc1, 2019, wit, 2019, equ, 2019, som, 2019, vit, 2019, stm, 2019]. Table 2.4 shows that the parameters captured by these sensors include body temperature, ECG and activity sensor, EMG, respiration, heart rate estimate, weight, force, amount of oxygen in the blood (SpO2), humidity, body position, fall alert, invasive blood pressure, barometric air pressure, and ambient light acquisition. It also shows that most sensors send the collected data via Bluetooth Low Energy (BLE).

Some sensors have micro-USB interface, and many sensors are equipped with microSD card for local storage of data. In addition, many sensors are provided with external connector to connect to an external dock used to program and charge the sensor and to access the microSD card, whereas few others have digital serial interfaces. In this section, BSN architecture and applications were introduced ; then, an exhaustive study of medical sensors was presented, starting by identifying their different types, to discussing their properties and presenting the wireless communication technologies they use to send collected data. Also, the wearable medical sensors available on the market were listed along with their communication interface, in order to make it easier for the end user to select the appropriate sensor brand available on the market based on the type of data collected by the sensor and its interface and connection type.

2.2/ FROM BSN TO CBSN

2.2.1/ INTRODUCTION

The increased demand for simultaneous monitoring of multiple individuals, coupled with the advancements in low power electronics, allowed to go beyond BSNs and to generate Collaborative Body Sensor Networks (CBSNs) in which data is gathered and analyzed from multiple bodies rather than a single body to take actions accordingly. Even though there are several researches about single BSNs, little studies were found to cover CBSNs.

In fact, CBSN is still in its early phases and strong understanding of its architecture and techniques are still lacking. This section taxonomizes CBSN and provides a clear definition of its concept, architecture, and applications. It identifies the different challenges facing this type of networks and outlines the corresponding open research issues. The aim of this study is to show the unique features that distinguish CBSN from other sensor networks to help in directing researches toward developing new protocols and algorithms appropriate for this field.

2.2.2/ CBSN CONCEPT AND ARCHITECTURE

CBSN is a network formed of multiple BSNs able to collaborate and synchronize among each other to reach a common objective. This interaction between BSNs allows the development of collaborative applications like interactive games, supervising the condition of rescue teams and the performance of sports teams, where instead of single individual monitoring, exchanging data and cooperative processing between many BSNs is a must to detect the activity of a group, identify the events perceived by many persons, and monitor the health of many individuals at the same time [Fortino et al., 2015, Augimeri et al., 2011]. CBSN is a category of WSN, and more specifically, it is considered a subset of Mobile WSN (MWSN) since the composing BSNs can move freely in the network [Boudargham et al., 2019a].

The basic architecture of CBSNs is presented in Fig. 2.3 [START_REF] Augimeri | Collaborative body sensor networks[END_REF].

CBSN follows a Multiple Body-Multiple Base Station (MB-MBS) architecture. It is formed of multiple nodes, where every node is a Body Sensor Network (BSN) composed of many wireless sensors that collect physiological data from the human body and send them to the BSN's own Control Unit (CU) or sink node [Boudargham et al., 2017]. These CUs There are three types of collaboration in CBSN depending on the way different sensors collaborate between each other [START_REF] Li | Collaborative wireless sensor networks : A survey[END_REF] :

-Cooperation-based collaboration : Where different nodes cooperate between each other based on their level of contribution to the objective, such as collaborative sensing.

-Competition-based collaboration : Where nodes participate in the collaboration process based on their competitive potentials such as scheduling resources.

-Self-organization collaboration : Where the cooperation process is induced and controlled by on the spot sensing in special conditions.

2.2.3/ CBSN APPLICATIONS

In general, CBSN applications can be classified into two categories [START_REF] Li | Collaborative wireless sensor networks : A survey[END_REF] :

-Collaboration-based WSN : Where the collaboration techniques are used to find solutions to WSN issues like finding ways to minimize energy consumption, increase security, enhance coverage and develop new localization schemes.

-WSN-based collaboration : Where the wireless sensor networks cooperate in order to provide services like locating and following mobile objects and monitoring specific targets.

In CBSN, there is a variety of applications where monitoring single body is no longer enough to reach the objective. Such applications include [Fortino et al., 2015] :

-Emergency : Monitoring the status of the rescue team and of the environment in emergencies like fire, earthquakes and landslides.

-Industries : Monitoring the status of the employees working in hostile environments like nuclear plants, blast furnaces, etc.

-Sports : Monitoring the status of every team member to assess the team's performance and activity, like submarines divers, football players, etc.

-Social interaction : Studying the behavior and interaction between multiple persons through emotion and stress detection.

-Entertainment : Developing interactive human/computer games involving real time activity between multiple individuals.

-Healthcare : Monitoring the vital signs of many individuals simultaneously, like patients in emergency rooms, elders in hospital /care facility, etc. and assist them remotely.

-Military : Monitoring the status of the army in war zones, and providing them with directions remotely to reduce the risk of injuries.

2.2.4/ COMPARISON BETWEEN WSN, BSN, AND CBSN

In order to illustrate the differences between CBSN and other types of sensor networks, a comparison between WSN, BSN, and CBSN is summarized in Table 2. 5 [Al Masud, 2013, Batra et al., 2010, Siddiqui et al., 2012, Agarwal, 2015, Rawat et al., 2014, Singh et al., 2013, Hayajneh et al., 2014, Hamida et al., 2015]. The comparison is performed with respect to different network requirements including scale and operating space, network coverage, network size, nodes' lifetime, nodes' size, network topology, result accuracy, data rates, nodes and battery replacement, mobility, latency, energy scavenging source, security level, target frequency bands, sensor type, wireless technology, network architecture, scalability, and finally environment conditions. To guarantee a robust and reliable network able to gather and deliver data with high QoS measures, CBSN needs to address the following challenges :

-High mobility : CBSN consists of monitoring multiple bodies that can move constantly. One of the challenges in CBSN is to send data reliably, with the lowest delay, highest throughput and energy efficiency, in a network where not only nodes placed on one body change location as the person moves, but also different bodies move in different directions, creating unpredictable mobility patterns and leading to highly dynamic network topology.

-High scalability requirements [START_REF] Balen | Quality of service in wireless sensor networks : a survey and related patents[END_REF] : unlike BSN, the number of nodes in CBSN is not limited and can reach thousands of devices, as more bodies, each holding many sensors, can join the network. Therefore, the QoS measures are highly affected in the design of a high scalable CBSN.

-Coverage and connectivity issues [START_REF] Khemakehm | Collaborative wireless sensor network simulation[END_REF] : the coverage area for CBSN is very large ; and many CBSNs applications occur in hostile and extreme environments, like in war zones, wildfires, underwater, etc. This harsh and dynamic environment strongly affects the connectivity between the nodes. Signal might be scattered, defused and weakened before reaching its destination. Thus ensuring the reception of the correct information with minimal delay becomes a challenge in CBSN. Different network architectures, protocols, routing algorithms, data processing, and sensing methods should be presented to guarantee that data reaches its destination, without compromising important QoS metrics like delay and energy consumption.

-Complex security requirements : security is one of the most important QoS metrics in CBSN. It encloses both data protection and data privacy. Challenges in CBSN security arise from the presence of large number of wireless sensors, each carrying data that should be protected from malicious attacks to prevent tempering with the information, and to keep the information private and confidential. This requires the development of complex security algorithms, without overcrowding the network or consuming too much energy.

-Limited power of nodes [START_REF] Khemakehm | Collaborative wireless sensor network simulation[END_REF] : sensors in CBSN have limited power ; therefore, energy constraints should be always kept in mind when choosing MAC protocols, routing and localization algorithms, security systems, etc.

-Heterogeneous traffic and irregular traffic pattern [START_REF] Balen | Quality of service in wireless sensor networks : a survey and related patents[END_REF] : traffic sent by nodes in CBSN varies from few Kbps up to 10 Mbps in one network. Also, traffic pattern is unpredictable ; the network can encounter burst of data at one time, and a decrease in the data frequency at other times. Therefore, CBSN system designs should be highly flexible to accommodate traffic heterogeneity and to send data reliably regardless to traffic fluctuation.

2.2.6/ OPEN RESEARCH ISSUES IN CBSN

The challenges faced by CBSN and listed in Section 2.2.5 open the door to many research areas. The following presents a summary on the major research issues to achieve efficient, robust and reliable CBSN.

2.2.6.1/ SENSOR NODES

Research issues related to sensors in CBSN include [START_REF] Lai | A survey of body sensor networks[END_REF] :

-Energy control schemes : low power designs of sensors are needed to increase their lifetime. This includes designing low-power architecture, low-power processor, and low-power transceiver. This is in addition to the development of appropriate energy harvesting methods.

-Fault diagnosis methods : includes developing new fault detection algorithms to identify and isolate any node failure that would affect the QoS of the system.

-Node placement schemes : node placement optimization is needed to reduce the number of sensor nodes, thus reducing the cost, saving energy, and reducing data redundancy.

-Wearability improvement designs : aims to decrease the size of sensor nodes in order not to affect everyday life and remove any possibility of harming the human body as a result of long-time use.

-New sensors design : design of new types of sensors to cope with new discovery of physical parameters.

-Improved measurement accuracy methods : through studying the factors that affect the wireless communication like the person's weight and age, sensors position and their ability of reduce noise.

-Sensor antennas designs : includes designing low cost antennas, made of safe and biologically compatible materials, and with good wireless communication capabilities that can communicate over longer distances since CBSN spans a large area.

Therefore, developing collaborative energy efficient and lightweight data gathering schemes is necessary to reduce the load of processors [START_REF] Lai | A survey of body sensor networks[END_REF]. In addition, CBSNs span large coverage areas and may operate in dynamic and sometimes extreme environmental conditions. Therefore, the design of reliable and robust data fusion schemes is mandatory. -Able to control sources of delay and energy consumption, like collisions, overhearing, overheads, idle listening, and over-emitting, high processing and extensive computational requirements.

-Able to maintain high reliability and good QoS in high traffic environments present in CBSNs.

-Show high level of flexibility to adding more nodes and more single BSNs to the system.

-Simple and easy to implement. Choosing a MAC protocol with low hardware complexity and synchronization requirements is important specially that CBSN is a sizable network.

2.2.6.4/ ROUTING

In a dynamic network where nodes move with the interveners, their number is not fixed, each node only has a local view of the network and can only perform small tasks due to energy constraints, there is a need to develop QoS aware routing schemes to guarantee a reliable and efficient data delivery. In general, routing schemes should satisfy the following QoS characteristics : low path latency/delay, high routing reliability, high energy efficiency, low congestion probability, low routing control overhead, and minimum cost forwarding. Thus, developed routing algorithms in CBSN should [START_REF] Zhu | Collaborative wireless sensor networks and applications[END_REF], Al Masud, 2013] :

-Adapt to the dynamic network.

-Account local interactions, noise and collisions.

-Tolerate network failures when the area of intervention is extended.

-Guarantee data delivery even when the network changes in space and time.

-Achieve the load balancing of the network to prevent a node from becoming too central and thus too stressed in order to increase the nodes' lifetime.

-Guarantee temperature and heat control.

In addition, there is a need to explore which routing structure provides the best QoS for CBSN : single hop or multi hop ; flat, hierarchical (cluster based), or location based. Also, new routing operation schemes should be developed, including cluster head selection criteria, and path discovery and selection within the chosen structure.

2.2.6.5/ INTER-BSN COMMUNICATION

Since CBSN involves multiple bodies, new inter-communication models should be proposed to allow every BSN to detect its neighbors and the services provided by them efficiently and dynamically, especially that bodies in CBSN are in motion and neighbors might frequently change.

2.2.6.6/ COVERAGE AND CONNECTIVITY

CBSN are large networks, however studies on the maximum practical network capacity, path cost, ways to increase connectivity reliability and robustness, and ways to provide and maintain good coverage are still lacking.

2.2.6.7/ LOCALIZATION AND TRACKING

The environment around CBSN is dynamic, and can become hostile and extreme like in war zone and wildfire. Therefore, developing collaborative localization and tracking algorithms is important to locate injured persons, or track important objects. Signals in CBSN can be scattered, reflected, and diffracted due to environment's alteration and nodes' mobility [START_REF] Rehman | A survey on indoor localization techniques in wireless body area sensor networks[END_REF], introducing a challenge to estimate the correct distances and to compute the position of nodes. Developing cooperative and distributed localization schemes can actually be the solution of many localization problems and lead to reliable node's tracking [START_REF] Li | Collaborative wireless sensor networks : A survey[END_REF] The energy constraints of sensors in CBSN introduce two main concerns : ways to supply power to the nodes, and ways to minimize energy consumption of these nodes to increase their lifetime. Supplying power to nodes can be achieved through developing new collaborative energy harvesting models, where cooperating nodes can exchange and balance the harvested energy information between each other. Whereas minimizing energy consumption of nodes requires the development of energy-aware schemes in all research areas of CBSN, such as CBSN architecture design, the choice of protocols and algorithms, data sensing and processing, nodes' tracking and localization, security methods, etc.

2.2.6.9/ SECURITY Protecting different types of networks from intrusions and attacks is usually a challenging task [Guyeux et al., 2015]. So how about ensuring reliable security for CBSNs that are large and very dynamic ? Complex security algorithms will be needed to ensure that data is sent safely and people's privacy is maintained. Developing cooperative security algorithms is one of the most important research areas in CBSN. Example of cooperative security includes sending different parts of the message over different paths in a way that no node along the path will receive the complete message. Collaborative security schemes can be used to protect data efficiently, without costing the network too much energy [START_REF] Zhu | Collaborative wireless sensor networks and applications[END_REF].

2.2.7/ CONCLUSION

In this section, CBSN was investigated. The corresponding concept, architecture and applications were discussed, and a comparison between CBSN, WSN, and BSN was presented. The main challenges and some open research issues were also discussed in order to highlight on the wide areas that still need to be studied in CBSN.

2.3/ IMPORTANCE OF MAC, ROUTING AND ANOMALY DETECTION IN BSN AND CBSN

The main aim of both BSNs and CBSNs is to enhance people's lives. In these networks, the sensed physiological data is very critical as it might make a difference on the patient's life or death. For this reason, it is very important to ensure high QoS for these networks.

In fact, developing reliable BSNs and CBSNs that guarantee delivery of data to the BS with the lowest delay and highest throughput is crucial.

Also, as discussed earlier, the physiological sensors have limited power due to their small size, and it is very hard to replace their batteries specially when they are implanted in the body. Therefore, these sensors are required to serve for a long period of time, which necessitates finding ways to preserve the energy of these sensors.

Under these various constraints, there are many factors that should be considered on both the hardware and software levels. Some of these factors include the design and development of reliable delay and energy efficient MAC and routing protocols in the network layer, and suitable anomaly detection schemes in the application layer.

For instance, designing efficient MAC protocols is of prime importance as it coordinates the access of nodes to a shared medium [START_REF] Qi | Mac protocol in wireless body area network for mobile health : a survey and an architecture design[END_REF]. Choosing inappropriate MAC scheme may result in collisions and re-transmissions of data packets, and may force data to wait in queues for a long time before accessing the medium, which will eventually cause very high delays and increased energy consumption of nodes, and will therefore lead to dire consequences.

Moreover, the main role of the routing protocols is to identify the routes in the network so that nodes can exchange data efficiently between each other [START_REF] Bhanumathi | A guide for the selection of routing protocols in wban for healthcare applications[END_REF] ; thus it is crucial to design routing schemes that guarantee reliable and fast delivery of data to the BS to take appropriate actions before it is too late, while maintaining low energy consumption of nodes.

Furthermore, fast and correct detection of emergencies while maintaining low energy consumption of sensors are essential requirements of BSNs. Therefore, designing appropriate anomaly detection schemes are inevitable to save people's lives.

In light of the above, the remaining of the manuscript will focus on discussing and proposing appropriate MAC and routing protocols for BSNs and CBSNs, as well as presenting an efficient anomaly detection scheme for BSNs. [START_REF] Yang | Energy efficiency tdma/csma hybrid protocol with power control for wsn[END_REF], MOHD et al., 2019, Vishal et al., 2019, Muzakkari et al., 2018, ashjad et al., 2019, Linck, 2019, Nando et al., 2019, Khan et al., 2012[START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF], Jovanovic et al., 2014, Ullah et al., 2009, Pourmohseni et al., 2013[START_REF] Rom | Multiple access protocols : performance and analysis[END_REF], Abtahi et al., 2000, Ma et al., 2014, Escribano, 2015, Benvenuto et al., 2011, Jiang et al., 2010, Bagad, 2007, Demirkol et al., 2006, Singal, 2010, Fazel et al., 2008, Filipe et al., 2015, Gopalan et al., 2010b, Qi et al., 2016, Liu et al., 2017, Rahim et al., 2012, Gopalan et al., 2010a]. However, none of these researches compare them simultaneously under the same experimental conditions. In this study, each of the listed protocols is analyzed and compared with respect to seven QoS and network performance metrics :

-delay ; The aim of this comparison is to show which technique offers the lowest delay, probability of collision, and energy consumption, and the highest scalability and throughput, while maintaining minimal hardware complexity and time synchronization requirements, in a high traffic environment in BSN. Such scenario can be induced in case of emergency for example, where physiological data collected from many sensors should be sent simultaneously to properly assess the person's case and take action accordingly. This study can also be extended to cover CBSN systems where information from different bodies is sent simultaneously leading to high traffic.

This section is organized as follows. A general review of basic MAC protocols for BSN is presented in Section 3.2. A survey on QoS performance of different MAC protocols is summarized in Section 3.3. The experimental evaluation of the five protocols is presented in Section 3.4. The proposed solution is explained in Section 3.5. The performance evaluation of the proposed solution is presented in Section 3.6, while conclusions are drawn in Section 3.7.

3.2/ GENERAL REVIEW OF MAC PROTOCOLS IN BSN

There are two main classes for MAC protocols : "contention-based" and "contention-free". In "contention-based" protocols, also known as "random access" protocols, nodes do not coordinate with each other to access the channel ; so transmitted data may collide, forcing colliding nodes to backoff for a certain time before trying to access the channel again. CSMA/CA is an example of "contention-based" protocols. As for "contentionfree" protocols, nodes follow a certain schedule to avoid collisions during transmission. Examples of "contention-free" protocols include Static-TDMA, DTDMA, FDMA, and DS-CDMA [START_REF] Busch | Contention-free mac protocols for wireless sensor networks[END_REF], Boudargham et al., 2016].

3.2.1/ CSMA/CA

CSMA/CA is a random "contention-based" protocol. It is commonly known as the ON DEMAND access protocol since the sensor node accesses the transmission channel only when it has some information to send [START_REF] Khan | Wireless body area network (wban) design techniques and performance evaluation[END_REF]. Traditionally, CSMA nodes sense the medium prior to transmitting data. If the medium is free, they transmit the packet. However, a "hidden problem" might occur in this case if another node is already sending data at the same time and will eventually result in collision [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF]. CSMA/CA is an enhancement over the traditional CSMA protocol in terms of collision avoidance capability. Improved CSMA/CA algorithm is shown in Figure 3.1. When a sensor node has data to send, it first senses the channel. If the channel is busy, the node waits for a random backoff time ; once the channel is free, the node sends RTS (Request To Send) packet to the intended destination and waits to receive back a CTS (Clear To Send) packet. Receiving CTS indicates that it is safe to send information over the channel and therefore, data is transmitted to the destination. Otherwise, the sensor node goes to backoff time and waits till the channel is free again [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF], Boudargham et al., 2016, ashjad et al., 2019].

3.2.2/ STATIC-TDMA

Static-TDMA is a scheduled "contention-free" protocol in which the time frame is divided into dedicated time slots. Every slot is assigned to a sensor node and each node sends data in succession one after another during its corresponding slot [START_REF] Jovanovic | Reduced-frame tdma protocols for wireless sensor networks[END_REF], Boudargham et al., 2016]. The Static-TDMA access scheme is presented in Figure 3.

3.2.3/ DTDMA

In DTDMA, also known as Reservation-Based TDMA, a variable number of time slots is dynamically reserved to different nodes using a scheduling algorithm based on the traffic demand of each data stream. Slots are therefore reserved to the nodes encountering high traffic (buffered packets) and are released from other nodes after completing the data transmission and reception [START_REF] Ullah | A study of mac protocols for wbans[END_REF]. The DTDMA access scheme is shown in Figure 3.

3.2.4/ FDMA

FDMA is another "contention-free" protocol in which nodes are assigned different frequency bands to transmit their data through the medium. Each frequency band is separated from its adjacent bands by a guard band to avoid interference. Therefore, nodes can transmit their data without any need for further process [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF], Boudargham et al., 2016]. The FDMA access scheme is shown in Figure 3.4 [acc, 2019]. In DS-CDMA, every node is assigned a unique code [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF]. All nodes send their data over the same frequency, but they are still distinguished from one another by the different codes assigned to them. The user's generated code is multiplied with the user's original signal to form his encoded signal, i.e., encoded signal = (original signal) x (code). Hence the nomination Direct Sequence-CDMA or DS-CDMA [Boudargham et al., 2016]. The DS-CDMA access scheme is shown in Figure 3.5 [acc, 2019]. Reliability in BSN is very important, and the performance of many QoS and network performance metrics is crucial in high traffic BSN systems. In the following, we combine the findings from different studies analyzing the performance of Static-TDMA, DTDMA, FDMA, CSMA/CA, and DS-CDMA with respect to delay, scalability, throughput, synchronization requirements, probability of collision, hardware complexity, and energy consumption. As mentioned earlier, many articles discuss the QoS and performance characteristics of MAC protocols, but none of these research works compare the five protocols concurrently in the same environment.

3.3.1/ DELAY ANALYSIS

End-to-end delay is a major key performance metric in critical healthcare applications [START_REF] Barua | Secure and quality of service assurance scheduling scheme for wban with application to ehealth[END_REF]. Studying the delay performance of different MAC protocols is specifically important in emergency cases requiring simultaneous transmission of critical data from all sensors in or on the body to take fast action accordingly. Rom et al. [START_REF] Rom | Multiple access protocols : performance and analysis[END_REF] present a comparison between FDMA and Static-TDMA techniques. They demonstrate that in general, Static-TDMA induces less delay than FDMA since the transmission of a TDMA packet takes only one slot, whereas the transmission in FDMA lasts for a whole frame. Also, authors prove that the difference in delay between the two protocols is variable since in Static-TDMA, a packet has to wait for its appropriate slot even when the queue is empty, whereas the packet is instantly transmitted without further delay in FDMA. Nevertheless, this same literature proves that when the load increases, the ratio of the delays of both schemes become close to one, so Static-TDMA and FDMA will have similar performances. Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF] state that in Static-TDMA, the generated packets experience three types of delays before reaching the receiver : transmission delay, queuing delay, and propagation delay. In this literature, a comparison of delay as a function of throughput in BSN is assessed for various protocols including Static-TDMA, FDMA, and CSMA/CA. The comparison shows that in low traffic, both Static-TDMA and FDMA offer low delay, and Static-TDMA outperforms FDMA. However, the delay significantly increases in both schemes when the load increases. As for CSMA/CA, the delay is the highest among the other protocols even when the traffic is low, since CSMA/CA continuously senses the medium and waits for it to become free before transmitting the packets. Jovanovic et al. [START_REF] Jovanovic | Reduced-frame tdma protocols for wireless sensor networks[END_REF] examine the delay characteristics of different protocols used in Wireless Sensor Networks under varying traffic loads. They show that the average message delay of Static-TDMA increases with increasing traffic load due to queuing that is originated from the limited bandwidth available, since every node is transmitting one message per frame. The authors also explain that the delay induced by CSMA/CA is due to two factors : the "contention-based" nature of CSMA/CA when the node renounces from sending its data after finding the channel busy, and the retransmission of the messages due to collision. Also, authors of [ashjad et al., 2019] state that when using CSMA/CA, if the channel is reserved, long latency is experienced by the node as it becomes idle. Abtahi et al. [START_REF] Abtahi | Comparison of cdma and tdma in awgn channels[END_REF] analyze the performance of DS-CDMA and Static-TDMA when bursty voice traffic is sent, and prove that even though Static-TDMA outperforms DS-CDMA in low traffic, the delay of DS-CDMA when bursty data is applied is much lower than that of Static-TDMA. [START_REF] Ma | Hybrid tdma/cdma mac protocol for wireless sensor networks[END_REF] compare DS-CDMA based protocols to other protocols in Wireless Sensor Networks and state that the delay of DS-CDMA is induced by assigning different codes for every node. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] introduce a DTDMA scheme for BSN, and show that the delay in DTDMA is lowest one realizable by TDMA mechanism.

Table 3.1 summarizes the protocols studied in every reference in terms of delay. It shows that none of the references compared the delay performance of the five protocols simultaneously. Table 3.2 presents the delay analysis results based on the literature findings [Boudargham et al., 2016]. Scalability or system capacity is another important metric in BSN since sensor nodes might be added to the system at anytime based on the medical need or on the type of physiological data that should be gathered. Scalability reflects the performance of the MAC protocol when more sensor nodes are added to the system and shows how flexible it is to add them. Many articles show that scalability is poor in TDMA based system. For instance, [START_REF] Khan | Wireless body area network (wban) design techniques and performance evaluation[END_REF] state that scalability is a main disadvantage in TDMA based systems since adding a sensor node requires performing modifications in the central controller. For example, if a medical staff decided to add sensor nodes to monitor additional physiological data, he has to change the transmission time frame from the central controller which is not practical. Authors suggest that TDMA is suitable for small BSN systems with limited number of nodes. Also, Pourmohseni et al. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF], [START_REF] Ma | Hybrid tdma/cdma mac protocol for wireless sensor networks[END_REF] and Ullah et al. [START_REF] Ullah | A study of mac protocols for wbans[END_REF] state that TDMA has limited scalability and ability to adapt to changes such as adding sensor nodes. Rom et al. [START_REF] Rom | Multiple access protocols : performance and analysis[END_REF] show that in both FDMA and Static-TDMA, the delay increases with the number of users. So the performance of both protocols degrades when increasing the number of nodes which reflects a poor scalability. Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF] show that CSMA/CA has good scalability in BSN as it maintains a constant delay when increasing the offered load. Also, [START_REF] Khan | Wireless body area network (wban) design techniques and performance evaluation[END_REF] and [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] state that scalability is one of the important advantages of CSMA/CA as it can easily accommodate different traffic sources with different rates. Escribano [Escribano, 2015] states that capacity is a main advantage of DS-CDMA as it can handle more nodes than the other technologies.

Table 3.3 summarizes the protocols studied in every reference in terms of scalability.

It shows that none of the references compared the scalability performance of the five protocols simultaneously. Table 3.4 presents the scalability analysis results based on the literature findings [Boudargham et al., 2016]. [START_REF] Yang | Energy efficiency tdma/csma hybrid protocol with power control for wsn[END_REF] state that even through Static-TDMA decreases the energy consumption in sensor networks, it generally offers a low throughput. Jovanovic et al. [START_REF] Jovanovic | Reduced-frame tdma protocols for wireless sensor networks[END_REF] explain that Static-TDMA performs better than "contentionbased" protocols in terms of throughput under high traffic load. Also, Benvenuto et al. [START_REF] Benvenuto | Principles of communications Networks and Systems[END_REF] compare the performance of various MAC protocols including Static-TDMA, FDMA and CSMA/CA. They show that both FDMA and Static-TDMA have close performances with a slight advantage of Static-TDMA over FDMA. They also explain that CSMA/CA presents a good performance in low traffic since it sends the data immediately after sensing the channel. However, the unsynchronized policy of CSMA/CA fails when the traffic is high, since packet collisions increase causing the system to become unstable and the throughput to decrease tremendously. [START_REF] Ma | Hybrid tdma/cdma mac protocol for wireless sensor networks[END_REF] compare the throughput performance of DS-CDMA, Static-TDMA and CSMA/CA. They show that DS-CDMA performs much better than the other schemes in terms of throughput since it is a collision-free protocol, and does not have to worry about time-slot assignment.

As for DTDMA, Pourmohseni et al. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] state that the dynamic and flexible property of this protocol leads to increased utilization rate when compared to Static-TDMA.

Table 3.5 summarizes the protocols studied in every reference in terms of throughput.

It shows that none of the references compared the throughput performance of the five protocols simultaneously. Table 3.6 presents the throughput analysis results based on the literature findings [START_REF] Boudargham | Performance of low level protocols in high traffic wireless body sensor networks[END_REF].

3.3.4/ TIME SYNCHRONIZATION ANALYSIS

The study of time synchronization requirements is important as it reflects the flexibility and the ease of implementation of the MAC protocol. Many articles state that time synchronization is a requirement in Static-TDMA. For instance, Pourmohseni et al. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] explain that in time based medium access protocols, i.e., Static-TDMA and DTDMA protocols, sensor nodes should periodically synchronise with the network coordinator due to the limited accuracy of their internal clock. Also, Ullah et al. [START_REF] Ullah | A study of mac protocols for wbans[END_REF] show that all sensor nodes in BSN, regardless if they carry data or not, should receive periodic packets to synchronize their clocks. This synchronization is needed to avoid nodes from transmitting in the wrong time slot as explained by Jiang et al. [START_REF] Jiang | Orthogonal frequency division multiple access fundamentals and applications[END_REF]. Concerning the other protocols, Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF], [START_REF] Ullah | A study of mac protocols for wbans[END_REF], [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF], and [START_REF] Mohd | Overview of energy efficient mac protocols for wireless body area networks(wban)[END_REF] state that unlike Static-TDMA, synchronization is not required for CSMA/CA. Also, Jiang et al. [START_REF] Jiang | Orthogonal frequency division multiple access fundamentals and applications[END_REF] and [START_REF] Vishal | An effective approach for tree based data collection in wireless sensor network[END_REF] explain that FDMA is easier to implement than Static-TDMA since it does not require synchronization among the sensors. In addition, Bagad [Bagad, 2007] compares FDMA, Static-TDMA and DS-CDMA, and shows that both FDMA and DS-CDMA do not require time synchronization.

Table 3.7 summarizes the protocols studied in every reference in terms of time synchronization requirements. It shows that none of the references compared the time synchronisation of the five protocols simultaneously. Table 3.8 presents the time synchronization analysis results based on the literature findings [START_REF] Boudargham | Performance of low level protocols in high traffic wireless body sensor networks[END_REF]. [START_REF] Lai | A survey of body sensor networks[END_REF]. [START_REF] Khan | Wireless body area network (wban) design techniques and performance evaluation[END_REF] state that Static-TDMA protocol transmits data in specific time slots which eliminates collision possibility. Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF] compare the probability of collision between Static-TDMA, FDMA and CSMA/CA. They show that the probability of collision is low in both Static-TDMA and FDMA protocols. They also explain that CSMA/CA provides less probability of collision than the traditional CSMA protocol by solving the problem of simultaneous data transmission from different nodes. However, the authors show that when the offered load increases, the collision between packets in CSMA/CA increases ; thus the CSMA/CA protocol presents intermediate probability of collision. [START_REF] Yang | Energy efficiency tdma/csma hybrid protocol with power control for wsn[END_REF] state that CSMA/CA leads to high collision rates when the traffic is high. Also, Pourmohseni et al. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] explain that CSMA/CA is not a reliable protocol to be used in BSN due to the collision probability, in opposite to Static-TDMA and DTDMA that send the data in a collision-free environment.

Muzakkari et al. [START_REF] Muzakkari | Recent advances in energy efficient-qos aware mac protocols for wireless sensor networks[END_REF] state that probabilistic coordination happens in contention-base protocols due to the competition between nodes for a shared channel, which cause them to suffer from higher rates of collision from contention-free protocols. [START_REF] Demirkol | Mac protocols for wireless sensor networks : a survey[END_REF] and Linck [Linck, 2019] study Static-TDMA, FDMA and DS-CDMA protocols and state that all three protocols offer collision-free medium. Also, Nando et al. [START_REF] Nando | Transmission performance analysis of tdma radio and mac communication of tdma protocol[END_REF] state that collisions are avoided in Static-TDMA, DTDMA, FDMA and DS-CDMA protocols through allocating transmission sources to the network nodes.

Table 3.9 summarizes the protocols studied in every reference in terms of probability of collision. It shows that none of the references compared the probability of collision of the five protocols simultaneously. Table 3.10 presents the probability of collision analysis results based on the literature findings [START_REF] Boudargham | Performance of low level protocols in high traffic wireless body sensor networks[END_REF].

3.3.6/ HARDWARE COMPLEXITY ANALYSIS

In BSN, it is very important to design a simple protocol with minimal hardware complexity in order to increase the energy efficiency of the system [START_REF] Stykaur | Power saving mac protocols for wsns and optimization of s-mac protocol[END_REF]. Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF] explain that FDMA protocol requires sharp filters to separate the node frequencies and thus to avoid interference, whereas hardware complexity is not an issue in Static-TDMA and CSMA/CA schemes. Filipe et al. [Filipe et al., 2015] state that DTDMA is a flexible and simple protocol that avoids collision at low cost. Demirkol et al. [START_REF] Demirkol | Mac protocols for wireless sensor networks : a survey[END_REF] show that hardware complexity is essential in FDMA to ensure a collision-free medium, which makes FDMA unsuitable for BSN applications. Also, Singal [Singal, 2010] discusses the implementation and hardware complexity of FDMA and DS-CDMA. He explains that FDMA scheme is inflexible due to limited frequencies and requires guard bands to avoid interference, whereas DS-CDMA is a flexible protocol but it is a spread spectrum technique that requires more complex circuity than the traditional modulation scheme. Therefore, DS-CDMA requires complex receivers, and centralized power control unit. Also, Vishal et al. [START_REF] Vishal | An effective approach for tree based data collection in wireless sensor network[END_REF] state that FDMA requires adding functionalities to the sensors' hardware, increasing therefore the hardware complexity and increasing its cost at the same time. The authors also explain that DS-CDMA protocol requires expensive encoding and decoding operations, which is not preferred for sensor networks due to their restricted power. The same analysis of DS-CDMA complexity is presented by [START_REF] Fazel | Multi-carrier and Spread Spectrum Systems : From OFMD and MC-CDMA to LTE and WiMAX[END_REF].

Table 3.11 summarizes the protocols studied in every reference in terms of hardware complexity. It shows that none of the references compared the complexity of the five protocols simultaneously. Table 3.12 presents the hardware complexity analysis results based on the literature findings [START_REF] Boudargham | Performance of low level protocols in high traffic wireless body sensor networks[END_REF]. tion [Gopalan et al., 2010b, styKaur et al., 2011, Qi et al., 2016]. For instance, Qi et al. [START_REF] Qi | Study on wban-based efficient and energysaving access mechanisms[END_REF] state that collisions, overhearing, overheads and idle listening are the major causes of power consumption and inefficiency. This literature explains that collision usually occurs when two nodes send their data simultaneously, and thus requiring re-transmission of data and costing the system a lot of energy. Also, in overhearing, a node receives data that is intended to other nodes. This crosstalk problem usually happens to adjacent nodes and causes unnecessary energy waste. Furthermore, the authors discuss that the control packets that do not contain information but are still needed for the communication cause an overhead on the network and lead to high energy cost. This is in addition to idle listening that happens when a node continuously listens to the channel for possible data even when the channel is idle, leading to waste of energy. Gopalan et al. [Gopalan et al., 2010b] state that in addition to the sources listed above, over-emitting and traffic fluctuation also contribute to energy inefficiency problem. And Kaur et al. [styKaur et al., 2011] add complexity to the list of energy wasting sources, and states that one of the design goals of MAC protocols should be simplicity, as the extensive computational requirements of protocols and algorithms consume a high amount of energy. Javaid et al. [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF] compare the performance of different MAC protocols in BSN. They show that Static-TDMA is more power efficient than other protocols since nodes send their data in specific time slots and remain inactive all the other times. It requires less energy since the probability of collision is low and there is no idle listening. However, the energy efficiency of Static-TDMA decreases when the traffic increases due to queuing. This same literature state that FDMA has a very close performance to Static-TDMA protocol. [START_REF] Liu | Medium access control for wireless body area networks with qos provisioning and energy efficient design[END_REF] and [START_REF] Ullah | A study of mac protocols for wbans[END_REF] affirm that additional energy is needed in Static-TDMA for the periodic time synchronization requirement. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF] show that DTDMA use the low energy consumption and low collision features of Static-TDMA in a dynamic way. As for CSMA/CA, Rahim et al. [START_REF] Rahim | A comprehensive survey of mac protocols for wireless body area networks[END_REF] explain that a major weakness of this protocol is the high power consumption resulting from the continuous collision detection and avoidance requirements. Also, Pourmohseni et al. [START_REF] Pourmohseni | Reliable energyefficient dynamic-tdma mac protocol for wireless body area networks[END_REF], Gopalan et al. [Gopalan et al., 2010b], Qi et al. [START_REF] Qi | Study on wban-based efficient and energysaving access mechanisms[END_REF], and [START_REF] Mohd | Overview of energy efficient mac protocols for wireless body area networks(wban)[END_REF] present a comparison between Static-TDMA and CSMA/CA protocols, and show that the power consumption of CSMA/CA is high compared to the low energy consumption induced in Static-TDMA. And concerning DS-CDMA, Gopalan et al. [Gopalan et al., 2010a] discuss the advantages and disadvantages of several MAC protocols and explains that DS-CDMA protocol is less energy efficient than Static-TDMA due to high computational requirements. Also, Demirkol et al. [START_REF] Demirkol | Mac protocols for wireless sensor networks : a survey[END_REF] state that the high energy consumption in DS-CDMA is the main obstacle for implementing it in BSN where nodes have limited computational and power capability, however, if it is possible to trade the power inefficiency of DS-CDMA with its collision avoidance characteristic, then DS-CDMA can be a good candidate for BSN.

Table 3.13 summarizes the protocols studied in every reference in terms of energy consumption. It shows that none of the references compared the power efficiency of the five protocols simultaneously. Table 3.14 presents the energy consumption analysis results based on the literature findings [START_REF] Boudargham | Performance of low level protocols in high traffic wireless body sensor networks[END_REF]. It shows the following results :

-DS-CDMA outperforms the other protocols in terms of delay, throughput, time synchronization, and probability of collisions. However, it is less energy efficient than the "contention-free" protocols due to its high hardware and computational complexity.

-The energy consumption and hardware complexity drawbacks in DS-CDMA are the main advantages of Static-TDMA and DTDMA schemes.

-Static-TDMA and FDMA protocols have close performances in terms of delay, scalability, throughput and energy consumption. High hardware complexity is the main disadvantage of FDMA over Static-TDMA, and time synchronization requirements is the main disadvantage of Static-TDMA compared to FDMA.

-DTDMA performance is slightly better than Static-TDMA since it uses the slots more efficiently.

-Despite its high scalability and low hardware complexity, CSMA/CA protocol under performs all other protocols as it induces higher delay and lower throughput, and consumes more energy.

3.4/ EXPERIMENTAL EVALUATION

3.4.1/ MOTIVATIONS

To fairly assess the performance of Static-TDMA, DTDMA, FDMA, DS-CDMA and CSMA/CA protocols, the five techniques should be tested under the same experimental conditions, which has not been done previously as shown in Tables 3.1,3.3,3.5,3.7,3.9,3.11 & 3.13. Therefore in this section, all the listed protocols will be simulated simultaneously in the same high traffic environment for the following QoS metrics :

-delay ;

-scalability ; -throughput ; -energy Consumption.

Simulation results will be compared to those presented in Table 3.15 in order to draw appropriate conclusion about the best protocol to be used in a high traffic environment in BSN.

3.4.2/ SIMULATION ENVIRONMENT AND PARAMETERS

Testing the performance of the five listed MAC protocols is done using OPNET simulator (version 14.5) [START_REF] Lu | Unlocking the power of OPNET modeler[END_REF]. OPNET was chosen since it is a strong and flexible simulator. It allows modeling wide range of network protocols and testing the designs in realistic scenarios through creating appropriate configurations, generating traffic, choosing statistics and run simulations [Jasperneite, 2013]. In the simulation, eight nodes are placed in a star topology architecture around the sink node as shown in Figure 3.6.

FIGURE 3.6 -OPNET Star Topology

The OPNET parameters used for BSN are applied [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF], Tawfiq, 2012, Akbar et al., 2017]. The data rate is set to 64kbps and the time between successive packet generations for every sensor is set to 5ms in order to induce high data generation rate leading to high traffic [START_REF] Awad | Virtual cord protocol (vcp) : A flexible dht-like routing service for sensor networks[END_REF]. The simulation parameters are summarized in Table 3.16.

3.4.3/ OBTAINED RESULTS AND DISCUSSION

The delay simulation results are presented in Figure 3.7. They show that DS-CDMA outperforms the other "contention-free" protocols since it induces the lowest delay. This delay is generated from assigning different codes to nodes. Static-TDMA and FDMA are very close in performance in a high traffic environment as they both induce high delays due to queuing. The delay of DTDMA is high, but less than that of Static-TDMA since it uses the slots more efficiently, and therefore minimizes queuing. As for CSMA/CA, the "contentionbased" protocol, the delay is unmanageable since in high traffic, the probability of collision in CSMA/CA increases, so the number of retransmissions accumulate. Also, the medium is very busy, and therefore, the nodes have to wait for a long backoff time. The obtained results in Figures 3.7 and 3.8 agree with the delay analysis results presented in Table 3.2.

In order to test the scalability of different protocols, simulations are repeated with different Similarly, the average delay of DTDMA increased from 5.35 seconds to 19.77 seconds, and that of FDMA increased from 9.91 seconds to 23.85 seconds. This implies a degradation in the performance of these three protocols when more nodes are added to the system, and reflects a poor scalability. On the other hand, the delay in DS-CDMA and CSMA/CA protocols remains almost constant when increasing the number of nodes, therefore these two protocols offer good scalability. The results obtained in the simulation agree with the scalability analysis results presented in Table 3.4.

The throughput simulation results of the five tested protocols are presented in Figure 3.10. As mentioned earlier, the throughput represents the rate of successful delivery of messages over the channel. It gives an insight on which protocol has better channel utilization rate.

FIGURE 3.10 -Throughput Performance of MAC Protocols

Results show that CSMA/CA has the lowest performance among the other protocols in terms of throughput. The reason is the collision avoidance feature that requires CSMA/CA to continuously sense the medium, and to wait until the medium is free to send the data, which leads to a decreased throughput specially when the traffic is high. This result also indicates that CSMA/CA has higher collision rate than the other protocols. Static-TDMA and FDMA have close throughput performances in high traffic environment. They both perform better than CSMA/CA protocol since they send data immediately without having to sense the medium. However, their throughput outcome is low when compared to DS-CDMA scheme. The reason is queuing in Static-TDMA where nodes have to wait for their time slots to send data, and the bandwidth division among the nodes in FDMA leading to decreased transmission rates. As for DTDMA, it generates higher throughput than Static-TDMA and FDMA since it dynamically allocates slots based on the traffic demand, and thus it increases the channel utilization rate by using the channel more efficiently.

Results also show that DS-CDMA outperforms all the other protocols under high traffic.

The reason is that in DS-CDMA, all nodes can send their data simultaneously, over the whole bandwidth, and without the need to sense the channel.

The obtained results are further verified in Figure 3.11 where simulations were repeated for different values of time between successive packet generation. Figure 3.11 proves that in high traffic environment, DS-CDMA provides the highest throughput among the tested protocols ; the contention-free protocols generate less throughput than DS-CDMA, but they outperform CSMA/CA protocol that produces the lowest throughput.

The results obtained in the Figures 3.10 and 3.11 agree with the throughput analysis results presented in Table 3.5.

Figure 3.12 presents the energy consumption performance of the five protocols under high traffic load. It illustrates the percentage of energy consumed by each protocol with respect to the total energy consumed by the system to send the data. Results show that CSMA/CA is the least energy efficient among all the protocols, due to the large amount of energy consumed by the continuous collision detection and avoidance process, and by the high packets retransmission rate in such a high traffic environment. As for the contention free protocols, simulations show that Static-TDMA, DTDMA and FDMA are energy efficient with a slight advantage for Static-TDMA, since it has the lowest computational requirements. As for DS-CDMA, it consumes more energy than the other three protocols due to its complex computational requirements needed to encode the data and to transmit the encoded data over the common channel. In fact, the additional energy consumed by DS-CDMA is composed of two parts :

-Energy needed for digital data processing prior to transmission and upon reception of data.

-Additional radio transmission/reception energy.

The additional processing energy at the transmitter consists of the energy used to encode and compress data, and the energy caused by the usage of automatic power control systems to control the radio power, in order to solve near-far problem and to reduce the interference caused by transmitting multiple signals over the same channel. These additional operations performed at the transmitter increase the energy consumed by the microprocessor by 14% [Szilv ási et al., 2013]. Concerning the additional processing energy at receiver, it consists of the energy used to decode and decompress data, plus the need to use linear detectors for multipath signals and Multiple Access Interference (MAI) suppression. The linear detector circuit adds an additional complexity of (N -1)U + NU, assuming the usage of Matched Filter, where N is the spreading factor and U is the number of active users ; this computational complexity increases the power consumption by P = CV 2 DD f , where C is the load capacitance, V DD denotes the supply voltage, and f is the operation frequency [START_REF] Campos-Delgado | Network efficient power control for wireless communication systems[END_REF]. As for the radio energy consumption caused by the DS-CDMA, additional energy is needed to transmit the encoded bits since every bit is multiplied by the spreading code ; therefore the number of transmitted bits = number of data bits × number of bits in spreading code, which leads to higher energy consumption since nodes will be awake for a longer time.

The energy consumption performance of the five protocols is further investigated by repeating the simulations for different values of time between successive packet generation parameter. The obtained results illustrated in Figure 3.13 show that the energy consumed by the five protocols decreases as the time between successive packet generation increases. They also confirm that contention-free protocols consume less energy than DS-CDMA scheme due to lower computation requirements, and CSMA/CA protocol consumes more energy than all the other protocols caused by extensive collision detec- The results obtained in the both Figures 3.12 and 3.13 agree with the energy consumption analysis results presented in Table 3.14.

The delay, scalability, throughput and energy consumption results obtained in the simulation agree with the survey analysis results presented in Table 3.15. Results showed that Static-TDMA, DTDMA and FDMA have close performances, with a slight advantage for DTDMA since it induces lower delay and higher throughput than the other "contentionbased" protocols. DS-CDMA scheme outperforms the other protocols when high traffic is generated in BSN since it offers the lowest delay and the highest scalability and throughput. However, DS-CDMA under performs Static-TDMA, DTDMA and FDMA in terms of energy consumption which results from its implementation complexity requiring high computation. CSMA/CA has the worst performance among the other protocols as it induces the highest delay, lowest throughput, and highest energy consumption.

3.5/ PROPOSED SOLUTION

The survey analysis and the simulation results discussed in sections 3.3 and 3.4 show that there is no perfect MAC protocol for BSN applications in presence of high traffic. Even though DS-CDMA has a big advantage over the other protocols in terms of delay, scalability and throughput, it is not as energy efficient as the "contention-based" systems. Therefore, in this section, a new scheme is proposed as a compromise between the low energy consumption provided by Static-TDMA and DTDMA, and the low delay, high throughput and scalability features of DS-CDMA.

The proposed solution is based on the fact that not all BSN data are affected by the delay in the same way. For instance, BSN information can be classified into "continuous" and "discontinuous" data. "Continuous" data encloses parameters with common vital signs like ECG and EEG that require continuous monitoring ; these parameters are therefore highly sensitive to delay and should be sent immediately over the channel. Whereas "discontinuous" data is formed of discrete parameters that are less susceptible to delay, and can be sent with less urgency than the continuous data like body temperature, blood pressure and SpO 2 [START_REF] Bhandari | Traffic-aware medium access control protocol for wireless body area networks[END_REF], Gupta et al., 2016].

Hence, a hybrid DTDMA/DS-CDMA system is proposed in which data is sent using DTDMA scheme, where slots are dynamically allocated to each node, while giving advantage to nodes carrying delay sensitive data by allowing them to share the same slots through assigning them different codes as in DS-CDMA. This system is therefore a combination between DTDMA and DS-CDMA schemes. DTDMA is chosen over Static-TDMA since it provides lower end-to-end delay and higher throughput.

An example illustrating the principle of the proposed solution is shown in Figure 3.14. Suppose that nodes 1, 2, 3 and 4 out of 8 nodes hold delay sensitive data. In this case, different codes will be provided to these four nodes as in DS-CDMA protocol, which will allow them to send their information simultaneously over the channel using the same time slots to accelerate their delivery and to minimize the queuing delay. The other four nodes will send their data each in its allocated time slot using DTDMA since it is not highly susceptible to delay. The aim of this scheme is to decrease the end-to-end delay and increase the throughput obtained when only DTDMA is used, and at the same time to decrease the total energy consumed by the system when only DS-CDMA is implemented.

The spreading codes are computed using orthogonal Walsh-Hadamard codes since it is one of the best orthogonal code generation techniques used to mitigate Multiple Access Interference (MAI) problem that arises from the asynchronous nature of BSN. Walsh-Hadamard generates a maximum of 64 codes (64 simultaneous users) [START_REF] Tawfiq | Cyclic orthogonal codes in cdma-based asynchronous wireless body area networks[END_REF]. In the simulations, we considered 3-bit code allowing simultaneous transmission of data from 8 different nodes.

The proposed scheme requires strict synchronization between nodes for both time slot allocation and codes assignment. Even though such requirement is considered a limitation of the proposed scheme due to the generated overhead, synchronization plays an important role in reducing collision rates and re-transmissions, which is essential for high traffic BSN environments to ensure efficient delivery of data. To analyze the performance of the proposed scheme, the same parameters presented in Table 3.16 were used, and simulations were repeated for different cases based on the number of nodes carrying delay sensitive data. The end-to-end delay, throughput and energy consumption were accessed and the obtained results are shown in Figures 3.15,3.16 and 3.17 The delay simulation results show that the end-to-end delay of the system decreases as the number of nodes carrying delay sensitive data increases. Figure 3.15 shows that the delay boundaries are equal to the DTDMA and DS-CDMA end-to-end delays presented earlier in Figure 3.7. The maximum delay of the proposed hybrid system is induced when none of the nodes is holding delay sensitive data, and therefore, the traditional DTDMA scheme is followed, where each node sends its data in its allocated time slots. This delay is decreased by 37% when half of the nodes hold delay sensitive data, presented by "4 DS-CDMA/ 4 D-TDMA" in Figure 3.15, as nodes with delay sensitive data will have the advantage of sending their data simultaneously using the same time slots, which would decrease the end-to-end delay. The delay is reduced by 66% to its minimum value when all nodes carry delay sensitive data, and hence, the system behaves as DS-CDMA scheme.

The throughput analysis results show that the throughput of the system toggles between the DTDMA and the DS-CDMA throughput values presented in Figure 3.10. Figure 3.16 shows that the proposed scheme provides 348kbits/s throughput when half of the nodes hold delay sensitive data, compared to 220kbits/s provided when DTDMA scheme is used. This throughput reaches its maximum value when all nodes hold delay sensitive data and hence the system behaves as DS-CDMA scheme.

The energy consumption simulation results illustrated in Figure 3.17 show that the energy consumption is enhanced by 30% compared to that of DS-CDMA scheme when half the nodes hold delay sensitive data. The system energy consumption is decreased to its minimum level with 80% enhancement when none of the nodes hold delay sensitive data, and thus the system behaves as DTDMA scheme. Figures 3.18,3.19 and 3.20 compare the delay, throughput and energy consumption performance of the proposed hybrid DTDMA/DS-CDMA system to DTDMA (presented by "D-TDMA") and DS-CDMA systems when five nodes out of eight carry delay sensitive data (presented by "5 DS-CDMA/ 3 D-TDMA"). Results show that the proposed scheme induces 47% less end-to-end delay and provides almost double the throughput of DTDMA, and consumes 20% less energy than DS-CDMA.

The proposed solution is therefore a compromise between DTDMA and DS-CDMA performances. It combines the advantages of these two protocols. Based the type of data

3.6/ PERFORMANCE EVALUATION OF THE PROPOSED SOLUTION

In order to assess the performance of the suggested hybrid DTDMA/DS-CDMA scheme with respect to new existing protocols, the proposed solution is compared to IEEE 802.15.6 CSMA/CA, and Novel Priority-based Channel Access Algorithm MAC (NPCA-MAC) protocols.

In IEEE 802.15.6 CSMA/CA, different Contention Window (CW) sizes are assigned to different nodes based on their priority classification. CW ranges between CW min and CW max . Smaller CW size is assigned to higher priority nodes, and larger CW size is allocated to lower priority nodes. If a node fails to send its data, its CW doubles for even number of failures until reaching CW max in order to minimize collisions and reduce the number of re-transmissions [START_REF] Ullah | Throughput and delay analysis of ieee 802.15. 6-based csma/ca protocol[END_REF], Shakir et al., 2016]. This protocol is chosen since it is gaining a lot of attention and is widely used in BSN. It also distinguishes between different types of nodes though assigning them different priorities, which is close to the proposed solution.

The NPCA-MAC protocol modifies the Contention Access Phase (CAP) of the IEEE 802.15.4 superframe. It divides the CAP into four sub-phases each with a dynamically changing length. Traffic packets are categorized into different priority levels. Packets with higher priority can access more channel sub-phases, and packets with lower priority can access less channel sub-phases [START_REF] Kim | A novel priority-based channel access algorithm for contention-based mac protocol in wbans[END_REF], Bhandari et al., 2016]. In other words, this protocol is a slotted CSMA/CA with priority-based channel access scheme. It aims to reduce the contention complexity and increase the chance of high priority packets to transmit their data. NPCA-MAC protocol is chosen for comparison since it is a priority based protocol and is recently developed for BSN.

The delay, throughput, and energy consumption performance of the proposed hybrid DTDMA/DS-CDMA, IEEE 802.15.6 CSMA/CA, and NPCA-MAC schemes are compared. Parameters presented in Table 3.16 are used. Five nodes out of eight are considered to carry delay sensitive data, and are therefore assigned a higher priority than the others.

Delay simulation results are presented in Figure 3.21. It shows that the proposed hybrid DTDMA/DS-CDMA induces less delay than the other two schemes. For instance, even though IEEE 802.15.6 CSMA/CA is optimized to handle highest priority data through dedicated slots, the allocation process takes place by contention between nodes using CSMA/CA. In high traffic scenario, nodes constantly compete for channel access ; this increases the probability of collision leading to high delays ; and even though the IEEE 802.15.6 CSMA/CA scheme assigns variable CW size based on nodes' priority, small size CWs are more likely to double until reaching CW max trying to avoid re-transmissions, which will also increase the delay. As for NPCA-MAC, even though it reduces the contention complexity, the high traffic induced by every node will cause all the sub-phases to be busy ; this will increase the probability of collision and retransmission which will lead to high delay. Also, in both IEEE 802.15.6 and NPCA-MAC, some nodes will not find available slots in the non-contention period due to the frame saturation caused by channel congestion ; nodes will therefore have to keep re-transmitting access requests waiting for slots to become available, which will further increase the delay. However, in the propo-sed scheme, packets with high priority (delay sensitive packets) are sent simultaneously over the channel via the same time slots through assigning them different codes. This will decrease the queuing delay and maintain high channel availability, which will eventually decrease the total delay of the network. 3.17 presents the average end-to-end delay induced when using each of the three simulated protocols. It shows that when the proposed scheme is applied, the delay is reduced by 86.7% compared to IEEE 802.15.6 CSMA/CA, and by 71.8% compared to NPCA-MAC. This demonstrates that that proposed DTDMA/DS-CDMA protocol offers high rate of improvement over the other compared algorithms in terms of delay. Throughput simulation results are illustrated in Figure 3.22. Results show that the proposed scheme outperforms IEEE 802.15.6 CSMA/CA and NPCA-MAC protocols in terms of throughput. The reason is that the proposed scheme allows simultaneous delivery of delay sensitive packets over the same time slots, which will increase the channel utilization rate and therefore increase the network throughput. Whereas the contention nature of both other schemes will lead to high collision rate in presence of high traffic, and will increase the probability of medium access failure. This decreases the channel utilization rate and leads to low throughput.

Table 3.18 presents the average throughput realized by the three protocols. It shows that the proposed scheme achieves more than double the throughput reached by IEEE 802.15.6 CSMA/CA, and achieves an increase of 57.3% on the throughput attained by NPCA-MAC. Thus the suggested DTDMA/DS-CDMA presents a large improvement over existing protocols with respect to throughput.

The energy performance evaluation of the three schemes is presented in Figure sults prove that the proposed scheme is more energy efficient that the other protocols. It actually consumes 10 times less energy than NPCA-MAC, and 15 times less energy than IEEE 802.15.6 CSMA/CA. In fact, even though IEEE 802.15.16 and NPCA-MAC provide prioritized channel access, the high traffic increases the probability of collision and retransmission for channel access since the channel will be congested, which will increase their energy consumption. Results show that NPCA-MAC is more energy efficient than IEEE 802.15.6 since it further reduces the contention complexity, which will help reducing the number of collisions and retransmissions. As for the proposed scheme, the energy consumption is reduced through sending low priority packets via DTDMA slots without assigning them codes, which decreases the computational complexity and leads to better energy efficiency.

Figure 3.24 summarizes the percentage distribution of delay, throughput and energy consumption for every protocol. It proves that the proposed scheme induces the lowest delay among the three schemes (only 3% of the total delay induced by the three protocols), achieves the highest throughput (48%) and consumes the lowest energy (8%).

The experiment results showed that the proposed scheme performs better than the other two protocols in high traffic environments. For instance, both IEEE 802.15.6 CSMA/CA and NPCA-MAC consider traffic priority and guarantee efficient delivery of data in low to moderate traffic scenarios where channel congestion is not excessive. However, they fail in environments where traffic is high, i.e. when multiple nodes send large amount of data simultaneously, due to the contention used by these protocol to access the channel and the absence of a mechanism to increase channel availability in the non-contention period.

Whereas the proposed hybrid DTDMA/DS-CDMA is a good protocol to be used in high traffic BSN since it significantly improves the delay, throughput and energy consumption The proposed scheme was then compared to IEEE 805.15.6 CSMA/CA and NPCA-MAC priority-based channel access protocols. Results showed that the proposed solution offers significant improvements over the other schemes in terms of delay, throughput and energy consumption : it achieves 86.7% less delay, almost doubles the throughput, and consumes 15 times less energy than IEEE 802.15.6 CSMA/CA ; it also induces 71.8% less delay, provides 57.3% higher throughput, and consumes 10 times less energy than NPCA-MAC. The proposed solution is therefore suitable for high traffic BSN.

EFFICIENT HYBRID EMERGENCY AWARE MAC PROTOCOL FOR BSNS

4.1/ INTRODUCTION

In Chapter 3, we have proposed a hybrid DS-CDMA/DTDMA MAC protocol suitable for high traffic BSNs, in which the type of the sensed data is divided beforehand into two categories : continuous data like ECG and EEG, and discontinuous data like blood pressure and body temperature. Continuous data are given high priority and are sent simultaneously using DS-CDMA protocol, whereas discontinuous data are given lower priority and are sent one after another using DTDMA protocol. However in real life emergency situations, the priority assigned to the sensed parameters should not be fixed ; it should be variable depending on the situation of the monitored person. For instance, if the heartbeat of the monitored person suddenly increases, the ECG sensor should be sent as soon as possible to the sink node for analysis ; whereas if the person's temperature or blood pressure drastically changes, then these two parameters should be given the highest priority, and should be sent as fast as possible to the sink node, even though they represent discontinuous data ; in this case the ECG should be given lower priority even though it represents continuous data. Thus to address emergency situations, designing an adaptive emergency aware MAC protocol is very important, to schedule data transmissions based on the situation of the monitored person.

In fact, two kinds of events are reported during patient monitoring : periodic and emergency events [START_REF] Kamble | Improved mac protocol for emergency handling in wban[END_REF]. Emergency occurs when the monitored person's activity or ambient environment suddenly changes. One of the most important requirements of BSNs is to handle emergency events reliably and with the lowest delay in order to take fast actions and save people's lives [START_REF] Liu | Mac protocol in wireless body area networks for e-health : Challenges and a context-aware design[END_REF], Salayma et al., 2018].

Traffic in BSN is dynamic by nature. In general, the traffic rate is stable and relatively low in case of periodic observation (between 1-20 packets/s), and can become very high in case of emergency (between 50-100 packet/s). The main reason for this traffic burst is that physiological parameters are highly correlated, and therefore upon emergency, many sensors will need to send their data simultaneously to the coordinator at high rates to appropriately assess the patient's situation [START_REF] Masud | Traffic adaptive mac protocols in wireless body area networks[END_REF], Salayma et al., 2016, Rezvani et al., 2012]. During periodic observations (non-emergency cases), the main concern is to guarantee high energy efficiency ; whereas during emergency, the main concern is to guarantee reliable and real-time transmission of critical data within strict delay requirements (less than 125 ms) [START_REF] Liu | Mac protocol in wireless body area networks for e-health : Challenges and a context-aware design[END_REF], Salayma et al., 2018].

Few MAC protocols were suggested in literature to deal with emergency and dynamic traffic in BSN. They are mainly based on DTDMA and CSMA/CA protocols [START_REF] Yoon | Pnp-mac : Preemptive slot allocation and non-preemptive transmission for providing qos in body area networks[END_REF], Li et al., 2011a, Anjum et al., 2013, Liu et al., 2011, Yu et al., 2016a, Ali et al., 2010, Zhang et al., 2009]. However, our previously conducted study in Chapter 3 proved that both DTDMA and CSMA/CA do not perform well in high traffic environments and induce large delays due to queuing in DTDMA and the contention nature of CSMA/CA. Therefore, these two schemes are not reliable to be adopted in emergency situations where traffic rates become very high. On the other hand, this same study showed that DS-CDMA protocol is the most delay efficient among other contention-based and contention-free protocols in high traffic conditions. Thus in this chapter, we propose an efficient emergency aware hybrid DTDMA/DS-CDMA MAC protocol, in which DTDMA is used to handle the periodic traffic while DS-CDMA handles the emergency traffic with spreading codes. The main aim of this protocol is to guarantee minimal delay and packet loss during emergency situations, while maintaining high energy efficiency during periodic observations. The rest of the chapter is divided as follows : related works are discussed in Section 4.2. The new emergency aware hybrid DTDMA/DS-CDMA scheme is described in Section 4.3. Simulation and comparison of the proposed scheme to existing MAC protocols, as well as discussion of the corresponding delay, packet loss and energy performance are presented in Section 4.4, while conclusions are drawn in Section 4.5.

4.2/ RELATED WORKS

Few MAC protocols found in literature are traffic adaptive and give special attention to urgent data delivery. These protocols are mainly based on a combination of a Contention Access Period (CAP) that uses CSMA/CA mechanism, and a Contention Free Period (CFP) that is based on DTDMA approach.

For instance, authors in [START_REF] Yoon | Pnp-mac : Preemptive slot allocation and non-preemptive transmission for providing qos in body area networks[END_REF] suggest a Preemptive slot allocation and Non-Preemptive transmission MAC (PNP-MAC) for Providing QoS in Body Area Networks. The PNP-MAC superframe is composed of a CAP, a beacon, a CFP formed of Data Transmit Slots (DTS) and Emergency Transmit Slot (ETS), and an Inactive Period (IP). The CAP period is used for DTS requests ; the beacon is used by the coordinator for advertisement and slot allocation ; the DTS are used for transmission of time critical data, the ETS used for emergency data delivery, and the IP is used for power saving as sensor nodes go to sleep. Even though this protocol assigns special slots (ETS) for emergency data to guarantee their delivery, CFP and IP have fixed duration, then the protocol does not ensure the immediate delivery of critical data since long delay will occur before finding an available emergency slot.

In [Li et al., 2011a], authors present a Low-Delay and Traffic-Adaptive MAC (LDTA-MAC) in which they propose a dynamic slot allocation of Guaranteed Time Slots (GTS) in the CFP to accommodate traffic variations. The superframe consists of a beacon, a CAP with fixed duration, a CFP used to transmit time critical data and an IP. The boarder line between CFP and IP is variable based on the number of GTS requests. When no GTS requests are encountered, the superframe will solely consist of the beacon and the CAP ; and when there are a lot of GTS requests, the CFP duration can be extended till the end of the superframe. Even though this protocol aims to increase the number of time slots needed for time critical data, the CFP duration is incremental with GTS demand ; and since many nodes will send their critical data simultaneously upon emergency, then either the superframe duration should be long enough to acquire needed slots, or packets will not find available slots. In both cases, high transmission delay will be induced, which is not feasible for emergency data.

A traffic Priority and Load Adaptive MAC (PLA-MAC) is presented in [START_REF] Anjum | Traffic priority and load adaptive mac protocol for qos provisioning in body sensor networks[END_REF]. The corresponding superframe is similar to that of PNP-MAC, but the CFP duration is dynamic and can be extended till the end of the superframe like in LDTA-MAC. PLA-MAC sends data by priority, and emergency data are given the highest priority through allocating ETS used to transmit urgent data before DTS in the superframe. Even though emergency data are given the highest priority, this protocol may not guarantee immediate handling of critical data as ETS interval increases significantly with the number of nodes carrying emergency data which is not viable during emergency. This is in addition to the fact that some nodes may not succeed to send request for CFP slot during CAP due to the high contention that occurs in heavy traffic.

The authors in [START_REF] Liu | Ca-mac : A hybrid contextaware mac protocol for wireless body area networks[END_REF] propose a Context Aware MAC (CA-MAC) in which the duty cycle and sampling rate of the nodes depends on the context variation of BSN. When the coordinator detects a change in the context through data analysis and processing, it triggers an emergency state during which nodes sensing relevant data increase their duty cycle and sampling rate, and will be therefore allocated more slots for data transmission ; whereas the other nodes can either decrease their sampling rate or refrain from transmitting data. This protocol guarantees reliable transmission of critical data through increasing channel availability ; however, it does not ensure their transmission time within the strict delay requirements which is crucial in emergencies.

In [Yu et al., 2016a], a Contention over Reservation MAC (CoR-MAC) is proposed to decrease the transmission delay of critical data. In this protocol, the corresponding superframe consists of a beacon, CFP, CAP, and IP. Nodes that might generate emergency data are allocated dedicated time slots in CFP, and the CAP duration shrinks as CFP expands. To increase channel use, these slots can be used by other nodes when they are not needed. The protocol thus operates as follows : emergency data are transmitted over both the CAP and CFP ; time critical data are transmitted over CAP or reserved slots in the CFP if they are not used by emergency data, and non time critical data are transmitted over CAP or CFP as long as they are not used by both emergency and critical data. Even though this algorithm increases the channel use, it does not guarantee timely delivery of urgent data because the CFP duration might become very long when the number of nodes holding emergency data increases. Also, narrowing CAP to expand CFP will increase the congestion in the CAP which will further increment the transmission delay.

In [START_REF] Ali | Urgency-based mac protocol for wireless sensor body area networks[END_REF], the authors propose a scheme that increases the probability of urgent data transmission through setting a maximum number of transmission retry for both urgent and regular data. This protocol guarantees reliable delivery of emergency data, but does not consider the corresponding transmission delay.

The authors in [START_REF] Zhang | A new priority-guaranteed mac protocol for emerging body area networks[END_REF] propose a Priority Guaranteed MAC (PG-MAC) in which traffic is divided into two classes : medical or urgent traffic and Consumer Electronics (CE). The corresponding superframe is formed of both CAP and CFP. CAP is used for reservation requests, and CFP slots are used for data transmission. Both CAP and CFP are divided into two parts, one for every data class type. This will guarantee channel availability for urgent data even when CE traffic is heavy. However, this protocol does not ensure immediate delivery of urgent data, even when CFP slots for urgent traffic are no longer available and CE slots are empty.

Other MAC protocols suggested in literature such as [START_REF] Kwak | A traffic-adaptive mac protocol for wban[END_REF], Alam et al., 2012, Alam et al., 2016] propose adaptive wake-up interval mechanisms for efficient transmission of variable traffic. For instance, the authors in [START_REF] Kwak | A traffic-adaptive mac protocol for wban[END_REF] propose a Traffic-adaptive MAC (TaMAC) in which they assign a traffic-based wake-up mechanism for normal traffic, and a wake-up radio mechanism for emergency or on demand traffic. In the traffic-based wake-up mechanism, the traffic patterns of nodes holding normal data are arranged in a table, and thus, the coordinator wakes-up the nodes only at the right time, otherwise they stay in sleep mode. Whereas in the wake-up radio mechanism, nodes holding emergency data send wake-up signal to the coordinator whenever they have data to send. Even though this protocol aims to decrease nodes' idle listening and overhearing, it does not consider the simultaneous traffic burst from many sensors during emergency situations, which increases the contention between emergency nodes for channel access ; and thus this protocol does not ensure fast delivery of urgent data. In [START_REF] Alam | Tad-mac : traffic-aware dynamic mac protocol for wireless body area sensor networks[END_REF], authors proposed a Traffic-Aware Dynamic MAC Protocol (TAD-MAC) for both invasive and non-invasive BSN. In this protocol, every node dynamically adapts its wake-up interval based on its traffic information obtained from the Traffic Status Register (TSR) bank. The proposed algorithm keeps updating the node's wake-up interval until converging to a steady state in which idle listening is minimal. Also, in [START_REF] Alam | A heuristic self-adaptive medium access control for resourceconstrained wban systems[END_REF], authors developed a Heuristic Self-adaptive MAC (HS-MAC) for resource constrained BSN systems, to ensure that TAD-MAC protocol always converges toward a steady state value and reaches minimal idle listening, through re-configuring the wake-up schedules of the nodes. Both protocols (TAD-MAC and HS-MAC) perform well under normal traffic, but they do not consider the behavior of emergency traffic where many high traffic nodes will need to send their critical data simultaneously. The traffic burst increases the wake-up interval of the emergency nodes. and therefore, multiple nodes carrying urgent data will be active at the same time, which increases the contention for channel access. Thus, these schemes do not guarantee transmission of urgent data with minimal delay.

The above discussion shows that the existing MAC protocols do not guarantee timely delivery of emergency data due to the inability of DTMA mechanism used in the CFP to handle heavy traffic, and the contention nature of CSMA/CA mechanism adopted in the CAP. Also, the continuous medium listening in the CAP decreases the energy efficiency of these protocols even under low traffic [START_REF] Javaid | Analyzing medium access techniques in wireless body area networks[END_REF]. For this reason, we propose a flexible and efficient emergency aware hybrid DTDMA/DS-CDMA MAC protocol able to answer the BSN requirements in transmitting emergency data within strict limits, while maintaining high energy efficiency during periodic observation.

4.3/ HYBRID DTDMA/DS-CDMA PROTOCOL

We consider that sensors are distributed around a coordinator node in star topology architecture. In normal conditions (non-emergency cases), nodes send their data to the coordinator node at constant packet rate that ranges between 1 and 20 packets/s. When the coordinator node identifies abnormalities in physiological signal by processing and analyzing received data, the emergency state is triggered, and the coordinator requests from sensor nodes to send more data to carry out precise recognition ; thus nodes will increase their sampling rate which will significantly increase the corresponding traffic rate (up to 100 packet/s) [START_REF] Salayma | Reliability and energy efficiency enhancement for emergency-aware wireless body area networks (wban)[END_REF].

The proposed scheme is a hybrid DTDMA/DS-CDMA protocol that combines the advantages of DTDMA and DS-CDMA, in order to adapt to BSN traffic variations and different data requirements.

The proposed hybrid DTDMA/DS-CDMA scheme works as follows : during regular monitoring, the traffic is periodic and relatively low. For this reason, nodes send their data in their allocated time slots using DTDMA mechanism. DTDMA is chosen since it has high delay and energy efficiency in periodic traffic environment. When emergency occurs, many nodes will need to transmit their critical data simultaneously to the coordinator node within strict delay requirements ; accordingly, the proposed scheme dynamically allocates emergency slots that accept concurrent data from multiple sensors through assigning them different codes using DS-CDMA mechanism. The emergency data are therefore transmitted simultaneously over the same time slots with the lowest delay, as DS-CDMA has high delay efficiency in heavy traffic [Boudargham et al., 2016]. The other nodes holding non-critical data will continue transmitting their data in the remaining time slots one after another via DTMA mechanism. Therefore, only nodes holding critical data will need to be assigned different spreading codes, which provides a balance between energy and delay efficiency.

Therefore, the proposed hybrid DTDMA/DS-CDMA MAC protocol has three main advantages : first it is adaptive as it dynamically allocates slots based on traffic requirements and can therefore adapt to BSN traffic variations ; second it is emergency aware as it handles emergency data efficiently by guaranteeing their delivery at minimal delays while trying to balance energy consumption, and third it works well in non-emergency cases as it guarantees good delay and energy efficiency.

4.3.1/ PROPOSED SUPERFRAME STRUCTURE

The superframe of the proposed scheme is presented in Figure 4.1. It is formed of a Beacon Field (BF), Emergency Slots (ES), Regular Traffic Slots (RTS), an optional Contention Access Period (CAP), and an Inactive Period (IP). The Beacon Period (BP) is the period of the superframe.

The BF consists of a beacon packet sent by the coordinator to ensure network synchronization and to advertise information like slot allocation, spreading codes, length of BP, number of slots in ES and RTS periods, as well as CAP and IP lengths.

The ES are used for emergency data transmission. These slots are able to accommodate data from multiple nodes through assigning them different codes using DS-CDMA mechanism. The boundary of the ES period is dynamic and depends on the highest packet rate of the generated emergency data. For instance, in non-emergency cases, no ES slots will be allocated, and the superframe will be solely formed of BP, RTS, optional CAP and IP ; whereas when emergency occurs, ES period increases to accommodate the maximum urgent data rate. However, the ES period has a maximum limit of 120 ms to guarantee that critical data are delivered within their corresponding delay requirements (less than 125 ms) [START_REF] Salayma | Reliability and energy efficiency enhancement for emergency-aware wireless body area networks (wban)[END_REF]. The RTS are used to transmit regular periodic traffic, where nodes send their data each in its dynamically allocated time slot using DTDMA mechanism.

The CAP period is optional, and is used to allow new nodes to join the network. It uses CSMA/CA scheme to access the channel. The CAP period is basically used by nonmedical sensors, or by temporal medical sensor nodes that join the network in specific medical conditions.

The IP is used to save energy as nodes enter into sleep mode, and is configurable, based on the ES and RTS duration. For instance, the IP increases in non-emergency cases when the traffic is relatively low and decreases when the traffic is high.

4.3.2/ SLOT ALLOCATION PROCEDURE

The slot allocation procedure is illustrated in Figure 4.2. Consider a BSN formed of eight sensors distributed over the body of an athlete to monitor his health condition. Figure 4.2a presents slot allocation during normal conditions such as training. In this case, ES period does not exist and every node sends its data in its dynamically allocated time slots in the RTS period.

The optimal number of slots that should be allocated for every node is : Equation (4.1) provides an efficient slot allocation mechanism since it helps nodes achieving the highest throughput, as assigning more slots will not enhance the performance [START_REF] Zhou | Intelligent management of multiple access schemes in wireless body area network[END_REF]. This equation shows that the number of allocated slots is directly proportional to the packet rate. For example, if the channel rate is 250 Kbps, and the payload size is 32 bytes, then every packet needs 1.024 ms to be transmitted via BSN radio. The total packet duration equals radio transmission time + ACK + TX, where TX is the radio transition time needed to activate transmission mode. ACK and TX depends on the transceiver used ; they are equal to 0.16 ms in Nordic nRF24L01 that is widely used in BSNs [nor, 2007]. Thus, the total duration for a packet is 1.184 ms. Assuming a slot duration of 5 ms, then every slot can accommodate 4 packets. Nodes in regular observation have traffic rates ranging between 1-20 packets/s ; therefore for a BP of 240 ms, the number of slots that should be allocated to nodes with traffic rate of 20 packets/s is 2, whereas only 1 slot should be allocated to nodes a rate of 5 packets/s.

S lots = PR • BP NP (4.
When a sudden change in the person's activity or environment occurs, like for example if the monitored athlete's heartbeat increases above a certain threshold, the ECG sensor holding information about heart rate (node 5 in this example) experiences a burst of traffic due to emergency ; in this case, the coordinator reserves ES for this node at the beginning of the superframe before RTS to guarantee fast delivery of urgent data as shown in Figure 4.2b. The boundary of the ES is based on the traffic rate of the emergency data. Equation (4.1) is used to compute the needed number of slots. However, the ES period duration cannot exceed 120 ms in order to satisfy the emergency delay requirements, and therefore, the maximum number of slots that can be assigned in the ES period is equal to 120 ms divided by the slot duration. For instance, if the slot duration is 5 ms, then the number of slots in the ES period should be less or equal to 24 slots, and the ES boundary will then vary from zero slot when no emergency data is encountered to a maximum of 24 slots based on the emergency data traffic rate. The other nodes will continue transmitting their periodic data in the RTS period using DTDMA in the aim of balancing the energy consumption.

In many emergency cases, multiple nodes need to send urgent data to the coordinator, due to high traffic correlation. For example, if the athlete faints, both blood pressure and ECG sensors (nodes 4 and 5 in this example) enter into emergency state and experience burst of traffic. In such a case, ES will be used to transmit data from these sensors simultaneously by assigning them different codes as illustrated in Figure 4.2c. The duration of ES is based on the maximum generated traffic rate. Following this example, if node 4 traffic rate is 70 packets/s, and that of node 5 is 100 packets/s, then the ES duration will be configured to accommodate the traffic rate of node 5, and the ES period will have the duration of 6 slots that is 30 ms.

The dynamic allocation procedure for nodes carrying emergency data is shown in Algorithm 1. If only one node has urgent data to send, the coordinator computes the number of needed slots based on the PR of this node using Equation (4.1) . If more than one node carry urgent data, the coordinator assigns different spreading codes to every node, and computes the number of needed slots based on the maximum received PR using Equation (4.1) . In both cases, the algorithm ensures that the number of allocated slots do not exceed the maximum number of slots allowed in the ES period to guarantee that critical data is delivered within strict delay requirements (120 ms). The coordinator then allocates the slots in the ES period, and updates the spreading code and slot allocation information in the beacon frame.

Algorithm 1. Dynamic Slot Allocation for Emergency Data Compute number of slots (s e ) using equation (4.1) based on the PR of the node ; 4:

if more than one node is carrying urgent data then 5:

Assign spreading code to every node ;

6:

Compute number of slots (s e ) based on the maximum received PR using 7:

equation (4.1) ; The dynamic allocation procedure for nodes carrying regular data is shown in Algorithm 2. As explained in Algorithm 1, the coordinator assigns spreading codes to emergency nodes. Therefore, when a node is no longer carrying emergency data, the coordinator frees it from the spreading code (it will no longer send spreading code to this node).

The coordinator computes the number of needed slots for every node based on the corresponding PR using Equation (4.1) ; it then allocates these slots in the RTS period, and updates the spreading code and allocation information in the beacon frame. if n i is previously assigned a spreading code then 3:

Free n i from spreading code ; ; Compute needed number of slots (s i ) equation (4.1) based on the PR of n i ; 6:

Allocate s i in RTS period ; 7: end for 8: Update spreading code and slot allocation information in beacon frame ;

4.3.3/ PROTOCOL DATA TRANSFER OPERATION

The protocol's data transfer procedure is presented in Figure 4.3. The coordinator initializes the superframe and synchronizes with existing nodes through broadcasting a beacon frame including the coordinator's ID and the superframe structure. In non-emergency cases, all nodes carry regular data ; therefore, the coordinator operates Algorithm 2 to allocate appropriate slots in the RTS period. However, if emergency is triggered, one or more nodes will have emergency data to send, the coordinator will then operate Algorithm 1 to dynamically allocate slots to nodes with emergency data in the ES period ; it then operates Algorithm 2 to dynamically allocate slots to remaining nodes in the RTS period. After slot allocation, the coordinator broadcasts the updated beacon frame, allowing nodes to send their data each in its allocated slots. The coordinator then sends ACK to nodes if data is received. The node having data to send will therefore wait for the ACK packet. If it receives it successfully, it goes to sleep mode until its next transmission. However, if the ACK packet is not received after the ES period in case the node is holding emergency data, or after the RTS period in case the node is carrying regular data, the node stays awake and resends its data in the CAP period if the carried data is still within the acceptable delay (i.e. 120ms for urgent data). Such packets are dropped if the node buffer packet lifetime exceeds the allowed threshold.

4.4/ EVALUATION OF THE PROPOSED SCHEME

In Section 4.2, the shortcomings of schemes found in the literature were discussed, and qualitative arguments justifying what makes our proposed algorithm better were presented. In this section, we conduct several simulations to experimentally illustrate the performance of our proposed algorithm versus few other existing schemes. These simulations serve in fact as an illustration a posteriori of the qualitative arguments.

The proposed hybrid DTDMA/DS-CDMA MAC protocol is compared to DTMA, DS-CDMA, as well as PLA-MAC [START_REF] Anjum | Traffic priority and load adaptive mac protocol for qos provisioning in body sensor networks[END_REF] and CoR-MAC [Yu et al., 2016a] hybrid MACs. PLA-MAC is chosen since it is a traffic adaptive protocol that gives priority to emergency data and uses the concept of dynamic CFP configuration based on traffic demand, which is close to the concept of the proposed scheme ; and CoR-MAC is chosen since it is a recent protocol for urgent data transmission that allows slots sharing by multiple sensors which is also close to the proposed scheme. Delay, packet drop percentage, and energy consumption of the five schemes are simulated, and the results are discussed to compare the performance of the proposed protocol to other existing mechanisms.

4.4.1/ PERFORMANCE METRICS

The following three performance matrices were used to assess the performance of the proposed MAC :

-Average Packet Delay : it is the interval of time between the generation of a packet by the sensor node, to the moment when it is successfully received by the coordinator. This metric shows the ability of the MAC protocol to deliver packets with minimal delay.

-Percentage of Dropped Packets : it is the ratio of the number of packets that are dropped due to failed transmission to the total number of generated packets by the nodes. This metric allows to evaluate the reliability of the compared schemes and their ability to transmit packets successfully.

-Energy Consumption : it represents the percentage of energy consumed by each protocol with respect to the total energy consumed by the system to send the data. This metric is used to assess the energy efficiency of the compared protocols.

4.4.2/ SIMULATION PARAMETERS

We consider a BSN formed of 16 sensor nodes distributed over the human body in a star topology architecture around the coordinator that is placed on the center of the body. Periodic (regular) traffic uses Constant Bit Rate (CBR) traffic model, and the traffic rate of nodes is set between 1 and 20 packets/s to reflect periodic low to moderate traffic ; whereas emergency traffic uses Poisson model to emulate random packet arrival, and the traffic rate of the emergency data is set to 100 packets/s to approximate very high traffic [START_REF] Salayma | Reliability and energy efficiency enhancement for emergency-aware wireless body area networks (wban)[END_REF], Salayma et al., 2016]. As stated earlier, when emergency is triggered, like for example when a monitored patient with heart attack blackouts, sensors holding critical data such as heart rate (ECG) should be given the highest importance to guarantee instant and reliable delivery of information, while other data like EMG, motion, and visual sensors data become less important [START_REF] Salayma | Reliability and energy efficiency enhancement in wireless body area networks for e-health[END_REF]. In addition, since traffic in BSN is highly correlated, many other sensors will also have critical data to send, like blood pressure, oxygen sensors in our example. For this reason, simulations were performed for different scenarios : non-emergency scenario in which all nodes carried regular traffic (number of nodes with urgent data = 0), and various emergency scenarios in which different number of nodes (1 to 8 nodes) carried emergency data. The aim of this simulation is to study the behavior of the three MAC protocols when multiple number of nodes request simultaneous transmission of critical data to the coordinator node due to traffic correlation. During all the above simulations, the payload size is assumed to be 32 bytes.

Also, to study the impact of varying payload size, simulations were repeated for payload sizes of 10, 30, 50, and 70 bytes, and the behavior of the proposed scheme is assessed when 25% of nodes (4 nodes) are carrying emergency data.

The performance of the three listed protocols is assessed using OPNET simulator. The simulation parameters are summarized in Table 4.1. The reason is that the proposed scheme sends urgent data simultaneously over the same period (ES period), which guarantees their immediate delivery without further delay even when the number of nodes holding emergency data increases ; this simultaneous transmission of data will also decrease the number of slots allocated in the RTS period, which will in return decreases the delay of regular traffic packets, and results in low average packet delay in the network. The delay induced by the proposed scheme slightly increases with the number of nodes holding emergency data since spreading codes should be assigned to more nodes.

PLA-MAC induces the highest delay among the compared schemes since it assigns GTS slots in the ETS period based on traffic demands, and therefore as the number of nodes holding emergency data increases, the ETS duration expands, so the transmission delays of both emergency and regular packets will increase. Also, nodes use CSMA/CA mechanism in CAP to reserve their time slots which will further increase the delay since nodes have to always listen to the medium to make sure that it is free before transmitting their requests. The PLA-MAC delay significantly increases when the number of nodes generating emergency data becomes high (more than 4 nodes in our simulation) ; this is because the superframe becomes saturated and cannot accommodate more time slots ; requests for slot reservation will be therefore declined, and nodes will have to wait for a long time before a time slot is available, which will drastically increase the packets delay.

CoR-MAC performs better than PLA-MAC, and can handle higher number of emergency nodes before superframe saturation since slots allocated for emergency traffic can be used by nodes holding regular data traffic, taking advantage of the sporadic nature of emergency traffic. However, CoR-MAC underperforms the proposed scheme even when the superframe is not saturated since the CFP duration in CoR-MAC increases with the number of nodes holding emergency data, whereas all nodes holding urgent data are served simultaneously at the beginning of the superframe in the proposed scheme. Moreover, when the number of nodes holding urgent data increases above a certain threshold (6 nodes in this case), the superframe saturates and the delay of CoR-MAC increases intensely.

Concerning DTDMA protocol, the induced delay is similar to that of the proposed scheme in non-emergency cases and when only one node sends emergency data since both schemes behave the same way. However, DTDMA becomes less delay efficient than the proposed scheme when the number of nodes carrying emergency data increases, since more slot will be assigned leading to higher CFP duration ; the delay becomes unmanageable in DTDMA when the number of nodes carrying emergency data becomes high (5 nodes in the simulation) due to superframe saturation. DTDMA performs slightly better than CoR-MAC before superframe saturation since nodes do not compete to reserve time slots ; however, DTDMA superframe saturates faster than CoR-MAC since unlike DTDMA, CoR-MAC allows several nodes to share the same slot. The above analysis indicates that PLA-MAC, CoR-MAC and DTDMA fail in handling the traffic correlation property of BSN.

As for DS-CDMA, codes are assigned and should be encoded to all packets regardless of the nodes traffic type. This makes it less delay efficient than the other protocols in non-emergency cases when traffic is periodic and low. The delay induced by DS-CDMA increases with the number of nodes carrying emergency data as codes should be assigned to more packets ; however, the delay remains manageable even when the number of nodes carrying emergency data becomes high due to high channel availability.

The average delay of the emergency packets are separated from that of regular packets in Figures 4.5a and 4.5b. We mainly care about Figure 4.5a as it shows the ability of the compared schemes to instantly transmit urgent traffic. Simulation results show that the proposed scheme succeeds in sending emergency data within the strict delay requirement (less than 125ms) even when the number of nodes holding urgent traffic is high, since the proposed scheme allows simultaneous transmission of urgent data over the same channel, leading to low delays ; whereas the other protocols fail to satisfy the delay requirement at a certain number of emergency nodes. For instance, in DS-CDMA, all nodes are assigned codes, which increases the delay of the emergency packets. As for PLA-MAC and CoR-MAC, the delay increases due to superframe saturation. Concerning DTDMA, it doesn't give priority to urgent data and can be sent anywhere in the superframe ; this is why the delay is sometimes higher than the other schemes.

The percentage of dropped packets simulation results are illustrated in Figure 4.6. They show that the proposed scheme and DS-CDMA have close performance and are the most reliable among the compared protocols, as they lead to the lowest packet drops. In both protocols, packet drop is due to transmission buffer overflow in high traffic, since sensors have very limited buffer size (order of 64kbit), and packets may arrive faster than they can be processed. Also they are dropped if the buffer packets lifetime exceeds the allowed delay ; for example when transmission of packets fails due to error in CRC, packets are kept in the buffer to be re-transmitted in the CAP period ; however, these packets are dropped if their lifetime exceeds the allowed delay that is 120ms for emergency traffic and 240ms for regular traffic. In addition, when more than one node access the channel simultaneously, MAI can be induced leading to higher packet drops ; however, since the spreading code is short (formed of only 3 bits) and orthogonal Walsh Hadamard codes are used, the MAI effect is limited. The proposed scheme outperforms all the others especially when the number of nodes holding urgent data becomes high, since in DS-CDMA, all nodes can transmit their data simultaneously over the channel regardless to the traffic type ; and in the proposed scheme, urgent data is transmitted simultaneously at the beginning of the superframe, allowing other nodes holding regular traffic data to find available slots to transmit their data in the RTS due to the low congestion in this period.

The probability of successful transmission of both emergency and regular packets will therefore increase for both protocols due to high channel availability. Results show that in non-emergency cases, the proposed scheme and DTDMA are the most energy efficient, since the proposed scheme follows DTDMA operation where nodes send their data in their time slots only and remains inactive all the other times. PLA-MAC and CoR-MAC are less energy efficient than the proposed scheme during periodic observation, since they both use CAP based on CSMA/CA for GTS allocation, which will actuate higher power consumption resulting from CSMA/CA continuous collision detection and avoidance requirements.

DS-CDMA consumes the highest energy among the compared schemes since spreading codes are encoded to every packet of nodes, with leads to high data processing energy. In emergency cases, and as the number of nodes holding emergency data increases, the energy consumption of the proposed scheme increases since data processing energy needed to encode packets generated from multiple sensors increments. However, the main requirement in BSN is to deliver emergency data immediately and with the lowest packet drop rate. Therefore, the computation requirements can be traded with its low delay and packet loss characteristics. Also, in the proposed scheme, the regu- lar traffic data will still be transmitted over RTS period via DTMA mechanism, which will balance the energy consumption ; i.e., only urgent packets will be assigned spreading codes. Similar to the proposed protocol, DS-CDMA energy consumption increases with the number of nodes carrying emergency data due to higher data processing requirements ; however, DS-CDMA remains less energy efficient than the proposed scheme since all packets of all nodes should be encoded which leads to higher energy consumption.

As for DTDMA, PLA-MAC and CoR-MAC, their consumed energy slightly increases when more nodes generate emergency traffic, since more slots will be assigned to nodes, forcing them to be awake for longer times. However, the energy consumption of DTDMA, PLA-MAC and CoR-MAC increases significantly when their superframe saturates, as nodes will remain active as long as they have packets, and keep re-transmitting reservation requests until finding available time slot which will increase the energy consumption. Therefore, these three protocols are not energy efficient as the probability that multiple nodes send their data simultaneously to the coordinator is very high in emergency situations.

The delay, packet drop and energy consumption simulations showed that the proposed scheme outperforms other existing protocols and offers a flexible and efficient way to adapt to BSN dynamic traffic nature.

4.4.3.2/ PERFORMANCE FOR VARYING PAYLOAD SIZE

The delay performance of the five compared schemes for varying payload size is illustrated in Figure 4.8. In the simulation, we consider that four nodes carry emergency data. Results show that the average packet delay increases with the payload size for all compared schemes, and the proposed scheme is the most delay efficient for various payload sizes. For instance, more processing time is required to encode large packets for all nodes in DS-CDMA, and more GTS slots should be assigned to nodes in DTDMA, PLA-MAC and CoR-MAC since fewer packets can be transmitted in one slot. The delay of the last three schemes significantly increases when the payload size is large (50 bytes for PLA-MAc and 70 bytes for CoR-MAC and DTDMA), as the corresponding superframes saturate and nodes will have to wait for slots to become available. As for the proposed scheme, unlike DS-CDMA, packets from only four nodes should be encoded, and unlike DTDMA, PLA-MAC and CoR-MAC, even though more slots should be assigned in the ES and RTS period to accommodate large packets, emergency packets are sent simultaneously over the same ES period, which increases the scheme delay efficiency. The packet energy consumption results for varying payload size are presented in Fi-gure 4.10. Results show that DTDMA, LDA-MAC and CoR-MAC are more energy efficient than DS-CDMA and the proposed scheme when the payload size is small, since nodes in DTDMA, LDA-MAC, and CoR-MAC are only active in their dedicated slots, and the number of assigned slots per node is low when the payload size is small. Whereas the proposed scheme and DS-CDMA consume more energy due to data processing required in packets encoding. However, when the payload size increases, the proposed scheme and DS-CDMA become more energy efficient than DTDMA, LDA-MAC and CoR-MAC, as the superframe structure of these three protocols saturates quickly and therefore nodes will stay active until finding an available slot which will significantly increase the corresponding energy consumption. Also, the proposed scheme outperforms DS-CDMA in terms of energy consumption, since data processing is only performed on four nodes, and nodes carrying regular traffic are only active in their slots. The above results show that the proposed scheme outperforms other protocols in terms of delay and packet drop percentage under varying payload size. It also outperforms the other schemes in terms of energy consumption for large payload sizes.

4.5/ CONCLUSION

In this chapter, a new adaptive emergency aware hybrid DTDMA/DS-CDMA MAC protocol is proposed to guarantee fast transmission of data in emergency cases, while maintaining high energy efficiency during periodic observation. The proposed scheme takes advantage of the low delay induced by DS-CDMA in high traffic, and the low energy consumed by DTDMA in periodic traffic. The suggested protocol was compared to other existing schemes with respect to delay, packet drop and energy consumption for various number of nodes carrying urgent data. Results showed that it outperforms the others as it is able to achieve the lowest delay and packet drop percentage even when multiple sensors request simultaneous transmission of emergency data ; it also offers the highest energy efficiency during periodic observation, while adjusting the energy consumption during emergency by assigning spreading codes only to nodes holding emergency data. The impact of varying payload size was then analyzed, and results also showed that the proposed scheme achieves the lowest delay and packet drop percentage among the compared schemes for different payload sizes, it is also the most energy efficient among others for large payload TRAFFIC AND MOBILITY AWARE MAC PROTOCOL FOR CBSNS

5.1/ INTRODUCTION

As described in Chapter 4, a BSN enters into emergency state when the coordinator node identifies abnormalities in one or more sensed parameter. In this case, the coordinator asks the concerned nodes to increase their sampling rate and send more data in order to identify the problem ; this will significantly increase the BSN's traffic rate specially that the corresponding nodes are highly correlated. CBSNs are formed of multiple BSNs that interact between each other ; thus in such networks, there are two types of traffic generated by the nodes (i.e. composing BSNs) : periodic low traffic produced by the BSNs who are in a state of regular observation, and bursty traffic that is generated by the BSNs in emergency state. [BouDargham et al., 2018]. CBSNs face therefore traffic challenges similar to those of BSNs in terms of dynamic traffic, and in terms of the strict delay requirements during emergency state and the high energy efficiency requirements during periodic observation. However, they also face an additional important challenge related to the mobility of nodes, since in CBSN nodes can move freely in a given area. Some nodes might therefore be mobile, while others remain static. Nodes mobility will lead to dynamic network topology, which adds a challenge to reliable data transmission as mobile nodes might leave their clusters to join new ones.

Facing these challenges and guaranteeing reliable transmission of data from the different BSNs to the central BS largely depends on the choice of the MAC protocol. Therefore, it is very important to design a dynamic MAC protocol that is able to adapt to both mobility and traffic variations in CBSN, and is able to address CBSN's traffic demands in maintaining low delay during emergency, and high energy efficiency during periodic monitoring.

Several synchronous and asynchronous MAC protocols were proposed for MWSNs. In synchronous protocols, the clock wakes up nodes at a specific synchronization point of time for a specific period. These protocols aim to reduce collision and re-transmission of data at the expense of clock synchronization requirements between nodes belonging to the same cluster. Whereas asynchronous protocols rely on preamble to declare a transmission. They do not require synchronization between the sensor nodes, as each node works independently without being aware of the active/sleep schedule of the others [START_REF] Zareei | Mobility-aware medium access control protocols for wireless sensor networks : A survey[END_REF], Kacso et al., 2017]. However, the low complexity of these protocols comes at the cost of increased collision, reduced channel availability and idle listening that may occur specially when traffic is high, leading to low delay and energy efficiency [START_REF] Silva | Mobility in wireless sensor networks-survey and proposal[END_REF], Yahya et al., 2009].

This chapter considers synchronous MAC protocols, mainly due to their ability to reduce collision rates and re-transmissions, which is essential in CBSNs where traffic can become very high when many nodes enter emergency state instantaneously.

Most synchronous MAC protocols found in literature for MWSNs address the request of mobile nodes to join a new cluster in the next frame period ; this is not efficient if the node requesting to join the cluster carries emergency data that should be sent instantly. Also, the suggested protocols do not give mobile nodes priority to send their data before static nodes present in the same cluster, which is also not efficient since the transmission link between mobile nodes and the corresponding Cluster Head (CH) can break before the node transmits its data.

On the other hand, most of the synchronous MAC protocols proposed for MWSNs are based on either one or a combination of both DTDMA and CSMA/CA protocols [START_REF] Yahya | An adaptive mobility aware and energy efficient mac protocol for wireless sensor networks[END_REF], Ali et al., 2005, Raja et al., 2008, Gonga et al., 2011, Ahmad et al., 2014, Pham et al., 2004, Zareei et al., 2011, Choi et al., 2008, Hameed et al., 2009], which do not perform well under heavy traffic conditions as proved in Chapter 3.

Therefore in this chapter, we present an efficient hybrid DTDMA/DS-CDMA Traffic and Mobility Aware MAC (TMA-MAC) protocol for CBSNs, that aims to address different traffic requirements and at the same time, to support nodes (i.e. BSNs) mobility.

To address different traffic requirements, the proposed scheme uses the same hybrid DTDMA/DS-CDMA protocol proposed for BSNs in Chapter 4, in which DS-CDMA is employed to send the emergency traffic generated by both mobile and static nodes, in order to guarantee minimal delay and packet loss during emergency situations, taking advantage of the low delay induced by DS-CDMA in high traffic environment ; whereas DTDMA is used to handle the periodic traffic generated by mobile and static nodes in order to maintain high energy efficiency during regular observations, taking advantage of the low energy consumption characteristic of DTDMA.

The proposed scheme also supports nodes mobility through giving mobile nodes priority over static nodes to send their data as fast as possible before the connection breaks, and through adopting a multichannel mechanism to reduce complexity when mobile nodes need to join new clusters ; it also provides a mechanism that allows nodes requesting to join a new cluster immediate channel access when they are holding emergency data to guarantee their instant delivery [Boudargham et al., 2019a].

The remaining of the chapter is divided as follows : related works are presented in Section 5.2. An overview of the proposed scheme is provided in Section 5.3. TMA-MAC architecture is described in Section 5.4. Comparison of the proposed scheme to existing MAC protocols, as well as simulation and discussion of the delay, packet loss and energy performance under various scenarios are provided in Section 5.5, while conclusions are presented in Section 5.6.

5.2/ RELATED WORKS

Few synchronous mobility aware and traffic adaptive MAC protocols are found in the literature. They are mainly based on DTDMA contention-free protocol, of CSMA/CA contention-based protocol, or of a combination of both.

For instance, authors in [START_REF] Ali | Mmac : A mobility-adaptive, collision-free mac protocol for wireless sensor networks[END_REF] propose a Mobility-adaptive collision-free MAC (MMAC) that is based on Traffic-Adaptive Medium Access (TRAMA) protocol. MMAC divides the frame time into two parts : scheduled access and random access. The random access part is used for collecting neighbors information, and the scheduled access part, formed of TDMA slots, is used for data transmission. Unlike TRAMA, MMAC uses a dynamic frame time that is increased or decreased depending on the traffic information, and the expected variation of the number of mobile nodes in two-hop neighborhood. If the number of in-going and out-going nodes is less than a certain threshold, the frame time is increased, otherwise it is decreased to reduce the time waited by the mobile nodes to join the network [START_REF] Zareei | Mobility-aware medium access control protocols for wireless sensor networks : A survey[END_REF], Silva et al., 2014]. Even though MMAC aims to propose an adaptive traffic and mobility approach, it presents shortcomings in both traffic and mobility support. For instance, nodes willing to join a cluster should scan many channels to find the appropriate cluster to join, which increases overhearing and unsuccessful joining attempts to clusters already full. In addition, the protocol does not give priority to mobile nodes in TDMA slots ; this is not efficient since mobile nodes should be served quickly as the connection might break. Also, MMAC does not provide a mechanism to handle bursty traffic. For instance, if many nodes carrying bursty traffic want to send their data, then either the frame time should be long enough to hold needed slots, or the nodes will not find available slots due to frame saturation. In both cases, emergency data will not be sent instantly within strict delay requirements. This is in addition to the fact that mobile nodes join requests are not considered in the frame schedule ; this is not efficient if the node requesting to join the cluster holds emergency data that should be sent instantly.

An adaptive Mobility aware, and Energy efficient MAC (MEMAC) is presented in [START_REF] Yahya | An adaptive mobility aware and energy efficient mac protocol for wireless sensor networks[END_REF] as a hybrid TDMA/ CSMA protocol. The superframe is formed of two parts : the mini-slots and normal slots. The mini-slots enclose control messages like frame synchronization, random access CSMA period in which nodes compete to send requests for data transmission as well as requests for joining or leaving the cluster, and scheduling period used by CHs to broadcast scheduling information to corresponding nodes ; whereas the normal slots are TDMA based and used to transmit data messages. The frame size in MEMAC is dynamic to ensure the protocol sensitivity to both traffic conditions and mobility. Depending on mobility prediction and location information, MEMAC groups the nodes into Joining nodes "J", Leaving nodes "L", and nodes with data to send "R". Only nodes belonging to "R" are included in the schedule, however the mobility information provided by "J" and "L" is used to adapt the frame time. If the number of nodes in "R" is greater than those in "J" and "L" combined together, the frame size is increased, otherwise, the frame length is decreased. MEMAC have the same shortcomings as MMAC, with the addition to the fact that nodes have to compete to reserve time slots which might increase transmission delays due to high contention that occurs in heavy traffic.

In [START_REF] Raja | A mobility adaptive hybrid protocol for wireless sensor networks[END_REF], authors propose a Mobility adaptive Hybrid MAC (MH-MAC) protocol. MH-MAC divides the frame into static and mobile slots. Static slots are scheduledbased, whereas mobile slots are contention-based to avoid TDMA scheduling overhead. Based on mobility estimation algorithm, nodes can determine their mobility level. If the number of mobile nodes is greater than a certain threshold, the network is considered mobile, the frame time is reduced, and the number of mobile slots is increased with respect to static slots ; whereas if the number of mobile nodes is less than the threshold, the network is considered static, the frame time is increased, and the number of static slots is increased with respect to mobile slots. The drawback of MH-MAC is that static slots are assigned before mobile slots which is inefficient as mobile nodes should be served fast before losing transmission link. Also, the protocol is unable to handle emergency or bursty traffic as it adopts TDMA for static nodes and CSMA for mobile nodes, and both of them are not efficient in heavy traffic. Thus static nodes might experience large packet transmission delays due to TDMA queuing, and mobile nodes may not succeed to send their data due to the high contention that occurs in heavy traffic.

Authors in [Gonga et al., 2011] present MobiSense : a power efficient, micro-mobility MAC protocol. Mobisense is based on TDMA. Its superframe is formed of synchronization slots, fixed length downlink slots used by CHs to broadcast information to nodes, variable length uplink slots used by nodes to transmit their data to the CH, and access mini-slots or Access Window (AW) used by mobile nodes to send their join requests to CHs without contention. The length of the downlink slots period depends on the nodes' traffic demands, and the AW is reduced as the cluster size grows. In Mobisense, CHs advertise over common control channel information about their cluster size and the corresponding data transmission channel ; mobile nodes who want to join a new cluster listen to this common channel, which will speed up their joining process and prevents unsuccessful join attempts. Even though Mobisense presents many solutions for efficient mobility support, it is unable to handle bursty traffic efficiently since it uses TDMA in data transmission, and will not be therefore able to transmit emergency data generated by multiple nodes within strict delay requirements. Also, nodes willing to join a cluster will have to wait for the AW to send joining requests over the access mini-slots, which is not efficient if these nodes are holding urgent data that should be granted immediate channel access to transmit their packets.

A Time Sharing Energy Efficient Congestion control (TSEEC) MAC is proposed in [START_REF] Ahmad | Mobility aware energy efficient congestion control in mobile wireless sensor network[END_REF]. TSEEC is a TDMA based MAC protocol. It uses Load Based Allocation (LBA) technique to assign dynamic time slots to different nodes ; LBA uses statistical information about sensor nodes like node memory, battery, and location information to compute a corresponding weighted value. The weighted value depends on the node's Time of Arrival (ToA), battery lifetime, location, and priority value. Time slots are then assigned based on the obtained weighted value of every node. TSEEC also uses Time Allocation Leister (TAL) technique to handle time slots that are either assigned to nodes that are no longer carrying data, or to leaving nodes : it assigns the free slots to mobile nodes joining the cluster, or it broadcasts the free slot message to neighboring mobile nodes to shift back their own time slots. Both LBA and TAL techniques decrease the network congestion and increase energy conservation ; however, the protocol uses TDMA slot allocation which leads to long waiting time when the traffic becomes heavy in the presence of many nodes holding emergency data. Also, mobile nodes looking for new cluster will have to scan many channels to find the appropriate cluster, which induces higher delay and more complexity.

Other

proposed schemes like MS-MAC [START_REF] Pham | An adaptive mobility-aware mac protocol for sensor networks (ms-mac)[END_REF], EMS-MAC [START_REF] Zareei | Emsmac : energy efficient contention-based medium access control protocol for mobile sensor networks[END_REF], AM-MAC [START_REF] Choi | An adaptive mobilitysupporting mac protocol for mobile sensor networks[END_REF], and MD-SMAC [Hameed et al., 2009] are synchronous protocols with common active/sleep period. These schemes are based on CSMA/CA ; they compute a random value to determine the access period of every node, and nodes that are active at the same time follow CSMA/CA scheme to gain channel access. These protocols are simple in general ; however, they are not efficient when the traffic becomes heavy as the contention between active nodes increases and leads to high collision rates, and thus high delays and energy consumption.

The above discussion shows that the currently proposed protocols are not suitable for CBSNs where both traffic variations and mobility should be handled efficiently. The main shortcomings of these schemes are their inability to guarantee prompt delivery of emergency data due to DTDMA and CSMA/CA low efficiency in heavy traffic, and their failure in providing an efficient mechanism to handle urgent join requests to guarantee fast delivery of mobile data.

For this reason, we propose a hybrid Traffic and Mobility Aware MAC protocol (TMA-MAC). The proposed scheme addresses CBSN's traffic requirements in ensuring reliable delivery of emergency (bursty) traffic generated by static or mobile nodes within strict delay requirements, while increasing the network energy efficiency during transmission of periodic traffic. The proposed scheme also provides an efficient mobility support mechanism that addresses joining requests and data transmission of mobile nodes holding both emergency and periodic traffic.

5.3/ HYBRID TMA-MAC PROTOCOL OVERVIEW

We consider a CBSN formed of m nodes, i.e. m BSNs, grouped into different clusters and distributed in n x n area. Some of these nodes are mobile while others are static. During regular observations (non-emergency cases), nodes generate periodic traffic with constant packet rate ranging between 1 and 20 packets/sec. When some nodes enter into emergency state due to sudden variation in their activity or environment, they will generate a burst of traffic and their corresponding packet rate will significantly increase to reach 100 packets/sec.

The proposed TMA-MAC addresses both traffic and mobility requirements of CBSNs.

5.3.1/ TRAFFIC AWARENESS

To handle various traffic requirements, TMA-MAC adopts the hybrid DTDMA/DS-CDMA approach described in Chapter 4 to combine the advantages of both DTDMA and DS-CDMA Protocols : during regular observation, the traffic generated by nodes in a cluster is low and periodic. Therefore, nodes send their data packets to the corresponding CH in allocated time slots using DTDMA mechanism . When some nodes in the cluster enter into emergency state, their traffic rate significantly increases, and at the same time, their data is considered critical and should be delivered to the CH within strict delay requirements. For this reason, TMA-MAC dynamically allocates slots for emergency traffic, in which data from various nodes can be transmitted simultaneously by assigning them different spreading codes using DS-CDMA. The remaining nodes carrying periodic traffic will keep on transmitting their data one after another in their allocated slots using DTDMA mechanism.

Therefore, TMA-MAC succeeds in addressing CBSN traffic requirements through the following features :

-It adapts to CBSN traffic variations through dynamically allocating time slots to nodes based on traffic rates.

-It is able to address CBSN's emergency traffic requirements in delivering urgent data reliably with minimal delays.

-It is able to address CBSN's periodic traffic requirements in inducing low delay and energy consumption.

5.3.2/ MOBILITY SUPPORT

The proposed TMA-MAC considers two types of mobility [START_REF] Jhumka | On the design of mobilitytolerant tdma-based media access control (mac) protocol for mobile sensor networks[END_REF] : intracluster mobility, in which mobile nodes remain within their cluster, and inter-cluster mobility in which mobile nodes leave their cluster and look for other clusters to join. TMA-MAC supports nodes mobility by ensuring efficient and reliable transmission of both periodic and emergency data held by intra-cluster and inter-cluster mobile nodes, through the following procedures :

1. Intra-cluster mobile nodes carrying periodic traffic send their data in allocated time slots using DTDMA ; however, they are given priority over the equivalent static nodes to ensure fast data delivery before the transmission link is lost ; mobile nodes with the lowest Received Signal Strength Indicator (RSSI) are assigned slots first.

2. Intra-cluster mobile nodes carrying emergency traffic are assigned different spreading codes to enable them to transmit their data simultaneously over the emergency slots, along with the equivalent static nodes.

3.

In order to ensure simple and efficient joining mechanism for inter-cluster mobile nodes to new clusters, TMA-MAC adopts a common control channel as in [Gonga et al., 2011] over which CHs send corresponding cluster information, to allow inter-cluster nodes to quickly and successfully choose their new cluster.

4.

When an inter-cluster mobile node carries emergency traffic, it listens to the common control channel to choose the most appropriate cluster to join. To join the new cluster, the node sends join request in the Emergency Join Request (EJR) minislots distributed between the DTDMA slots throughout the frame time, to address their request quickly. Once the join request is accepted, the frame time is interrupted to allow prompt delivery of this urgent traffic. The CH distributes the new schedule to the cluster nodes, in which urgent data is sent first, followed by periodic traffic of mobile nodes, and the periodic traffic of static nodes.

5.

Inter-cluster mobile nodes carrying periodic (non-emergency) traffic can send their joining requests over a specific Contention Assess Period (CAP) placed at the end of the frame time. Data generated by these nodes is addressed in the next frame time schedule.

5.4/ TMA-MAC ARCHITECTURE

5.4.1/ SUPERFRAME STRUCTURE

The superframe of the data communication channel of TMA-MAC is presented in Fig. The BF is used by the CH to convey synchronization information to the corresponding cluster nodes, along with other information like slot allocation in ES, MS, SS periods, and spreading codes. To synchronise nodes, TMA-MAC uses Reference Broadcast Synchronization (RBS) method [START_REF] Elson | Fine-grained network time synchronization using reference broadcasts[END_REF], in which nodes use the packets time of arrival as a reference for clock synchronization when receiving the synchronization packets. This synchronization mechanism is adopted since it is simple and used in many MWSN protocols [START_REF] Khan | Time synchronization for mobile wireless sensor network[END_REF], Gonga et al., 2011].

ES is used by both static and intra-cluster mobile nodes carrying emergency (bursty) traffic. These slots allow transmission of simultaneous packets through assigning them different spreading codes using DS-CDMA to ensure fast delivery of the urgent data. The length of the ES period is dynamic and depends on the highest packet rate generated by the emergency nodes. When all nodes are in periodic observation states, the superframe will not enclose an ES period, however, when one or more nodes enter into emergency state, the ES period increases to serve the highest generated data rate. However, the ES period is limited to 120ms, to guarantee delivery of urgent data within their delay requirements (125 ms) [START_REF] Deepshikha | Succinct review on mac protocols for wireless body area networks[END_REF].

MS are used by intra-cluster mobile nodes holding periodic traffic to send their data one after another using DTDMA mechanism. These Mobile Slots (MS) are given priority over Static Slots (SS) to ensure fast data transmission before the link breaks. The MS period is also dynamic and depends on the packet rates of every node (i.e. the number of slots needed for every node).

SS are used by intra-cluster static nodes holding periodic traffic. These slots come after the MS since the probability for link breakage is lower. As in MS, static nodes send their periodic data in SS using DTDMA, and has a dynamic period depending on the needed number of slots for every node.

CAP is used inter-cluster mobile nodes carrying periodic traffic to send join request to the cluster. If the join request is accepted by the CH, the corresponding data will be transmitted in the MS of the next frame. The CAP is also used by the intra-cluster mobile nodes to announce their departure from the cluster. The BP in TMA-MAC is dynamic and depends on the ES, MS, SS periods as well as on the number of EJR mini-slots. However, it is bounded by a maximum size which is set to 240 ms in order to satisfy the delay requirements of regular traffic for BSNs [START_REF] Deepshikha | Succinct review on mac protocols for wireless body area networks[END_REF].

5.4.2/ SLOT ALLOCATION PROCEDURE

The equation adopted by TMA-MAC to compute the optimal number of slots in CBSN that should be assigned for every node in a cluster is Equation 4.1 used for BSN (slots = PR•BP NP ), since the slot allocation mechanism provided by this equation helps nodes attaining the highest throughput as assigning more slots will not improve the performance.

The dynamic slot allocation algorithm for static and mobile nodes in emergency state is similar to the slot allocation procedure used for emergency nodes in single BSNs and presented in Algorithm 1 : if only one node is in emergency state, thus carrying critical data, the CH computes the corresponding number of slots needed based on the packet rate generated by the node. However, if more than one node is in emergency state, the CH assigns a spreading code to each of these nodes, and computes the required number of slots based on the highest received packet rate. In both cases, the number of allocated slots is bounded by a maximum number s max to guarantee the delivery of urgent data within their strict delay requirements (120 ms). The CH then allocates the computed number of slots in the ES period, and updates the information about spreading codes and slot allocation in the BF.

The dynamic allocation procedure for mobile nodes in periodic observation state, thus carrying regular data, is shown in Algorithm 3.

As described in Algorithm 1, when a node is in emergency state, it will be assigned a spreading code to enable simultaneous delivery of its data over the ES slots. However, when this node gets back to regular/ periodic observation, the CH frees it from the previously assigned spreading code. The CH then computes the number of slots needed for every mobile node based on their corresponding packet rates using Equation 4 Update the information about spreading codes and slot allocation in the BF ; 12: end for allocate them in the MS period. Mobile nodes keep track of the RSSI level of the packets received from the CH ; consequently, nodes with the lowest RSSI level are given priority over others and are allocated slots first in the MS period to ensure their fast data transmission before the link breaks. The CH then updates the information about spreading codes and slot allocation in the BF.

The dynamic slot allocation process for static nodes carrying periodic traffic is presented in Algorithm 4. Similar to mobile nodes carrying periodic traffic, the CH releases any previously assigned spreading code, and computes the required number of slots using Equation 4.1. The CH then allocates the corresponding slots in the SS period, and updates the slot allocation and spreading code information in the BF. Update the information about spreading codes and slot allocation in the BF ; 9: end for

5.4.3/ IDENTIFICATION OF INTRA-CLUSTER MOBILE NODES

Mobile nodes within a cluster are identified based on the RSSI level of the synchronization packet received from the CH. The nodes keep track of the RSSI variations. Based on Nordic nRF24L01 radio transceiver that is widely used in BSNs, the RSSI level that guarantees reliable transmission is -64dBm [nor, 2007]. Below this value, transmission links become unreliable. Thus in the proposed scheme, if the RSSI level is found to be decreasing over time to reach a threshold of -55dBm, the node inside the cluster is considered to be mobile and should be served quickly before the the link breaks.

5.4.4/ COMPUTATION OF NUMBER OF EJR MINI-SLOTS

As stated earlier, EJR mini-slots are used by inter-cluster mobile nodes carrying critical traffic to send cluster join requests. Multiple mini-slots are distributed between the time slots of MS and SS period, to allow these nodes to send join requests as soon as they enter the cluster area, and transmit their critical data promptly without further delays. Nodes willing to join a cluster choose EJR mini-slots randomly to send their join request as shown in Fig. 5.3. Random selection of mini-slots significantly reduces the probability of collision in moderate contention situations when multiple nodes want to join a cluster simultaneously.

FIGURE 5.3 -EJR Mini-Slot Random Selection

Increasing the number of mini-slots would increase the opportunity for join requests, and speed out the joining operation and data transmission of urgent data ; but at the same time, too many mini-slots would increase the BP or frame time, which would delay the data transmission of the other nodes, specially that these mini-slots might not be used when inter-cluster mobile nodes do not hold emergency data. For this reason, the number of EJR mini-slots is dynamically computed in TMA-MAC in a way not to exceed 5% of the frame time to maintain a reasonable number of mini-slots without considerably affecting the frame time. For instance, Fig. 5.2 shows that approximately 4 bytes are needed for every EJR mini-slot. Considering a channel rate of 250 kbits/s, the EJR mini-slot duration will be 0.128 ms. The BP in TMA-MAC is dynamic as it depends on the ES, MS, SS periods. Considering a BP of 128 ms, the number of EJR mini-slots should not lead to more than 5% increase in the BP, that is 6.4 ms. Therefore for this BP, the superframe can include a maximum of 50 mini-slots distributed between the MS and SS slots. The BP is exempted from mini-slots when it becomes saturated and can no longer accept join requests.

5.4.5/ ADDITIONAL ENERGY INDUCED BY THE INTRODUCTION OF EJR MINI-SLOTS

The introduction of th EJR mini-slots in the superframe will increase the energy consumption of the proposed scheme, since nodes will have to stay awake in these slots waiting for a possible beacon packet from the coordinator. In this section, we compute the additional energy that is caused by these mini-slots.

The total energy consumed by nodes in regular state (transmitting in the MS and SS period) = E transmission + E EJR .

E EJR = E transition from sleep to active + E dissipated in standby or receiving mode within the EJR period = P transition * T transition + P listening * T listening .

We are using Nordic nRF24L01 transceiver. Table 5.1 summarises the corresponding current and voltage parameters taken from the transceiver datasheet.

T EJR 240ms × 5% = 12ms
The maximum number of transitions from state to another is 46, since mini-slots are inserted between the 24 slots (120ms) of the MS and SS periods. Assuming that no nodes asked for joining requests, i.e. nodes are in standby mode during EJR periods, then :

E EJR = 46 × 3V × 8.25ms × 15us + 3V × 1ms × 12ms = 17.07us + 39us = 53.07us.
For nodes transmitting at a packet rate of 20 packets/sec (needing 2 slots) :

E transmission = V × I tansmission × T transmission = 3V × 11.1mA × 10ms = 333us.
Therefore the total energy = 386.07uJ. The EJR mini-slots thus increased the energy consumption of nodes by 13%.

Even though the presence of EJR mini-slots increases the energy consumption of the proposed scheme, it is in fact a compromise that is worth to be made in order to ensure the delivery of urgent data as fast as possible to save peoples' lives.

5.4.6/ INTER-CLUSTER COMMUNICATION OPERATION

For efficient inter-cluster communication, TMA-MAC uses a common control channel, and different data transmission channels (one data transmission channel per cluster).

The common control channel is used by the CHs to send information related to their clusters, like number of cluster nodes, number of available mini-slots, BP, and channel used for data transmission. This common channel will help inter-cluster mobile nodes to join a new cluster quickly, as they only need to listen to one channel instead of scanning many channels. This would also decrease overhearing and reduce the probability of failed join attempts.

In TMA-MAC, the handover decision is taken by the mobile node when the RSSI level of the packets received from the current CH becomes less than -64dBm ; in this case, the link with the current cluster is considered to be no longer reliable, thus the node announces its departure in the CAP of its current cluster's superframe, and searches to join a new cluster with a reliable link.

The Communication operation for join requests is illustrated in Fig. 5.4.

FIGURE 5.4 -Block Diagram of TMA-MAC Inter-cluster Join Request Operation

When a mobile node with critical traffic decides to leave its cluster, it listens to the common channel and selects the cluster with the lowest number of nodes, and available EJR minislots. It then sends its address, and corresponding packet rate in the data part of the EJR mini-slot that it selects randomly among the first set of mini-slots it finds in the BP of the chosen cluster. The CH evaluates the number of slots needed to serve the node based on the received packet rate using Equation 4.1. If it can serve the node (i.e. it has enough slots), it sends a positive acknowledgement (bit 1) in the ACK field of the EJR mini-slots. The CH then interrupts the BP, and sends a beacon packet that includes synchronization information and new slot allocation schedule, in which it grants this node immediate channel access to send its critical data promptly at the beginning of the new Beacon Period. The remaining nodes will proceed in transmitting their data in the newly allocated time slots. If several nodes send join requests over consecutive EJR mini-slots, they will transmit their data simultaneously over the same slots by assigning them different spreading codes. Even though sending a new beacon constitutes an additional overhead, this mechanism is performed when inter-cluster nodes hold critical data only, to ensure their transmission within strict delay requirements. In case the CH finds that it cannot serve the node due to superframe saturation, it rejects the join request through sending a negative acknowledgement (bit 0) in the ACK field of the EJR mini-slot, so the node can send its join request to another cluster.

As for the mobile node holding regular traffic and looking for a new cluster to join, it listens to the common channel and selects the cluster with the lowest number of node and shortest BP. It then sends its join request in the CAP. The CH checks for slots availability through computing the required number of slots using Equation 4.1. If slots are available, it sends an ACK to the node indicating join request acceptance, and assigns these slots in the MS period of the next BP.

5.4.7/ OPERATIONAL EXAMPLE

To sketch the operation of the proposed TMA-MAC, consider a CBSN formed of many patients (BSNs or nodes) in a hospital, to monitor their health condition. These nodes are grouped into several clusters. Let us assume that one cluster is formed of a CH and eight nodes, where the CH is static, and the cluster nodes can be static or mobile. In this example, we assume that four of these nodes are static and the other four are mobile. Fig. 5.5a shows the slot allocation procedure when all nodes are in regular observation state and thus carrying periodic traffic. Mobile nodes are given priority over static nodes, and are allocated slots first in the MS period. Also, mobile nodes with lower RSSI levels are given priority over the ones with higher RSSI values to guarantee their delivery before the connection breaks. Static nodes are allocated slots next in the SS period. In this case, ES period is non-existent. The number of slots reserved for every node is computed using Equation 4.1. For instance, for a payload size of 32 bytes and channel rate of 250 kbps, the packet will need 1.024 ms to be transmitted via every node's radio. Using Nordic nRF24L01 radio transceiver, the time needed to activate its transmission mode is 0.16 ms [nor, 2007] ; therefore the total packet duration is 1.184 ms. Thus, if the slot duration is 5 ms, then 4 packets can be accommodated in every slot. For a BP of 240 ms, the number of slots needed to send the periodic traffic is either 1 or 2 depending on the corresponding packet rate (2 slots for a rate of 20 packets/sec, and 1 slot for a rate of 5 packets/sec for example).

If one or more patients experience sudden change in their activities, like fainting, or facing sudden drop of heart rate, they enter into emergency state ; their data becomes bursty and at the same time very critical and should be delivered very quickly to take appropriate actions. Assuming in this example that one mobile person (node 4) and another static person (node 5) enter into emergency state simultaneously ; in this case, data of these two persons will be encoded and transmitted concurrently over the same time slots allocated in the ES period of the BP as shown in Fig. 5.5b. The number of allocated slots depends on the highest packet rate generated by these nodes. For instance, if node 2 generates a traffic of 60 packets /sec and node 4 generates a traffic of 100 packet/sec, the number of slots will be computed based on node's 4 traffic rate, that is 6 slots. The duration of the ES period will be therefore 30ms, which is less than the maximum allowed period (120 ms) to guarantee transmission of the critical data within their delay requirement. The remaining nodes keep on transmitting their data in their allocated slots in the MS and SS periods respectively. Now assuming that a mobile patient (node 9) enters in emergency state, but lost the reliable connection with his assigned cluster, and decides to join this cluster after listening to the common channel. Since node 9 is carrying critical data, it sends join request over the first EJR mini-slot. Assuming that the corresponding packet rate is 100 packets/sec, then the CH evaluates the number of needed time slots to be 6 slots. Since the BP is not saturated (still did not reach 240ms), the join request will be accepted by the CH ; the BP will be interrupted to allow prompt delivery of node 9 data as shown in Fig. 5.5c. All the other mobile and static nodes with periodic data will continue sending their data after node 9 data transmission is over. The qualitative arguments proving why our proposed algorithm is better than the state of the art are discussed in Section 5.2. To illustrate these arguments, several experiments are carried out and the suggested scheme is experimentally compared to ME-MAC [START_REF] Yahya | An adaptive mobility aware and energy efficient mac protocol for wireless sensor networks[END_REF], Mobisense [Gonga et al., 2011], and TSEEC [START_REF] Ahmad | Mobility aware energy efficient congestion control in mobile wireless sensor network[END_REF] MAC protocols. ME-MAC is chosen since it is a synchronous traffic adaptive protocol, that employs variable frame size based on mobility and traffic demand, which is close to the concept of the proposed scheme ; Mobisense is chosen since it is a synchronous traffic adaptive protocol that adopts a common control channel and multiple data communication channels technique which is used in the proposed TMA-MAC ; and TSEEC protocol is used since it is a recent traffic adaptive protocol that proposes a congestion control mechanism through two concepts : assigning slots to the nodes based on a computed weighted value (i.e. different priorities are given to different nodes), and allowing slots sharing ; these concepts are also close to the proposed mechanism. The average delay, the packet drop percentage and the energy consumption of the four schemes are simulated, and the results are discussed to assess the performance of the TMA-MAC with respect to other existing traffic and mobility aware techniques.

5.5.1/ SIMULATION PARAMETERS

In the simulation, we consider 50 nodes (BSNs) randomly distributed in a 500 m 2 area. These nodes can be either static or mobile, and are grouped in different clusters in which CHs are fixed, whereas cluster nodes are a mix of static and mobile nodes. To form clusters, a LEACH variant protocol is used in which CHs are only chosen among the static nodes only, based on the selected probability and the remaining energy of these nodes [START_REF] Heinzelman | An application-specific protocol architecture for wireless microsensor networks[END_REF]. This protocol is adopted for its simplicity and because it is considered in many MWSN schemes [START_REF] Yahya | An adaptive mobility aware and energy efficient mac protocol for wireless sensor networks[END_REF], Ali et al., 2005]. The number of CH is 5% of the total number sensor nodes. Nodes in regular observation generate periodic traffic using Constant Bit Rate (CBR) traffic model. The packet rate of these nodes is randomly set between 1 and 20 packets/sec to reflect low and moderate traffic ; whereas nodes in emergency state generate bursty traffic using Poisson traffic model to produce random packets. The corresponding packet rate is set to 100 packets/sec to induce very high traffic.

The four protocols are assessed using OPNET simulator. The simulation parameters are summarized in Table 5.2.

5.5.2/ SIMULATION RESULTS

The compared schemes are evaluated with respect to their ability to adapt to CBSN traffic variations, as well as their ability to support mobility.

5.5.2.1/ PERFORMANCE UNDER TRAFFIC VARIATIONS

The delay, packet drop and energy consumption of the four schemes are simulated to assess their ability to adapt to CBSN's traffic variations and to answer the corresponding traffic requirements. In this part, all nodes are considered to be static, and different traffic scenarios are assessed : when all nodes are in regular observation state, and when different number of nodes (5 to 30 nodes) enter into emergency state.

The average packet delay for the proposed TMA-MAC scheme, ME-MAC, Mobisense, and TSEEC is presented in Fig. 5.6. Simulation results show that when all nodes are in regular observation, generating periodic and relatively low traffic, TMA-MAC, Mobisense and TSEEC exhibit very close performances as they follow DTDMA slot allocation of different nodes. Delay in ME-MAC is a slightly higher than the others because nodes have to contend to get channel access which induces more delay. Results also show that the proposed TMA-MAC outperforms the other schemes when different number of nodes enter into emergency and thus generate bursty traffic. The reason is that TMA-MAC allows transmission of urgent data simultaneously over the same time slots at the beginning of the BP (over the ES period) using different spreading codes ; this will guarantee immediate delivery of critical data without further delay even when the number of nodes carrying emergency data increases ; and at the same time, it will decrease the number of slots allocated in the SS period, which will reduce the transmission delay of the periodic data generated by nodes in regular observation state, and will result in low average package delay. The delay induced by the proposed TMA-MAC slightly increases with the number of nodes entering into emergency as it needs to assign spreading codes to more nodes. As for ME-MAC, nodes transmit their data in different time slots based on traffic demand, and therefore, as the number of nodes carrying emergency data increases, the frame time expands, which will increase the delay of both emergency and regular traffic.

Also, in ME-MAC, nodes send their request for data transmission over a contention-based period, which will lead to higher delays as nodes need to listen to the medium to make sure that it is free prior to send their requests. The delay in ME-MAC significantly increases as the number of nodes entering emergency state becomes high (above 15 nodes in this case), as the superframe saturates and leaves no more room to additional time slots ; requests for data transmissions will be therefore declined, and force nodes to wait for a long time before finding available slots, which will intensely increase the packet delays.

The delay performance of Mobisense is slightly better than ME-MAC as nodes do not compete to send slot allocation requests, however this delay is still high and becomes unmanageable when the number of nodes exceed a certain threshold due to superframe saturation.

TSEEC outperforms ME-MAC and Mobisense due to better slot allocation process based on their priorities, and since it allows slots sharing by assigning unused slots when nodes do not have data to send to neighboring nodes. However, TSEEC underperforms TMA-MAC even when the number of nodes with emergency traffic is low, since in TSEEC, the number of assigned slots for each node is proportional to the corresponding weighted value that depends on the location, battery, and priority of the nodes ; since nodes with emergency data have higher priority than the others to transmit their data, they will have higher weighted values and will be allocated more slots ; the frame duration therefore increases with the number of nodes holding emergency traffic, which in return increases the packet delays. The superframe in TSEEC also saturates when the number of emergency nodes becomes high which significantly increments the delay.

FIGURE 5.6 -Delay Performance Under Various Number of Emergency Nodes

The average delay of the emergency packets as well as that of regular packets are illustrated in Figure 5.7. Figure 5.7a shows that the proposed scheme succeeds in transmitting urgent traffic within the 125ms delay requirement for different number of nodes holding emergency data, since it allows simultaneous transmission of this data over the same channel ; whereas the other protocols fail in satisfying the delay requirement of emergency data due to the increased collisions in the CAP period and the superframe saturation in the CFP period. As for the regular traffic, results shown in Figure 5.7b prove that the delay induced by the proposed scheme is much less than that of the other protocols due to the high channel availability that allows nodes carrying regular traffic to find slots in the superframe ; whereas in the other schemes, the superframe will quickly saturate, leading to unmanageable delay specially for regular packets.

The packet drop percentage simulation results are presented in Fig. 5.8. They show that the proposed scheme outperforms the others and leads to lower packet drop percentage, especially when the number of nodes entering emergency becomes high. The packets are dropped in the proposed scheme due to transmission buffer overflow when the congestion is high, or when the lifetime of packets in the buffer exceeds the allowed delay threshold due to transmission failure caused by MAI. TMA-MAC outperforms the others since all nodes in emergency state are served simultaneously at the beginning of the superframe, which allows the remaining nodes carrying periodic traffic to find available slots in the SS period ; the probability of successful data transmission of both periodic and emergency data is therefore high due to high channel availability. ME-MAC induces the highest packet drop percentage due to the limited number of time slots leading to reduced channel The percentage of energy consumed by the compared MAC protocols with respect to the total energy consumption in the network is presented in Fig. 5.9. Simulation results show that when all nodes are in regular observation state, TMA-MAC, mobisense, and TSEEC protocols perform similarly, as in the three schemes, nodes transmit their data each in a specific TDMA slot only, and remains asleep all the other times. ME-MAC consumes more energy than the others since nodes send their request for slot allocation over a contention-based period, which will lead to higher energy consumption due to the continuous listening to the medium to avoid collision. The energy consumption of TMA-MAC increases as the number of nodes carrying emergency data increase, due to the computational requirements needed to encode more packets generated by many nodes. However, the main traffic requirement in CBSN is to deliver critical traffic instantly and reliably ; therefore, the energy consumption of TMA-MAC can be traded with its low delay and packet drop percentage feature. Also, in TMA-MAC, only the packets generated by nodes in emergency state will be assigned spreading codes ; the periodic data is still transmitted over the SS period using TDMA mechanism, which will balance the corresponding energy consumption. As for ME-MAC, Mobisense, and TSEEC, their energy consumption increases with the number of nodes in emergency state, as more slots should be assigned in the frame causing them to stay awake for longer period of time. This energy consumption significantly increases when the protocols' superframe saturates (the number of emergency nodes becomes high), as nodes will need to remain active until finding available slots.

Simulation results showed that TMA-MAC represents an efficient and reliable scheme able to adapt to CBSNs traffic variations and address CBSNs traffic requirements, as it induces the lowest delay and packet drop percentage among the compared protocols, while trying to balance the energy consumption.

2/ PERFORMANCE UNDER MOBILITY VARIATIONS

To assess the performance of the four compared protocols in dynamic networks, we vary the level of mobility in the network by increasing the number of mobile nodes (from 5 to 35 nodes) and repeat simulations with respect to packet delay, packet drop percentage and energy consumption. In all scenarios, we consider that 30% of the nodes are in emergency state and thus generating bursty traffic.

The packet delay simulation results are illustrated in Fig. 5.10. TMA-MAC outperforms the others and induces the lowest delay when the number of mobile nodes increases in the network. The reason is that TMA-MAC gives priority to intra-cluster mobile nodes and allocates slots for them in the MS period located before the SS period ; also, in the MS period, it gives priority to mobile nodes with lowest RSSI to serve them the fastest possible way before the link breaks. This will decrease the delay of the mobile nodes, thus reducing the average packet delay in the network ; in addition, TMA-MAC provides a mechanism to serve inter-cluster nodes in emergency state instantly, by allowing them to send join requests over the distributed EJR mini-slots throughout the BP ; this will further reduce the delay of inter-cluster urgent packets and will lead to low network delay ; this is in addition to adopting a common control channel that allows inter-cluster nodes to select the appropriate cluster to join quickly, and reduces the probability of failed join attempts which leads to decreased delay in the network. Results also show that the delay of TMA-MAC increases with the number of mobile nodes ; this is due to the increased rate of join requests from inter-cluster mobile nodes with periodic traffic ; such requests are addressed in the next frame which slightly increases the delay.

The packet delay of ME-MAC is the highest among the compared schemes due to many factors : first, ME-MAC does not give priority to mobile nodes in slot assignment ; therefore, the link with intra-cluster mobile nodes can break as they are not served fast enough ; this will lead to inefficient use of slots and would therefore increase the packet delay. Second, increasing the network mobility level leads to more inter-cluster join requests ; ME-MAC does not provide a mechanism to address the join requests of inter-cluster nodes carrying critical data quickly, and on the other hand, the inefficient slot allocation in ME-MAC leads to quick superframe saturation, and would therefore increase the rate of join request rejections ; these factors will further increment the delay. Third, the inter-cluster node in ME-MAC needs to listen to multiple channels to select the best cluster to join, which induces higher delays. And fourth, the increased number of mobile nodes will increase the contention in the contention-based period, as this period is used to send both slot allocation requests, as well as join requests. The increased contention will also lead to more packet delays.

Mobisense outperforms ME-MAC ; In fact, like ME-MAC, Mobisense does not give priority to mobile nodes, does not have a mechanism to quickly handle urgent join requests ; but unlike ME-MAC, Mobisense uses the common control channel mechanism for intercluster-nodes to efficiently find a new cluster, and inter-cluster nodes use allocated minislots at the end of the superframe to send their join request instead of contending between each other. As for TSEEC, it adopts a better slot allocation mechanism that allows sharing unused slots (due to link breakage for example) by other nodes, which will decrease the packets delay and leads to better performance than ME-MAC and Mobisense ; however, TSEEC underperforms TMA-MAC since inter-cluster nodes' requests are addressed in the next frame even when nodes carry critical data, and also nodes should scan many channels to find the suitable cluster to join ; which will lead to increased packet delays. The simulation of the dropped packets percentage and the energy consumption percentage are presented in Fig. 5.11 and Fig. 5.12 respectively.

Results show that the proposed scheme is more reliable and consumes less energy among the compared schemes. The increased packet drop rate with the increased number of mobile nodes in ME-MAC and Mobisense is caused by the higher probability of link failure due to the slow service provided to intra-cluster mobile nodes ; nodes will therefore re-transmit the packets which would raise the corresponding energy consumption ; also, as more mobile nodes join the network, more join requests to clusters will be received ; the inefficient slot allocation in ME-MAC and Mobisense leads to higher probability to reject join requests due to superframe saturation, which would increase the packet drop rate and consequently the energy consumed by these nodes to find appropriate cluster. However, Mobisense performs better than ME-MAC in terms of packet drop percentage and energy consumption, since inter-cluster nodes use a common channel to choose the appropriate cluster, which decreases the probability of failed attempts ; these nodes also use assigned mini-slots at the end of the superframe without collision, which will reduce the packet drop rate and saves energy at the same time. TSEEC protocol induces less packet drop percentage than both ME-MAC and Mobisence, since it uses an efficient congestion control slot allocation that provides quick service of mobile nodes by assigning them priorities, and allows slots sharing ; this will reduce the probability of link failure and leads to lower packet drop percentages and energy consumption ; however, TSEEC do not use a common control channel for inter-cluster nodes to choose appropriate clusters, this will increase the energy consumed by listening to multiple channels prior of selecting the appropriate cluster to join ; for this, the energy consumption performance of TSEEC is close to that of Mobisense. TMA-MAC outperforms the compared scheme as it adopts efficient slot allocation for intra-cluster mobile nodes to serve them as fast as possible before the link breaks ; it also offers inter-cluster nodes with a common control channel to save energy and reduce probability of failed cluster join attempts ; in addition, it provides a mechanism to serve inter-cluster nodes with critical data promptly, which will decrease their packet drop and re-transmission rates ; and it provides high channel availability which reduces the probability of join requests failures, and decreases therefore the drop packets percentage and energy consumption.

The above results show that the proposed scheme offers a flexible and efficient mobility aware mechanism that can adapt to CBSN's dynamic traffic.

5.6/ CONCLUSION

In this chapter, an efficient hybrid Traffic and Mobility Aware MAC (TMA-MAC) protocol was proposed for CBSN. TMA-MAC is a traffic adaptive MAC that is able to address CBSN various traffic requirements by ensuring reliable delivery of critical traffic with the lowest delay, while maintaining low energy consumption during regular observation. TMA-MAC also provides a mechanism to efficiently handle CBSN nodes mobility by giving priority to intra-cluster mobile nodes over static nodes to send their data as fast as possible before the transmission link fails, and by adopting a common control channel that can be used by inter-cluster nodes to select the appropriate cluster to join, as well as allowing intercluster nodes holding critical data to send their join request over mini-slots distributed throughout the BP, and granting them immediate channel access to transmit their data.

The performance of TMA-MAC under both traffic and mobility variations was compared to other existing schemes. Simulations of packet delay, percentage of packet drops and energy consumption were conducted, when the number of nodes entering emergency state is varied between 0 and 30 nodes, and when the number of mobile nodes is increased from 0 to 35 nodes. Results showed that TMA-MAC outperformed the compared protocols as it induced the lowest delay, packet drop percentage and energy consumption. It presents therefore an efficient and reliable protocol that can address CBSNs traffic and mobility requirements.

This part addresses the routing protocols for BSNs and CBSNs. It is formed of two chapters. Chapter 6 compares the different routing models for CBSNs' applications and proposes a competent routing scheme to address the challenges faced by these networks, whereas Chapter 7 adapts the proposed scheme to fit BSNs' demands. In both chapters, several simulations are conducted to compare the performance of the proposed schemes to different routing algorithms found in the literature.

THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN

6.1/ INTRODUCTION

In CBSNs, the main role of the composing BSNs is to collaborate between each other to transfer data reliably and as fast as possible to the BS, to analyze the data and take quick actions accordingly. As described earlier in Chapter 2, CBSNs face many challenges. For instance, nodes in CBSN can have high mobility and their number is not limited as numerous bodies can join the network ; also, the coverage area where nodes are distributed can be very large and the environment conditions are variable depending on the sensed medium. It might be hostile like in war zones, underwater, wildfires, etc.

In such a dynamic topology where every node only has a local view of the network and can perform limited tasks due to energy constraints, there is a need to develop robust routing schemes that guarantee a reliable and efficient data delivery.

There are two types of routing models in sensor networks : direct and indirect. In direct routing, nodes send their data directly to the BS forming a single hop topology [START_REF] Farhat | On the topology effects in wireless sensor networks based prognostics and health management[END_REF] ; whereas in indirect routing, data is forwarded from one node to another until reaching the final destination, forming a multi-hop topology [START_REF] Bangash | A survey of routing protocols in wireless body sensor networks[END_REF]. Multi-hop routing topologies can be further divided into two models : flat and cluster based. In the flat model, all nodes have the same functionality and perform similar tasks. Data is forwarded hop by hop in the form of flooding until reaching the destination [Liu, 2012]. Whereas in cluster based routing, nodes are organized into groups of clusters and perform different tasks.-In every cluster, a node is elected as Cluster Head (CH), whereas the other nodes in the cluster form the Ordinary Nodes (ONs). ONs are nodes with lower energy, having the role of sensing data and sending it to the CH of their corresponding cluster, whereas CHs are usually nodes having higher energy, and hold the role of data processing and transmission to the destination [Liu, 2012]. An illustration of direct, flat, and cluster routing models is presented in Fig. 6.1.

Many articles found in the literature compare these routing models in different WSN, MWSN and BSN scenarios, however, none of them compare the performance of these routing models for CBSN applications. Thus in this chapter, we start by assessing the delay and energy consumption performances of direct, flat and cluster-based routing schemes using CBSNs simulation parameters, in order to identify the best model suitable for these networks ; we then propose an efficient routing scheme that is able to send The following scenario is considered. The CBSN is formed of several BSNs moving in a 400 m 2 indoor area. Every BSN is a person who can be a patient in a hospital, employee in an industry or a rescue team in a building, equipped with medical sensors and a coordinator node. The medical sensors capture physiological data from the person's body and send it to the corresponding coordinator node who will transmit it in return to the BS. Every BSN is considered to be one node in the CBSN ; and therefore, in this chapter, routing schemes of data from the different nodes in motion to the BS will be studied, and a new robust routing algorithm will be proposed.

The remainder of the chapter is organized as follows : a comparison of different routing models is presented in Section 6.2. related works are discussed in Section 6.3. A new efficient cluster-based routing algorithm is then proposed in Section 6.4. Simulation results are presented in Section 6.5, to end up with the conclusion in Section 6.6.

6.2/ ROUTING MODELS COMPARISON

A qualitative comparison between the different routing models is presented in Table 6.1. Direct, flat and cluster based routing models are compared with respect to the following metrics : level of simplicity, communication overhead, time synchronization, coverage, efficient use of medium, degree of integrity, scalability, possibility to use centralized application algorithms, and reliability. Each model is rated from 1 to 3 for every evaluation metric depending on their performance with regard to the corresponding metric where 1 indicates best performance, and 3 indicates lowest performance. The table shows that each routing model presents different advantages and disadvantages [START_REF] Zhong | Does proper coding make single hop wireless sensor networks reality : the power consumption perspective[END_REF], Maimour et al., 2010, Al-Karaki et al., 2004, Mamun, 2012]. For instance, direct routing is the simplest model ; it induces the lowest communication overhead, requires simpler time synchronization, allows the usage of centralized application schemes, and has the highest degree of integrity among the other models since data is directly transmitted to the BS rather than going through different paths, minimizing therefore the possibility to temper with data. In return, direct routing does not guarantee reliable transmission of data, it does not scale well as its coverage is limited, and it induces lower data rates than the other models resulting in lower throughput and less efficient use of the wireless medium. Flat routing has the advantage of being highly reliable through transmitting data between nodes close to each other. It is more scalable, allows wider coverage, and uses the medium more efficiently than direct routing. However, flat routing is more complex than the others, it induces the highest communication overhead and it is the most prone to attacks. Cluster based routing models have the widest coverage range, they are the most scalable models, and utilize channel bandwidth better than the others. They are in general simpler, induce less communication overhead, and have higher level of integrity than flat routing models. In return, cluster based models require global and local synchronization and present medium level of integrity, simplicity, and reliability. 120CHAPITRE

THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN

In CBSNs, sending data with the lowest delay and energy consumption is crucial since the nodes' batteries have limited power and cannot be frequently charged, and the transmitted physiological data can be critical and requires immediate actions to be taken with the lowest possible delay. Therefore, in order to determine which routing model is more delay and energy efficient for CBSNs, a comparison between direct, flat, and cluster based algorithms was performed using MATLAB R2014b simulator. iMproved Stable Increased-throughput Multi-hop link efficient routing Protocol for Link Efficiency (iM-SIMPLE) [START_REF] Javaid | im-simple : improved stable increased-throughput multi-hop link efficient routing protocol for wireless body area networks[END_REF] was used to assess flat model, and Low-Energy Adaptive Clustering Hierarchy -Mobile Enhanced (LEACH-ME) [START_REF] Kumar | Mobility metric based leach-mobile protocol[END_REF] protocol was used to evaluate cluster based model. In iM-SIMPLE algorithm, a minimum Cost Function (CF) value is used to elect the best data forwarder among nodes. In each round, CF of every node is computed as the ratio of the distance between the node and the BS to the residual energy of this node. The node with the lowest Cost Function (CF) is elected as a forwarder, and all the children nodes forward their data to the elected forwarder in allocated time slots. iM-SIMPLE also accounts for nodes' mobility, and propose a mechanism to select the closest node as forwarder when the node is mobile. The iM-SIMPLE protocol is chosen since it is a flat routing protocol proven to perform better than other flat routing algorithms and can be adapted to CBSN demands. LEACH-ME protocol is a LEACH variant. In LEACH, sensor nodes are selected as CHs by random rotation to fairly distribute the energy consumption between nodes [START_REF] Heinzelman | Energy-efficient communication protocol for wireless microsensor networks[END_REF]. LEACH-ME is an enhancement over LEACH, as it accounts for the mobility factor of nodes in the choice of CHs ; i.e. nodes with the lowest mobility have higher probability to be selected as CHs. LEACH-ME protocol is chosen since it is based on LEACH that is one of the most famous cluster based routing schemes that was implemented for many types of networks like BSN, WSN, and MWSN, and can be modified to fit CBSN requirements.

Simulations were performed for different number of nodes (from 10 to 100) in random motion within 400 m 2 indoor area.

The first order energy model widely adopted in many WSN and BSN studies was used in the simulations [START_REF] Tauqir | Distance aware relaying energy-efficient : Dare to monitor patients in multi-hop body area sensor networks[END_REF], Verma et al., 2015, Nadeem et al., 2013, Javaid et al., 2013a, Sahndhu et al., 2015, T ümer et al., 2010, Liaqat et al., 2016]. It is illustrated in Fig. 6.2, and the corresponding transmitter and receiver energy are as follows :

E T X (L, d) = E T x-elec • L + mp • L • d n (6.1) E RX (L) = E Rx-elec • L (6.
2) E T x-elec and E Rx-elec represent the energy consumed by the electronic circuits of the transmitter and the receiver, and amp represents the energy consumed by the transmit amplifier [START_REF] Sahndhu | Bec : A novel routing protocol for balanced energy consumption in wireless body area networks[END_REF]. These values depend on the type of the transceiver used. We consider using Nordic nRF24L01 2.4 GHz transceivers that are frequently used in BSNs [START_REF] Nadeem | Simple : Stable increased-throughput multi-hop protocol for link efficiency in wireless body area networks[END_REF], Javaid et al., 2015, Tauqir et al., 2013]. The value of the Path Loss (PL) exponent in indoor locations ranges between 1.4 and 6 depending on the present obstructions [START_REF] Perez-Vega | A simple and efficient model for indoor path-loss prediction[END_REF], Linnartz, 2018, Mulligan, 1997]. It is set to an average of 3.5 to emulate an indoor environment with obstacles causing diffraction and scattering of the signal. The simulation parameters are summarized in Table 6.2.

Mobility model Random way

The total energy consumption and delay of nodes for direct, flat, and cluster based routing models were assessed and the results are presented in Fig. 6. 3 and Fig. 6.4. As stated earlier, these two metrics are particularly important since the nodes have limited power capabilities, and the transmitted physiological data might require immediate actions to be taken with the lowest possible delay.

The energy consumption comparison of different schemes is presented in Fig. 6.3. Both Fig. 6.3a and Fig. 6.3b show that cluster based routing consumes less energy than flat and direct routing in CBSNs. Fig. 6.3b proves that cluster based routing outperforms the other schemes for the different number of nodes. For instance, cluster based routing consumes 2.52 times less energy than direct based routing and 1.73 times less energy than flat routing when 40 nodes are present in the medium, and it consumes 3.35 times less energy than direct based routing and 2.71 times less energy than flat routing when the number of nodes increases to 100. The reason is that in direct transmission, more energy will be consumed by nodes to send data to the BS since they are moving in a 400 m 2 area, and therefore the nodes that are far away from the BS will drain their energy quickly since the energy consumption is proportional to the n th order of the distance. Also, many packets may not be able to reach the final destination due to the obstacles between the nodes and the BS, forcing nodes to re-transmit their data and leading to high energy consumption. The energy consumption of flat models is higher than that of cluster based models since in flat routing, all nodes have the task of processing and transmitting data over the network. More nodes are active which would increase the energy consumption, since they produce more data processing in a resource limited medium. Whereas .3a proves that as the number of nodes increases, the energy consumed by cluster based routing increases at lower rates than flat and direct schemes. The reason is that as the network gets larger, more nodes will be distributed away from the BS leading to more energy consumption in direct transmission. And more nodes will be alive consuming higher energies in flat routing, whereas the energy consumption will still be manageable in cluster based models where the number of alive nodes is more restricted.

Similarly, the delay performance comparison illustrated in Fig. 6.4 shows that cluster based routing induces less delay than direct and flat routing, for different number of nodes. For instance, Fig. 6.4b demonstrates that cluster based routing induces 1.37 times lo- The reason is that larger delays are induced by direct transmission due to transmission and re-transmission of packets over longer distances and through many obstacles. Also, more nodes are transmitting and processing data in flat routing which leads to higher delay.

Therefore, simulation results show that cluster based routing is the most appropriate model to be used for CBSNs in terms of delay and energy efficiency, specially that the number of nodes in such networks is not limited and can become large.

6.3/ RELATED WORKS

Even though many routing algorithms were proposed for WSNs and MWSNs, very few studies were found to cover routing in CBSNs. For instance, authors in [START_REF] Tauqir | Distance aware relaying energy-efficient : Dare to monitor patients in multi-hop body area sensor networks[END_REF], Watteyne et al., 2007, Verma et al., 2015] propose schemes to route data between many patients in a hospital ; however, these articles do not account for mobility as they consider sensor nodes to be fixed either on the bedside, or in specific locations of the hospital.

On the other hand, Aminian et al. propose in [START_REF] Aminian | A hospital healthcare monitoring system using wireless sensor networks[END_REF] a system capable of monitoring several patients moving in a hospital ; however, authors suggest using relay nodes placed in predetermined places to route data sent by the coordinator node of every patient to the Base Station (BS), which may not be feasible in all mediums.

The cluster based routing schemes for WSNs and MWSNs presented in the literature differ from each other by the way clusters are formed, the criteria used to elect the CH of each cluster, and the routing process for data to reach the BS.

For instance, as stated earlier, LEACH protocol elects CHs by random rotation to distribute the energy consumption among all nodes in the network [START_REF] Heinzelman | Energy-efficient communication protocol for wireless microsensor networks[END_REF].

After CH election, non-CH nodes join the nearest CH. However, since CHs are randomly elected, non-CH nodes might be located out of the communication range of the elected CHs, and cannot therefore join a cluster ; also, the number of nodes joining a cluster can be large, which would quickly exhaust the energy of the corresponding CH. In addition, direct transmission of data from nodes to the CH and from the CH to the sink is used, which might not be efficient if the distance between the nodes and the CH or between the CH and the sink is large [Boudargham et al., 2018].

In order to account for the nodes' mobility in MWSNs, LEACH-ME was proposed, in which the mobility factor of nodes is considered in the CH election. The lower the mobility of the node, the higher its probability to be selected as CH. [START_REF] Kumar | Mobility metric based leach-mobile protocol[END_REF].

[ [START_REF] Deng | Mobility-based clustering protocol for wireless sensor networks with mobile nodes[END_REF] proposed Mobility-Based Clustering (MBC) protocol that uses two metrics to select the CH, the nodes' remaining energy and the corresponding speed. MBC protocol accounts for the connection time between cluster members and the corresponding CH in order to establish a reliable path and stable link.

LEACH-Mobile Energy Efficient and Connected (LEACH-MEEC) is another recent LEACH variant proposed in [START_REF] Ahmad | A novel connectivity-based leach-meec routing protocol for mobile wireless sensor network[END_REF] for MWSNs. It elects the CH based on the connectivity and the remaining energy of the mobile nodes, where the connectivity is computed through finding the nodes' density, i.e. the number of neighbouring nodes, within a circle of radius R.

Also, a Genetic Algorithm based Routing (GAROUTE) protocol was proposed in [START_REF] Sarangi | Genetic algorithm based mobility aware clustering for energy efficient routing in wireless sensor networks[END_REF], in which each node sends to the BS a list of its neighbouring nodes located within a predefined transmission radius R, along with its speed and energy information, and these information are used by the BS to choose the CHs and their cluster members.

Even though LEACH-ME, MBC, LEACH-MEEC, and GAROUTE elect their CHs based on significant parameters, they ignore other important criteria such as the nodes' distance to the sink. Also, like in LEACH, the number of cluster members is not limited and might be high ; this is in addition to the fact that direct transmission of data is adopted which decreases the routing efficiency [Boudargham et al., 2018].

In [START_REF] Anitha | Enhanced cluster based routing protocol for mobile nodes in wireless sensor network[END_REF], Enhanced Cluster-Based Routing Protocol for Mobile WSN (ECBR-MWSN) was presented. ECBR-MWSN consists of five main phases : initialization, cluster formation, CHs election, data transmission, and re-clustering and re-routing. In the cluster formation phase, Density Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm is applied, where a random node that has not been previously visited is selected, and all neighbor nodes are retrieved within a pre-defined cluster radius (E ps). If the number of neighbors is greater or equal to the minimum number of nodes required in the cluster (MinPts), a cluster is formed. In the CHs election phase, nodes with highest remaining energy, lowest mobility factor, and shortest distance to the BS are selected as CHs. Once the clusters are created, data transmission phase begins, in which single-hop method is used for intra-cluster communication whereas multi-hop operation is used for inter-cluster communication. This scheme does not consider the connectivity level of nodes in the CH election and uses direct intra-cluster transmissions ; it also allows formation of large clusters. These factors may lead to increased delay and energy consumption.

Authors in [START_REF] Arioua | Multihop cluster based routing approach for wireless sensor networks[END_REF] propose a Multi-hop Cluster Routing approach for WSN. This scheme combines both LEACH and Minimum Transmission Energy (MTE) protocols. In this scheme, CHs are elected by random rotation, however, unlike LEACH where cluster members send their data via direct transmission to the elected CH, data is sent indirectly via multi-hop route from the nodes to the CH based on the shortest path, in order to further minimize the energy consumption of nodes. Even though this algorithm succeeds in prolonging the network lifetime through multi-hop routing, CHs are elected via random rotation ; inappropriate CHs might therefore be selected, which would decrease the routing efficiency.

In LEACH-TLCH [Fu et al., 2013], a secondary CH is elected and used in case the energy of the primary CH decreases below the average energy of all nodes in the network, or the distance between the primary CH and the BS increases above the average distance between the nodes and the BS. Non-CH nodes send their data to the primary CH either directly, or through the secondary CH that is the node with the highest residual energy in the cluster. This algorithm takes into account the energy of nodes in the election of the secondary CH, but other important parameters are disregarded. For instance, if the distance between the secondary CH and primary CH is large, or if the connectivity between them is limited, the energy of the secondary CH will drain very quickly and data transmission will not be reliable.

In [START_REF] Younis | Heed : a hybrid, energy-efficient, distributed clustering approach for ad hoc sensor networks[END_REF], authors present the Hybrid, Energy-Efficient, Distributed Clustering (HEED) protocol, in which primary and secondary parameters are considered in CH election. The primary parameter is the node residual energy, and the secondary parameter is the intra-cluster communication cost. Also in [START_REF] Hu | Adaptive clustering algorithm based on energy restriction[END_REF], Adaptive Clustering Algorithm with Energy Restriction (ACAER) is presented, in which CH are periodically selected based on the nodes residual energy and coverage rate. Even though HEED and ACAER aim to prolong the life cycle of the network, they do not take other important parameter in account in CH selection like distance from nodes to BS and mobility of nodes.

The discussed research works show that none of the cluster based schemes implemented for WSNs and MWSNs provide a complete solution that addresses CBSNs requirements. They either present shortcomings in the CH election criteria, or in the cluster formation, or in the routing operation. For instance, most algorithms consider only one or two parameters to elect the CH (residual energy, distance to BS, mobility, or coverage 126CHAPITRE 6. THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN range), whereas all these parameters are important in CBSNs to guarantee reliable data transmission to the BS and efficient routing. Table 6.3 summarizes the parameters used in CH election for the routing algorithms discussed above along with other few schemes. Choosing improper CH can increase the delay and energy consumption of the network due to transmission of data over longer distances, and re-transmission of failed packets to the sink. Also, most algorithms do not limit the number of nodes within clusters ; and since CBSNs are sizeable networks, the cluster size can therefore become very large which would quickly drain the energy of CHs. In addition, most algorithms do not optimize the intra-and inter-routing operation to account for the limited resources of sensor nodes and the dynamic network property of CBSN, which might lead to data transmission over longer paths inducing higher delays and faster energy depletion of nodes. Fu et al., 2013] Residual energy and distance between nodes and BS HEED [START_REF] Younis | Heed : a hybrid, energy-efficient, distributed clustering approach for ad hoc sensor networks[END_REF] Residual energies and communication cost Adaptive Clustering Algorithm with Energy Restriction (ACAER) [START_REF] Hu | Adaptive clustering algorithm based on energy restriction[END_REF] Coverage rate and residual energy Controlled Density Aware Clustering Protocol (CBCDACP) [START_REF] Ferdous | A comprehensive analysis of cbcdacp in wireless sensor networks[END_REF] Minimum distance from node to BS Least Mean Squared Subtractive Clustering (LMSSC) [START_REF] Tillapart | An approach to hybrid clustering and routing in wireless sensor networks[END_REF] Residual energy and distances from CH to ON and CH to BS LEACH with Fixed Clusters (LEACH-F) [START_REF] Ramesh | A comparative study of clusterhead selection algorithms in wireless sensor networks[END_REF] Position information Energy-LEACH [START_REF] Maurya | A survey on descendants of leach protocol[END_REF] Energy of nodes Multi-hop Hierarchical Routing Protocol (MHRP) [START_REF] Wang | An energy-efficient multi-hop hierarchical routing protocol for wireless sensor networks[END_REF] Residual energy

Therefore in this chapter, a new robust routing scheme is proposed for CBSN to provide better QoS and reliable transmission of data. The proposed routing algorithm is cluster based since it is the most delay and energy efficient model for CBSNs as proven in Section 6.2.

6.4/ PROPOSED ROUTING ALGORITHM

We consider the following assumptions :

-The BS is located at the center of MxM indoor sensing area where the nodes are distributed.

-Every node is aware of its location using Indoor Positioning Systems (IPSs). IPSs are out of the scope of our research ; however, a survey of latest different indoor localization techniques can be found in [START_REF] Zafari | A survey of indoor localization systems and technologies[END_REF].

-The maximum reliable distance between two nodes to guarantee reliable transmission of data is 10 meters. This range represents the reliable radio range of the nRF24L01 transceiver in indoor environments including concrete and wooden walls and glass fronts [START_REF] Kaseva | A wireless sensor network for rf-based indoor localization[END_REF], Szczys, 2014].

The proposed algorithm considers increasing the routing efficiency through each of the following steps of the routing process :

1. Clusters formation 2. Cluster head election

3.

Routing operation : Intra and Inter cluster routing.

6.4.1/ CLUSTERS FORMATION

The cluster formation algorithm is run at the BS. To form clusters, the algorithm divides the sensing area into a fixed number of clusters based on the optimal number of clusters formula presented in Equation 6.3. This formula computed in [START_REF] Amini | Cluster size optimization in sensor networks with decentralized clusterbased protocols[END_REF], Kumar, 2014] is chosen since it evaluates the best number of clusters that minimizes the total energy consumption in the network which is our main concern.

k optimal = N s • f s • A 2π( mp • d n toBS -E Rx-elec ) (6.3)
where :

k optimal : Optimal number of cluster.

N s : Number of nodes distributed in the sensing area.

f s : Energy of amplifier in free space computed for n=2.

A : MxM sensing area.

mp : Energy of amplifier in multi-path fading. d toBS : Average distance from transmitting nodes to the BS.

n : Average PL exponent of the entire network.

Since the nodes in CBSN are randomly distributed, nodes' density can be high in some parts of the sensing area. In this case, the number of nodes joining a cluster can be very large, which would quickly drain the CH energy. Therefore, to reduce the energy consumption in the network, the algorithm limits the number of nodes in every cluster to N c obtained through dividing the total number of nodes by the optimal number of clusters :

N c = N s K opt (6.4) 128CHAPITRE 6.

THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN

Therefore as a first step, the algorithm groups every N c nodes into one cluster based on their location, starting from the network densest area. Thus, every N c nodes will be grouped in one cluster having one CH.

As a second step, and to guarantee reliable transmission of data, the algorithm checks if every node in the cluster is at a distance of less than 10m from at least one other node in the cluster, which is the dependable distance for the transceiver in indoor environments, in order to ensure that the nodes are in the communication range of each other, and thus the data will always find a way to reach any node in the cluster. If a node is found to be out of this range from the other nodes of its initially allocated cluster, the algorithm re-assigns it to a neighboring cluster containing at least one node that is at a distance less than 10m from it. To allow this procedure, the algorithm authorizes increasing the number of nodes in a cluster by a maximum of 20% to keep the number of nodes inside each cluster limited. For instance, if the total number of nodes N s is equal to 50 and K opt is found to be equal to 5, then 5 clusters should be formed, each of which encloses 10 nodes. However, when needed, the number of nodes in a cluster can be increased to reach a maximum of 12 nodes. When the cluster reaches its maximum load, it can no longer accept join requests, and nodes that are out of range should be assigned to another cluster. If in the worst case scenario all neighboring clusters are full, the algorithm picks a random node from one of these full clusters, and re-assigns it to a different one containing nodes within its communication range, to allow the cluster to accept joining requests.

At the end of the cluster formation phase, the BS informs the nodes about their assigned clusters through broadcasting a beacon containing the nodes' IDs, their corresponding clusters numbers, and the number of nodes in every cluster.

The different steps of the proposed cluster formation phase are summarized in Algorithm 5.

In the proposed scheme, re-cluster formation only occurs when nodes move outside their assigned clusters. Re-clustering computation is therefore avoided as long as the nodes remain in their clusters even when they are in motion. This plays an important role in reducing the computation overhead.

6.4.2/ CLUSTER HEAD ELECTION

To guarantee routing efficiency, it is essential to elect the appropriate CH of every cluster. For this reason, in every formed cluster, the CH is elected based on the following parameters :

-Distance between the nodes and the BS ; -Energy of nodes ; -Mobility of nodes ;

-Transmission Scope (TS) ;

where TS of every node is defined as :

T S nodex = 1 PL exponent of node x . (6.5)
TS reflects the connectivity and coverage strength of a node. It is computed as the reverse of the PL exponent of every node since the PL parameter encloses all the types of losses Algorithm 5. Cluster Formation Operation 1: Compute k opt using Equation 6.3 ; 2: Compute value N c using Equation 6.4 ; 3: Compute maximum load of a cluster L max = N c + 0.2N c ; 4: Group every N c nodes into one cluster starting from network densest area ; 5: for every node x belonging to cluster c i do 6:

if x is not in the communication range of other nodes of its initially allocated cluster then end if 23: end for 24: BS broadcasts a beacon containing the nodes' ID, cluster number, and the 25: number of nodes in every cluster ; in the network : free-space loss, reflection, absorption, refraction, and diffraction losses. It also depends on the environment type (indoor or outdoor, urban or rural, etc.) and the medium of propagation (dry or humid air), along with the distance from the node to the BS.

Since nodes are mobile, the TS value of nodes is not fix. It is dynamic and changes depending on the current location of every node. Equation (6.5) suggests that higher TS value is achieved for lower PL exponent based on the node's location.

For every node, the Selection Score (SS) of becoming CH is computed using the following formula :

S S x = E x • T S x d toBS • M x , (6.6)
where : 130CHAPITRE 6. THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN S S x : Selection Score of node x to become a CH.

E x : Residual energy of node x.

T S x : Transmission Scope of node x as per Equation (??).

d toBS : Distance from the transmitting node to the BS.

M x : Mobility factor of node x.

The mobility factor of a node is computed based on the relative direction of node mobility.

In general, mobility is either considered positive or negative. Positive mobility implies that nodes are moving closer to each other, which decreases the total energy consumption of the network, whereas negative mobility indicates that nodes are moving away from each other, which increases the total energy consumption. In every round, node x in a cluster evaluates the distance to every node in the same cluster. If the difference of distance between the current round and the previous round is negative, then nodes are moving away from each other, otherwise they are either moving closer or are stationary relative to each other. The mobility factor of node x will be then computed as [START_REF] Kumar | An adaptive cluster based routing scheme for mobile wireless sensor networks[END_REF] :

M x (t) =
Nb. of nodes moving away from x N c (6.7) Equation 6.7 is therefore a measurement of negative mobility. For instance, if a node moves away for the rest of the nodes in the cluster, the corresponding mobility factor increases, and if it moves closer or remains stationary with respect to the other nodes, then its mobility factor decreases. Nodes with low mobility factor should therefore be selected as CHs since they lead to low energy consumption.

Therefore, and as per Equation (6.6), in every cluster, the node with the highest energy and the TS, along with the lowest mobility factor and the shortest distance to the BS, will have the highest Selection Score (SS), will be therefore elected as CH.

The algorithm explaining the way CHs are elected is presented in Algorithm 6 : as explained in 6.4.1, when the BS divides the network into clusters, it sends a beacon including the cluster number to which each of them belongs. From the Received Signal Strength Indicator (RSSI) of the received packet, each node will be able to compute its PL [START_REF] Miranda | Path loss exponent analysis in wireless sensor networks : Experimental evaluation[END_REF], and therefore its TS ; and since nodes are aware of their locations, they will be able to determine their mobility factor (M x ) and distance from the BS (d toBS ). Hence, each node will compute its own S S x . Every node will then forward a packet to their neighbours containing its ID, cluster number, and S S . When a neighbouring node receives a packet, it checks if the forwarder node belongs to its own cluster ; if yes, it extracts the received node ID and S S and place them in a table, and then forwards the table to its neighbours to ensure that the S S score of the nodes are distributed in a fast way. When nodes in a cluster have information about the selections scores of all their counterparts belonging to the same cluster, they select the node with the highest S S as their CH.

Algorithm 6. Cluster Head Election Operation 1: for every node x belonging to cluster c do 2:

x computes its PL from the RSSI of the packet received from the BS 3:

in the cluster formation phase ;

4:

x computes its S S x ;

5:

x sends a packet p x containing its ID, cluster number and S S x to neighbouring

6.4.3/ ROUTING OPERATION

The routing operation covers both intra-and inter-cluster routing. Intra-cluster routing refers to the process of transmitting data inside every cluster, i.e., the way to transmit data from the nodes belonging to a cluster to the elected CH. Whereas inter-cluster routing refers to the process of transmitting data from the different CHs in the network to the final destination (the BS).

In the proposed algorithm, multi-hop flat model is used for both intra-and inter-cluster routing, since it reduces the energy consumption of nodes compared to direct routing schemes [START_REF] Culpepper | Design and analysis of hybrid indirect transmissions (hit) for data gathering in wireless micro sensor networks[END_REF]. In intra-cluster routing, a Cost Function (CF) of every node inside a cluster is computed as :

CF x = d toCH E x • T S x (6.8)
where :

d toCH : Distance between node x belonging to a cluster and the elected CH of that cluster. E x : Residual energy of node x.

T S x : Transmission Scope of node x depending on its location.

The node with the lowest CF (i.e., with the shortest distance to the cluster elected CH, and with the highest residual energy and TS) is selected as a forwarder, and neighboring nodes send their data to this elected node. The CF computation aims therefore to optimize 132CHAPITRE 6. THOROUGH AND COMPETENT ROUTING ALGORITHM FOR CBSN the routing operation by considering the dynamic environment and restricted resources in CBSN in the selection of the forwarder.

Similarly, in inter-cluster routing, the CF of every CH is computed, and the CH with the lowest CF is selected as the forwarder of data to the BS :

CF CH = d toBS E CH • T S CH (6.9)
The flow chart and the illustration of the proposed algorithm are presented in Fig. 6.5 and Fig. 6.6 respectively. They show the three steps of the suggested scheme : cluster formation, CH election, and routing process (intra-and inter-cluster routing). in Section 6.3, the shortcoming of the schemes proposed in the literature and the qualitative arguments proving that our proposed algorithm is better than the state of the art FIGURE 6.6 -Proposed Algorithm Illustration are discussed. In this section, simulations are carried out as a posteriori support to the presented qualitative arguments. To experimentally assess the performance of the proposed algorithm, simulations of the delay, the energy consumption, and the percentage of dropped packets were performed using MATLAB R2014b. The suggested scheme is compared to three algorithms :

1. The LEACH-ME protocol [START_REF] Kumar | Mobility metric based leach-mobile protocol[END_REF]. This algorithm is one of the basic variants of LEACH designed for MWSNs.

2.

The LEACH-MEEC protocol [START_REF] Ahmad | A novel connectivity-based leach-meec routing protocol for mobile wireless sensor network[END_REF]. This algorithm is chosen since it is a recent LEACH variant proposed for MWSNs and can be adapted to CBSN needs.

3.

The ECBR-MWSN protocol [START_REF] Anitha | Enhanced cluster based routing protocol for mobile nodes in wireless sensor network[END_REF]. This algorithm is chosen since it is a non-LEACH variant that form clusters first, then elects CHs based on different parameters, before moving to the intra-and inter-cluster routing operations, which is close to the concept proposed in our algorithm.

Simulation parameters are summarized in Table 6.4.

The average PL exponent (n) of the entire network used to find the optimal number of clusters in Equation 6.3 is set to 3.5. The value of f s is obtained by computing mp in Equation 6.1 for n=2 and by using the actual power consumption of the Nordic transceiver as found in the datasheet [nor, 2007].

In order to make simulations closest to reality, the value of the PL exponent used to compute the TS of every node is variable, depending of the node's location. It ranges between 1.4 and 6 for indoor sites as per Table 6.5 [START_REF] Perez-Vega | A simple and efficient model for indoor path-loss prediction[END_REF], Linnartz, 2018

6.5.2/ RESULTS AND DISCUSSION

To assess the performance of the proposed scheme, the total delay induced by the proposed algorithm, LEACH-ME, LEACH-MEEC and ECBR-MWSN is presented in Fig. 6.7.

Results show that LEACH-ME induces the highest delay among the compared protocols, since it only considers the mobility factor of nodes to elect CHs without accounting for other important parameters. The election of unsuitable CHs leads to higher delays induced by transmission of data over longer distances or through too many obstacles, or by re-transmission of the failed packets to the BS. Also LEACH-ME uses direct intra-and inter-cluster transmission of data which would induce higher delays, and it does not limit the number of nodes within the cluster, which also contributes in increasing the delay.

LEACH-MEEC performs better than LEACH-ME since it considers both the residual energy of nodes and their connectivity status to elect CHs. However, it underperforms ECBR-MWSN and the proposed scheme since it does not consider other important criteria such as distance to BS and transmission scope, and it follows direct intra-and intercluster routing operations.

ECBR-MWSN outperforms the other protocols since it considers the nodes' residual energy, mobility and distance from the BS in the CH election ; it also adopts multi-hop inter-cluster routing operation ; however, this protocol induces higher delay than the pro-FIGURE 6.7 -Delay Performance of Different Routing Schemes posed scheme since it does not account for the medium condition surrounding the nodes, and uses direct intra-cluster communication, which increases the propagation delay. This algorithm also does not provide a mechanism to limit the number of cluster members, which might produce large clusters, leading to higher delays.

The proposed algorithm outperforms all the other schemes since it works on minimizing the network delay throughout the three steps of the routing process : it divides the network into optimal number of clusters which would decrease communication overheads, leading to less delay. It also ensures the election of appropriate CHs through taking into account the mobility and the transmission scope of the nodes, in addition to the node's energy and the distance to the BS. These four parameters are important to be considered in CBSN where nodes have limited power and can move in a large area with dynamic environment. This is in addition to adopting multi-hop intra-and inter-cluster routing and choosing the appropriate forwarder based on nodes distance, residual energy and transmission scope. This guarantees reliable transmission of data and therefore reduces the delay induced by re-transmission of packets or transmission of data through long paths.

Fig. 6.8 and Fig. 6.9 illustrate the energy consumed by the nodes in different rounds and the total percentage of dropped packets for the four compared schemes.

Both figures show that the proposed scheme performs better than the other algorithms.

For instance, the LEACH-ME protocol consumes the highest energy since CHs are elected based on their mobility status only, thus much more energy is needed to transmit data to the BS when the distance between CHs and BS is large, or when the transmission scope of the CH is low. Also, large size clusters can be formed in LEACH-ME, which will quickly drain the energy of the CH and increase the total energy consumption of the network. This is in addition to the high energy consumed by the nodes due to the direct transmission of data between nodes and CHs and between CHs and the BS. High energy consumption will cause quick drainage of nodes, which will lead to high dropped packets percentage as shown in Fig. 6.9.

LEACH-MEEC performs better than LEACH-ME protocol since it accounts for the residual As for ECBR-MWSN scheme, it consumes less energy than LEACH-ME and LEACH-MEEC since it considers the distance to the BS, as well as the mobility and the residual energy of nodes in the CH selection phase, which leads to the election of more convenient CHs ; also, it adopts multi-hop inter-cluster routing operation that will guarantee transmission of data through shorter paths, and will reduce the frequency of failed transmissions leading to lower percentage of dropped packets.

The proposed scheme consumes less energy than the other four schemes and leads to less percentage of dropped packets since it works on saving energy throughout the cluster formation, CH election, and routing operation. Dividing the network into optimal number of clusters leads to minimum energy consumption, and limiting the number of nodes within clusters avoids the formation of large clusters that will quickly drain the energy of CHs ; electing appropriate CHs fairly distribute the energy between nodes, and following muti-hop routing operation within every cluster and between clusters ensures reliable transmission of data to the BS, minimizing therefore the re-transmission of packets which will further decrease the network's energy consumption and packets' drop rate. Also, the proposed algorithm reduces the computation overhead through avoiding re-cluster formation when nodes remain in their clusters, and through dividing the area into fixed number of clusters with limited number of nodes, which reduces the computation performed by every node in the CH election and routing operation steps. For instance, the distances between every node and the other nodes belonging to the same cluster only are computed. Limiting the computation overhead plays an important role in decreasing both delay and energy consumption of the network.

The results prove that the proposed algorithm succeeds in providing efficient routing and reliable transmission in CBSN through tackling the three steps of the routing process.

6.6/ CONCLUSION

This chapter investigated routing schemes for CBSNs. A summary of different routing models was presented, and a comparison between direct, flat, and cluster based routing models was performed to find which topology is the most suitable for CBSNs. Results showed that cluster based scheme outperforms the other algorithms in terms of delay and energy consumption. A new cluster based routing algorithm was then proposed and compared to many other existing schemes. Simulation results showed that the proposed algorithm induces less delay and energy consumption than the other algorithms, and leads to fewer packets drop, and thus succeeds in helping CBSNs to face many challenges such as mobility, limited resources, and coverage range.

EFFICIENT CLUSTER-BASED ROUTING ALGORITHM FOR BSN

7.1/ INTRODUCTION

In BSNs, nodes have very limited power, and their batteries cannot be changed frequently, especially when they are implanted inside the human body. Also, the sensed data can be very critical and requires fast actions to be taken to save the person's life. Therefore, there is a need to develop efficient and reliable routing schemes that guarantee data delivery with the lowest delay and energy consumption.

Cluster-based routing is proven to be very efficient in prolonging BSN lifetime through spreading the energy consumption equally among body nodes [ul [START_REF] Huque | Sea-ban : Semi-autonomous adaptive routing in wireless body area networks[END_REF], Alghamdi, 2016]. Thus in this chapter, we adjust the cluster-based routing scheme proposed for CBSN in Chapter 6 to fit the BSN challenges and needs and test its performance with respect to different cluster-based scheme proposed in the literature. The remainder of the chapter is organized as follows : related works are presented in Section 7.2. A new efficient cluster-based routing algorithm is proposed in Section 7.3. Simulation and comparison of the proposed scheme to existing routing algorithms, as well as discussion of the corresponding delay and energy consumption performance, are presented in Section 7.4. And the conclusion is drawn in Section 7.5.

7.2/ RELATED WORKS

Few cluster-based routing schemes for BSNs are discussed in the literature, each differs from the other by the way clusters are formed, the criteria used to elect the CH of each cluster, and the routing process for data to reach the sink.

For instance, Improved-LEACH protocol for BSN is presented in [START_REF] Zhang | Research on the wban structure based on leach protocol[END_REF]. Improved-LEACH is an enhancement over the LEACH protocol since CHs are not only elected based on a certain probability, but also based on the residual energy of the nodes and the nodes type ; i.e., less important nodes with the highest residual energy are chosen to be the CHs in a round. The problem with Improved-LEACH is that even though it elects CHs based on significant parameters, it ignores other important criteria such as the nodes' distance to the sink, their mobility, and their communication range. Also, like in LEACH, the number of cluster members might be high in Improved-LEACH, and direct transmission of data is adopted which decreases the routing efficiency.

Authors in [START_REF] Culpepper | Design and analysis of hybrid indirect transmissions (hit) for data gathering in wireless micro sensor networks[END_REF] proposed the Hybrid Indirect Transmission (HIT) protocol. In HIT, CHs are elected by random rotation in a similar way as LEACH. However, unlike LEACH where cluster members send their data via direct transmission to the elected CH, data is sent indirectly via multi-hop route from the nodes to the CH in order to further minimize the energy consumption of nodes. As LEACH, the problem with HIT arises from the random way the CHs are elected, ignoring many parameters important to be considered in BSNs.

In [START_REF] Verma | Energy-efficient cluster-based mechanism for wban communications for healthcare applications[END_REF], authors suggest a cluster-based routing algorithm in which nodes are elected as CHs if both the ratio of their current energy to the average energy of the network and their selection probability computed based on Integer of Linear Programming (IPL) are high. All non-CH nodes located in the region between the elected CH and the sink will become cluster members. This algorithm also ignores many important parameters in the election of CHs, and can also drain the energy of the CH quickly if the number of cluster members is high.

Authors in [START_REF] Watteyne | Anybody : a self-organization protocol for body area networks[END_REF] propose the Anybody protocol, in which nodes with the highest density are elected as CHs, where the density is computed as the ratio of the number of links to the number of nodes within two-hop neighborhood. The data is then sent from the cluster members to the elected CH via a multi-hop intra-cluster path, and from the CH to the sink through a multi-hop inter-cluster route. Since the CH election is based on highest density, this algorithm may not be efficient when the number of cluster members is high, specially that other important criteria such as energy of nodes, distance to the sink, etc. are not considered in the CH election process.

None of the previous research works discussed above offer a complete solution that guarantees energy and delay efficient routing in BSN. They either fail to consider important criteria to elect the best CHs that would lead to better routing efficiency, or they ignore the importance of limiting the number of nodes in a cluster to prevent fast drainage of CH energy, or they adopt inefficient routing operation of data like direct transmission.

We therefore propose adapting the cluster-based routing scheme suggested for CBSN in Chapter 6 to the BSN needs, in the aim to decrease the energy consumption and delay of the network, since the proposed algorithm presents a complete solution that guarantees efficient routing of data which is critical in BSNs.

7.3/ PROPOSED ROUTING ALGORITHM

Like in CBSN, the proposed algorithm considers increasing the routing efficiency through the different steps of the routing process : clusters formation, CH election, and routing operation. The first order energy model described in Chapter 6, and widely adopted in BSN studies [START_REF] Tauqir | Distance aware relaying energy-efficient : Dare to monitor patients in multi-hop body area sensor networks[END_REF], Verma et al., 2015, Nadeem et al., 2013, Javaid et al., 2013a] is used.

7.3.1/ CLUSTERS FORMATION

The proposed scheme follows the same procedure for clusters formation as described in Section 6.4.1 : it calculates the optimal number of clusters using Equation 6.3. This formula computed in [START_REF] Amini | Cluster size optimization in sensor networks with decentralized clusterbased protocols[END_REF], Kumar, 2014] is chosen since it evaluates the best number of clusters that minimizes the total energy consumption in the network which is our main concern.

k optimal clusters will then be formed, each of which encloses N c nodes, where N c = N s k optimal . This formula guarantees that nodes are fairly distributed between clusters, which reduces the energy consumption in the network since the presence of large number of nodes in a cluster will quickly drain the energy of the elected CH. Also, re-cluster formation only occurs when nodes move outside their assigned cluster in order to reduce the computation overhead.

7.3.2/ CH ELECTION

Electing the appropriate CH of every cluster is important to guarantee efficient routing. For this reason, the proposed algorithm considers the following parameters to elect the best CHs that would lead to better routing efficiency :

-Distance between the nodes and the sink ; For every node, the Selection Score (S S ) to become a CH is computed based on the following formula :

S S x = E x • T S x • I d toS ink • M x (7.1)
where :

P x : Probability for node x to become a CH.

E x : Residual energy of node x.

T S x : Transmission Scope of node x.

I : Node Index.

d toS ink : Distance from the transmitting node to the sink.

M x : Mobility factor of node x. Equation 7.1 suggests that in every cluster, the node with the highest energy, TS, and index value, along with the lowest mobility and the shortest distance to the sink, will have the highest probability to be elected as CH.

7.3.2.1/ TRANSMISSION SCOPE COMPUTATION

As in CBSN, the Transmission Scope (TS) of every node is defined as :

T S x = 1 PL exponent of node x (7.2)
TS reveals the connectivity and coverage strength of a node. It is computed as the inverse of the PL exponent of every node. Equation 7.2 implies that the lower is the PL exponent of a node, the higher is its TS value, and therefore, the higher the probability of the node to be selected as CH.

Since nodes are placed on different parts of the body, their PL exponent value is not similar. It ranges between 2.18 and 5.9 depending on the node's location as represented in Table 8.4 [START_REF] Reusens | Characterization of onbody communication channel and energy efficient topology design for wireless body area networks[END_REF]]. As explained in Section 6.4.2, the mobility of node x is computed using Equation 6.7 as the fraction of the number of nodes moving away from node x to the total number of nodes in the cluster. Therefore, if a node moves away from the remaining nodes in the cluster, its mobility factor increases ; otherwise, when the node remain stationary or moves closer to the other nodes, its mobility factor decreases and it will have a higher chance to be elected as CH.

7.3.2.3/ NODE INDEX

The proposed algorithm distinguishes between two types of nodes :

-Holders of important data : nodes capturing vital data like ECG, EEG and EMG, and nodes capturing critical data depending on the patient status. For instance, if the patient has a history with increased blood pressure, the blood pressure sensor is classified as a holder of important data. For this type of nodes, additional measures should be taken to preserve their energy ; they are therefore assigned a low index value to decrease their probability to become CHs.

-Holders of less important data : this type of nodes includes all the other sensors. They are assigned a higher index value to increase their probability to become CHs.

By taking into consideration the three parameters discussed above along with the residual energy of nodes and their distance to the sink, the most appropriate node in every cluster will be elected as CH, increasing therefore the routing efficiency.

7.3.2.4/ ROUTING OPERATION

The routing operation covers both intra-and inter-cluster routing. The proposed scheme adopts the same routing operation used for CBSNs and explained in Section 6.4.3. It follows multi-hop intra-and inter-cluster routing since it reduces the energy consumption of nodes compared to direct routing schemes [START_REF] Culpepper | Design and analysis of hybrid indirect transmissions (hit) for data gathering in wireless micro sensor networks[END_REF]. For intra-cluster routing, the Forwarding Cost (FC x ) presented in 6.8 is computed for every node inside a cluster to select the best forwarder ; the node with the lowest FC (i.e., with the shortest distance to the cluster elected CH, and with the highest residual energy and TS) is selected as a forwarder, and neighboring nodes send their data to this elected node.

Similarly, in inter-cluster routing, the FC of every CH is computed using Equation 6.9, and the CH with the lowest FC is selected as the forwarder of data to the sink.

7.4/ SIMULATION OF THE PROPOSED SCHEME

In this section, the proposed algorithm is compared to existing cluster-based routing schemes. Delay and energy consumption simulations are performed and the obtained results are discussed to assess the performance of the proposed scheme with respect to the others.

7.4.1/ SIMULATION PARAMETERS

In order to assess the performance of the proposed algorithm, we consider a BSN formed of 25 sensors distributed all around the human body as per Fig. 7.1. 20 sensors are placed on the body (wearable sensors) and 5 sensors are either implanted or placed on the back (Non-LOS nodes). To study the effect of mobility, we consider that the arms can move from left to right and vice versa ; and therefore the 6 nodes placed on/in the arms are considered to be mobile. We also consider that around 25% of the nodes (6 out of 25) are holders of important data and are therefore assigned low index value.

The simulation parameters are summarized in Table 7.2.

The proposed algorithm is compared to LEACH and Improved-LEACH cluster-based routing schemes with respect to delay and energy consumption. Simulations were performed using MATLAB R2014b.

7.4.2/ RESULTS AND DISCUSSION

The cumulative delay induced by the proposed algorithm, LEACH, and Improved-LEACH is presented in Fig. 7.2. Results show that the proposed algorithm outperforms the other schemes, since it takes into account the mobility, the node index, and the transmission scope of the nodes, in addition to the nodes' energy and distance to the sink to elect the CHs. The other algorithms either elect the CHs randomly by rotation (LEACH), or only consider the residual energy of nodes and their level of importance (Improved-LEACH) without accounting for the medium condition surrounding the nodes, nor their distance to the sink, nor their mobility. The election of unsuitable CHs leads to higher delays induced by transmission of data over longer distances or through too many obstacles, or by retransmission of the failed packets to the sink. Also, optimal number of clusters is formed in the proposed scheme, which further decreases the total delay in the network. For instance, the LEACH protocol consumes the highest energy since CHs are elected randomly, thus much more energy is needed to transmit data to the sink when the distance between CHs and sink is large, or when the transmission scope of the CH is low, or when CHs move away from the cluster nodes. The energy consumption of the Improved-LEACH is high since it does not take the distance to the sink, the mobility, and the transmission scope of the nodes into consideration. However, it performs better than LEACH protocol, since it accounts for the energy of nodes and their level of importance in the CH election, which would better distribute the energy consumption between nodes.

Also, both LEACH and Improved-LEACH used direct transmission of data from cluster members to CHs, and from CHs to the sink, whereas the proposed algorithm follows a multi-hop intra-and inter-cluster routing which further decreases the nodes' energy consumption. This is in addition to the fact that the proposed algorithm divides the BSN into optimal number of clusters to provide minimum energy consumption, whereas the other two schemes elect the CHs first, and clusters will then be formed by allowing non-CH members to join the closest CH, without accounting for the cluster size nor the number of formed clusters.

Qualitative arguments proving that the proposed scheme is better than the others are presented in Section 7.2. The obtained simulation results are in fact inductive illustrations to these arguments. They further demonstrate that the proposed algorithm succeeds in providing a reliable and efficient routing in BSN through decreasing the delay and energy consumption of every step of the routing process.

7.5/ CONCLUSION

This chapter modified the routing scheme proposed for CBSN in Chapter 6 to fit the BSN needs. The proposed scheme aims to decrease the delay and energy consumption through the three steps of the routing process : cluster formation, CH election, and routing operation of data to the sink. The proposed scheme was compared to other existing cluster-based algorithms with respect to delay and energy consumption. Results showed that it outperforms the others since it provides a solution that guarantees efficient data delivery. The proposed algorithm is therefore highly suitable for BSN applications.

Fast and correct detection of emergencies while maintaining low energy consumption of sensors are essential requirements of BSNs. In this part, a new adaptive data sampling approach is proposed, where the sampling ratio is adapted based on the sensed data variation. Modified-CUSUM control chart is applied to the adaptively sampled data to detect anomalies, and the correlation property between physiological parameters is used to identify emergency cases from false alarms. Several experiments are performed and different parameters are considered to evaluate the efficiency of the proposed approach. et al., 2013bet al., , Haque et al., 2015]]. A sensed value that is out of its normal range can either result from sensor anomaly, or can be an indication of a critical case that should be treated instantly to save the person's life. Thus, correct and fast detection of emergency cases are the two main challenges of BSNs. Another challenge facing BSNs is the restricted energy capacity of the sensors [BouDargham et al., 2018]. The corresponding energy consumption originates from sensing, processing, and communicating data via the radio transceiver. Radio communication accounts for the major part of the energy consumption and it mostly depends on the number of bits that are sent within the network [START_REF] Razzaque | Energy-efficient sensing in wireless sensor networks using compressed sensing[END_REF], Kumar et al., 2017]. Therefore, reducing the size of the transmitted data is very important to increase energy efficiency and prolong the sensors' lifetime.

Addressing the above challenges depends on two main points : (1) appropriate choice of the anomaly detection method that guarantees reliable and accurate identification of emergencies, and ( 2) proper design of data reduction algorithm, i.e. sampling algorithm, to reduce the sensors' energy consumption and ensure fast detection of critical cases [Boudargham et al., 2019c].

Many anomaly detection methods for BSNs were suggested in the literature to identify true emergency conditions [START_REF] Haque | Sensor anomaly detection in wireless sensor networks for healthcare[END_REF], Pachauri et al., 2015, Harrou et al., 2015, Yang et al., 2015, Salem et al., 2013a]. However, in the proposed schemes, sensor nodes collect physiological data and send them to the coordinator without reducing or sampling them before transmission. Even though the coordinator having higher energy capacity than the sensors performs the anomaly detection, the amount of data transmitted by the sensors is very large. This would quickly drain their energy, and delay the identification of emergency cases due to the increased execution time for detecting anomalies.

Moreover, many sampling approaches were proposed to sample both Wireless Sensor Network (WSN) and BSN data from the original sensed measurements [START_REF] Xu | Adaptive samplingbased information collection for wireless body area networks[END_REF]. However, most approaches adopt a fixed sampling rate which is not suitable for BSNs. In fact, human vital signs are dynamic, thus, it is more efficient to adapt the sampling rate to the varying BSN conditions. Few adaptive sampling approaches for BSNs were proposed in [Habib et al., 2016, Mehrani et al., 2019, Makhoul et al., 2015, Benbasat et al., 2007]. However, in most of them, the proposed schemes are implemented at the node level, which requires a lot of computations and increases the nodes' energy consumption.

Based on the above, we propose in this chapter an adaptive sampling algorithm that adapts the sampling rate to the sensed data variance. The idea is to use a variation change detection method to check, during a specific period of time denoted as a jumping window, the variation of the sensed data. A jumping window is a variation of the sliding window where the offset between two successive windows is equal to the window size [El Sibai et al., 2016]. Thus, the sampling rate will be adjusted according to the detected variation. Both the anomaly detection and adaptive sampling schemes are executed by the coordinator having more energy resources than the sensor nodes.

To track the dynamic data evolution, we propose to use the Modified version of CUSUM (Modified-CUSUM) algorithm ; a change detection method that we already proposed for WSNs in a previous work [El [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF].

Several change detection techniques were proposed in the literature. One can cite the control chart methods including Shewhart, Exponential Weighted Moving Average (EWMA), GEOMetric Moving Average (GEOMMA) [Roberts, 1959], Bayes-type algorithms [START_REF] Basseville | Detection of abrupt changes : theory and application[END_REF], time-series modeling and forecasting models such as the Autoregressive Integrated Moving Average (ARIMA) model [START_REF] Fernandes | Fault detection mechanism of a predictive maintenance system based[END_REF], and the likelihood ratio [Gustafsson, 1996]. [START_REF] Yu | An improved arima-based traffic anomaly detection algorithm for wireless sensor networks[END_REF] proposed an improved version of the ARIMA model for anomaly detection in WSNs. [Galeano et al., 2006] studied the complexity of detecting anomalies in multivariate time series. Kalman filter is another common method for anomalies detection. [START_REF] Soule | Combining filtering and statistical methods for anomaly detection[END_REF] proposed a new approach for the detection of traffic anomalies using the Kalman Filter. [START_REF] Knorn | Adaptive kalman filtering for anomaly detection in software appliances[END_REF] used the Kalman Filter algorithm to monitor the software appliance. A mathematical model based on the Kalman Filter was proposed by [START_REF] Manandhar | Detection of faults and attacks including false data injection attack in smart grid using kalman filter[END_REF] for the detection of attacks and faults in the smart-grid system. However, the particularity of CUSUM algorithm resides in its capacity of detecting gradual changes (small shifts) in the process parameters from the expected average [Montgomery, 2007, Wachs, 2010], which is the case of human body vital signs during the emergency cases [START_REF] Harrou | Improved principal component analysis for anomaly detection : Application to an emergency department[END_REF]. In order to detect small shifts, the CUSUM algorithm uses two statistics C + i and C - i that accumulate for relatively high values of the observed process, the distance to (µ 0 + K) and (µ 0 -K) respectively ; µ 0 being the process mean and K being a given threshold.

We assume that physiological data are highly correlated [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF], Yang et al., 2015, Salem et al., 2013a]. This correlation can be used to identify true emergency cases from sensor faults. An anomaly that is detected in more than one sensor is considered to be an emergency case. Once sampled, the data will be sent by the sensors to the coordinator. This latter will apply the Modified-CUSUM algorithm on each attribute over a specific sliding window and will update the sampling rate of every sensor over the next sliding window based on the corresponding data variation. The coordinator will also raise the alarms when emergencies are detected. It acts therefore as the director, instructing every sensor about the optimal number of samples that should be transmitted for accurate, energy-efficient and time-efficient emergency detection. The combination of both Modified-CUSUM algorithm and adaptive sampling technique addresses the BSN challenges in ensuring both correct and fast detection of emergency cases while saving the energy consumption of nodes.

This research work has five main contributions : application of the Modified-CUSUM algorithm to BSNs for the detection of sensors' variability change, proposition of a new adaptive sampling algorithm that uses Modified-CUSUM algorithm to sample the data with a dynamic sampling rate, implementation of the proposed adaptive sampling algorithm using different sampling techniques to identify the most suitable one for BSNs, proposition of a collaborative emergency detection algorithm that uses Modified-CUSUM chart, and application of the proposed algorithm to real healthcare data as well as evaluation of its performance in terms of execution time, ability to accurately detect emergency cases, and energy consumption of nodes, with respect to various window sizes and different number of nodes. Few anomaly detection techniques for BSNs are found in the literature. In the existing research studies, different medical sensors send their observed physiological data to the sink node whose role is to detect emergency cases. For instance, the authors in [START_REF] Haque | Sensor anomaly detection in wireless sensor networks for healthcare[END_REF] proposed a technique to detect sensor anomalies by analyzing the collected data from medical sensors. Based on historical values, the Sequential Minimal Optimization (SMO) regression is applied to predict the sensor value at a certain time. Then, a Dynamic Threshold (DT) calculation model is used for error computation, using which the difference between the predicted values and the sensed ones is computed and compared to a given threshold. This latter is dynamically adjusted based on a statistical analysis of the historical data. If the obtained difference is higher than the threshold, a Majority Voting (MV) is performed to identify true medical cases from sensor faults.

In [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF], the authors tested the performance of several machine learning algorithms to detect anomalies in BSNs. Their approach consists of using a classification algorithm to identify sensors generating abnormal values, followed by applying a regression model to locate abnormal values. To find abnormal values, the difference between the predicted and sensed values is computed ; if it exceeds 10%, the correlation between sensors is checked. If the anomaly is detected in more than one sensor, it is considered genuine indicating an emergency case, otherwise, it is considered as a sensor fault. Several classification algorithms were compared : J48, k-Nearest Neighbours, and Random Forests classification algorithms, along with the Linear Regression and Additive Regression models. The results showed that Random Forests and Additive Regression have the best performance among others.

Yang [START_REF] Yang | Data fault detection in medical sensor networks[END_REF] proposed a data fault detection algorithm in medical body monitoring networks to detect emergency cases via three steps. The first step consists of using a Dynamic-Local Outlier Factor (D-LOF) scheme to detect abnormal sensed data values. The second step involves the prediction of the detected anomalous readings by applying a Linear Regression model based on trapezoidal fuzzy numbers. The third step consists of summarizing fifteen relative position relationships between the normal ranges of the physiological parameters and the corresponding fuzzy prediction results.

In [Salem et al., 2013a], the authors used the J48 decision tree along with the Linear Regression model to detect emergencies. When a record is classified to be abnormal using the J48 decision tree, the Linear Regression model is applied to predict the values of the identified abnormal measurements. If the Euclidian distance between the sensed value and the predicted one is higher than 10% in only one record, the sensed value is considered faulty and will be replaced by the estimated one. If two or more readings are greater than the threshold, an emergency case is assumed and an alarm is raised.

A PCA-based MCUSUM algorithm has been proposed in [START_REF] Harrou | Improved principal component analysis for anomaly detection : Application to an emergency department[END_REF]. The algorithm consists of applying the Principle Component Analysis (PCA), followed by the Multivariate CUmulative SUM (MCUSUM) algorithm to detect small changes that went undetected by PCA. Detection results proved that the combination of both schemes is more effective than applying conventional PCA alone. In [Salem et al., 2013b], the authors suggested an anomaly detection scheme based on the Mahalanobis Distance (MD) to detect anomalies, and Kernel Density Estimator (KDE) to distinguish between emergency cases and sensor faults. MD relies on the correlation between the sensed attributes. Only when the MD exceeds a pre-defined threshold, KDE is executed to spot temporal outliers.

Based on the above, and to the best of our knowledge, none of the existing research studies consider summarizing or sampling the data before detecting anomalies. A huge amount of data is always sent to the coordinator which decreases the sensors' energy efficiency and increases the execution time of the anomaly detection algorithm.

As for existing sampling algorithms for BSNs, few adaptive sampling approaches were suggested. For instance, the authors in [Habib et al., 2016] proposed an early warning score system that allows the sensor node to detect emergencies locally, and to estimate the sensing rate in real-time. Measurements are sent to the coordinator only when the level of criticality of the sensed data changes to reduce data transmissions. In [START_REF] Mehrani | Adaptive sampling rate determination for energy efficiency of wireless body area networks[END_REF], the National Early Warning Score (NEWS) system is used by the sensors to locally recognize emergency conditions. Sensors use a statistical test to compute the variance of the vital signs, and an interpolation function is applied to find the best sampling rate. In [START_REF] Makhoul | Residual energybased adaptive data collection approach for periodic sensor networks[END_REF], the authors designed an adaptive sampling approach that applies three statistical tests based on One-Way Anova model (Tukey, Fisher, and Bartlett). Based on the results, a multiple levels activity scheme using behavior functions is used to determine application classes and adapt the sampling rate. Moreover, the authors in [START_REF] Benbasat | Groggy wakeupautomated generation of power-efficient detection hierarchies for wearable sensors[END_REF] proposed to use a decision tree classifier to dynamically regulate the sampling rate and the activation of the sensors. Only the essential data that determines the system conditions are captured.

The adaptive data sampling approaches presented above aim to minimize the energy consumption of nodes by decreasing the amount of transmitted data. However, they are all implemented at the node level, which decreases the energy efficiency of these nodes due to high computational requirements. To deal with this challenge, we will propose a new adaptive sampling approach based on the data variance detected by an anomaly detection scheme and implemented at the coordinator level. Our goal is to satisfy BSNs requirements in ensuring fast and accurate detection of emergencies while reducing the energy consumption of sensors.

8.2.2/ SAMPLING ALGORITHMS

Sampling algorithms are used to construct a data summary. A summary is a data structure updated whenever new data arrive. Two categories of sampling methods are provided in the literature : probabilistic methods and deterministic ones. Probabilistic methods also called stochastic methods are characterized by the fact that each element has a probability of inclusion in the sample. The composition of the obtained sample is thus random. Simple Random Sampling (SRS) without replacement and Stratified sampling are two examples of random sampling. For deterministic methods, there is no randomness in the composition of the sample : for example, selecting all the elements having even indexes. The choice of the appropriate sampling method depends, of course, on the application and the purpose of the sampling (See [El Sibai et al., 2016] for more details about sampling algorithms). The effectiveness of a summary is measured in terms of the accuracy of the provided response, the memory space to store it, and the time to update it [Midas et al., 2010, El Sibai et al., 2018a]. The challenge is to decide what to store in this summary and how to ensure that the summary can meet the requirements of the application while respecting the available system resources. El [START_REF] Sibai | [END_REF][START_REF] Sibai | A performance evaluation of data streams sampling algorithms over a sliding window[END_REF] studied the performance of several sampling algorithms in terms of their execution time and accuracy of the queries answers.

The construction of a summary (sample) using the SRS without replacement algorithm consists of building a new sample on each jumping window while discarding the sample built on the previous window. To construct a sample of fixed size k in the current window of size w, SRS selects each item with a probability p equal to k/w. This step will be repeated until selecting exactly k distinct items [El Sibai, 2018]. As for the deterministic sampling technique, it is a non-probabilistic method. It consists of selecting, at any time, exactly k items among the w most recent items in the jumping window. Assuming that the data recorded by each sensor have an always-increasing index, each incoming record will be sampled if its index is equal to x × n/k where x > 0 [El [START_REF] Sibai | A performance evaluation of data streams sampling algorithms over a sliding window[END_REF].

8.2.3/ ANOMALY DETECTION

In sensor networks, there are two different types of anomalies : temporal and spatial. Indeed, sensor data has two characteristics : temporal and spatial correlation. Temporal correlation is due to the continuity of the observed measure. It implies that, for a single sensor records, the data value at a given moment is often related to the values measured at close moments. Spatial correlation consists of a strong relationship between the values measured at the same time by nearby sensors.

Several algorithms have been developed to detect anomalies in a spatial context [START_REF] Sibai | Using spatial outliers detection to assess balancing mechanisms in bike sharing systems[END_REF]. Among these algorithms, we mention the quantitative algorithms and graphical algorithms. Quantitative methods perform statistical tests to distinguish the anomalies from the rest of the data, while the graphical algorithms are based on visualization. They present for each spatial point the distribution of its neighbors and identify the anomalies as isolated points, in specific regions. Control charts algorithms raise an alarm when the process presents a suspicious deviation from standard behavior. This deviation is defined based on two given thresholds called control limits. In general, the chart contains three elements : the plotted data corresponding to the process itself, the control limits, and a central line (process average). By comparing the plotted data to these control limits, we can deduce a decision about whether the process is stable (in control) or is unstable (out of control). A control chart consists of two phases. In phase I called the learning phase, the in-control process parameters are estimated and are used to define the control limits. In phase II, the control chart detects the changes in the process parameters. As long as the process remains in control, the data points fall within the control limits. If a data point falls outside the control limits, we consider that the process is out of control, and thus, an investigation is needed to find and eliminate the cause(s) of the occurred change.

To quantify the performance of a control chart algorithm, the Run Length (RL) and Average Run Length (ARL) are used. RL depicts the number of data records required by the control chart algorithm to detect a change and raise an alarm. When there is no change in the process parameters, the process is considered in control. In this case, RL represents the false positives rate. However, when the process is out of control, RL refers to the reactivity of the control chart.

One of the most commonly used control chart algorithms is the CUSUM algorithm. It was designed by Page [START_REF] Page | Continuous inspection schemes[END_REF] to detect a deviation of the process parameters. It allows monitoring the mean of the process and has the capability to detect small shifts (less than 1.5σ, where σ is the standard deviation) from the expected average [Montgomery, 2007]. CUSUM control chart has been widely addressed in the literature. One can cite [Ewan, 1963, Bissell, 1969, Goel et al., 1973, Reynolds, 1975, Lucas et al., 1982]. In [Van Phuong et al., 2006], the authors proposed to use CUSUM to detect attacks in sensor networks such as wormholes, sinkholes, hello flooding, and jamming. [START_REF] Peng | Information sharing for distributed intrusion detection systems[END_REF] used the CUSUM algorithm to detect the denial-of-service attacks in the network. Reynolds [START_REF] Reynolds | Robust cusum charts for monitoring the process mean and variance[END_REF] discussed the problem of CU-SUM robustness to non-normality when controlling the process mean and variance.

8.2.4/ MODIFIED-CUSUM ALGORITHM

Applied on a set of data values, the CUSUM algorithm calculates the cumulative sum of deviations from the target value. Under the assumption that the process (S i ) t≥0 is in control during the training phase, the target value represents the average of the values in the training phase, and is denoted by µ 0 .

Initially, the cumulative sum control chart C i is set to 0. Thereafter, it is calculated as follows :

C i = t j=1 (s j -µ 0 ); t ≥ 1
A deviation is defined as an anomaly record that deviates from the process mean. In order to detect small deviations, CUSUM uses two statistics C + i and C - i . C + i accumulates for relatively high values of the observed process, the cumulative distance to (µ 0 + K).

C + i = max[0, s t -µ 0 -K + C + t-1 ]
K is a predefined threshold that depends on the shift magnitude, and H is the decision threshold. When the value of C + i exceeds H, the process is considered out of control. An alarm will be thus raised. When the value of C + i returns to be below the threshold H, the process is declared as in control. The values of K and H depend on the standard deviation σ 0 of the training values.

K = kσ 0 ; H = hσ 0
It is recommended to select k = 0.5 and h = 4 or 5 in order to attain a good ARL [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF], Siegmund, 2013].

In this chapter, only physiological parameters that exceed the mean value when an anomaly occurs are considered ; like for example when the temperature or the HR exceeds the upper boundary of the normal range. Therefore, only one-sided CUSUM is considered where only positive shifts (C + i ) of deviations are computed. An efficient control chart algorithm must satisfy two requirements. Firstly, it is necessary to minimize the false positives : when the process is in control, no false alarms should be raised. Secondly, any deviation from the monitored process parameter must be detected quickly.

Many improved versions of CUSUM algorithm were proposed in the literature to enhance the Average Run Length (ARL) of the traditional CUSUM chart in detecting very small deviations in the process parameters, mainly, the mean and the variance. In an improved version of CUSUM called FIR CUSUM (for Fast Initial Response) [START_REF] Lucas | Fast initial response for cusum quality-control schemes : give your cusum a head start[END_REF], a headstart is introduced to improve the response time of the algorithm. When the process is out-of-control at the start-up, or when it is restarted after an adjustment, the standard CUSUM may be slow in detecting a shift in the process mean that is present immediately after the start-up of the adjustment. To overcome this problem, the headstart consists of setting the starting values C + i and C - i equal to some nonzero value, typically H/2. Another improved version of CUSUM was presented in [START_REF] Coluccia | An alternative procedure to cumulative sum for cyber-physical attack detection[END_REF]. It aims to improve the responsiveness of the traditional CUSUM algorithm in detecting cyber-physical attacks. [START_REF] Brown | Use of binary cumulative sums and moving averages in nosocomial infection cluster detection[END_REF] studied the performance of the traditional CU-SUM algorithm Moving Average (MA) technique in the detection of genotypically characterized outbreaks of nosocomial infection caused by antimicrobial-resistant bacteria. [START_REF] Morgenstern | Signal anomaly detection using modified cusum method[END_REF] introduced a new version of the CUSUM algorithm to detect signal anomalies in which they proposed an approach to estimate the start time and the duration of the detected anomaly. Once detected, the anomalies will be isolated and classified (Pulse, Sinusoidal, and Jump-type). The start time of the anomaly is declared when the value of C i reaches its maximum after the anomaly being detected, while the end time of the anomaly is declared when the value of C i starts decreasing. Patel [START_REF] Patel | Modified cumulative sum quality control scheme[END_REF] presented a modified two-sided CUSUM algorithm, called MOCUSUM, to monitor the process mean. The ARL of both the traditional CUSUM algorithm and the proposed one was also discussed. The new algorithm improves the responsiveness of the CUSUM algorithm by decreasing its Run Length (RL) -the required out-of-control observations to detect a change. [START_REF] Haq | A new cumulative sum quality control scheme for monitoring the process mean[END_REF] proposed NCUSUM algorithm in which they enhanced the reactivity of the CUSUM algorithm in detecting a shift in the process mean. To achieve that, the authors suggested modifying the selection of the reference value K and the decision threshold H. The performance of NCUSUM was compared to that of FIR CUSUM, EWMA, Shewhart, etc., in terms of the average run length, median run length, and standard deviation of the run length. In [START_REF] Shu | An adaptive cusum procedure for signaling process variance changes of unknown sizes[END_REF], a new CUSUM algorithm for monitoring the process variability was developed. The basic idea of the new algorithm is to dynamically adjust the reference value K of the CUSUM algorithm according to the current process variance. [START_REF] Faisal | A modified cusum control chart for monitoring industrial processes[END_REF] suggested to use a link relative variable transformation technique to improve the performance of the CUSUM algorithm in terms of the ARL, for small and moderate changes. The ARL performance of the new scheme was also compared to that of different CUSUM versions such as traditional CUSUM, FIR CUSUM, weighted CUSUM, etc.

The efficiency of the traditional CUSUM algorithm depends on the magnitude shift value specified in the calculation of the thresholds K and H, and the actual shift magnitude. The performance of CUSUM may thus decrease when the actual deviation is larger than the specified one. To overcome this problem, [START_REF] Dai | A new adaptive cusum control chart for detecting the multivariate process mean[END_REF] proposed a new CUSUM chart that dynamically adjusts the reference value k in order to detect a deviation in the process mean whatever is the actual shift magnitude. [START_REF] Yang | A new non-parametric cusum mean chart[END_REF] proposed a new non-parametric CUSUM chart to monitor the process mean when the underlying data distribution is not normal or unknown. [START_REF] Abbas | Mixed exponentially weighted moving average-cumulative sum charts for process monitoring[END_REF] designed the Mixed EWMA-CUSUM (MEC) chart -a CUSUM chart based on the EWMA statistic -to monitor the process mean. The results have shown that the MEC chart is more performant than the traditional CUSUM algorithm in detecting very small deviations. [Abbas et al., 2013a] applied the EWMA-CUSUM (MEC) for the monitoring of process variability. The new chart is a mix of EWMA statistic and the traditional CUSUM chart and is based on a logarithmic transformation of the data variance. As an improvement of [Abbas et al., 2013a] work, [START_REF] Ali | New gwma-cusum control chart for monitoring the process dispersion[END_REF] implemented the GWMA-CUSUM chart to monitor the process dispersion and detect positive shifts in the variability of a normally distributed process. [START_REF] Zaman | Mixed cusumewma chart for monitoring process dispersion[END_REF] also designed the Mixed CUSUM-EWMA (MCE) chart for monitoring the process variability. [Ali et al., 2018a] designed a new CUSUM chart based on the Generally Weighted Moving Average (GWMA) statistic, called the GWMA-CUSUM chart, to monitor the process mean. It can be seen that EWMA-CUSUM (MEC) -proposed by [START_REF] Abbas | Mixed exponentially weighted moving average-cumulative sum charts for process monitoring[END_REF] -is a special case of GWMA-CUSUM chart since EWMA is a variation of the GWMA in which more recent data have greater weights compared to historical data.

In [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF], the authors proposed a new version of the algorithm, the socalled Modified-CUSUM algorithm, which determines with good precision, the start time and end time of the deviation. In fact, in the standard version of CUSUM as well as all the above discussed CUSUM versions, the deviation is declared after performing several iterations sufficient to have a significant impact on C i . Thus, the deviation is declared after the exact start time of the actual change. Thus, it is not possible to know the exact start time of the deviation, and no estimation of this time is provided in the literature. Furthermore, the observed process is considered under control when C i returns below the threshold H. Since C i is a cumulative sum, CUSUM needs many iterations to reach this condition. Therefore, the end of the deviation is declared long after the actual return of the process to normal behavior.

To overcome these problems, the authors proposed in [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF] the Modified-CUSUM algorithm that provides a more precise description of the detected anomalies. The Modified-CUSUM algorithm is an efficient method for estimating the start and end times of the deviation detected by CUSUM. It estimates the start time of the detected change, and also improves the precision of the end time detection of the change.

When a change is detected by the Modified-CUSUM algorithm, the start time of the change can be estimated by the moment where C i became strictly increasing. This moment can be inferred even if it is former to the detection of the change. For this purpose, a Start Time counter (S T ) was introduced. S T is updated each time C i is calculated. If a change is detected at time t, its start time is estimated as : t -S T + 1. Initially, the value of S T is set to 0. Then, the value of S T will increase by 1 when the value of C i increases, and it will decrease by 1 when the value of C i decreases. When the end of the change is declared, the value of S T is reset to 0.

The concept of estimating the end time of a change is that when the value of C i is constant or decreases, the current change is very likely to be stopped. The condition C i ≤ C t-1 is always achieved before C i < H as in case of change C t-1 > H. To estimate the end time of a change, we introduced the counter ET that we updated each time we calculated C i . ET represents the number of successive decreases of C i . Initially, ET is set to 0, then, it increases by 1 when the value of C i decreases, otherwise, ET is set to 0. The end of the change is declared when the value of ET exceeds a given threshold called ET 0 . ET 0 represents the average number of successive decreases in the training window (when the process is in-control).

The performance of the Modified-CUSUM was compared to that of the standard CUSUM algorithm. The results showed that the new version improves the three efficiency metrics precision, recall, and specificity of the detection.

8.3/ PROPOSED APPROACH FOR EMERGENCY CASES DETEC-TION

We consider a scenario in which multiple wireless sensors distributed over the human body send their captured physiological data to the coordinator node. This latter is placed at the center of the body and possesses high memory and energy resources. We assume that the sensed physiological data are spatially correlated. For instance, a high temperature increases the HR, RESP, BP, Pulse, pH level, minute ventilation (V E ), and perspiration rate [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF], Yang et al., 2015, Salem et al., 2013a, Chapot et al., 1974].

Since sensor nodes have limited energy capabilities and given that fast detection of emergency cases is crucial in BSNs, sampling the data to reduce the number of transmissions and the execution time becomes very important. At the same time, accurate identification of emergencies from sensor faults is also essential and requires a reliable anomaly detection scheme. To deal with these challenges, and satisfy BSNs requirements, we propose in this chapter a new approach for the detection of emergency cases in BSNs. Our approach consists of two phases. At first, Modified-CUSUM algorithm is applied to the sensed data of each sensor to monitor the data variability. Based on the detected variation changes, the Sampling Rate (SR) of each sensor will be adjusted. Secondly, 160CHAPITRE 8. TOWARD FAST AND ACCURATE EMERGENCY CASES DETECTION IN BSN Modified-CUSUM algorithm will be used to monitor the process mean and detect anomalies. At this stage, the classification of the detected anomalies in true emergency cases and false alarms will be accomplished.

In this section, the first phase of our approach is presented. In the following, we propose an adaptive sampling approach for emergency cases detection in BSNs based on the sensed data variance.

8.3.1/ ADAPTIVE SAMPLING ALGORITHM USING MODIFIED-CUSUM

To decrease the energy consumption of sensors and accelerate the anomaly detection process, nodes should sample the data before sending them to the coordinator. The main challenge is to find a suitable SR that would not affect the accuracy of emergency cases detection. For this reason, we propose adapting the SR of sensors based on the sensed data variance.

The decision of the required SR for every sensor is taken by the coordinator who will perform all the needed computations. To detect data variation change, the coordinator applies Modified-CUSUM algorithm presented in Section 8.2.4 to every sensor attribute and adapts the SR accordingly. For instance, the coordinator computes the cumulative sum control chart (C i ) for every sensor and assigns the SR based on the rate of C i with respect to the corresponding decision threshold H. The closer C i is to H, the higher the SR of a sensor will be in the next window. SR is therefore adapted to the variation change of the sensed data. As stated in Section 8.2.4, K = kσ 0 is used to compute C i and the decision threshold H is computed as hσ 0 , where σ 0 is the standard deviation of the sensors training values. k and h are chosen to be 0.5 and 4 respectively, in order to attain a good ARL as recommended in [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF]] and [Siegmund, 2013].

The sensors role is to collect data samples according to the SR assigned by the coordinator. They sample the data over a jumping window : based on the assigned SR, every sensor selects samples from the window and sends them to the coordinator. The SR will be then re-adapted by the coordinator based on the variation of the latest samples received from each sensor. The idea behind the proposed adaptive sampling scheme is illustrated in Figure 8.1. This figure represents an example of the CUSUM control chart applied to a sample of BP (mmHg) dataset. The allowed deviation (K), the decision threshold (H), the deviation of the data measurement s i from the mean, and the result of the positive cumulative sum of deviations denoted as C i are plotted.

When C i is far away from the threshold value H as shown in Figure 8.1a, this indicates that data values are close to the mean. In this case, the risk of emergency is low, and therefore, there is no need to take the whole set of samples in the next sliding window. Thus, the SR of the sensors can be low without affecting the performance of the anomaly detection scheme. However, when C i increases towards the threshold H as shown in Figure 8.1b, this indicates that data variation is high. Therefore, the coordinator needs more samples to judge correctly the situation. Thus, SR should be higher in the next window.

The more C i becomes closer to H, the higher the risk of emergency is as shown in Figure 8.1c. The coordinator might need to look into every data measurement when C i is too close or exceeding H. As shown in Figure 8.1d, when the C i value decreases below H again, SR can be reduced as the data variance is low again, thus, the risk of emergency is reduced as well. sensor, the coordinator sets the initial SR to 1, and uses Modified-CUSUM to compute C i of every measurement of the first window. Then, it adapts the SR based on the percentage of C i with respect to the sensors' decision threshold H. The coordinator forwards the computed SR to the sensor who in return selects the appropriate number of measurements from the next window, and sends them to the coordinator. The latter will re-adapt the SR according to the newly obtained data.

As an example, assume that the window size equals 20, and assume that for a given sensor the value of C i computed for the first window is 50% that of the decision threshold H. The SR will be therefore set to 50%, and 10 samples will be chosen by the sensor from the second window and sent to the coordinator. The result of C i of these selected 10 measurements will determine the new value of SR in the next window, and so on. The SR is therefore adapted to the data variance. Algorithm 7. Adaptive Sampling Scheme -Coordinator Side Receive samples from S i 10:

for j=1 :n do Compute C i for the received n samples 11: As explained in Section 8.3.1, the first phase of our approach consists of using Modified-CUSUM to monitor the process variability to detect the variation change and adapt the SR for each sensor. The next phase consists of using Modified-CUSUM to monitor the process mean to detect anomalies and distinguish between true emergency cases and sensor faults.

C i ( j)= max[0, s j -µ 0 -K i + C i ( j - 1
We define an anomaly to be a data record that engenders an increase of µ 0 . We recall that we are focusing on detecting positive shifts (C + i ) of deviations. Thus, one-sided Modified-CUSUM is considered.

The coordinator node runs Modified-CUSUM on the adaptively sampled data of every sensor attribute and keeps track of the positive value of the cumulative sum of deviation (C + i ). At every time an anomaly is detected in an attribute, i.e. when the value of C + i of a sensor attribute exceeds its specified threshold H, the Start Time (S T ) and End Time (ET ) of the detected anomaly are recorded.

Our algorithm for detecting emergency cases in BSNs is collaborative. Indeed, to identify the anomalies representing true emergency cases from those due to sensor errors, the correlation property between sensor nodes is used.

We assume that, at a specific time, a given anomaly representing a true emergency case is most likely to occur in more than one sensor attribute. Therefore, we propose to bring all the nodes together by correlating the STs and the ETs of their detected anomalies. When a true emergency occurs at a certain time instant, the anomaly will be most probably detected in more than one sensor. Thus, if the coordinator detects anomaly in only one sensor attribute, it is assumed to be a false alarm resulting from a sensor failure.

We suppose that the probability of many sensors (two in our research) being faulty is very low. Therefore, if an anomaly is detected in more than one sensor attribute, it might indicate a true emergency case, but can also result from a false alarm. To identify true critical medical situations, a spatial correlation test is conducted between different sensors. This is done by comparing the STs and the ETs of the generated anomalies. If they overlap, the anomaly is most probable to reflect a true critical case since the alarms are generated by at least two sensors during the same period of time. The detected anomaly is therefore assumed to be a true emergency and the coordinator raises an alarm for the emergency team to react. In case the STs and ETs of the detected anomalies do not overlap, i.e. anomalies are not correlated, the detection is considered faulty and is disregarded.

The flow chart of the proposed emergency detection scheme using collaborative Modified-CUSUM is presented in Figure 8 The mean µ 0 and standard deviation σ 0 of each attribute, along with the value of the threshold ET 0 needed to determine the end time of anomalies are computed in the training window when the physiological parameters are within normal ranges. Their corresponding values are presented in Table 8.1. 12 correlated anomalies are simultaneously injected at the same time periods of two or more sensor attributes to emulate true emergency situations. The time periods of anomalies are chosen randomly. Each anomaly consists of replacing 10 consecutive measu-rements by µ 0 + 5σ 0 to induce positive deviation from the mean. Also, a total of 5 noncorrelated anomalies emulating false alarms are distributed between sensors to check the ability of the proposed scheme in identifying true alarms from sensor faults.

8.4.2/ ENERGY MODEL

In BSNs, sensor energy is consumed by three main modules : the sensing module responsible of sensing physiological data, the microcontroller (MCU) in charge of performing of data processing like data sampling, and the radio communication module responsible of the wireless communication between the sensor and the coordinator [START_REF] Razzaque | Energy-efficient sensing in wireless sensor networks using compressed sensing[END_REF], Karagiannis et al., 2015, Kumar et al., 2017, Bouguera et al., 2018]. Thus, the total energy consumed by a sensor is expressed as :

E t = E sensing + E MCU + E radio (8.1)
Where

E sensing = V s I s t s (8.2) E MCU = V MCUa I MCUa t MCUa + V MCUi I MCUi t MCUi (8.3)
E radio = V tx I tx N tx t tx + V rx I rx N rx t rx + V lx I lx t lx (8.4) E s is the energy consumed from sensing ; V s and I s are the voltage and current energy consumed from sensing data during the time t s .

E MCU is the energy consumed by the microcontroller. V MCUa and I MCUa are the voltage and current energy consumed by the microcontroller during the time t MCUa when the microcontroller is in active mode. Whereas, V MCUi and I MCUi are the voltage and current energy consumed by the microcontroller during the time t MCUi when the microcontroller is in idle mode.

E radio is the energy consumed by the radio transceiver when it is in transmission, reception, or listening state. V tx and I tx are the voltage and current energy consumed by the radio when transmitting N tx bits during t tx period of time. Similarly, V rx and I rx are the voltage and current energy consumed by the radio when receiving N rx bits during t rx period of time. Whereas, V lx and I lx are the voltage and current energy consumed by the radio when it is in idle state. The energy consumed by radio communication is the highest among the sensor modules [START_REF] Razzaque | Energy-efficient sensing in wireless sensor networks using compressed sensing[END_REF], Kumar et al., 2017], especially when the sensor is in transmission state as in our case, where the transceiver energy consumption depends on the number of bits to transmit to the coordinator as per Equation 8.4.

8.4.3/ SCENARIOS AND SIMULATION PARAMETERS

The main aim of this section is to test the performance of the collaborative Modified-CUSUM in detecting emergency cases when adaptive sampling is applied a priori to the 166CHAPITRE 8. TOWARD FAST AND ACCURATE EMERGENCY CASES DETECTION IN BSN sensed data. Since various sampling techniques can be used, another aim of this section is to identify the most suitable sampling method for BSNs. Therefore, the following three scenarios are considered and compared :

-Applying collaborative emergency detection algorithm using Modified-CUSUM, without sampling.

-Applying collaborative emergency detection algorithm using Modified-CUSUM, with probabilistic sampling (Simple Random Sampling (SRS) without replacement).

-Applying collaborative emergency detection algorithm using Modified-CUSUM, with deterministic sampling.

In the first part of the experiments, we consider four sensors capturing the four physiological parameters explained in Section 8.4.1, and sending them to a coordinator node placed in the middle of the human body for processing. MATLAB simulations were performed for different window sizes with respect to the following four metrics :

1. Execution Time : It is the time needed to finish the execution of each of the compared schemes. It includes the time consumed by sensors to collect and transmit the data, in addition to the time needed by the coordinator to perform anomaly detection and raise alarms. This metric is important since it reflects how fast the coordinator can detect emergency cases.

2.

True Positive Rate (TPR), also known as "Recall" : It is the ratio of the number of detected anomalies to the total number of true anomalies, i.e. correlated anomalies, injected in the dataset. It reflects the ability of the algorithm to detect emergency cases.

3.

Precision : It reflects the ability of the algorithm to identify sensor faults from true emergency cases. It is computed as the ratio of the number of detected emergencies to the total number of alarms raised by the algorithm.

4. Specificity : It is the ratio of the number of false alarms accurately detected by the algorithm, to the total number of generated sensor faults. It reflects the ability of the algorithm to detect false alarms.

5.

Accuracy : It shows how well the algorithm is able to detect correct situations, whether the case is a sensor fault or actual emergency. It is computed as the ratio of the number of correct assessments to the total number of assessments.

6.

Sensors Total Energy Consumption : It is the energy consumed by the four sensors to sense, process, and transmit the data to the coordinator. This metric is important as it reveals the energy efficiency of different algorithms.

The simulation parameters are summarized in Table 8.2. We consider that sensors use CC2420 radio transceiver and MS P430F149 microcontroller widely employed in BSNs [tra, 2019, mcu, 2018]. The sensing voltage (V s ) and sensing current (I s ) of different sensors are presented in Table 8.3 [tem, 2016[START_REF] Bp | Integrated silicon pressure sensor mpx5050gp. Freescale Semiconductor[END_REF][START_REF] Hr | Optical sensor for heart rate monitor ic bh1792glc[END_REF][START_REF] Rr | Respiration (pzt) sensor pzt 151015[END_REF]. The values of the allowed deviation K and the decision threshold H are set to 0.5 and 4 respectively as recommended in [START_REF] Sibai | An in-depth analysis of cusum algorithm for the detection of mean and variability deviation in time series[END_REF], Siegmund, 2013]. The sensed sample size is 2 bytes and the channel rate is 250 Kbps. Simulations were conducted on the three scenarios described above for different window sizes to identify the optimal window size and the best sampling technique that can be used in BSNs. In the second part of the experiments, we add three sensors, namely PULSE, blood pH, and minute ventilation V E , and repeat the simulations to test the performance of the suggested scheme for a different number of sensors. PULSE is close to HR, but is measured using a pulse oximeter, whereas HR is the number of interbeat intervals in the ECG signal [Salem et al., 2013a] ; it is also measured in bpm with the normal range of [60 -100]. Blood pH normal values range between [7.35 -7.45], and minute ventilation (V E ) has a normal range of [5 -60] liter per minute [START_REF] Ph | Medicinenet[END_REF][ph, , Ve, 2018]].

In the third part of the experiments, we compare the proposed work with two other anomaly detection algorithms proposed in the literature ; namely the J48 classification tree with linear regression model presented in [Salem et al., 2013a], and the Random Forests classification with additive regression model presented in [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF]. The performance of the three algorithms is compared with respect to recall, precision, specificity, accuracy, execution time, and energy consumption.

In the last part of the experiments, signal graphs representing the variations of the physiological parameters, the variations of C i along with the correct, missed, and false raised alarms are presented to show various cases of correct emergency and sensor faults detection, for various window sizes and number of sensors. The execution time, TPR, precision, specificity, accuracy, and energy consumption results of the three compared schemes are evaluated for a window size w varying from 4 to 50.

The obtained results are illustrated in Figures 8.3,8.4,8.5,8.6,8.7 and 8.8 respectively. Figure 8.3 shows that the execution time is reduced when adaptive sampling is applied before performing anomaly detection. In fact, when anomaly detection is performed without sampling, sensors need to send all the samples to the coordinator. This latter will have to compute the cumulative sum of deviation for all the samples received from the sensors. However, applying adaptive sampling decreases the number of transmitted samples from the sensors. Thus, less computation is required to detect anomalies, leading to lower execution time.

Figure 8.3 also shows that using deterministic sampling achieves slightly better execution time than using SRS. This is due to the fact when using SRS without replacement, more time is needed by the sensors to select distinct random samples. Also, the samples in SRS are randomly chosen and should be re-ordered before running the anomaly detection algorithm which increases the execution time. Simulation results also show that the execution time decreases with the increase of the window size when the SRS or deterministic sampling method is applied. This is explained by the fact that SR is adapted less frequently when the window size increases, which decreases the number of needed computations. Results also demonstrate that for small window sizes (w ≤ 10), applying Modified-CUSUM with deterministic sampling allows detecting the same number of emergencies as that of detecting anomalies without sampling. Using SRS underperforms the other schemes as the window size should be very small (w ≤ 4) for the anomaly detection algorithm to detect the same number of emergencies as the others. The main reason is that random samples are chosen in SRS and might not have a good representation of the dataset ; whereas deterministic sampling ensures a wider and more accurate representation of the data. The TPR when using both deterministic and SRS methods decreases with the increase of the window size since smaller windows allow more frequent and better adaptation of the SR to the sampled data. For instance, the value of SR will be adapted 25 times if the window size is 40, compared to 50 times if the window size is 20 which results in higher accuracy in the anomaly detection scheme. 8.6, and 8.7 show similar results for the precision, specificity and accuracy of the compared schemes : anomaly detection with deterministic sampling achieves the same precision, specificity and accuracy of anomaly detection without sampling for window sizes ≤ 10. These three parameters decrease as the window size increases since smaller windows ensure a more accurate adaptation of SR. Thus, the selected number of samples will allow the coordinator to better distinguish between emergency cases and false alarms. Using SRS instead of deterministic sampling leads to lower precision rate and higher false positive rate since SRS chooses samples randomly. Samples can be totally chosen from the beginning or the end of the window which will not ensure full and appropriate representation of the dataset and will, therefore, lead to poor precision, along with low specificity and accuracy. largely depends on the number of bits to transmit. The lower the number of bits to transmit, the highest the energy efficiency of the sensor is. The results also show that deterministic sampling is slightly more energy efficient than SRS since SRS without replacement is used, thus, more computation is required from sensors to select distinct random samples leading to higher energy consumption.

The above simulation results demonstrate that the most suitable scheme for BSNs is the collaborative Modified-CUSUM with adaptive deterministic sampling and w ≤ 10. This scheme allows faster detection of emergencies among the compared schemes (40% less execution time than collaborative Modified-CUSUM without sampling at w = 10). Also, it offers the same accuracy, precision, specificity, and accuracy as the collaborative Modified-CUSUM without sampling, while ensuring lower energy consumption of sensors (35% less energy consumption than Modified-CUSUM without sampling at w = 10).

8.4.4.2/ ANOMALIES DETECTION FOR DIFFERENT NUMBER OF SENSORS

To test the performance of the three scenarios for a different number of sensors, three other sensors were gradually added (PULSE, blood pH and V E ), and the simulations were 8.2 were used, and the window size was fixed to 10 throughout all the simulations.

Regarding the execution time, Figure 8.9 shows that using adaptive sampling to detect anomalies reduces the total execution time and leads to faster detection of emergencies for a different number of sensors. The execution time increases with the number of sensors, as more computation is required from the coordinator to detect anomalies, and more samples should be sensed, sampled, and transmitted in the network. The results also show that when the number of sensors increases, the TPR increases as well leading to better detection of emergency cases. This is explained by the fact that the anomaly detection algorithm relies on the correlation property between the physiological parameters to identify emergencies.

Increasing the number of sensors will increase the probability of detecting two or more correlated anomalies, which increases TPR.

The precision and specificity comparison with respect to the number of sensors are presented in Figures 8.11 and 8.12. Many conclusions can be drawn from these two figures. On the one hand, one can notice that applying the anomaly detection algorithm to the data sampled using deterministic technique has the same precision and specificity rates as that of detecting anomalies without sampling, when w = 10, and for a various number of sensors.

On the other hand, the results show that applying collaborative Modified-CUSUM either without sampling, or with deterministic sampling, outperforms the collaborative Modified-CUSUM with SRS. This can be explained by the fact that SRS does not provide an accurate representation of the dataset. Finally, one may conclude that both the precision and specificity rates decrease with the increase in the number of sensors. This is due to the increased data size that inevitably increases the number of false alarms leading to lower precision and specificity [START_REF] Yang | Data fault detection in medical sensor networks[END_REF]. The accuracy simulation results are presented in Figure 8.13. They show that for w = 10, anomaly detection with deterministic sampling achieves the same accuracy as anomaly detection without sampling for a different number of sensors. Results also show that the accuracy slightly varies for a various number of sensors. The reason is that even though adding more sensors increases the ability of the algorithm to detect actual emergencies, it also increases the number of false alarms, which decreases the ability of the algorithm to detect sensor faults and leads to approximate equal accuracy rates for a different number of sensors. Simulations also show that anomaly detection with deterministic sampling achieves higher accuracy rates than anomaly detection with SRS for a different number of sensors, which is again due to the loose representation of dataset in SRS, leading to The simulation results presented in this section prove that using the proposed anomaly detection algorithm in Section 8.3.2 along with the adaptive deterministic sampling is the best approach to reduce the execution time, increase the sensors' energy efficiency, and ensure a TPR, precision, specificity, and accuracy similar to those of the collaborative Modified-CUSUM without sampling.

8.4.5/ COMPARISON OF THE PROPOSED ALGORITHM WITH EXISTING SCHEMES

In order to assess the performance of the proposed algorithm with respect to existing work in the literature, we considered the four sensors presented in Section 8.4.1, and the following three schemes were compared with regard to the precision, recall, specificity, and accuracy rates, as well as the execution time and sensors' energy consumption : -J48 decision tree with Linear Regression model [Salem et al., 2013a].

-Random Forests classification algorithm with Additive Regression model [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF].

Simulation results are presented in Table 8.4. Simulation results show that the proposed scheme outperforms the other two schemes in terms of precision, recall, specificity, and accuracy rates. It is, therefore, able to detect actual emergencies and distinguish sensor faults better than the others. The reason is that both J48 with linear regression and Random Forests with additive regression proposed in the literature do not use sliding window for updating data, which is not efficient for dynamic systems like BSNs [START_REF] Haque | Sensor anomaly detection in wireless sensor networks for healthcare[END_REF]. The measured value is compared to an estimated value that may be inaccurate. Both methods are therefore susceptible to misclassification and prediction error. Therefore, the false positive rate increases, reducing the ability of the algorithms to distinguish true emergency cases from sensor faults and leading to a lower precision, recall, specificity, and accuracy rates. The results also show that Random Forest with additive regression performs better than J48 with linear regression. This is because Random Forests generates a lower mean absolute error than J48 [START_REF] Pachauri | Anomaly detection in medical wireless sensor networks using machine learning algorithms[END_REF], and the linear regression used with J48 decision tree increases the estimation errors as it is not a suitable prediction model for BSNs where physiological parameters are dynamic.

As for the execution time, simulation results show that the proposed scheme provides a considerably lower execution time (3.23s) than the others (7.3s and 13.9s). This can be explained by the fact that the proposed scheme is based on adaptive data sampling prior to performing anomaly detection. Thus, less number of samples are transmitted to the coordinator, and therefore, less computation is needed to detect anomalies, leading to reduced execution time. On the contrary, more computation time is needed for the other two schemes since the classification and regression models are applied to all data. Also, Random Forests with additive regression takes more time than J48 with linear regression. This is due to the fact that unlike J48, Random forest computes the weighted average of all leaf nodes to generate the final output which increases the execution time. Also, linear regression is a simpler model and requires less computation than additive regression to predict the estimated values, which decreases the corresponding execution time as well.

Sensors' energy consumption simulation results presented in Table 8.4 show that the proposed scheme outperforms the other two schemes as it reduces the energy consumption of nodes. The adaptive sampling approach suggested in the proposed work is the main reason behind the nodes' energy consumption reduction, as most of the energy is consumed due to the transmission of data from sensor nodes to the coordinator. Reducing the number of samples ultimately decreases the frequency of data transmissions, leading to lower energy consumption. The other schemes do not perform data sampling prior to transmission, thus, sensor nodes transmit more data, leading to increased energy consumption.

The performance comparison of the proposed collaborative Modified-CUSUM with adaptive sampling to other schemes proposed in the literature proved that the proposed work is able to provide better detection of actual emergencies and sensor faults than the others, while guaranteeing faster execution time and lower energy consumption of nodes. It is, therefore, able to address the different challenges of BSNs more efficiently than the compared schemes. The variations of C i for each of the four physiological parameters are illustrated in Figure 8.16. For each parameter, every time C i exceeds the threshold H, an anomaly is detected as a possible indication of an actual emergency. An illustration of all detected anomalies is presented in Figure 8.17.

The collaborative Modified-CUSUM algorithm relies on correlating the STs and the ETs of the detected anomalies to distinguish true emergency cases from sensor faults. The variations of C i of all sensors along with the accurately detected emergencies, the missed emergency cases, and the false raised alarms are presented in Figure 8.18. The figure shows that 12 alarms are raised by the algorithm, 11 of them are accurate emergency cases, whereas 1 raised alarm is a false alarm caused by the correlation of anomalies detected by HR and BPmean physiological parameters, and 1 emergency case went undetected, since it was only detected by the HR parameter and missed by the others.

All the other alarms shown in Figure 8.17 are identified as sensor faults.

To show the effect of applying deterministic adaptive sampling prior to collaborative Modified-CUSUM anomaly detection, the variations of the four physiological parameters when deterministic sampling with w = 10 is applied are illustrated in Figure 8.19, and the corresponding variations of C i along with the detected, missed, and false alarms are presented in Figure 8.20. Illustrations show that applying deterministic sampling prior to anomaly detection for small window sizes (w = 10) leads to similar results as anomaly detection without sampling. The same number of accurate and missed emergencies are perceived, and the same number of false alarms are generated.

The illustration of the variations of C i along with the corresponding raised and missed alarms when the window size increases (w = 20) is presented in Figure 8.21. As the figure shows, increasing the window size decreases the performance of the proposed scheme. The total number of raised alarms is 11, 9 of which are true emergency cases, 2 raised alarms are false alarms, and 3 emergency cases went undetected. This leads to higher false positive and lower true positive rates, decreasing, therefore, the precision, recall, specificity, and accuracy rates.

To check the effect of increasing the number of sensors on the performance of the proposed scheme, the variations of C i along with the corresponding alarms are illustrated in Figure 8.22 for six sensors, namely BPmean, HR, Resp, Body Temp, Blood pH, and minute ventilation, for w = 10.

The figure shows that 14 total alarms are raised by the algorithm, 12 of them are correct detected emergency cases, and the remaining 2 are false alarms. All emergency situations are detected in this scenario ; however, the number of false alarms is higher than that of using four sensors due to the increased data size. Adding more sensors increases both the true positive and the false positive rates, leading therefore to higher recall, but lower precision and specificity than using a lower number of sensors.

8.5/ CONCLUSION

In this Chapter, an adaptive data sampling algorithm was proposed to detect emergency cases in BSNs. The goal is to provide fast and correct anomalies (emergency cases) detection in BSN physiological data and to ensure at the same time high energy efficiency of sensors. The proposed approach consists of applying a sampling algorithm, followed by sampling the data in reducing the anomalies detection execution time, while considering several sampling techniques. In the proposed approach, the coordinator applies Modified-CUSUM to each sensor attribute, adapts the SR of each attribute to the corresponding detected variation and sends the computed SRs to the sensors. These latter will then select the appropriate number of samples and send them to the coordinator for analysis. For every attribute, the coordinator computes the cumulative sum of deviations to detect anomalies and saves the corresponding STs and ETs. Then, the correlation property between the attributes is used to identify emergency cases. An alarm is raised by the coordinator when an anomaly is detected in more than one attribute and happened during the same period of time. Several simulations were performed and different parameters were considered. Results showed that implementing deterministic adaptive sampling with collaborative Modified-CUSUM provides the lowest execution time, similar TPR, precision, specificity, and accuracy as the collaborative Modified-CUSUM without sampling for restricted windows (w ≤ 10), and highest energy efficiency of sensors among the compared schemes. Results also showed that using adaptive deterministic sampling for emergency detection outperforms the other schemes for a various number of sensors, which proves that this sampling technique is suitable for BSN and satisfies its requirements.

identify the most suitable model for these networks ; an efficient routing protocol is suggested for CBSNs in the same chapter and simulations were conducted to assess the ability of the proposed scheme to address CBSNs challenges such as mobility, limited resources, and coverage range. The proposed routing scheme was then modified to fit BSNs needs in Chapter 7 ; it was then compared to existing routing protocols in order to assess its performance. Simulations showed that the proposed scheme guarantee efficient data delivery and are highly suitable for BSN application.

In order to decrease the energy consumption of nodes, reducing the amount of data transmitted by their radio transceivers. This can be achieved through using suitable sampling algorithms that decrease the amount of data without affecting the accuracy of anomaly detection. Therefore in Chapter 8, an adaptive sampling algorithm that adapts the sampling rate to the data variance was proposed for BSNs. The main contribution of this algorithm is the combination of both anomaly detection and adaptive sampling techniques to address the BSN challenges in ensuring both correct and fast detection of emergency cases while saving the energy consumption of nodes.

9.2/ PERPECTIVES

The experiments, results, and knowledge acquired during this research work open the door to many short term, medium, and long term perspectives in various domains.

Concerning short term perspectives, many ideas are inspired from the work presented in this thesis. For instance, the routing protocols presented for CBSNs in Part IV are based on 2D configurations covering M × M area. We intend to expand the research and design an efficient 3D routing scheme to address the challenges of applications where nodes are distributed in 3D areas like employees or rescue teams present inside a building formed of several floors. In addition, cluster-based routing is proven to be the best routing model for CBSNs. In Chapter 6, we have proposed a cluster-based routing scheme in which we adopt flat routing for intra-and inter-cluster communications. However, if the number of nodes in the cluster is high, flat routing might not give the best performance ; thus future work includes proposing and testing the performance of multi-level cluster based scheme rather than flat model in intra-cluster routing for large scale CBSNs. Also, in Chapter 8, the sampling rate of the proposed sampling scheme is dynamically adapted based on the data change detection computed by Modified-CUSUM algorithm. In our future work, we plan to apply and compare the performance of the adaptive sampling approach with other change detection methods such as the Exponential Weighted Moving Average (EWMA) and Shewhart. Moreover, it would be interesting to compare the behavior of different change detection techniques under various BSN scenarios, like during periodic observations and in emergency cases. Furthermore, we intend to implement the proposed MAC, routing and adaptive sampling algorithms on tangible sensors in order to assess their actual performance in real BSNs' and CBSNs' applications.

In the medium term, addressing the security challenges faced by BSNs is very important. Such area is of great significance since the patient related data and the medical information transmitted over the network are very important and sensitive. BSNs are therefore highly vulnerable to several threats and attacks. Malicious adversaries can eavesdrop on the traffic between the sensors, the CU, and the remote healthcare, and menaces the integrity of the network operation. Threats can be disastrous for patients' health, as they might either lead to erroneous actions like inaccurate drug delivery, or prevent appropriate actions that can save peoples' lives. Therefore, strong security measures should be taken to ensure that data is sent safely and people's privacy is maintained. The main challenge in BSNs is to design a platform that combines both high security measures and high QoS. For instance, nodes in BSNs have very limited power capacities, computation capabilities, and memory space, and are therefore unable to handle complex cryptographic algorithms. Also, the security architecture should be able to satisfy the strict delay requirements of BSNs. For this reason, lightweight and fast security systems should be designed for these networks in order to reduce the energy consumption of nodes and the computation overhead. Designing and implementing secured and at the same time efficient MAC and routing schemes for BSNs should also be addressed. In addition, development of dedicated software and applications that integrate BSNs with mobile phones is an important field of research. As for CBSN, cooperative routing schemes should be investigated, in which different parts of the message are sent over different paths in a way that no node along the path will receive the complete message, in order to guarantee secured data routing while maintaining high energy efficiency of nodes.

In this thesis, BSNs are tacked separately as an individual network. In the long term perspective, we plan to move toward a more intelligent world and investigate hybrid or heterogeneous networks, in which BSNs' nodes are not only connected to each other, but also to other networks. Example includes the integration of BSNs to Vehicular Ad-hoc Networks (VANETs), to ensure higher traffic safety through taking advantage of the ability of BSNs to detect the health status of the driver such as being exhausted, drunk, distracted, stressed or frustrated, etc., and the capability of VANETs to communicate and send alert messages to other vehicles and to emergency services with location information. This integration also enhances the communication between the patients and the health care providers, leading to a better driving experience for long term patients like diabetes, blood pressure and heart patients, as well as people with special needs (deaf or mute).

One of the challenges faced by heterogeneous networks is the dynamic aspect, both spatial and temporal, of these systems : the number of nodes is not fixed a priori and they can join or leave the network. This requires the design of competent ad hoc algorithms at the level of MAC, routing, data collection and processing. For instance, suitable MAC protocols able to coordinate the access of hybrid networks to a shared medium should be studied and analyzed. Reactive data routing schemes, as well as multivariate data collection, processing and fusion should be explored and designed. Also, security and trust management methods, in addition to different ways to optimize the energy consumption of such networks should be inspected. Another long term prospect would be incorporating the Artificial Intelligence (AI) through the utilization of deep and machine learning techniques in BSNs and CBSNs, to improve the networks' operation and the data exploration in multiple domains, since a large amount of data is periodically collected from these networks. Machine learning techniques can be used at the routing level to predict the best routing paths for example, or to create optimal clusters. In addition, machine and deep learning can be employed to ameliorate the identification of events and to improve the results of anomaly and fault detection. They can also be used to enhance the QoS of the network, like addressing unbalanced traffic and data redundancy issues.

FIGURE 1 . 1 -

 11 FIGURE 1.1 -OSI Model Layers

FIGURE 1

 1 FIGURE 1.2 -Thesis Organization

FIGURE 2

 2 FIGURE 2.2 -BSN Applications

FIGURE 2 . 3 -

 23 FIGURE 2.3 -CBSN General Architecture

FIGURE 3 . 1 -

 31 FIGURE 3.1 -CSMA/CA Algorithm

FIGURE 3 . 2 -

 32 FIGURE 3.2 -Static-TDMA Access Scheme

  3.

FIGURE 3 . 3 -

 33 FIGURE 3.3 -DTDMA Access Scheme

FIGURE 3

 3 FIGURE 3.4 -FDMA Access Scheme

FIGURE 3 . 5 -

 35 FIGURE 3.5 -DS-CDMA Access Scheme

FIGURE 3 . 7 -

 37 FIGURE 3.7 -Delay Performance of MAC Protocols

FIGURE 3 . 8 -

 38 FIGURE 3.8 -Delay Performance for Different Times Between Successive Packets Generation

FIGURE 3 . 9 -

 39 FIGURE 3.9 -Scalability Performance of MAC Protocols

FIGURE 3 .

 3 FIGURE 3.11 -Throughput Performance for Different Times Between Successive Packets Generation

FIGURE 3 .

 3 FIGURE 3.12 -Energy Consumption Performance of MAC Protocols

FIGURE 3 .

 3 FIGURE 3.13 -Energy Performance for Different Times Between Successive Packets Generation

FIGURE 3 .

 3 FIGURE 3.14 -Hybrid DTDMA / DS-CDMA Scheme

  .

FIGURE 3 .

 3 FIGURE 3.15 -Delay Performance of Hybrid DTDMA / DS-CDMA

FIGURE 3 .

 3 FIGURE 3.18 -Delay Performance Comparison

FIGURE 3 .

 3 FIGURE 3.21 -Delay Performance Evaluation

FIGURE 3 .

 3 FIGURE 3.23 -Energy Performance Evaluation

FIGURE 4 . 1 -

 41 FIGURE 4.1 -Proposed MAC Superframe Structure.

  Periodic Traffic Case (b) Case of Burst in One Node (c) Case of Burst in Multiple Nodes

FIGURE 4 . 2 -

 42 FIGURE 4.2 -Slot Allocation Procedure

Algorithm 2 .

 2 Dynamic Slot Allocation for Regular Data 1: for every node n i carrying periodic data do 2:

FIGURE 4 . 3 -

 43 FIGURE 4.3 -Block Diagram of Protocol Data Transfer Operation.

FIGURE 4 . 4 -

 44 FIGURE 4.4 -Delay Performance of MAC Protocols.

FIGURE 4 . 5 -

 45 FIGURE 4.5 -Average Delay of Emergency and Regular Packets

FIGURE 4 . 6 -

 46 FIGURE 4.6 -Packet Drop Performance of MAC Protocols.

Figure 4 .

 4 Figure 4.7 presents the energy consumption performance of the three compared protocols.

FIGURE 4 . 7 -

 47 FIGURE 4.7 -Energy Performance of MAC Protocols.

FIGURE 4 . 8 -

 48 FIGURE 4.8 -Delay Performance for Varying Payload Size.

FIGURE 4 . 9 -

 49 FIGURE 4.9 -Packet Drop for Varying Payload Size.

FIGURE 4 .

 4 FIGURE 4.10 -Energy Consumption for Varying Payload Size

FIGURE 5 . 1 -

 51 FIGURE 5.1 -TMA-MAC Superframe Structure

Algorithm 4 .

 4 Dynamic Slot Allocation for static Nodes in Regular State 1: for every static node n carrying periodic data do 2:if spreading code is previously assigned to n then of slots (s n ) based on the packet rate (R) of n using

  FIGURE 5.5 -Slot Allocation Operational Example

FIGURE 5 . 7 -FIGURE 5 . 8 -

 5758 FIGURE 5.7 -Average Delay of Emergency and Regular Packets

FIGURE 5 . 9 -

 59 FIGURE 5.9 -Energy Performance Under Various Number of Emergency Nodes

FIGURE 5 .

 5 FIGURE 5.10 -Delay Performance Under Various Number of Mobile Nodes

FIGURE 5 .

 5 FIGURE 5.11 -Packet Drop Performance Under Various Number of Mobile Nodes

FIGURE 6 . 1 -

 61 FIGURE 6.1 -Different Routing Models

FIGURE 6 . 2 -

 62 FIGURE 6.2 -Energy Radio Model

FIGURE 6 . 3 -

 63

FIGURE 6 . 4 -

 64

  if number of nodes in c j < L max then 10: Assign x to cluster c j ; 11: if number of nodes in c 2 = L max then 12: Look for another suitable neighbouring cluster c k ; 13: Assign x to cluster c k ; all suitable neighbouring clusters have reached L max then 17: Select one of these clusters randomly (c r ) ; 18:Release a node from c r and repeat steps 7 to 15 to re-assign it to

FIGURE 6 . 5 -

 65

FIGURE 6 . 8 -FIGURE 6 . 9 -

 6869 FIGURE 6.8 -Energy Performance of Different Routing Schemes

-

FIGURE 7

 7 FIGURE 7.1 -Nodes Distribution

FIGURE 7 . 2 -

 72 FIGURE 7.2 -Delay Performance of Different Routing Schemes

  In a temporal context, Control charts are the main algorithms used in Statistical Process 156CHAPITRE 8. TOWARD FAST AND ACCURATE EMERGENCY CASES DETECTION IN BSN Control (SPC). Initiated by Walter A. Shewhart of the Bell Telephone Laboratories in 1924, SPC consists of a set of methods used to measure and control the process quality. Control chart algorithms aim to supervise the process stability over time by detecting any change in its parameters.

  (a) C i Away from Threshold (b) Increasing Value of C i (c) C i Reaching Threshold Value (d) Decreasing Value of C i

FIGURE 8 . 1 -

 81 FIGURE 8.1 -CUSUM Control Chart for Blood Pressure

FIGURE 8 . 2 -

 82 FIGURE 8.2 -Collaborative Emergency Detection Algorithm using Modified-CUSUM

168CHAPITRE 8 .

 8 TOWARD FAST AND ACCURATE EMERGENCY CASES DETECTION IN BSN 8.4.4/ SIMULATION RESULTS AND DISCUSSION 8.4.4.1/ SIMULATION RESULTS FOR DIFFERENT WINDOW SIZES

FIGURE 8 . 3 -

 83 FIGURE 8.3 -Impact of the window size on the execution time

FIGURE 8 . 4 -

 84 FIGURE 8.4 -Impact of the window size on the True Positive Rate (TPR)

  Figures 8.5, 8.6, and 8.7 show similar results for the precision, specificity and accuracy of the compared schemes : anomaly detection with deterministic sampling achieves the same precision, specificity and accuracy of anomaly detection without sampling for window sizes ≤ 10. These three parameters decrease as the window size increases since smaller windows ensure a more accurate adaptation of SR. Thus, the selected number of samples will allow the coordinator to better distinguish between emergency cases and false alarms. Using SRS instead of deterministic sampling leads to lower precision rate and higher false positive rate since SRS chooses samples randomly. Samples can be totally chosen from the beginning or the end of the window which will not ensure full and appropriate representation of the dataset and will, therefore, lead to poor precision, along with low specificity and accuracy.

FIGURE 8 . 5 -FIGURE 8 . 6 -FIGURE 8 . 7 -

 858687 FIGURE 8.5 -Impact of the window size on the precision

FIGURE 8 . 8 -

 88 FIGURE 8.8 -Impact of the window size on the energy consumption

FIGURE 8 . 9 -

 89 FIGURE 8.9 -Impact of the number of sensors on the execution time

FIGURE 8 .

 8 FIGURE 8.10 -Impact of the number of sensors on the True Positive Rate (TPR)

FIGURE 8 .

 8 FIGURE 8.11 -Impact of the number of sensors on the precision

FIGURE 8 .

 8 FIGURE 8.12 -Impact of the number of sensors on the specificity

FIGURE 8 .

 8 FIGURE 8.13 -Impact of the number of sensors on the accuracy

FIGURE 8 .

 8 FIGURE 8.14 -Impact of the number of sensors on the energy consumption

8. 4 . 6 /

 46 FIGURE 8.15 -Variation of Physiological Parameters Without Sampling

  (a) CUSUM Control Chart for Blood Pressure (b) CUSUM Control Chart for Heart Rate (c) CUSUM Control Chart for Respiration Rate (d) CUSUM Control Chart for Body Temperature

FIGURE 8 .

 8 FIGURE 8.16 -CUSUM Control Chart for Different Physiological Parameters

FIGURE 8 .

 8 FIGURE 8.17 -All Anomalies Detected by the Algorithm

FIGURE 8 .

 8 FIGURE 8.19 -Variation of Physiological Parameters After Sampling

FIGURE 8 .

 8 FIGURE 8.22 -Alarms Raised when Using Six Sensors

TABLE 2 .

 2 1 -Different Types of Sensors

	Sensors Type	Description	Position
	Accelerometer	Collecting acceleration on the spatial axis of	Wearable
		three-dimensional space.
	Artificial cochlea (hearing aid)	and sending them to electrodes implanted in Transforming voice signal into electric pulse	Implanted
		ears, providing hearing sensation through simu-
		lating aural nerves.
	Artificial retina (visual aid)	converting them to electric pulse signals to be Capturing pictures by external camera and	Implanted
		used to provide visual sensation through simu-
		lating optic nerves.
	Blood-pressure	Finding the maximum systolic pressure and the	Wearable
	sensor	minimum diastolic pressure.
	Gastrointestinal sensor (camera pill)	capsule endoscope technique. Identifying gastrointestinal tract via wireless	Implanted
	Carbon dioxide sensor	content of carbon dioxide from diverse gas Using infrared technique to measure the	Wearable
	ECG/EEG/EMG	Placing two electrodes on the body skin
	sensor	and measuring the voltage difference between
		them.

TABLE 2 .

 2 2 -Sensors Data Rates Requirements

	Sensor Type	Data Rate
	ECG (12 Leads)	288 Kbps
	ECG (6 Leads)	71 Kbps
	EMG	320 Kbps
	EEG (12 Leads)	43.2 Kbps
	Blood saturation	16 bps
	Glucose level	1.6 Kbps
	Temperature	120 bps
	Motion	35 Kbps
	Artificial retina	50-700 Kbps
	Audio	1 Mbps
	Voice	50-100 Kbps
	Endoscope Capsule	2 Mbps
	data to a local processing.

Table 2 .

 2

3 presents the different technologies and standards used for both short range and long range communication between sensors, coordinator device and external back-end server. It shows that the radio standards used to implement in-body and on-body network communications are short-range communication standards including Industrial Scientific and Medical (ISM) band, Medical Implant Communication Service (MICS) band, Wireless Medical Telemetry Service (WMTS), Radio-Frequency Identification (RFID), Bluetooth, Zigbee, and WLAN (Wi-Fi) technologies ; whereas the radio standards used to implement external network communication are medium and long-range communication standards including Cellular Networks, WiFi, GPRS, Zigbee, Wibro, and Satellite technologies.

TABLE 2 .

 2

		3 -Radio Communication Standards
	Communication	In-Body	On-Body		External Network
	Type
	Description	Between sensor	Between sensor	Between	coordinator
		nodes	nodes and coor-	and external server
			dinator
	Communication	Short range	Short range	Medium to long range
	range
	Radio communi-	Low frequency in-	WMTS,	RFID,	Cellular	Networks
	cation standard	ductive coupling,	Bluetooth,	Zig-	(CDMA/ HSDPA/ GPRS/
		ISM, MICS	bee, WLAN (Wi-	EDGE/ UMTS, WiFi,
			Fi)		Zigbee, Wibro, satellite)
	Data format	Raw signal	Raw signal		XML, CSV, JSON, etc.

TABLE 2 .

 2 4 -Sensor Types and Connection Interface

	Company	Sensor Name		Description	Interface
	Movisens	Move 4 Activity	Sensor for the acqui-	Micro-USB -BLE
	(Germany)	Sensor		sition of 3D accelero-
	[mov, 2019]			meter, gyroscope, baro-
				metric air pressure, and
				temperature
		LightMove	4	Sensor for the acquisi-	Micro-USB -BLE
		(Light and Acti-	tion of ambient light, 3D
		vity Sensor)		acceleration, gyroscope,
				barometric air pressure
				and temperature
		EcgMove 4 (ECG	Sensor for the acquisi-	Micro-USB -BLE
		and Activity Sen-	tion of ECG, 3D accele-
		sor)		ration, gyroscope, baro-
				metric air pressure and
				temperature
		EdaMove 4 (Elec-	Sensor for the acqui-	Micro-USB -BLE
		trodermal Activity	sition of EDA, 3D ac-
		(EDA) and Acti-	celeration, rotation rate,
		vity Sensor)		barometric air pressure
				and temperature
	Movisens Accessories	Cradle EcgMove Cradle 4 and	charge the sensors, and Used to configure and	Mini USB port
		3		to read out the data
	Continued on next page.

Table 2 .

 2

	5 shows that CBSN shares some common characteristics with WSN, such as
	large network coverage and scale (meters/kilometers), dynamic environment condition
	and high scalability ; it also shares other common features with single BSN, such as
	network heterogeneity, energy constraints of nodes, sensors types, and restricted sizes,
	while maintaining some unique characteristics such as system architecture (MB-MBS)
	and dynamic topology resulting from mobility of multiple persons. Therefore, applying

existing schemes solely designed for WSN or BSN in different areas like data fusion, QoS based routing and MAC protocols, etc. to CBSN may not be the best solution to the challenges faced by this type of networks. There is a need to investigate and develop new algorithms and techniques in different research areas to satisfy CBSN requirements.

TABLE 2 .

 2 5 -Comparison between WSN, BSN and CBSN

	Requirements		WSN			BSN	CBSN
	Scale/operating	Meters vs. kilome-	Few centimeters to 2	Meters vs. kilome-
	range		ters			m. standard and 5 m.	ters
						special use
	Coverage		Monitored environ-	Placed in, on, and	Placed	in,	on,
			ment			around the body	around many human
							bodies and cove-
							ring the monitored
							environment
	Network		Can reach thou-	Maximum 100 devices	Can reach thou-
	size/node num-	sands	of	de-	per network	sands of devices per
	ber		vices/network			network
	Lifetime/battery	Many			Many years/months	Many years/months
	life		years/months		with smaller battery	with smaller battery
						capacity	capacity
	Node size		Small is better but	Small and light in	Small and light in
			not mandatory		weight is essential	weight is essential
	Network topology Mostly static : star,	Dynamic due to single	Very dynamic due to
			P2P, tree or mesh	body movement	mobility of multiple
							persons
	Received	Data	Through node re-	Through node accu-	Through	node
	accuracy		dundancy		racy and robustness,	accuracy and ro-
						as well as QoS sys-	bustness along with
						tems	more complex QoS
							systems
	Data rates		Mostly homoge-	Heterogeneous : Va-	Heterogeneous : Va-
			neous			ries from sub Kbps up	ries from sub Kbps
						to 10 Mbps in one net-	up to 10 Mbps in one
						work	network
	Nodes and bat-	Easy : accessible	Difficult, specially for	Difficult, specially for
	tery replacement	or	disposable	implanted nodes	implanted nodes
			nodes
	Mobility		Low : nodes consi-	High mobility of nodes	Very high mobility :
			dered stationary	as person moves.	different	bodies
						Nodes	follow	the	are moving in dif-
						same mobility pattern	ferent	directions.
							Also, nodes within
							one body change
							location when the
							body moves, and
							nodes placed in dif-
							ferent bodies have
							different	mobility
							patterns
	Continued on next page.

  III MAC PROTOCOLS FOR BSNS AND CBSNS 37This part tackles the MAC protocols for BSNs and CBSNs. It is formed of three chapters. Chapter 3 analytically and experimentally compares the performance of five standard MAC protocols in a high traffic BSN environment, with respect to different QoS and network performance metrics ; it then proposes an efficient MAC scheme suitable for such environments. Chapter 4 proposes an emergency aware traffic adaptive MAC protocol for BSNs, and compares its performance to other schemes with respect to varying number of emergency nodes and varying payload sizes. Whereas Chapter 5 proposes a Traffic and Mobility Aware MAC (TMA-MAC) protocol for CBSNs and compares its performance to existing schemes in the literature.

	PERFORMANCE OF MAC PROTOCOLS
	IN HIGH TRAFFIC BSNS
	3.1/ INTRODUCTION
	Frequency
	Division Multiple Access (FDMA), Carrier Sense Multiple Access with Colli-
	sion Avoidance (CSMA/CA), and Direct Sequence Code Division Multiple Ac-
	cess (DS-CDMA). In the literature, many studies discuss the QoS characteris-
	tics and performance of different MAC protocols in Wireless Sensor Networks
	(WSNs) in general and BSNs in particular

In BSN, sending data with adequate QoS like designing a high scalable system and sending data with a minimal delay and high throughput are crucial

[Guyeux et al., 2015, Bahi et al., 2012, Yuan et al., 2019]

. The QoS of BSN largely depends on the design and choice of the MAC protocol.

Standard MAC protocols for BSNs include Static Time Division Multiple Access (Static-TDMA), Dynamic Time Division Multiple Access (DTDMA),

TABLE 3 .1 -MAC Protocols Studied in Literature-Delay Analysis Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

 3

	Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA
	Delay	High	High	High	High	Low
	3.3.2/ SCALABILITY ANALYSIS

TABLE 3 .

 3

	3 -MAC Protocols Studied in Literature-Scalability Analysis

Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	Scalability	Poor	Poor	Poor	Good	Good
	3.3.3/ THROUGHPUT ANALYSIS
	Throughput is a key performance QoS metric in BSN. It illustrates the rate of suc-
	cessful delivery of messages, and reflects therefore the reliability of the system. Yang
	et al.

TABLE 3 .

 3

	5 -MAC Protocols Studied in Literature-Throughput Analysis

Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	Throughput	Low	Intermediate	Low	Very Low	High

TABLE 3 .

 3

	7 -MAC Protocols Studied in Literature-Synchronization Analysis

Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	Synchronization	Required	Required Not Required Not Required Not Required
	3.3.5/ PROBABILITY OF COLLISION ANALYSIS
	Studying probability of collision is important as it affects many other QoS and net-
	work performance parameters. For instance, a high probability of collision leads to hi-
	gher delay and energy consumption, and lower throughput

TABLE 3

 3

	.9 -MAC Protocols Studied in Literature-Probability of Collision Analysis

Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	[Nando et al., 2019]	yes	yes	yes	no	yes
	TABLE 3.10 -Probability of Collision Analysis Results

Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	Probability of Collision	Low	Low	Low	High	Low

TABLE 3

 3

	.11 -MAC Protocols Studied in Literature-Hardware Complexity Analysis
	Reference	Static-

TDMA DTDMA FDMA CSMA/CA DS-CDMA Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

	Hardware Complexity	Low	Low	High	Low	High
	3.3.7/ POWER EFFICIENCY ANALYSIS
	Power efficiency is a critical performance metric in BSN since nodes have limited po-
	wer capabilities and it is very hard to replace their power unit specially if they are im-
	planted in the body. Many articles discuss the different sources of power consump-

TABLE 3 .13 -MAC Protocols Studied in Literature-Energy Consumption Analysis Reference Static-TDMA DTDMA FDMA CSMA/CA DS-CDMATABLE 3 .14 -Energy Consumption Analysis Results Performance Metric Static-TDMA DTDMA FDMA CSMA/CA DS-CDMA

 33

	Energy Consumption	Low	Low	Low	High	High
	throughput, time synchronization, probability of collision, hardware complexity and energy
	consumption.
		TABLE 3.15 -Survey Analysis Summary
	Performance Metric Static-TDMA	DTDMA	FDMA	CSMA/CA	DS-CDMA
	Delay	High	High	High	High	Low
	Scalability	Poor	Poor	Poor	Good	Good
	Throughput	Low	Intermediate	Low	Very Low	High
	Time Synchronization	Required	Required	Not Required Not Required Not Required
	Probability of Collision	Low	Low	Low	High	Low
	Hardware Complexity	Low	Low	High	Low	High
	Energy Consumption	Low	Low	Low	High	High

TABLE 3

 3

	.16 -Simulation Parameters
	Parameter	Value
	Number of Nodes	8
	Frame Length	256 bits
	Time btw Successive Packet Generations 5 ms
	Bit Rate	64 kbps
	Distance Between Nodes	2 m

TABLE 3 .

 3

	17 -Delay Comparison
	Protocol	Average End-to-End Delay (s)
	DTDMA/DS-CDMA	3.07
	IEEE 802.15.6 CSMA/CA	23.087
	NPCA-MAC	10.89

TABLE 4 .

 4

	1 -Simulation Parameters
	Parameter	Value
	Number of Nodes	16
	Topology Size	2 m × 1 m
	Topology Type	Star
	Number of Nodes with Urgent Data	0-8
	Packet Rate for Regular Traffic	1-20 packets/s
	Packet Rate for Emergency Traffic	100 packets/s
	Regular Traffic Model	CBR
	Emergency Traffic Model	Poisson
	Payload Size	10, 30, 50, 70 Bytes
	Slot Duration	5 ms
	Channel Rate	250 Kbps

  .1, to Algorithm 3. Dynamic Slot Allocation for Mobile Nodes in Regular State 1: for every mobile node m i carrying periodic data do

	2:	if m i is previously assigned a spreading code then
	3:	Release spreading code from m i ;
	4:	end if
	5:	Compute number of needed slots (s m i ) based on the packet rate (R) of m i
	6:	using Equation 4.1 ;
	7:	Allocate s m i in MS period ;
	8:	if RS S I m j < RS S I m i then
	9:	Allocate s m j before s m i ;
	10:	end if
	11:

TABLE 5 .

 5

	1 -Nordic nRF24L01 Voltage and Current Parameters
	Parameter	Value
	Voltage (V)	3V
	I transition	8.25ms
	T tansition /T wakeup	15us
	I standby	1ms
	I reception mode	12.4ms
	I transmission	11.1ms

TABLE 5 .

 5

	2 -Simulation Parameters
	Parameter	Value
	Number of Nodes	50
	Simulation Area	500 m 2
	CHs state	Static
	Nodes state	Static or Mobile
	Mobility Model	Random Way Point
	Packet Rate for Regular Traffic	1-20 packets/sec
	Packet Rate for Emergency Traffic 100 packets/sec
	Payload Size	32 Bytes
	Slot Duration	5 ms
	Channel Rate	250 Kbps

TABLE 6 .

 6

	1 -Qualitative Comparison Between Different Routing Models
	Criteria	Direct Flat Cluster Based
	Level of Simplicity	1	3	2
	Communication Overhead	1	3	2
	Time Synchronization	1	2	3
	Coverage	3	2	1
	Efficient use of medium	3	2	1
	Degree of Integrity	1	3	2
	Scalability	3	2	1
	Possibility to use
	centralized application	1	3	2
	algorithms
	Reliability	3	1	2

TABLE 6 .

 6

	2 -Simulation Parameters
	Simulation Parameter	Value
	Area	Indoor 400 m 2
	Number of nodes (N)	10 -100
	Nodes status	Mobile
	E T x-elec	16.7 nJ/bit
	E Rx-elec	36.1 nJ/bit
	amp (radio amplifier)	1.97 nJ/bit
	PL exponent	3.5
	Packet size	4000 bits

TABLE 6 .

 6 3 -Cluster Based Routing Algorithms

	Cluster Based Algorithm	CH Election Parameter
	LEACH [Heinzelman et al., 2000]	Random Rotation
	LEACH-ME [Kumar et al., 2008]	Mobility Factor of Nodes
	MBC [Deng et al., 2011]	Residual Energy and Speed of Nodes
	LEACH-MEEC [Ahmad et al., 2018]	Residual Energy and Connectivity of Nodes
	GAROUTE [Sarangi et al., 2011]	Density, Speed and Energy of Nodes
	ECBR-MWSN [Anitha et al., 2013]	Residual Energy, Mobility and Location of Nodes
	LEACH-C [Maurya et al., 2016]	Position information and energy level
	Multi-hop Cluster Routing for WSN [Arioua et al., 2016]	Random rotation
	LEACH-TLCH [

  if p x indicates that x belongs to same cluster as y then 10:y extracts the ID of x and S S x and place them in a table;if nodes belonging to c have a complete list of S S of all nodes in c then

	6:	nodes ;
	7: end for
	8: for every node y receiving the packet p x do
	9:
	11:	y forwards the table to its neighbours ;
	12:	end if
	13:
	14:	nodes of c select the node with the highest S S as their CH ;
	15:	end if
	16: end for

TABLE 7 .

 7 1 -PL Exponent for Different Body Parts

	Body Part	PL Exponent (n)
	Arm	3.35
	Leg	3.45
	Torso	3.23
	Back	2.18
	Implented and Non-LOS Nodes	5.9
	7.3.2.2/ MOBILITY FACTOR COMPUTATION
	Not all BSN nodes are stationary. For instance, nodes located on/in the arms and legs
	are mobile, and therefore, it is important to consider nodes' mobility in the election of the
	CH.

TABLE 7 .

 7 2 -Simulation Parameters

	Simulation Parameters	Value
	Distribution Area	2m x 2m
	Sink Location	Center of Body
	Number of Nodes (N s )	25
	Number of wearable Nodes	20
	Number of Implanted or Non-LOS Nodes	5
	Number of moving Nodes	6
	Number of Holders of Important Data	6
	E T x-elec	16.7 nJ/bit
	E Rx-elec	36.1 nJ/bit
	amp	1.97 nJ/bit
	f s	10.9 nJ/bit
	PL Exponent of Nodes	2.18 -5.9
	PL exponent of Whole Body (n)	3.38
	Packet Size (L)	4000 bits
	Clusters Density N c	N s / K opt

  BSNs, normal physiological data lies in specific ranges. For instance, the respiration rate (RESP) is measured in breath per minute (bpm) with a normal range of [12 -20], and Heart Rate (HR) is in beats per minute (bpm) and has normal values of [60 -100] [Salem

	TOWARD FAST AND ACCURATE
	EMERGENCY CASES DETECTION IN
	BSN
	8.1/ INTRODUCTION

In

  The rest of the chapter is organized as follows. The related works are introduced in Section 8.2. The proposed adaptive sampling and collaborative anomaly detection algorithms are presented in Section 8.3. The experiments and results are discussed in Section 8.4. Section 8.5 concludes the chapter.

	8.2/ RELATED WORKS
	8.2.1/ ANOMALY DETECTION AND ADAPTIVE SAMPLING METHODS IN BSNS

1 :

 1 S i : Sensor parameter 2: C i : Cumulative positive sum control chart of S i 3: H i : Decision threshold of S i H i =4σ i 4: S Rw 0 : Initial sampling rate of S i 5: S Rw i : Computed sampling rate of S i 6: for each sensor S i do

	7:	S Rw 0 = 1
	8:	Send S Rw 0 to S i	SR is 100% for the first window
	9:

TABLE 8 .

 8

		1 -Sensors Characteristics
	Attribute	µ 0	σ 0	ET 0
	Body Temperature 37.01	0.287	1.4133
	BPmean	114.27 13.744 1.4043
	Resp	16.03	2.55	1.5192
	HR	84.64	8.995	1.4374

TABLE 8 .

 8 3 -Sensing Voltage and Current

	Attribute	Sensor Type V s (V) I s (mA)
	Body Temperature MAX30205	3	0.6
	HR	BH1792GLC 3.05	0.2
	BPmean	MPX5050GP 4.75	7
	Resp	PZT-sensor	3	4

TABLE 8 .

 8 4 -Performance Comparison of Different Schemes

	Proposed Scheme	91.67	91.67	94.11	93.10	3.23	5.4
	J48 with Linear Regression	69.23	75.00	76.47	75.86	7.3	7.65
	Random Forests with Additive Regression	76.92	83.33	82.35	82.75	13.9	7.93

Algorithm

Precision (%) Recall (%) Specificity (%) Accuracy (%) Execution Time (s) Energy (mJ)

(a) Delay of Emergency Packets (b) Delay of Regular Traffic

sizes.

This research work was supported by the EIPHI Graduate School (contract "ANR-17-EURE-0002"), the Hubert Curien CEDRE programme (n40283YK), and by the Lebanese University Research Program (Number : 4/6132). the OSI model presented in Fig. 1.

DATA SAMPLING AND ANOMALY DETECTION IN BSN

147

GENERAL CONCLUSION

9.1/ CONCLUSION BSNs and CBSNs are currently gaining a lot of research interest due to their vast applications and benefits to the human beings. The main aim of these networks is to enhance people's quality of life and make it more comfortable. This can only be achieved through designing reliable BSNs and CBSNs that ensures the delivery of data to the BS with the highest QoS standards.

The contributions of this thesis are diverse as it focused on increasing the QoS for BSNs and CBSNs in three different areas : the MAC, the routing and the anomaly detection domains.

A general overview on BSNs and CBSNs was presented in Chapter 2, to give the reader an insight of the architecture, applications and characteristics of these networks. For BSNs, we conducted a study on the different types of sensors and their communication technologies, and we presented the available sensors in the market along with their communication interface ; and for CBSNs, we showed the main features that distinguish CBSNs from other types of sensor networks, and we presented the different open research issues in these networks.

MAC protocols for BSNs and CBSNs were studied and proposed in the second part of the thesis. For instance, comparison of the performance of five standard MAC protocols for BSNs under the same experimental conditions is lacking in the literature ; therefore, in Chapter 3, the five MAC schemes were compared with respect to different QoS and performance metrics in high traffic BSN environments. A new protocol was then proposed in the aim to decrease the delay and increase the network throughput and the energy efficiency of the nodes. In Chapter 4, an emergency aware MAC protocol was suggested to address the dynamic traffic requirements of BSNs through ensuring instant delivery of emergency data, while maintaining high energy efficiency in non-emergency cases. Moreover, in Chapter 5, a traffic and mobility aware MAC protocol was proposed to address both mobility and dynamic traffic challenges faced by CBSNs. In these three chapters, thorough simulations were conducted to compare the performance of the proposed schemes to existing protocols with respect to delay, packet drop rate and energy consumption. Simulations showed the proposed MAC schemes outperform the others and thus provide a strong solution for BSNs and CBSNs applications.

Routing schemes were then investigated and proposed in the third part of this dissertation. Different routing models were compared for CBSN applications in Chapter 6 to LIST OF PUBLICATIONS