Reliability Study of Inertial Sensors LIS2DH12 Compared to ActiGraph GT9X: Based on Free Code

The study’s purpose was to assess the reliability of the LIS2DH12 in two different positions, using the commercial sensor Actigraph GT9X as a reference instrument. Five participants completed two gait tests on a treadmill. Firstly, both sensors were worn on the wrist and around the thigh. Each test consisted of a 1 min walk for participants to become accustomed to the treadmill, followed by a 2 min trial at ten pre-set speeds. Data from both sensors were collected in real-time. Intraclass correlation coefficient (ICC) was used to evaluate the equality of characteristics obtained by both sensors: maximum peaks, minimum peaks, and the mean of the complete signal (sequence of acceleration values along the time) by each axis and speed were extracted to evaluate the equality of characteristics obtained with LIS2DH12 compared to Actigraph. Intraclass correlation coefficient (ICC) was extracted, and a standard deviation of the mean was obtained from the data. Our results show that LIS2DH12 measurements present more reliability than Actigraph GT9X, ICC > 0.8 at three axes. This study concludes that LIS2DH12 is as reliable and accurate as Actigraph GT9X Link and, therefore, would be a suitable tool for future kinematic studies.


Introduction
Inertial Measurement Units (IMUs) are equipped with an accelerometer that measures linear accelerations and a gyroscope that measures the angular velocity of the device recorded in the three directions of space [1]. Furthermore, some of them also include a magnetometer (measure the direction or strength); an angular rate and gravity (MARG) sensor module for measuring 3 degrees of freedom orientations in real-time [2]. These systems are validated against 3D movement capture devices [3]. Its use is extended to the analysis of human movement [4]. These devices have been used in the health field to validate symptoms of patients who have Parkinson's disease [5], and the physical activity of patients in a wheelchair have been quantified [6] to calculate energetic waste [7]. Furthermore, sensors have been used as a rehabilitation instrument accompanied by other peripheral devices [8].
There is an extensive range of commercially available devices, but not all are validated and suitable for recording human motion [9]. The reliability of the obtained data is influenced by the sensor's accuracy, the components that enclose the sensor, the position of the sensor, and the data processing [10,11]. The reliability evaluation should be applied to protocols, which can be reproduced later [12,13]. In this regard, Actigraph GT3X (Pensacola, FL, USA) [14] is one of the most used widely used thanks to its demonstrated reliability and straightforward operation [15].
Actigraph (ActiGraph LLC., Pensacola, FL, USA) is one of the leading commercially available devices [15]. It has been used as a reference to validate other devices, such as activity monitors, to determine physical activity [16]. Likewise, activPAL was compared to measure children's sedentary behaviour aged 2-3 years [17]. Additionally, Actigraph was used relative to FitbitZip to measure steps made by patients suffering rheumatic polymyalgia [18]. In every case, results were derived from the pre-processed device's data and not from the raw data extracted by the sensor.
There are currently reliable, low-cost devices (below $50) and validated alternatives to record steps made and physical activity [19]. The LIS2DH12 (STMicroelectronics; Shanghai, China) chip is an ultralow consumption, a high-performance accelerometer that records in three axes of space [20] and is compatible with Arduino systems [21]. LIS2DH12 is a novel sensor that has not been used in previous studies. Validating the device will make it useful for specific future applications like kinematic analysis or activity tracker. The advantage of the device, once validated, is a low cost and low consumption sensor that would allow the free design of third-party applications, unlike commercial sensors. Its acceleration measurements have not been compared with other reference devices, such as Actigraph, to evaluate the reliability of its measurements.
Therefore, this study aimed to assess the reliability of the chipset LIS2DH12 relative to the internal accelerometer of Actigraph GT9X Link as an instrument to measure accelerations produced during human movements.

Materials and Methods
The present study is based on a reliability study of inertial sensor Lis2DH12 chipset ("STMicroelectronics") (equipped on a SensorID device), compared with the measurements given by the commercial device Actigraph GT9X Link ("ActiGraph Link|ActiGraph"). Actigraph GT9X Link is reliable to assess sedentary behavior and physical activity based on raw data or energy expenditure [22,23]. To obtained data, the selected movement was the gait. A protocol of increasing walking/running speeds, recorded on a treadmill, was used.

Equipment
The LIS2DH12 inertial sensor has a sampling frequency of 1 Hz to 5.3 kHz. The sensor measures the acceleration in three axes (X, Y, Z) with a values range of ±16 g. The sensor is assembled on a mainboard designed by SensorID ("Sensor ID-Proximity Wireless Technologies Made in Italy"). The device's size is a circumference with a radius of 4.5 cm and 1 cm thick. The software was designed by SensorID, with a preset sampling frequency of 30 Hz to record the data. The data were extracted directly in raw format. This software captures sensor data in m/s 2 and mg (gravitational unit value) units. The sensor signs the gravitational acceleration of Earth (9.8 m/s 2 ). The data captured by the sensor are sent to the computer in real-time by a 5.0 Bluetooth protocol.
Actigraph GT9X Link has a sampling frequency range of 30 Hz to 100 Hz with a range of ±16 g. The dimensions of the device are 3.5 × 3.5 × 1 cm. Actigraph is available to provide actionable data on a scale of 0 to 15,000 count/min. The sensor data are recorded in the internal memory and later transferred to the computer via a micro-USB. The data used, which Actigraph GT9X Link gives, are the raw data from accelerations measured during the movement. The movement chosen was the human gait.

Data Collection
The clocks of both sensors were synchronized with the computer's clock to ensure simultaneous recording. Both sensors were calibrated before starting to measure, placing both sensors on the same smooth surface. Two experimental setups/device locations were explored during the study. In one of them, both sensors (Actigraph GT9X Link and LIS2DH12) were placed simultaneously (both sensors overlapping) on the participant's right wrist. Actigraph GT9X Link was used with its wristwatch accessory, with LIS2DH12 positioned with a stretchable belt.
In the second set, both sensors were placed on the participant's thigh using a stretchable belt. This second set was carried out after the first one had finished evaluating validation at both positions. Both positions were chosen because the main objective was to collect data which could be compared. Therefore, the wrist and thigh are a good option, given that they have easy access and handling.
Five healthy adults participated in the reliability study. Two tests were carried out, each of 20 min in total; this sample size gives a large amount of data because it is a record of 200 min with a sampling frequency of 30 Hz, recording approximately 360,000 values. Actigraph GT9X Link and LIS2DH12 were placed on the right wrist and thigh, not simultaneously. The participant wore sportswear, adequate footwear, and short sleeves. Data were collected while walking and running at different speeds on a treadmill, with each wrist and thigh position evaluated separately. For each of the speeds, ten measurements were obtained with the two sensors together (five on the wrist and five on the thigh). This assumes a Confidence Level of 80% and a margin of error of 21%.
The predetermined speeds were: 1.4 km/h, 2.9 km/h, 4.3 km/h, 5 km/h, 6 km/h, 6.5 km/h, 7.0 km/h, 8.0 km/h, 9.0 km/h and 10.0 km/h. These speeds were representative a range of different subject types: subjects who were dependent, hospitalized, needing rehabilitation, discharged, regular patients and healthy subjects [24]. Participants started walking on the treadmill at a pre-set speed for one minute to adapt to rhythm, subsequently starting the recording of measured data for two minutes. Each speed for walking and running was measured separately for two minutes. Participants were asked to carry out natural movements.

Data Processing
The spatial reference system of sensor LIS2DH12 was adapted to the spatial reference system of Actigraph GT9X Link. If the spatial reference system of Actigraph GT9X Link is set as our reference system, the axes of LIS2DH12 coincide with Actigraph GT9X Link as showed in Figure 1: x-axis of LIS2DH12 is equal to z-axis of Actigraph GT9X Link, y-axis of LIS2DH12 coincides with the x-axis of Actigraph GT9X Link, and z-axis of LIS2DH12 is equivalent to y-axis of Actigraph GT9X Link (Figure 1). The orientation in repose was analyzed, and then both sensors were always put in the same position. The change of basis matrix (RL,A), which can be used to transform data from one reference frame to the other, is provided below:  Data processing was carried out with RStudio software version 1.2.5033, under R 3.6.2 (R Project, 2002). The codes generated for analysis can be seen in Appendix A.
One hundred files (five participants, ten speeds, and two positions to validate) in ".csv" format, belonging to Actigraph GT9X Link sensor, and another one hundred from LIS2DH12 were processed for analysis. One file was defective because it was recorded erroneously, meaning the file from the second subject at 1.4 km/h from Actigraph GT9X Link was rejected, along with its counterpart from LIS2DH12. Therefore, 198 files were analyzed in total.
Files were read with R and adapted so the formats of both sensors were the same. LIS2DH12 records the acceleration in thousandths of g-force (mg), and Actigraph GT9X Link uses g-force (g) units. Acceleration units were converted into multiples of g to enable comparison.
Two functions were designed to import data from different signed subjects to R (readSensorIdData() y readActigraphData(), Appendix A). Afterwards, 198 files were read to collect in "RData" format for subsequent use ( Figure 2). Data processing was carried out with RStudio software version 1.2.5033, under R 3.6.2 (R Project, 2002). The codes generated for analysis can be seen in Appendix A.
One hundred files (five participants, ten speeds, and two positions to validate) in ".csv" format, belonging to Actigraph GT9X Link sensor, and another one hundred from LIS2DH12 were processed for analysis. One file was defective because it was recorded erroneously, meaning the file from the second subject at 1.4 km/h from Actigraph GT9X Link was rejected, along with its counterpart from LIS2DH12. Therefore, 198 files were analyzed in total.
Files were read with R and adapted so the formats of both sensors were the same. LIS2DH12 records the acceleration in thousandths of g-force (mg), and Actigraph GT9X Link uses g-force (g) units. Acceleration units were converted into multiples of g to enable comparison.
Two functions were designed to import data from different signed subjects to R (readSensorIdData() y readActigraphData(), Appendix A). Afterwards, 198 files were read to collect in "RData" format for subsequent use ( Figure 2). Comparison tables were drafted based on the data collected in R. Both sensors were configured to have a sampling frequency of 30 Hz, with two minutes of gait test equivalent to 3600 samples, but there was a loss of around 50 random samples in data from LIS2DH12, due to the transmission of data by Bluetooth. Two recorded signals of both sensors are shown in Figure 2, where the gap between signals is not homogeneous throughout the entire signal, but first, they are shifted, then they are overlapped and shifted again. This fact occurs at all the times recorded. Therefore, comparison sample-by-sample was not possible, meaning that we had to compare both recorded sig- Comparison tables were drafted based on the data collected in R. Both sensors were configured to have a sampling frequency of 30 Hz, with two minutes of gait test equivalent to 3600 samples, but there was a loss of around 50 random samples in data from LIS2DH12, due to the transmission of data by Bluetooth. Two recorded signals of both sensors are shown in Figure 2, where the gap between signals is not homogeneous throughout the entire signal, but first, they are shifted, then they are overlapped and shifted again. This fact occurs at all the times recorded. Therefore, comparison sample-by-sample was not possible, meaning that we had to compare both recorded signals using the mean of the relevant features.
After the process, the features/measurements of interest extracted from the data were the mean of maximum peaks, mean of minimum peaks (valleys), and signal mean extracted from each axis and sensor.
A predefined function of R: findpeaks() [25] was used to extract the maximum and minimum peaks of the signal, straightaway we calculated, using the mean() function, the mean of these peaks and the mean of the signal. In total, eighteen columns were obtained to compare each one (nine from the LIS2DH12 sensor and 9 from Actigraph GT9X Link).

Statistical Analysis
A statistical analysis was carried out in RStudio software with version 1.2.5033, under R 3.6.2. The intraclass correlation coefficient (ICC) was calculated to determine the reliability of LIS2DH12 compared to Actigraph GT9X Link. A descriptive analysis (mean and standard deviation) was developed.
Variability is reflected by standard deviation, allowing quantification of their differences; if dataset s the standard deviation is a low value (relative to mean), the data are more similar. If it is equal to zero, the samples are identical.
ICC analysis allowed quantification of the variance between measurements of phenomena measured with different raters (in this case, two instruments, Actigraph GT9X Link and LIS2DH12). ICC values can fluctuate between 0 and 1, with 0 indicating that these measurements are not in agreement and 1 that these measurements are reliable. These values may be interpreted as excellent reliability if ICC ≥ 0.75, ICC between 0.4 and 0.74 indicates fair-to-high reliability, and ICC ≤ 0.39 is interpreted as poor reliability [26]. ICC was calculated with a level of significance of 0.05 and a confidence interval of 95%, a "two-way" model, because in this assay, each subject was measured by the same set of known raters, that is, Actigraph GT9X Link and LIS2DH12, considering subjects and rater's random effects [27]. Absolute agreement analysis was used; as the study concerns if different raters assign the same score to the same subject. This agreement had two options type: "single measurements" and "average measurements", depending on calculating the reliability by taking single measurements or whether calculating the average of the measurements from multiple raters [26,28].
The statistical analysis was applied to the features/measurements of interest: the mean of the maximum peaks, the mean of minimum peaks and the signal s mean, recorded in each of the three axes (18 in total). ICC was calculated by each measurement from both sensors, e.g., the value obtained from Actigraph GT9X Link as the mean of maximum peaks (measurement) of every subject at 1.4 km/h in x-axis was compared to its counterpart LIS2DH12 sensor to obtain ICC values.

Ethical Aspects
This study belongs to the European Union's Horizon 2020 research and innovation program under the Marie Sklodowska-Curie grant agreement No. 823871 (iGame), and it was approved by the Ethics Committee of the Malaga Provincial Research of the Andalusian Health Service. The study code was: RCT-iGAME. All participants accepted and signed the informed consent following the principles established in the Declaration of Helsinki.

Results
Five healthy adults participated in the reliability study, whose average and standard deviation of BMI (Body Mass Index) was 21.43 kg/m 2 ± 2.23 kg/m 2 , indicating healthy weights, and their ages oscillated between 22 and 33 years old.
Descriptive and statistical analysis was completed using ICC, "single measurements" and "average measurements" options, as reported before, to compare the features/ measurements of interest; that is, mean of maximum peaks, mean of minimum peaks and the mean of the complete signal from each axis and sensor. Table 1, for wrist position, and Table 2, for thigh position, are reported the ICC values obtained from comparing the data of all subjects for each measurement of interest along with their standard deviations and grouped by speed (km/h) and axis.  Concerning Table 1, wrist position, the average of ICC values, with "single measurements" and "average measurements" options, obtained for each feature/measurement (mean of maximum peaks, mean of minimum peaks and mean of complete signal) oscillated between 0.76 and 0.90. The mean of ICC, "single measurements" and "average measurements, is 0.793/0.863, this range indicates excellent reliability. The three best values of ICC, "single measurements" and "average measurements", were 0.999/0.999, corresponding to mean of maximum peaks of z-axis at 9 km/h on wrist position (Table 1); and 0.996/0.999, corresponding to the mean of z-axis at 9 km/h in wrist position (Table 1). In contrast, the three worst ICC values were 0.104/0.188, corresponding to the mean of x-axis at 10 km/h on wrist position, and 0.273/0.429, corresponding to the mean of minimum peaks of the y-axis at 1.4 km/h on wrist position (Table 1).
For the thigh position, Table 2, the ICC values oscillated between 0.78 and 0.92, and the mean of ICC, "single measurements" and "average measurements, was 0.834/0.895, indicative of excellent reliability. The best ICC values were 0.998/0.999, corresponding to the mean of minimum peaks of the z-axis at 8 km/h in the thigh position ( Table 2). The worst values for ICC were 0.144/0.251, corresponding to mean of minimum peaks of the y-axis at 1.4 km/h in the thigh position (Table 2). Therefore, the order of ICC obtained was 0.8, meaning excellent reliability [25]. Table 3 is a summary that synthesizes the information from Tables 1 and 2. In this table, concerning the wrist, it could be observed that the z-axis had the highest ICC values, 0.93 ("single measurements" option) and 0.96 ("average measurements" option), and also the lowest standard deviation, 0.33. Speed 9 km/h had the best ICC values of all speeds, 0.91 and 0.95. In contrast, at low speeds (1.4 and 2.9 km/h), there are poor ICC values, around 0.6, and at speeds between 4.3 km/h and 8 km/h, ICC values obtained are higher than 0.75, being good reliability. Table 3. Mean of ICC values for "single measurements" option, "average measurements" option, an average of the signal and standard deviation (SD), for each axis and velocity in each position, wrist and thigh. However, the ICC values were generally higher in the thigh position than in the wrist position. The axis with the best ICC values was axis Z, 0.87, and 0.93, "single measurements" option and "average measurements" option. Meanwhile, the speed with the greatest ICC values was 10 km/h, with ICC values of 0.90 and 0.94. The ICC values obtained were above 0.8 for all rows, but two speeds 1.4 and 2.9 km/h showed lower values of ICC in wrist. Therefore, the thigh position showed excellent reliability (Table 3).

Discussion
The different functions designed in R (Annex 1) allowed the unification of raw data from both sensors, Actigraph GT9X Link and LIS2DH12. This unification improved data flow. The subsequent processing of data (structure, magnitude, type of data, format, orientation of axes, etc.) allowed to establish a semiautomatic system to process all dataset together.
The most relevant features/measurements of the signal were maximum peaks, minimum peaks (valleys) and the mean of the complete signal. R functions extracted these features (findpeaks() and mean() [25]). Based on these features, a new database was generated with the values of each participant's, mentioned as features, grouped by speed (Annex 1, getInfobySubject() function). An ICC value between a measurement obtained from LIS2DH12 and one obtained from Actigraph GT9X Link, was calculated to quantify the convergence of data (Annex 1 getICCmatrix() function).
The results obtained in this study, attending to the ICC values ("single measurements" and "average measurements"), suggest that the reliability of LIS2DH12 is appropriate. Therefore, the LIS2DH12 sensor could be an alternative for use in kinematics studies, considering its measurements are very similar to the measurements obtained from the commercial sensor Actigraph GT9X Link and its cost is much lower.
Previous studies had analyzed the reliability of other inertial sensors [29]. This study compared an in-house sensor, VetSens, to Actigraph GT3X to evaluate animals' physical activity by recording acceleration from both sensors. These results show an ICC value above 0.90, meaning excellent reliability. These results are aligned with that obtained in the present study: ICC values oscillated between 0.76-0.90 for wrist position (Table 1) and 0.78-0.92 for thigh position ( Table 2). The mean of ICC "single measurements"/"average measurements", 0.793/ 0.863 for wrist position (Table 1), and 0.834/0.895 for thigh position ( Table 2). The thigh position had slightly better results. It could be because the fastening in the thigh was greater than in the wrist, where the LIS2DH12 sensor could have a little more movement. Additionally, higher speed had better results than lower speed. There are two possible explanations: the first could be that a rude movement is slightly noisier, which masks the differences between both signals. The second could be that run has more harmonic movement, so the signals are better recorded without noise.
Likewise, the results obtained by inertial sensors had also been compared with camera motion analysis [28]. An ICC value of approximately 0.90 for gait was observed. From the comparison of both sensors, the overall ICC obtained in this study was 0.85. Therefore, both results, 0.90 and 0.85, are not very distant, demonstrating that the chosen method is an excellent option to validate measurements in this type of motion. Moreover, thanks to this study [29], it is demonstrated that LIS2DH12 gives significantly valuable results.
The sample size can seem small, with five subjects. However, two tests were carried out, 40 min in total for each participant, and 200 min were recorded. Thus, upon completion of all tests, approximately 360.000 values were recorded. This sample size (5 subjects make the test twice) defines a confidence level of 80% and a margin error of 20%.
One of the main limitations is that although data from LIS2DH12 are recorded in ".csv" format, the generated tables are not well defined. Neither the reader of R nor Excel can separate the columns correctly. This means the files must be manually adjusted before processing the data, adapting the dataset, and then, with R, the files can be read by the read_xlsx() predefined function.
Another relevant aspect is the loss of information in data transmission by Bluetooth. Both sensors were configured to have a sampling frequency of 30 Hz, with two minutes of gait test being equivalent to 3600 samples. There was a loss of around 50 random samples in data from LIS2DH12. Therefore, comparison is not possible instant by instant, meaning comparison must be made using the mean of the relevant features. Nonetheless, as shown in Figure 2, LIS2DH12 can faithfully reproduce the data collected by Actigraph GT9X Link.
Accordingly, the present study can conclude that R and the generation of codes and functions allow a more desirable data flow, improving their processing and comparison.

Conclusions
According to the result reported in the previous sections, we can conclude that the LIS2DH12 sensor could be an alternative device in kinematic studies, considering that its reliability is excellent, attending to the mean of ICC (model "two-way" and definition of absolute agreement) obtained, which is above 0.8.
In addition, the LIS2DH12 has desired technical characteristics for a sensor: it allows the data to be collected and processed with open-source software, enriching the scientific community; it has a small size and low weight, providing a portable option; it gives reliable and verified acceleration results (compared to validated systems such as Actigraph GT9X Link), and its cost is more affordable than other commercial sensors, so LIS2DH12 could be a good option to use in acceleration studies where the conditions of the assays would be suitable to these characteristics.