Real-Time Healthcare Data Transmission for Remote Patient Monitoring in Patch-Based Hybrid OCC/BLE Networks

Research on electronic healthcare (eHealth) systems has increased dramatically in recent years. eHealth represents a significant example of the application of the Internet of Things (IoT), characterized by its cost effectiveness, increased reliability, and minimal human effort in nursing assistance. The remote monitoring of patients through a wearable sensing network has outstanding potential in current healthcare systems. Such a network can continuously monitor the vital health conditions (such as heart rate variability, blood pressure, glucose level, and oxygen saturation) of patients with chronic diseases. Low-power radio-frequency (RF) technologies, especially Bluetooth low energy (BLE), play significant roles in modern healthcare. However, most of the RF spectrum is licensed and regulated, and the effect of RF on human health is of major concern. Moreover, the signal-to-noise-plus-interference ratio in high distance can be decreased to a considerable extent, possibly leading to the increase in bit-error rate. Optical camera communication (OCC), which uses a camera to receive data from a light-emitting diode (LED), can be utilized in eHealth to mitigate the limitations of RF. However, OCC also has several limitations, such as high signal-blockage probability. Therefore, in this study, a hybrid OCC/BLE system is proposed to ensure efficient, remote, and real-time transmission of a patient’s electrocardiogram (ECG) signal to a monitor. First, a patch circuit integrating an LED array and BLE transmitter chip is proposed. The patch collects the ECG data according to the health condition of the patient to minimize power consumption. Second, a network selection algorithm is developed for a new network access request generated in the patch circuit. Third, fuzzy logic is employed to select an appropriate camera for data reception. Fourth, a handover mechanism is suggested to ensure efficient network allocation considering the patient’s mobility. Finally, simulations are conducted to demonstrate the performance and reliability of the proposed system.


Introduction
Electronic healthcare (eHealth) is regarded as one of the most important emerging applications of wireless sensing networks owing to its substantial potential in a wide range of nursing assistance activities. Nowadays, the Internet of Things (IoT) has become a distinguished solution in eHealth [1,2]. Among the promising, advanced IoT applications, eHealth represents a revolutionary segment and offers numerous convenient solutions to patients, doctors, and nursing assistants [3][4][5]. The IoT has a • A patch that is connected with an ECG sensor network is proposed. It is constructed using an LED array and a BLE transmitter. The signal is modulated in the LED or BLE and sent to the respective receiver. Static surveillance cameras are utilized to receive the LED data.

•
We propose an algorithm that selects the appropriate network in a specific scenario. OCC has been provided with initial priority in the selection mechanism. We employ both single and multiple cameras to compute the selection probability. The AOV can be remarkably increased by using multiple cameras.

•
We apply fuzzy logic (FL) to select the most excellent camera. FL is an approach that uses variable truth values ranging from 0 to 1 to generate a certain decision. Different parameters of the OCC performance are investigated while applying FL. The center-of-gravity (COG) method is used to perform defuzzification.

•
The selection mechanism is initiated by using a network access request (NAR) generated from the patch circuit. The NAR is produced on the basis of a patient's current condition. Therefore, power consumption can be minimized when the condition is well controlled.

•
To confirm connection reliability, we propose a handover mechanism from OCC to BLE or vice versa. The data are transmitted to a gateway for further transmission to a remote monitor.
The symbols used in our paper are listed in Table 1. The remainder of this paper is organized as follows. Section 2 provides an overview of the current IoT technologies utilized in healthcare. Section 3 introduces the patch circuit and the proposed hybrid infrastructure and presents the channel characteristics of OCC and BLE. Section 4 represents the algorithms for generating a new NAR, network selection for this NAR, and handover from OCC to BLE or vice versa. Section 5 evaluates the performance of the developed selection mechanism in a simulation study. The paper concludes with Section 6.

