Relay-Enabled Task Offloading Management for Wireless Body Area Networks

Inspired by the recent developments of the Internet of Things (IoT) relay and mobile edge computing (MEC), a hospital/home-based medical monitoring framework is proposed, in which the intensive computing tasks from the implanted sensors can be efficiently executed by on-body wearable devices or a coordinator-based MEC (C-MEC). In this paper, we first propose a wireless relay-enabled task offloading mechanism that consists of a network model and a computation model. Moreover, to manage the computation resources among all relays, a task offloading decision model and the best task offloading recipient selection function is given. The performance evaluation considers different computation schemes under the predetermined link quality condition regarding the selected vital quality of service (QoS) metrics. After demonstrating the channel characterization and network topology, the performance evaluation is implemented under different scenarios regarding the network lifetime of all relays, network residual energy status, total number of locally executed packets, path loss (PL), and service delay. The results show that data transmission without the offloading scheme outperforms the offload-based technique regarding network lifetime. Moreover, the high computation capacity scenario achieves better performance regarding PL and the total number of locally executed packets.


Introduction
Recent technological developments have enabled various emerging biomedical and clinical applications such as transplanted organ monitoring and wireless capsule endoscopy image transmission that demand high a data rate and low-latency quality of service (QoS) requirements [1].However, there exist numerous research challenges in this area.One of the most critical of these is how to handle the intensive computation tasks from implanted sensors promptly.Moreover, due to the technical constraint of the battery design, another research challenge is how to improve battery-powered relays' computation capacity when executing intensive computing tasks [2][3][4][5].
Mobile edge computing (MEC) has been proposed as a promising candidate to replace cloud computing services when considering hospital/home-based healthcare scenarios [6,7].This is achieved by extending conventional monitoring to ambulatory monitoring, offering real-time feedback to patients by taking full advantage of the Internet of Things (IoT) relays in combination with an edge computing server.In contrast to cloud-like computing providers that transmit the task to a remote server that is possibly several thousand kilometers away from the patients, the MEC-based scheme is capable of executing intensive computing tasks locally or in a proximal edge server.However, the majority of current MEC research is focused on mobile communications and very little has been reported on healthcare-related scenarios.
Direct transmission between the implanted sensor and the local coordinator suffers significant energy attenuation and thus decreases the network lifetime [8].Moreover, since every piece of in-body information is critical when considering emergency intra-body data transmission, one should be aware that it is more efficient if the relays can execute the task from the implanted sensors when designing the system architecture.As a result, the patient can be notified of life-critical emergency medical information via the relay, which has user-friendly interaction [9,10].Furthermore, due to the limited computation resources of relays, they cannot execute all computing tasks from implanted sensors.As reported in Reference [11], a cloud or cloudlet with a substantial amount of computing resources that can accept offloaded tasks from user equipment (UE) such as smartphones can decrease UE computing energy consumption.However, this is not applicable when considering emergency medical scenarios where the computing server should be closed to the patient, so as to offer computing resources under abnormal medical situations.Moreover, the network should provide multiple available physiological signal monitoring services.
To achieve the proposed targets, inspired by the MEC technique and IoT relays, the architecture of a wireless relay-enabled task offloading framework is proposed that can significantly improve the quality of the hospitalized patient monitoring services.Moreover, relay-based task offloading schemes are considered to address the research challenges related to computation intensive tasks and resource management.Furthermore, this work is motivated by the significant tradeoffs involving relays, considering different task offloading based schemes and various QoS metrics.Since the task offloading process consumes time regarding offloading decisions and transmission, a single-hop technique is adopted and the task offloads to the relay with a minimal cost function value if the relay cannot execute the task locally.Finally, if the emergency intra-body task is too large to be performed by relays locally, it will be offloaded to the C-MEC, which has higher computation capacity and power resources compared with on-body relays.
In this paper, a novel framework of the hospitalized relay-enabled offload strategy for wireless biomedical implant systems is proposed.It is assumed that the computation resource of relays is limited and that the computation tasks can be executed by either the relays or the C-MEC.The offloading decision model is given along with the numerous QoS constraints.To balance the energy consumption of all relays, a resource management scheme is investigated considering the computation task, computation capacity, and the energy status of the relays.The results show that the offloading strategy-based solution outperforms the non-offloading enhanced scheme regarding energy consumption, path loss (PL), and the total number of locally executed packets.Also, the tradeoff between different computation capacities and the related QoS metrics regarding the task offload technique are presented in detail.
The rest of the paper is organized as follows.Section 2 summarizes the recent work in this research area.Section 3 illustrates the proposed system regarding the structure of the C-MEC, channel models, and task offloading model.The proposed communication for the offloading-based transmission scheme is given in Section 4, and Section 5 demonstrates the system performance and comparison with our previous work.Finally, Section 6 concludes the paper and lists a collection of on-going research and future work within wireless body area network (WBAN) techniques, which are presented as motivation towards progress in medical monitoring services.

