Abstract
Objective
This study aims to validate the reliability and validity of gait analysis using smartphones in a controlled environment.
Methods
Thirty healthy adults attached smartphones to the waist and thigh, while an inertial measurement unit was fixed at the shank as a reference device; each participant was asked to walk six gait cycles at self-selected low, normal, and high speeds. Thirty-five cerebral small vessel disease patients were recruited to attach the smartphone to the thigh, performing single-task (ST), cognitive dual-task (DT1), and physical dual-task walking (DT2) to obtain gait parameters.
Results
The results from the healthy group indicate that, regardless of whether attached to the thigh or waist, the smartphones calculated gait parameters with good reliability (ICC2,1 > 0.75) across three different walking speeds. There were no significant differences in the gait parameters between the smartphone attached to the thigh and the IMU across all three walking speeds (P > 0.05). However, significant differences were observed between the smartphone at the waist and the IMU during the stance phase, swing phase, stance time, and stride length at high speeds (P < 0.05). At the same time, measurements of other gait parameters were similar (P > 0.05). Patients demonstrated significant differences in the cadence, stride time, stance phase, swing phase, stance time, stride length, and walking speed between ST and DT1 (P < 0.05). Significant differences were observed in the stance phase, swing phase, stride length, and walking speed between ST and DT2 (P < 0.05).
Conclusions
This study demonstrates the feasibility of using built-in smartphone sensors for gait analysis in a controlled environment.
Introduction
Gait, a potential non-invasive biomarker, reflects an individual's movement characteristics. Standard gait parameters include stride length, cadence, and walking speed. 1 Studies have found that spatiotemporal gait parameters can reflect an individual's health status, 2 cognitive level, 3 risk of falling, 4 and quality of life, 5 thus playing a significant role in clinical diagnosis and health assessment. Gait analysis enables the evaluation of gait status through the quantitative analysis of spatiotemporal parameters. Standard gait analysis methods include visual, sensor-based, and other combined/hybrid methods. 6 The visual method extracts gait features from video data of walking. 7 Sensor methods (such as pressure sensors 8 and inertial measurement units 9 ) provide information about gait by analyzing real-time sensor data during walking. Although these methods can provide professional and comprehensive results, they generally apply to clinical or laboratory settings, requiring specialized equipment and assistants, making them inaccessible to many users. Therefore, there arises a necessity to develop low-cost, portable mobile tools for quantitative gait assessment.
In recent years, the use of smartphones in the medical and health fields, particularly in motion monitoring, has increasingly expanded. Studies have shown that smartphones can effectively measure and quantify human body motion. 10 Furthermore, multiple studies demonstrate the practical application of built-in smartphone sensors such as accelerometers and gyroscopes in gait analysis, covering a range of populations, including healthy adults,11–14 elderly individuals, 15 individuals with multiple sclerosis, 16 and Parkinson's disease patients. 17 Significant progress has been made in gait analysis with smartphones. Still, these studies usually examine a relatively small variety of gait parameters and focus on a single position where the smartphone is fixed or placed on the body. The advantages of this study lie in using the acceleration, angular velocity, and equipment direction data from smartphones to calculate and validate commonly used gait parameters and their applicability to different positions and particular walking patterns, offering high flexibility and adaptability. For the first time, smartphones and WeChat mini-programs have been integrated for gait analysis. This approach leverages the no-download, lightweight, and cross-platform features of WeChat mini-programs, making the process more convenient and more accessible to disseminate.
This study aims to validate the reliability and validity of gait analysis using smartphones among healthy adult populations and evaluate this method's clinical significance within neurodegenerative disease groups. This approach can be a supplementary tool to traditional methods, offering strong support for remote rehabilitation assessments for populations in need or patients with specific diseases. Moreover, promoting this convenient and efficient gait analysis tool helps expand the beneficiary group, especially in resource-limited areas.
Methods
Software platform
We developed a WeChat mini-program named MobileGait, designed to offer users a free, user-friendly, and portable tool for gait analysis. This mini-program is easy to operate, collects real-time sensor data during walking to calculate gait parameters, and presents results intuitively, meeting users’ needs for gait analysis in daily life (Figure 1).

