Static and Dynamic Accuracy of an Innovative Miniaturized Wearable Platform for Short Range Distance Measurements for Human Movement Applications

Magneto-inertial measurement units (MIMU) are a suitable solution to assess human motor performance both indoors and outdoors. However, relevant quantities such as step width and base of support, which play an important role in gait stability, cannot be directly measured using MIMU alone. To overcome this limitation, we developed a wearable platform specifically designed for human movement analysis applications, which integrates a MIMU and an Infrared Time-of-Flight proximity sensor (IR-ToF), allowing for the estimate of inter-object distance. We proposed a thorough testing protocol for evaluating the IR-ToF sensor performances under experimental conditions resembling those encountered during gait. In particular, we tested the sensor performance for different (i) target colors; (ii) sensor-target distances (up to 200 mm) and (iii) sensor-target angles of incidence (AoI) (up to 60∘). Both static and dynamic conditions were analyzed. A pendulum, simulating the oscillation of a human leg, was used to generate highly repeatable oscillations with a maximum angular velocity of 6 rad/s. Results showed that the IR-ToF proximity sensor was not sensitive to variations of both distance and target color (except for black). Conversely, a relationship between error magnitude and AoI values was found. For AoI equal to 0∘, the IR-ToF sensor performed equally well both in static and dynamic acquisitions with a distance mean absolute error <1.5 mm. Errors increased up to 3.6 mm (static) and 11.9 mm (dynamic) for AoI equal to ±30∘, and up to 7.8 mm (static) and 25.6 mm (dynamic) for AoI equal to ±60∘. In addition, the wearable platform was used during a preliminary experiment for the estimation of the inter-foot distance on a single healthy subject while walking. In conclusion, the combination of magneto-inertial unit and IR-ToF technology represents a valuable alternative solution in terms of accuracy, sampling frequency, dimension and power consumption, compared to existing technologies.


Introduction
Dynamic stability is essential to efficiently and safely perform motor tasks such as gait or to maintain the human body in a stable upright posture [1]. A common and simple strategy to increase stability consists of widening the base of support. Excessive variability of the step width dancing steps, jumping and kicking a ball) performed by a single subject. Unfortunately, none of the abovementioned studies, with the exception of [18], reported the errors associated with the distance estimated by the specific proximity sensor employed under static and dynamic conditions.
In this paper, we developed a platform, the D-MuSe (Distance-MultiSensing), integrating a state-of-the-art magnetic and inertial measurement unit (MIMU) with an IR-ToF proximity sensor. We proposed a thorough evaluation protocol for testing its performance in static conditions for different target colors and in both static and dynamic conditions, similar to those encountered in human movement, by varying the target distance and AoI. In addition, an example of the use of the D-MuSe platform for the estimation of the IFD during gait on a single healthy subject was given.

Hardware Description
The D-MuSe platform, which includes an MIMU and an IR-ToF proximity sensor was developed. The specific advanced design aims at providing a wireless low-power system with high processing capabilities and a small form factor. As shown in Figure 1, the platform is augmented with additional sensing units for a variety of potential applications.

Geomagnetic and Inertial Module
The D-MuSe platform integrates in a single chip a 9-axis magnetic and inertial measurement unit (LSM9DS1) [31]. The LSM9DS1 includes a 3D accelerometer (up to ±16 g), a 3D gyroscope (up to ±2000 • /s) and a 3D Magnetometer (up to ±16 Gauss) in a 3.5 × 3 mm 2 package. For this specific study, magneto-inertial data were sampled at 100 Hz and the full scales were set to ±4 g, ±500 • /s and ±4 Gauss for the accelerometer, gyroscope and magnetometer, respectively.

