Wireless TDMA-Based Body Area Network Platform Gathering Multibiosignals Synchronized with Patient ’ s Heartbeat

In the application of a body area network in medical healthcare, the process of receiving, archiving, and analyzing multibiosignals simultaneously from different devices for each body is very important. For example, to diagnose sleep apnea symptoms, a patient must sleep with dozens of devices, including electroencephalography (EEG), electrocardiogram (ECG), photoplethysmogram (PPG), peripheral oxygen saturation (SpO2), nasal cannula, and bands. Various wireless methods of body area network for acquisition and measurement of body signals have been introduced, but it is difficult to accurately diagnose various biosignals because their measurement frequencies are different from each other, and they are not guaranteed precise synchronization. Because each body biosignal is commonly synchronized with the heartbeat of the patient, precise synchronization of the heartbeat and other measuring cycles of each device is a critical attribute for analyzing the corelation of each biosignal in the body area network. However, it is difficult to guarantee the precise synchronization of multibiosignals by solely using carrier sense multiple access with collision detection(CSMA/CD-) based wireless protocols, which are mainly used in existing body area networks. This study proposes a method of creating a self-organizing body area network based on wireless Time Division Multiple Access (TDMA) to guarantee the synchronization of multibiosignals and compare its accuracy with the CSMA/CDmethod.


Introduction
As the medical healthcare environment has changed from hospital-centered to home-centered, medical devices have changed accordingly.Classification of these medical devices can be broadly divided into wired and wireless.Wired medical devices have high precision, but they are inconvenient to wear, complicated, and difficult to use by individual patients.Therefore, these wired medical devices are not suitable for a patient living at home.In contrast, wireless medical devices are usually worn by the patient in the form of wearable devices.Because there are no wires, they are convenient to wear and using them is relatively simple.Therefore, they can be used by the patient without assistance.For this reason, interest in wireless medical devices has increased, and studies have been actively conducted.In addition, the body area network for connecting many wireless medical devices has attracted much attention.
The body area network is a short-range wireless communication technology in which devices installed inside and outside the human body can be connected and communicated.Because each device is used in contact with the human body, data such as electrocardiograms, heart rate, and acceleration can be measured according to the device.Therefore, attention has been paid to convenience and usability, and an attempt has been made to provide patient-centered medical services based on measurement of human biometric data in real life.However, for complex medical diagnosis, the following constraints must be considered.
The first is the acquisition of multibiosignals synchronized with the patient's heartbeat.To analyze two or more biosignals at the same time, it is necessary to read various biosignals from one device or several devices worn in different parts of the body.In this case, because signals arriving from several devices must be synchronized with the measured time, accurate signal analysis can be performed.Therefore, it is necessary to perform a verification process for the received signals when they are measured.
The second is user convenience.The wearable device has an advantage in that it is easy to carry and use.However, when a healthcare medical system is constructed, a user wears a plurality of devices.If many devices need to be manually operated simultaneously, the user will feel rather uncomfortable with the wearable device.Therefore, to take advantage of the wearable device, the body area network-application needs to be configured with minimal user intervention, to be simple and easy to use.
In this paper, we propose a method for constructing a wireless Time Division Multiple Access (TDMA) based body area network platform.The proposed wearable devices constitute a body area network, based on one device to store data and perform time synchronization using periodic sync-signals generated from the central device.The devices periodically receive biometric signal data through the connected peripheral devices.The user receives and stores data from different wearable devices by manipulating the central device without having to manipulate the wearable devices separately.The devices have predefined biosignal channel information, so that the devices can generate and destroy channels without having to exchange prior information about the biosignals, thereby reducing the connection time.Since data can be acquired from the devices by a simple operation, the convenience of the user can be enhanced, and the inconvenience that users may feel using the device can be minimized.
The contribution of this paper is wireless body area network (WBAN) platform that enables users to add or delete wearable devices that measure biomedical signals according to actual pathology.The proposed WBAN can measure various vital signals that are important for time synchronization with heart signal using TDMA wireless communication method.The photoplethysmogram (PPG) signal being compared with the heartbeat signal can measure the blood pressure or pathology diagnosis, so it is particularly important to confirm the time synchronized signal.In this paper, we propose a wearable device that can measure time synchronized signals and make it easy to use in real environment.
Section 2 explains the basic concepts of the method.Section 3 describes the scenario and system requirements of the synchronization method proposed in this study.Section 4 explains the structure and design of the hardware and software for implementation.Section 5 describes the implementation of the method and the scenario used for verification and explains the result of the communication loss ratio of the implemented result.In Section 6, we conclude with future research.

Basic Concepts and Related Research
2.1.Body Area Network.As shown in Figure 1, sensors in the body range can be connected, and data can be collected; this data can be sent to the server side and monitored from the outside, so that it can be used in a variety of applications such as emergency situations, remote medical treatment, and exercises [1,2].
However, because the sensors must be within the human body range, there is a disadvantage in that the size of the installed device is limited, and since the sensor operates in the state in which the user wears it, the consumption of the battery needs to be minimized [3].Sensors used in the body area network typically require data rates in the order of a few kb/s to several Mb/s (body temp sensor, electrocardiogram (ECG), electroencephalography (EEG), and electromyography (EMG)).Therefore, to transmit each signal in the wireless environment, a sufficient communication protocol should be used for the bandwidth, and there are many protocols that satisfy this (such as ZigBee, Bluetooth SMART, and ANT +).
Within the body area network, sensors are attached to various parts of the body that collect biometric data and deliver it to the gateway.Signals delivered to the gateway can be connected to an external monitoring and alarm system to determine the current patient status in real time.In this study, a system is proposed in which a device attached to a human body forms a cluster; another device acts as a gateway, receiving data from the cluster and delivering it to the outside.

Wireless Communication Protocol.
The communication protocol used for the wireless body area network can be either the carrier sense multiple access with collision detection (CSMA/CD) method or the Time Division Multiple Access (TDMA) method.Table 1 compares the traffic level and synchronization attribute of the protocols.
CSMA/CD is a method of identifying the part where a collision can occur by detecting a carrier wave.It is possible to detect the use of communication, so that it is possible to avoid a collision between different attempts at communication, thus facilitating the configuration of a multicommunication environment constituting a body area network.As a representative MAC protocol using the CSMA/CD method, Bluetooth SMART and ZigBee are used, and body area network research is also actively performed [4,5].
However, rather than delivering data directly, it is necessary to store the data to be sent to the queue first and to send it when communication is possible.Therefore, if the connection occurs frequently, data may not be transmitted at the desired time, and congestion may occur.Since each sender needs to perform a separate task of synchronizing the receiver with queuing data to be sent, much effort is required in synchronization [4].
The TDMA scheme is a method of using a frequency band without causing a collision, because a plurality of users use the frequency band at the same time.In the TDMA scheme, a frequency band is used only by a predetermined user during a specific period, thereby avoiding collision between users.Therefore, it is advantageous for periodic signal transmission and transmission that is not delayed.It is advantageous in comparison with CSMA/CD when data is transmitted by connecting to a plurality of UEs.Due to these advantages, many studies have been conducted on body area network  Depends on the latency Depends on the traffic using TDMA [3,[6][7][8][9][10].However, if multiple slots are used adjacent to each other and the transmission timing is not accurately maintained, there is a possibility of causing a collision with a signal of another slot.Therefore, the slot between signals needs to be sufficiently large.

Service Scenarios
3.1.Service Scenarios.In this study, each wearable device forms a cluster to read user biometric data and transmit it to the server device in real time, so that the data can be synchronized.By forming a cluster autonomously between the devices in which the user is not required to separately issue commands, the user can minimize the hassle of manipulating the devices and acquiring biosignals, so that convenience is achieved while simultaneously conducting a comprehensive analysis of the signal.Figure 2 is an illustration of the type of service we want to provide.The user wears each wearable device on the relevant part of the body.Since the type of data that can be measured varies depending on the area in which the device is worn, the user can wear the device on other body parts depending on the purpose of the measurement.
The wearable devices receive the synchronization signal transmitted by the central device periodically and recognize the peripheral devices by transmitting a confirmation message.To distinguish the devices from each other, each device transmits its own device ID and is assigned an address value.Then, the devices in the created organization begin measuring by the measurement start signal of the central device.A channel for each biosignal is created, and the biosignal is transmitted through the corresponding channel.
In this case, because the transmission period for each biosignal is different, the central device first receives the biosignal from the device, stores it in the buffer, and then identifies the data of the channel to be stored in each cycle through the scheduler.The separated data is transferred to a separate analysis module and stored in the SD card or communicated with an external server to transmit data every cycle.The status of the wearer can be known by monitoring the delivered data from the outside in real time.

Design Requirements.
To construct the body area network used in this study, each device must satisfy the following requirements [4].
The first is that it is easy to use.If the user operates all of the devices, the advantages of the wearable device are that it is easy to carry, which does not matter if the device cannot be utilized.Therefore, all the devices should be operable by manipulating the central device of the cluster.
The second is that it can be operated in real time.The data received from each device is inevitably delayed while being immediately transferred through the gateway.In this case, when the data is sent some time after data is accumulated in each device, the entire delay becomes large, so that it is not suitable for situations in which the user's emergency status must be immediately checked.Therefore, it is necessary to acquire each packet of data and send it to the central device immediately.
Next is communication stability.If the communication of each device is not performed properly due to a collision or other factors, incorrect data will be collected, and, if analyzed, a wrong result may be obtained.Therefore, communication should be performed in a stable manner in any situation.Finally, the system should be secure.Since all the data acquired through the human body network is sensitive information of the individual, it is necessary to maintain the

Master Device
Transfer to master device security of the learning process, measure the data, encrypt it, and transmit it to the other devices.

Detailed Structure and Design
4.1.Device Structure.Each worn device plays a role in biometric data collection and delivery.From Figure 3, the user can separately check biometric data, reading through the user interface.Biometric data can be collected regardless of whether or not the organization is formed.In this case, since synchronization with other devices is not necessary, it is possible to measure based on the local time.
Afterwards, it communicates with the center device in an organization with the external device, forms the cluster, and transmits the stored data.Since the channel information of the biometric data of the device is predefined, the devices can form a channel based on the channel information and transmit the data according to the request of the center device.In this case, each organization has a different network value in order to prevent confusion with the external organization, thereby preventing collision with the external organization.
Figure 4 shows the central device of the cluster and the devices connected to each other to receive and manage data according to the synchronization signal.Since the communication is performed by the TDMA method, when the signal transmission timing of the device deviates, there may occur a situation where a collision with a signal from the other device fails.Therefore, to prevent collision between signals, the central device periodically transmits a synchronization signal to prevent collision between the devices, preventing a collision when a new device is added.Then, according to the request of the central device, the devices form a channel to transmit the biosignal to the corresponding channel.In this case, since the center device has different periods for the biosignals, a task for managing the schedule is set separately, and the timing of receiving the data based on the respective synchronization signals is confirmed before receiving the biosignals.After receiving the signal from each device, the scheduler confirms the timing and stores the data by time.If there is no data at the scheduled time, it is determined that a loss has occurred in the transmission process and is marked separately.
After that, communication with the external gateway or wired communication with the analysis module is performed to transmit data, thereby enabling data storage, monitoring, or data analysis to be performed.4.2.Software Architecture.Figure 5 shows the software structure of the wearable device for implementation.The software of the wearable device includes a main event task to process the entire event, a user interface task to display the state of the current device, a sensing task to perform signal measurement and process communication with the sensor, and there is a communication management task to manage the time slots.
The main event task processes the various events occurring in the device, and it handles the state change of the UI, the start and finish of the sensing task, and the button click event.
The communication management task accepts a connection request from the central device and generates a channel to transmit a biosignal.It also receives specific biometric data from the sensing task and delivers it to the central device.Figure 6 is a sequence diagram for cluster generation.The device that receives the signal can be divided into two cases, one with, and one without the assigned address.If there is no assigned address, an address allocation request-message is transmitted to the central device in order to allocate a new address.The central device receives the message, checks the empty address, and transmits the value to the device to allocate the address.After this, the device can send a message to the corresponding address.The device to which the address is allocated transmits a response message to the synchronization signal with a unique device address.At this time, the unique ID of the device and the sequence value of the synchronization message are stored and sent together in the response message.The central device receives the received message and checks the address of the message and the unique ID stored in the message.If the ID is not included in the organization, the central device stores the unique ID device information for the address together.By storing the device information in this way, when the device makes a data request at a later time, the device can distinguish the measurable biometric signal and make a request.
Many situations can involve the release of the organization, as shown in Figure 7.The first is the release by the decapitating signal of the central device.Like the organization creation, the central device can issue the organization release command to the device registered through the synchronization signal.Upon receiving the declassification command, the device sends a response message, closes the connected channel, and removes the registration information.Upon receiving the response, the central device releases the registration of the corresponding device.
The second is an unresponded state due to distance or battery shortage.The wearable device has a channel-specific watchdog timer.As shown in Figure 8, when the watchdog timer is reset by receiving the synchronization message of the central device and N messages are counted, it is determined that the connection with the central device should be disconnected without receiving the synchronization signal, and the channel connected to the central device is initialized to reduce unnecessary power consumption.

Timeslot Allocation of TDMA Scheme.
In TDMA, one channel is allocated one time slot, as shown in Figure 9.The number of channels that can be connected at one time varies depending on the size of the time slot based on the synchronization signal.When the length of one cycle time is T and the length of the time slot is t slot, as the synchronization signal channel always occupies one slot, the number n channel of the connectable channels can be expressed as follows: Figure 10 shows the process of transmitting data in a scheduled slot according to the synchronization signal of a central device.The central device transmits a synchronization signal to each of the devices in the first slot of the period.The devices receiving the synchronization signal store the sequence information of the current data based on this signal, and transmit the message, including the biometric data and the sequence number, to the central device side.This process is performed for each device, and as a result, the data from each device can be acquired without collision in one cycle.At this time, the synchronization signal has the same cycle as the cycle of the signal to be transmitted.This is to distinguish the signals in a cycle based on the synchronization signal and to prevent communication collision in the TDMA.2, the packet structure of the synchronization message is configured.First, messages sent to the wearable device by the central device are divided into three types-synchronization, organization creation, and organization release.The synchronization message is used for the external synchronization and device information request.The synchronization message includes an address value of a device to which a message is to be sent (an address is blank when sending a notification message to all devices) and an order value.

𝑇
The organization creation and release message is a message sent to the identified wearable device to command the cluster.When sending this message, the following information is transmitted to obtain specific biometric data from each wearable device.
(i) Biometric data type: since the data rate or period required by the biometric data to be measured is different, it is necessary to define the biometric data type in advance so that the central device and the wearable device can directly transmit the biometric data, so that the channel information can be aligned with the center device.
(ii) Cluster network unique number: to prevent overlapping with the other surrounding organization when the organization is created, the unique number of the cluster network managed by the central device is transmitted, setting it as the network unique number of the cluster and preventing it from being included in the.
(iii) Timeslot assignment number: since there is no collision with the different timeslots for each device, the time slot number assigned when connected to the device is delivered.
On the contrary, when the wearable device sends a response message to the central device, the response message can be either a response to the synchronization message, an affirmative response to the organization creation and release command, or a negative response.When a response to a synchronization message is sent, the following information is also included: (i) Biometric data type: biometric data that can be measured according to the type of device and the part to be worn are distinguished, and this information is included in the response.
(ii) Device identification number: since the central device knows not only the address assigned to each device but also the device identification number, it can be distinguished, even if the other device responds with the same address.

Communication between Devices.
Based on the synchronization signal of the central device, each device generates a channel and establishes a connection between the devices.
Figure 11 shows the channel generation between the central device and the wearable device in the cluster.First, the central device periodically transmits a synchronization signal to the wearable device in a state in which the synchronization channel is open, thereby confirming the connection state and transmitting/receiving signals.If a connection is needed, the central device transmits a request to the address of the wearable device to request channel creation according to the synchronization period.Upon receiving the message, the wearable device confirms the requested biosignal type, network value, and device number within the signal, and generates a channel corresponding to the request.If it is successful, the response is transmitted to the central device.If the channel creation fails with respect to the request, the channel creation failure-message is also transmitted to the central device.The central device checks the response received from the wearable device, and when the channel is successfully created, the central device receives the data from the wearable device by connecting the corresponding channel.
The wearable device receives the user's biometric data at a predetermined period through the sensor device.Since the received data is stored in the buffer and the data is transmitted every TDMA cycle, there is no need to separately queue the data.

Signalling and Scheduling.
Figure 12 shows the process of reflecting the message exchange process and scheduling between the central device and the wearable device in a sequence diagram.When the center device is connected to the wearable device, the center device registers the cycle of the corresponding biosignal in the schedule.Then, the communication task transfers the synchronization signal to the devices in the cluster.The schedule task stores the signals arriving between this signal and the next synchronization signal in one cycle.The wearable device reads and stores the wearer's vital signs, and delivers the message to the central device at every cycle.

Hardware Implementation. In
Figure 13, the implementation platform is shown as follows.The are collected, and the biomedical signal data array is created and stored in the SD card or transmitted to the outside.In addition, the button is used to check the cluster creation and destruction.
The wearable device and the center device are each configured, as shown in Figure 14.The wearable device is implemented as a wristband to be worn on the user's wrist.The PPG module is connected under the band to measure the PPG signal, and the data is received from the PPG module and transmitted to the central device.The central device receives data from the wearable device while connected to the PC using the nRF52 development kit.
The proposed wearable medical device consists of two parts.The microcontroller unit (MCU) of master device is CortexM4-based nRF52832 chip (frequency: 64 MHz, operating voltage 3.3 V).The sensor device has the EFM32WG990F256 chip (frequency: 48 MHz).As shown in Figure 15, power consumption is an average of 76 uA in the idle state and from minimum 295 uA to maximum 52 mA (average 12 mA) in the sensing and streaming communication state.

ANT Communication.
In this study, the ANT protocol is used to implement wireless TDMA communication.ANT is a type of communication protocol mainly used for medical and health care purposes.ANT has the advantages of simple implementation and low power consumption.It also operates in TDMA and is used within a range of less than 100 meters, similar to BLE.Its data rate was 12.8 kbits/s for broadcast and acknowledging messages and 60 kbits/s for burst mode.
Table 3 shows the performance comparison with major wireless protocols.
Compared with Bluetooth SMART and ZigBee, ANT communication transmits at 12.8 kbits/s when the data rate is broadcast/ACK message, which is somewhat lower than other communication rates.However, since the configuration of nodes is free, it is easy to form interdevice clusters, and, in the case of the system to be used in the paper, data is periodically received from the device, so that data transmission also needs to be performed periodically.Because Bluetooth SMART and ZigBee are CSMA/CD type in this respect, ANT communication is used, because there is a disadvantage in that it is difficult to guarantee the periodicity when several devices transmit signals in a short period.

PPG Signal.
The PPG signal is used in the wearable device for verification.The PPG signal is a signal that indicates the change in the blood volume of the blood vessel due to the heartbeat through the return light by using the principle of absorption, reflection, and scattering by emitting light to the blood vessel.Because the signal form according to the heartbeat during measurement is clearly revealed, and the data measurement period is short, shown in Table 4, it is easy to implement the congested communication environment, and the PPG signal is measured.The PPG signal is measured once every 10 ms and is sent once every 40 ms.One piece of data has a size of 3 bytes.

Evaluation
6.1.Evaluation Scenarios.The measurement environment is constructed as shown in Figure 16.
First, the user wears the wearable device on the wrist.In the module of the wearable device, the PPG infrared sensor is connected to the finger, and the PPG signal is measured from the connected PPG sensor and is transmitted to the central device.If the synchronization is performed normally, each wearable device simultaneously measures the PPG signal in real time, such that the increase and decrease in the signal will be similar.
In the ANT protocol environment, two channels are required for each PPG signal to transmit the PPG channel for sufficient performance evaluation.In the ANT protocol, since eight channels are available in one device, three wearable devices are connected in order to use the maximum number of channels.Therefore, there are six ANT channels.For comparison, the Bluetooth protocol also connects three peripherals to the central device.
The performance evaluation method is as follows.The measurement is started according to the signal of the central device when each of the devices is connected.At this time, the central device confirms the signal, and the message order value is sent from the respective wearable devices  and confirms that communication has been performed for every synchronization period.After receiving the data from the wearable device for about five minutes, it checks what percentage of transmissions resulted in error messages.In addition, it confirms how the order value of the Bluetooth SMART protocol and ANT communication is changed compared to the first one, based on one wearable device, and confirms that synchronization is properly performed.17 shows that the time synchronization does not match, even though the signal is measured at the same time.The signals of the two wrists have a heart signal and a delay time of 25∼35 ms.On the other hand, in case of ANT+, which is a TDMA method, it can be confirmed that the synchronization is exactly performed every 40 ms that generated the signal.Figure 18 shows how the order value changes with time from the reference signal when the PPG signal is received in Bluetooth SMART.As shown in Figure 19, when the Bluetooth SMART protocol is used, the difference in the order value increases with time.As the number of devices increases, the cumulative delay time that is accumulated increases with time.In the case of three devices, we can see that the delay is 6.108 msec/sec.On the other hand, when the ANT protocol is used, it can be confirmed that no cumulative signal delay due to queuing occurs.

Comparison of ANT and Bluetooth SMART Communication for PPG Signals.
When the PPG signal was transmitted every 40 ms for 5 minutes, the error rate is 3.26% in ANT communication and 1.74% in Bluetooth SMART.The proposed TDMA method has a relatively small difference of error rate as compared with CSMA/CD-based Bluetooth communication.

Conclusions
In this study, based on wireless TDMA communication, wearable devices form self-organization to construct a body area network and transmit data based on a synchronization signal.To form a cluster, the central device periodically transmits a synchronization message to the periphery.At this time, the wearable device within the range receives this message and transmits a response message that includes the device information to the central device side.
Based on this response, the devices form one organization, and the organization is divided by the network key.

Wireless Communications and Mobile Computing
Each wearable device learns the biosignal of the worn portion on the connected central device side and delivers it to the allocated time slot.
The central device separately checks the timing of each device through scheduling, generates a separate buffer, stores the biometric data of the corresponding period, and confirms it with an SD card or an external device.
To verify this scenario, we propose a method to transmit the PPG signal over six channels through the ANT protocol (based on TDMA), using three wearable devices and one central device.To do this, we used the CSMA/CD-based protocol and Bluetooth SMART to transmit the same size data.Experimental results show that the average data loss-rate is 2.36%.As the traffic increases, Bluetooth SMART confirms that the signal is transmitted without synchronization.In ANT communication, however, it is confirmed that the data is transmitted in the state in which the synchronization is performed, and the period of the PPG signal is matched.
The number of channels that can be connected in the future is limited, and slot collision may occur due to communication delay.Therefore, it is necessary to study more about how to overcome this problem, and it is necessary to study the process of analyzing biopsy data collected through multiple connections.

4. 3 .
Creating and Releasing Organization.The generation of the interdevice organization is based on the synchronization signal of the central device.The central device periodically sends a signal around the synchronization channel.

2 ) 4 . 5 .
Master =    Master : Synchronization signal cycle of the center device   : Cycle of the shortest signal (Packet Structure of Synchronization Messages.In Table

Table 2 :Figure 10 :
Figure 10: Example of time slot allocation in multidevice connection.
Figures 17 and 18 show graphs displaying the PPG signals received from each wearable device using Bluetooth SMART and ANT protocols, respectively.Figures show the heartbeat signal (blue) and the PPG signals (red, green) of the both wrist.

Table 1 :
Comparison between TDMA and CSMA/CD.

Table 3 :
Comparison between wireless protocols.