# Towards Online Estimation of Human Joint Muscular Torque with a Lower Limb Exoskeleton Robot
## 2 Methods
### Inverse Dynamics of the Human Body  
Generally, the human walking process includes several states, such as (i) single support, (ii) double support, and (iii) double off-the-ground. Dynamic models of these states are also different due to different constraints on the feet. Commonly, a finite-state-machine (FSM) should be employed to switch between the dynamic equations of each state. However, this can increase the complexity of the control algorithm for state classification. To solve the JMT, this model considers the dynamics of each leg separately, instead of treating the dynamics of the human body as a whole, thereby shortening the kinematic chain from the 5-bar model of the entire body to a 2-bar model of each leg. This helps to reduce the computational complexity and local disturbances. In inverse dynamic formulas of joint torque, there are several components, including torques caused by inertial, coriolis, gravity, and external forces. Each component is linearly added. So, we are able to further factorize the inverse dynamics of a single leg into the mass-induced one and FCF-induced one. This helps to avoid switching dynamic equations due to different contact states of the feet. The proposed method is limited by several assumptions: (1) it only investigates motion in the sagittal plane for simplicity, thereby neglecting motion and force in the coronal plane and the frontal plane; (2) inertial torque caused by ankle movement is neglected; and (3) the foot and shank are considered as one component in the human model during the swing phase. In the estimation of mass-induced torques, the leg is considered to be suspended to component \(B\) by the hip joint where the coordinate origin is set as shown in Figure 2a. The Lagrange method is adopted on this two-bar dynamic model with floating pedestals. First, the coordinates of the center of mass of component \(T\) are determined in the global coordinate system \(O_{W}\). \[\left\{ \begin{array}{l}x_{CT}=x_{H}+l_{CT}sin(\theta_{T})\\ z_{CT}=z_{H}+l_{CT}cos(\theta_{T}).\end{array} \right. \tag{1}\]  
Figure 2: Dynamic model of a single leg. (**a**) Model for calculating mass-induced torques. (**b**) Model for calculating foot contact force (FCF)-induced torques. Next, the motion velocity of the center of mass for component \(T\) is derived:  
\[\left\{ \begin{array}{l}\dot{x}_{CT}=\frac{\partial x_{CT}}{\partial x_{H}}\dot{x }_{H}+\frac{\partial x_{CT}}{\partial\theta_{T}}\dot{\theta}_{T}\\ \\ \dot{z}_{CT}=\frac{\partial z_{CT}}{\partial z_{H}}\dot{x}_{H}+\frac{\partial z_ {CT}}{\partial\theta_{T}}\dot{\theta}_{T}.\end{array} \right. \tag{2}\]  
Then, the coordinates of the center of mass for component \(S\) in the global coordinate system \(O_{W}\) are derived:  
\[\left\{ \begin{array}{l}x_{CS}=x_{H}+l_{T}sin(\theta_{T})+l_{CS}sin(\theta_{ S})\\ \\ z_{CS}=z_{H}+l_{T}cos(\theta_{T})+l_{CS}cos(\theta_{S}).\end{array} \right. \tag{3}\]  
Next, the motion velocity of the center of mass for component \(S\) is derived:  
\[\left\{ \begin{array}{l}\dot{x}_{CS}=\frac{\partial x_{CS}}{\partial x_{H}} \dot{x}_{H}+\frac{\partial x_{CS}}{\partial\theta_{T}}\dot{\theta}_{T}+\frac{ \partial x_{CS}}{\partial\theta_{S}}\dot{\theta}_{S}\\ \\ \dot{z}_{CS}=\frac{\partial z_{CS}}{\partial z_{H}}\dot{z}_{H}+\frac{\partial z _{CS}}{\partial\theta_{T}}\dot{\theta}_{T}+\frac{\partial z_{CS}}{\partial \theta_{S}}\dot{\theta}_{S}.\end{array} \right. \tag{4}\]  
Thereby, the total kinetic energy of the system is calculated:  
\[K=\frac{1}{2}\left[m_{T}(\dot{x}_{CT}^{2}+\dot{z}_{CT}^{2})+m_{S}(\dot{x}_{CS }^{2}+\dot{z}_{CS}^{2})+l_{T}\dot{\theta}_{T}^{2}+l_{S}\dot{\theta}_{S}^{2} \right]. \tag{5}\]  
In addition, the potential energy of the system is calculated:  
\[P=-m_{T}gz_{T}-m_{S}gz_{s}. \tag{6}\]  
The, we get the equation of the mass-induced torque:  
\[\left\{