# Crouch Gait Recognition in the Anatomical Space Using Synthetic Gait Data
## 2 Gait Recognition Framework
### Gait Data Acquisition
A small error (\(DAE\)) generates a higher degree of polynomial, increasing the mathematical complexity and thus the computational cost during the evaluation. The function applied to fit the polynomial curve (polyfit of Matlab) returns the following polynomial \(p(x)\) (synthetic joint function) of degree \(k\) that is a best fit (in the least-squares sense) for the data in \(q_{i}\). \[p(x)=p_{1}x^{k}+p_{2}x^{k-1}+...+p_{k}x+p_{k+1}. \tag{1}\]  
The fitting function uses \(x\) to form a Vandermonde matrix \(V\) with \(k+1\) columns and \(m=length(x)\) rows, resulting in the following linear system:  
\[\left( \begin{array}{cccc}x_{1}^{k}&x_{1}^{k-1}&\dots&1\\ x_{2}^{k}&x_{2}^{k-1}&\dots&1\\ \vdots&\vdots&\ddots&\vdots\\ x_{m}^{k}&x_{m}^{k-1}&\dots&1\end{array} \right)\left( \begin{array}{c}p_{1} \\ p_{2}\\ \vdots\\ p_{k+1}\end{array} \right)=\left( \begin{array}{c}y_{1}\\ y_{2}\\ \vdots\\ y_{m}\end{array} \right). \tag{2}\]  
The fitted polynomial is considered the polynomial generator of the joint angle function, which is used as a base function to synthesize the gait data. In Table 2 we present the degree of the fitted polynomial for each joint function of the five reference gait angles. Figure 5: Flowchart of the synthetic gait joint angles generator algorithm. The degree of the fitted polynomial is related to the complexity of the joint angle function. In this case, the more complex is the dorsiplantar function of C2, while the simplest is the list of C4. Then, we generate a dataset containing joint angle functions for each gait (N, C1, C2, C3, and C4), where \(n=50\). In order to reproduce the eight joint angle signals, we provide the coefficients of the generating polynomials for the normal gait. Table 3 summarizes the values of the fitted polynomial coefficients for the 8 DoF of the joint functions for a normal gait. Subsequently, to generate the joint function dataset of the five gaits with the eight movements, the coefficients of the polynomial generator \(p(x)\) are modified using normally distributed random numbers and evaluated in \(x\). The effect of this action on the signal is a positive or negative offset. In addition, additive white Gaussian noise (AWGN) is added to the previously modified signal, where for this case the \(SNR=20\) is previously defined. Both actions affect synthesized signals, in order to correspond to the disturbances caused by the instrumentation systems and the real-world issues during the acquisition of real gait data. Finally, each synthetic joint angle is stored. To validate our generator approach, we developed a \(z\) test over the eight normal gait angles. The null hypothesis is defined as \(H_{0}\): A synthetic normal function has the same statistical distribution as the reference normal function; and the alternative hypothesis \(H_{1}\): A synthetic normal function has a different statistical distribution than the reference normal function. The established value of statistical significance is \(\alpha=0.05\). In all cases, the null hypothesis was accepted. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline
**Gaits** & \(\mathbf{q_{1}}\) & \(\mathbf{q_{2}}\) & \(\mathbf{q_{3R}}\) & \(\mathbf{q_{4R}}\) & \(\mathbf{q_{4R}}\) & \(\mathbf{q_{3L}}\) & \(\mathbf{q_{4L}}\) & \(\mathbf{q_{5L}}\) \\ \hline \(N\) & 8 & 8 & 11 & 13 & 19 & 9 & 16 & 18 \\ C1 & 13 & 7 & 10 & 15 & 16 & 10 & 17 & 16 \\ C2 & 11 & 8 & 12 & 8 & 12 & 14 & 12 & 25 \\ C3 & 10 & 9 & 11 & 9 & 9 & 17 & 20 & 10 \\ C4 & 13 & 6 & 11 & 14 & 11 & 12 & 15 & 17 \\ \hline \end{tabular}
\end{table} 
Table 2: Degree of the fitted polynomial for each joint function \(q_{i}\) of the 5 gaits.