Literature Overview
Extensive research has been conducted to determine an efficient data collection and transmission scheme in healthcare over the last two decades. The developed monitoring systems implemented various types of patches for healthcare signal collection. The systems are developed not only for patients with chronic diseases, but also for those who are in critical conditions. Patients' health conditions that should be monitored in real-time have many types. For example, wearable body sensor networks for blood pressure monitoring were proposed in [32]. A wearable wireless ECG monitoring system was developed in [33], particularly focusing on low power and cost effectiveness. Healthcare systems that monitor diabetic patients were developed in [34,35] by using a smartphone. In the literature [36], a remote monitoring system was proposed to supervise patients developing Alzheimer's disease by tracking their movement patterns and locations. The same task was implemented in [37] using ZigBee. A wearable monitoring system was also developed to monitor sleep quality by investigating the respiration rate of patients [38]. The types of wearable technologies and monitoring systems for patients with Parkinson's disease are surveyed in [39].
Patch devices are embedded in patients' bodies. Thus, it must be ensured that a patient's natural movements are not troubled by the integration of the device. In addition, the healthcare signals must be transmitted at low power with no or minimal errors. A wide range of low-power devices are used by researchers to transmit healthcare information into another processing unit. Bluetooth was the most widely used owing to its wide availability, robustness to obstacles, and simple protocol structure [16,17]. Bluetooth has now been replaced by BLE, a recent development with low power consumption and a moderate communication range. Meanwhile, additional RF-based technologies are being developed and utilized in remote health monitoring. For example, a survey was conducted focusing on 6LowPAN-based wireless monitoring [40]. Mobility management has had the priority in the literature. A discussion on mobility support using 6LoWPAN is also provided in the literature [41,42]. ZigBeeand ANT-based remote monitoring systems have also been reported [11,33,43]. The collected signals can be processed using a smartphone or personal computer (PC). Table 2 presents a summary of the existing health monitoring systems.
It is worth noting here that the aforementioned systems can suffer from a considerable amount of BER due to interference generated from neighboring devices [31,44]. In addition, the smartphone-based management systems are not very influential in cases where the monitoring person resides in another Sensors 2019, 19, 1208 5 of 23 room or far from the patient. Most studies do not focus on intensive-care scenarios. This type of environment has life or death implications when the connection reliability is questioned. It can be seen from Table 2 that most of the monitoring systems particularly focus on devices with low-power consumption. However, new methods are yet to be proposed to increase reliability. A system focusing on low power, low cost, high security, and enhanced reliability needs to be developed for intensive-care environments.

System Overview
In our work, we assume an indoor scenario, wherein a patient is confined in an intensive or superficial care unit. An authorized person is remotely monitoring the patient's health condition. We consider the transmission of ECG data, which particularly focus on heart rate variability. The proposed patch is connected to the ECG data sensing network. The signal is modulated in the LED or BLE and sent to the respective receiver. Static surveillance cameras are utilized to receive the LED data. Eventually, the data are transmitted to the authorized monitoring person using an eHealth gateway.

Patch Connectivity
Our proposed patch circuit is composed of an LED array, LED driving circuitry, and BLE transmitter chip. The patch is embedded in the patient's arm. Because a direct LOS communication link must be developed between the patch and camera, the patch should be mounted to a completely uncovered part of the body. Our proposed patch circuitry is suitable for monitoring sleeping or unconscious patients. However, the patient may move for some exercise or when he or she goes Sensors 2019, 19, 1208 6 of 23 to a restroom. In these cases, the LED can appear outside the AOV of a camera, which triggers the handover necessity to BLE.
The ECG signals can be collected from the body as binary sequences [52]. The considered sensing procedure is similar to those in the literature [7,11]. The ECG signal acquisition is facilitated by using several electrodes. The bio-signals are collected by using a capacitance generated from the electrodes. Then, the signal passes through the instrumentation amplifier. This amplifier reduces the unwanted noise generated in the circuit. In addition, the acquired bio-signal can be naturally weak owing to the regular movement of patients, which is another reason for using this amplifier. In addition, high-and low-pass filters are exploited to pass the signals within a targeted frequency, and a bandstop filter is used to attenuate unwanted frequencies. Thereafter, the signals pass through the analog-to-digital converter (ADC), which presents the digitalized signals. Figure 1 depicts the overall data acquisition procedure.

Patch Connectivity
Our proposed patch circuit is composed of an LED array, LED driving circuitry, and BLE transmitter chip. The patch is embedded in the patient's arm. Because a direct LOS communication link must be developed between the patch and camera, the patch should be mounted to a completely uncovered part of the body. Our proposed patch circuitry is suitable for monitoring sleeping or unconscious patients. However, the patient may move for some exercise or when he or she goes to a restroom. In these cases, the LED can appear outside the AOV of a camera, which triggers the handover necessity to BLE.
The ECG signals can be collected from the body as binary sequences [52]. The considered sensing procedure is similar to those in the literature [7,11]. The ECG signal acquisition is facilitated by using several electrodes. The bio-signals are collected by using a capacitance generated from the electrodes. Then, the signal passes through the instrumentation amplifier. This amplifier reduces the unwanted noise generated in the circuit. In addition, the acquired bio-signal can be naturally weak owing to the regular movement of patients, which is another reason for using this amplifier. In addition, high-and low-pass filters are exploited to pass the signals within a targeted frequency, and a bandstop filter is used to attenuate unwanted frequencies. Thereafter, the signals pass through the analog-to-digital converter (ADC), which presents the digitalized signals. Figure 1 depicts the overall data acquisition procedure.

