Best Features Selection for the Implementation of a Postural Sway Classification Methodology on a Wearable Node

The possibility of identifying potential altered postural status in frail people, including patients with Parkinson Disease, represents an important clinical outcome in the management of frail elderly subjects, since this could lead to greater instability and, consequently, an increased risk of falling. Several solutions proposed in the literature for the monitoring of the postural behavior use infrastructure-dependent approaches or wearable devices, which do not allow to distinguish among different kinds of postural sways. In this article, a low-cost and effective wearable solution to classify four different classes of postural behaviors (Standing, Antero-Posterior, Medio-Lateral, and Unstable) is proposed. The solution exploits a sensor node, equipped by a triaxial accelerometer, and a dedicated algorithm implementing the classification task. Different quantities are proposed to assess performance of the proposed strategy, with particular regards to the system capability to correctly classify an unknown pattern, through the index Q%, and the reliability index, RI%. Results achieved across a wide dataset demonstrated the suitability of the methodology developed, with Q% =99.84% and around 70% of classifications, showing an RI% above 65%.


I. INTRODUCTION
T HE PRINCIPAL function of postural control mechanisms in humans is to avoid loss of balance when the center of mass is displaced by perturbation and, thus, to avoid falls. Age-related motor and functional decline influence both organization and optimization of postural response. This should not be uniquely interpreted as a simple biochemical adjustment but also a facilitating mechanism of any task performance which prioritizes the acquisition of crucial information needed for balance, primarily from visual and vestibular systems [1], [2].
Different resources are required for postural stability and orientation: biochemical constraints, cognitive and sensory-motor strategies, orientation in space, including the perception of verticality as well as dynamic control while walking or during positional transitions [1].
In experimental settings, postural stability is dynamically assessed across different directions of perturbations to check for the major directional axes of instability. Physiologically, instability tends to increase in response to backward body displacements since it is more difficult to exert dorsiflexion, than plantarflexion, torque about the ankle [3], [4]. While healthy subjects are usually able to adapt postural response to different biochemical conditions, elderly subjects, especially if suffering from by neurodegenerative disease affecting mobility such as Parkinson's disease (PD), could be not.
For each direction of postural sway, different sets of muscles are recruited to return the body to equilibrium: Medio-Lateral (ML) stability results primarily from hip and trunk control, whereas anterior-posterior (AP) stability results primarily from ankle control [3], [4]. Stability results larger in ML than in the AP direction when the feet are far apart [4], [5]. It has been shown that, differently from age-control subjects, which may maintain a consistent stability across different directions of translations for both narrow and wide stance, PD subjects had smaller than normal postural stability margins in all directions, especially for backward sway in both stance widths and for lateral sway in narrow stance width. Lateral postural stability seemed compromised in PD subjects by lack of trunk flexibility, while backward postural stability by lack of knee flexion [4].
In this scenario, identifying different ways and direction toward which an altered postural response can lead to greater instability and, therefore, an increased risk of falling represents an important clinical outcome in the management of the frail elderly subject, in order to achieve the goal of an active and healthy aging society [6].
In particular, studies should focus on identifying early instrumental markers of instability among frailty people. Different solutions can be used for these purposes, being classified in infrastructure-dependent devices, mainly represented by computerized posturography [7], [8] and low-cost vision systems [9], [10], as well as wearable devices [11].
Solutions used in contemporary laboratories and clinics exploit force platforms and/or vision systems [7], [8]. As an example, in [7], main features to assess postural stability are analyzed, including also the center-of-pressure (CoP) displacement, addressing also more common solutions, such as force plate and balance master. The use of a Kinect vision system to analyze postural sway and to localize the center of mass (CoM) is addressed in [9] and [10].
Although very accurate, the main limit of such infrastructure-dependent solutions is represented by the need for the patient to periodically move to dedicated laboratories in order to perform postural stability test, thus leading to a discontinuous monitoring of the patient. Conversely, the advantages of wearable-based solutions are the low cost of equipment and their portability, as well as the possibility to continuously assess subjects with the aim of promptly identifying risk of falling [11]. Most of the wearable systems use inertial sensors units [11] or instrumented insoles [12]. Although the latter could be a convenient way to monitor the CoP, such solutions are not always easy-to-use and to maintain.
Indeed, wearable devices using inertial sensors can be considered effective tools for the monitoring of postural sway [11]. In the following, a limited number of recent examples are reported, while well-elaborated systematic reviews are available in [11].
In [13] a device using inertial sensors for the assessment of postural sway is investigated. Force plate and rigid-body kinematics have been used as reference tools. The study presented in [14] aims at the use of a triaxial accelerometer to classify PD patients into motor subtypes. The use of head-mounted wearable inertial measurement units (IMUs) and pendant-mounted IMU for postural sway measurements are proposed in [15] and [16], respectively. Also, the use of smartphone-based solutions is discussed in [17]. The measurement of the angular position in eight different body-locations, based on the use of microcontroller-based sensing units, is presented in [18]. The exploitation of IMUbased devices to investigate the postural status in Alzheimer patients is discussed in [19]. The use of time-domain features extracted by signals provided by a three-axis accelerometer, to distinguish among stable and unstable postural behaviors, is investigated in [20]. A similar approach exploiting features obtained by applying the Discrete Wavelet Transform theory to accelerometer signals is presented in [21].
In the literature different examples are reported which adopt Machine Learning algorithms for postural analysis, such as the monitoring of pressure and sitting posture prediction [22], the classification of motor severity in PD patients [23], and Neuro-Fuzzy approaches for discriminating among stable and unstable postural behaviors [24]. The main drawback of ML strategies consists in difficulties related to their deployment in low-cost embedded systems, allowing for the real-time monitoring of the postural sway.
Summarizing the above notes, although interesting and well-performing solutions have been proposed in the state of the art, the following drawbacks emerge. 1) Although very accurate, infrastructure-based approaches can be used to perform periodic laboratory tests, thus leading to a discontinuous monitoring of the patient status. In this article, a threshold-based methodology for postural status classification is proposed. Novel outcomes of this work are listed in the following.
1) The developed algorithm will allow for classifying among four different postural status (namely: Standing, Antero-Posterior sway, ML sway, Unstable). This is one of the major novelties introduced by the proposed solution, as respect to previous works [20], [21], [24]. 2) Novel and dedicated performance indices have been proposed to assess the system capability to correctly classify among different classes of postural status, as well as to estimate the prediction reliability. 3) A novel methodology aimed to select the best features allowing for the extraction of a suitable amount and kind of information by stabilograms is proposed. The proposed approach allows for selecting best features among the wide set of quantities proposed in the literature, which is of major interest to reduce the computational power of real time processing in embedded sensor nodes. Moreover, this strategy can be generalized and hence applied also to handle different tasks, above postural sway monitoring.
The classification approach has been assessed against pattern randomization, demonstrating the robustness of the system as respect to the set of patterns adopted to fix parameters of the classification strategy.
Finally, the implementation of the algorithm in an embedded architecture is addressed and results of a further real-time test, apart from the experimental survey performed to acquire the entire dataset, are shown and commented.
Main advantages of the solution proposed reside in the possibility to classify among different classes of postural status and the ease-of-implementation in embedded systems, thus allowing for a continuous monitoring of users' status, also during their daily activities.