Related Work
Currently, the majority of patients' physiological signal monitoring services are based on note-taking, which is time-consuming and subject to inaccuracy.In addition, this method is unable to offer real-time data sensing and computing of the collected data to support the clinical diagnosis and decision-making process.One promising solution to handle the mentioned research challenges is to employ the WBAN techniques along with the utility computing methods [2,6].In this way, the collected data of the implanted devices can be transmitted to interconnected on-body UE or computing servers to be processed.The processed data are then distributed to the relevant medical professionals.
Practically, the computation and wireless communication resources of relays are limited.Thus, the handling of intensive computation tasks is one of the critical research challenges in WBANs.The authors of References [12,13] reported a cloud-based data stream execution technique in mobile cloud computing and extended the access method of cloud services to mobile devices such as smart wearable devices.The results show that the proposed technology enables mobile devices to execute mobile applications efficiently by employing cloud resources.However, this technique is not applicable in medical applications because data are uploaded to a remote cloud at a distance of many kilometers and thus suffer significant transmission delay.Numerous commercially available cloud platforms have been proposed, such as ThinkAir and Amazon elastic compute cloud, which are able to migrate the computational tasks from the UE to the cloud [14].However, when the UE requires a cloud computation resource, one has to send the instructions and the tasks all the way via the Internet.As a result, the long-distance data transmission cannot meet the healthcare monitoring requirements regarding communication reliability, flexibility, and latency.Wang et al. proposed a list of transmission algorithms regarding the uplink-based task offloading framework that can reduce the signaling between UE and the cloud [15].However, the results proved that some UE might increase their transmission power to maintain the high data rate and this action may significantly increase other UE's packet loss and degrade the link quality.
Another research challenge is that the traditional relay cannot offer sufficient computation or communication resources.Bello et al. [16] demonstrated that wearable devices can perform as IoT relays because of their computation and communication capabilities.After the physiological data of the human body have been sensed, the task can be executed locally and the results can be promptly noticed by patients.As reported by Guo et al. [17], data relaying processes require extra power and battery-operated IoT relays may exhaust quickly.These authors also pointed out that the network lifetime can be significantly increased by employing relay collaboration and efficient transmission scheduling techniques.However, this paper does not consider the relay selection scheme or the tradeoff between the system complexity and performance.Moreover, to overcome severe interference and inefficient use of the limited wireless communication resources of UE, small cell networks were recommended in Reference [18].However, with less computational capacity compared with macro networks and local area networks, traditional small cell networks are likely unable to meet the low latency QoS requirement when a large number of relays offload the tasks simultaneously.Moreover, to increase the overall lifetime of all relays, relays with higher residual energy can accept as many as possible offloading requests from other relays by managing the communication and computation resource in the networks.However, there is no appropriate control mechanism or optimization techniques for this method when considering hospital/home-based medical monitoring scenarios.
The link quality of the body communication channel is of great significance when determining the network performance.Different researchers have proposed numerical solutions to handle the problem of the link disconnection in numerous methods.The authors of Reference [8] employed Line-of-Sight (LoS) and Non-Line-of-Sight (NLoS) communications, while Reference [19] deployed the store and forward routing technique to analyze the link quality.Moreover, energy efficient modulation techniques are advantageous in reducing the hardware structure and decreasing the noise interference when considering the limited UE battery capacities.References [20,21] pointed out that M-ary phase shift keying (M-PSK) modulation schemes are applicable to energy saving and maintaining channel reliability.As demonstrated in Reference [21], given the high QoS requirements of healthcare applications, the authors selected a bit error rate (BER) of 10 −3 to ensure that the communication performance was acceptable.
This paper proposes a hospital/home-based medical monitoring framework that can be employed in potential diversified scenarios by providing a small-sized C-MEC server and task offloading strategy.We first focus on the data transmission scheme between the relays and the C-MEC rather than the intra-body networking design, as reported in Reference [19].As proved in References [8,22], the energy consumption of the implanted sensors is heavily influenced by the transmission distance.Relay-based transmission is proposed as a promising technique to minimize the communication distance and thus improve the network lifetime.Moreover, sufficient link quality should be ensured, as stated in References [23,24], because data transmission from the on-body relay to the C-MEC suffers from high energy attenuation.Moreover, similar to one of the key research challenges in IoT offloading strategies, the issue of where to execute the computation tasks should be further investigated when designing the healthcare monitoring systems [25,26].

