1. Introduction
Shoes have been a vital component of our everyday lives and one of our greatest inventions for millennia. They were initially created to help protect our feet and provide us with safety from harmful environments or harsh conditions. Archaeological findings indicate that the earliest footwear dates back to 30,000 to 40,000 years ago [
1,
2,
3], with discoveries in Upper Paleolithic cave sites across Europe, such as Grotte de Fontanet in France [
4,
5] and the Sunghir site in Russia [
6,
7], as well as in Tianyuan cave in China [
8,
9]. The oldest known footwear recovered, sandals made of grass and woven sagebrush bark, were found in North America around 6,500 to 9,000 years ago at sites like Fort Rock Cave in Oregon [
10,
11,
12,
13], and Arnold Research Cave in Missouri [
14]. Thousands of years later, in the modern world, shoes have been widely adopted almost everywhere, and their designs have been improved so much to be more comfortable, more durable, and better looking that they are no longer simple pieces of clothing for protection but have been developed into symbols of fashion and a crucial aspect of our lives. Nowadays, in an era characterized by unprecedented advancements in technology, the significance of footwear extends far beyond its traditional roles of providing safety and complementing fashion. Footwear is evolving into a tool with immense potential to enhance human health and well-being. This evolution has given rise to the idea of ’smart shoes’, devices that are capable of tracking your activities and a multitude of health-related metrics.
Smart shoes have the ability to revolutionize the way we interact with our footwear due to their advanced functionality and practical applications. They are often equipped with an array of sensors like pressure sensors, magnetometers, temperature sensors, and gyroscopes [
15], which can help us monitor our health, improve our athletic performance, and even prevent injuries. In healthcare, smart shoes can be used to track a patient’s gait and mobility, allowing early detection of diseases such as Parkinson’s [
16] and Alzheimer’s [
17,
18] or identifying anomaly in walking patterns to support for individuals contending with conditions like partial paralysis [
19]. Early identification of these issues allows individuals to seek treatment sooner, which may avoid further complications. This is particularly beneficial for patients with mobility disorders or those in rehabilitation, as they provide healthcare professionals with detailed insights into their patients’ progress and needs, offering precise feedback on information such as weight distribution or walking symmetry [
20]. Moreover, their applications also encompass the intricate nuances of human locomotion by monitoring and analyzing our gait patterns and balance, which can be key tools in detecting the risk of falls or potential injury [
21,
22]. They continuously monitor the wearer’s walking patterns and can alert caregivers or medical professionals to any irregularities, thus ensuring timely intervention and care. The utility of smart shoes is not confined to injury prevention alone. This intelligent footwear is versatile and proficient in meticulous movement tracking and calorie expenditure calculation, as shown in [
23,
24]. In the realm of sports and fitness, smart shoes have become invaluable tools for athletes and fitness enthusiasts, offering data of various parameters like stride length, movement speed, foot strike pattern, and overall performance [
25], thereby aiding in enhancing training efficiency and reducing risk of injury. Furthermore, it assumes the role of providing a deeper understanding of human biomechanics for athletes of all sports dedicated to honing their proficiency, facilitating personalized training programs and performance improvement, whether on the golf course, tennis court, or ski slope.
Of all the different metrics that can be tracked through the utilization of smart shoes, stride length calculations play a crucial role in various domains, offering insights into human mobility and its implications for health, sports, and technology. Traditionally, stride length was measured manually or through observational techniques. These approaches, while fundamental and simple, were often limited in their application. For instance, they were commonly used in controlled environments like treadmills, where the consistent, flat surface and the restricted area of movement made observation and measurement more manageable as in the case of [
26,
27]. However, these traditional methods are less effective in dynamic, real-world scenarios where stride patterns can vary significantly and the area of movement is not constrained to any specific environment. With the rise in technology, modern methods can utilize sophisticated sensors, motion capture systems, and a variety of algorithms to calculate stride length.
At the center of this technological evolution are wearable devices such as smart shoes and fitness trackers. These devices are often outfitted with a variety of sensors, including Global Positioning System (GPS) technology, which is particularly useful in tracking outdoor activities. In [
28], a GPS system attached to the body of field hockey players was used to track the total distance covered during the span of a game. However, it is pointed out in [
29] that GPS technology itself may not provide sufficient accuracy for high-precision tracking, especially in indoor environments or areas with limited satellite visibility. In such scenarios, Inertial Measurement Units (IMUs) emerge as a more effective alternative, equipped with accelerometers and gyroscopes to collect more precise movement data. By utilizing angular velocity and acceleration data, combined with the use of trigonometry and integration, multiple studies explored measurement of walking speed using an IMU attached to the shank of the users [
30,
31,
32]. Sijobert [
33] expanded more on their methods to focus on stride length calculation within a medical context with patients suffering from Parkinson’s disease. All of the four studies introduced a correction term as well to address the drift effect from integration of acceleration data, ensuring more accurate and reliable measurements. However, a notable limitation in these four studies is their assumption that movement occurs primarily on the sagittal plane, leading to an analysis focused solely on this plane. This limited the scope of these studies to linear vertical movement only. Furthermore, their approach to attaching sensors to the participants’ shank presents challenges in integrating the system into footwear, necessitating users to take an extra step to put on the sensors, leading to a less convenient experience. In [
34], a different approach for calculating stride length that incorporated rotation matrices was introduced. This method allowed measurement of displacement across all three axes, broadening the applicability of the research to more dynamic movements, such as those encountered in various sports. It also incorporated the use of Kalman filter [
35], which effectively estimate the orientation of the IMU in space using the signals from the accelerometer and gyroscope, as also shown in [
36,
37]. Although their inertial sensor was affixed to the shoe by attaching it to the shoelaces, it lacks complete integration into the footwear. As a result, the sensor might shift during physical activity, potentially compromising data collection accuracy. This also renders the system less practical for users due to its configuration. Beyond the mathematical measurement of stride length, advanced statistical and machine learning methods are also being applied in many different studies including artificial neural network (ANN) [
38] and convolutional neural network (CNN) [
39,
40], which yielded quite accurate results. Other methods without the implementation of wearable devices were also explored. In [
41], the authors devised a home sensor system mounted on the wall which could measure the velocity and stride length of people walking within the household using radio signals.
This study proposes a novel implementation of an intelligent footwear system with multiple pressure sensors and an IMU connected to a microcontroller, fully embedded into the sole of the shoe to track the movement of a human subject on a tennis court. Our objective with this system is to gather and analyze data in a way that allows for the real-time calculation of stride length. Additionally, the total distance covered over a given period can be measured as well by taking the summation of the individual stride lengths. This approach represents a significant advancement in the field of gait analysis, offering the potential for more precise and immediate insights into gait patterns and distance of travel covered.
2. Methods
2.1. Experimental Instrumentation
In this study, the Bosch BMI085 IMU sensors [
42], which combine a tri-axial gyrometer and a tri-axial accelerometer, are employed to collect precise movement data of the feet. The BMI085 has a dimension of 4.5 mm x 3.0 mm x 0.95 mm, with the accelerometer measurement range of up to ±16 g, and a gyroscope measurement range up to ±2000 °/s.
Figure 1 (a) shows the IMU device, along with the orientation of its X, Y, and Z axes. For each foot, a BMI085 was seamlessly integrated into the sole of the shoe and connected to an ESP32 microcontroller in a printed circuit board (PCB), which is shown in
Figure 1 (b). The dimension of this PCB is 60 mm x 31 mm x 5 mm. This setup was powered by a 500 mAh battery, capable of sustaining up to two hours of continuous operation. Additionally, the system incorporated six force-sensing resistor sensors, as outlined in [
43], to measure the force exerted to various critical pressure points of the foot. The system was further enhanced with a Wi-Fi module, enabling real-time wireless data acquisition and transmission to a computer that managed the collection process. Special attention was given to the shoe sole modification to ensure that the embedded components were imperceptible to the users, thereby maintaining comfort during use.
Figure 2 illustrates both the side and front views of our shoe sensor system, which is fully embedded into the sole of the shoes. This design ensures that the circuitry is mostly concealed and does not intrude on the user’s experience, maintaining the regular functionality and comfort of the footwear while housing the advanced sensor system.
2.2. Calibration
Most IMUs are prone to some level of drift over time, stemming from the limitations of the sensors they contain. The BMI085 IMU, while cost-effective, is no exception and exhibits certain inherent inaccuracies in its accelerometer and gyroscope readings across the X, Y, and Z axes. In a static state, the IMU’s data can significantly deviate from the expected zero values for angular velocity and acceleration, or 9.81 for vertical acceleration, which corresponds to the force of gravity. To correct the zero-rate offsets, calibration of the IMU sensors is essential. This involves collecting data from the IMU in a stationary position, spanning around 500 samples. During this process, the maximum and minimum values recorded are identified. The mean of these extremes is then computed and serves as the offset for the sensor data. Calibration is then achieved by deducting these offsets from the actual sensor readings during post-processing. This step is vital for ensuring the accuracy of the collected data, which is critical for precise stride length calculations.
Figure 3 provides a visual representation of both the frontal and lateral perspectives of the participant outfitted with the shoe sensor systems during the calibration process. This illustration clearly demonstrates that the sensor systems are seamlessly integrated into the footwear, showing the subtlety of the installation.
2.3. Data Collection
Once the IMU is calibrated, the system is ready to begin the data collection process. An Arduino code utilizing the BMI085 library is employed to communicate with the ESP32 microcontroller and read the acceleration and angular velocity signals from the sensors of the IMU. The data gathered are then transmitted wirelessly to a computer system via the user diagram protocol (UDP) by connecting both the computer and sensor systems to the same Wi-Fi network. This transmission is accomplished through the use of a Python script, which also establishes the system’s connection to the Internet.
In the context of our experimental setup, the participant is a 24-year-old male, with a height of 172 cm and a body mass of 62 kg, wearing athletic footwear of size 9.5 in the U.S. measurement scale. The participant was subjected to performing a series of different movements while wearing the shoe sensor systems on both feet including walking, running, squatting, and lunging. For the purpose of this study, the walking movement is mainly focused on to calculate stride lengths. The participant walked a total ground distance of 120 meters, taking exactly a total of 80 steps with each foot. To facilitate easier data gathering and processing, this distance was segmented into ten smaller distinct experiments. In each of these, the participant took eight steps on each foot to precisely cover a distance of 12 meters. The data collection of these activities was conducted at a sampling rate of 50 Hz. This experiment was carried out on the tennis court complex of The University of Alabama.
Figure 4 showcases the participant performing a sequence of walking movements along the baseline of a tennis court. This visual representation captures the systematic progression of the participant’s steps, offering a clear depiction of the shoe sensor system being utilized within the specific context of a tennis court environment.
2.4. Data Preprocessing
The data collected from both feet are saved into a singular comma-separated values (CSV) file. To be able to differentiate the data between the two feet, an identifier is added into the data, where the data from the left foot is represented by the value of ’1’, and the right foot is represented by the value of ’2’. The data is then separated according to this value, dividing the dataset into left foot data and right foot data.
To facilitate the real-time computation of the horizontal displacement for individual steps, the entire data of the continuous walking motion is broken down into separate, identifiable strides using an algorithm. This segmentation is achieved using gyroscope signals around the x-axis and data from force sensors embedded in the shoe. The process involves identifying key gait events within the collected data, such as heel-raise, mid-swing, heel-strike, and foot-flat movements. These events serve as markers to delineate the start and end points of each stride. The beginning of a stride is identified by analyzing the pressure data from the sensor placed under the big toe. A stride starts when the pressure data reaches peak values, with a set threshold of at least 1285. This peak indicates a significant pressure exertion by the big toe, typically seen during the heel-raise phase of a stride. Conversely, the end of a stride is determined by monitoring the pressure data from the back inside sensor of the shoe. The stride concludes when this sensor records peak values, with a threshold of at least 1290. These peaks generally correspond to the heel-strike phase, where the back part of the foot makes firm contact with the ground. The peaks on each sensor need to be at least 20 samples apart from one another so that any minor movements are not counted as a step.
2.5. Filtering
A second-order forward-backward lowpass Butterworth filter with a cutoff frequency of 10 Hz is applied to the acceleration and gyroscope data to smooth out the signals and average out the Gaussian noises. This filtering technique is particularly effective in eliminating high-frequency noises and artifacts from the data, ensuring a cleaner signal for analysis. A filtering cutoff of 10 Hz is shown to be suitable for mid-stance, heel-strike, toe-off, and mid-swing detection and calculation by keeping a low variance and deviation of zero mean for the timing and magnitude of gait events [
44], which is crucial for accurate gait analysis. The choice of these filter parameters strikes an optimal balance between removing the unwanted noise and preserving the essential characteristics of the gait signal.
2.6. Stride Length Calculation
To precisely measure the linear displacement of each step, it is crucial to identify the linear acceleration component. This requires transforming the collected raw acceleration data, represented as
, into a format that aligns with a reference frame where the Z-axis is in the same direction of gravity, and the Y-axis is along the direction of a forward walking motion. In this study, the key to this transformation lies in the utilization of a rotation matrix, denoted as
, which is derived from a quaternion
, as detailed in [
45]. The use of rotation matrix to calculate stride length is detailed in [
34], with the matrix defined as below:
In the above formula,
are components of the quaternion
mentioned above, which is expressed as:
In our study, the quaternions and rotation matrices were calculated using a Kalman filter sensor fusion algorithm. Once the rotation matrix
was established, it was multiplied with the acceleration signals
to align the sensor data with the predetermined reference frame. Subsequently, the gravitational acceleration
g was subtracted from the transformed acceleration signal, isolating the movement-specific acceleration from the overall influence of gravity. The resultant value represents the horizontal acceleration, denoted as
, and is expressed as below:
In the next step, a process of double integration is applied to the linear acceleration data to determine the distance covered by each step. First, the linear velocity
was calculated using trapezoidal integration with the initial velocity assumed to be 0 m/s (
):
Then, to eliminate the velocity drifts effect from integration of acceleration data, a correction term was introduced to the linear velocity, which corrected the velocity to be 0 m/s at the end of each integration cycle.
where
is the linear velocity at the end of the cycle with
T being the cycle duration. Afterwards, the movement displacement, denoted as
, was calculated by integrating the corrected movement velocity.
Finally, the computation of individual stride length, represented as
, was determined to be the root sum squared of the displacement values across all axes.
The total distance covered for each of the experiment is calculated by taking the summation of all the individual stride lengths.
3. Results
Within
Figure 5, a detailed graphical representation of the acceleration data, which has undergone a thorough post-processing phase, is presented. This data corresponds to a specific sequence of an eight-step walking movement covering a ground distance of 12 meters. The plot illustrates the variations in acceleration across all three X, Y, and Z spatial axes throughout the duration of the experimental observation. By capturing the dynamic changes in acceleration on each of these axes, the figure provides a comprehensive overview of the movement’s biomechanics, allowing for an in-depth analysis of the intricate patterns and fluctuations in acceleration on each data axis that occur during the walking sequence.
Figure 6, on the other hand, offers a detailed look into the post-processed gyroscope data, where the data around the X-axis, which represents the angular velocity of the foot during a forward walking movement, is the main focus. This data provides a comprehensive view of the rotational dynamics involved in walking, allowing for the observation of distinct phases within each stride, including heel-raise, mid-swing, heel-strike, and foot-flat. From the figures, a repeating pattern can be seen, representing the walking steps taken during the experiment.
The scope of our study is constrained due to the inability to accurately measure the actual length of each stride. As a result of this limitation, ground-truth verification of individual stride lengths remains beyond our capability. To overcome this obstacle, we have opted to estimate the total distance travelled throughout the experiment by taking the summation of all of the individual stride lengths obtained through our algorithm. This methodological adjustment, as applied from [
38], allows us to navigate the challenges posed by the lack of direct stride length measurements. The total distance is calculated by the equation:
where
is the total calculated distance,
is the calculated stride length of the
ith step, and
n is the total number of strides. This cumulative distance is then compared to the actual total walking distance of 120 meters mentioned above to determine the overall error, as a substitute to finding the mean error in individual stride length. The accuracy of the distance estimation will be a direct indicator of the efficacy of our stride length calculation algorithm. This equation below, also derived from [
38], illustrates this relationship in terms of mean error
:
where
represents the measured stride length,
is the calculated stride length,
denotes the measured total distance travelled, and
stands for the calculated total distance travelled.
Upon conducting post-processing procedures and implementing the aforementioned formulas, we calculated a total walking distance of 117.74 meters. Compared against the measured distance covered of 120 meters, our derived value exhibits an error rate of 1.88%. This small discrepancy highlights the accuracy and reliability of our computational methods. The mean and standard deviation values for each step of the experiments are detailed below in
Figure 7 and
Table 1, with
Figure 7 showing the cumulative distance over the span of eight steps.
Below,
Table 2 presents a comprehensive comparison between the background information and outcomes of various research papers employed in this study alongside our own findings. The table encompasses key details such as sensor placement, sampling frequency, participants’ health conditions, total distance walked, mean error, and root-mean-square error. Notably, our study demonstrates a lower mean error rate in calculating stride length compared to other studies with comparable objectives. This distinction underscores the precision and effectiveness of our methodology in achieving accurate measurements.
4. Discussion
This study has demonstrated the significant potential of smart shoes in accurately calculating stride length. Nonetheless, the precision of these calculations can be further improved by increasing the dataset size. Future research will focus on expanding the dataset to encompass a broader range of shoe sizes and a more diverse population. Several additional shoe sensor PCBs have been designed and fabricated to be incorporated into shoes of different sizes. This will enable a greater number of participants to take part in the study, thereby allowing the stride length calculation algorithm to be refined, enhancing its precision and reliability. Including additional variables such as different terrains, speeds, and environmental conditions will also contribute to a more robust and versatile algorithm.
The scope of our study can also be further explored in different aspects such as different sports or healthcare. The shoe sensor system holds significant potential for track runners by providing detailed insights into stride mechanics through the analysis of movements in the X, Y, and Z axes. This comprehensive data can be used to optimize performance by customizing training regimens and refining techniques, ultimately helping athletes enhance stride efficiency and minimize the risk of injury. Similarly, accurate gait analysis is crucial for effective rehabilitation and injury recovery. The insights gained from this study can help doctors develop more targeted rehabilitation programs. By examining the strides in the different movement axes, specific gait abnormalities can be identified and addressed through customized exercises.
As the use of smart shoes and wearable technology for gait analysis grows, ensuring data security and client privacy is essential. In this study, data was transmitted using Wi-Fi UDP, providing fast, efficient, and real-time monitoring of gait patterns. However, since UDP is connectionless and does not established a secure connection between two end points [
46], it is generally considered to be less reliable compared to TCP or HTTPS. Future implementations should adopt these methods to encrypt data through wireless connection and enhance data security, ensuring that sensitive client information remains confidential. Developing robust encryption protocols will be critical to maintain client privacy and trust as smart shoe technology becomes more widely used in both clinical and athletic settings.
Author Contributions
Conceptualization, N.N., Z.C., K.G., and N.J.; methodology, N.N., Z.C., K.G., and N.J.; software, N.N.; validation, N.N., Z.C., K.G., and N.J.; formal analysis, N.N. and N.J.; investigation, N.N. and N.J.; resources, N.N. and N.J.; data curation, N.N.; writing—original draft preparation, N.N.; writing—review and editing, N.N., Z.C., K.G., and N.J.; visualization, N.N., Z.C., and N.J.; supervision, N.J.; project administration, N.J.. All authors have read and agreed to the published version of the manuscript.