# Estimation of Stride Length, Foot Clearance, and Foot Progression Angle Using UWB Sensors
## 2 Materials and Methods
### Calculation of Gait Parameters Using UWB
#### 2.3.1 UWB Sensor Offset Compensation  
The UWB sensor used in this study performs distance measurements using the two-way ranging (TWR) method [39]. In this method, (1) the TOF, as the time required to transmit and receive wireless signals between the two directions of the anchor (as the fixed antenna) and tag (as the mobile antenna) is determined; and (2) the distance between the two sensors is measured. According to the UWB sensor datasheet (model: DWM1000), the precision of the sensor resolution was estimated to be 10 cm. However, the resolution of the oscillator mounted on the UWB was 16 ps [38], and according to the latest research, it has been proven that the UWB sensor can measure more stably at a short distance than the proposed precision. However, this sensor can experience signal delays according to variations in the surrounding temperature and antenna direction. Therefore, most studies to resolve this issue used the offset compensation method provided by Qorvo Inc. (Greensbor, NC, USA) [40]. The method used by previous researchers involved the variation in the distance between the anchor and tag terminals; measurement of the distance, signal strength, and temperature; and generation of an offset compensation function using the signal strength and temperature used to measure the distance. This method may improve the accuracy of the UWB sensor according to offset compensation in a laboratory environment. However, if the compensation method assumes that the anchor and tag face each other, it is infeasible to compensate for the offset according to the variation in the direction of the antenna. In reality, the offset varies according to the variation in the relative angle between the two UWB sensors [41], and the antenna angle varies periodically while walking, which causes the occurrence of a residual error after offset compensation. This research used support vector regression (SVR) to compensate for the residual error generated by the variation in the antenna angle according to the gait cycle. Therefore, before the gait characteristics experiment, the following procedure was conducted for the distance data-offset compensation. 1. Before the treadmill gait experiment, the participants wore shoes equipped with UWB sensors and walked on the treadmill for 5 min. In this experiment, the signal strength and distance data measured by the UWB sensor according to the gait cycle before offset compensation was measured, and the location of the motion capture marker next to the UWB sensor was acquired. Figure 3: Gait analysis and its parameters: (**a**) Flowchart of the gait parameter estimation algorithm; (**b**) Gait parameters: foot clearance and stride length; (**c**) Gait parameter: foot progression angle. 2. The function that compensates for the offset of the sensor consists of SVR, which is composed of the signal strength and distance data measured using the UWB sensor, and the target variable Y, which is composed of the motion capture marker data. The composed dataset D is expressed by Equation (1). The UWB distance data used in the dataset were obtained after applying a third-order Savitzky-Golay filter [38]. \[\left(x_{i},y_{i}\right)_{i=1}^{t},\ \ \ \ \ x_{i}\in R^{N},\ \ \ \ \ y_{i}\in\{-1,\ 1\}\] (1)
3. To distinguish different classes using input data, the target variable should be mapped to the domain of a higher dimension, and the hyperplane is expressed as a shape space vector with mapping \(\psi\) to the shape space Z. The linear decision function composed of the weight vector and the bias vector pair \(\left(\omega,\ b\right)\) is as follows: \[\mathrm{f(x)}=w^{T}x+b\] (2)
4. Weight and bias can be estimated by minimizing the Euclidean norm. The minimization equation composed of cost function C and slack variable \(\xi\), is as follows: \[\mathrm{Minimize}\ \frac{1}{2}\|w^{2}\|+\mathrm{C}\sum_{i=1}^{m}\left(\xi_{i}+ \xi_{i}^{*}\right)\] (3) subject to \(y_{i}(w\cdot z_{i}+\mathrm{b})\geq 1-\xi_{i}\)
5. Equation (3) solves this issue using positive Lagrange multipliers.