System Model
A practical wireless relay-enabled biomedical implant system is proposed, where N ≥ 1 relays are employed to serve a series of K ≥ 1 implanted sensors.The relay and implanted sensor sets are denoted as N and K, respectively, with |N | = N and |K| = K.Each relay performs an on-body physiological signal collection and has a computation task that needs to be completed locally.Since the intra-body environment is complex and different from person to person, a reasonable assumption that all devices have the same Z values is made, and we only consider the XY plane.More accurate work regarding WBAN data transmission can be investigated by extending the proposed system model to three-dimensional (3D) scenarios.

System Architecture
The system architecture is introduced by considering edge computing and WBAN techniques, as shown in Figure 1.Unlike the work in References [27,28], we present the concept of C-MEC instead of the coordinator, as this offers computation resources to execute the medical tasks and forward the results to medical professionals in a timely manner.As can be seen from Figure 1a, an implanted sensor transmits the computing task C i to the on-body relay via the intra-body region.Moreover, since the implanted sensor broadcasts short information to the relays, one should note that relay selection should be considered, as shown in Figure 1b.Once the relay is selected, different task offloading schemes are given in Figure 1c.The task C i can be executed by the corresponding relay, by other relays, or by the C-MEC.One should note that we encourage tasks from intra-body devices to be executed locally by relays so that user-friendly interaction can provide timely patient warnings under emergency conditions and avoid transmitting tasks to the C-MEC, which is typically far away from the patient.In this paper, the Cartesian coordinate system in which each implanted sensor is fixed is the transmitted data packet C i to the corresponding relay.The coordinates of the relay i are expressed as The data transmission energy consumption for the implanted sensor k ∈ K to transmit C i to the corresponding relay i can be expressed as: where E e k and E amp represent the energy consumption to activate the implanted sensor circuit per bit and the radio amplifier, respectively.The PL exponent is represented by n, which primarily depends on the transmission environment.The energy consumption for relay i to receive C i can be expressed as: where E elec i is the essential energy consumption to activate the relay electronic circuit per bit.

Computation Model
The relay is of significant importance when considering the execution of task from the implanted devices and the on-body physiological task .As analyzed earlier, task of relay i to be performed can be defined as: where and represent the required computation resource (i.e., CPU resource) and the maximum time allowance to complete all tasks, respectively.One should note that cannot be offloaded to others and should always be executed by relay i itself.In the proposed system, we assume that the MEC server performs as a coordinator and assists relays to execute the task by providing computation resources, since each relay has to be executed locally and only can be offloaded.We define the indication parameters, i.e., , ∈ , ∈ to denote whether task from relay i is offloaded to relay j.Thus, one has: = 0, no offloading, 1, relay offloads the task to the relay , where ∈ , ∈ .Once relay i decides to execute itself, the local power consumption for this task can be given as: where means the computation capability (i.e., CPU cycles per second) of relay i as analyzed in Reference [29].The positive constant parameters α and are pre-configured and depend on the chip architecture.Realistic measurements of those parameters are α = 10 −11 and 2 ≤ ≤ 3 [30].Then, one has the time of local execution: where ≤ .However, when > , it means that relay i cannot accomplish the task under QoS requirements, and thus the task offloading process is needed.According to Equations ( 4) and ( 5), the energy consumption of relay i to execute task can be expressed as: When consider the locally executed task , the energy consumption for sensing this can be expressed as: = , where is the energy consumption required for sensing one bit.Similar to Equation (7), the energy consumption of executing task can be written as:

Computation Model
The relay is of significant importance when considering the execution of task C i from the implanted devices and the on-body physiological task D i .As analyzed earlier, task U i of relay i to be performed can be defined as: where F i and T r i represent the required computation resource (i.e., CPU resource) and the maximum time allowance to complete all tasks, respectively.One should note that D i cannot be offloaded to others and should always be executed by relay i itself.In the proposed system, we assume that the MEC server performs as a coordinator and assists relays to execute the task C i by providing computation resources, since each relay has D i to be executed locally and only C i can be offloaded.We define the indication parameters, i.e., a ij , i ∈ N , j ∈ N to denote whether task C i from relay i is offloaded to relay j.Thus, one has: 0, no offloading, 1, relay i offloads the task C i to the relay j, where i ∈ N , j ∈ N .Once relay i decides to execute C i itself, the local power consumption for this task can be given as: where f c i means the computation capability (i.e., CPU cycles per second) of relay i as analyzed in Reference [29].The positive constant parameters α and β are pre-configured and depend on the chip architecture.Realistic measurements of those parameters are α = 10 −11 and 2 ≤ β ≤ 3 [30].Then, one has the time of local execution: where T C i ≤ T r i .However, when T C i > T r i , it means that relay i cannot accomplish the task under QoS requirements, and thus the task offloading process is needed.According to Equations ( 4) and ( 5), the energy consumption of relay i to execute task C i can be expressed as: When consider the locally executed task D i , the energy consumption for sensing this can be expressed as: , where E c i is the energy consumption required for sensing one bit.Similar to Equation (7), the energy consumption of executing task D i can be written as: Thus, the minimal energy consumption for relay i is Recalling Equation ( 4), a ij = 1 indicates that relay i decides to offload task C i to relay j via an on-body to on-body communication link.The distance between the two relays can be expressed as: where w j is the coordinate of relay j.The time of the task offloading can be expressed as: where c is the speed of light.Relay j can then execute task C i in the same manner as relay i.However, once relay j cannot execute the task due to a lack of computation resources or the execution time T C i ≥ T r i , the task will be offloaded to the C-MEC.This then assigns bandwidth B ij to relay j; the task offloading rate then can be written as: where σ 2 represents the power of the additive white Gaussian noise (AWGN) at relay j.All of the channels are assumed to be orthogonal and ignore the interference caused by other relays.h j C is the channel state information from relay j to the C-MEC and p T j is the transmission power of relay j, respectively.As proposed in Reference [21], only white Gaussian noise is considered in this paper.Then the time of task offloading can be expressed as: The energy consumption of the task offloading can be calculated as: Once the C-MEC receives the offloading task from relay j, it will execute it and transmit the results back to relay j promptly.

Channel Characterization
The PL model characterizing the transmission energy attenuation between the on-body transmitting relay node and the receiving relay at distance d can be formulated as [8,28]: where d 0 represents the reference distance and PL dB (d 0 ) is the PL value at d 0 .S represents the shadow fading effect, which follows a normal distribution with zero mean and standard deviation σ, i.e., S ∼ 0, σ 2 .One should note that the PL model presented by Equation ( 14) is also applicable to the on-body channel, as proved in Reference [31].The BER for M-PSK over the WBAN fading channel has been widely investigated.In this paper, the binary phase-shift keying (BPSK) modulation scheme is utilized for further analysis due to its simple structure and high efficiency.The performance of M-PSK (M ≥ 4) can be found in Reference [20].Assuming the transmitting power is P t and the noise to power density ratio is N 0 , one can obtain the instantaneous signal to noise ratio (SNR) γ as: The BER performance can be formulated as a function of the instantaneous SNR as: where erfc(•) represents the Gaussian error function.The average BER of the transmission link can be expressed as: where γ and P(γ) represent the average value of SNR and the BER performance of the additive white Gaussian noise (AWGN) channel, respectively.Consequently, Equation ( 17) can be rewritten as: where where µ = ln 10/10.The average BER performance of the WBAN channel under BPSK modulation can be obtained by the numerical evaluation of Equation (18).Considering data transmission over a fading channel such as a relay to relay or relay to the C-MEC, the capacity per unit bandwidth can be written as: where C denotes the channel capacity.γ rec and B represent the received SNR and the transmitting channel bandwidth, respectively.The γ rec in dB can be given as: where P rec is the received power and P n can be expressed as: where v is the Boltzmann constant and N F is the noise figure.Recalling the AWGN noise with one-sided power spectral density, one can obtain that: where T rx and T tx are the temperatures at the transmitter and the receiver in Kelvin (K), respectively.

Proposed Resource Management Solution
As analyzed above, the relay can increase the lifetime by offloading task C i .However, task offloading to others may increase the overall transmission distance and increase the energy consumption.In this section, a relay selection algorithm for the implanted sensors and a task offloading decision model to assist the relay i task offloading decision is proposed.

Network Initialization Phase
The C-MEC is placed at the center of the hospital ward and a series of on-body relays are attached to a patient's clothes.Implanted sensors are located inside the human body at the predetermined positions.The C-MEC broadcasts a short message information packet to the relays, which assigns a unique ID to each.The relays store the C-MEC location information and send information packets, which contain the energy status and locations.In accordance with Reference [22], the implanted sensors broadcast short information to all relays, which are then updated with the location and energy status of the implanted devices.In this way, all relays can update the location and channel information for potential task offloading.After network initialization is complete, one round starts.

Local Decision Process
Equation (1) points out that the transmission energy consumption of an implanted sensor is related to the communication distance.To minimize the energy consumption of the implanted sensors, the relay selection algorithm is proposed as: where E i is the initial energy of relay i and E i − E i,min is the residual energy status of relay i.The relay with the minimal value of ψ(i) will be elected as the best relay.Relay i receives task C i from the implant sensor while simultaneously executing the on-body task D i .If relay i can execute task C i by itself, then we employ Equations ( 4)- (8).Numerous key QoS metrics are obtained and one round is finished.
If relay i cannot executes task C i by itself according to U i , it will trigger the offloading process, and task C i will be offloaded to another relay.This method is summarized in Algorithm 1.

