A Low-Cost Wireless Body Area Network for Human Activity Recognition in Healthy Life and Medical Applications

Moved by the necessity, also related to the ongoing COVID-19 pandemic, of the design of innovative solutions in the context of digital health, and digital medicine, Wireless Body Area Networks (WBANs) are more and more emerging as a central system for the implementation of solutions for well-being and healthcare. In fact, by elaborating the data collected by a WBAN, advanced classification models can accurately extract health-related parameters, thus allowing, as examples, the implementations of applications for fitness tracking, monitoring of vital signs, diagnosis, and analysis of the evolution of diseases, and, in general, monitoring of human activities and behaviours. Unfortunately, commercially available WBANs present some technological and economic drawbacks from the point of view, respectively, of data fusion and labelling, and cost of the adopted devices. To overcome existing issues, in this article, we present the architecture of a low-cost WBAN, which is built upon accessible off-the-shelf wearable devices and an Android application. Then, we report its technical evaluation concerning resource consumption. Finally, we demonstrate its versatility and accuracy in both medical and well-being application scenarios.


I. INTRODUCTION
W IRELESS communication technologies have become ubiquitous in our social and personal life, and the Internet of Things (IoT) plays a key role in this context.In particular, well-being and healthcare are emerging among the major application fields that largely benefit from advances in the IoT [1], [2], [3], [4].A central part in such IoT-based scenarios is played by Wireless Body Area Networks (WBANs), i.e., networks of sensors that work together to collect human activity-related data [5], [6], [7], [8].In particular, nowadays, WBANs are more and more emerging as the central system for the implementation of new solutions in the context of telemedicine and telehealth, moved by the necessity, also related to the ongoing COVID-19 pandemic, of designing approaches where clinical data are moved instead of patients and physicians.In addition, WBAN benefits are strongly linked to the emerging advent of new fields of innovative medicine such as, for example, digital health and digital therapeutics, where monitoring instruments in controlled (i.e., healthcare structures) and uncontrolled (i.e., home environments) environments are required for the long-term and in-depth monitoring and support of patients [9].
A WBAN integrates various sensors or devices, called nodes, depending on the purpose of the target system.These nodes can be both heterogeneous or homogeneous, depending on the type of data to collect, and they are typically connected via short-range wireless technologies, e.g., Bluetooth Low Energy (BLE), WiFi, or ZigBee [1], [10], [11].A central node, termed data aggregator or data collector, acts as a gateway.It is usually realized by a computer, smartphone, tablet, or a dedicated electronic device.The primary function of the data aggregator is to coordinate the other nodes and to forward data to a remote online server for storage, processing, and analysis.Besides, it can also perform complex operations (e.g., executing pattern recognition algorithms, providing stimulation, and performing feature extraction) based on the WBAN configuration [8], [12].
The IEEE 802.15.6 standard categorizes WBANs into medical and non-medical applications [12], [13], where the first imply continuous data collection of the vital parameters (e.g., blood pressure, heart rate, movement, etc.) of a patient [13].WBANs can be further categorized into wearable-based (e.g., Shimmer, BioSensing, G-Walk1 ), and hybrid (i.e., wearables and camera-based, e.g., Vicon Nexus2 ) [14] systems.Despite these classifications, WBANs have a relevant role in the Human Activity Recognition (HAR) research field, since they can capture the physical and physiological parameters of people and recognize their status in real-time.Therefore, HAR-based algorithms can be used to realize major personal and social benefits, especially in real-life applications such as healthcare, elderly care, gaming and sports [15], [16].For example, thanks to their continuous monitoring activity, WBANs integrated with HAR applications can act in real-time to prevent and avoid risky situations, like falls of elderly [17], or freezing of gait (FoG) in people with Parkinson's disease [18], [19].
Most algorithms used for HAR rely on machine learning methods that intrinsically need to be trained by using annotated data, i.e., data collected from sensors that are labeled with the information related to the activity/event of interest performed/exhibited by the monitored subject.
Unfortunately, commercially available WBAN solutions, as those cited above, are confined to collect and wirelessly forward sensor data without providing any support for assigning labels.In these cases, the expert (e.g., physician, physiotherapist, neurologist) typically performs the data annotation offline, by looking at the video recording of the observed subject while he/she was wearing the system and performing the activities of interest.A specific label is then manually assigned to each time frame of the video.As the video is captured by an external camera, the main problem with this methodology is the lack of time synchronization between the video stream and the data sensed by the wearable system.The synchronization is, in fact, usually performed manually by recording specific synchronization movements of the subject, which can be identified both in the perceived data and in the video.However, this is often imprecise and prone to errors, leaving to discrepancies in the annotated data that may negatively affect the training of HAR algorithms.As a further drawbacks, additional proprietary, cost-intensive software needs to be used for data analysis, which further increases the cost of the entire system.
Generally, multiple nodes are necessary for the implementation of a WBAN.Consequently, the cost of the hardware components can already become substantial.For example, the cost of a single commercial WBAN node, such as G-Walk, Shimmer, or BioSensing ranges from $ 300 to $ 1000.In addition, a higher cost comes from the annual subscription fee to the software suite, which the producers offer to enable the analysis of the data collected by the nodes.At this point, the overall cost of hybrid systems that combine sensor data and synchronous video, like, for example, Vicon Nexus, ranges from $4000 to $50000.These costs often already exceed the budget of many studies, especially when they are not driven by any commercial interest.To elude them, researchers often attempt to develop their own WBANs independently, instead of buying a commercial one.However, designing a WBAN from scratch is time-consuming and cumbersome.It requires in-depth knowledge from different fields, such as electronics (e.g., computational modules, sensors, antennas), communication technologies (e.g., BLE, WiFi, ZigBee), and software engineering (e.g., C, Java, Python) [6], [20], [21].Finally, such "self-made" WBANs often suffer from poor performance, e.g., in terms of battery lifetime, data quality, physical node dimensions, and communication range.
To address the above issues, this work proposes a generic and versatile WBAN that can be easily realized by everybody with low effort and at low cost.It is based on a smartphone and widely-available, low-cost off-the-shelf electronic devices.As we will demonstrate in four different case studies in Section V, the proposed WBAN achieves a high performance, which is sufficient for professional needs.Nevertheless, the proposed WBAN can be used in various HAR scenarios beyond the ones considered in our studies.The main characteristics of our WBAN can be categorized into structural and computational properties.Concerning the structural ones, the WBAN comes with the following features: In terms of computational properties, the WBAN is characterized by: r Visual, audio and tactile stimulation capabilities; r Edge computing of a rotation matrix, quaternion, pitch, roll, and yaw; r Support for preliminary run-time data annotation of the examined human activities; r Synchronized video recordings of the performed activities for offline data annotation refinement; r No need for a continuous Internet connection, since the WBAN can store the data and transmit them once the connection is available.Our WBAN has been extensively tested using different configurations (i.e., number of standalone nodes, type of the data aggregators, and sampling frequencies), and used in different application scenarios, viz., i) post-stroke rehabilitation, ii) postural evaluation, iii) Parkinson's disease, and iv) recognition of daily life motor tasks.In this paper, we will provide an overview of all these application scenarios, evaluating the WBAN performance in recognition of daily life motor tasks in detail.The software architecture of our WBAN is open-source and freely available for scientific purposes, such that other researchers can create their WBANs with low effort.
Paper Organization: The rest of the paper is organized as follows.Section II details the proposed WBAN and its integration in the context of a HAR framework.Section III presents an experimental evaluation of the WBAN, both from a technical Fig. 1.Overview of the HAR framework we set up for the experimental evaluation of the proposed WBAN as reported in Section III.It is composed of two layers: one for the data collection and one for the data analysis.The WBAN, in particular, implements the data collection layer.
point of view, i.e., performance analysis, as well as in terms of versatility and applicability to different scenarios in well-being and medical contexts.Section IV reports the review of the stateof-the-art concerning existing WBANs to highlight pros and cons with respect to our proposal.Finally, concluding remarks are given in Section V.