IR-ToF Proximity Sensor
The IR-ToF proximity sensor (VL6180X) [27] provides proximity estimates in the range of 0-600 mm. The distance is estimated by measuring the phase shift ϕ between the radiated s(t) and the reflected r(t) IR waves ( Figure 2): where R is a reflection coefficient, c is the speed of light (3 × 10 8 m/s) and f m is the modulation frequency of the radiated and reflected signals. Once ϕ is measured (e.g., phase comparator circuit), the distance d between the position of the IR emitter and the target can be calculated from Equation (2) as follows: The accuracy in static conditions in the range of 0-150 mm, reported in the VL6180X datasheet [27], is shown for different target reflectances in Figure 3. The Infrared Time-of-Flight proximity sensor (IR-ToF) provides the distance estimate from the target reflecting surface by measuring the phase shift ϕ between the emitted s(t) and the reflected r(t) signals.
For this specific study, the IR-ToF proximity sensor sampling rate was set to 50 Hz (maximum frequency allowed), and, since the maximum distance between feet during gait is generally less than 200 mm [3,5,32], the measurement range was set to 0-200 mm. To improve the IR-ToF accuracy, an ad hoc calibration between 0 and 200 mm was performed. The firmware of the platform was programmed to return a "0" value when no light reflection was observed.

Connectivity
The D-MuSe supports both wired and wireless communication: a micro-USB 2.0 full-speed interface is used for battery recharge, while a standard Bluetooth technology for short distance data communication is employed by using the BT33 [29] class 1.5 micro-sized (11.6 × 13.5 mm 2 ) Bluetooth V3.0 module provided by Amp'ed RF/STMicroelectronics (San Jose, CA, USA).

Environmental Sensors
Besides the MIMU, D-MuSe comes with additional sensing units, making it suitable for a wide range of applications: a temperature sensor which is integrated in the microcontroller with a typical accuracy of about ±1 • C and a high accuracy pressure sensor LPS25HB [33], which ensures a resolution of 0.01 hPa root mean square (RMS).

Memory
In addition to the internal microcontroller flash memory (512 kB) and SRAM (128 kB), a 16 MB flash-NOR non-volatile memory was used to store data for continuous recordings.

PCB Fabrication and Power Supply
A 4-layer PCB technology has been adopted to minimize the area occupancy and achieve a form factor of 25 × 25 mm 2 . The power can be supplied by either a wired connection or a battery. For this study, a 3.7 V 210 mAh lithium polymer battery is used ( Figure 4).

Accuracy of the Distance Estimation
We analyzed the following factors, which could potentially affect the accuracy associated with distance estimation: Colors of the target surface (red, green, blue, yellow, white and black); Relative velocity between the sensor and the target.
The influence of factor (i) was tested in static conditions only, factors (ii) and (iii) were tested both in static and dynamic conditions and factor (iv) was tested only in dynamic conditions. These factors were chosen to cover the range of possible configurations occurring during both normal and pathological human gait such as different shoe colors, different internal-external rotation foot angles, different values of the step width and different foot velocities [3,5,32,34,35].

Experimental Setup
The D-MuSe was attached to the end of a wooden pendulum (length 600 mm) simulating the oscillation of a human leg, while a stationary rectangular cuboid target, with dimensions similar to those of a shoe (180 × 70 × 40 mm 3 ), was positioned in front of the pendulum ( Figure 5). Let C be the intersection between the diagonals of the rectangular face facing the sensor, while the distances d between the IR-ToF proximity sensor and the target were set using a ruler (gold standard, 1 mm resolution).