Selected screenshots of the “MobileGait” mini-program. Guide: Provides users with clear usage instructions to ensure correct operation (a). Gait: Users choose the position and walking task; the mini-program collects sensor data during walking, calculates gait parameters, and presents results (b and c). Records: Archives historical data (d). My: Manages user information (e).
The rationale for choosing the WeChat mini-program platform for developing our gait analysis tool is multifaceted: WeChat mini-programs do not require downloading or installation, thus minimally impacting the smartphone resources, providing a convenient and lightweight user experience and supporting cross-platform operation. Meanwhile, WeChat covers many user groups, providing a broad and stable user base for WeChat mini-programs and facilitating easy dissemination.18,19 WeChat mini-programs also offer a rich array of APIs, 20 reducing development costs.
Participants
Participants were divided into healthy individuals (HD) and cerebral small vessel disease (CSVD) patients.
HD: This study focused on demonstrating the feasibility of gait analysis using smartphones and was thus completed in a relatively small cohort of healthy young adults.10–14 We chose young, healthy adults as the experimental cohort based on their ease of cooperation and ability to perform standardized gait tests in experimental settings with complex equipment configurations; they can provide controllable and reliable gait patterns at different walking speeds. This study recruited 30 young, healthy adults (16 males and 14 females; age 26.400 ± 1.545 years; height 172.333 ± 8.314 cm; weight 65.370 ± 11.357 kg). Inclusion criteria: (a) age greater than 18 years old and (b) ability to walk continuously for at least 10 m without assistance from others or walking aids. Exclusion criteria: (a) presence of acute illnesses; (b) history or symptoms of mental or neurological disorders, physical or orthopedic injuries, or specific deficits in motor control; (3) hospitalization records within the past 6 months; and (4) presence of uncorrectable visual impairments.
CSVD: To evaluate the clinical significance of the method proposed in this study among neurodegenerative disease populations, this research recruited 35 patients (23 males and 12 females; age 71.133 ± 8.585 years; height 169.067 ± 7.871 cm; weight 71.100 ± 10.253 kg) with CSVD from the Department of Neurology at the Affiliated Zhongshan Hospital of Dalian University. All patients underwent head magnetic resonance imaging (MRI) examinations, including T1-weighted images, T2-weighted images, diffusion-weighted imaging, and fluid-attenuated inversion recovery sequences. The Fazekas scoring system was used to grade the load of white matter lesions, 21 with scores ranging from 1 for punctate lesions, 2 for early confluent white matter changes around the ventricles and in the deep white matter, to 3 for diffuse involvement of the entire white matter. Inclusion criteria: (a) a Fazekas score ≥ 1, confirming the presence of CSVD, (b) the ability to cooperate with neuropsychological and motor examinations without the need for verbal and behavioral assistance at the time of testing, and (c) voluntary participation in this study, with patients or their family members signing informed consent forms. Exclusion criteria: (a) concurrent cerebral infarction, hemorrhage, brain tumors, or other diseases; (b) white matter lesions caused by inflammatory reactions, metabolic or toxic encephalopathy; (c) severe mental illnesses such as anxiety, depression, or other psychiatric disorders; (d) cognitive impairment caused by non-vascular factors such as Alzheimer's disease and Parkinson's disease; (e) inability to cooperate with the examination due to language, visual, or auditory impairments; and (f) concurrent severe coronary heart disease, chronic obstructive pulmonary disease, asthma, osteoarthritis, or other systemic diseases.
The Ethics Committee for Scientific Research Projects of the Affiliated Zhongshan Hospital of Dalian University approved the study. All participants gave written informed consent.
Experimental design
HD: Considering the weight and size of the smartphone, placement near the foot could interfere with standard gait patterns. Therefore, the waist and thigh positions were prioritized for data collection. As shown in Figure 2, two smartphones (iPhone 13) were attached to the waist and thigh, while an inertial measurement unit (N200, WHEELTEC, China; sampling rate: 100 Hz) was fixed at the shank as the reference device for validation purposes. Each participant was asked to walk six gait cycles at self-selected10,12–14,17 low, normal, and high speeds along a flat corridor. Normal speed walking is defined as walking at a comfortable speed, high-speed walking is preferred, and as fast as possible, and low-speed walking is defined as walking cautiously.