II. WBAN ARCHITECTURE
Our WBAN is integrated into a comprehensive HAR framework, as depicted in Fig. 1, which we adopted for the experimental evaluation reported in Section III.The framework is composed of two main layers, the data collection layer and the data analysis layer, communicating with each other by using the IEE 802.11 (WiFi) protocol.The WBAN implements the data collection layer.While a detailed description of the data analysis layer, is out of the scope of this paper, we decided to present the WBAN integrated in the HAR framework to better clarify its role and capabilities.

A. Data Collection Layer
The data collection layer, which corresponds to the proposed WBAN, integrates four types of different nodes that communicate through the BLE protocol: 1) A set of (wearable) standalone nodes, which perform data collection, user stimulation through visual and audio feedback, and edge computing; 2) A data annotation node, represented by an Android smartphone; 3) A data aggregator node, also represented by an Android smartphone, and 4) A smartwatch node to provide the user with tactile feedback stimulation.1) Standalone Node: The standalone node is based on the nRF52832 System on Chip (SoC), 3 the most advanced Nordic Semiconductor nRF52 Series family member.The nRF52832 is a fully multiprotocol SoC supporting Bluetooth 5, Bluetooth mesh, BLE, Thread, Zigbee, 802.15.4,ANT, and 2.4 GHz proprietary stacks.Furthermore, it uses a sophisticated on-chip adaptive power management system, achieving an exceptionally low energy consumption.This SoC interfaces with various electronic devices for perceiving different measurements of the real environment.In our setup, the nRF52832 defines the core of each WBAN standalone node.In particular, we use the Nordic Thingy 52 IoT Sensors kit (based on the nRF52832 SoC) shown in Fig. 2, which integrates a custom-developed firmware.
Besides the data directly measured by the integrated sensors (i.e., accelerometer, gyroscope, compass, magnetometer, and gravity vector), the standalone nodes internally computes the following motion-related information: r Quaternion (Q); r Rotation matrix (RM); 3 nRF52832 web page.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE I OVERVIEW OF THE DATA COLLECTED BY THE STANDALONE NODES
r Pitch, roll, yaw (P); r Step counter (SC); r Euler angles (EA).
A comprehensive view of the data collected and internally computed by the standalone node, with a sampling frequency varying in the range 5 Hz-200 Hz, is shown in Table I.These data are transmitted through BLE to the data aggregator node.Nevertheless, the standalone node is also used to apply audio and visual stimuli to the user, which are emitted, respectively, by the integrated LED and audio device.This feature is of interest for implementing coaching systems in medical applications and healthy scenarios, where the user must be alerted when some situations happen (e.g., pill reminds for elderly, rhythmic stimulation for mitigating the freezing of the gait in people with Parkinson's disease, alarms for notifying correct/wrong posture in rehabilitation, etc.).
Finally, to further extend the functionality of the WBAN, we also integrated, as standalone node, a pair of smart glasses, 4  which, in addition to the stimulation provided by the Thingy 52, allow to add additional features in terms of assisted reality for implementing coaching actions through video stimulation.
2) Data Annotation Node: The data annotation node is represented by a smartphone that runs an Android mobile application.It primarily allows an external observer (e.g., physician, caregiver, family member) to generate a dynamic list of activity labels (e.g., sitting, walking, standing still, climbing/descending stairs) based on the application scenario to be associated with the data sensed by the standalone devices.This node is also time synchronized with the data aggregator node, whose camera records the video of the subject while he/she performs the required activity or exhibits the event of interest.Then, the data aggregator synchronizes the video with the data collected by the wearable sensors (i.e., the standalone nodes).In this way, through a user-friendly application, the data annotation node allows the external observer pre-assigning labels, at run time, to the synchronized stream composed of the video recording and the sensor data.Labels are then directly sent to the data analysis layer and associated with the data collected by the standalone nodes (see Column Data Label in Table I).This reduces the effort required to manually annotate the data offline.However, being assigned manually, the preliminary labels may be not precisely aligned in time with the observed human activity/event, given that a small delay is reasonable between the moment when the action of interest is performed by the monitored subject and the moment when the label is assigned by the external 4 Wagooar webpage.
observer.Hence, the application of the data annotation node allows the expert refining offline the times at which every specific activity/event begins and ends, when necessary.The need of this refinement phase depends on the monitored activity/event.For example, if the monitoring concerns daily life activities, such as walking, sitting, stairs up, etc., the run time annotation is sufficient for the design of accurate recognition models, since the annotation error is negligible with respect to the duration of the action.On the contrary, when FoG episodes in Parkinsonians are investigated, a precise frame-by-frame data annotation is required to avoid ineffective training of HAR algorithms.
Finally, the smartphone can be used to send, at real-time, commands to the standalone nodes and the smartwatch for activating, respectively, audio/visual and tactile/visual stimulation for the target user.The appropriate repetition frequency and duration of the stimulation can be adjusted.
3) Smartwatch Node: The smartwatch node implements the role of a virtual coach for helping the user in his/her "wellbeing/healthcare path".It runs an application that communicates with the data aggregator and annotation nodes.The coaching actions are provided to the user by means of tactile and visual stimulation, when the application realised a desired situation occurs.Coaching actions can be customized and configured by the external observer through his/her data annotation node.For example, the external observer can use the data annotation node to send a command that activates the tactile stimulation on the smartwatch during a rehabilitation session, to guide the patient.Complementary, the smartwatch can start the stimulation on the basis of the decision autonomously taken by the data analysis layer, according to the automatic recognition of a risky or unwanted behavior/situation.
Our WBAN is compatible with any smartwatch running the WearOS operating system.During the WBAN evaluation, as shown in Section III, the following models of smartwatches were tested: Ticwatch E2, S2, Pro, and Pro 2. 54) Data Aggregator Node: The data aggregator node is represented by a BLE-compliant computing unit, like for example a smartphone, which runs an application that behaves as a gateway between the data collection layer and the data analysis layer.It uses the BLE technology to communicate with the standalone nodes and IEEE 802.11 (WiFi) to communicate with the data analysis layer.
Fig. 3 shows an overview of the data aggregator application running on an Android smartphone. 6The application provides  complete control over the functionalities of the standalone nodes and allows configuring them in terms of the sampling frequency of each sensor and the type of data to be acquired (i.e., inertial, environmental, or computed on the edge).In addition, the application allows the user recording a video synchronized with the data collected by the standalone nodes.Therefore, the synchronized video can be used later, by an experienced data annotator, during a supervised data annotation process.Each data collection session is identified by Subject ID, Session ID, and Task ID (Fig. 3(d)).The data aggregator itself is uniquely identified by an ID that can be decided in the settings page of the mobile app.
Fig. 4 presents the communication dataflow between the data aggregator and the rest of the nodes.Initially, standalone, data annotator and smartwatch nodes establish a synchronized connection with the data aggregator.The standalone nodes perceive and transmit the data to the data aggregator by using the BLE protocol.Meanwhile, the external observer can assign labels to the collected data and send stimulation commands to the user through the data annotator node.Finally, the data aggregator periodically forwards the received data to an external cloud database where they can be elaborated by the data analysis layer.If the communication with the cloud server is temporary missing, the WBAN keeps going to perform its activity and stores the collected data in the data aggregator node.As soon as the communication is restored, all data are transmitted to the data analysis layer.
In the current version of the WBAN, the data aggregator can simultaneously connect up to 11 nodes, i.e., typically, 9 standalone nodes, 1 smartwatch node, and 1 data annotator node; they became 9 for devices running an Android version older than v11.Android has been chosen as the reference platform for the data aggregator due to its low cost, extended community, and compatibility with several pattern recognition libraries (e.g., Keras, Tensorflow, or Weka) that allow the implementation of on-device HAR algorithms.

