Authors: Ehsan Sharafian Moghaddam, Babak Hejrati
Categories: Article, foot clearance, drift correction, zero height change, object crossing, locomotion activities
Source: Sensors (Basel, Switzerland)
Doi: 10.3390/s26103166
Authors: Ehsan Sharafian Moghaddam, Babak Hejrati
Wearable sensors are transformative tools for continuous gait assessment in daily life. Tripping, a leading cause of falls, is closely linked to inadequate foot clearance, making accurate foot height measurement critical for fall risk evaluation. Inertial measurement units offer a practical solution for foot trajectory reconstruction; however, conventional drift correction methods such as zero-velocity updates fail to adequately address cumulative height errors. Recent kinematic constraint-based approaches improve height accuracy but remain limited to offline processing and lack simultaneous activity classification. To address these gaps, we developed a real-time, single-IMU system for continuous foot height trajectory reconstruction with simultaneous classification of five locomotion activities deployed on a smartphone. Twenty healthy adults were recruited for model training and independent validation. Level walking maintained ground reference (0.0 cm, 95% CI: [−1.8, 1.8] cm), cumulative height errors remained below 1.1 cm across ramp and stair negotiation with a mean absolute error of 0.42%, and obstacle clearance was quantified. The system achieved 96.08% overall classification accuracy with less than one gait cycle latency. Toe height was estimated through rigid-body transformation with comparable accuracy to the foot height. This framework provides a practical foundation for real-time gait intervention and fall prevention applications.
Wearable health monitoring technologies are transforming healthcare delivery for people with chronic diseases by enabling continuous monitoring of health signals and activity patterns during everyday life, replacing frequent clinic visits [1,2]. These devices offer lower cost, portability, and accessibility, enabling decentralized care and early detection of health deterioration [3,4,5]. By integrating longitudinal data with AI/ML algorithms, wearable systems support personalized health management and remote clinical oversight [6,7,8,9], and are increasingly established as practical tools across chronic disease management, rehabilitation, and care [10].
Falls represent a major public health challenge, with significant consequences including injury, hospitalization, loss of independence, and substantial healthcare costs [11,12]. While technology historically focused on fall detection after occurrence [13], a newer paradigm emphasizes fall prediction and prevention through longitudinal monitoring of gait and balance [14,15]. Instrumented gait measures such as speed, variability, and dual-task performance are consistently associated with fall risk [15,16,17,18,19]. Wearable sensors can now capture gait continuously in daily life, enabling proactive monitoring systems that combine gait features with contextual risk factors to predict and prevent falls [14,20], offering a critical path from episodic clinic-based screening to continuous real-world risk monitoring [15].
Tripping, defined as unexpected foot contact with the walking surface or an object that generates sufficient momentum to destabilize the walker, is the leading cause of falls [21,22]. Minimum foot clearance (MFC), the local minimum vertical distance between the swing foot and the ground at mid-swing, serves as a critical biomarker of tripping risk [21,23]. Lower MFC or high MFC variability increases the probability of striking obstacles, and older adults often show greater MFC variability and more very low clearances strongly linked to elevated fall risk [21,24]. MFC is often measured using optical motion capture in gait laboratories [21,22], providing high-accuracy 3D kinematics. However, this method is confined to controlled settings, expensive, and unsuitable for continuous monitoring in real-world environments, where variability in terrain, footwear, and environmental hazards is a critical risk factor for tripping in community settings [25]. To address these limitations, wearable inertial sensors combined with personalized foot geometry aim to provide accurate estimation of whole-foot MFC during level and uneven walking outside a laboratory, enabling continuous real-world monitoring of foot clearance [26,27].
Unlike optical motion capture, inertial measurement units (IMUs) require no cameras, calibrated volumes, or controlled lighting, enabling measurements in any environment [28]. IMUs are now the most widely used wearable sensor for gait analysis [29], demonstrating good-to-strong agreement with gold-standard references [30]. Because they are body-worn and self-contained, IMUs are suitable for free-living deployment, capturing gait adaptations in real-world environments [31]. Given these advantages, there is a critical need to investigate how IMU technology can be leveraged to monitor foot clearance (FC) in real-world conditions, addressing the technical challenges that have limited its use as an essential fall-risk biomarker.
Accurate FC estimation from a foot-mounted IMU requires double integrating of acceleration to obtain position; however, any sensor bias, scale error, and noise accumulated through this integration result in cumulative drift in velocity and height estimation over each stride [32,33,34,35]. For MFC, where true vertical distances are critically small, even minor uncorrected bias produces height error that can completely mask low clearances, making drift control essential. Common drift mitigation relies on zero-velocity updates (ZUPT) during stance, typically within extended Kalman filter (EKF) or error-state Kalman filter (ESKF) frameworks. Yuan et al. [32] proposed ESKF-based ZUPT using midpoint integration. In contrast, Zhang et al. [34] and Wagner et al. [36] introduced constraint methods, including planarity and height constraints, to address residual drift. Tong et al. [37] combined unscented Kalman filtering with zero-velocity detection. Multi-sensor fusion approaches by Huang et al. [38] and Liu et al. [39] further reduce drift but require additional hardware unsuitable for single-IMU deployment. However, Wang et al. [33] and Ju et al. [35] reported that heel strike impacts introduce an additional error source due to impulsive foot-ground forces, which generate acceleration spikes greater than IMU dynamic range. This creates velocity discontinuities that cannot be removed by standard ZUPT or ESKF formulations. Despite progress, current approaches are limited by computational complexity unsuitable for resources-constrained wearable devices [32,40], multi-sensor requirements [41,42], residual height drift [32,33,34], and primarily offline implementations [39,43,44].
Falls and tripping risk depend strongly on terrain, as stairs and ramps impose greater biomechanical demands than level ground and are associated with elevated fall and injury risk in older adults [33,45]. Meaningful FC assessment must therefore be activity-specific, as minimum safe clearance over a stair or ramp differs from that on smooth level ground. Context-aware systems increasingly use wearable sensors to relate gait patterns and fall risk to specific activities [45], with real-time activity detection critical for safety monitoring [46] and terrain-appropriate assistance in powered exoskeletons and prostheses [33,47]. Human activity recognition (HAR) using a single foot-mounted IMU and machine learning techniques has achieved high classification accuracy [29,33,48]. However, knowledge gaps still remain, as most HAR studies either classify terrain without reconstructing precise foot trajectories or vice versa [29,33]. High-accuracy systems often rely on multi-sensor setups that increase cost and reduce compliance [33,45,49], and many systems require offline processing unsuitable for wearable deployment [29,50]. For practical purposes, clearance monitoring systems should integrate activity classification with clearance measurement in a unified framework, using minimal sensor configurations [45,50]. This motivates single-sensor solutions that combine real-time activity classification with drift-mitigated trajectory reconstruction to provide context-aware indicators of trip risk in everyday environments.
Given the importance of foot clearance monitoring, activity classification, and tripping risk assessment for fall prevention, a practical system must operate in real-time to enable timely interventions. Reviews by Prasanth et al. [29] and Hutabarat et al. [51] highlight that many systems rely on offline post-processing with limited free-living validation. Real-time systems must satisfy stringent low-latency gait-event prediction [52], computational efficiency for constrained devices [18,53], and on-device inference [54]. Real-time capabilities are essential for rehabilitation, assistive devices, and fall-detection applications [55], and can enable auditory or haptic cues for coarse foot clearance monitoring on hazardous terrain transitions. However, mobile deployment faces limited processing power, battery constraints, and streaming reliability concerns [56]. Zafar et al. [57] emphasize that few systems simultaneously achieve high accuracy, real-time operation on constrained hardware, and free-living validation. Notably, Wang et al. [33], the most comparable prior work, demonstrated accurate foot trajectory reconstruction and terrain classification across five locomotion activities using a single foot-mounted IMU; however, their method operates entirely offline. Despite substantial progress in IMU-based gait analysis and activity recognition, to the best of our knowledge, no previous work has simultaneously demonstrated real-time, drift-corrected foot clearance measurement using a single IMU suitable for continuous, free-living monitoring that integrates activity classification with accurate trajectory reconstruction.
Given the existing limitations in correcting cumulative drift in IMU-based height estimation, reliance on offline processing, multi-sensor requirements, and the absence of real-time foot height monitoring as a practical tripping risk indicator, this study aims to develop and validate a real-time, single-IMU system for simultaneous activity classification and FC measurement on a smartphone suitable for practical clinical and home-based applications.
The contributions of this study Development of a smartphone-based Android application for real-time stride-by-stride foot clearance measurement and activity classification, integrating the zero height change (ZHC) constraint for drift correction and heel strike velocity error for activity classification, enabling on-device processing without reliance on cloud computing.Estimation of toe position through rigid-body transformation from IMU position and orientation.Demonstration of the foot height measurement accuracy through experiments, including cumulative height validation during stair and ramp negotiation.
While the motivation for this work is rooted in fall prevention for older adults, initial validation in a healthy population with well-characterized gait patterns allows rigorous algorithm development and system verification before introducing the additional complexity of age-related or pathological gait variability. The algorithmic framework validated here provides a transferable foundation for subsequent validation across broader populations, consistent with comparable prior works in this domain [26,33,48]. These contributions advance upon these works by combining drift-corrected trajectory reconstruction with adaptive, real-time activity classification in a computationally efficient, single-sensor, smartphone-based implementation suitable for clinical deployment and real-world application.
The kinematic model serves as the foundation for reconstructing motion trajectories from inertial sensor data. To model the kinematics of the activity, data measured by the IMU must be considered. The kinematic model is based on linear acceleration measurements from the IMU. Depending on the measurement configuration, acceleration can be captured in different reference frames, such as the global world frame or the body frame of the IMU. In this work, following a general approach, linear acceleration is expressed in the body frame of the IMU [33,58,59,60]. In the general IMU configuration, the sensor measures total acceleration in its body coordinate frame, which includes both motion-induced acceleration and gravitational acceleration. Therefore, to obtain pure kinematic acceleration, the gravitational component must be removed after transforming the measured acceleration from the body frame to the global frame of the system.(1)ag(k)=Rbg(k)×ab(k)−gg where k denotes the sample index within each stride, ag(k) is the calculated linear acceleration at sample k in global coordinates, ab(k) is the measured linear acceleration at sample k in the local body coordinate frame of the IMU, and gg is the gravity vector in global coordinates and can be considered as [00|g|]T. The term Rbg(k) represents the rotation matrix that transforms vectors from the body coordinate frame to the global coordinate frame. This rotation matrix can be constructed using either Euler angles or quaternions obtained from the IMU orientation estimation [60,61].
It is important to note that the accuracy of Rbg(k) directly affects the quality of trajectory reconstruction, as attitude errors introduce gravity leakage into the estimated kinematic acceleration components, degrading both velocity and position estimates. In this work, orientation estimates are obtained from the Xsens DOT onboard sensor fusion filter (Movella Technologies B.V., Enschede, The Netherlands), which fuses triaxial accelerometer, gyroscope, and magnetometer measurements using a Kalman-based attitude and heading reference algorithm to output quaternions at 60 Hz [62]. This filter employs gyroscope integration as the primary orientation propagation mechanism during dynamic phases of the gait cycle, particularly during mid-swing, when foot angular velocity is high, and the accelerometer cannot serve as a reliable gravity reference, while incorporating accelerometer-based corrections during quasi-static stance phases to bound long-term gyroscope drift. This design ensures convergence and reliable pitch and roll estimation under the dynamic conditions characteristic of all five locomotion activities examined in this study.
Based on the assumption that gait parameters exhibit repetitive patterns, the continuous data stream can be segmented into stride-based windows. In this study, gait segmentation is performed by identifying the zero-velocity point (ZVP), which corresponds to the flat-foot phase during walking when the foot is stationary. Each stride window begins at one ZVP and ends at the subsequent ZVP, effectively capturing one complete gait cycle. A detailed description of the stride segmentation algorithm is provided in Section 2.3. It should be noted that these formulations apply to a single IMU mounted on the dorsal surface of the foot. Further details regarding sensor placement and experimental setup are discussed in the following sections. With the linear acceleration expressed in the global frame, the linear velocity can be calculated through numerical integration of acceleration samples from the previous sample and the beginning of each stride. The velocity at sample k is computed (2)vg(k)=vg(k−1)+ag(k)×Δt=vg(k−1)+Rbg(k)×ab(k)−gg×Δt where Δt is the sampling time interval corresponding to the measurement frequency of the IMU, vg(k) is the linear velocity in the global coordinate frame at sample k, and vg(k−1) is the velocity at the previous sample.
The objective of velocity correction is to eliminate the residual offset in velocity and position that accumulates by the end of each stride. To address this issue, the sources of error must be identified. One primary source of error arises from imperfections in acceleration measurements. As noted by Wang et al. [33], these errors can stem from sensor noise, bias instability, and other systematic measurement errors that affect the recorded acceleration data. To simplify the computational approach, an acceleration bias parameter abias is introduced to represent the aggregate measurement error for each stride. The acceleration bias has the same dimensions as linear acceleration (m/s^2^) and is estimated independently for each stride window. By estimating and compensating for this stride-specific acceleration bias, the proposed method aims to eliminate the velocity drift and position offsets that would otherwise accumulate at the end of each stride.
In addition to acceleration bias, the impact event at heel strike can introduce substantial errors in the kinematic model [33]. This heel strike impact represents a previously unaddressed source of velocity and position error in conventional methods such as ZUPT [63] and ESKF-based [32] reconstruction. To account for the heel strike impact, a heel strike velocity correction term is introduced, which has dimensions of velocity (m/s). Within each stride window, the heel strike event generates an impulsive force that manifests as a discontinuous velocity change in the kinematic model. This velocity discontinuity, denoted as verror,hs, represents the instantaneous velocity error induced by the impact. The complete formulation for velocity difference must therefore include both the acceleration bias effect and the heel strike velocity error. Since all formulations are expressed in the global coordinate frame (g), the heel strike velocity correction vector is primarily oriented in the vertical direction. The full step-by-step derivation of the velocity difference equations is provided in Appendix A. The key result, for any sample k occurring after the heel strike instant (khs), (3)Δvg(k)=vdriftg−vdriftcorrg=La(k)·abias·Δt+00verror,hs,ifk>khs where vdriftg and vdriftcorrg are the uncorrected and corrected velocity drifts at sample k, respectively; abias is the stride-specific acceleration bias vector; and La(k)=∑j=1kRbg(j) represents the cumulative sum of rotation matrices over the stride from the beginning to sample k. Beyond correcting velocity drift, the per-stride estimation of abias also provides a mechanism for absorbing residual attitude-induced systematic errors introduced by gravity leakage, further reducing their impact on the reconstructed trajectory.
After calculating the linear velocity, the position of the IMU at each sample can be determined through numerical integration. Following the same discrete integration approach, the position vector is computed as [33,63]:(4)pg(k)=pg(k−1)+vg(k−1)·Δt+12Rbg(k)·ab(k)−g·Δt2 where pg(k) represents the position vector of the IMU in the global frame at sample k.
The objective of position correction is to minimize the drift and offset that accumulate by the end of each stride. The complete position difference, including both acceleration bias and velocity heel strike effects, is derived in Appendix A. The result for any sample k after the heel strike moment (5)Δpg(k)=pdriftg−pdriftcorrg=Lv(k)·abias·Δt2+00verror,hs·(k−khs)·Δt,for1<khs<k where Lv(k)=∑j=1kLa(j)−12Rbg(j).
With the velocity and position difference equations (Equations (4) and (5)) established, the complete kinematic model is now ready to be formulated. In the following section, constraints based on gait assumptions will be applied to solve for the bias parameters.
To formulate the kinematic model and solve for the bias parameters, several fundamental assumptions based on gait biomechanics must be established.
Assumption 1: Single Heel Strike Event. Each gait cycle contains exactly one heel strike event. The timing of this heel strike moment (khs) must be identified for the kinematic formulation, regardless of whether it is detected in real-time or considered as an estimation moment of it.
Assumption 2: Zero Velocity Constraint. The foot velocity at the beginning and end of each stride must be zero. Stride segmentation is based on identifying zero-velocity points (ZVP) that correspond to the flat-foot phase of gait, when the entire foot is in contact with the ground. While multiple instants during the stance phase may exhibit near-zero velocity, the most reliable ZVP is selected as the stride boundary.
Assumption 3: Zero Height Change Constraint. For walking on level ground, the vertical (z-component) position of the IMU at the beginning of the stride must equal the vertical position at the end of the stride. In other words, the height difference between the start and end of each stride on level terrain should be zero. Therefore, the proposed model is referred to as the zero height change (ZHC) model.
Moreover, obstacle crossing as a part of the experiment in this study is naturally accommodated within this framework, as the foot departs from and returns to the same ground level within a single stride, satisfying the ZHC constraint. The maximum stride height is therefore fully preserved as a measure of obstacle clearance.
Based on Assumption 2, the corrected velocity at the beginning and end of each stride must be zero. Applying this constraint to the velocity difference equation from Equation (3) at the end of a completed stride with N samples (6)Δvg(N)=vdriftg(N)−vdriftcorrg(N)=vdriftg(N)=La(N)·abias·Δt+00verror,hs where vdriftcorr(N)=0 due to the zero-velocity constraint, and vdrift(N) represents the uncorrected velocity drift at the end of the stride.
For position correction over a stride of N samples, only the vertical (z) component of the position difference equation is required. According to Assumption 3, walking on level ground implies zero height change between the start and end of the stride. To satisfy this constraint through our corrected position, the height component of the position drift must be eliminated. The height difference equation incorporating both acceleration bias and heel strike effects (7)Δpzg(N)=pdrift,zg(N)−pdrift,zcorrg(N)=Lv,(3,:)(N)·abias·Δt2+00verror,hs·(N−khs)·Δt,for1<khs<N where pdrift,zcorr(N) represents the corrected height drift at the end of the stride, which should equal zero for level-ground walking, and Lv,(3,:) denotes the third row of Lv.
Combining the velocity constraint (Equation (6)) and the height constraint (Equation (7)), the complete system can be expressed in matrix (8)Δvg(N)Δpzg(N)4×1=La(N)·ΔtNLv,(3,:)(N)·Δt2(N−khs)·Δt4×4abiasverror,hs4×1→thenabiasverror,hs4×1=La(N)·ΔtNLv,(3,:)(N)·Δt2(N−khs)·Δt4×4−1Δvg(N)Δpzg(N)4×1 The summation matrices La and Lv can be computed recursively for computational (9)La(k)=La(k−1)+Rbg(k)Lv(k)=Lv(k−1)+La(k)−12Rbg(k) The resulting system consists of four equations (three equations from the velocity constraint and one from the height constraint) and four unknowns (three components of abias and one-dimension verror,hs), yielding a fully determined linear system. With these equations established, the acceleration bias abias and heel strike velocity error (verror,hs) can be calculated for each stride by solving the system of constraint equations. The numerical stability of this matrix inversion was assessed through a condition number analysis, confirming that the matrix remains well-conditioned under realistic IMU noise conditions (Appendix F).
While both abias and verror,hs are calculated at the end of stride and used for trajectory reconstruction, only verror,hs is employed for activity classification, as it captures terrain-specific heel impact characteristics through a single scalar parameter, its sign distinguishes ascent from descent, and its magnitude separates level walking from ramp and stair activities reducing classification complexity. Note that Equation (8) assumes level-ground walking (Assumption 3 valid), so it is initially applied to all strides to compute bias parameters for activity detection. Once activity type is identified, the appropriate reconstruction is for level-ground walking, the full system (Equation (8)) is applied, enforcing both Assumptions 2 and 3 to minimize drift in velocity and height; for non-level activity (ramps and stairs), only the velocity constraint (Equation (6)) is applied, allowing natural height changes while maintaining zero-velocity at stride boundaries.
The ZHC constraint is applied as a universal initialization step at every stride, regardless of terrain, so the classification is not based on a prior terrain assumption. Equation (8) is solved under the level-ground assumption to compute abias and verror,hs at each stride boundary, and verror,hs is free to take any value without memory of previous strides, so classification emerges from the physics of the heel strike impact. Any misclassification at a terrain transition is self-limiting: both parameters are re-estimated fresh at every ZVP, and in typical ambulation, non-level terrain is always entered from and returned to level-ground segments where the ZHC constraint re-engages naturally, resetting any residual drift.
Figure 1 illustrates the fundamental difference between ZUPT-based and the proposed ZHC method. As shown in Figure 1a–c, both methods enforce zero velocity at the beginning and end of each stride, effectively removing velocity drift at stride boundaries. However, this velocity correction alone is insufficient to eliminate height drift. As shown in Figure 1e, even with ZUPT applied, the vertical position at the end of a level-ground stride does not return to its initial value, resulting in a residual height offset. In contrast, the ZHC method addresses this limitation by additionally enforcing a zero height change constraint at stride boundaries during level-ground walking. As shown by the solid lines in Figure 1e, the ZHC method eliminates the drift and residual height offset during level walking. It should be noted that the ZHC trajectory in Figure 1e represents the retroactively corrected position, where abias and verror,hs are solved at the end of the completed stride and applied to all samples within that stride.
It should be noted that, for non-level activities where the ZHC constraint is invalid, the proposed method still differs from standard ZUPT. While standard ZUPT resets velocity but leaves the accelerometer bias uncorrected, the proposed method re-estimates abias at every stride boundary using the velocity constraint (Equation (6)), re-anchoring the accelerometer calibration at each ZVP and preventing the cross-stride drift accumulation that characterizes standard ZUPT.
As established in the previous section, the acceleration bias and heel strike velocity error can be calculated at the end of each stride. Building upon the approach proposed by Wang et al. [33], these bias parameters can be leveraged for activity classification. However, as a key modification in our work for real-time implementation, we rely exclusively on the heel strike velocity error parameter (verror,hs) and demonstrate that accurate activity recognition and activity detection can be achieved using this single parameter alone.
Figure 2 shows a representative example of how verror,hs varies in walking on level ground, ramp ascent, ramp descent, stair ascent, and stair descent. As seen in Figure 2, three important characteristics could enable activity classification. First, the magnitude distribution of verror,hs could distinguish between level-ground walking and non-level terrain. Second, the sign of verror,hs indicated the direction of walking, separating ascending from descending activities. Third, the magnitude of verror,hs is differentiated between moderate inclines (ramps) and steeper inclines (stairs) in both ascending and descending directions.
For accurate activity detection using the calculated verror,hs, shown in Figure 2, fixed threshold values could be employed [64]. However, the literature suggests that adaptive and individualized approaches are preferable to fixed thresholds, as the adaptive thresholds account for inter-subject variability and changing conditions [65]. Therefore, an adaptive, normalized, and subject-specific thresholding method was applied to use the estimated verror,hs for a robust and generalizable activity recognition algorithm.
To establish a baseline reference corresponding to level-ground walking, the interquartile range (IQR) of the heel strike velocity error magnitude is computed [66,67], defining the set of strides within the middle 50th percentile (10)SIQR={i:P25(|verror,hs|)≤|verror,hs(i)|≤P75(|verror,hs|)} The baseline heel strike velocity error μhs is then computed as the median of verror,hs over strides within SIQR:(11)μhs=median({verror,hs(i):i∈SIQR}) This thresholding method was evaluated on the training set, yielding sufficient stride samples across all five locomotion activities to establish robust baseline parameters. Then the heel strike velocity error for each stride is normalized by subtracting the baseline reference (12)v^error,hs(i)=verror,hs(i)−μhs,i=1,2,…,N where N is the number of whole strides used to compute the thresholds. This normalization serves as a calibration procedure, in which the user walks on level ground for an initial period, corresponding to the first Winit=20 strides (Section 2.3.3), allowing the system to personalize μhs to the individual’s gait characteristics and compute v^error,hs. This centers the data around zero, removing the subject-specific baseline offset associated with level-ground walking, so that the normalized values v^error,hs(i) represent deviations from that individual’s typical level-ground gait pattern.
To quantify the variability of the heel strike velocity error in a robust manner, the Median Absolute Deviation (MAD) is (13)MADhs=median({|v^error,hs(i)|:i=1,…,N}) The MAD is then converted to an equivalent standard deviation measure using the scaling factor for normally distributed σhs=1.4826×MADhs where the constant 1.4826=1/(0.6745)≈1/Φ−1(3/4) is the conversion factor that makes MAD comparable to standard deviation for Gaussian distributions. Classification thresholds are established using the baseline μhs and the robust spread estimate σhs. Two threshold multipliers k1 and k2 (where k2>k1>0) define the boundaries between terrain (14)ForAscent:Tramp+=μhs+k1×σhsTstair+=μhs+k2×σhsForDescent:Tramp−=μhs−k1×σhsTstair−=μhs−k2×σhs Each stride i is classified (C(i)) based on its normalized heel strike velocity error v^error,hs(i) according to the following rules, where Tramp+ and Tstair+ are the ascending activity thresholds and Tramp− and Tstair− are the descending activity (15)C(i)=StairAscendifv^error,hs(i)>Tstair+RampAscendifTstair+>v^error,hs(i)>Tramp+LevelGroundifTramp+>v^error,hs(i)>Tramp−RampDescendifTramp−>v^error,hs(i)>Tstair−StairDescendifTstair−>v^error,hs(i)
It should be noted that the optimal values of threshold multipliers k1 and k2 must be determined before deployment. These parameters are optimized using supervised learning with labeled ground truth data from participants performing walking trials across various activity types. The mathematical formulation and grid search procedure for this optimization are detailed in Appendix B.
As established in the methodology for calculating corrected position and bias parameters, which are fundamental for activity recognition and trajectory reconstruction, the zero-velocity point (ZVP) serves as the criterion for gait segmentation. This moment corresponds to the flat-foot phase of the gait cycle [68], during which the entire foot is in contact with the ground and hypothetically exhibits minimal acceleration and angular velocity. While ZVP detection is relatively straightforward in offline post-processing, identifying this moment in real time with minimal latency presents a significant challenge that requires a specialized detection strategy. Several techniques have been proposed in the literature for flat-foot phase detection, including threshold-based methods [69], machine learning approaches [70], and template matching algorithms [71]. The ZVP defines stride boundaries, with bias and error calculation and activity classification executed at each ZVP. Although Algorithm 1 supports both offline and real-time use, it is designed primarily for continuous, low-latency deployment. Detection exploits the flat-foot phase’s near-zero movement, which persists over a brief period rather than a single instant, using a sliding window to accumulate candidate samples in real-time. Algorithm 1 Zero Velocity Point DetectionRequire: Linear acceleration a(k), angular velocity !(k), sample time Δt, current sample index kEnsure: Index of zero velocity point (ZVP) for stride segmentation 1:Parameters: 2:Ta: Acceleration magnitude threshold 3:Tω: Angular velocity magnitude threshold 4:Wcap: Target window capacity (number of samples) 5:Tmax: Maximum duration since first sample in window 6:g: Gravitational acceleration magnitude 7:*** *** 8:Initialize: 9:Detection window W←∅ (empty)10:First sample time in tfirst← null11:*** **12:for each sample k do13: // Check if sample meets low-movement criteria14: if ∥a(k)∥−g<Ta and ∥ω(k)∥<Tω then15: if W is empty then16: tfirst← current time // Record start of stance phase17: end if18: Append k to detection W←W∪{k} // Add candidate sample19: end if20: // Process window if full or timeout reached21: if |W|≥Wcap or (W≠∅ and (tcurrent−tfirst)>Tmax) then22: minω←min{∥ω(i)∥:i∈W} // Find minimum angular velocity23: kzvp←argmini∈W∥ω(i)∥ // Select ZVP as sample with min ω*24: Clear W←∅ // Reset for next stride25: Reset: tfirst← null26: Output kzvp as detected ZVP27: end if28:end for
The detection logic in Algorithm 1 works as follows. When both the gravity-removed acceleration magnitude (∥a(k)∥−g) and angular velocity magnitude fall below predetermined thresholds (Ta and Tω, respectively), the current sample index is added to the detection window. The window continuously accumulates qualified samples until (1) a sufficient number of samples (Wcap) are collected, indicating a valid stance phase, or (2) the low-movement condition is violated, suggesting the end of the flat-foot period.
When the window reaches its minimum capacity, the algorithm selects the ZVP by identifying the sample with the minimum value among the accumulated candidates. Two criteria are angular velocity magnitude and gravity-removed acceleration. Angular velocity is prioritized as the primary selection criterion due to its higher sensitivity to subtle movements during stance. Specifically, if the minimum angular velocity within the window is smaller than the minimum acceleration deviation, the ZVP is identified as the sample with the minimum angular velocity. If the detection window fails to accumulate the minimum required number of samples before the thresholds are exceeded, which may occur during rapid transitions or irregular gait patterns, the window is completed, and the detection process restarts. The threshold values and minimum window length are tuned based on typical gait event timings [48]. With this algorithm, the ZVP sample index is determined in real-time, enabling the continuous execution of bias parameter calculation and activity classification without requiring complete trial data. The detailed algorithm is presented in Algorithm 1.
The algorithm relies on four tunable Ta (acceleration threshold), Tω (angular velocity threshold), Wcap (window capacity), and Tmax (maximum window duration). These parameters are primarily determined through empirical analysis during real-time testing of the system. The maximum duration parameter Tmax is based on established gait event timing thresholds [48], which provide physiological bounds on the duration of the flat-foot phase. The remaining parameters Ta, Tω, and Wcap identify candidate samples for ZVP selection. Since the algorithm selects the minimum angular velocity sample from the accumulated candidates, the exact candidate count is non-critical; the same ZVP is selected across moderate parameter variations, provided the true minimum is captured within the window. Final parameter values were determined empirically to ensure reliable real-time performance across subjects and conditions. A sensitivity analysis of these parameters is provided in Appendix E.
Beyond capturing the ZVP for real-time stride segmentation, accurate identification of the heel strike moment is essential for the proposed methodology. As established in the kinematic formulation, the heel strike sample index khs represents the instant when the impulsive velocity error is applied to the system. This timing is critical for both estimating the heel strike velocity error verror,hs and subsequently performing activity classification. Numerous techniques have been proposed in the literature for detecting gait events such as heel strike and toe-off, typically requiring multiple sensor-specific thresholds and complex decision rules [72]. However, the stride segmentation approach adopted in this study enables a simplified detection strategy. Since each stride is bounded by two consecutive ZVPs, all kinematic data within this window corresponds to a single gait cycle. Leveraging this temporal constraint, the heel strike event can be identified as the sample exhibiting the maximum foot pitch angle within the stride window (i∈[⌊N/2⌋,N]), where the search is constrained to the second half to avoid spurious local maxima during the early swing phase.
This approach is based on the biomechanical observation that the foot reaches its maximum forward inclination at or near the instant of heel contact with the ground. The foot pitch angle, computed from the IMU orientation data, provides a reliable indicator of this critical gait event. While certain activities, particularly stair ascent and descent, may introduce greater variability in foot kinematics [48], identifying the maximum pitch angle within each stride window consistently provides a meaningful and computationally efficient estimate of the heel strike timing required for the kinematic formulation. A validation of this detection method, including timing consistency analysis across all five locomotion activities and a sensitivity analysis assessing the robustness of the kinematic model to realistic timing uncertainty, is provided in Appendix C.
Following the determination of ZVP and heel strike index khs, all components for real-time activity detection and trajectory reconstruction are established. Algorithm 2 presents the implementation, integrating stride segmentation, bias and error estimation, activity classification, and trajectory correction into a unified framework. The reconstruction operates on a stride-by-stride basis, where each stride begins at one ZVP and ends at the next. For each stride, the measured acceleration is transformed to the global frame using rotation matrices derived from the IMU orientation. The heel strike moment is identified as the sample with the maximum foot pitch angle. The drift velocity vdrift(N) and height pz,drift(N) are computed by integrating the uncorrected acceleration, and the constraint equations (Equation (8)) are solved to determine the acceleration bias abias and heel strike velocity error verror,hs to modify them. Algorithm 2 Real-Time Trajectory Reconstruction with Adaptive Activity ClassificationRequire: Linear acceleration a(k), orientation θ(k), ZVP indices, ΔtEnsure: Corrected trajectory {pcorr(i),vcorr(i)} and activity class C for each stride 1:Parameters: Winit=20 (baseline strides), k1*,k2* (threshold multipliers) 2:Initialize: nstride←0, μhs← null, σhs← null 3:*** *** 4:for each stride from ZVPstart to ZVPend do 5: nstride←nstride+1 6:*** *** 7: Transform ag(i)←Rbg(i)×ab(i)−gg for all i in stride 8: Detect heel khs←argmaxi∈[⌊N/2⌋,N]θpitch(i) 9: Compute vdrift(N), pz,drift(N) using Equations (2) and (4)10: Solve for abias, verror,hs from Equation (8)11:*** 12: if nstride≤Winit then ▷ Baseline estimation phase13: Store verror,hs(nstride)14: if nstride=Winit then15: Compute μhs, σhs and thresholds Tramp±, Tstair±16: end if17: C← LEVEL18: else ▷ Classification phase19: b¯hs←verror,hs−μhs20: Classify C← Apply rule from Equation (15)21: end if22: 23: if C=LEVEL then24: Use abias and verror,hs for correction25: else26: Set verror,hs←0, use only abias27: end if28: ***29: for each sample i in stride do ▷ Reconstruct trajectory30: acorrg(i)←Rbg(i)×(ab(i)−abias)−gg31: vcorrg(i)←vcorrg(i−1)+a′g(i)·Δt32: if i=khs and C=LEVEL then33: vzcorrg(i)←vzcorrg(i)+[00verror,hs]T34: end if35: pcorrg(i)←pcorrg(i−1)+vcorrg(i−1)·Δt+12acorrg(i)·Δt236: end for37: Output {pcorr(i),vcorr(i)} and C38:end for
The algorithm employs an initial calibration period, Winit, using the first 20 strides during level ground walking to establish baseline parameters μhs and σhs. A sensitivity analysis evaluating the effect of inaccurate or unavailable calibration on classification performance is provided in Appendix D. After calibration, activity classification thresholds are computed using optimized multipliers k1* and k2*. Each subsequent stride is classified by comparing its normalized heel strike velocity error b¯hs against these thresholds. Based on the classified activity, the appropriate reconstruction model is applied. For level ground, both bias parameters are used to ensure zero height change. For ramps and stairs, verror,hs is set to zero (verror,hs=0) and only acceleration bias error correction is applied, allowing natural height changes. This is due to the fact that for non-level walking activity, Assumption 3 cannot be used. The corrected acceleration is integrated to compute velocity and position, yielding accurate trajectory reconstruction throughout each stride.
It should be noted that the ZHC constraint solves for abias and verror,hs at the end of each completed stride, meaning the corrected trajectory for stride i becomes available only after ZVP detection at the end of that stride, not during mid-swing. The system therefore operates on an inter-stride basis, where kinematic features from stride i inform feedback or adaptive responses during the subsequent stride i+1, consistent with established haptic feedback paradigms for gait training [18,73].
To enable real-time data collection and processing, a custom Android application was developed using the Movella (Xsens Technologies B.V., Enschede, The Netherlands) IMU software development kit (SDK) version 2023. The initial versions of the Android application were developed in [73,74]. The system utilizes Xsens DOT wearable IMU sensors sampling at 60 Hz, with a Google Pixel 6a smartphone (Google LLC, Mountain View, CA, USA) serving as the development and deployment platform. The implementation workflow consisted of three data collection, offline model development in MATLAB (MathWorks Inc., Natick, MA, USA), and real-time deployment on the Android platform.
The developed Android application supports two operational modes, as illustrated in Figure 3. The first mode (Figure 3b) is designed for supervised data collection and ground truth labeling with the buttons corresponding to each activity. During training trials for data collection, an operator uses the application interface to manually label activity types as participants walk through structured environments. This labeled dataset is used to optimize the classification threshold multipliers as described in Appendix B.
The second mode (Figure 3c) implements real-time activity recognition and gait feature extraction. In this deployment mode, the application executes the complete processing pipeline, including ZVP detection (Algorithm 1), trajectory reconstruction with adaptive activity classification (Algorithm 2), and stride-based kinematic feature extraction, directly on the smartphone. Real-time output includes classified activity type, stride length, stride height, maximum stride height, and estimated toe clearance for each completed stride.
The system development followed a two-stage process. Initially, raw IMU data (linear acceleration, angular velocity, and orientation) were collected via the Android application and streamed to the smartphone’s internal storage. These data were subsequently processed offline in MATLAB to develop and validate the kinematic models, optimize algorithm parameters, and tune classification thresholds using the labeled training dataset. Once validated, the complete algorithm was translated from MATLAB to Java and integrated into the Android application using Android Studio. This enabled standalone real-time execution on the smartphone without requiring external computational resources. The real-time implementation maintains computational efficiency suitable for continuous operation on mobile hardware while providing stride-by-stride feedback with latency of less than one gait cycle.
Regarding the frequency at 60 Hz, it is worth mentioning that the sampling interval is approximately 16.7 ms, providing roughly 24–30 samples during a typical swing phase of 400–500 ms [29]. The minimum detectable vertical displacement per sample at this sample rate can be approximated as Δp=12×a×Δt2=12×9.81×(0.0167)2≈1.37 mm (Based on Equation (8)), this millimeter-level resolution can be sufficient for the primary applications of our system, obstacle crossing and stair negotiation training where MFC is on the order of 10 cm or more, while acknowledging that it may limit precise localization of sub-centimeter level-ground MFC events. This sampling rate can represent a deliberate trade-off between temporal resolution and real-time computational feasibility, as higher rates would increase Bluetooth transmission load and processing burden on the smartphone, potentially compromising the real-time operation.
No additional signal conditioning was applied beyond the onboard processing pipeline of the Xsens DOT sensor, which internally samples and calibrates raw MEMS data at 800 Hz, including a low-pass filtering stage prior to Strap-Down Integration, before delivering calibrated acceleration and orientation at 60 Hz [62]. Additional post-sensor filtering was deliberately omitted for two reasons. First, causal low-pass filtering introduces a phase delay that would shift the detected heel strike timing khs, degrading the constraint system; zero-phase alternatives are incompatible with real-time stride-by-stride operation. Second, the heel strike impact is not noise to be suppressed but a physically meaningful event whose integrated effect is explicitly estimated as verror,hs at each stride boundary; aggressive filtering would attenuate this parameter, compromising both classification and trajectory correction. Any residual noise is bounded within each stride and partially absorbed by the per-stride abias estimation.
The reconstruction of foot trajectory enabled real-time computation of key kinematic features for evaluating foot placement and reducing fall risk across different activities. Four key features are defined based on the reconstructed trajectory, as shown in Figure 4.
For level walking, ramps, and stair ascent, maximum stride length equals stride length because the foot continuously progresses forward. In stair descent, however, the curved downward trajectory causes the foot to reach its maximum forward position mid-stride before retracting slightly to land on the lower step, making maximum stride length greater than stride length. This is the case that the different definition of max stride length becomes meaningful.
Representative sagittal trajectories (Figure 4) illustrate the distinct biomechanical demands of each minimal excursion for level walking, gradual height changes for ramps, and pronounced curved paths for stairs. These features provide quantitative metrics for assessing foot clearance and progression, overcoming the height drift limitations inherent in conventional ZUPT or ESKF methods [63]. The proposed bias/error-correction approach enables reliable real-world measurement of these clinically significant parameters.
The proposed trajectory reconstruction method enables real-time estimation of foot clearance during locomotion, a critical metric for assessing fall risk and gait safety. While the kinematic features such as maximum stride height provide valuable information about foot motion, all calculations are initially referenced to the IMU location on the dorsal surface of the foot. However, during level-ground walking and stair negotiation, ground contact or obstacle collision occurrence is more likely to happen at the toe, not at the IMU location. Therefore, the estimation of the toe position throughout gait cycle was investigated. To determine toe position from the known IMU trajectory, we assumed the foot as a rigid body. Although the foot exhibits some flexibility, particularly at the metatarsophalangeal joints during toe-off, this simplification provides a reasonable approximation for clearance estimation during the swing phase when collision risk is highest. Given the position and orientation of the IMU, the toe position can be calculated using rigid-body kinematics. However, an analysis of how metatarsophalangeal joint flexibility can affect toe height estimation, evaluated across locomotion activities and physiologically plausible flexion angles, is provided in Appendix G.
As illustrated in Figure 5, the IMU is mounted on the dorsal anterior surface of the foot. The body frame of the IMU defines the local coordinate system for linear acceleration measurements, which are transformed to the global frame using the rotation matrix Rbg as described in previous sections. The toe position in the global frame is calculated (20)ptoeg=pIMUg+Rbg·dbwhere db=[0d0]T where ptoeg is the toe position in the global frame, pIMUg is the IMU position in the global frame (computed from the trajectory reconstruction algorithm), and db is the displacement vector from the IMU to the toe expressed in the body frame of the foot. The displacement vector db is measured once for each subject by determining the distance from the IMU mounting location to the tip of the toe along the foot’s longitudinal axis. This measurement remains constant throughout the trial under the rigid-body assumption.
It is important to note that the proposed method provides height reconstruction (z-component) through the zero-height-change constraint on level ground and the bias error correction formulation. The individual horizontal position components (x and y) are subject to heading drift due to the absence of heading correction. However, the horizontal displacement magnitude (calculated as x2+y2) is usable within each stride because the zero-velocity constraint at each ZVP effectively resets the accumulated drift at stride boundaries. Consequently, the stride length L calculated from x and y displacements within each stride window is unaffected by absolute global heading drift, as each stride begins from a fresh zero-velocity reference with no accumulated heading error from previous strides. This enables measurement of stride length and horizontal foot progression between consecutive ZVPs. This approach enables continuous monitoring of minimum toe clearance, which is a predictor of tripping risk [22,75].
Moreover, regarding the heading drift, it is important to note that it corresponds to yaw rotation about the vertical axis, which mixes only the horizontal components of the coordinate frame and does not project into the vertical acceleration component; therefore, heading drift does not directly affect height estimation. The attitude errors relevant to vertical accuracy are pitch and roll, which are bounded by the onboard accelerometer-based correction during quasi-static stance phases regardless of magnetometer availability. Furthermore, any residual attitude-induced systematic error in the vertical channel is absorbed by the per-stride abias estimation at each stride boundary, preventing cumulative growth across strides.
Twenty healthy adults were recruited and assigned to two groups for model development and validation. The first group, the training group, consisted of 10 participants (5 females, 19.6±1.3 years) whose data were used to optimize classification threshold parameters and tune algorithm settings. The second group, the testing group, comprised 10 participants (5 females; 20.4±3.7 years) for independent validation of the real-time model’s accuracy for activity detection and foot height calculation. Upon arrival, participants were provided with a detailed description of the experimental protocol and written informed consent. The study was approved by the University of Maine Institutional Review Board (IRB protocol number 2019-0-15). The experimental tasks included walking on level ground, ascending and descending a staircase connecting two floors of a building, and walking along an inclined ramp, each repeated for a predetermined number of trials. Participants were informed they could rest at any time during the experiment and were permitted to use handrails during stair climbing or ramp walking if needed for safety or comfort.
The experimental protocol was conducted in a building selected to simulate typical home and community environments in daily living. This setting provided the necessary activity variety, including level walking, a staircase, and a ramp, to validate the model’s robustness in detecting all five locomotion modes. Both training and testing phases were conducted at this location. The testing environment consisted of a closed-loop pathway incorporating multiple activity types. Participants began with level-ground walking and then transitioned to a ramp segment approximately 15 m in length with a 4° inclination angle. Following the ramp, participants ascended a staircase consisting of 22 steps arranged as two flights of 11 steps with an intermediate turning platform. Each step measured 0.34 m (34 cm) in tread depth and 0.17 m (17 cm) in rise height. After reaching the upper level, participants immediately reversed direction, descended the staircase, and returned to the starting point via level-ground walking. A seating area was available for participants to rest between trials. This structured pathway was repeated multiple times, enabling comprehensive training data collection and rigorous model validation.
The building also contained a separate validation staircase consisting of 14 steps with a rise of 0.137 m per step and 0.31 m in depth, connecting two floors with a total architectural height difference of 1.921 m (14×0.137m≈1.921m). This staircase was used exclusively for the cumulative height validation experiment described in Section 3.4.1, as its total floor-to-floor height was independently measured and served as an absolute ground truth for cumulative drift assessment. To distinguish between the two staircases, the 22-step staircase is referred to as the main staircase throughout the manuscript, and the 14-step staircase is referred to as the validation staircase.
Ten participants (training group) completed seven cycles of the closed-loop pathway, providing multiple repetitions. During these trials, ground truth activity labels were collected using the custom Android application’s labeling interface (Figure 3b). An operator followed at a safe distance, annotating activity transitions in real time by pressing the corresponding activity button at each transition onset and releasing it upon the next transition. This created timestamp markers synchronized with the 60 Hz IMU data stream, yielding a labeled dataset with precise activity boundaries.
All labeled data were saved as CSV files containing raw IMU measurements and corresponding activity annotations. These files were subsequently processed offline in MATLAB to optimize classification threshold parameters. Following parameter optimization, the complete algorithm was translated from MATLAB to Java and deployed on the Android application for real-time testing.
Ground truth activity labels were collected using the Android application’s labeling interface (Figure 3b), where an operator annotated activity transitions in real-time by pressing the corresponding activity button, inserting timestamp markers into the IMU data stream. The resulting labeled dataset was saved as CSV files and processed offline in MATLAB to optimize classification threshold parameters, after which the complete algorithm was translated to Java and deployed on the Android application for real-time testing.
The testing group performed seven cycles of the experimental pathway, while the real-time Android application autonomously classified activity and calculated foot height using optimized parameters. While the model operated without manual input, an operator recorded ground-truth labels for accuracy assessment. Recognition was initiated following a 20-stride calibration period on level ground, which established the baseline normalization parameters for heel strike velocity error. Following completion of the walking trials, participants performed obstacle clearance experiments over three boxes of different heights.
To evaluate classification performance, the application’s real-time activity predictions were compared with operator-annotated ground-truth labels for each stride. A prediction was counted as correct when the classified activity matched the true label; otherwise, it was counted as incorrect. The system exhibited a classification latency of approximately 110 ms following the detection of a ZVP as the end of a stride, attributable to two the inherent transmission delay between the IMU and the smartphone application, and the computational time for bias calculation and activity classification. Classification accuracy metrics, including overall accuracy and per-activity confusion matrices, were compiled after each participant completed the experimental protocol and aggregated across all testing participants for analysis.
To assess system accuracy under clinically relevant conditions, two validation experiments were designed, focusing particularly on foot height estimation. While previous offline methods have demonstrated promising trajectory reconstruction results [26,33], real-time performance must be validated to ensure practical utility for applications such as obstacle avoidance.
The first experiment evaluates cumulative height measurement during stair ascent/descent between building floors. As illustrated in Figure 6, participants traversed a complete staircase connecting two floors while the application continuously tracked their foot height through multiple strides. Zero-velocity points (ZVPs, marked as blue dots) segmented individual strides, and the total vertical displacement was computed by summing stride heights from the initial floor to the final floor. The calculated total height change was compared against the known height difference between floors, validating the system’s ability to integrate height changes over extended multi-stride sequences without excessive drift accumulation. The same procedure was applied for ramp ascent and descent, comparing the calculated total height difference against the known elevation change in the ramp.
The second experiment assessed the system’s ability to measure foot clearance during obstacle negotiation. Participants were instructed to step over boxes of three different heights (h1,h2,h3) placed on level ground, as shown in Figure 7. After each clearance attempt, the maximum stride height was extracted from the reconstructed trajectory. The validation criterion is that the calculated maximum stride height must exceed the known obstacle height (di>hi), confirming that the calculated trajectory accurately reflects the clearance margin achieved by the participant. This experiment demonstrates whether the real-time height calculation provides sufficient accuracy to quantify foot clearance heights, a key requirement for assessing tripping risk and validating safe obstacle negotiation.
Statistical analyses were performed using SPSS v29 (SPSS Inc., Chicago, IL, USA) with a significance level of α=0.05 [17,18]. Descriptive statistics are reported as mean ± standard deviation. Data normality was assessed via the Shapiro-Wilk test. To validate the height reconstruction accuracy, calculated total height changes were compared against architectural truth using paired t-tests. One-sample t-tests verified that obstacle clearances significantly exceeded object heights. Kinematic differences across multiple activities were evaluated using repeated-measures ANOVA with Bonferroni-corrected post hoc analysis. For non-normally distributed data, such as specific stair metrics, Wilcoxon signed-rank tests were employed. Effect sizes are reported as Cohen’s d or partial eta-squared (η2). Bland–Altman analysis was additionally performed to assess agreement between calculated and architectural height values, reporting bias and 95% limits of agreement based on per-subject means for each activity.
The heel strike velocity error (verror,hs) was calculated using data from the training group of participants. These results were then used to determine adaptive thresholds for real-time activity classification. Descriptive statistics for heel strike velocity error across locomotion activities are presented in Figure 8. heel strike velocity error was near zero during level walking (M=0.001±0.013), positive during ascending activities (ramp: M=0.173±0.019; M=0.590±0.109), and negative during descending activities (ramp: M=−0.193±0.038; M=−0.740±0.129). The Shapiro-Wilk test confirmed normal distribution of data for all activities (all p>0.05). A one-way repeated measures ANOVA revealed a significant main effect of activity on heel strike velocity error, F(4,36)=343.87, p<0.001, η2=0.974. Bonferroni-corrected pairwise comparisons revealed significant differences between all activity pairs (all p<0.001). Level walking differed from all inclined/declined activities (all d>5.5). Within ascending activities, stairs showed greater positive bias than ramps (mean difference =0.417 m/s, p<0.001, d=3.97). Within descending activities, stairs exhibited greater negative bias than ramps (mean difference =−0.547 m/s, p<0.001, d=−4.68). All effect sizes were large [76], demonstrating substantial practical differences across activities.
To examine whether the magnitude of heel strike velocity error differed between ascending and descending activities, paired t-tests were conducted for both activity types. For ramp activities, the magnitude of error did not differ significantly between ascent and descent (p=0.074). In contrast, stair descent produced significantly greater error magnitude compared with stair ascent (p<0.001).
Figure 9 shows the distribution of heel strike velocity error for each activity from the training group data. The probability histograms demonstrate separation between all five locomotion activities, with level walking centered near zero, ascending activities exhibiting positive bias, and descending activities showing negative error.
Cumulative height differences across complete ramp and stair traversals (Section 3.4.1) were compared against surveyed environmental dimensions using data from the testing group. Figure 10 presents measured total height differences for both ascent and descent directions. Actual dimensions were 0.96 m for the ramp and 1.921 m for the validation staircase (14 steps of 0.137 m rise each, 14×0.137m≈1.921m). One-sample t-tests assessed whether calculated heights differed significantly from true values. As shown in Table 1, none of the measured heights differed significantly from the actual environmental dimensions (all p>0.05), with a mean absolute error of 0.42% across all conditions. For ramp traversal, the model predicted heights of 0.96±0.12 m for ascent (error =0.0%, p=1.00) and 0.97±0.14 m for descent (error =1.04%, p=0.32). Stair traversal predictions were 1.92±0.09 m for ascent (error =0.05%, p=0.92) and 1.91±0.11 m for descent (error =0.57%, p=0.28). The 95% confidence intervals for all measurements encompassed the true values, further confirming the model’s accuracy.
Bland–Altman analysis was additionally performed and results are reported in Table 1, demonstrating small systematic biases with no consistent overestimation or underestimation pattern across activities. These results demonstrate that the proposed ZHC method eliminates cumulative drift in vertical position estimation during extended real-time operation, maintaining consistent height accuracy regardless of direction of travel.
Real-time obstacle clearance was validated using three boxes of different heights (14 cm, 22 cm, and 28.5 cm) positioned in the walking path. Figure 11 shows the maximum foot clearance heights measured during the obstacle clearance experiment, as mentioned in Section 3.4.2 with step-over maneuvers. The model successfully detected clearance for all objects, with measured heights of 0.295±0.067 m, 0.385±0.056 m, and 0.469±0.031 m for Objects 1, 2, and 3, respectively. One-sample t-tests confirmed that all clearances significantly exceeded box heights (all p<0.001), with safety margins ranging from 15.5 to 18.4 cm above obstacles, demonstrating adaptive clearance behavior. These results can show the model’s capability for real-time obstacle clearance monitoring.
Using the kinematic model, foot trajectories showing horizontal and vertical displacement were reconstructed for each activity and segmented by stride, as depicted in Figure 12. The figure displays 200 randomly selected strides for each activity type. The trajectories demonstrate spatial separation between different locomotion activities, facilitating activity classification.
Using the kinematic model, foot trajectories showing horizontal and vertical displacement were reconstructed for each activity and segmented by stride, as depicted in Figure 12. Prior to visualization, terminal incomplete strides at the end of each recording session were excluded, as the absence of a second ZVP prevents solution of the constraint system, and the initial calibration strides of each trial were excluded from classification assessment as they were reserved for baseline parameter estimation. Given the remaining data volume, 200 strides per activity are randomly drawn from the retained dataset for visualization clarity. The trajectories demonstrate spatial separation between different locomotion activities, facilitating activity classification.
A notable characteristic of stair ascent and descent is the presence of two distinct trajectory groups. The first group, comprising the majority of strides, corresponds to steady-state negotiation where the foot traverses a full stride height, typically twice the individual step height, resulting in larger vertical displacement magnitudes. The second group, highlighted in the dashed-line boxes, represents transition strides at the entry or exit of the staircase, where the foot negotiates only a single step height, producing notably smaller vertical displacement magnitudes. This distinction reflects the difference between continuous stair climbing and the initial or final step of a staircase traversal, in which only half of the typical vertical excursion is required.
Figure 13 presents the mean stride height for each locomotion activity, demonstrating the model’s accuracy in reconstructing vertical foot displacement. Level walking exhibited a mean stride height of 0.000±0.029 m, effectively at ground level with minimal vertical clearance. Stair activities demonstrated the greatest vertical displacement, with stair ascent averaging 0.342±0.036 m and stair descent at −0.348±0.035 m. These measured values correspond closely to the expected stride height of the main staircase, where during steady-state negotiation each foot covers two steps per stride, yielding an expected stride height of 2×0.17m=0.34 m rather than the individual step height of 0.17 m. The measured stride heights therefore reflect this two-step-per-stride biomechanical pattern, with deviations of only 0.002 m (0.6%) for ascent and 0.008 m (2.4%) for descent. This analysis refers exclusively to the main staircase (step rise = 0.17 m) and is distinct from the validation staircase (step rise = 0.137 m) used for cumulative height assessment in Section 3.4.1. A one-sample t-test confirmed no significant difference between the measured stair ascent height and the actual step height (p=0.58), validating the accuracy of the proposed kinematic model with ZHC correction. Similarly, level walking showed no significant deviation from true ground level (p=1.00).
Beyond individual stride analysis, the reconstructed foot trajectory was examined across a complete walking loop encompassing all activity types. Figure 14 presents the continuous height trajectory as a participant traversed the experimental environment, which included level walking, ramp negotiation, and stair climbing in sequence within a single loop. The images in Figure 14 show the actual experimental flat ground for level walking, an inclined ramp with a plateau midpoint, stairs with an intermediate landing, and returning to the starting location to complete the loop.
As described in Section 2.5, toe position tracking is critical for assessing safe clearance during stair climbing and obstacle avoidance. Figure 15 presents the comparison between IMU-mounted (midfoot) and calculated toe trajectories across all five activities, aggregated from all participants in the testing group. The solid lines represent IMU position trajectories, while dotted lines show the corresponding toe positions derived through rigid body transformation. A consistent spatial offset is observed between the two trajectories, with the toe exhibiting more pronounced curved paths, particularly evident in the swing phase. This enhanced curvature at the toe reflects its position at the distal end of the rigid foot segment, where rotational motion about the ankle and metatarsophalangeal joints produces larger displacement arcs compared with the midfoot IMU location.
The mean trajectories in Figure 15 demonstrate consistent patterns within each activity type despite inter-subject variability, with the vertical separation between IMU and toe positions reflecting the rigid-body offset, which is largest during maximum plantar flexion at toe-off. Similar to the IMU stride height analysis in Figure 13, stride height was computed at the toe position for each activity, yielding −0.000±0.012 m for level walking, 0.105±0.020 m for ramp ascent, −0.105±0.026 m for ramp descent, 0.339±0.021 m for stair ascent, and −0.342±0.047 m for stair descent. Paired t-tests revealed no significant difference between IMU and toe stride heights across any activity (all p>0.5), supporting the validity of the rigid-body assumption for toe position estimation.
Figure 16 provides detailed views of the stride initiation phase (0–0.3 m horizontal displacement), where the biomechanical differences between IMU and toe motion are most apparent. During non-stair activities, level walking (a), ramp ascent (b), and ramp descent (c), the toe-off phase exhibits characteristic curved upward trajectories as the foot rotates about the ankle joint to generate forward propulsion. This rotation is visible in the toe trajectories but attenuated in the IMU position, reflecting the natural gait pattern where the foot pivots during push-off. In contrast, stair ascent (d) shows steep upward toe displacement to clear the step edge from the very first moments of the stride, while stair descent (e) initiates with a controlled downward toe trajectory below ground level, consistent with the foot being lowered onto the next step. The mean trajectories (thick solid and dashed lines) demonstrate consistent patterns within each activity type despite inter-subject variability. The vertical separation between IMU and toe positions reflects the rigid-body offset between the dorsal IMU mounting location and the toe tip, which varies with foot angle and is largest during maximum plantar flexion at toe-off.
To evaluate the real-time activity classification capability of the proposed system, stride-level predictions were analyzed across all five locomotion activities using data from the second participant group. Figure 17 presents the confusion matrix for the five-class activity classification task, evaluated on 7677 strides (LG: 4037; RA: 821; RD: 835; SA: 1017; SD: 970). The system achieved an overall accuracy of 96.08%, demonstrating discrimination across all activity types. The diagonal dominance of the confusion matrix indicates strong class separation, with the majority of strides correctly classified for each activity.
Activity-specific performance metrics are illustrated in Figure 18. Level walking demonstrated the highest performance with 98.9% recall, correctly identifying 3994 of 4037 strides, with a precision of 98.9% and F1-score of 98.9%. Stair descent showed 98.2% recall and 97.9% precision (F1-score: 98.2%), while stair ascent achieved 96.7% recall and 97.6% precision (F1-score: 96.4%). Ramp descent exhibited 95.2% recall and 96.1% precision (F1-score: 96.0%), while ramp ascent showed 93.2% recall and 96.7% precision (F1-score: 93.2%). The primary misclassifications for ramp ascent were 23 strides (2.8%) classified as level walking and 33 strides (4.0%) as stair ascent.
Analysis of misclassification patterns revealed that most errors occurred between activities with similar biomechanical characteristics. The largest confusion was between ramp ascent and stair ascent (33 strides, 4.0% of RA), which share elevated stride patterns. Similarly, ramp ascent was occasionally confused with level walking (23 strides, 2.8% of RA), likely during transition phases or low-incline sections where vertical displacement was minimal. Notably, there was confusion between ascent and descent directions within the same activity type, indicating that the calculated features effectively capture directional movement patterns. The mean precision, recall, and F1-score across all activities were 96.7%, 96.4%, and 96.5%, respectively, demonstrating balanced and consistent performance.
To further characterize locomotion patterns, maximum stride height and stride length were analyzed for each activity (Figure 19). Stair ascent and descent exhibited notably narrower distributions compared with level walking and ramp activities, reflecting the biomechanical constraints imposed by fixed stair geometry. Level walking, ramp ascent, and ramp descent demonstrated broader distributions, indicating greater flexibility in stride adaptation.
Maximum stride height increased progressively with activity demand. Level walking showed the lowest values (0.09±0.02 m), ramp activities fell intermediate (0.16 m for both ascent and descent), and stair activities showed the highest clearance (ascent: 0.39±0.05 m; 0.37±0.03 m). Notably, stair stride heights exceed the actual step rise, reflecting the additional foot clearance margin required during swing phase to prevent tripping. A one-way ANOVA confirmed significant differences across activities (p<0.001), with post hoc Tukey tests showing stair activities differed significantly from all other activity types (p<0.001).
Maximum stride length remained consistent across non-stair activities (level 1.40 m; ramp 1.46 m; ramp 1.38 m), suggesting horizontal progression is largely unaffected by elevation changes. Stair activities showed significantly shorter stride lengths (ascent: 0.64 m; 0.67 m), constrained by stair tread depth.
Comparing stair ascent and descent, stair descent produced 6.3% greater maximum stride height than ascent (0.353±0.035 m vs. 0.332±0.036 m; Wilcoxon signed-rank test, p=0.001), reflecting increased toe clearance requirements when moving downward. In contrast, stride length showed no significant difference between directions (p=0.12), indicating horizontal progression remains constrained by stair geometry regardless of direction.
The statistically significant differences in heel strike velocity error across activities demonstrate its validity as a criterion for activity recognition. This parameter serves not only to distinguish level walking from non-level activities, but also to differentiate between ramp and stair locomotion and their respective directions. The sign of the bias indicates movement direction, with positive values corresponding to ascending activities and negative values to descending activities. The magnitude of heel strike velocity error was greater during ramp descent compared with ramp ascent, though this difference approached but did not reach statistical significance (p=0.072), suggesting a moderately increased heel strike impact during downhill ramp walking. In contrast, stair descent exhibited significantly larger bias magnitude than stair ascent (p<0.001), indicating a substantially greater heel strike impact during downward stair negotiation. These findings demonstrate that heel strike velocity error magnitude directly reflects the mechanical impact characteristics of heel contact during different locomotion tasks. The elevated impact forces during descent activities, particularly stair negotiation, may have important implications for fall risk assessment and prevention strategies.
The first validation experiment assessed cumulative vertical displacement accuracy. As shown in Figure 10 and Table 1, measured heights matched the actual dimensions with a mean absolute error of 0.42% across all conditions. For ramp negotiation, the model estimated 0.96 m (ascent) and 0.97 m (descent) against the actual 0.96 m elevation, with narrow confidence intervals (±0.12–0.14 m) and non-significant deviations (p>0.32). This accuracy persisted despite an intermediate-level platform, demonstrating that ZHC correction maintains height reference when brief level segments interrupt continuous ascent or descent. Stair negotiation estimates of 1.92 m (ascent) and 1.91 m (descent) aligned with the actual six-step height of 1.92 m, with tighter confidence intervals (±0.09–0.11 m) likely reflecting the constrained geometry of stair negotiation.
The marginally higher height error observed for ramps compared with stairs may appear counterintuitive given the greater impact dynamics of stair gait. However, ramp ascent and ramp descent achieved the lowest classification accuracies (Figure 17) among all activities (93.2% and 95.2% respectively), owing to their biomechanical similarity to level walking. When a ramp stride is misclassified as level walking, the full constraint system enforcing zero height change is incorrectly applied, directly introducing height error. Stair ascent and stair descent achieved higher accuracies (96.7% and 98.2%, respectively), so the correct reconstruction model is applied more consistently, yielding lower cumulative height error despite higher impact dynamics.
Comparable accuracy across ascent and descent directions (maximum error 1.04%) indicates bidirectional reliability essential for real-world applications. Traditional ZUPT-based methods would accumulate substantial drift over these extended traversals, particularly during multi-step stair sequences, highlighting the ZHC approach’s advantage for maintaining long-term vertical position accuracy.
The main objective of this experiment was to demonstrate that the natural safety margin during obstacle crossing is an order of magnitude larger than the variability in vertical displacement estimation using our method. We assessed foot clearance detection during obstacle avoidance, quantifying heights for three obstacles (14 cm, 22 cm, 28.5 cm) as 0.295 m, 0.385 m, and 0.469 m, respectively (Figure 11). All measured clearances significantly exceeded actual obstacle heights (p<0.001), with safety margins ranging from 15.5 to 18.4 cm. These margins reflect natural adaptive gait behavior, where individuals elevate their feet substantially above obstacles to reduce tripping risk.
The system successfully detected clearance margins above all three obstacle heights, confirming that the real-time height estimation provides sufficient resolution to distinguish safe from insufficient clearance. This capability could enable haptic or auditory alerts between strides when estimated clearance falls below a predefined safety threshold, providing an inter-stride feedback signal to modulate foot clearance behavior in the subsequent step.
The reconstructed foot trajectories, following heel strike velocity error calculation and activity detection, demonstrated distinct patterns for each activity type. Notably, the model captured transitional stair negotiation cases, such as entering or exiting the stair environment, which involve traversing a single step height rather than the typical two-step pattern of continuous stair climbing. As shown in Figure 12, these single-step transitions exhibited trajectories that closely resembled ramp ascent or descent patterns. This can highlight the model’s ability to distinguish between normal stair negotiation and its transition moment. The validation results in Figure 13 demonstrate accurate stride height estimation. Level walking stride height of 0.000±0.029 m confirms the effectiveness of ZHC correction in maintaining ground reference. The measured stair ascent stride height (0.342 m) matched the expected value of twice the individual step rise (2×0.17 m =0.34 m) with only 0.6%. Note that the stride height of ∼0.34 m reflects two steps of 0.17 m per stride on the main staircase, not the individual step height. The slightly larger deviation for stair descent (2.4%) likely reflects the inclusion of transition strides at staircase entry and exit points, which involve single-step traversal rather than full two-step rise. The ability to quantify these stride parameters in real-time enables assessment of foot clearance adequacy and stride variability, which could inform adaptive feedback strategies.
The marginally higher errors observed for non-level activities (0.05–1.04%) compared with level walking (0.00%) are consistent with the reduced 3×3 constraint set, where verror,hs cannot be explicitly estimated and is instead absorbed into abias, introducing a small residual error that is absent in the full 4×4 level-walking system.
It should also be noted that both the staircase and ramp included short intermediate level-walking plateaus, during which the ZHC constraint re-engages and corrects any residual vertical drift, providing natural drift reset points that further bound cumulative height error.
As shown in Figure 14, the foot height during level walking segments remains at a consistent reference level throughout the trial, before ascending the stairs and ramp, at intermediate platforms, and after returning to ground level. This height consistency at ZVP on level ground validates the proposed method’s ability to maintain accurate vertical position estimation. This consistency could not be achieved using traditional ZUPT-based methods due to cumulative drift in vertical position estimation [33,63]. The proposed Zero Height Clearance (ZHC) method effectively eliminates this drift, maintaining an accurate height reference across the entire walking sequence without requiring external position resets.
The model demonstrates sensitivity to activity changes, identifying even brief level walking segments at intermediate platforms. The experimental environment included rest areas at both the middle of the ramp and stair configurations, where participants briefly walked on flat ground. The model classified these short plateau regions as level walking, demonstrating its ability to capture transient activity transitions. Notably, the ramp plateau appears shorter in duration compared with the stair plateau, accurately reflecting the actual geometry of the test environment. This real-time adaptability to changing activity conditions is critical for fall prevention applications, where timely detection of environmental transitions enables appropriate adjustment of haptic feedback or alert parameters to match the current locomotion context.
The rigid body transformation could extend the kinematic model from the IMU to the toe, the most relevant landmark for clearance assessment. As shown in Figure 15 and Figure 16, the toe exhibits more pronounced curved paths during the swing phase, particularly at toe-off, due to larger displacement arcs produced by ankle rotation at this distal position.
The vertical separation between IMU and toe positions (5–15 cm) varies with foot orientation, reaching a maximum during toe-off at peak plantar flexion. This highlights why toe position provides more relevant clearance information than IMU position alone. The distinct patterns in Figure 16 demonstrate activity-specific foot level walking and ramp activities show curved toe-off trajectories for forward propulsion, while stair ascent exhibits immediate upward toe trajectories to clear steps, and stair descent shows controlled downward motion. The consistency of mean trajectories across participants indicates the transformation maintains accuracy across different foot sizes and gait patterns. Beyond clearance monitoring, toe trajectory information could assess ankle mobility during toe-off or detect changes in minimum clearance that may reflect fatigue or declining strength. Finally, real-time toe position serves as a metric for tripping risk assessment in gait training applications. Furthermore, the absence of significant differences between IMU and toe stride heights across all activities confirms that the kinematic accuracy validated at the IMU location transfers to the toe under the rigid-body assumption, providing the validation of the toe position estimates.
The activity recognition system achieved 96.08% overall accuracy across five locomotion activities, demonstrating real-time capability to distinguish walking environments using heel strike velocity error and kinematic features. Level walking exhibited the highest performance (98.9% F1-score) due to its minimal vertical displacement and consistent stride patterns. Stair activities achieved strong performance (ascent: 96.4%; 98.2%), with descent’s higher accuracy likely reflecting more pronounced heel strike impact and greater vertical clearance that provide clearer discriminative features.
Ramp activities showed comparatively lower but still adequate performance (ramp 93.2% F1-score; ramp 96.0% F1-score). The primary misclassifications for ramp ascent were confusion with stair ascent (4.0%) and level walking (2.8%). The confusion between ramp ascent and stair ascent is expected given their shared characteristics of upward movement and elevated stride height. The confusion with level walking likely occurs during transition phases at ramp entry and exit points, or on low-incline sections where vertical displacement approaches that of level ground. The presence of intermediate-level platforms within the ramp section may also contribute to these misclassifications during brief plateau segments.
This transition-related misclassification pattern extends across all activity pairs in proportion to their biomechanical similarity, including ramp descent misclassified as stair descent (17 strides, 2.0%) and stair ascent misclassified as ramp ascent (29 strides, 2.9%), consistent with findings reported by Wang et al. [33] and our prior work [48], confirming that transition-related misclassification is a known inherent challenge in stride-by-stride terrain classification rather than a specific limitation of the ZHC formulation.
The absence of confusion between ascent and descent directions within the same activity type validates the effectiveness of using signed heel strike velocity error as a directional indicator. The sign of this parameter (positive for ascent, negative for descent) provides clear directional information that prevents misclassification between opposing movement directions. The stride-by-stride independence of the ZHC framework ensures robustness at terrain transitions, since verror,hs is re-estimated freely at every stride boundary without memory of previous classifications, making any misclassification self-correcting within one stride.
The analysis of stride metrics demonstrates the model’s ability to extract biomechanically relevant parameters to assess foot clearance. The distribution characteristics in Figure 19 reveal how environmental constraints influence gait variability across activity types. The narrower distributions observed for stair activities than for level walking and ramp locomotion reflect the geometric constraints of stair negotiation, in which participants must conform to fixed step dimensions. Level walking and ramp activities exhibited broader distributions, indicating greater flexibility in stride adaptation.
The maximum stride height values for stair ascent (0.39 m) and descent (0.37 m) exceed the actual stair height due to the toe clearance margin required during the swing phase. The significantly greater maximum stride height during stair descent compared with ascent (p<0.001, Cohen’s d=−0.60) indicates increased vertical clearance requirements when moving downward, likely reflecting a cautious gait strategy to ensure safe foot placement.
Stride length remained consistent across level walking (1.40 m), ramp ascent (1.46 m), and ramp descent (1.38 m), suggesting that participants maintained similar horizontal progression despite elevation changes. The ramp inclination did not substantially alter stride length, indicating adaptation occurred primarily through vertical displacement. In contrast, stair activities showed shorter stride lengths (0.64–0.67 m), dictated by stair depth and vertical movement. The lack of difference between stair ascent and descent stride length (p=0.13) indicates horizontal progression remains constrained by stair geometry regardless of direction.
Table 2 summarizes existing IMU-based methods for foot height estimation and activity classification. The primary contribution of the proposed method is real-time, continuous vertical foot position estimation across multiple activity types using a single foot-mounted IMU deployed on a smartphone, a capability absent from all prior work. Activity classification serves as an enabling component of accurate height reconstruction rather than the primary objective.
Most existing methods address either trajectory estimation or activity recognition in isolation, and those that do estimate vertical position are limited to level walking and offline processing. Benoussaad et al. [77] estimated foot clearance during level walking using double integration with drift cancellation, reporting mean errors below 15% against motion capture, but without terrain classification or real-time capability. Jocham et al. [78] achieved an average vertical RMSE of 0.51 cm for foot position trajectories during level walking using foot-mounted IMUs, but were limited to level walking and offline processing. Fehr et al. [26] estimated whole-foot minimum clearance with 95% limits of agreement of ±8.1 mm against optical motion capture using a personalized 3D shoe geometry scan, but required offline processing and were limited to level walking.
Wang et al. [33], the most comparable prior work, achieved foot trajectory reconstruction and terrain classification (99.7% accuracy) across all five activity types using a single foot-mounted IMU, but their method operates entirely offline in MATLAB, precluding real-time deployment. Notably, this offline method still reported mean height errors of 0.95±0.37 cm on ramps and 1.27±1.22 cm on stairs per stride, comparable to the typical MFC magnitude of 1 cm [79], suggesting that precise per-stride MFC quantification is a fundamental challenge for single foot-mounted IMU approaches regardless of processing mode.
For activity classification, Gao et al. [80] achieved 98.5% accuracy across five terrain types including ramps, but without foot trajectory estimation. Kang et al. [81] classified five activities including ramps (94.9%) using a deep CNN, but required three leg-mounted IMUs with no trajectory output. Cheng et al. [82], Moura Coelho et al. [83], Sharafian et al. [48], and Zhou et al. [84] achieved high classification accuracy (98–99%) but none provide foot height estimation or ramp detection. Bhakta et al. [85] developed a real-time slope estimation system but required extensive instrumentation, limiting general applicability.
In contrast, the proposed method achieves real-time vertical foot position estimation with cumulative height errors below 1.1 cm across ramp and stair negotiation, and a mean absolute error of 0.42%, while simultaneously classifying five locomotion activities with 96.08% accuracy at 110 ms latency, all using a single foot-mounted IMU on an Android smartphone.
A direct quantitative comparison of vertical accuracy requires careful interpretation due to differing error bases across studies (Table 2). Jocham et al. [78] reported 0.51 cm RMSE and Fehr et al. [26] achieved ±8.1 mm per-stride accuracy, both restricted to level walking with offline processing. Wang et al. [33], the most comparable prior work, reported per-stride height errors of 0.95±0.37 cm on ramps and 1.27±1.22 cm on stairs using an offline MATLAB implementation. The proposed method achieves cumulative height errors below 1.1 cm (0.42% MAE) across stair and ramp traversals, comparable to Wang et al., while operating in real-time on a smartphone. It should be noted that cumulative and per-stride errors are not directly equivalent metrics, and both are relevant to different clinical applications. The primary advantage of the proposed method over all prior work therefore lies in real-time smartphone deployment across five locomotion activity types using a single foot-mounted IMU, rather than superior per-stride vertical accuracy.sensors-26-03166-t002_Table 2Table 2Comparison of IMU-based foot height estimation and activity classification methods with the proposed system. Height error metrics differ in basis across cumulative traversal error is reported for Wang et al. [33] and the proposed method; per-stride RMSE for Jocham et al. [78] and Fehr et al. [26]; and percentage error against motion capture for Benoussaad et al. [77] Direct numerical comparison across methods should account for these differing bases, as cumulative and per-stride errors are not equivalent metrics.StudySensorsHzActivitiesMethodOutputsNHeight ErrorClass. Acc.LatencyReal-TimePlatformBenoussaad et al. (2016) [77]1 (foot)–LWDouble integration + drift cancelFoot clearance–<15%N/A–NoOfflineGao et al. (2020) [80]1 (foot)–LW, RA, RD, SA, SDElliptical boundaryTerrain6N/A98.5%–Yes–Cheng et al. (2021) [82]1 IMU, 1 FSR–LW, SA, SD, SIICF + KNN/SVMHAR3N/A99.4%5 msYesRaspberry PiKang et al. (2022) [81]3 (leg)200LW, RA, RD, SA, SDDeep CNNTerrain22N/A94.9%–Yes–Moura Coelho et al. (2022) [83]1 (foot)333LW, SA, SDCNN-LSTMTerrain10N/A98%90 msYes–Fehr et al. (2024) [26]1 (foot) + 3D scan128LWZUPT + geometryFoot height3±8.1 mm ^†^N/A–NoOfflineJocham et al. (2024) [78]1 (foot)–LWIMU fusionFoot position–0.51 cm RMSEN/A–NoOfflineWang et al. (2024) [33]1 (foot)128LW, RA, RD, SA, SDHS velocity thresholdTraj., Terrain60.03–1.27 cm/stride99.7%–NoOfflineBhakta et al. (2025) [85]3 IMUs + encoders + loadcell–LW, RA, RD, jogXGBoostSlope, Speed11N/A5.4% error157 msYesRaspberry Pi 4Zhou et al. (2025) [84]1 (wrist)–LW, SA, SD, ST, SI, jogDeepConv LSTMHAR–N/A98.2%2000 msYesArduino NanoSharafian et al. (2025) [48]2 (thigh, foot)60LW, SA, SD, ST, SIKNN (angles)HAR25N/A99%52 msYesAndroidThis study1 (foot)60LW, RA, RD, SA, SDZHC + HS biasFoot height, HAR20****<1.1 cm (0.42% MAE)96.1%110 msYesAndroid****Abbreviation: LW = Level Walking; RA/RD = Ramp Ascent/Descent; SA/SD = Stair Ascent/Descent; ST = Standing; SI = Sitting; HS = Heel Strike; ZHC = Zero Height Change; ICF = Instantaneous Characteristic Features; FSR = Force Sensitive Resistor; Traj. = Trajectory; HAR = Human Activity Recognition; MAE = Mean Absolute Error; RMSE = Root Mean Square Error. ^†^ 95% limits of agreement against optical motion capture.
A further limitation concerns vertical accuracy relative to the typical magnitude of MFC. Previous studies have reported MFC during level walking to be on the order of 1 cm [79], while the stride-level vertical variability of the proposed system (±0.029 m, Figure 13) is larger than this magnitude. This presents limitations for avoiding toe catch during normal level-ground walking, where precise sub-centimeter MFC quantification is required. However, the primary application of our method is obstacle crossing and stair negotiation training, where MFC is substantially greater, on the order of 10 cm or more, as demonstrated in Figure 11, and therefore well within the measurement capability of the proposed system. While cumulative height errors remain low (0.42% MAE), precise per-stride MFC quantification at the 1 cm scale remains challenging with the current implementation, and the system is better positioned for monitoring coarser metrics. At the current accuracy level, the system supports stride height estimation and cumulative stair and ramp height measurement [33] (sub-1.1 cm cumulative error, Table 1), real-time activity classification [48,80], and obstacle clearance detection where safety margins substantially exceed measurement uncertainty [22]. Applications requiring precise per-stride MFC quantification at the sub-centimeter scale [21,79] are not currently supported and represent an important direction for future work.
This study had several limitations that should be considered when interpreting the results. A significant limitation of the present study is the absence of optical motion capture for trajectory validation. Motion capture would provide per-instant trajectory verification and direct validation of minimum foot clearance, which architectural ground truth cannot offer, and we acknowledge that low cumulative error does not guarantee per-instant trajectory accuracy. However, typical camera-based motion capture systems are ideal for treadmill walking or walking in a small capture volume, and are not feasible for long walking trails or walking on stairs or ramps in realistic daily walking scenarios. Furthermore, the reconstructed foot trajectories demonstrate activity-specific shapes consistent with established biomechanical patterns, providing qualitative support for the validity of the reconstruction framework. Future clinical validation should incorporate motion capture in controlled activity subsets to provide per-instant trajectory verification alongside the cumulative accuracy demonstrated here.
As discussed in Section 5.8, the system is not suited for precise per-stride MFC quantification at the sub-centimeter scale, but is better positioned for coarse metrics such as stride height, cumulative height estimation, and obstacle clearance detection where safety margins are substantially larger. Moreover, the 60 Hz sampling rate may limit temporal resolution for capturing fine-scale gait events. The minimum detectable vertical displacement at this sampling rate is approximately 1.37 mm, which can be sufficient for obstacle crossing and stair negotiation applications where MFC is substantially larger, but may limit sub-centimeter level-ground MFC quantification. Higher sampling frequencies could improve trajectory reconstruction and represent a direction for future work; however, vertical accuracy rather than temporal resolution is the primary bottleneck for precise MFC quantification in single foot-mounted IMU systems [33]. Additionally, no post-sensor filtering was applied to the acceleration signal beyond the Xsens DOT onboard processing pipeline. While the sensor’s internal low-pass filtering attenuates high-frequency electronic noise prior to data delivery, residual noise from heel strike dynamics may still propagate into double integration. Future work could explore selective filtering strategies to further reduce integration noise and improve trajectory reconstruction accuracy.
The participant sample was limited to 20 healthy younger adults (10 for training, 10 for testing), which represents a significant limitation in terms of transferability to the primary target population. Older adults, who are the primary target population for fall prevention applications, may exhibit slower gait speed, reduced foot clearance, altered heel strike dynamics, and greater stride variability compared with young healthy adults, all of which could affect ZVP detection reliability, classification accuracy, and kinematic reconstruction performance in ways not captured by the present validation. The present study establishes proof-of-concept performance in a controlled healthy population, and clinical validation with older adults and individuals with mobility impairments such as Parkinson’s disease, stroke, and peripheral neuropathy is a necessary and primary future direction before deployment in fall prevention applications.
The toe position calculation assumed a rigid foot segment, which does not fully capture the natural flexibility of the foot during gait. In reality, the foot undergoes metatarsophalangeal joint flexion during toe-off and may exhibit arch deformation under load. These deformations could introduce errors in toe position estimation, particularly during push-off phases where non-rigid motion is most pronounced.
Furthermore, the experimental environment, while including diverse activity types, was controlled and familiar to participants. Real-world environments present additional challenges, including irregular surfaces, varying stair dimensions, non-standard ramp angles, cluttered spaces, and unexpected obstacles. The model’s performance under these unconstrained conditions remains to be validated. Addressing these challenges will require more robust algorithmic techniques for ZVP detection and activity classification under complex real-world conditions, while preserving the real-time latency performance demonstrated in the present study.
The impact of prolonged use on measurement drift and the effects of different footwear types on kinematic accuracy were not investigated. Finally, the heel strike velocity error calculation and activity classification were developed and tested on the same experimental setup. External validation on independent datasets from different environments and populations is needed to confirm the model’s transferability and robustness.
Classification accuracy is reported at the stride level, and strides within the same participant are not independent observations. While the model was evaluated on a fully held-out testing group not involved in any stage of model development, stride-level metrics may overestimate generalization performance relative to subject-level evaluation, and future work should include subject-level cross-validation across larger and more diverse populations.
Several avenues for future research could address current limitations and extend system capabilities. Clinical validation with older adults and individuals with mobility impairments (Parkinson’s disease, stroke, peripheral neuropathy) is essential to assess performance in target fall prevention populations and enable development of condition-specific models. Enhanced foot modeling incorporating metatarsophalangeal joint motion and arch deformation, potentially using machine learning to estimate non-rigid deformation from midfoot IMU data, could improve toe position accuracy.
Real-world deployment in uncontrolled environments with irregular surfaces, unexpected perturbations, and naturalistic walking patterns remains a primary future direction. Addressing these challenges will require more robust algorithmic techniques for ZVP detection and activity classification under complex conditions, while preserving the real-time latency performance demonstrated in the present study. Long-term studies assessing measurement drift, battery life, user acceptance, and practical feasibility during daily activities will also be essential before clinical deployment. Expanding activity recognition to include turning, backward walking, sit-to-stand transitions, and pre-fall events (stumbles, balance perturbations) would enable more comprehensive monitoring and proactive intervention. Finally, with the ZHC method enabling real-time operation, integration with interventions such as haptic feedback, auditory alerts, or adaptive exoskeleton control could demonstrate clinical utility, with studies examining whether timely alerts reduce fall rates or improve mobility confidence in at-risk populations.
This study presented a real-time, single-IMU system for simultaneous foot height trajectory reconstruction and locomotion activity classification, deployed on a consumer Android smartphone. The Zero Height Change (ZHC) method eliminated cumulative vertical drift during level walking by enforcing biomechanical boundary conditions at stride boundaries, addressing a fundamental limitation of conventional ZUPT-based methods. By leveraging heel strike velocity error as a compact, physically meaningful feature, the system achieved adaptive activity classification across five locomotion activities without requiring multi-sensor configurations or offline processing. Validation results demonstrate an acceptable accuracy of the proposed framework. Cumulative height estimation across extended stair and ramp traversals yielded a mean absolute error of 0.42% against architectural ground truth, confirming long-term vertical position reliability. Obstacle clearance was successfully quantified across all tested heights, and the system achieved 96.08% overall activity classification accuracy with a latency of less than one gait cycle. Together, these contributions represent a meaningful advancement toward practical, wearable gait monitoring systems. The ability to simultaneously measure foot height and classify activity in real-time on a smartphone opens pathways for integration with haptic feedback, auditory alerts, and adaptive assistive devices, supporting broader applications in gait rehabilitation, clinical assessment, and fall prevention. Though at the current accuracy level, the system is suited for coarse foot clearance metrics and cumulative height changes, with precise per-stride MFC quantification at the sub-centimeter scale remaining a direction for future work.