Electrodes Instrumentation Amplifier
Bandpass filter

Bandstop filter
Analog-todigital converter OCC BLE Figure 1. Data acquisition procedure from the patch. OCC: optical camera communication. The ADC is connected with the BLE chip and LED driver circuit. A NAR is generated based on the patient's condition. The NAR determines whether the bio-signal will be mounted to the BLE chip or the LED driver. At the LED side, the bio-signal is modulated by a small microcontroller circuit. The LED array switching is controlled by a metal-oxide-semiconductor field-effect transistor.

Proposed Hybrid Framework
The proposed hybrid system can be implemented at home, the clinic, the ambulance, or other places. The system operates wherever a patient must be remotely monitored. The number of surveillance cameras in a large-sized room can be high. Multiple patients can be monitored inside the room, thus also confirming the convenience of using multiple cameras. Figure 2 illustrates the monitoring system topology. The camera or BLE receiver collects the data sent from the patch. These collected data are processed to retrieve the original signal, then passed to an eHealth gateway for remote transmission. Several gateway architectures have been proposed [53][54][55]. The data are stored in the eHealth server, which can be accessed from the eHealth database thereafter. Finally, they are transmitted to the remote monitor.
The cameras are assumed to operate by the rolling shutter technique. These rolling-shutter-based cameras are the most popular owing to their worldwide availability and reasonable cost. When a NAR is generated in the patch circuit, the data are transmitted via OCC or BLE (the OCC network is accessed for the initial data transmission). When there is link blockage and high outage probability, the access point for a new NAR switches to BLE. The initial selection or access handover to BLE depends on the position and mobility of the patient.

OCC Channel Model and Data Retrieval Technique
The non-line-of-sight (NLOS) component of the optical signal minimally affects the OCC. The effect is almost negligible when the LED is very small. The data reception can be modeled by the Lambertian radiant intensity [26,56]. The LOS channel model of OCC is depicted in Figure 3. The LED light source and camera are placed in α and β, respectively. The DC LOS channel gain can be represented as follows: where d α,β denotes the Euclidean distance between α and β, ψ ir indicates the angle of irradiance of the LED, m l signifies the Lambertian emission index (which is a function of the half-intensity radiation angle ψ 1/2 and formulated as m l = − log cos ψ 1/2 (2)), g op denotes the gain of the optical filter, ψ in is the angle of incidence, and A c is the area of a projected image on the image sensor. If the pixel edge length is ρ, A c can be expressed as where A l denotes the entire area of the LED that is active to send the optical signals, f o is the focal length of the camera, and ∂ AOV indicates the AOV of the camera. OCC is less affected by interferences generated from neighboring light sources owing to the nature of the image sensor. The interfering elements can be spatially separated by applying region of interest (ROI) techniques. Thus, OCC offers excellent SINR, which is represented as follows: where P t denotes the transmitted optical power, ν is the optical-to-electrical conversion efficiency, N 0 is the noise spectral density, and f r is the camera sampling rate. In addition, N is the total number of neighboring light sources and G j,β is the dc gain of a specific interfering light source. , d α β ρ where l A denotes the entire area of the LED that is active to send the optical signals, o f is the focal length of the camera, and AOV ∂ indicates the AOV of the camera.
OCC is less affected by interferences generated from neighboring light sources owing to the nature of the image sensor. The interfering elements can be spatially separated by applying region of interest (ROI) techniques. Thus, OCC offers excellent SINR, which is represented as follows: where t P denotes the transmitted optical power, ν is the optical-to-electrical conversion efficiency, 0 N is the noise spectral density, and r f is the camera sampling rate. In addition, N is the total number of neighboring light sources and j, G β is the dc gain of a specific interfering light source.
The LED projected image in the camera is analyzed frame by frame to retrieve the actual data. When the LED is activated, it can be detected by the camera. Computer vision techniques have also been developed recently for object detection [57,58]. We employ a convolutional neural network The LED projected image in the camera is analyzed frame by frame to retrieve the actual data. When the LED is activated, it can be detected by the camera. Computer vision techniques have also been developed recently for object detection [57,58]. We employ a convolutional neural network (CNN) to detect the ROI using the camera. First, the camera captures a series of image frames. Then, a pre-trained CNN is applied to detect the actual ROI to reduce the complexity. Considering that the size of the LED and the transmitted optical signal power are very small, applying CNN is effective and achieves less detection error. The image frames are examined by converting the pixels into grayscale. Subsequently, a certain threshold is set, and the images are binarized, resulting in the appearance of bright pixels that only contain the LED image. Because we use cameras with rolling shutters, the LED image will appear as dark and bright strips because of the "on" and "off" states of the LED. The width of the strips is the function of the LED modulation frequency and the read-out architecture of the camera. By analyzing the width and the number of strips, the data are extracted as binary bits. The total number of strips projected inside the image sensor can be represented as follows [26]: where f o is the focal length of the camera, t r denotes the read-out time of a pixel of the camera, ρ is the edge length of a pixel, and f on and f off denote the ON and OFF frequencies of the LED, respectively. The appearance of the full LED to appear inside the image sensor is not necessary for successful communication. Particularly, the strips have a minimum number, denoted by Γ min , that should be formed to retrieve the transmitted bits. Γ min is formulated as follows:

BLE Path Loss Model
The signal power at the BLE receiver is given by [59] P rb = P 0 d r −υ where P 0 is the received power at a reference distance from the transmitter, d r is the communication distance, and γ is called the distance power gradient. The path loss for BLE is expressed as [59] L p = 10 log(P tr ) − 10 log(P 0 ) + 10γ log(d r ) (7) where P tr signifies the transmitted power.

FL Employment
As discussed previously, an excellent BER is more important than the data rate in eHealth applications. The network's capacity is almost negligible, because the monitoring system does not require a similar data rate to voice or video calling. However, the outage probability, which is a function of the achievable SINR, should be given significant attention. The link blockage probability for OCC is also important for reliable communication. Based on these issues, the major performance factors for OCC are regarded as the average SINR, instantaneous received power, and communication distance. These features should be inspected and analyzed before finalizing OCC as the data transmission system. However, setting a certain threshold value of the parameters that should be considered while selecting OCC is particularly inconvenient. Therefore, we envisage FL to assist in the selection mechanism.
FL is a computing approach that utilizes degrees of truth values ranging from 0 to 1 [60,61] rather than using only "true or false" when making decisions. We employed the Mamdani fuzzy inference system to assess the selection process of OCC. Three steps are considered in FL, namely fuzzification of performance parameters, assessment of different "if/then" rules, and defuzzification. Fuzzification is a process that transforms crisp inputs into fuzzy output quantities. The inputs are fuzzified by using numerous fuzzifiers, also referred to as membership functions (MFs) [62]. These functions are utilized to represent a fuzzy set graphically. MFs have different types. We used MFs with different numbers of breakpoints for various inputs.
Four input parameters are considered in the fuzzification process. We chose these parameters based on their effects on the OCC performance. The fuzzification process of SINR is illustrated in Figure 4. Four membership grades are chosen, such as low, average, high, and excellent, ranging from −15 to 45 dB. The selected values of the breakpoints a, b, c, and d are −15, 0, 15, and 30 dB, respectively. Among the parameters, the fourth parameter that we considered is the number of strips projected inside the image sensor. The significance of this parameter is indisputable when considering OCC for data transmission. As discussed in Section 3, below Γ min , the data bits cannot be extracted, although the LED image is projected in the image sensor. We performed several experiments on the training data and eventually chose the MFs. The grade breakpoints of the MFs were selected based on the variations of the parameters with distance prior to outage. Eventually, we selected four triangular MFs for the fuzzification of the SINR and three each for the other input parameters.
The fuzzification process is followed by the assignment of "if/then" rules. The rules are generated on the basis of the considered indoor scenario. The assumption of a patient's movement was apparent while establishing the rules, because the receiving camera or BLE receiver is a static object. However, mobile robots can be utilized for remote monitoring, which becomes the only case based on which the rules can be employed. We performed the evaluation of the rules by several "anding" operations. The output is denoted by five triangular MFs to obtain a precise result. Finally, the defuzzification step generates a score based on the evaluation rules, which is represented by a crisp value. The inputs can be defuzzified by various methods, such as centroid, bisector, smallest maximum, and largest maximum. We adapted the centroid method owing to its superiority among the other methods. The obtained score, also defined as the selection score (SS), is represented by the following equation.
where u represents sample input, µ(u) is the MF, and R is the universal set of real numbers. Based on the values of λ, a particular camera is selected for communication. However, as discussed previously, if the number of strips projected inside the image sensor is below Γ min , the communication is instantly terminated. Therefore, scores will not be considered in this circumstance.
from −15 to 45 dB. The selected values of the breakpoints a, b, c, and d are −15, 0, 15, and 30 dB, respectively. Among the parameters, the fourth parameter that we considered is the number of strips projected inside the image sensor. The significance of this parameter is indisputable when considering OCC for data transmission. As discussed in Section 3, below min Γ , the data bits cannot be extracted, although the LED image is projected in the image sensor. We performed several experiments on the training data and eventually chose the MFs. The grade breakpoints of the MFs were selected based on the variations of the parameters with distance prior to outage. Eventually, we selected four triangular MFs for the fuzzification of the SINR and three each for the other input parameters. The fuzzification process is followed by the assignment of "if/then" rules. The rules are generated on the basis of the considered indoor scenario. The assumption of a patient's movement was apparent while establishing the rules, because the receiving camera or BLE receiver is a static object. However, mobile robots can be utilized for remote monitoring, which becomes the only case based on which the rules can be employed. We performed the evaluation of the rules by several "anding" operations. The output is denoted by five triangular MFs to obtain a precise result. Finally, the defuzzification step generates a score based on the evaluation rules, which is represented by a crisp value. The inputs can be defuzzified by various methods, such as centroid, bisector, smallest maximum, and largest maximum. We adapted the centroid method owing to its superiority among the other methods. The obtained score, also defined as the selection score (SS), is represented by the following equation.
where u represents sample input, ( ) u μ is the MF, and R is the universal set of real numbers.