Experimental Data Acquisition
The first part of the experiment consisted of a series of static acquisitions performed by the IR-ToF proximity sensor using six different target colors (red, green, blue, yellow, white and black) varying the distance in the range 0-200 mm with an increment of 20 mm ( Figure 6). Based on the results provided by the preliminary investigation on the influence of the color of the target, we decided to use the white color for the subsequent experimental acquisitions. In static acquisitions, the target was kept stationary in front of the IR-ToF proximity sensor, while during dynamic acquisitions, the pendulum was kept horizontal in the starting position and then released. For both static and dynamic acquisitions, the following experimental conditions were tested: To avoid a collision between the target and the pendulum, for AoI = ±30 • the minimum distance d was equal to 70 mm, whereas, for AoI = ±60 • , the minimum distance d was equal to 100 mm. A schematic representation of the experimental set-up and an example of the raw distance values measured by the IR-ToF proximity sensor for the different AoI values are reported in Figure 7. The distance d is measured in correspondence of the lowest point of the pendulum, which is the point with the maximum angular velocity (minimum potential energy and the maximum kinetic energy). The red dotted line represents the infrared ray emitted by the IR-ToF proximity sensor. d is the imposed distance using a ruler, while d IR−ToF k is the distance estimated by the Infrared Time-of-Flight proximity sensor (IR-ToF) when the gyroscope measured a positive/negative peak according to the direction of the pendulum oscillation, while d IR−ToF i and d IR−ToF f are the initial and final estimated distances, respectively. On the right, for each AoI value, an example of the distance values measured by the IR-ToF proximity sensor at d = 100 mm is reported. It should be noted that, in dynamic acquisitions, when the AoI differs from zero, the sensor-target distance d IR−ToF varies with time between d IR−ToF i and d IR−ToF f (Figure 7b,c,).

Data Analysis
Magneto-inertial data were acquired at 100 Hz, while the distance measurements were acquired at 50 Hz (maximum frequency allowed). To provide a continuous estimate of the distance at 100 Hz, the distance measurements were linearly interpolated and then re-sampled at 100 Hz. During static acquisitions, the sensor-target distance was determined by averaging 30 readings. For each dynamic acquisition, we extracted the set of distance values d IR−ToF k provided by the IR-ToF sensor, one for each k-th oscillation, while the angular velocity measured in correspondence of the lowest point of the pendulum varied between 1 and 6 rad/s (≈30 oscillations) (Figure 8). For each dynamic acquisition, defined by specific values of AoI and d, the following quantities were computed: where d IR−ToF k is the distance estimated by the IR-ToF proximity sensor when the gyroscope measured a peak, d is the true distance and N is the number of oscillations with angular velocity between 1 and 6 rad/s. Furthermore, for each AoI value, the average values of latter indices were computed over the different distances (E, SD, MAE and MAE % ).

Example of Application: Inter-Foot Distance Estimation during Gait
In this section, we present an example of the use of the D-MuSe platform for the analysis of human gait. In particular, IR-ToF technology can provide information about the instantaneous or average distance between selected points of the feet (IFD) when they face each other (during mid-swing and mid-stance phases). To this purpose, the D-MuSe platform was attached on a plastic rigid support and positioned on the right foot with the IR-ToF proximity sensor positioned orthogonal to the support and close to the first metatarsophalangeal joint. To avoid measurement uncertainties due to the irregular shape of the shoe, a rectangular target (200 × 100 mm 2 ) was attached on the medial side of the left foot. A cluster of three markers was placed on each foot to define a coordinate system (Figure 9).  The target and the D-MuSe geometries were acquired and expressed in the relevant coordinate systems from the positions of seven additional markers acquired during a static acquisition (one on the IR-ToF proximity sensor, three on the support and three on the target) (Figure 9b). These markers were removed before acquiring the dynamic trials. Marker positions were recorded using a 10-camera stereo-photogrammetric system (SP) (Vicon Motion Systems, Oxford, UK; 100 Hz). Dynamic experimental data were acquired on a healthy subject during a six-meter straight walk at comfortable speed (0.9 m/s) (three trial repetitions were performed). IFD marker-based reference values were calculated as the distance between the IR-ToF proximity sensor center and the intersection point between the normal to the IR-ToF proximity sensor plane, passing through the IR-ToF proximity sensor center, and the target plane placed on the left foot. For each gait cycle, mean values of the distances provided by IR-ToF and SP during swing and stance phases of the right foot were computed and the absolute differences between IR-ToF proximity sensor and SP mean distance values derived. The overall mean error with standard deviation (E ± SD), mean absolute error (MAE) and mean absolute percentage error (MAE % ) were computed averaging differences over gait cycles and trials.

