## 3 Methods
### Human-Exoskeleton Coupling Dynamics Modeling
\(\mathbf{G_{e}}\in\mathbf{R}^{2}\) denotes the gravitational torque vector of the exoskeleton. There is a force interaction between the exoskeleton and the human lower limb. For patients with residual muscle strength in the lower limbs, their own muscle strength cannot help them walk normally, so the interaction force is a promotion for patients, but for the exoskeleton, the interaction force is a resistance, so the dynamic equation of human-exoskeleton coupling system can be given as:  
\[\left\{ \begin{array}{l}\mathbf{M_{h}}(\mathbf{q_{h}})\ddot{\mathbf{q_{h}}}+ \mathbf{C_{h}}(\mathbf{q_{h}},\dot{\mathbf{q_{h}}})\dot{\mathbf{q_{h}}}+ \mathbf{G_{h}}(\mathbf{q_{h}})=\mathbf{T_{h}}+\mathbf{J_{hh}}^{T}\mathbf{F_{ h}}+\mathbf{J_{hk}}^{T}\mathbf{F_{k}}\\ \mathbf{M_{e}}(\mathbf{q_{e}})\ddot{\mathbf{q_{e}}}+\mathbf{C_{e}}(\mathbf{q_ {e^{\prime}}},\dot{\mathbf{q_{e}}})\dot{\mathbf{q_{e}}}+\mathbf{G_{e}}( \mathbf{q_{e}})=\mathbf{T_{e}}-\mathbf{J_{eh}}^{T}\mathbf{F_{h}}-\mathbf{J_{ek }}^{T}\mathbf{F_{k}}\end{array} \right., \tag{3}\]  
where \(\mathbf{J_{hh}},\mathbf{J_{hk}}\) are the Jacobian matrices of the human lower limb, and \(\mathbf{J_{eh}},\mathbf{J_{ek}}\) are the Jacobian matrices of the 2-DOF exoskeleton. \(\mathbf{F_{h}}\) and \(\mathbf{F_{k}}\) denote the coupling terms of the human lower limb dynamics equation and 2-DOF exoskeleton dynamics equation, and their physical meanings are the interaction force of human limb and exoskeleton at the thigh and shank, respectively, and are given by:  
\[\mathbf{F_{h}}=\left[ \begin{array}{c}F_{Ix}\\ F_{hy}\end{array} \right]=b_{[}\left[ \begin{array}{c}\dot{x}_{Ae}-\dot{x}_{ Ah}\\ \dot{y}_{Ae}-\dot{y}_{Ah}\end{array} \right]+k_{[}\left[ \begin{array}{c}x_{Ae}-x_{ Ah}\\ y_{Ae}-y_{Ah}\end{array} \right], \tag{4}\]  
\[\mathbf{F_{k}}=\left[ \begin{array}{c}F_{Ix}\\ F_{hy}\end{array} \right]=b_{[}\left[ \begin{array}{c}\dot{x}_{Be}-\dot{x}_{ Bh}\\ \dot{y}_{Be}-\dot{y}_{Bh}\end{array} \right]+k_{[}\left[ \begin{array}{c}x_{Be}-x_{ Bh}\\ y_{Be}-y_{Bh}\end{array} \right], \tag{5}\]  
where \((x_{Ae},y_{Ae})\), \((x_{Ah},y_{Ah})\) are coordinates of exoskeleton contact point \(A_{e}\) and bone contact point \(A_{h}\) at the connection of the exoskeleton and the thigh. \((x_{Be},y_{Be})\), \((x_{Bh},y_{Bh})\) are coordinates of exoskeleton contact point \(B_{e}\) and bone contact point \(B_{h}\) at the connection of the exoskeleton and the shank. The coordinates of four points and their first derivative can be expressed as follows:  
\[\left\{ \begin{array}{l}x_{Ah}=l_{Ah}\cos q_{hh}\\ y_{Ah}=l_{Ah}\sin q_{hh}\end{array} \right.\,\ \left\{ \begin{array}{l}x_{Bh}=l_{ hh}\cos q_{hh}+l_{Bh}\cos(q_{hh}+q_{hk})\\ y_{Bh}=l_{hh}\sin q_{hh}+l_{Bh}\sin(q_{hh}+q_{hk})\end{array} \right. \tag{6}\]  
\[\left\{ \begin{array}{l}x_{Ae}=l_{Ae}\cos q_{eh}\\ y_{Ae}=l_{Ae}\sin q_{eh}\end{array} \right.\,\ \left\{ \begin{array}{l}x_{Be}=l_{ eh}\cos q_{eh}+l_{Be}\cos(q_{eh}+q_{ek})\\ y_{Be}=l_{hh}\sin q_{eh}+l_{Be}\sin(q_{eh}+q_{ek})\end{array} \right. \tag{7}\]  
\[\left\{ \begin{array}{l}\dot{x}_{Ah}=-l_{Ah}\dot{q}_{hh}\sin q_{hh}\\ \dot{y}_{Ah}=l_{Ah}\dot{q}_{hh}\cos q_{hh}\end{array} \right.\,\ \left\{ \begin{array}{l}\dot{x}_{Bh}=-l_{ hh}\dot{q}_{hh}\sin q_{hh}-l_{Bh}(\dot{q}_{hh}+\dot{q}_{hk})\sin(q_{hh}+q_{hk})\\ \dot{y}_{Bh}=l_{hh}\dot{q}_{hh}\cos q_{hh}+l_{Bh}(\dot{q}_{hh}+\dot{q}_{hk}) \cos(q_{hh}+q_{hk})\end{array} \right. \tag{8}\]\[\left\{ \begin{array}{l}\dot{x}_{Ac}=-l_{Ac}\dot{q}_{ch}\sin q_{ch}\\ \dot{y}_{Ac}=l_{Ac}\dot{q}_{ch}\cos q_{ch}\end{array} \right., \tag{9}\]  
where \(l_{hh}\) and \(l_{hk}\) denote lengths of the thigh and the shank of the human lower limb, \(l_{eh}\) and \(l_{ck}\) represent lengths of the thigh and the shank of the exoskeleton. It is assumed that the rotation axes of the first joint of exoskeleton and the human hip joint are coincident.