Algorithm 1. Proposed Iterative Relay Selection Method
The relay and implanted sensor sets are denoted as N and K.
Initialization: each relay is assigned a unique ID; select the x-th relay as the target to connect; for a specific implanted sensor k; current round r; current residual energy status E res ; For i ∈ N do calculate the distance between the implanted sensor and the i-th relay: ||w k − w i || 2 calculate the relay's residual energy: //do nothing, x is still the best choice so far; Else x = i;//i-th relay becomes a better choice; End if End for establish a link between the implanted sensor and the x-th relay; Update E res , r = r + 1

Data Offloading Process
At this stage, priority based task offloading criteria are given to balance the energy consumption among all relays.The proposed algorithm considers three key parameters: residual energy, computation ability F i , and task C i .Since a relay with a higher residual energy and computation where E j and F j represent the residual energy and computation resource of relay j.Relay j, which has a higher Z (j) value, does not have enough resources in terms of computation resource or residual energy.The offloading requests that relay i delivers task C i to relay j with the minimal value Z (j).
One should note that the nearest relay may not be able to accept the task due to a lack of computation resources.By doing so, the relay with the appropriate resources takes the computing task described by Equations ( 9) and (10).If relay j can execute the task locally, as mentioned in Equations ( 5)-( 8), in a similar way to Section 4.2, numerous key QoS metrics are obtained and one round finishes.However, if relay j cannot execute the task, this will be offloaded to the C-MEC.The detailed information is given in Algorithm 2.

Algorithm 2. Proposed Iterative Task Offloading Strategy
The task with a size of C i received according to Algorithm 1; Update U i according to Equation (3); i Then execute the task locally according to Equations ( 5)-( 8) Else Z (j) with a minimal value is selected according to Equation (25); offload task C i to relay j according to Equations ( 9)-( 12); End if While E j ≥ E C i j + E D i j do execute the task on j-th relay according to Equations ( 5)-( 8); Else offload task C i to the C-MEC according to Equations ( 9)-( 12); End while

Scheduling and Data Transmission
At this stage, the C-MEC assigns a time slot to relay j.The task will be offloaded to the C-MEC for executing as indicated in Equations ( 11)-( 13) and then the selected QoS metrics will be calculated and one round finishes.This process continues until the energy of all relays is exhausted.

Link Quality Analysis
The cumulative distribution function (CDF) of the channel capacity per unit bandwidth should follow as: where is the threshold value and depends on the specific application.According to Equations ( 17)- (22), Equation ( 26) can be rewritten as: Besides, the channel link quality can be measured by the system margin M s .Considering the minimum acceptable SNR thr , it should follow that: A negative value of M s indicates that the link cannot provide enough power to maintain the channel link reliability [32].

Network Topology
The proposed scenario is a hospital ward with dimensions of 5 m × 5 m, where the C-MEC is placed at the center of the room, the implanted sensor is located at the center of the human body, and five relays are attached on the clothes with the same initial energy and computational capabilities.Table 1 summarizes the coordination of the relays, implanted sensor, and C-MEC.