Accuracy Evaluation of the Distance Estimation
The performance of the IR-ToF proximity sensor obtained for different colors of the target are reported in Table 1. When the black target was used, the IR-ToF proximity sensor could not measure distances larger than 140 mm.
The accuracy of the distance estimates for an AoI equal to 0 • and d = 40, 70, 100, 130, 160, 190 mm using a white rectangular cuboid target are reported, for both static and dynamic acquisitions, in Table 2. In static acquisitions, MAE % ranged from 0.8% for d = 160 mm to 2.5% for d = 40 mm, while, in dynamic acquisitions, the value of MAE % ranged from 0.8% for d = 160 mm to 2.3% for d = 40 mm. Table 1. Overall mean error with standard deviation (E (SD)), mean absolute error (MAE) and mean absolute percentage error (MAE % ) of the distance for the six target colors.   Table 3. In static acquisitions, E (SD) ranged from 0.2 mm (1.3 mm) for AoI = 0 • to −7.8 mm (1.7 mm) for AoI = −60 • . In dynamic acquisitions, E (SD) ranged from 0.5 mm (1.4 mm) for AoI = 0 • and −9.9 mm (26.9 mm) for AoI = −60 • . In static acquisitions the MAE % values varied from 1.4% for AoI = 0 • to 5.0% for AoI = −60 • , whereas, in dynamic acquisitions, they varied from 1.5% for AoI = 0 • to 19.2% for AoI = −60 • . Table 3. Overall mean error with standard deviation (E (SD)), mean absolute error (MAE) and mean absolute percentage error (MAE % ) of the distance for the five conditions using a white target. In addition, for each AoI value, the relationship between the absolute values of the errors e and the angular velocity values during all dynamic acquisitions was investigated by performing a first order polynomial regression ( Figure 10).

Feasibility of the Inter-Foot Distance Estimation during Gait
Indicative results from IFD estimation during gait on a single healthy subject are reported in Table 4. Table 4. Average of the inter-foot distance values with standard deviation (IFD (SD)), overall error with standard deviation (E (SD)), mean absolute error (MAE) and mean absolute percentage error (MAE % ) during gait.