A. ADOPTED HARDWARE SOLUTION
The device used through this work is the SensorTile.box (STEVAL-MKSBOX1V1) by STMicroelectronics, which is a wireless multisensor development kit, particularly suitable for wearable sensing applications. The node is based on an STM32 platform, which exploits an ultralow-power ARM Cortex-M4 microcontroller with DSP. The device includes a firmware programming and debugging interface allowing for the development of firmware code, using the STM32 open development environment (STM32 ODE). The board integrates many sensors, among which is the LIS2DW12. The latter is a 16-bit and ultralow-power three-axis linear accelerometer, with output data rates from 1.6 to 1600 Hz and selectable full scales of ±2 g/±4 g/±8 g/±16 g. A battery charging interface, an ST bluetooth low-energy (BLE) module and an SD card are also included in the node.
As shown in Fig. 1, in order to mimic postural behaviors, without the need of involving end users during this preliminary development activity, a wood architecture, equipped with the sensor node, has been exploited. The structure has been used to reproduce a wide set of Standing (ST), AP and ML dynamics, as well as overall Unstable (UNST) behaviors, which is a difficult and time-consuming task to be achieved by real users. However, future efforts will be dedicated to perform experimental surveys by involving real users.
The node is positioned at a height, H 1 , from the floor corresponding to positioning the sensor in the upper chest. Distances H 1 and H 2 define distances between the sensor node and the two axes of rotation for the AP and ML dynamics, respectively.
Acceleration components along the three directions, A x,y,z , are used to calculate Displacements along Antero-Posterior (DAP) and ML (DML) directions, by using the following definitions: The stabilogram, representing the movement of the center of mass of the sensor node (and, hence, the target), is obtained by plotting the time evolution of DAP versus DML.

