# Smartphone Accelerometer for Gait Assessment: Validity and Reliability in Healthy Adults
## 2 Materials and Methods
### Measurements
#### 2.3.1 Application of Using Smartphone Accelerometers  
Acceleration Data Collection and Processing  
The acceleration data of walking exhibits a distinct pattern, with the minimum value, denoted as A, occurring when the foot contacts the ground, and the maximum value, B, observed when the knee straightens. Acceleration, a physical quantity representing the rate of change in velocity over time, is recorded along the \(x\), \(y\), and \(z\) axes. By utilizing gravitational acceleration (9.81 m/s\({}^{2}\)), which consistently acts in the vertical direction, the degree of inclination (roll and pitch) about the x and y axes can be determined. However, the rotation around the \(z\)-axis, which aligns with the direction of gravity, cannot be detected through acceleration alone and must instead be measured using an additional sensor embedded in the smartphone, namely the geomagnetic sensor.  
The acceleration value along the \(x\)-axis, representing the forward direction during walking, tends to remain relatively constant, while the lateral acceleration along the \(y\)-axis, which varies when the body tilts, exhibits minimal change during steady walking. In contrast, the vertical acceleration (\(z\)-axis) undergoes pronounced fluctuations, resulting in a repetitive sine wave-like pattern. Consequently, the degree of tilt of the smartphone during walking is measured and compensated for, and the acceleration data across all three axes are condensed into a single representative value, corresponding solely to the vertical direction (\(z\)-axis). This representative \(z\)-axis acceleration data are utilized for all subsequent processing and analysis [17; 18].  
Analysis and Calculation  
The vertical acceleration data were initially collected at 200 Hz using the smartphone's accelerometer and geomagnetic sensor and later resampled at 250 Hz (4 ms) for further processing. While the acceleration data provide high precision, analyzing the oscillatory motion of walking requires additional processing to improve clarity. To do this, we applied a smoothing filter with a cutoff frequency of approximately 30 Hz twice, effectively reducing high-frequency noise while preserving the essential oscillatory patterns of walking.  
Step length was calculated by applying double integration to the processed acceleration data. Double integration, while useful for deriving displacement from acceleration, is prone to accumulating errors over time due to sensor noise and drift. This study mitigated these errors by resetting the velocity to zero at specific points in the gait cycle. These points, corresponding to the step initiation (minimum acceleration, A) and mid-stance phase (maximum acceleration, B), are moments where the velocity is theoretically zero. A low-pass filter was also applied to the acceleration data before integration to minimize the impact of high-frequency noise, reducing the potential for error amplification during the integration process (Figure 2) [17; 18; 19].  
The vertical displacement of the center of gravity, derived from this integration, was combined with the leg length using the Pythagorean theorem to estimate step length. Cadence and velocity were calculated based on the total walking time and distance covered (Figure 3).  
Figure 2: Acceleration during a single step. A, step initiation; B, mid-stance.