B. Data Analysis Layer
The data collected by the WBAN are transmitted over the Internet to a remote cloud server as shown in Fig. s 1 and 4. On the server side, the data, in JSON format, are saved into a NoSQL database for further processing.By accessing to such a database, any kind of data analysis workflow can be implemented, by integrating sophisticated machine learning and deep learning-based approaches.While the description of the data analysis layer is out of the scope of this paper, for evaluating the versatility and performances of our WBAN, we integrated the workflow described in [22], and we made it open source and freely available to the research community.It implements an HAR framework composed of various sub-processing steps (i.e., noise removal, segmentation, features extraction, and normalization) and several classification models to recognize human activities by exploiting the data collected by the WBAN.

III. WBAN EVALUATION
This section, initially, presents the technical evaluation of the WBAN concerning performance aspects such as data loss, battery durability, RAM consumption, required storage, and CPU usage, on different types of data aggregator nodes.Then, the section elaborates on the WBAN versatility by showing

A. WBAN Performance Analysis
The characteristics of the data aggregator nodes used in our experimental analysis are reported in Table III.In particular, we tested our WBAN with six distinct smartphone models with different HW/SW and cost attributes.
For each model, Table II shows the RAM and storage memory demand, the CPU usage, the battery usage, and the data loss of the data aggregator over three test sessions 4 hours long, by using four standalone nodes with increasing communication frequencies (50, 100 and 200 Hz).
During the experiments, the data aggregator node was positioned on a tripod for smartphones at a height of 137 cm, with screen brightness of 50% and video-recording in Full HD.Users wore the standalone nodes on their arms and legs, and they performed activities of daily life (ADLs) without any restrictions.The distance between the data aggregator node and the standalone nodes varied between 2 and 27 meters in an indoor environment.Moreover, the WBAN was tested up to a distance of 50 meters in an outdoor environment, verifying that the connection was never interrupted.
As shown, on average, at the maximum sampling frequency (200 Hz), the RAM usage per hour is about 127 MB/h (max 170 MB/h for the One Plus 6 at 200 Hz), the storage memory usage is about 193 MB/h (max 295 MB/h for the One Plus 6 at 200 Hz), the battery usage is about 602 mAh (it becomes 449 mAh by excluding the result of Honor 7S, which is definitely underperforming), and the CPU usage is 34%.Finally, the data loss is 0% for the most of the cases, with the exception of the Samsung Galaxy S7 Edge, which generated a high data loss rate due to the Samsung Experience and Android version.To verify this, we tested three different Samsung S7 Edge devices with identical android versions but different Samsung Experience versions and noticed that the latest (v9) Samsung experience version presented a high data loss.
In more extended data collection sessions, we verified that, on average, all the tested data aggregators could collect data for at least 9 consecutive hours before exhausting the battery charge.As indicated by the Android Studio Profiler 4.1.2,the battery consumption was mainly due to the screen brightness (26%) and the BLE communication (38%).
Concerning the number of data collection nodes that the data aggregator is able to manage concurrently, the tested devices with Android versions older than v11 could connect with up to 7 devices.Instead, smartphones running Android v11 connected simultaneously with 11 devices.
Finally, we tested the energy consumption of the standalone nodes (i.e., the Nordic Thingy 52) sampling at the maximum frequency (i.e., 200 Hz).They could efficiently operate for more than three days without the need of recharging the battery.The test was repeated 5 times, always achieving the same results.The adoption of a lower sampling frequency extended their battery lifetime consistently.
In summary, we can conclude that our WBAN performs well with different data aggregator nodes, and it can operate for a significant amount of time without requiring to recharge the standalone nodes worn by the user.