B. DATASET ADOPTED TO ASSESS THE POSTURAL SWAY CLASSIFICATION METHODOLOGY
A wide experimental survey has been accomplished with the aim of collecting data for different working cases and four main kinds of postural behaviors (ST, AP, ML, UNST). Patterns have been then randomized and divided in two parts: the first part used to fix the algorithm parameters (see Sections II-C and II-D), hereinafter called setting patterns, while the second part has been used to assess the system performances, hereinafter called test patterns (ratio: 60%/40%). The dataset composition is represented in Table 1, which shows data distribution among setting and test patterns for each kind of emulated postural behavior. Six different cases have been considered during the experimental survey, by varying H 1 and H 2 . Each pattern is tagged by a code (class, C i , i = 0..3): 0 for ST behavior, 1 for AP movements, 2 for ML movements, and 3 for UNST behaviors. The distribution of patterns for different six cases, among the four classes of postural behaviors, is shown in Fig. 2.

C. BEST FEATURES SELECTION STRATEGY
Several quantities (called features, JF), which can be extracted from the AP-ML stabilograms, have been considered useful to study the postural sway and to identify  potential unstable behaviors [25], [26]. The most widely used indicators, also considered through this work, are summarized in Table 2. Specifically, recent studies confirmed the suitability of these features also for investigating the effects of PD [27]. It must be observed that the estimation of this kind of features can be easily accomplished by microcontroller-based architecture. Before addressing the methodology for implementing the postural sway classification task, it is important to define which are "best features" better representing and characterizing postural dynamics of interest, such as (Standing, Antero-Posterior, ML, Unstable).
To such aim, the methodology sketched in Fig. 3 is proposed. Considering the dataset presented in Section II-A, for each pattern, DAP and DML are estimated by accelerometer data and preprocessed by a zero-order de-trend filter aimed at removing their mean value. Such processing will not affect the estimation of features adopted for the sake of postural sway classification. Successively, features in Table 2 are estimated.
In order to select best features, the following index has been defined: where N number of considered patterns; JF i,q value of q feature, for the i pattern; Jth q threshold related to q feature. For each feature, this index weights the normalized distance between the feature value and the corresponding  threshold and estimates the mean value of such quantity across the whole dataset. The result of this procedure is shown in Fig. 4.
Apart from D max AP,ML , features that are intrinsically strategic for the classification task, results obtained allow for affirming that CEA and RMS are the other two best features to be considered. This is in line with studies reported in [27].
The best features selection strategy has been implemented by a dedicated routine developed in MATLAB.
This being said, in the following sections D max AP , D max ML , CEA and RMS will be considered.

D. POSTURAL SWAY CLASSIFICATION ALGORITHM
The classification methodology is based on a combination of rules implementing the comparison between values of the best features and the corresponding thresholds, as sketched in Fig. 5. Data provided by the accelerometer are used to  (1) and (2). Best features defined in Section II-C are estimated by DAP and DML dynamics over time windows of 10 s, overlapped by 1 s. The windows overlap has been fixed by relying on a deep investigation aimed to find the right compromise among the need for a continuous monitoring and the computational demand of the classification algorithm (running on the sensor node). Moreover, this has been also confirmed by other studies available in [27].