The smartphones are attached with belt-like Velcro straps, one to the waist near the L3 vertebrae (A) and the other to the lateral position of the right thigh where the Z-axis of the smartphone is parallel to the side-to-side direction of walking; using an elastic strap, the IMU was fixed at the lateral side of the shank near the ankle (B). The XYZ axes represent the sensors’ three axes.
Although foot switches or pressure insoles are generally considered the gold standard among wearable sensors, the IMU sensors can allow detailed kinematic information of the gait. 22 Furthermore, gait event detection through angular velocity from the IMU sensor placed on the shank or foot has been as accurate as foot switches in estimating times of heel strike and toe-off for gait patterns. 23
CSVD: Patients attached the smartphone to the thigh and completed three gait trials on a 10-m-level flat corridor. The first trial was single-task walking (ST), which is regular walking. Dual-tasks were divided into cognitive dual-task and physical dual-task, where a cognitive dual-task involves completing a cognitive function training while performing a motor function training, and a physical dual-task consists of constructing a posture control training while conducting a motor function training. In the second trial, cognitive dual-task walking (DT1), patients were asked to name fruits or animals they knew while walking. The third trial, physical dual-task walking (DT2), required patients to carry a tray with a water bottle with both hands to keep it from tipping over during walking.
Data collection and processing
MobileGait collected triaxial acceleration (
Gait event detection
The simplest computational method for detecting gait events is thresholding. As shown in Figure 3, the sagittal plane angular velocity signal from the IMU on the shank presents two negative peaks at the heel strike and toe-off events. This simple rule for identifying heel strike and toe-off events 26 has achieved high detection accuracy, 23 and the detection success was over 98%. 27

Sagittal plane (Z) angular velocity signals derived from the IMU fixed at the shank.
During the smartphone data collection phase, the raw sensor data may be subject to noise interference due to body jitter, device deviation, and other factors. Kalman filtering and Gaussian filtering are used to remove the noise. By analyzing the acceleration

Acceleration data derived from the iPhone 13 attached to the waist.

Angular velocity data derived from the iPhone 13 attached to the thigh (a). Thigh angle (b).
To accommodate particular walking patterns, such as intermittent walking, the algorithm initially sets a threshold based on statistical characteristics (mean and standard deviation) of the selected sensitive axis sensor data during walking, combined with peak detection, to identify all heel strike points. Next, the algorithm compares the time intervals between adjacent heel strike points to differentiate between regular and particular walking patterns. Suppose the detected interval significantly exceeds the statistical threshold of regular walking intervals. In that case, these heel strike points are considered non-standard walking patterns and excluded in subsequent analysis. The statistical threshold is a multiple of the median of the time differences between all adjacent heel strike points, as shown in Equation 1. This method retains only regular walking patterns, enhancing the adaptability of gait analysis.
Calculation of gait parameters
As shown in Figure 6, the gait cycle is divided into two phases: stance and swing. The heel strike of the same foot marks the beginning of the stance phase, while the toe-off indicates the end of the stance phase and the beginning of the swing phase.

The phases of the normal gait cycle.
Based on the heel strike point ( Cadence: The number of steps taken per minute. There are two steps in a single gait cycle, and the cadence is a measure of half-cycles. Each occurrence of the heel strike represents one step. Stride time: The duration from the heel strike of one foot to the next heel strike of the same foot. Stance phase: This phase begins with the heel strike of one foot and ends when the toe of the same foot leaves the ground. Swing phase: This phase starts when the toe of one foot leaves the ground and ends when the heel of the same foot strikes the ground. Stance time: The gait cycle duration when the foot is in contact with the ground. Swing time: The gait cycle duration when the foot is off the ground. Stride length: The distance covered from the heel strike of one foot to the next heel strike of the same foot.
To accurately estimate walking distance at different walking speeds, this study adopted a linear regression model based on walking speed to achieve an adaptive estimation of walking distance.
30
First, the triaxial acceleration data is processed to calculate the modulus, eliminating the influence of the smartphones in different orientations.
Due to the variations in motion patterns sensed by the smartphone when attached to different positions, we established separate linear models for each position. 8. Walking speed: This parameter was computed as the mean of the ratios of stride length to stride time.
Statistical analysis
HD: During validation, this study excluded each walk's initial and final gait cycles to avoid data bias caused by acceleration and deceleration. For gait parameters with a normal distribution (Shapiro–Wilk test, P > 0.05), values are represented as mean ± standard deviation, and differences between two systems are compared using the independent sample t-test. For non-normally distributed gait parameters, values are presented as median (quartile, Q1 ∼ Q3), and differences between the two systems are compared using the Mann–Whitney U test. The significance level is set at 0.05. The reliability of gait parameters measured by the smartphone and the IMU was assessed using the intraclass correlation coefficient (ICC2,1). According to general evaluation standards, ICCs are categorized into several levels: ICC < 0.5 indicates poor reliability, 0.5 ≤ ICC < 0.75 is considered moderate reliability, 0.75 ≤ ICC < 0.9 indicates good reliability, and ICC ≥ 0.90 denotes excellent reliability. 32 The Bland–Altman plots demonstrate the deviation between two different measurement systems, comparing the average difference between the gait parameters calculated by the smartphone and the IMU, verifying validity. 33
CSVD: Since single-task and dual-task walking gait parameters follow a normal distribution (Shapiro–Wilk test, P > 0.05), the paired-sample t-test is used to compare the differences in gait parameters between the single-task and dual-task conditions. The significance level is set at 0.05.
Results
Table 1 presents the distribution of the results and standard error of gait parameters measured by the smartphones and the IMU in HD. Table 2 demonstrates that regardless of the positions—either the thigh or the waist—the smartphone's gait parameters show good reliability at three different walking speeds (ICC2,1 > 0.75, all P < 0.001). At slow and normal speeds, both thigh and waist positions exhibit excellent reliability (ICC2,1 > 0.9). The ICCs for the thigh are higher than the waist. Bias indicates lower values at the thigh than at the waist. There are no significant differences in the gait parameters between the smartphone attached to the thigh and the IMU across three walking speeds (P > 0.05); similarly, no significant differences exist between the smartphone attached to the waist and the IMU at low and normal speeds (P > 0.05), though significant differences are observed in the stance phase, swing phase, stance time, and stride length at high speeds (P < 0.05), with other gait parameters showing similar measurements (P > 0.05). Figure 7, analyzed using the Bland–Altman plots, indicates good consistency in smartphone measurements at different walking speeds, both at the thigh and waist, with most differences falling within the acceptable consistency limits. Furthermore, this study also compared the measurement results from smartphones attached to the thigh and waist, showing that gait parameters measured at three different walking speeds exhibit excellent reliability (ICC2,1 > 0.9, all P < 0.001). Measurements of all gait parameters between the two positions are similar (P > 0.05).

Bland–Altman plots the overall agreement between the smartphones attached to the thigh and waist and the IMU across different walking speeds (low, normal, and high). The dashed gray line represents the overall mean difference across all conditions, while the dashed red lines provide the limits of agreement (±1.96 SD) based on the pooled data.
Differences in gait parameters between the smartphones attached to the thigh and waist and the IMU.
Reliability and validity of gait parameters obtained from the smartphones attached to the thigh and waist compared to the IMU.
Bias: mean difference (Smartphone − IMU).
P < 0.05.
To investigate the impact of variations in walking speed on the bias of gait parameters measured by smartphones, this study employs regression analysis using the ols function from the statsmodels.formula.api library in Python and calculates the P-values. Specifically, walking speed is treated as the independent variable, with the bias (smartphone − IMU) as the dependent variable. This analysis aims to determine whether there are significant differences in the mean values of gait parameter biases across different speed categories. The significance level is set at 0.05. Table 3 shows no significant differences in the mean biases of gait parameters measured by the smartphones and the IMU across different walking speed categories (P > 0.05).
Regression analysis results for gait parameters with the smartphones attached to the thigh and waist and the IMU.
Parameter: Each gait parameter here includes three different walking speeds (low, normal, and high). Each gait parameter is subjected to regression analysis with the corresponding walking speed.
CSVD patients only chose the thigh position for gait trials to minimize the walking burden on patients. Table 4 shows that there were significant differences (P < 0.05) in gait parameters (cadence, stride time, stance phase, swing phase, stance time, stride length, and walking speed) between ST and DT1 in the CSVD patients. Significant differences in gait parameters (stance phase, swing phase, stride length, and walking speed) were observed between ST and DT2 (P < 0.05).
Paired t-test comparison between ST and DT1 and ST and DT2.
P < 0.05.
Discussion
This study initially validated the spatiotemporal gait parameters of gait analysis based on smartphones across different walking speeds and body positions in healthy adults. The findings demonstrate that the method proposed in this study possesses good reliability and validity. Subsequently, CSVD patients attaching the smartphone to the thigh underwent single-task, cognitive dual-task, and physical dual-task gait trials to assess the potential value of this method in clinical applications.
Previous studies have evaluated the reliability of a single commercial IMU for spatiotemporal gait parameter measurement when attached to the waist, thigh, and other body positions.34,35 One study compared the placement of smartphones on the body in a bag, belt, hand, and pocket at different speeds (comfortable, slow, and fast), but this research was limited to step length, step time, gait velocity, and cadence. 13 Another study showed that the smartphone placed in the front pocket could provide accurate stride time data during normal and dual-task walking, though the results were limited to this parameter. 11 While carrying a smartphone in a front pocket offers more convenience, one must note that in real-world settings, the stability of a smartphone in a pocket can be affected by the tightness of clothing and variations in walking speed, potentially increasing data collection uncertainty and affecting the calculation results. Although this study did not validate the gait analysis results with the smartphone placed in a pocket, MobileGait still provides a pocket option as a suboptimal choice. The data processing method for pocket placement is similar to that for the thigh, with the smartphone's X-axis angular velocity integrated to calculate the thigh angle for gait parameter computation. Most current studies use methods similar to this study, employing tools such as an elastic belt,10,14,36 a non-elastic Velcro belt, 12 a belt,13,15 and an elastic band, 37 to attach the smartphone to the waist or lower limb areas, proving the feasibility of such methods. However, in practical applications, users need to prepare the appropriate securing tools in advance, and precise placement may require assistance or supervision from others. In HD, we found that the reliability of gait parameters at the thigh position was superior to that at the waist. This was an expected finding since sensors that are in closer proximity to the foot-ground contact point have been already shown to be facilitated in gait event detection. 38 It should be noted that the WeChat mini-program platform used in this study imposes a maximum sampling rate of 50 Hz for sensors such as accelerometers and gyroscopes. In contrast, most current studies’ sampling rate for smartphone sensors typically reaches 100 Hz.11,13,14,17,37 Although higher sampling rates can more frequently record data and capture rapid movement changes more accurately, they may also introduce more noise. 39 Therefore, the accuracy of gait analysis with the smartphone in a pocket and the impact of sensor sampling rate on the accuracy of gait analysis still require further investigation.
This study is the first to utilize built-in smartphone sensors for gait analysis in CSVD patients, exploring the differences in gait parameters between single-task and dual-task walking. The results indicate significant differences in specific gait parameters between single-task walking and dual-task walking in CSVD patients, with cognitive dual-task having a more pronounced impact on the walking of the patients compared to physical dual-task. According to the central capacity-sharing theory, 40 attentional resources are limited. When two attention-demanding tasks are performed simultaneously, allocating attentional resources to both tasks leads to a decline in performance in at least one task, indicating an early sign of insufficient daily living abilities. CSVD patients performing a cognitive task while walking often exhibit reduced walking efficiency and (or) cognitive performance. With more attention to cognitive tasks, gait abnormalities become more pronounced. 41 Therefore, dual-task walking helps in the early identification of gait changes in CSVD patients, reducing the incidence of falls and lowering the mortality rate. Previous research has shown that physical therapies such as physical training, dual-task training, and walking training significantly improve gait disorders in patients with mild cognitive impairment, Parkinson's disease, and stroke. 42 By integrating gait, cognition, and physical training, smartphones are expected to provide a new, portable tool for remote rehabilitation management of CSVD and other neurodegenerative diseases.
This study validated commonly measured gait parameters using smartphones. Smartphones improved adaptability and flexibility by varying the attaching positions and walking speeds. Attaching the smartphone to the waist helps reduce the burden of gait measurement, attaching it to the thigh provides more accurate measurement results, and placing it in the pocket offers better usability. Furthermore, additional information, such as symmetry and variability of gait parameters, can be derived based on the gait parameters calculated by smartphones in this study. This research enhances the portability of gait analysis, making it accessible to a broad user base and as a supplementary tool to current high-cost professional equipment. Users can obtain clinically valuable spatiotemporal gait data without sensor calibration by simply attaching the smartphone to the corresponding body part and starting to walk.
The present study has several limitations. The current research results are limited to controlled laboratory settings, but MobileGait is not restricted to such conditions. Walking environments in daily life are uncertain, featuring factors such as uneven surfaces, inclines, turns, and the necessity for evasion, all of which could impact the gait analysis results. Future studies must test the algorithm's efficacy in a broader range of environmental conditions to ensure applicability and reliability in the real world. MobileGait offers methods applicable to specific walking patterns, such as intermittent walking. However, comparative studies of such walking patterns or other specialized gait patterns still need to be improved, necessitating additional validation studies to assess the feasibility of the application's gait analysis across different walking patterns and individuals with gait pattern abnormalities. Current studies primarily utilize single, short-duration gait collection. Long-term, continuous gait monitoring is needed, especially in clinical applications. The studies mainly focus on healthy young individuals and CSVD patients, with relatively small sample sizes. To validate the method's applicability and accuracy across various populations, expand the sample size and include individuals with different gait abnormalities, such as the elderly and other disease groups (e.g., Parkinson's disease, Alzheimer's disease). Furthermore, smartphones attached to the body with belt-like Velcro straps may yield different results when measuring unconstrained and more natural mobility. Additionally, factors not addressed in this study, such as sensor sampling rates, sensor accuracy, smartphone performance, and participant characteristics (e.g., weight, height, or gender), may impact the accuracy of calculating gait parameters, thus warranting consideration in future research.
In future work, we will continue to explore factors affecting the accuracy of smartphone gait parameter calculation, further refine this method, and, most importantly, apply it to remote monitoring of specific disease populations.
Conclusion
This study demonstrates the feasibility of using built-in smartphone sensors for gait analysis in a controlled environment. Utilizing smartphones in conjunction with the WeChat mini-program as a gait analysis tool offers a portable method for quantitative gait analysis, reducing the dependence on high-cost professional equipment. This method can provide crucial data support for personal health management and remote rehabilitation monitoring.
Footnotes
Acknowledgments
The authors extend their heartfelt gratitude to Shengjie Zhang, Xiaoyao Liu, Jiahao Wang, Zhen Wang, Wenhe Liu, Yuying Wang, and Kaiyue Xu for their invaluable assistance in data collection. We also express our sincere thanks to all the participants who took part in this study.
Contributorship
ST provided ideas for the research and demonstrated leadership in guiding the research direction. HZ conducted the experiments, performed data collection and analysis, and developed the software platform and the algorithm. LWK provided additional assistance, including literature review, experimental support, and guidance on manuscript writing. YS contributed expertise in hardware technology to this research. JZ provided medical area expertise, advice on experimental design, and funding support. ST and HZ wrote the first draft of the manuscript. All authors reviewed and edited the manuscript and approved the final version of the manuscript.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Ethical approval
This study was approved by the Ethics Review Committee for Scientific Research Projects of Affiliated Zhongshan Hospital of Dalian University (REC number: KY2023-103-1).
Funding
The authors disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Key R&D Program of China, the Interdisciplinary Project of Dalian University (grant number 2023YFC3605300, DLUXK-2023-QN-004).
Guarantor
JZ.