New NAR Generation
A new NAR initiation strictly depends on the patient's condition. Remotely monitoring a patient is energy inefficient, even when the patient's health condition is completely normal and has almost no retrogradation possibility. The normal heart rate of individuals in different ages has different ranges [63,64]. Based on the heart rate variability, an instantaneous condition factor is introduced, which will be utilized to initiate a new NAR. Algorithm 1 describes the process of initiating a new NAR. This condition factor is a variable denoted by ζ c ranging from 0 to 1. It will determine the scheduling process of the new NAR. The normal heart condition will be given a value of ζ c equal to 1. Two threshold values of ζ c , namely ζ c_1 and ζ c_min , which denote the first and second thresholds, respectively, are evaluated. Particularly, these values are naturally variable and strictly depend on the patient's heart condition. In most remote monitoring cases, a patient is specified with an expected heart rate by the monitoring person. A heart rate close to the optimal extent represents the value of ζ c close to unity. When the rate decreases or increases from the optimal value, the value of ζ c decreases. if ζ c > ζ c_1 then 5.
put the system in idle mode; 6.
Set τ = 0; 14. end if 15. End As ζ c decreases, it eventually reaches its first threshold. As long as it does not reach ζ c_1 , the system will be retained in idle mode, in which the patch is always deactivated. Consequently, the overall power consumption will be reduced. Note that the heart condition of the patient remains completely under control below ζ c_1 . If the value of ζ c is lower than ζ c_1 , then the patient will be continuously monitored with a regular interval, τ. The interval depends on the closeness of ζ c to the second threshold. This interval will be reduced if the closeness is high.
If ζ c falls behind the second threshold ζ c_min , then the patient will be monitored with no interval. The data will be continuously transmitted as long as ζ c is higher than ζ c_min . The patient is less likely to move when the instantaneous condition factor is very low, so continuous monitoring of the patient is convenient. If the instantaneous and target heart rates are respectively σ ins and σ tar , then ζ c is calculated as follows:

Network Selection for the New NAR
After generating a new NAR, the patch circuit is activated, and the digitalized signal is modulated. The signal is transmitted by using LED or BLE. The number of surveillance cameras can be more than one but particularly depends on the room size. Algorithm 2 summarizes the network-selection mechanism. The selection probability of OCC depends on the distance between the patient and camera. However, the patient should appear inside the camera AOV. Multiple cameras will increase the OCC coverage. The number of cameras is denoted by ξ.
Several factors are investigated before permitting data transmission by OCC. The patch LED will be ready for data transmission only when it is detected by a camera. However, when the number of strips projected in the image sensor is less than Γ min , the camera cannot extract data even if the LED is inside the AOV. This problem can occur in two circumstances. First, the Euclidean distance is considerably high between the camera and the patient. Second, the projected image appears in a corner of the image sensor, and the camera confronts the projection of a very small part of the LED. In both cases, Γ can be lower than Γ min . Hence, the communication can be instantly terminated in this condition. Therefore, a critical threshold of Γ is significantly required to confirm the reliability of the OCC scheme. The threshold is denoted by Γ crit , whose value is only above Γ min . The value of Γ crit varies for the cameras with different characteristics. Initially, the system checks the value of ξ. When ξ = 1, the camera is selected as the transmission network. However, for the high values of ξ, the SS of each camera is investigated. Then, the camera with the highest SS is selected. When a camera is selected for communication, its Γ is immediately verified whether it is lower than Γ crit or not. If yes, BLE will be selected for communication.
To theoretically represent the selection probability of each network, we consider a room with a dimension of a room × h room , as illustrated in Figure 5. The image sensor dimension of each camera is p im × q im. For simplicity, we assume that each camera is separated with equal distance from each other. The distance is denoted by ϑ. The selection probability of OCC is expressed in the following equation: Here, where d d denotes the vertical distance from the LED to the camera and m im is the minimum part of q im in which the minimum part of the LED must appear to extract the data bits sent from the LED. if new NAR is generated then 4.
Collect data from body sensor 5.
Set λ(j) = λ (1) The minimum LED part depends on the size of the LED and the distance between the LED and image sensor. The minimum area of the LED that should appear inside the image sensor for successful data decoding can be measured using the following equation [26]: where r l represents the radius of the LED and r m denotes the minimum portion of the LED that must appear inside the image sensor. The quantity m im ascertains the maximum communication range of the OCC, and d overlap is the width of the overlapped coverages of two cameras (see Figure 5). The width is formulated as The selection probability of BLE is then simply calculated as The minimum LED part depends on the size of the LED and the distance between the LED and image sensor. The minimum area of the LED that should appear inside the image sensor for successful data decoding can be measured using the following equation [26]: where l r represents the radius of the LED and m r denotes the minimum portion of the LED that must appear inside the image sensor.
The quantity im m ascertains the maximum communication range of the OCC, and overlap d is the width of the overlapped coverages of two cameras (see Figure 5). The width is formulated as The selection probability of BLE is then simply calculated as

Network-Switching Policy
As mentioned previously, OCC is a strictly directional LOS technology. If the LOS path of the light signal is blocked, the communication is terminated. Thus, efficient handover between OCC and BLE is required. Network switching is unnecessary in static user scenarios (e.g., patients who are unconscious and/or being transported in ambulances) but necessary when the patient is mobile, because the OCC performance remarkably depends on the LOS Euclidean distance between the LED and camera. The BLE performance is also influenced by user mobility. Efficient handover is thus required for reliable data transmission. d α,β varies with the patient's movement. The signal-blockage probability should be considered as it hampers the OCC performance. In addition, when changing the d α,β , the SS changes as well, consequently triggering the possibilities for the LED to be projected inside the image sensor with a number of strips below Γ crit . The network-switching procedure from OCC to BLE is summarized in Algorithm 3. When d α,β is changed, Γ of the current camera is immediately compared with the threshold. The communication with the current camera is continued if Γ is above Γ crit . Otherwise, its λ is compared with the other cameras that simultaneously detect the LED. The camera with the highest λ will be acceptable for communication. However, if no camera can meet the Γ crit requirement, the network will be switched to BLE. Algorithm 3: Network-switching algorithm from OCC to BLE.
Initialization: Communication with camera is in progress; 3. Begin 4.
Set λ(j) = λ (1) When the BLE transmitter is activated in the patch circuit, the room cameras are reinitiated at the next change of d α,β . If any camera detects the LED, its Γ is immediately compared with Γ crit . If the compared Γ is below Γ crit , the BLE transmission continues; otherwise, it is replaced by the camera monitoring. If the LED is detected by more than one camera, the λ values of all the in-range cameras are compared, and the network communication switches to the camera with the highest λ. Algorithm 4 summarizes the network switching strategy from BLE to OCC. Algorithm 4: Network switching algorithm BLE to OCC.
Initialization: Communication with BLE is in progress; 3.
Initiation of room cameras; 5.
if Camera (j) detect LED then 7.
Set j = j +

