Wearable Inertial Measurement Units for Assessing Gait in Real-World Environments

Background Walking patterns can provide important indications of a person’s health status and be beneficial in the early diagnosis of individuals with a potential walking disorder. For appropriate gait analysis, it is critical that natural functional walking characteristics are captured, rather than those experienced in artificial or observed settings. To better understand the extent to which setting influences gait patterns, and particularly whether observation plays a varying role on subjects of different ages, the current study investigates to what extent people walk differently in lab versus real-world environments and whether age dependencies exist. Methods The walking patterns of 20 young and 20 elderly healthy subjects were recorded with five wearable inertial measurement units (ZurichMOVE sensors) attached to both ankles, both wrists and the chest. An automated detection process based on dynamic time warping was developed to efficiently identify the relevant sequences. From the ZurichMOVE recordings, 15 spatio-temporal gait parameters were extracted, analyzed and compared between motion patterns captured in a controlled lab environment (10 m walking test) and the non-controlled ecologically valid real-world environment (72 h recording) in both groups. Results Several parameters (Cluster A) showed significant differences between the two environments for both groups, including an increased outward foot rotation, step width, number of steps per 180° turn, stance to swing ratio, and cycle time deviation in the real-world. A number of parameters (Cluster B) showed only significant differences between the two environments for elderly subjects, including a decreased gait velocity (p = 0.0072), decreased cadence (p = 0.0051) and increased cycle time (p = 0.0051) in real-world settings. Importantly, the real-world environment increased the differences in several parameters between the young and elderly groups. Conclusion Elderly test subjects walked differently in controlled lab settings compared to their real-world environments, which indicates the need to better understand natural walking patterns under ecologically valid conditions before clinically relevant conclusions can be drawn on a subject’s functional status. Moreover, the greater inter-group differences in real-world environments seem promising regarding the sensitive identification of subjects with indications of a walking disorder.


Methods:
The walking patterns of 20 young and 20 elderly healthy subjects were recorded with five wearable inertial measurement units (ZurichMOVE sensors) attached to both ankles, both wrists and the chest. An automated detection process based on dynamic time warping was developed to efficiently identify the relevant sequences. From the ZurichMOVE recordings, 15 spatio-temporal gait parameters were extracted, analyzed and compared between motion patterns captured in a controlled lab environment (10 m walking test) and the non-controlled ecologically valid real-world environment (72 h recording) in both groups.
Results: Several parameters (Cluster A) showed significant differences between the two environments for both groups, including an increased outward foot rotation, step width, number of steps per 180 • turn, stance to swing ratio, and cycle time deviation in the real-world. A number of parameters (Cluster B) showed only significant differences between the two environments for elderly subjects, including a decreased gait velocity (p = 0.0072), decreased cadence (p = 0.0051) and increased cycle time (p = 0.0051) in real-world settings. Importantly, the real-world environment increased the differences in several parameters between the young and elderly groups.
Conclusion: Elderly test subjects walked differently in controlled lab settings compared to their real-world environments, which indicates the need to better understand INTRODUCTION Important indications of a person's health status can be obtained through analysis of walking patterns (König et al., 2014;Ravi et al., 2019). A variety of neurological disorders show specific gait impairments such as dementia (Allan et al., 2005;McArdle et al., 2019), normal pressure hydrocephalus (NPH) (Stolze et al., 2000(Stolze et al., , 2001 or Parkinson's disease (Stolze et al., 2001;Del Din et al., 2016). The diagnosis of these diseases is difficult, and misinterpretation is possible, especially in NPH. Here, difficulties arise in distinguishing the disease from other neurodegenerative diseases such as subcortical arteriosclerotic encephalopathy, polyneuropathy, or spinal canal stenosis (Bradley et al., 1991;Hebb and Cusimano, 2001;Relkin et al., 2005). Early indications suggest that subtle characteristics contained within a subject's gait patterns are sufficient to differentiate neurological pathologies at an early time point, and could form a fundamental basis for aiding clinical decision making (König et al., 2016a,b). With sufficient objectivity, such information could therefore support the clinical diagnosis of e.g., NPH, where it is estimated that only one in ten cases is correctly diagnosed and correctly treated (Jaraj et al., 2014). According to literature, NPH exhibits specific gait characteristics such as increased foot outward rotation, increased number of steps needed for a 180 • turnaround, increased cycle time deviation, and impaired arm swing compared to asymptomatic controls (Stolze et al., 2000(Stolze et al., , 2001Relkin et al., 2005;Gallia et al., 2006;Shrinivasan et al., 2011).
Medical examination of walking patterns is typically performed in a hospital or doctor's office environment by visual inspection. If a disease is suspected, patients are sent to specialized centers for further investigation. However, this examination process shows three main deficits: (1) Examinations in a doctor's office are rather low in complexity and cover only a small range of walking pattern characteristics. Subtle characteristics within walking patterns are often not visible to the naked eye, and can generally only be captured in specialized centers.
(2) Examinations in lab environments show temporal and spatial restrictions. They cover a small time interval of the subject's performance in a predefined environment (flat floor, no obstacles) as well as under a standardized inspection range.
(3) All examinations are performed in a strange environment whilst being observed by a stranger (the doctor/investigator). This is an unnatural situation for the test subject. Mental pressure, an effort by the subject to perform well in the presence of an investigator, and little or no acclimatization period to the equipment and task are potential problems. Additionally, the subject might get used to the procedure after several task repetitions and then perform better during subsequent repetitions. As a result, it is highly likely that people walk differently in a controlled lab environment compared to a non-controlled real-world setting. This circumstance would hinder the extraction of a subject's natural walking patterns and may falsify observations which would lead to the false diagnosis of particular diseases.
To address these issues, two main approaches have recently matured for capturing a subject's walking patterns objectively and accurately in non-clinical settings: (1) Non-wearable systems, such as camera-based optical motion capture, or ground reaction force plates, and (2) wearable inertial measurement unit (IMU) sensor systems (Muro-de-la-Herran et al., 2014). The former requires considerable set-up time and equipment, and is generally restricted to lab environments or specialized centers. On the other hand, IMU sensors require less effort to set up for data collection outside the lab, and studies can be run without the need for direct observation of the test subject, thus enabling various real-world investigations to be undertaken (Yu et al., 2016;Figueiredo et al., 2018;Wang and Adamczyk, 2019).
With correct application of such objective approaches, it should therefore become possible to capture real-world characteristics of natural walking patterns that are able to inform clinical decision making through measurements in a noncontrolled environment. As a result, such novel technologies could potentially support the early diagnosis of particular diseases. To this aim, several researchers have reported significant differences in gait parameters between controlled lab and non-controlled real-world settings (Weiss et al., 2011;Robles-García et al., 2015;Brodie et al., 2016;Del Din et al., 2016). However, these studies are difficult to compare since they all involve different parameters, test subjects and absolute error values in the assessment methods used. Therefore, our study aims to compare a broad spectrum of parameters using a validated estimation process on both young and elderly healthy subjects. We hypothesize that elderly subjects walk differently in a controlled lab environment compared to noncontrolled real-world environments. Here, the young group serves as a control cohort to assess both whether the chosen IMU approach is sufficiently sensitive to detect differences in gait patterns between lab and real-world environments, but also whether any observed effect occurs across the entire population or rather simply in elderly subjects. Differences in walking patterns between the two environments would indicate potentially unnatural walking characteristics under lab conditions and can additionally emphasize differences between the age groups.

Subject Groups
Twenty young subjects (10 female, 10 male, 24.9 ± 2.7 years) and 20 elderly subjects (10 female, 10 male, 74.5 ± 8.6 years) were included in this study (Table 1). Subject inclusion criteria consisted of age (young: between 18 and 40 years, elderly: between 65 and 100 years) as well as no visible symptoms of any gait disorder, neurological disorder or cardiovascular disorder, which might affect normal standing or walking. Furthermore, female subjects during pregnancy or pre-menopausal state were excluded. All subjects provided their written, informed consent to participate in the study, which was approved by the Cantonal Ethics Committee Zurich (BASEC-No. 2018-00051) and Swissmedic (102597735).

Sensor Placement
Five wearable ZurichMOVE 1 IMU sensors (Schneider et al., 2018) were used for gait monitoring, with one attached to each ankle, and each wrist, as well as the chest, using kinesiology tape (Figure 1), to monitor axial acceleration a (t) and angular velocity ω (t) for each segment. The global X-axis was defined as the vertical axis, the global Y-axis as the anteroposterior axis and the global Z-axis as the lateral axis. The chosen attachment sites and taping method allowed the subjects to wear the sensors for several days without removal and with full freedom of movement.

Tasks and Environment Under Investigation
While wearing the IMU sensors, all test subjects performed a calibration test for the step width estimation. They walked a distance of five meters on two parallel lines, with a specified spacing, repeating the procedure with a different line spacing (see section Gait Parameters). To assess gait in the controlled lab environment, subjects walked a marked distance of 10 m, four times (180 • turnaround in-between) at their preferred walking speed. The test track in the lab was built on a flat floor with marked lines fixed to the floor as guidance. Subsequently, the sensors remained attached for 3 days to monitor the subjects' walking patterns in their own real-world environment.

Data Processing
The ZurichMOVE sensors use radio frequency time synchronization to prevent time-dependent drift between 1 zurichmove.com TABLE 1 | Subject characteristics (mean ± STD).

Young Elderly
Male n = 10 n = 10 Female n = 10 n = 10 Age (years) 24.9 ± 2.7 74.5 ± 8.6 Height (cm) 173.9 ± 9.5 171.4 ± 9.7 Weight (kg) 68.7 ± 13.4 70.7 ± 12.1 the individual sensors. The data were recorded at a frequency of over 1000 Hz and resampled at 50 Hz. Additionally, the axial acceleration values were low-pass filtered using a first-order Butterworth filter with a cut-off frequency of 5 Hz, while the angular velocity was filtered with a cut-off frequency of 12 Hz (settings adapted from Benoussaad et al., 2016). All data processing and calculations were performed using MATLAB (The MathWorks Inc., Natick, MA, United States).

Automated Detection of Relevant Sequences
Out of the 3 days of recorded data, only sequences of walking, arm swinging and body turning were used for our analysis. To identify and extract these sequences efficiently, an automated detection process was developed, as described in the following sections.

Walking
The monitoring of angular velocity in the z-direction of the foot sensor ω foot,z has been identified as a viable method to detect gait events (Jasiewicz et al., 2006;Li et al., 2010), and was used in this study. As a result, gait cycles were considered to consist of a specific sequence of gait events (Figure 2A): (1) The gait cycle started at the foot flat (FF) event, when the leg was in a vertical position; (2) The start of swing phase started at the point when the toe lost contact with the ground (Toe-off, TO); (3) The time point when ω foot,z was at its greatest was used to identify the maximum angular velocity (MAX) event; (4) Heel strike (HS) was defined as the point when the heel touched the ground, which terminated the swing phase and started the stance phase; (5) A subsequent FF event terminated the gait cycle. The algorithm initially searched for local minima and maxima in order to detect the gait events mentioned above using the following restrictions: the time between two minima or maxima had to be at least 0.7 s, a peak had to be more than 0.5 rad/s larger in magnitude than the surrounding data, and the absolute magnitude of all minima and maxima had to be greater than 0.5 rad/s. Minima and maxima were then assigned to the different potential gait cycles. Sequences with unrealistic assignments (e.g., more than 10 s time difference between the assigned minima and maxima) were removed. These boundary conditions were set empirically based on previously recorded test data of normal walking.
At this stage, not all labeled movement patterns were considered to be "true steps" (steps that were complete and correctly met all criteria). To discard falsely classified steps, a template matching approach based on dynamic time warping (DTW) was applied, adapted from Li et al. (2012). Every potential step was compared with a predefined template step. The DTW procedure allows sequences of different magnitude and length to be checked for their similarity by calculating the DTW distance (see section "1. Dynamic time warping" in Supplementary Material and Müller, 2007). If this distance was below a threshold of 2.5, which was empirically set in our study based on our previously recorded test data of normal walking (shown to work reliably for straight walking, curvy walking as well as walking with slight gradients; The applied algorithm is available at http: //doi.org/10.5905/ethz-1007-243), the step was reported as a true FIGURE 1 | (A) ZurichMOVE sensor axis orientation for accelerometer and gyroscope as well as the three Euler Angles, together with positive turning direction, around the x-axis, around the y-axis and around the z-axis. (B) ZurichMOVE sensor attachment on both ankles, both wrists and the chest including the axis orientation. (C) Sensor attachment to the body using kinesiology tapes.
step and was included in the analysis (Figure 2A). Here, stairs ascent and descent led to DTW distance values larger than 2.5 and were therefore discarded. Evaluation of other special walking conditions was not performed since they did not occur often and were therefore considered to have no major influence on the averaged gait parameters over the 72 h time span of the investigation.

Arm Swinging
The presence of arm swinging was checked for every true step reported by the step detection algorithm. Similar to the step detection algorithm, a DTW based matching approach (against a predefined template arm swing) was applied to the angular velocity signal in the z-direction of the wrist sensor ω arm,z . If the DTW threshold was greater than 2.5, arm swinging was positively identified and entered into the analysis ( Figure 2B).

Turning
Sequences of turning were identified by local integration of the angular velocity signal around the x-axis of the chest sensor ω chest,x . A turning sequence θ(j) was summed as long as no sign change of ω chest,x was detected (the subject was turning in the same direction). If a sign change was observed (the subject was turning in the opposite direction), θ(j) was saved, and the integration process was reset such that a new turning sequence (j + 1) was initiated. However, not every θ(j) directly represented one complete turning event. Due to interruptions while turning caused by e.g., step impacts, all turning sequences, θ, belonging to the same turning event had to be merged to obtain the full turning angle (Figure 2C), further details are shown in the section "2. Merging process of several turning sequences to full turning events" in Supplementary Material. One of our estimated gait parameters was the number of steps per 180 • turn. To also compensate for errors during integration and merging processes, all θ larger than 160 • were kept, and the number of steps during these turning events normalized to the number of steps taken to 180 • .

Gait Parameters
Our set of relevant gait parameters mainly consisted of standard spatial and temporal parameters commonly used in gait analysis such as stride length, gait velocity or cadence (Roberts et al., 2017). Since our gait analysis approach was motivated by the aim to identify people with signs of a walking disorder, we have included additional gait parameters that are indicative of a specific neurodegenerative disease such as NPH. For NPH patients, the following observations have been previously reported: increased foot outward rotation, increased number of steps needed for a 180 • turnaround, increased cycle time deviation, and impaired arm swing compared to asymptomatic controls (Stolze et al., 2000(Stolze et al., , 2001Relkin et al., 2005;Gallia et al., 2006;Shrinivasan et al., 2011). As a result, 15 parameters were used to capture the walking patterns of the subjects in this investigation ( Table 2). To avoid the accumulation of errors due to the integration process, all parameters were calculated independently for every gait cycle, i, and the start position of integration was repetitively initialized to zero (Hamacher et al., 2014).
Temporal parameters were directly calculated in the sensor frame using the estimated gait events from the step detection. All spatial parameters were assessed using accelerations in the global (world) coordinate system as applied in similar FIGURE 2 | (A) Workflow of step detection based on a minima and maxima angular velocity search in the z-direction of the foot sensor followed by a dynamic time warping (DTW) based template matching procedure. (B) For every reported step, the presence or not of arm swinging was checked using DTW template matching. (C) The process of merging turning sequences (j), (j + 1) and (j + 2) belonging to the same turning event to get the full turning angle is illustrated. (D) Estimation workflow of global acceleration A(t), velocity v(t), and position p(t) during one gait cycle [between two foot flat (FF) events] via double integration of IMU acceleration data A s (t). Rotation matrix R WS (t) then rotated the sensor position into global coordinates. Drift was linearly estimated and removed, including compensation for the effect of gravity. Zero acceleration and velocity at FF events and ground-level walking were assumed. This Integration process was performed for each gait cycle individually. BC, boundary conditions. Frontiers in Physiology | www.frontiersin.org Steps per 180 • turn − Get turning sequences by local integration of ω chest,z (t) and detect steps in-between P stance Stance phase % of gait cycle Step detection algorithm based on ω foot,z (t) P swing Swing phase % of gait cycle Step detection algorithm based on ω foot,z (t) P DL Double limb support phase % of gait cycle Step detection algorithm based on ω foot,z (t)

R StanceToSwing
Stance to swing ratio − Step detection algorithm based on ω foot,z (t) n cycle Cadence spm Step detection algorithm based on ω foot,z (t) T cycle Cycle time s Step detection algorithm based on ω foot,z (t) Step detection algorithm based on ω foot,z (t) A swing,arm Arm swing amplitude rad/s ω 2 arm,z (t) + ω 2 arm,y (t) dist arm Traveled arm distance m Orientation estimation arm and double integration of a arm (t) during one gait cycle The estimation method of all parameters is briefly described in the last column.
successful approaches (Hamacher et al., 2014;Rampp et al., 2015;Benoussaad et al., 2016;Hannink et al., 2017). As a result, the sensor acceleration data a s (t) had to be expressed in global coordinates. This was achieved using a rotation matrix R WS (t) that identified how the sensor frame was oriented with respect to the global frame at every time instance, t. Orientation estimation was applied individually for each gait cycle and combined the acceleration and angular velocity measurements to obtain the rotation matrices, R WS (t) [similar to gyroscope integration (Hannink et al., 2017), described in section "3. Orientation estimation" in Supplementary Material]. Additionally, the effect of gravity was removed to obtain the global movement component of acceleration a(t): To estimate the global position trajectory during the gait cycle i, a (t) was integrated twice (trapezoidal integration) between two FF events. In addition, the offset between foot and ankle was neglected during application of the following boundary conditions: the global acceleration a (t FF ), velocity v (t FF ) and vertical position p X (t FF ) at ground contact during the FF event must be zero.
In order to ensure the constraint a t FF,i = a t FF,i+1 = 0, a drift estimation and removal (termed dedrifting) with a piecewise linear function as explained by Rampp et al. (2015) was applied to a(t) before the integration process. Due to inaccurate orientation estimation, sensor drift, and integration errors, the integrated signal v (t) does not necessarily satisfy the constraint v t FF,i = v t FF,i+1 = 0. Therefore, v (t) was dedrifted using the approach of Benoussaad et al. (2016): where t is the time, t FF,i+1 − t FF,i is the entire duration of the current gait cycle, and v(t FF,i+1 ) is the calculated velocity at the end of the current gait cycle. After the second integration, p X (t) was dedrifted to fulfill the constraint p X t FF,i = p X t FF,i+1 = 0. The complete global position, p (t), estimation process is summarized in Figure 2D. All spatial feet parameters were estimated using p (t), except for step width, which required an additional calibration procedure due to the missing relative spatial relation between the IMU sensors. As an approximation, a linear reference line was defined to match sensor tilting angles at FF events (t FF ) to the width d between the heels: To define such a line, a calibration measurement was set up where the test subject walked on two lines with a known line spacing d, and the tilting angle (t FF ) of the sensors was evaluated for this walking sequence (Figure 3). The procedure was performed twice with different line spacings, d tight (individual to subject), and d broad (predefined upper limit of 35 cm). The two resulting calibration pairs d tight , tight and d broad , broad determined the parameters w and c of the reference line. To avoid unnatural gait patterns during these calibration trials, d tight was not predefined but was rather found by visual inspection of the subject's gait during a test walk of 5 m length. Furthermore, d broad was visually corrected if the subject did not hold the default line spacing of 35 cm. The calibration was performed for every subject due to differences in anatomy and sensor alignment. After the calibration process, the step width (SW) was evaluated using the reference line: Finally, the global coordinates p (t) of the wrist sensors were calculated by applying a workflow similar to that applied using the foot sensors (see Figure 2D), but without boundary conditions. The relative traveled arm distance was calculated in both the lateral (z) and anteroposterior (y) directions using the approach presented by Lewek et al. (2010). Details about the estimation of each parameter can be found in the section "4. Estimation of the 15 gait parameters" in Supplementary Material.

Validation Experiment
We compared and verified our developed gait parameter estimation method against measurements using an optoelectronic motion capture system (Vicon motion analysis system, Oxford Metrics Group, United Kingdom) using 10 cameras to capture the movement trajectories of 61 markers attached to the body (see section "5. Validation measurement with Vicon" in Supplementary Material). For validation, three subjects with a total of 60 gait cycles were assessed. Here, each subject walked around a predefined test track in the shape of an eight around two cones (König et al., 2014) at their own preferred walking speed (normal walking conditions) while wearing the 61 markers as well as the five ZurichMOVE sensors. The two systems were timesynchronized and gait parameters were estimated independently for both systems. The validation experiment revealed an accuracy of between 1% and 6% for most parameters, which was only slightly worse than attaching ZurichMOVE sensors directly to the foot (Mohammadi et al., 2017). Measured parameters with larger error values were checked using additional walking conditions (short, long, and broad walking). On completion of these verification activities, it became clear that all parameters and the corresponding error behavior could be described using The reason for the constant offset of 1-2 steps in n StepsTurning between IMU estimation and visual inspection was differences in start and stop time definition of turning events: IMU estimation considered trunk rotation while visual inspection was focused on the feet only. As a result, all parameters developed were considered suitably verified to be used for relative comparisons between different test subjects and/or environments (Table 3).

Statistical Analyses
Each gait parameter was determined as the average of the left and right foot median values. For the evaluated gait parameters in the real-world environment, the following outlier removal was applied before the median calculation: (1) Walking phases were only considered if seven or more steps were performed in a row. (2) Times of special activities (e.g., sports) were reported by the test subjects in a protocol and removed from the analysis.
(3) Values that deviated more than three times from the median value were discarded. Differences between the two environments and groups were evaluated as absolute difference (abs diff), calculated as Parameter Real−world − Parameter Lab , while mean relative difference (mean rel diff) was calculated as the mean of the relative differences (Parameter Real−world −Parameter Lab )/( Parameter Real−world ). All analyses were performed using MATLAB (The MathWorks Inc., Natick, MA, United States). The resulting median values of each subject were then compared between the different environments, and tested for significance using the Wilcoxon signed-rank test, while differences between the two test groups (young and elderly) were examined using the Mann-Whitney U-Test. To ensure symmetrical data distribution (assumption of Wilcoxon signed-rank test), parameters with a skewed distribution were log transformed before p-value calculation. Since our hypotheses include several parameters, resulting p-values were corrected for false discovery by applying the Benjamini-Hochberg correction. All statistical tests were performed in R (R Core Team, 2017, Vienna, Austria), with p-values smaller than 0.05 considered to be statistically significant.

Non-controlled Real-World Versus Controlled Lab Environment
Based on the results (Table 4 and Figure 4), the parameters were divided into three clusters: (A) Significant differences between the two environments for both groups; (B) Significant differences The IMU sensors and Vicon markers were all attached to the body and the gait parameters were calculated independently with both systems. The absolute error ± standard deviation (STD) is presented as the difference between IMU and Vicon. Abbreviations are listed in Table 2. *R StanceToSwing , dev{T cycle } and A swing,arm need no validation, directly calculated from validated parameters/sensor readings. **Visual inspection as reference. ***Period T is validated instead of P =T/T cycle (% of gait cycle).
between the two environments for the elderly subjects only; (C) Remaining differences.

Cluster A: Significant Differences Between the Two Environments for Both Groups
In the real-world settings, both groups showed a significantly increased foot outward rotation

Cluster B: Significant Differences Between the Two Environments for Elderly Group Only
Several parameters showed a larger difference between the two environments for elderly subjects than for the young. For the elderly, we observed a 12% decrease in gait velocity (p = 0.0072), a 5% increase in cycle time (p = 0.0051) and a 6% decrease in cadence (p = 0.0051) in the real-world compared with the lab environment. For the young subjects, these differences were minor and non-significant with values of −2, −1, and ±0%, respectively.

Cluster C: Remaining Differences
The double limb support phase showed significant differences between the two environments for young subjects [7% (p = 0.0237)] in real-world settings while the increase for elderly subjects was not statistically significant (5%). Although not significant in both groups, similarity to the parameters of Cluster A is present. Furthermore, non-significant differences between the two environments were an increased traveled arm distance (young: 6%; elderly: 4%) as well as a decreased stride length (young: −1%; elderly: −6%) in real-world settings. The p-values of the stride length are much smaller in elderly subjects compared with the young which indicates a potential link to Cluster B. The arm swing amplitude was the only parameter that was considerably increased in young subjects (7%) in the real-world environment compared to a decrease in elderly subjects (−1%). Foot clearance, stance phase, and swing phase did not show relevant differences between the two environments for either group (smaller than 1.5%).

Young Versus Elderly Test Subjects
Overall, the non-controlled real-world environment enlarged the inter-group differences. In both environments, young test subjects took significantly longer strides (p = 0.0047 realworld, p = 0.0063 lab) and walked faster (p = 0.0001 in realworld, p = 0.0063 in lab environment) than elderly subjects. In real-world settings, young subjects also took significantly less steps per 180 • turn (p = 0.0024), walked with higher cadence (p = 0.0120), and showed an increased cycle time (p = 0.0110) compared with elderly subjects. The remaining parameters did not show significant differences between the two test groups in either environment.

DISCUSSION
The current study compared the walking patterns of young and elderly subjects in a controlled lab environment against those captured in a non-controlled real-world environment over 72 h. Significant differences were present between the two environments for both groups, including increased foot outward rotation, step width, number of steps per 180 • turn, stance to swing ratio, and cycle time deviation in real-world settings. Although only significant in young subjects, both groups also exhibited an increased double limb support phase in real-world environments. Furthermore, we observed significant differences between the two environments only in the elderly subjects, including decreased gait velocity, decreased cadence,

0.4450
Absolute (abs diff) and mean relative differences (mean rel diff) between the non-controlled real-world and controlled lab environments are presented. P-values are calculated based on the abs diff data, resulting values smaller than 0.05 are considered statistically significant (marked in green). Respective abbreviations are listed in Table 2. *Skew distributed data, transformed logarithmically for p-value calculation (Wilcoxon signed-rank test requires symmetric data distribution). **(A) Significant differences between the two environments for both groups; (B) Significant differences between the two environments for elderly group only; (C) Remaining differences.
Frontiers in Physiology | www.frontiersin.org FIGURE 4 | Comparison between gait parameters collected in lab (10-m walking test) versus real-world (72 h investigation) environments for young and elderly subjects (n = 20 each). The boxplots indicate the absolute differences between the two environments (Parameter Real−world -Parameter Lab ) for both groups. The median value is illustrated as a line, the mean value as a cross and outliers as dots. The line indicating zero difference between the two settings is depicted in bold. Abbreviations are listed in Table 2. and increased cycle time in real-world settings. In general, the young subjects showed only minor differences in their walking patterns between the two environments. Additionally, the gait parameters were compared between the two test groups for both environments, where the non-controlled real-world environment enlarged the inter-group differences. The significant differences in several gait parameters between the two environments confirm our hypothesis that people walk differently in a controlled lab environment. The differences in walking patterns between the two environments were minor for young test subjects compared to the elderly, suggesting that elderly subjects tend to be more influenced in their walking patterns by their environment (Del Din et al., 2016) as well as the possible surveillance of an independent audience (Robles-García et al., 2015;Brodie et al., 2016). This observation may indicate that elderly subjects in particular tend to perform better in a controlled lab environment because they try not to stand out negatively during a test or survey (Del Din et al., 2016). The observed differences in Cluster B match several results of other studies. Brodie et al. (2016) observed a trend toward lower cadence in real-world environments for elderly people, while Del Din et al. (2016) reported a decreased stride length, decreased gait velocity, and increased cycle time for elderly subjects and subjects suffering from Parkinson's disease in real-world settings. Furthermore, an increased cycle time deviation in real-world environments has been reported for elderly people (Brodie et al., 2016;Del Din et al., 2016) as well as an increased variability in cadence (Weiss et al., 2011). For Cluster A, no reports about similar behavior between the two environments were found in the literature, possibly reflective the bias toward reporting only positive results.
We see two main reasons for the observed differences: a mental and a physical influence of the environment. The mental status of the subject is known to influence walking behavior (Prohaska et al., 2009), while the physical influence is given by the various path characteristics, such as surface type, length and type of walking distance (e.g., straight/curved). For Cluster A, it is plausible that the physical influence of the environment plays a dominant role, since similar differences in gait parameters were present in both test groups. Perfect straight walking is possible within a controlled lab environment, but such conditions can rarely be assumed in ecologically valid real-world settings. It is likely that the differences observed in Cluster B were driven by the mental influence of the environment, as differences between the two environments were observed only in the elderly population. It is clear that the differences observed in Cluster B necessitate an improved understanding of natural walking patterns under ecologically valid conditions, including the role they play in clinical decision making.
Several parameters showed larger differences between young and elderly subjects for the non-controlled real-world environment. If this effect is also present in people with indications of a walking disorder, the enlarged separation between groups would be beneficial for diagnostic processes. Del Din et al. (2016) have already reported enlarged intergroup differences between elderly healthy controls and subjects suffering from Parkinson's disease in real-world settings. However, further studies including people with various indications of walking disorder are needed to investigate this topic.
To ensure exact sensor positioning throughout the entire recordings, the subjects did not remove the sensors at any time. To allow wearing the sensors without removal and guarantee full freedom of movement, the sensors were attached to the ankles instead of the feet. Although the accuracy of gait parameter estimation of ankle mounted sensors is lower than of foot mounted sensors (mainly due to the lack of a stationary instant during the gait cycle) several researchers have investigated ankle mounted gait analysis and confirmed its validity for gait parameter estimation. Jasiewicz et al. (2006) estimated HS and TO events similar to our approach and reported high levels of accuracy for normal gait, but showed inaccuracies for abnormal gait e.g., using walking aids. Li et al. (2010) used an ankle mounted IMU sensor to estimate the gait velocity, Benoussaad et al. (2016) estimated the foot clearance and Sijobert et al. (2015) estimated stride length, all of them with comparable accuracy to our approach. Our findings regarding the comparison of walking patterns of young and elderly subjects agree with several reports from literature. For young subjects, an increased stride length and gait velocity (Whittle, 1991;Öberg et al., 1993;Prince et al., 1997;Menz et al., 2004;Janeh et al., 2018), an increased heel clearance in young subjects (Mariani et al., 2010), less time for double limb support phase (Aminian et al., 2002;Janeh et al., 2018), and more steps taken for turning in elderly subjects (Thigpen et al., 2000;Akram et al., 2010) have all been reported and are in agreement with the results of our study. Consequently, we are confident not only that our metrics determined in ecologically valid settings are reliable, but also that the comparison against lab-based settings has revealed valid differences between the settings. As a result, clinicians should be aware of the reported changes in movement patterns, especially in cases where gait metrics play a role in the diagnosis of a patient's functional status e.g., fall risk, or when therapies require tuning to optimize muscle function and coordination e.g., deep brain stimulation.
One limitation during the assessment of the subjects' walking patterns was the range of considered gait parameters. The current study mainly focused on gait parameters that capture the gait rhythm and pace of a subject. To extend the captured walking pattern range, asymmetry or variability could be included or investigated in parameters other than only cycle time (König et al., 2014;Del Din et al., 2016;McArdle et al., 2019). Additionally, variability in real-world environments could be captured in more detail by individual evaluation and averaging of every walking sequence, as proposed by Del Din et al. (2016). On the estimation side, the following deficiencies were present in our study: (1) The parameters with relative error values larger than 6% (SW, T DL and n StepsTurning ) have to be used with caution. (2) Our approach needs a calibration procedure for the step width estimation for every subject, which may be a potential source of error. (3) Although our predefined line spacing during step width measurement calibration only acted as guidance, some subjects still focused too much on them, which may have falsified their natural walking pattern. This might be a potential reason for the large error in the step width estimation. (4) The foot outward rotation estimation was prone to sensor misalignment. Therefore, the sensors need to be attached to the body precisely, with their position maintained throughout the measurement period. (5) To avoid bias of the findings, we did not observe subjects in the realworld environment as we hypothesized that such observations may influence the gait patterns. However, potential differences in daily activities between the subjects remain unknown and the ability to extrapolate results beyond the examined metrics is therefore limited. In order to minimize this influence, we recorded activity over an extended 3 days period, but also ensured that the subjects filled in an activity protocol so that we were able to ignore all non-continuous walking sequences (less than seven steps in a row). (6) Our step detection approach did not differentiate between normal walking and slope ascent/descent walking. While such gait patterns could influence the event recognition, we expected most steps to be performed under conditions with negligible slope effects, with any exclusion of such steps serving to present conservative results. Finally, besides the considered influence of the environment on the walking pattern, further factors may exist, such as the influence of the attached sensors on the movement or a potential feeling of being surveyed by the sensors. Despite these limitations, we could show that people walk differently in a controlled lab environment, which should be considered during future examinations on gait characteristics regarding natural walking pattern extraction.

CONCLUSION
We conclude that especially elderly subjects walked differently in controlled lab settings compared to their real-world environments. Elderly subjects tend to walk faster and take less time per step (increased cadence and decreased cycle time) in the controlled lab environment, whereas for young people, these differences were minor. The findings indicate the need to better understand natural walking patterns under ecologically valid conditions before clinically relevant conclusions can be drawn on a subject's functional status. Moreover, the greater intergroup differences in real-world environments seem promising regarding the identification of subjects with indications of a walking disorder.

DATA AVAILABILITY STATEMENT
The developed step detection algorithm is available at http:// doi.org/10.5905/ethz-1007-243 including a test walking sequence of ankle mounted angular velocity in the lateral direction. The datasets of the study are not publicly available because test subjects was guaranteed that their data will be anonymously used for this study only and not passed to extern instances. Requests to access the datasets should be directed to MS, marischm@ethz.ch.

ETHICS STATEMENT
The studies involving human participants were reviewed and approved by the Cantonal Ethics Committee Zurich (BASEC-No. 2018-00051) and Swissmedic (102597735). The participants provided their written informed consent to participate in this study.

AUTHOR CONTRIBUTIONS
DR and NT contributed to the concept and design of the parameter estimation methods. DR, CG, and NS contributed to the concept and design of the Vicon validation. DR, CG, MS, and LS contributed to the concept and study design. DR and CG contributed to the data analysis and interpretation. DR and MS contributed to the drafting of the manuscript. DR, CG, NT, NS, MM, WT, LS, and MS contributed to the critical revision of the article. DR, CG, NT, NS, MM, WT, LS, and MS contributed to the approval of the manuscript.

FUNDING
This work was financially supported by the Swiss National Science Foundation through the grant 315230_184913.