# Design of a Lower Limb Exoskeleton: Robust Control, Simulation and Experimental Results
## 6 Results  
### Numerical Results  
In this section, the simulation of the knee and ankle exoskeleton is presented by applying a terminal high-order sliding mode control algorithm, tracking the desired trajectory corresponding to a straight leg extension routine in a sitting position. The parameters of the exoskeleton used for the simulation are shown in Table 3.  
The control algorithm is shown in Figure 9, where the first step is obtaining the tracking error (\(e\)) and its derivatives (\(e\) and \(\bar{e}\)), then determining \(e^{v}\) recalling that \(e^{v}=|e|^{v}sgn(e)\). After that, \(\tau_{a}\) is calculated, which is the control law for the known dynamics, and then the sliding variable (\(\sigma\)) is obtained, and its derivative (\(\sigma\)) is used to obtain the sliding surface (\(S\)), which is used to calculate \(\tau_{b}\). Then, the total control input is generated that is provided to the dynamical model of the system. The parameters used in the control are summarized in Table 4.  
The initial conditions for the angular position and angular velocity are  
\[q(0) =[-90,0]^{T},\] \[\dot{q}(0) =0.\] \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Variable** & **Value** \\ \hline
**Alpha** & \(\alpha\) & 0.05 \\
**Beta** & \(\beta\) & 20 \\
**Gamma** & \(\Gamma\) & \(\text{diag}(3,3)\) \\
**v** & \(v\) & 0.1 \\
**K** & \(k\) & \(\text{diag}(10,10)\) \\
**c** & \(c\) & 0.5 \\
**P** & \(p\) & \([1\ \ 1\ \ 0.5]^{\mathbb{T}}\) \\ \(B_{2}\) & \(B_{2}\) & \([1\ \ 1\ \ 5]^{\mathbb{T}}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameters used in the control. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Variable** & **Value** \\ \hline
**Mass of the link 1** & \(m_{1}\) & 0.25 kg \\
**Mass of Link 2** & \(m_{2}\) & 0.793 kg \\
**Center of mass of Link 1** & \(l_{c1}\) & 0.193 m \\
**Center of mass of Link 2** & \(l_{c2}\) & 0.09 m \\
**Length of Link 1** & \(l_{1}\) & 0.38 m \\
**Inertia of Link 1** & \(l_{1}\) & 0.22 kg \(\cdot\) m\({}^{2}\) \\
**Inertia of Link 2** & \(l_{2}\) & 0.32 kg \(\cdot\) m\({}^{2}\) \\
**Alpha** & \(\alpha\) & 9.6\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Properties of the prototype used in the numerical results. Figure 9: Block diagram of the exoskeleton robust control based on a terminal high-order sliding mode control. The simulation results are shown in Figure 10 for the knee trajectory and in Figure 11 for the ankle joint, where the red dotted line is the desired trajectory for both cases, while the blue line corresponds to \(q_{1}\) and the green one to \(q_{2}\), which are the angular positions of the joints. It can be observed that both articulations follow their respective references. Figure 11: Trajectory tracking for the ankle joint. Figure 10: Trajectory tracking for the knee joint. for which it was necessary to know some topics related to medical robotics, as well as the biomechanics of the human body. The prototype was designed considering the integration of an additional joint (ankle) to a previous exoskeleton and an effort study was carried out to determine the material and the dimensions to be used in order to carry the loads and be safe for the user. Therefore, it was possible to design and build a prototype with a lightweight design and resistance that can be altered to fit a variety of patients with different characteristics. The design structure is capable of being integrated into the exoskeleton for gait rehabilitation in the UMI LAFMIA laboratory, making it possible to work on hip, knee, and ankle joints for flexion and extension. The dynamic model that governs the movement of the robot was obtained considering the knee and ankle joints, which was developed from the Euler-Lagrange equations. A robust control law based on terminal high-order sliding modes was proposed to study the behavior of the prototype when subject to an established trajectory; in the numerical results, the tracking errors converge to a bounded value close to zero.