B. WBAN Versatility and Easiness of Use
A deep analysis concerning the wearability and usability of the proposed WBAN requires it to be tested in a statistically-relevant pilot study.The same is true concerning evaluating the effectiveness and accuracy of machine/deep learning algorithms fed by the data sensed through the WBAN for well-being and healthcare applications.These kinds of analyses are out of the scope of this manuscript and part of our ongoing research.On the other hand, this section is primarily intended to show the WBAN's versatility in different scenarios.In addition, a preliminary understanding of WBAN's easiness of use, from the point of view of the professional staff in the considered scenarios, is reported at the end.
The versatility of the WBAN has been evaluated on the healthy living and medical application scenarios reported in Fig. 5, in cooperation with neurologists, physiatrists, kinesiologists, and computer engineers.Examples of its application are detailed in the following paragraphs.
1) Healthy Living: In the context of healthy living, we studied the application of the WBAN for the analysis of motor activities and postural evaluation.
Motor activities: The most popular motor activities addressed by the HAR research field are standing, sitting, walking, running, going up and down stairs.These activities are the primary motor components of more complex instrumental or basic ADLs, such as working, bathing, eating, sleeping, dressing, and others.In these contexts, identifying the best performing WBAN configuration (i.e., number of nodes, sampling frequency, type, position, and orientation of the sensors) aims to increase the reliability of the recognition task.Thus, we tested our WBAN with several configurations, where the standalone nodes were mounted on various locations of the subject body to acquire different types of data.For example, Fig. 5(a) shows the position of standalone nodes for recognizing traditional daily life motor activities, i.e., sitting, standing, walking, going up and down stairs and opening doors.Fig. 6(a) plots the accelerometer raw data collected by the Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE III CHARACTERISTICS OF THE TESTED DATA AGGREGATOR NODES TABLE IV AVERAGE SPECIFICITY (SPEC), PRECISION (PREC), RECALL (REC) AND F1-SCORE (F1-SC) RESULTS ON THE HAR CLASSIFICATION MODELS
WBAN with this configuration, where it is possible to clearly distinguish the patterns corresponding to the aforementioned actions.
To further test this scenario, in addition to the accelerometer row data, we extended the analysis by collecting a dataset including also the values of the x, y, z axis for the gyroscope and the compass embedded into the standalone nodes.In particular, five standalone nodes were placed as follows: a) one for each ankle, b) one for each leg (approximately 15 cm up with respect to the knee), and c) one on the low-back.The executed tasks were: 1) sitting, 2) standing without moving the lower limbs, 3) lying down, 4) walking, 5) jumping, 6) going upstairs, and 7) going downstairs, collected from 12 different subjects (5 females and 7 males).
A Convolutional Neural Network (CNN) model and four conventional machine learning models, i.e., k-Nearest Neighbour (k-NN), Decision Tree (DT), Random Forest (RF), and Linear Discriminant Analysis (LDA) were fed on such data obtaining the results shown in Table IV.The performances are presented (w.r.t., inter-intra-train/test split approach) in terms of specificity, precision, recall, and F1-score.The models were tested by using two different time window dimensions: 1 s and 2 seconds.
CNN and RF models produced the most accurate results.However, the CNN has demonstrated to have less computational overhead than the RF and it was simpler to set up for on-device computing on the data aggregator node.The RF model needs longer training time than the CNN model, since it must test and compare a large number of configurations before determining the optimal.Overall, the performances achieved by all the tested models clearly show that the data collected through the WBAN provide qualitative information concerning the seven studied activities.
Postural evaluation: Postural evaluation is an essential part of gait and posture correction in sport science, and physical and rehabilitation medicine.Different laboratory devices and instruments for quantifying postural stability are part of the stateof-the-art.However, these systems present many limitations related to availability, accessibility, cost, size, intrusiveness, and usability.In addition, they may suffer from a time-consuming set-up process.In this application scenario, we have used our WBAN to study the anticipatory movements that are not visible by external observers.The aim is to distinguish among different postural indicators to identify the minimum requirements that the low-cost wearable system must possess and the optimal position of the sensors on the human body.
Fig. 5(b) shows the application of the experimental setup we created to simultaneously use the state-of-the-art Vicon Motion Capture system7 and our WBAN (standalone nodes are indicated by the white circles on the body).The WBAN has been used to measure the postural and gait stability of human subjects and to provide them with feedback for improving posture and gait in sport performance for athletes, motor activity for elderly, and also rehabilitation for people affected by neurological diseases.The goal was to compare the results obtained by analyzing data collected through the Vicon system and the data collected by the WBAN.For such purpose, the data streams of the WBAN and Vicon were synchronized through a synchronization movement recorded on video.
For this study, we have collected data from 14 different subjects.Fig. 6(b) shows how the row accelerometer data, sampled by the WBAN, allowed us to distinguish among the initial position, the anticipatory signal, the movement, and the return to the recovery position, by using a classification model implemented in the data analysis layer.
2) Medical Applications: In the context of medical applications we evaluated the WBAN for post-stroke rehabilitation and for mitigating the freezing of the gait in people with the Parkinson's disease.
Post-stroke rehabilitation: Stroke is one of the leading causes of death and disability for adults worldwide.On survived persons, it can significantly impact mobility, perception, cognitive functions and quality of life.Above all, upper limb dysfunction, characterized by disturbances like muscle weakness, sensorimotor control deficits, and changes in the muscle tone, is one of the most relevant determinants of disability in stroke survivors.In these case, rehabilitation plays a crucial role in post-stroke recovery to help patients relearning fundamental skills to improve their quality of life.During rehabilitation, quantifying sensorimotor deficits is essential for designing appropriate and effective rehabilitation interventions for stroke patients.
To assess upper limb movement abnormalities in stroke subjects, velocity and acceleration patterns along with spatial errors allow for objectively identifying dysmetria, tremor, and motor planning impairment.Here, our WBAN has demonstrated to be very beneficial on two aspects.First, the analysis performed with the WBAN has helped to identify the subclinical sensorimotor impairment stage, yielding more sensitivity than a clinical observation.Second, it has provided the physicians with objective data to be used for monitoring patient improvements and planning personalized and more effective rehabilitation treatments.
Fig. 5(c) and (d) show the application of the WBAN configured with a single standalone node, mounted on the wrist of the subject, to analyze the kinematics and muscular activity during, respectively, the index-to-nose task and the range-of-motion task.Correspondingly, Fig. 6(c) and (d) show the characterization of the data collected by the WBAN.It is evident the distinction among (i) initial position, approaching the nose, touching the nose, and going back to the initial position, for the nose-finger task, and (ii) initial position, acceleration (going-up), max height, and deceleration (going-down) for the range-ofmotion task.For this study, we have collected data from 10 different subjects.
FoG in Parkinson's disease: The Parkinson's disease (PD) is the second most common neurodegenerative disorder, affecting approximately 10 million people worldwide.PD patients experience a broad range of disabling motor and non-motor symptoms during the disease course.Falls are among the most dangerous complications, and FoG increases the risk of falling.FoG is an episodic gait arrest characterized by a range of motor phenomena that span from sudden complete akinesia and short shuffling steps to milder "trembling-legs" phenomenons during gait starting.FoG is usually underdiagnosed and undertreated, because of its episodic nature and its recognition.It is usually based on the patient report of the home symptoms, while this motor phenomenon may not be clear during a standard outpatient visit.Remote continuous monitoring of patient movements through our WBAN has been proposed to increase the sensitivity in detecting FoG events regardless of the patient awareness and frequency of outpatient visits.Moreover, detection devices paired to systems that deliver different types of rhythmic stimuli (auditory, visual or vibratile cues) have been proposed to help the patients overcome FoG events [19].Detecting FoG and pre-FoG episodes is of great importance to provide an objective measure of a motor PD complication that may not be appropriately explored in routine outpatient visits.Recognizing where/when Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.FoG episodes take place (e.g., turning, stepping over an obstacle) offers additional advantages, e.g., allowing the prediction of contexts that increase the likelihood of FoG.Adding an additional stimulation unit helps the patient to overcome the FoG episode.
Training a HAR algorithm to expect a condition of high FoG likelihood increases the efficacy of the system to appropriately give the patient stimuli to overcome the FoG.Fig. 5(e) shows the application of the WBAN to detect FoG episodes in PD.The detection occurs before the actual FoG appears through the analysis of motor changes preceding it, i.e., through a pre-FoG detection.Moreover, in this application scenario, we integrate a pair of smart glasses as one of our standalone nodes.They have been used to provide automatic rhythmic visual/audio stimuli to mitigate and overcome FoG episodes when they occurred.Fig. 6(e) shows that the accelerometer data collected by the WBAN, allow to automatically recognize when the patient was walking, standing or experiencing a FoG episode.For this study, we have collected data from 22 different subjects.
3) Usability for Professional Staff: During the experiments reported in the previous paragraphs, after an initial training phase, the WBAN has been used, autonomously, by eight healthy-living professionals and physicians working at the University of Verona, the Polytechnic of Turin and the corresponding city hospitals.An anonymous questionnaire with 10 questions concerning the WBAN easiness of use has been administrated to them.Answers were provided according to a 4-point Likert scale: 0) not at all true, 1) very little true, 2) somehow true, and 3) very true.The results, supporting the fact that the proposed WBAN easy to be used by professionals without the intervention of ICT experts, are reported in Table V.