Performance Evaluation
In this section, the performance of the proposed task offloading-based resource management scheme is compared with a non-offloading technique.We focus on the performance of the relays and assume that the energy resources of the implanted sensor and the C-MEC are infinite.The performance is conducted on the basis of the residual network energy, network lifetime, PL, and total number of executed tasks C i .The characteristics of a commercially available WBAN transceiver (CC2420) are employed in the simulations and an initial energy of 0.5 Joule (J) is provided to all relays.The number of relays is limited to five, each with a single antenna.The packet size of C i is set as 1500 bits since this is the typical payload defined by the IEEE 802.15.6 technical standard [8] and D i is set as 1000 bits.The simulation parameters are summarized in Table 2. Simulations were conducted in MATLAB and performance results are compared in terms of f c i = 1500 CPU cycles, f c i = 2500 CPU cycles, and the scheme without offloading.One should notice that other simulation techniques such as NS2 and OMNET+ are also applicable; detailed information can be found in References [33,34].
Considering the strict QoS requirements of healthcare applications, and according to the previous work on WBANs, a minimum acceptable BER threshold of 10 −3 is selected for on-body transmission channel analysis.To guarantee human body safety, the maximum transmission power is set as −12 dBm since this is recommended by the IEEE 802.15.6 technical standard.The maximum data transmission distance is selected as 2.5 m since this is a typical value of commercial IoT WBAN platforms for home and hospital areas [35,36].Since the on-body fading channel is time-varying, one should note that the channel capacity of the transmission link is not static.Figures 2 and 3 demonstrate the CDF versus channel capacity per unit and the link quality versus different transmission distances, respectively.It can be seen from Figure 2 that, under the same channel capacity, the higher transmission rate achieves a lower CDF performance.Moreover, from Figure 3 it can be seen that the lower data rate realizes a better link quality performance.As a result, an appropriate data rate R ij (U i ) = 500 kbps is selected for further investigation.Considering the strict QoS requirements of healthcare applications, and according to the previous work on WBANs, a minimum acceptable BER threshold of 10 −3 is selected for on-body transmission channel analysis.To guarantee human body safety, the maximum transmission power is set as −12 dBm since this is recommended by the IEEE 802.15.6 technical standard.The maximum data transmission distance is selected as 2.5 m since this is a typical value of commercial IoT WBAN platforms for home and hospital areas [35,36].Since the on-body fading channel is time-varying, one should note that the channel capacity of the transmission link is not static.Figures 2 and 3 demonstrate the CDF versus channel capacity per unit and the link quality versus different transmission distances, respectively.It can be seen from Figure 2 that, under the same channel capacity, the higher transmission rate achieves a lower CDF performance.Moreover, from Figure 3 it can be seen that the lower data rate realizes a better link quality performance.As a result, an appropriate data rate ℛ ( ) = 500 kbps is selected for further investigation.In this paper, the network lifetime is defined as the time spanning from the network initiation until the energy of all relays is exhausted.The relationship between the residual energy of all relays and the network lifetime is given in Figure 4 under different scenarios.One can see that application requiring higher computation resources leads to a shorter lifetime when employing the offloading strategy.Primarily, the network lifetime is approximately 1200 rounds when f c i = 2500 CPU cycles, while it is 1800 rounds when f c i = 1500 CPU cycles.The reasons for these results are as follows: relay i with a higher computation capacity is highly likely to accept the offload task from others according to the proposed task offloading recipient selection algorithm in Section 4.2.Moreover, when considering the non-offloading technique, the relays only forward C i to the C-MEC, thus significantly reducing the relays' task computing power consumption.In this paper, the network lifetime is defined as the time spanning from the network initiation until the energy of all relays is exhausted.The relationship between the residual energy of all relays and the network lifetime is given in Figure 4 under different scenarios.One can see that application requiring higher computation resources leads to a shorter lifetime when employing the offloading strategy.Primarily, the network lifetime is approximately 1200 rounds when = 2500 CPU cycles, while it is 1800 rounds when = 1500 CPU cycles.The reasons for these results are as follows: relay i with a higher computation capacity is highly likely to accept the offload task from others according to the proposed task offloading recipient selection algorithm in Section 4.2.Moreover, when considering the non-offloading technique, the relays only forward to the C-MEC, thus significantly reducing the relays' task computing power consumption.PL is a significant indicator through which we can explore the signal power reduction when considering data transmission from the transmitter to the receiver.In accordance with Reference [8], we only analyze the on-body NLoS communications.The analysis of the LoS communication can be found in Reference [28].The PL parameters are given as follows: PL exponent n of 5.9, standard deviation of 4.15 dB, and ( ) of 48.4 dB.As can be obtained from Equation ( 14), a longer transmission distance d leads to higher PL values.It can be seen from Figure 5 that relays in scenarios requiring higher computation resources achieve lower PL values.On the contrary, when relay i cannot handle task locally (when providing lower CPU cycles), it will trigger the offloading process and then offload the task to others.Therefore, the offloaded task with higher computation resources required suffers a longer transmission distance and leads to higher PL values.Data transmission without offloading leads to the highest PL results because all data packets are transmitted to the C-MEC from the implanted sensors via relays, which results in the longest transmission distance when compared with task offload schemes.PL is a significant indicator through which we can explore the signal power reduction when considering data transmission from the transmitter to the receiver.In accordance with Reference [8], we only analyze the on-body NLoS communications.The analysis of the LoS communication can be found in Reference [28].The PL parameters are given as follows: PL exponent n of 5.9, standard deviation σ of 4.15 dB, and PL dB (d 0 ) of 48.4 dB.As can be obtained from Equation ( 14), a longer transmission distance d leads to higher PL values.It can be seen from Figure 5 that relays in scenarios requiring higher computation resources achieve lower PL values.On the contrary, when relay i cannot handle task C i locally (when providing lower CPU cycles), it will trigger the offloading process and then offload the task to others.Therefore, the offloaded task C i with higher computation resources required suffers a longer transmission distance and leads to higher PL values.Data transmission without offloading leads to the highest PL results because all data packets are transmitted to the C-MEC from the implanted sensors via relays, which results in the longest transmission distance when compared with task offload schemes.achieves the worst performance with a maximum delay at approximate 81 ns.One can observe that the value of should be selected carefully when designing a task offloading-based healthcare monitoring system because the large value of promises a lower PL and a higher number of locally executed tasks, while also decreasing the network lifetime significantly due to the large energy consumption.Moreover, one should note that the medical service should satisfy the latency requirement of not more than 250 milliseconds.As can be seen from the results, our proposed solution can achieve satisfactory latency performance.Figure 6 shows the total number of executed packets by relays under different scenarios.As mentioned in Sections 4.2 and 4.3, the total number of executed packets depends heavily on the relays' computation resources and energy status.It can be seen from Figure 6 that approximately 12,500 packets are executed by the relay when f c i = 2500 CPU cycles, while around 4500 packets can be implemented when f c i = 1500 CPU cycles.Clearly, the number of executed packets is zero without deploying the task offload scheme.Figure 6 shows the total number of executed packets by relays under different scenarios.As mentioned in Sections 4.2 and 4.3, the total number of executed packets depends heavily on the relays' computation resources and energy status.It can be seen from Figure 6 that approximately 12,500 packets are executed by the relay when = 2500 CPU cycles, while around 4500 packets can be implemented when = 1500 CPU cycles.Clearly, the number of executed packets is zero without deploying the task offload scheme.achieves the worst performance with a maximum delay at approximate 81 ns.One can observe that the value of should be selected carefully when designing a task offloading-based healthcare monitoring system because the large value of promises a lower PL and a higher number of locally executed tasks, while also decreasing the network lifetime significantly due to the large energy consumption.Moreover, one should note that the medical service should satisfy the latency requirement of not more than 250 milliseconds.As can be seen from the results, our proposed solution can achieve satisfactory latency performance.6), a larger value of F i leads to longer local execution time.As can be seen from Figure 7, the maximum delay is around 60 nanoseconds (ns) when f c i = 2500 CPU cycles and about 40 ns when f c i = 1500 CPU cycles.Then the network becomes stable after 750 rounds and 1250 rounds when f c i = 1500 CPU cycles and f c i = 1500 CPU cycles, respectively.The non-offloading scheme achieves the worst performance with a maximum delay at approximate 81 ns.One can observe that the value of F i should be selected carefully when designing a task offloading-based healthcare monitoring system because the large value of f c i promises a lower PL and a higher number of locally executed tasks, while also decreasing the network lifetime significantly due to the large energy consumption.
Moreover, one should note that the medical service should satisfy the latency requirement of not more than 250 milliseconds.As can be seen from the results, our proposed solution can achieve satisfactory latency performance.

