# Hardware Development and Safety Control Strategy Design for a Mobile Rehabilitation Robot
## 3 Dynamic Models
### The Dynamic Model of the Lower-Limb Exoskeleton  
Since the main rotation of the lower limb joints occurs in the sagittal plane during the gait cycle, the hip and knee joints designed for LES only involve extension and flexion in the sagittal plane. The ankle joint is not actuated, which allows flexion and extension without restriction in the sagittal plane. The LES physically and firmly connects to the human legs; therefore, the kinematics of the LES can be represented as the kinematics of the human lower limb. The LES is designed as a two-link and symmetrical structure, such that when using the Lagrange formulation, its generic dynamic mode for a unilateral LES can be represented as follows [32]:  
\[\mathbf{M}_{H}(\theta)\ddot{\mathbf{\theta}}+\mathbf{C}_{H}(\theta,\dot{ \theta})\dot{\mathbf{\theta}}+\mathbf{G}_{H}(\theta)=\boldsymbol{\tau}_{ext}, \tag{1}\]  
where \(\theta= \begin{bmatrix}\theta_{h},&\theta_{k}\end{bmatrix} \) is the vector of joint angle, \(\dot{\theta}\) and \(\ddot{\theta}\) are the velocity and acceleration of the joint angle vector, \(\mathbf{M}_{H}(\theta)\in R^{2\times 2}\) is the inertial matrix of the human limb, \(\mathbf{C}_{H}(\theta,\dot{\theta})\in R^{2\times 2}\) represents the vector of the Coriolis and centrifugal matrix of the human limb, and \(\mathbf{G}_{H}(\theta)\in R^{2}\) is the vector of the gravitational torques of the human limb. \(\boldsymbol{\tau}_{ext}= \begin{bmatrix}\tau_{h},&\tau_{k}\end{bmatrix} \) is the external torque representing the human joint torque and the torque generated by the exoskeleton. The elements of the matrices \(\mathbf{M}_{H}\) and \(\mathbf{C}_{H}\) in Equation (1) were discussed in previous publications [33]. LES is a two-leg structure with each leg having two joints (knee and hip), and can be treated as four single-input-single-output (SISO) independent control systems with mechanical coupling disturbances. It is difficult to obtain the inertia matrix for the LES because the LES has variable thigh and shank structures, so the joint dynamics is derived from the moment balance equation in this paper. For example, considering the joint dynamics can be obtained by fixing the thigh link first and controlling the motor to rotate the knee joint in a uniform circular motion, the dynamic for the knee joint can be represented as:  
\[J_{k}\ddot{\theta}_{k}+B_{k}\dot{\theta}_{k}+\tau_{g,k}=\tau_{k}, \tag{2}\]  
where \(\theta_{k}\) is the knee joint angle of the limb in the sagittal plane, \(J_{k}\) is the sum of \(J_{l,k}\) and \(J_{e,k}\), represented as the inertia of the low limb/exoskeleton, \(B_{k}\) is the sum of \(B_{l,k}\) and \(B_{e,k}\), represented as the viscous friction parameters of the low limb joint/exoskeleton, \(\tau_{k}\) is the total of the torques generated by the human muscles and the exoskeleton actuator, \(\tau_{g,k}\) is a portion of the torque that includes the gravitational torque of the low limb/exoskeleton, the torque caused by the other body segments, and the extra forces. In this study, the knee and hip joints of the LES were actuated by flat brushless motors with a planetary reducer to perform gait locomotion. Through appropriately applied current field-oriented control [34], the electromagnetic torque can be simplified as \[\tau_{k}=K_{\text{t}}i_{k}, \tag{3}\]  
where \(K_{\text{t}}\) is the torque constant and \(i_{knee}\) is the control current. Substituting (3) into (2), we can rewrite the knee joint servo drive system of LE in the following form:  
\[\ddot{\theta}_{k}=-\frac{B_{k}}{J_{k}}\dot{\theta}_{k}+\frac{K_{\text{t}}}{J_{k }}i_{k}-\frac{\tau_{g,k}}{J_{k}}\equiv f_{k}(\dot{\theta}_{k})+g_{k}u_{k}+D_{k }d_{k}, \tag{4}\]  
where \(f_{k}(\dot{\theta}_{k})=-B_{k}/J_{k}\), \(g_{k}=\frac{K_{\text{t}}}{J_{k}}>0\), \(D_{k}=-\frac{1}{J_{k}}\), and \(u_{k}(t)=i_{k}\) is the control effort. Here, \(\mathbf{x}_{1}= \begin{bmatrix}x_{11},&x_{12}\end{bmatrix} ^{T}= \begin{bmatrix} \theta,&\dot{\theta}\end{bmatrix} ^{T}\in R^{2}\) is defined as the state vector.