obtain DAP and DML by
Once best features have been computed, these are used to feed the classification strategy. Rules implemented are illustrated in Fig. 5(b). Thresholds have been computed by applying the receiver operating characteristic (ROC) theory [28] to the setting dataset. The ROC curve theory provides a theoretical support to the classification problem, where each instance must be associated to a specific class. For every considered threshold value, aimed to discriminate between two populations of events, the true-positive rate (TPR) and the true-negative rate (TNR) can be estimated and plotted one against the other, thus defining the ROC curve. One common way to estimate the optimal threshold is given by the cross point between TPR and FPR curves.
The output of the classification task can assume one of the following status, allowing to associate the input pattern to one specific class: C 1 = 0 (Standing), C 2 = 1 (AP behavior), C 3 = 2 (ML behavior), C 4 = 3 (Unstable), and C 5 = 4 (Unknown: no class identified).
The algorithm processes each data time-window of 10 s. For each time-window, rules shown in Fig. 5(b) are applied to identify the postural class related to the considered data sequence. Since conditions are not overlapped, only one class can be assigned to each considered sequence.
Performances of the classification algorithm have been assessed by using two main quantities. The first one, Q%, considers the distance among the predicted and expected postural status are the expected and predicted classes associated to postural behaviors, respectively; N number of the considered patterns. This index is effective to assess the capability of the classification algorithm of correctly recognizing the class to which each pattern belongs. However, this quantity can be estimated only during the development phase, since C Exp must be known.
In order to assess the reliability of the postural status prediction provided by the algorithm per each input pattern, the quantity RI% has been used. This index weights the average normalized distance among values of each feature and corresponding thresholds where N F number of considered features; JF q states for the value of the q considered features. With the aim of performing an overall estimation of the RI% trend across the whole dataset, the following indices are also proposed: where mean(.) and Std(.) state for the average and standard deviation operators, respectively. The above indices provide the average and the standard deviation of RI% through the whole considered dataset.
The classification algorithm has been implemented in MATLAB for the sake of convenience. As discussed in Section IV, the same algorithm has been also deployed in the sensor node.

III. EXPERIMENTAL RESULTS
This section presents results obtained by using the proposed postural status classification methodology with the dataset illustrated in Section II-A. As already mentioned, by using the dedicated setup, the following dynamics have been reproduced: Standing, Antero-Posterior movements, ML movements, and Unstable behavior.

A. CLASSIFICATION RESULTS AND THEIR ASSESSMENT
Results obtained by feeding the algorithm with D max ML , D max AP , CEA, and RMS features, for the setting and test datasets, are reported in Fig. 6, showing (a) and (c) the comparison among the predicted and expected behaviors, and (b) and (d) the reliability index (RI%), for the setting and test datasets.
The assessment of the classification strategy, in terms of indices (4), (6), and (7), is presented in Table 3.
As it can be observed, the algorithm performs very well in distinguishing among the four different classes of postural behaviors, as demonstrated by high values of Q%. Also, values of the reliability-related indices demonstrate a suitable quality of the classification task, being the AP class the one showing the lower reliability. In general, it can be affirmed that 70% of classifications are characterized by an RI% above 65%. The obtained results show also few cases of misclassification, as expected due the wide dataset adopted, while no unknown classifications have been observed. The latter occurrences will be more evident in the real-time test presented in Section IV-A.
For the sake of completeness, the same study has been also performed by considering other feature combinations, as reported in Table 3. Values of the performance indices demonstrate the suitability of the choice, supported by results in Section II-C, of using Section II-D best features to feed the classification algorithm. The use of a different set of features clearly affects the system performances. Indeed, this result allows for affirming the reliability of the best feature selection strategy.