Conclusions
Owing to the rapid developments of IoT relay and MEC, a novel framework of a relay-enabled task offloading system is proposed in this paper to handle the intensive computing tasks sent from an implanted sensor.We first proposed the network model and the task offloading decision model.Moreover, resource management of relays was determined based on the computation task, the residual energy of relays, and the computation resources, so as to be capable of balancing the energy consumption among all relays.Furthermore, we analyzed the channel capacity and the data rate under the predetermined acceptable BER condition.The results proved that the task offloading technique outperforms the non-offloading scheme in multiple aspects.Specifically, the higher computation capacity relay-based network achieved a lower PL and higher total number of locally executed packets.Moreover, the results showed that the non-offloading scheme achieves the highest network lifetime.The outcomes of this paper can be applied to future home/hospital-based healthcare monitoring services such as transplanted organ monitoring high data rate transmission scenarios.
In this future, we are interested in evaluating the proposed technique on a real experiment testbed.Moreover, the comprehensive tradeoff between wireless communication and computation resources for the wireless relay-enabled task offloading scheme could be selected as a future research topic.In addition, the power allocation of implanted and wearable devices is of great significance when designing healthcare systems.We are also interested in exploiting efficient power allocation techniques for WBANs by employing optimization solutions [37,38].

Conclusions
Owing to the rapid developments of IoT relay and MEC, a novel framework of a relay-enabled task offloading system is proposed in this paper to handle the intensive computing tasks sent from an implanted sensor.We first proposed the network model and the task offloading decision model.Moreover, resource management of relays was determined based on the computation task, the residual energy of relays, and the computation resources, so as to be capable of balancing the energy consumption among all relays.Furthermore, we analyzed the channel capacity and the data rate under the predetermined acceptable BER condition.The results proved that the task offloading technique outperforms the non-offloading scheme in multiple aspects.Specifically, the higher computation capacity relay-based network achieved a lower PL and higher total number of locally executed packets.Moreover, the results showed that the non-offloading scheme achieves the highest network lifetime.The outcomes of this paper can be applied to future home/hospital-based healthcare monitoring services such as transplanted organ monitoring and intra-body high data rate transmission scenarios.
In this future, we are interested in evaluating the proposed technique on a real experiment testbed.Moreover, the comprehensive tradeoff between wireless communication and computation resources for the wireless relay-enabled task offloading scheme could be selected as a future research topic.In addition, the power allocation of implanted and wearable devices is of great significance when designing healthcare systems.We are also interested in exploiting efficient power allocation techniques for WBANs by employing optimization solutions [37,38].