IV. COMPARISON WITH THE STATE OF THE ART
As stated on recent survey studies [28], [29], despite the challenges and advantages introduced by WBANs in multiple research fields [20], [21], which are mainly related to sports and healthcare, it is difficult to find in the recent literature similar systems accessible to everyone that can be easily reused.In particular, most of the WBANs discussed in [28], [29] present a simple configuration with at most three nodes and no data annotation capability.On the contrary, the possibility of connecting several nodes and the support for data annotation are two relevant features that characterize our solution in terms of versatility.Moreover, WBANs reported in [28] are not opensource or not easily reproducible at low cost, since they employ commercial and proprietary devices.The research activities presented in [29], instead, are mainly focused on reducing the energy consumption of WBAN devices by designing low-power communication protocols and processing units.On the other hand, in this paper we are targeting the overall functionality of the WBAN and its flexibility in different medical and well-being contexts.
Other systems, which allow to connect more than one data collection node or that can be easily reproduced, are then analyzed hereafter.In particular Table VI, we present an overview of existing non-proprietary (rows 2 to 6) and proprietary (rows 7 to 10) WBAN-based solutions comparing their characteristics and costs with respect to the WBAN we have proposed and discussed in the previous sections.In detail, columns one to three present, respectively, the publication reference (year) or device name, the battery duration of the data collection nodes, and the cost.Instead, columns four to seven present, respectively, the type of data aggregator device, the number of devices (data aggregator/s, standalone data collection nodes), additional characteristics of the WBAN, and the WBAN application context (i.e., medical and non-medical).The last row is referred to our WBAN.
Among the solutions reported in Table VI, it is worth describing more in details the most recent ones.Authors of [23] proposed a low-power, high-speed WBAN composed of wireless sensors, a central aggregator module, and a smartphone used as central node.This WBAN aims to monitor vital parameters through real-time data acquisition and remote monitoring.However, the system has multiple drawbacks.First, it has a reduced wearability, since its dimension (12 x 8 x 1.5 cm) may cause issues for the end-user leading to reduced data quality due to the noise provoked by the instability of the device placement.Second, the silicon boards of the sensors touch the skin directly, causing overheating of the patient body during long runs.
In [24], the authors presented a wearable sensor system to detect ADLs.It is composed of an Arduino board to collect, process, and classify activities such as smoking, drinking, eating, etc.Even though the results are very interesting, the set of recognized activities is small and very similar.In addition, the wearability issue (7 × 5.5 × 4.5 cm) is not addressed.The adopted classification models are costly in terms of memory and computational resources.
The authors of [25] presented a WBAN based on a BLE wearable node powered by solar energy placed on the subject body for heart rate, temperature, and fall detection.In their experimental tests, the solar energy harvesting feature provided a node runtime of 24 hours.However, this solution has Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