B. ROBUSTNESS AGAINST DATASET STRUCTURE
In order to assess the behavior of the classification algorithm as a function of the pattern organization, 100 trials have been accomplished by: 1) randomly mixing the whole dataset; 2) feeding the classification algorithm by the setting patterns; and 3) feeding the classification algorithm with the test patterns. The randomization procedure uses a random Gaussian generator. Results obtained in terms of indices (4), (6), and (7) are given in Fig. 7, both for the setting and test patterns. As it can be observed, performances of the classification tool both in terms of accuracy in correctly distinguishing different classes and reliability of predicted classes are almost independent on the dataset organization, thus confirming the robustness of the methodology adopted to build and split the dataset. This assessment has been accomplished by a dedicated MATLAB routine.

IV. DEPLOYMENT OF THE CLASSIFICATION METHODOLOGY ON THE SENSOR NODE
In order to enable the continuous monitoring of the postural behavior, the classification strategy discussed and assessed in previous sections has been deployed into the sensor node. To such aim, the following tools have been used: STM32CubeMX, STM32CubeIDE, and STM32 Cube Programmer by STMicroelectronics.
In particular, the code implemented in the embedded system allows for acquiring data from the accelerometer, building the 10-s data windows, shifted 1 s one each other, and calculating over each time sequence the DAP and DML dynamics and the selected features. Finally, rules sketched in Fig. 5 are used to associate the most suitable class to the pattern under investigation. Moreover, the tool computes the reliability index (5), while storing all estimated quantities in the SD card.

A. ASSESSMENT OF THE DEPLOYED ALGORITHM
The first task accomplished after the code deployment has been the assessment of features estimated by the code against the same features estimated by using the dedicated MATLAB routine. To such aim, experimental surveys have been accomplished miming different postural behaviors. For each case, time evolutions of A x,y,z have been stored in the SD card, along with features and other calculated quantities (such as classes associated to each considered pattern).
Raw acceleration data stored in the SD card have been then elaborated by a MATLAB tool, implementing the same code running in the sensor node to estimate features over the 10-s windows. An example of comparisons among features estimated by the MATLAB tool and the sensor node is shown in Fig. 8, demonstrating a suitable matching between the corresponding features.

B. REAL-TIME TEST
In this section, results obtained by performing a test miming in sequence different postural behaviors are presented. In particular, the following sequence of postural dynamics have been accomplished: 1) Standing; 2) Antero-Posterior; 3) Standing; 4) Antero-Posterior; 5) Unstable; 6) ML; and 7) Standing. Results, in terms of the identified classes of postural status, are shown in Fig. 9, highlighting that the postural behavior sequence has been correctly classified. As expected, when two different behaviors fall within the same analyzed time-window, the algorithm may identify an "unknown" pattern.
For the sake of completeness, the same classification algorithm has been implemented in MATLAB and fed by features estimated by the MATLAB routine introduced in Section IV-A. Results provided by the MATLAB classification routine are also shown in Fig. 9 and demonstrate a very good matching with results generated by the sensor node.

V. CONCLUSION
This article presented the development of a methodology for the classification of postural status, which is of particular interest for the monitoring of frail people, with particular regards to PD patients.
Results obtained demonstrated the suitability of the developed methodology, which has been tested by miming postural behaviors exploiting a dedicated platform. In particular, the capability of the system to correctly classify among different behaviors has been demonstrated by high values achieved for the Q% index (4). Also, the reliability of the classification algorithm, estimated through index (5), appears quite good (around 70% of classifications show an RI% above 65%). However, it should be observed that a number of patterns, especially belonging to AP dynamics, show performances below the average. The motivation for such behavior will be worth of investigation.
The robustness of the classification strategy against dataset building and splitting has been demonstrated, by 100 randomizations of the whole set of patterns.
The classification algorithm has been also implemented in the sensor node and a dedicated experimental survey has been performed with the aim to assess the correctness in the estimation of the considered set of features.
Future efforts will be dedicated to perform experimental surveys involving real users. Although this task will be definitively time consuming, the added value would be the refinement of the developed classification strategy. Moreover, from a technical point of view, the implementation of a data protocol exploiting the BLE embedded in the sensor node will be carried out, in order to provide a real-time feedback of predicted postural sway behaviors through mobile devices.