Figure 1 .
Figure 1.The architecture of the proposed system: (a) communication flow; (b) information broadcasting; (c) task offloading schemes.

Figure 1 .
Figure 1.The architecture of the proposed system: (a) communication flow; (b) information broadcasting; (c) task offloading schemes.

Figure 2 .
Figure 2. Cumulative distribution function (CDF) versus channel capacity per unit under on-body channel under different rates.

Figure 3 .
Figure 3. Link quality versus transmission distance under different rates.

Figure 2 .
Figure 2. Cumulative distribution function (CDF) versus channel capacity per unit under on-body channel under different rates.

Figure 2 .
Figure 2. Cumulative distribution function (CDF) versus channel capacity per unit under on-body channel under different rates.

Figure 3 .
Figure 3. Link quality versus transmission distance under different rates.Figure 3. Link quality versus transmission distance under different rates.

Figure 3 .
Figure 3. Link quality versus transmission distance under different rates.Figure 3. Link quality versus transmission distance under different rates.

Figure 4 .
Figure 4. Residual energy of all relays versus time under different scenarios.

Figure 4 .
Figure 4. Residual energy of all relays versus time under different scenarios.

Figure 5 .
Figure 5. Path loss (PL) performance versus time under different scenarios.

Figure 6
Figure6shows the total number of executed packets by relays under different scenarios.As mentioned in Sections 4.2 and 4.3, the total number of executed packets depends heavily on the relays' computation resources and energy status.It can be seen from Figure6that approximately 12,500 packets are executed by the relay when = 2500 CPU cycles, while around 4500 packets can be implemented when = 1500 CPU cycles.Clearly, the number of executed packets is zero without deploying the task offload scheme.

Figure 6 .
Figure 6.The number of executed packets by relays versus time under different scenarios.

Figure 7
Figure 7 illustrates the total delay performance under different scenarios.As mentioned in Equation (6), a larger value of leads to longer local execution time.As can be seen from Figure 7, the maximum delay is around 60 nanoseconds (ns) when = 2500 CPU cycles and about 40 ns when = 1500 CPU cycles.Then the network becomes stable after 750 rounds and 1250 rounds when = 1500 CPU cycles and = 1500 CPU cycles, respectively.The non-offloading scheme

Figure 5 .
Figure 5. Path loss (PL) performance versus time under different scenarios.

Figure 6 .
Figure 6.The number of executed packets by relays versus time under different scenarios.

Figure 7
Figure 7 illustrates the total delay performance under different scenarios.As mentioned in Equation (6), a larger value of leads to longer local execution time.As can be seen from Figure 7, the maximum delay is around 60 nanoseconds (ns) when = 2500 CPU cycles and about 40 ns when = 1500 CPU cycles.Then the network becomes stable after 750 rounds and 1250 rounds when = 1500 CPU cycles and = 1500 CPU cycles, respectively.The non-offloading scheme

Figure 6 .
Figure 6.The number of executed packets by relays versus time under different scenarios.

Figure 7
Figure7illustrates the total delay performance under different scenarios.As mentioned in Equation (6), a larger value of F i leads to longer local execution time.As can be seen from Figure7, the maximum delay is around 60 nanoseconds (ns) when f c i = 2500 CPU cycles and about 40 ns when f c i = 1500 CPU cycles.Then the network becomes stable after 750 rounds and 1250 rounds when f c i = 1500 CPU cycles and f c i = 1500 CPU cycles, respectively.The non-offloading scheme achieves the worst performance with a maximum delay at approximate 81 ns.One can observe that the value of F i should be selected carefully when designing a task offloading-based healthcare monitoring system because the large value of f c i promises a lower PL and a higher number of locally executed tasks, while also decreasing the network lifetime significantly due to the large energy consumption.

16 Figure 7 .
Figure 7.The overall delay under different scenarios.

Figure 7 .
Figure 7.The overall delay under different scenarios.
is more likely to handle C i under QoS constraints, the priority task offloading receiver selection function can be formulated as: capacity

Table 1 .
Coordinates of on-body relays, implanted sensor, and coordinator-based mobile edge computer (C-MEC).