Discussion
In the present study, we described and tested a wearable platform (D-MuSe), specifically designed for human gait analysis applications, which integrates a MIMU module with an IR-ToF proximity sensor, capable of providing inter-object distance measurements. Thanks to the integration of a millimeter-resolution proximity sensor, D-MuSe may increase the potentiality of traditional magneto-inertial units [9,12] for stability analysis during static and dynamic motor tasks during daily life activities. Since the typical range performances of the IR-ToF sensor (VL6180X), reported in the specifications [27], only refer to static conditions and for an AoI equal to zero, the applicability of this technology for human movement analysis applications required further investigations. The present study aimed at filling this gap by performing a thorough testing of the IR-ToF proximity sensor under experimental conditions resembling those encountered when analyzing the feet motion during gait.
A preliminary target color test showed that the IR-ToF technology is not sensitive to the variations of target color except when black is used. In fact, the MAE varied between 1.3 and 2.1 mm among all target colors in the range 20-200 mm (except for black). With a black target, the IR-ToF proximity sensor could only measure distances up to 140 mm and the accuracy of the distance estimation was lower (MAE = 4.1 mm). This finding was in accordance with the study of Lachat et al. [36] performed on a Kinect v2 sensor (Microsoft, Redmond, WA, USA) for close range 3D modelling and it revealed that caution should be paid when dark shoes are used. However, if strictly necessary, errors might be reduced by performing specific black-target calibration of the IR-ToF proximity sensor and by adjusting the measurement range for larger distances (up to 600 mm).
The device performance was tested both in static and dynamic conditions at distances in the range of 40-190 mm and sensor-target orientations between 0 • and ±60 • . The latter values were chosen to include values of step width and foot progression angles, similar to those observable during normal and pathological gait [13]. In general, for AoI equal to 0 • , the IR-ToF proximity sensor performed equally well both in static and dynamic acquisitions among all distances, while errors increased as the AoI increased. During static acquisitions, MAE values varied between 1.4 and 7.8 mm when increasing the AoI up to ±60 • . The latter trend is likely to occur because the incident rays emitted by the IR illumination cone, striking the non-orthogonal target surface, are reflected with an angle of incidence equal to the target orientation, and this would modify the phase shift once detected by the view cone. In the dynamic acquisitions, MAE values varied between 1.5 mm (AoI = 0 • ) to 25.6 mm (AoI = −60 • ). The larger errors, observed during the dynamic acquisitions compare to the static acquisitions, may be related to the unavoidable uncertainty associated to the correct identification of the instant of time during which the IR-ToF proximity sensor is in front of the target (imposed known distance) ( Figure 5). In fact, when the AoI is equal to 0 • (pendulum oscillating parallel to the target surface), the sensor-target distance is constant ( Figure 7a); conversely, when AoI is different from 0 • , the sensor-target distance changes with time (Figure 7b,c). Since the gyroscope ODR is 100 Hz, the time difference between two consecutive samples is 10 ms. This implies that the maximum error in the identification of the instant of time, which maximizes the angular velocity, is 5 ms. By performing simple geometrical calculation, given AoI = ±60 • , a length of the pendulum l = 600 mm and ω = 6 rad/s, a time shift of 5 ms causes an error in the estimated distance equal to ±31 mm. This hypothesis was preliminarily confirmed by the experimental results reported in Figure 10, which showed a weak but positive correlation between the error magnitude and the angular velocity for AoI different from zero.
As we mentioned, the large majority of the studies using inertial and distance data has not quantified the level of accuracy of the distance estimates in static and dynamic conditions. A preliminary evaluation of an IR-LI sensor (GP2Y0A41SK0F, Sharp Corporation, Osaka, Japan) performance can be found in Trojaniello et al. [18]. When comparing the errors found in static conditions in the present study with those reported in Trojaniello et al., an error reduction from 5.5 mm (4%) to 1.4 mm (1.4%) was observed (AoI = 0 • ). Similarly, in dynamic conditions (pendulum versus leg swinging), errors were reduced from 2.7 mm (5%) to 1.5 mm (1.5%).
The small errors in the IFD estimation ( ∼ =5 mm), found in the preliminary experiment during gait, confirmed the potential of the D-MuSe platform for gait analysis applications. However, given the limitations found in the pendulum experiments (worsening of the performance for AoI values larger than 30 • , high pendulum angular velocity and black target color), further investigations on normal and pathological gait are necessary. In particular, future studies should pay attention to the effects of different gait speeds, gait patterns, excessive foot progression angles and different types of shoes.

Conclusions
The D-MuSe platform, presented and tested in this work, is based on the combination of a wearable MIMU connected to an IR-ToF proximity sensor. This system may be highly valuable for the measurement of short range distances. The main aim of this paper was the validation of the IR-ToF proximity sensor in static and dynamic conditions similar to those encountered during various human movements. The results showed that the IR-ToF proximity sensor is not sensitive either to variations in the distance or in the target color (except for black), but it is sensitive to variations of the angle of incidence. D-MuSe allowed for estimating distances up to 200 mm with a satisfactory accuracy for an AoI up to ±30 • in both static (MAE % = 2.5%) and in dynamic conditions (MAE % up to 10.2%). We demonstrated that for AoI equal to ±60 • (i.e., subjects affected by bone deformities or excessive external feet rotations), the quality of the distance estimation substantially decreases with an MAE % up to 5% and 19.2% in static and dynamic conditions, respectively. Despite the very preliminary stage of the example of application, D-MuSe showed promising results for measuring the IFD during gait (MAE = 5.0). In the future, the application of the present methodology on a larger number of human subjects and the development of new algorithms, fusing IR-ToF distance estimates and magneto-inertial data (accelerations, angular velocities and local magnetic field intensity), will be assessed in both static (e.g., balance tests) and dynamic motor tasks (e.g., gait analysis).

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: