Using smartphone accelerometer data to obtain scientific mechanical-biological descriptors of resistance exercise training

Background Single repetition, contraction-phase specific and total time-under-tension (TUT) are crucial mechano-biological descriptors associated with distinct morphological, molecular and metabolic muscular adaptations in response to exercise, rehabilitation and/or fighting sarcopenia. However, to date, no simple, reliable and valid method has been developed to measure these descriptors. Objective In this study we aimed to test whether accelerometer data obtained from a standard smartphone placed on the weight stack can be used to extract single repetition, contraction-phase specific and total TUT. Methods Twenty-two participants performed two sets of ten repetitions of their 60% one repetition maximum with a self-paced velocity on nine commonly used resistance exercise machines. Two identical smartphones were attached on the resistance exercise weight stacks and recorded all user-exerted accelerations. An algorithm extracted the number of repetitions, single repetition, contraction-phase specific and total TUT. All exercises were video-recorded. The TUT determined from the algorithmically-derived mechano-biological descriptors was compared with the video recordings that served as the gold standard. The agreement between the methods was examined using Limits of Agreement (LoA). The association was calculated using the Pearson correlation coefficients and interrater reliability was determined using the intraclass correlation coefficient (ICC 2.1). Results The error rate of the algorithmic detection of single repetitions derived from two smartphones accelerometers was 0.16%. Comparing algorithmically-derived, contraction-phase specific TUT against video, showed a high degree of correlation (r>0.93) for all exercise machines. Agreement between the two methods was high on all exercise machines as follows: LoA ranged from -0.3 to 0.3 seconds for single repetition TUT (0.1% of mean TUT), from -0.6 to 0.3 seconds for concentric contraction TUT (7.1% of mean TUT), from -0.3 to 0.5 seconds for eccentric contraction TUT (4.1% of mean TUT) and from -1.9 to 1.1 seconds for total TUT (0.5% of mean TUT). Interrater reliability for single repetition, contraction-phase specific TUT was high (ICC > 0.99). Conclusion Data from smartphone accelerometer derived resistance exercise can be used to validly and reliably extract crucial mechano-biological descriptors. Moreover, the presented multi-analytical algorithmic approach enables researchers and clinicians to reliably and validly report missing mechano-biological descriptors.


Introduction
Skeletal muscle is one of the most important tissues of the human body. It comprises up to 40% of the body mass [1] and adapts to stimuli such as contractile activity, substrate supply, environmental factors, loading conditions and contributes to mechanical and metabolic functions [2].
Mechanically, its main function is to convert chemical into mechanical energy that can be used for force production thus enabling locomotion. Metabolically, skeletal muscle is a sink for substrates such as amino acids, carbohydrates, fatty acids, minerals and inorganic salts and it contributes to the maintenance of the basal energy metabolism. In times of starvation, it is able to maintain key tissue protein mass and plasma glucose levels [1] relatively constant, provided that skeletal muscle mass is sufficient. Therefore, skeletal muscle mass regulates metabolic homeostasis and contributes substantially to survival [3,4].
Muscle mass is lost during ageing due to age-related sarcopenia. This process is characterized by a progressive and generalized loss of skeletal muscle mass and strength. Overall, this loss negatively affects muscle strength, metabolic rate, aerobic capacity and thus, a person's functional capacity [5]. Moreover, the results of these processes associated with sarcopenia are related to increased risk of adverse outcomes such as physical disability, poor quality of life and ultimately death [5][6][7]. After reaching a peak in adult years, skeletal muscle mass gradually begins to decline at approximately age 45 [8][9][10]. The results of several longitudinal studies suggest that muscle mass declines by approximately 6% per decade after mid-life [11]. It is estimated that an individual loses 30% of individual peak muscle mass by the age of 80 [8]. Given that skeletal muscle mass accounts for up to 40% of an individual total body mass and 50-75% of all body proteins [1], the progressive loss of muscle mass has a fundamental impact on health and quality of life in the elderly population. The close link between skeletal muscle mass and bone mineral density leads to bone loss when skeletal muscle mass deteriorates [12]. Osteoporosis, the loss of bone mass [13], together with sarcopenia represent major clinical problems. The impairment of locomotory functions leads to compromised balance and increases the risk of falls promoting osteoporotic fractures [14]. Hence, low skeletal muscle mass is a driver of public medical costs because hospitalization within this cohort has a high prevalence [15]. It was estimated that healthcare costs linked to sarcopenia amounted up to 18.5 billion USD in the USA in the year 2000 [16].
It is well established that resistance exercise provides a potent anabolic stimulus to increase muscle mass [17,18] in men and women of all ages [19]. Therefore, as it combats and/or reverses sarcopenia, restores and recharges metabolism, improves adipose tissue oxidation, increases bone mineral density and prevents type 2 diabetes, resistance exercise is considered medicine [20].
However, despite receiving significant scientific attention, effective and/or efficient manipulation of resistance exercise mechano-biological descriptors inducing hypertrophy and/or strength remains unclear to date [21][22][23][24][25]. Although, extensively reviewed elsewhere [26], relevant mechano-biological descriptors (e.g. fractional and/or temporal distribution of contraction phases) have, for the most part, been neglected, until now. We recognize that impracticability of recording these descriptors may have contributed to this disparity.
Mobile technologies (e.g. smartphones, sensors, etc.) offer new possibilities for reliable, cheap and easy-to-use data acquisition that may help to optimize the outcome of resistance training efforts. Smartphones are encountered ubiquitously and are powerful portable computers, containing a plethora of accurate sensors that are already embedded in a versatile software environment. As such, smartphones can capture data from different sensors (e.g. accelerometers, gyroscope, etc.) and analyze them in real-time, while providing direct feedback and store data for further analysis. Compared to self-reports, sensor-captured data provide more accurate summaries of both cardiorespiratory and resistance exercise [27]. The smartphone's built-in inertial sensors (i.e. accelerometers) have proved to supply valid and reliable data during static [28] and dynamic applications [29,30]. Thus, smartphone sensors may enable high spatiotemporal resolution mapping of resistance exercise derived data.
This study aimed to examine whether smartphones can be used to I) collect real-world dynamic resistance exercise data, and II) from there derive valid and reliable contraction-specific mechano-biological descriptors (i.e. the temporal distribution of contraction phases). We hypothesized that accelerometer data of real-world dynamic resistance exercises, recorded by a smartphone placed on the weight stack, can be used to algorithmically extract contraction-specific mechano-biological descriptors.

Ethics statement
The study has been approved by the ethics committee of Swiss Federal Institute of Technology Zurich (ETH Zurich, Zurich, Switzerland) and conducted in accordance with the Declaration of Helsinki.
All participants received oral and written information about all procedures of the study and signed a written informed consent.

Design
The study investigated whether mechano-biological descriptors, i.e. the temporal distribution of contraction modes, number of repetitions and total time-under-tension (TUT) could be extracted from accelerometer derived real-world dynamic resistance exercise data on different resistance exercise machines. Nine resistance exercise machines were selected at the gym located at ETH Zurich. The selected machines comprised the most often chosen exercises in a whole-body workout and were as follows: Adductor, Abductor, Chest Press, Leg Curl, Leg Extension, Leg Press, Lower Back, Total Abdominal and Vertical Traction (Technogym, Cesana, Italy). Video recordings, which are considered the gold standard, were made for all exercises.

Participants
Twenty-two healthy volunteers between the ages of 19 and 70 years were recruited via academic mailing lists, flyers and word-to-mouth. All participants completed a routine health questionnaire before giving written informed consent to participate in the study. In the case of one of the volunteers who exhibited a potential health-related issue, the consent of a physician was obtained.
Two 3D-printed containers served as smartphone holders as shown in Fig 1. The holders were firmly attached to the weight stack using four strong neodym magnets (Webcraft AG, Uster, Switzerland). The magnets had a single adhesive force of 37.8 N. Per smartphone holder the four magnets exerted a force of totalling 151 N.
During the exercises, the magnet-equipped smartphone holders were attached to the weight stacks of the resistance exercise machines.

Exercises
Before starting with the measurements, participants were shown all nine exercise machines. Correct settings and range of motion were determined according to participants individual anatomy. The participants were familiarized with the motor tasks to be performed on all of the resistance exercise machines. Next, the participants underwent a five minutes warm-up on a spinning bike (Schwinn, Vancouver, USA).
After the warm-up, the one repetition maximum (1-RM) was determined submaximally. Briefly, participants were asked to choose a resistance level they thought they could lift ten times maximally. Before starting the 1-RM assessment, participants were instructed to lift over the full range of motion. Only repetitions fulfilling this criterion were counted. If the chosen resistance that was lifted was more than four but less than ten times, 1-RM was extrapolated, using the formula described in Mayhew et al. [31]. If more than ten repetitions were achieved, the exercise was repeated with 20% increase of resistance, following a two minutes recovery break. This was repeated until the number of repetitions was in the defined range. After the 1-RM determination, participants performed two sets of ten repetitions with 60% of their 1-RM on all nine resistance exercise machines with a two minutes break in between sets and exercises. To ensure a real-world approach, the velocity of contractions were user-determined.
All exercises were recorded with a 62 mm lens Sony HDR-CX900E (Sony, Tokio, Japan) on a tripod using a resolution of 1920 x1080 pixels at 50 frames per second. Hence, the sampling frequency between smartphone accelerometer derived measurements and video recordings were different (400 Hz vs 50 Hz). However, we do not consider this discrepancy to be a limitation, because method-comparison studies with handheld devices versus machines, e.g. in dynamometry, will never be able to achieve synchronization nor sampling frequency equality [32].

Rating
Video recordings. The free software Kinovea V0.8.27 (www.kinovea.org) was used for reviewing and rating the video recordings. Kinovea is a video player that is generally used for

PLOS ONE
Using smartphone data to obtain scientific descriptors of resistance exercise training sports analysis. It allows frame-by-frame playback and includes a stopwatch function, which allows for precise annotation of specific time-critical events such as contraction-phases.
Video recordings were rated by the two study investigators, who screened all recordings independently, frame-by-frame. A 2.5-fold magnification of the weight stack within Kinovea was used to determine contraction phases. The starting point of a concentric contraction was determined as the last frame before the weight stack movement was visually detected. The end of the concentric phase was defined as the first frame, whereby no additional increase of the weight stack could be visually recognized. This frame, due to the dynamic nature of the exercise, was then selected as the starting point of the eccentric phase. The endpoint of the eccentric phase was set to the last frame before the opposite weight stack movement was noticeable. All ten repetitions (20 contraction phases) were annotated in milliseconds in Kinovea as depicted in Fig 2. Smartphone accelerometer derived data. Smartphone accelerometer derived data were analyzed using Matlab R2018a (The Mathworks, Nattick, USA). An algorithm was written with the specific aim to detect the number of repetitions, contraction-specific phases TUT and total TUT (see description of the algorithm in Supporting Information) generically. Briefly, the vector length was used, and data were pre-processed by applying a Hampel filter to remove outliers [33]. Non-unique timestamps were removed, and the data were subjected to interpolation to achieve an equidistant time series. The gravitational offset was subtracted. Repetition counting was performed by the single integration of the time series. The resulting drift was compensated by a polynomial fit. A moving average filter ensured curve smoothness. Thresholds for minimum inter-repetition distance and prominence were defined for peak detection on the integrated time series. Contraction-specific TUT was determined using the velocity curve zero-crossings. The following numbers of variables were extracted from the video recordings and accelerometer data: (I) the number of single repetitions, (II) contraction-specific phases TUT, (III) temporal length of single repetitions as the sum of the concentric and eccentric phase TUT and (IV) the total TUT, which is defined as the sum of all repetitions TUT (10) during a set [26].

Data and statistical analyses
Validity. The analysis aimed to determine whether crucial mechano-biological resistance exercise descriptors including the number of single repetitions, contraction-specific phases TUT and the total TUT can be identified reliably from smartphone accelerometer data. Both raters examined video recordings independently and in a randomized order. For the method comparison, the mean of the video recording results and the mean of the algorithmic detection of the two smartphones derived accelerometer data were calculated.
Bland-Altman plots were used to compare the two methods visually. Systematic bias is depicted by the mean difference between the two methods. To examine the linear association between the methods, Pearson correlation coefficients were calculated. Limits of agreement (LoA) were used to determine the level of agreement between methods [34]. The LoA for all contraction phases was calculated as the mean difference between methods, whereby 2.5% or 97.5% denoted the lower and upper limits, respectively [35]. The normalized error was calculated as the division of the contraction-specific mean of the differences between the two methods and the contraction-specific TUT of the algorithmic rating [34].
Methodological outlier removal was performed as described for exploratory studies in [36]. To summarize, the interquartile range (IQR) of the mean difference of the two methods was calculated per contraction-specific phase for every resistance exercise machine. Data greater than 1.5 or smaller than -1.5 times the IQR were marked and excluded, as suggested by Sachs and Hedderich [36]. Visual assessment of heteroscedasticity was performed without recognizing trends towards heteroscedasticity.
Scoring reliability of the two raters. Interrater reliability and agreement were examined between the two raters who rated all 18 sets, consisting of ten repetitions each, on nine resistance exercises machines of 22 participants. The raters annotated all TUT of all contractionspecific phases. Interrater reliability was calculated using a two-way random-effects model (2.1), single measures, absolute agreement and ICC.

Results
The algorithmic detection of single repetitions derived from the two smartphones accelerometers yielded high precision, recall and accuracy. Mean precision was 0.9972 ± 0.0000 (mean ± SD) for both smartphones. The average accuracy, calculated by the F-Score, for all the exercise machines, was 0.9948 ± 0.0004 (mean ± SD), which equals an error rate of 0.16%.
Comparing video recordings to algorithmically-derived, contraction-phase specific TUT, showed a high degree of correlation (r > 0.93) for all exercise machines (Table 1). Additionally, the ICC for the interrater reliability was above 0.99 with 95% CI [0.99, 1.00] for all contraction-phase specific TUT. Notably, concentric contraction-specific TUT (median = -0.09 s) was hereby systematically overestimated while eccentric contraction-specific TUT (median = 0.08 s) was systematically underestimated by the algorithm (Z = -55.49, p < 2.2− 16 ). Table 2 shows agreement between concentric, eccentric, single repetition and total time-under-tension derived from algorithmic accelerometer data and video recordings. In Figs 3-11 Bland-Altman plots visualize the systematic bias as the mean difference between the methods whereas Fig 12  depicts the normalized errors of contraction-specific phases for all resistance exercise machines. Additionally, single contraction-specific phases were compared using a Mann Withney U test between young and old participants on all the exercise machines (Table 3).

PLOS ONE
Using smartphone data to obtain scientific descriptors of resistance exercise training

Discussion
In this study, we show that mechano-biological descriptors such as single repetitions, the temporal distribution of contraction-specific phases and total time-under-tension can be reliably and validly extracted from smartphone accelerometer-derived data. Evidence for this finding is that the error for single repetition detection is 0.16% when compared to the associated video recordings that represented the gold standard. A multi-analytical, algorithmic approach achieves the reported error for single repetition detection of 0.16%. The mean temporal error of single repetitions, when compared to the gold standard, is 0.12%. Theoretically, three different domains could be used for detecting single repetitions from the accelerometer data. These domains are the acceleration, the velocity and the displacement domain. We noticed, that the signal-to-noise ratio, even when algorithmically preprocessing the accelerometer data, was not sufficient to generically detect single repetitions over a wide range of user-exerted accelerations. Using displacement as the single repetition extracting domain was not an option, because double integration amplifies any offsets, non-linearities, and noise. Therefore, the velocity domain was chosen to extract single repetitions. Accordingly, after preprocessing, accelerometer data was integrated (Eq 1). Moreover, the mean differences for concentric contractions TUT on nine different resistance exercise machines ranged from -0.15 to -0.07 s. Rathleff et al. [37] found the mean difference between stretch-sensor data and video recordings for concentric contractions TUT to be 0.09 s with 95% CI [0.06 s, 0.11 s]. Hence, the findings of Rathleff et al. [37] corresponded with our results.
Due to the fact that participants were allowed to choose their individual, contraction-specific resistance exercise velocity, concentric contractions TUT were significantly lower (1.30 ± 0.40 s, mean ± SD) than eccentric contractions TUT (2.24 ± 0.84 s, mean ± SD) in our study (Z = -50739, p < 2.2 −16 ). The systematic lower concentric contractions TUT increased the normalized error, while increasing TUT (e.g. as seen for eccentric contractions TUT, single repetitions TUT or total TUT) decreased the normalized error, as also reported in Rathleff et al. [37].
We detected a systematic bias where concentric contractions TUT were overestimated by the algorithmic detection, while eccentric contractions TUT were slightly underestimated. This can be explained, in part, by the interpolation and drift-compensating polynomial fit used in the algorithm and/or the rating method of the video recordings. Additionally, timemapping contraction-specific phases, as suggested in the methods, led to an overestimation of eccentric contractions TUT of the video recordings. Therefore, it is plausible that the systematic underestimation of the eccentric contraction TUT by the algorithm is caused by the slight overestimation of the eccentric contractions TUT of the video recordings rating. We are well aware of the fact that participants could potentially briefly rest at reversal points of contractions resulting in short isometric phases. Isometric contractions, no shortening or lengthening of muscle fibers, result in zero momentum, thus posing analytical difficulties when analyzing such phases algorithmically. Rathleff et al. [37], in Fig 4, described a quasi-isometric phase after a concentric contraction which shows a negative slope and could therefore, by a strict definition of muscle actions [38], be assigned to the eccentric contraction phase. Thus, we decided that a concentric contraction phase is followed by an immediate eccentric contraction phase, as described in the methods. However, we are convinced that this slight algorithmic underestimation of the eccentric phase TUT is not of clinical relevance.
We know that using the weight stack of resistance exercise machines as a surrogate for skeletal muscle contraction-specific phases does not necessarily coincide with contraction-specific phases of the targeted muscle fibers. A previous study dealing with high frame rate ultrasound, revealed that the onset of actual sarcomeric contraction of muscle fibers starts before the onset of force generation [39]. In young and healthy controls (n = 13, age range: 6-24 years), the force transmission time delay was measured with 0.008 ± 0.002 s [39]. Additionally, our resistance exercise machines, traditionally used cable pulls for force transmission. Hence, material properties of cable pulls (e.g. sloppiness of mounting, amount of play, etc.) could introduce additional temporal delays. Although temporal mapping of resistance exercise weight stack movement does not precisely reflect skeletal muscle contraction-specific phases, we have determined that these small temporal differences are not of clinical relevance.
Finally, TUT reflects the summation of single repetitions. Subsequently, the normalized error of the total TUT was 0.46%. Pernek et al. [40] found a temporal error of exercise duration of about 11%. Because different algorithmic approaches were used, dynamic-time-warping (calibration repetitions mandatory) [41] vs. a multi-analytical approach, a direct methodological comparison is difficult. Nonetheless, a multi-analytical algorithmic approach yielded a higher level of accuracy for measuring the total TUT on machine-based resistance exercises. Moreover, the time effort for end users is minimized because no calibration repetitions are necessary.
Comparing contraction-phase specific TUT between young and old participants revealed that young participants seemed to have a systematic, statistically significant lower median contraction-phase specific TUT when looking at the contraction phases that revealed a significant difference. An exception was found when looking at the adductor machine where old participants had a lower TUT during the eccentric phase. Hence, one-quarter of the measurements showed significant differences of contraction-specific TUT whereas the data show a tendency towards lower TUT for the young participants. To investigate this interesting aspect, a future study design should include the harvesting of biopsies to examine fiber type distribution. It has been shown that with increasing age the rate of force development declines [42]. Therefore, our results hint in this direction.

Practical relevance of the results
Systematic reporting of all resistance exercise mechano-biological descriptors, as postulated by Toigo et al. [26], makes musculo-skeletal adaptions comparable. It did not escape our notice that our algorithmic approach could help to standardize resistance exercise reporting. We showed that off-the-shelf smartphones could be used to extract contraction-specific mechanobiological descriptors from user-exerted accelerations on a weight stack, during the time a participant worked out on a resistance exercise machine. The approach of using the acceleration vector length allows the recording smartphone(s) to be placed in any arbitrary orientation on the weight stack. This simple method not only enables researchers to standardize resistance exercise reporting, but also enables clinicians, sports professionals, and/or end-users to record, evaluate and/or compare resistance exercise mechano-biological descriptors.
Using this simple tool, healthcare professionals could monitor patient's resistance exercise training as well as decreasing patient-self reporting burden. As such, rehabilitation protocols could then be individually adjusted.
Due to the general ageing trends of the population, standardized reporting has been found to be important for personal resistance exercise interventions combating and/or reversing sarcopenia.

Limitations
As Pernek et al. [40] tested smartphone accelerometer-derived weight stack data with different weights, 50% 1-RM for the first set and 70% 1-RM for the second set of ten repetitions, we focused on deeper data analytical insights i.e. the extraction of mechano-biological descriptors.
The study was designed to reflect a real-world resistance exercise training where the participants determined contraction velocities. Although this study design permitted the collection of considerable intra-and interindividual variation of acceleration and/or velocity resistance exercise data, it does not permit testing of the boundaries of the algorithm. Hence, as we focused on the extraction of mechano-biological descriptors, we could not test for any critical algorithmic boundaries.

PLOS ONE
Two Nexus 6P smartphones with built-in 3-axis accelerometer BMI160 (Robert Bosch GmbH, Stuttgart, Germany) were used in this study. Note that the operating system, Android (Open Handset Alliance, Maintain View, USA), is a non-real time operating system. Therefore, accelerometer-measured data values can be delayed, resulting in incorrect timestamps, or, in other instances, dropped, because the device is busy [43]. Dropping or making timestamps equidistant might also have contributed to the introduction of small random temporal errors.
Because smartphone accelerometers measure proper accelerations, contraction-specific phases of dynamic resistance exercises can validly and reliably be extracted from accelerometer data. However, temporal segments without proper acceleration cannot unequivocally be assigned to any contraction-specific phases, because they could belong to isometric contractions or dynamic, constant-velocity contractions. Therefore, in a real-world scenario, our algorithmic approach could be used, whereas for isometric contractions or constant velocity movements, caution is required.
As a gold standard, video recordings with a sampling frequency of 50 Hz was chosen. This is lower than the sampling frequency returned by the smartphone accelerometers, which was approximately 400 Hz. This fact may have led to the introduction of a random error, as reversal points between contraction phases might have been masked in between two frames of the video recording. Using displacement sensors might increase the precision of contraction phase mapping. However, given the high degree of agreement between the methods found in the current study, we are convinced that it will not be of clinical relevance.

Future research
A future study should address the examination of algorithmic boundaries of resistance exercise mechano-biological descriptors extraction. Different contraction velocities at different loads (e.g. 30% vs. 90% 1-RM) should be tested to investigate the influence on the algorithm.
Using displacement sensors to detect weight stack movements has the potential to diminish systematic temporal bias of contraction-specific TUT, while allowing for the detection of  isometric or quasi-isometric segments. As we examined accelerometer data derived from unidimensional weight stack movements, we determined that non-constraint environments, such as free weights, should also be investigated.
Citizen-science big data approaches have the potential to solve scientific questions. Here we showed that smartphones can be vectors for reliably and validly collecting and reporting machine-based resistance exercise data. Identifying and reporting postulated mechano- biological descriptors and/or methods both contribute to solving the dilemma of underreporting resistance exercise determinants. Therefore, distinct morphological, molecular and metabolic adaptations on the muscular level can be elucidated by off-the-shelf smartphonebased big data approaches.