TABLE VI COMPARISON WITH EXISTING WBAN RESEARCH AND COMMERCIAL SOLUTIONS
limitations concerning node dimensions (12.2 × 11 × 2 cm) and frail solar panels, compromising system's integrity and functionality.Furthermore, the autonomy of the system depends the weather or environmental light conditions.Finally, the authors of [26] and [27] proposed a medical WBAN, which is able to collect vital and health information like blood oxygen, respiration rate, Electrocardiography (ECG), and body temperature, making use of BLE and ZigBee communication technologies.Both these solutions are subject to limitations related to the battery life, dimension of single nodes, and sampling frequency.
Overall, compared to the analysed WBANs, also considering commercial WBANS such as GWalk, ActiGraph wGT3X-BT, Shimmer3, and Verisense, our solution presents features that make it more easily usable in different contexts at a relatively low cost.The node size (5 x 5 x 1.5 cm) is small enough to be easily worn, and the application on the smartphone acts as a data aggregator presenting the capability to synchronize the collected data to a video stream, thus, facilitating the labeling process.The data aggregator is a standard smartphone that, compared to the data aggregators of existing WBANs of Table VI, is a highly portable device.Our WBAN presents stimulation (i.e., visual, tactile, and audio) and real-time annotation capabilities.A data annotator node allows an external observer to perform real-time annotation of the data perceived by the standalone nodes.Besides, the proposed WBAN has been tested on different application scenarios by employing distinct configurations (i.e., node positions, number of nodes, used sensors, and utilization of smartwatch and/or smart-glasses and/or data annotator nodes in addition to the data collection nodes), presenting the capability to connect more than seven standalone nodes simultaneously.In particular, concerning the commercial WBANs, the cost of our WBAN is highly competitive, and only the Shimmer3 and Verisense platform presents the capability to connect to more than one data collection node.Nevertheless, they do not present the capability to perform video registration of the monitored subject/context or real-time annotation/stimulation.Finally, the implemented software (i.e., the firmware of the Thingy 52, Android code for the data aggregator and the annotator, and the WearOS smartwatch application) are freely accessible to the scientific community.8

