# Comparison of Gait Smoothness Metrics in Healthy Elderly and Young People
## 2 Materials and Methods
### Smoothness Metrics  
The smoothness was evaluated according to the three metrics LDLJ [29], SPARC [13] and HR [30; 31; 32] on linear accelerations in the three directions (_Acc-AP_, _Acc-ML_ and _Acc-V_) and on the angular velocities (_Gyr-AP_, _Gyr-ML_ and _Gyr-V_).  
HR indices were computed according to the algorithm proposed by [PERSON] et al. [30], while Balasubramanian procedures were followed to calculate LDLJ and SPARC [29]. Equation (1) outlines the formulation of the LDLJ \(\eta_{LDLJ}\), utilizing \(t_{1}\) and \(t_{2}\) as the start and end instants of the movement, respectively. Here, \(a(t)\) denotes the acceleration profile, and \(a_{peak}\) corresponds to the maximum acceleration peak between \(t_{1}\) and \(t_{2}\)[29]. Equation (2) defines the calculation of the SPARC index \(\eta_{SPARC}\), where \(\hat{S}(\omega)\) represents the fast Fourier transform (FFT) of the temporal signal profile \(s(t)\), normalized with respect to its maximum, and \(\omega_{c}\) is the specified cut-off frequency [13]. Moving to the HR index, the process begins by transforming the signal into the frequency domain using a finite Fourier series. Equation (3) demonstrates the calculation of HR for AP and V directions (\(\eta_{HR-AP}\) and \(\eta_{HR-V}\), respectively) [30]. This involves evaluating the ratio between the sum of amplitudes \(A_{even}\) from the first ten even harmonics (representing in-phase components of the signal) and the sum of amplitudes \(A_{odd}\) from the first ten odd harmonics (related to out-of-phase components). Decreased values of the latter indicate improved gait symmetry. Equation (4) details the HR formulation \(\eta_{HR-ML}\) for the mediolateral (ML) direction. By dividing the sum of amplitudes \(A_{odd}\) of odd harmonics by the sum of amplitudes \(A_{even}\) of even harmonics, this index captures the dominance of the first harmonic and subsequent odd harmonics, considering the acceleration pattern typically displaying one peak per stride.  
\[\eta_{LDLJ}=-ln(\frac{(t_{2}-t_{1})}{a_{peak}^{2}}\int_{t_{1}}^{t_{2}}\left| \frac{da(t)}{dt}\right|^{2}dt) \tag{1}\]  
\[\eta_{SPARC}=-\int_{0}^{\omega_{c}}\sqrt{\left(\frac{1}{\omega_{c}}\right)^{2 }+\left(\frac{d\hat{S}(\omega)}{dt}\right)^{2}}\ d\omega \tag{2}\]  
\[\eta_{HR-AP}=\frac{\sum_{i=1}^{10}A_{(AP)even(i)}}{\sum_{j=1}^{10}A_{(AP)odd( j)}}\ \eta_{HR-V}=\frac{\sum_{i=1}^{10}A_{(V)even(i)}}{\sum_{j=1}^{10}A_{(V)odd(j)}} \tag{3}\]  
\[\eta_{HR-ML}=\frac{\sum_{j=1}^{10}A_{(ML)odd(j)}}{\sum_{i=1}^{10}A_{(ML)even (i)}} \tag{4}\]  
The mentioned equations, initially introduced in a theoretical format as in [13; 29; 30], were modified for practical application with discrete signals during the post-processing stage. Specifically, SPARC metrics involve fast Fourier transform (FFT) calculations, revealing power dispersion around the primary frequency when applied to finite-time sinusoidal signals. To address this, the utilization of the Chebyshev window [33] was introduced. This windowing technique serves to diminish the amplitude and enhance the attenuation rate of secondary lobes within the FFT. The HR metric ranges from 0 to positive infinity, with zero representing complete unsmoothness. Conversely, LDLJ and SPARC metrics generate values within a negative range from negative infinity to \(-1\), where \(-1\) signifies the smoothest movement. In any case, consistently for all the metrics, an increase in the index values indicates an improvement in smoothness.