System Reliability
The reliability of a healthcare data transmission is tremendously significant. Any error in reception can lead to serious issues with patient health. To assess the reliability of the transmission system, several parameters are evaluated in this section, such as outage probability, BER, and quality of service (QoS).
Interference from neighboring RF cells is a main cause of outage in BLE. Current indoor/outdoor infrastructures are installed with abundant RF devices using the 2.4 GHz band, generating a considerable amount of interference. Path loss is another significant contributor to the overall outage probability. BLE outage can be considered to occur below a certain SINR threshold, denoted by χ. The BLE outage probability is calculated as [65]: (15) where N b denotes the total number of interfering sources with the BLE spectrum, k signifies a specific source, and I T (k) represents the total power received by the BLE for the specific interfering source. The interference of neighboring optical sources in OCC is also non-negligible. The interfering elements can be spatially separated from the image pixels, as each pixel acts as a photo detector. However, outage occurs when the LED array is beyond the AOV of the camera. In the scenario of Section 4, the outage probability can be expressed as where d max α,β and d crit α,β denote the maximum possible distance between the LED and a camera and the maximum communication range when using that camera, respectively.
The QoS of the healthcare data transmission system significantly depends on how much error-free data is received. Achieving an excellent SINR is indispensable in this regard. Although the data rate is not a highly considerable parameter, a minimum data rate must be ensured in the communication system. We theoretically defined the QoS for the hybrid system as follows: where φ ins and φ tar denote the instantaneous and target data rate, η ins and η tar are the instantaneous and target SINR, and κ represents the BER achieved in reconstructing after reception.

Performance Evaluation
To simulate our proposed system, we considered a room with dimensions of 5 m × 4 m × 3 m. Particularly, we employed static surveillance cameras rather than any mobile robot. Table 3 lists the unchanged parameters used in performing the simulations. Note here that any change to luminous parameters will affect the simulation results. All the simulations were executed in MATLAB. The network selection mechanism for a new NAR particularly depends on the OCC performance. When an LED array is detected by a camera using CNN, λ of the camera is immediately investigated to evaluate the possibility of selecting a camera. Four performance parameters, namely instantaneous received power, number of strips projected in the image sensor, SINR, and LOS communication range, were analyzed to calculate the value of λ. We implemented more than 100 rules to obtain the precise score. The COG method was utilized to calculate λ. Figure 6 depicts the variation of λ in each input parameter with increasing distance using the COG method. To evaluate λ, we considered triangular MFs for all the inputs. The MFs were selected on the basis of a maximum communication range of 4 m. Noticeably, when increasing the number of cameras, ∂ AOV will be increased to a great extent. Therefore, the probability for the LED to appear inside the camera coverage will also increase. Concurrently, the selection probability for BLE will be reduced. In addition, when coverage of a camera overlaps with another camera, S p_OCC depends on the value of d overlap . Evidently, the cameras can cover a large area when the value of d overlap is small, hence increasing the selection probability. Figure 7 depicts the variation in S p_OCC for a new NAR considering different values of ∂ AOV and ξ. In this simulation, d overlap and d α,β were fixed at 50 cm and 3 m, respectively. As shown in Figure 7, S p_OCC is significantly improved with higher values of ∂ AOV . On the other hand, the value of S p_BLE is decreased concomitantly. The selection probability also depends on the outage probability of each system. The outage probability for the hybrid system is illustrated in Figure 8. The outage probability of OCC is comparatively high. Several reasons can be addressed for the high outage probability of OCC. First, as most of the current commercial cameras have limited AOV, the overall coverage area is small. Second, data communication requires a LOS connection between the camera and the LED. Third, the optical signal in OCC is almost unaffected by the NLOS component. In Figure 8, we considered both the LOS and NLOS scenarios. However, when monitoring a patient in intensive care, the outage probability of OCC is low because the patient is static and the NLOS caused by the patient's movement is non-existent. In addition, the outage probability can be minimized by increasing the number of cameras. As is evident in Figure 8, integrating OCC with BLE considerably reduces the outage probability. AOV ∂ and ξ . In this simulation, overlap d and , d α β were fixed at 50 cm and 3 m, respectively. As shown in Figure 7, p _ OCC S is significantly improved with higher values of AOV ∂ . On the other hand, the value of p _ BLE S is decreased concomitantly. The selection probability also depends on the outage probability of each system. The outage probability for the hybrid system is illustrated in Figure 8. The outage probability of OCC is comparatively high. Several reasons can be addressed for the high outage probability of OCC. First, as most of the current commercial cameras have limited AOV, the overall coverage area is small. Second, data communication requires a LOS connection between the camera and the LED. Third, the optical signal in OCC is almost unaffected by the NLOS component. In Figure 8, we considered both the LOS and NLOS scenarios. However, when monitoring a patient in intensive care, the outage probability of OCC is low because the patient is static and the NLOS caused by the patient's movement is non-existent. In addition, the outage probability can be minimized by increasing the number of cameras. As is evident in Figure 8, integrating OCC with BLE considerably reduces the outage probability.  Network switching becomes important when monitoring mobile patients in these scenarios. When patients move, the changing , d α β alters the OCC performance (as discussed above), and hence the possibility of outage in OCC. When an outage occurs, the communication must switch to BLE. Figure 9 plots the OCC-to-BLE handover probabilities in the hybrid system as functions of  Network switching becomes important when monitoring mobile patients in these scenarios. When patients move, the changing d α,β alters the OCC performance (as discussed above), and hence the possibility of outage in OCC. When an outage occurs, the communication must switch to BLE. Figure 9 plots the OCC-to-BLE handover probabilities in the hybrid system as functions of d α,β for varying ∂ AOV and ξ in the scenario of Section 4. The outage probability significantly decreased with increasing ∂ AOV and ξ and increased with increasing d overlap . Expressed another way, decreasing the ∂ AOV and ξ increases the handover probability from BLE to OCC.