V. CONCLUSION
This paper presented a versatile WBAN for HAR-based medical and non-medical applications, characterized by low cost, extended battery life, and long transmission range.In particular, the proposed WBAN integrates up to eleven data collection nodes among standalone Thingy 52 devices, smartwatches, smart glasses, and smartphones.The data collected by using such nodes are synchronized with a central data aggregator represented by an Android smartphone.The WBAN presents the capabilities to collect acceleration, angular velocity, compass heading, quaternion, rotation matrix, pitch, roll, yaw, step counter, Euler angles, and gravity vector data.The data aggregator node presents the capability to video-record the subjects while they are wearing the WBAN.Such a video is synchronized with the recorded data to enable their offline annotation with the activities performed by the subject wearing the WBAN.However, a smartphone application has been also developed to provide an external observer with the capability of performing the run-time annotation of the collected data.Nevertheless, the annotator can directly interact with the users through three different stimulation methods, i.e., audio, visual, and tactile, when, in a coaching context, they need stimulation to learn, remedy or avoid specific activities/movements.
Concerning its versatility, the WBAN has being used in different application scenarios, achieving excellent performance results concerning, in particular, data loss, wearability, battery life, and transmission range.In addition, the data collected by the WBAN revealed to be suited for the automatic recognition of several patterns of interest for kinesiologists, physiatrists and neurologists through a HAR framework.
Concerning future developments, we are working to integrate a light but effective data analysis layer directly in the WBAN edge devices, i.e., the standalone nodes and the data aggregator node.Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