BLE parameters
When patients move, the changing , d α β alters the OCC performance (as discussed above), and hence the possibility of outage in OCC. When an outage occurs, the communication must switch to BLE. Figure 9 plots the OCC-to-BLE handover probabilities in the hybrid system as functions of , d α β for varying AOV ∂ and ξ in the scenario of Section 4. The outage probability significantly decreased with increasing AOV ∂ and ξ and increased with increasing overlap d . Expressed another way, decreasing the AOV ∂ and ξ increases the handover probability from BLE to OCC. . OCC-to-BLE handover probability versus LED-to-camera distance for various AOV ∂ and ξ.
As discussed earlier, reducing the error in the healthcare information is more important than improving the data transmission rate. Therefore, an excellent SINR is imperative. When the system meets the data rate requirement, its QoS is dominated by the error amount in the received information. In the performance evaluation, we set the target data rate and SINR and estimated the QoS values of the OCC, BLE, and hybrid systems. The cumulative QoS distribution functions in the three systems are compared in Figure 10. The cumulative distribution function (CDF) was calculated over the distance range 0.5-4 m. The CDF of the QoS increased with increasing difference between tar φ and ins φ and with increasing distance between ins η and tar . η As indicated in Figure 10, the QoS Figure 9. OCC-to-BLE handover probability versus LED-to-camera distance for various ∂ AOV and ξ.
As discussed earlier, reducing the error in the healthcare information is more important than improving the data transmission rate. Therefore, an excellent SINR is imperative. When the system meets the data rate requirement, its QoS is dominated by the error amount in the received information.
In the performance evaluation, we set the target data rate and SINR and estimated the QoS values of the OCC, BLE, and hybrid systems. The cumulative QoS distribution functions in the three systems are compared in Figure 10. The cumulative distribution function (CDF) was calculated over the distance range 0.5-4 m. The CDF of the QoS increased with increasing difference between φ tar and φ ins and with increasing distance between η ins and η tar . As indicated in Figure 10, the QoS was higher in the proposed scheme than in OCC or BLE. In all the simulations, the spectral density of the OCC noise was assumed to be constant and equal to 10 −21 .
Sensors 2019, 19, x FOR PEER REVIEW 21 of 24 was higher in the proposed scheme than in OCC or BLE. In all the simulations, the spectral density of the OCC noise was assumed to be constant and equal to 21 10 .

Conclusions and Future Works
The rapid development of IoT technologies has led to a new dimension in the healthcare field. Remote monitoring of patients' health conditions using IoT is a promising approach that may result in various convenient solutions to nursing assistants. In this paper, we proposed a wearable ECG monitoring system based on a hybrid OCC/BLE architecture. A patch circuit was suggested where an LED array and BLE transmitter chip are integrated. The patch collects the ECG data from the sensing network and transmits it through a hybrid infrastructure. Depending on the patient's health

Conclusions and Future Works
The rapid development of IoT technologies has led to a new dimension in the healthcare field. Remote monitoring of patients' health conditions using IoT is a promising approach that may result