r
It is a low-cost solution (≈ $ 250 for an entire setup); r It works for a long period of time (≈ 4 days) without the need of recharging the battery of the wearable devices; r It supports a practical communication range (≈ 30-50 meters); r It has a negligible data-loss rate; r It integrates both inertial and environmental sensors.

Fig. 3 .
Fig. 3. Data aggregator mobile application: (a) Google playstore view (upon request), (b) scan for BLE devices, (c) discovered devices, (d) data collection page, (e) collected data, and (f) settings page.More readable screen shoots of the application are visible at this link.

Fig. 6 .
Fig. 6.Example of raw signal, x-axis acceleration value (m/s 2 ) and y-axis time (sec), patterns for a) recognition of motor activity, b) postural evaluation, c) nose-finger, d) range-of-motion, and e) FoG detection.

Florenc
Demrozi (Member, IEEE) received the BS and ME degrees in computer science and engineering from the University of Verona, Italy, in 2014 and 2016, respectively, and the PhD degree in computer science from the University of Verona, Italy, in 2020.He is currently an associate professor in biomedical engineering with the Department of Electrical Engineering and Computer Science, University of Stavanger, Norway, working on Human Activity Recognition (HAR), Ambient Assisted Living (AAL), Internet of Medical Things (IoMT), Sensors and Measurements.Cristian Turetta (Member, IEEE) received the BS and ME degrees in computer science and engineering from the University of Verona, Italy, in 2017 and 2020, respectively.He is currently working toward the PhD degree with the Department of Computer Science, University of Verona, where he is a member of the IoT4care research group working on Ambient Assisted Living and Internet of Things.Philipp H. Kindt received the PhD degree in electrical engineering from the Technical University of Munich, in 2019.He is currently an assistant professor ("Juniorprofessor") of pervasive computing systems with the Chemnitz University of Technology.His research interests are wireless communication, mobile computing and the IoT.Fabio Chiarani received the master's degrees in computer engineering and science from the University of Verona, Italy, in 2021, where he is currently a research fellow.His main interests focus on edge computing and IoT.

TABLE II WBAN
DATA AGGREGATORS PROFILING USING ANDROID STUDIO 4.1.2its actual use in various medical and non medical application scenarios.

TABLE V QUESTIONNAIRE
RESULTS: WBAN EASINESS OF USE BY PROFESSIONAL STAFF.0 (NOT AT ALL TRUE), 1 (VERY LITTLE TRUE), 2 (SOMEHOW TRUE), AND 4 (VERY TRUE)