# Development and Assist-As-Needed Control of an End-Effector Upper Limb Rehabilitation Robot
## 3 Assist-As-Needed Control of the EULRR  
### Dynamic Modeling and Impedance Control of Robot  
Assume that the studied rehabilitation robot consists of \(n\) revolute joints connected with rigid links, then the kinematics Equation of the robot can be expressed as:  
\[x=x(q) \tag{4}\]  
The differential kinematics can then be written as:  
\[\dot{x}=J(q)\dot{q} \tag{5}\]  
\[\ddot{x}=\dot{J}(q)\dot{q}+J(q)\ddot{q} \tag{6}\]  
where \(J(q)\) defines the geometric Jacobian, \(x\) is the robot cartesian position. Denoting the position, velocity, and acceleration of joints, respectively, the dynamics Equation of the robot in the joint configuration space can be described as follows:  
\[M(q)\ddot{q}+C(q,\ \dot{q})\dot{q}+G(q)+F(\dot{q})=\tau+J^{T}(q)F_{ext} \tag{7}\]  
where \(\tau\in R^{n}\) denotes the vector of applied torques by actuators, \(M(q)\in R^{n\times n}\) is the inertial matrix, \(C(q,\dot{q})\in R^{n\times n}\) denotes the centrifugal and Coriolis matrix, \(G(q)\in R^{n}\) is the gravity vector, \(F(\dot{q})\in R^{n}\) denotes the friction vector, and the \(F_{ext}\) is the external force vector exerted by the user on the end-effector.  
Assume that the Jacobian matrix \(J(q)\) is bounded and full-rank in the operational workspace such that its inverse exists. We can develop the dynamics based on the Cartesian space variable as follows:  
\[M_{x}(x)\ddot{x}+C_{x}(x,\ \dot{x})\dot{q}+G_{x}(x)+F_{x}(\dot{x})=J^{-T}(q) \tau+F_{ext} \tag{8}\]  
where \(M_{x}(x)=J^{-T}(q)M(q)J^{-1}(q)\), \(C_{x}(x,\ \dot{x})=J^{-T}(q)\big{[}C(q,\dot{q})-M(q)J^{-1}(q)\big{]}J(q) \big{]}J^{-1}(q),G_{x}(x)=J^{-T}(q)G(q)\), \(F_{x}(\dot{x})=J^{-T}(q)F(\dot{q})\).  
Many robot control methods can be realized [37] based on the robot dynamics model, such as position control and force control, among which impedance control is a classical control method. Impedance control was first mentioned by [PERSON] [24]. In an analogy to electrical systems, he divided physical systems into two types: admittances, which accept effort (e.g., force) inputs and yield effort (e.g., motion) outputs; impedances, which accept motion (e.g., force) inputs and yield effort (e.g., force) output. For the convenience of expression, the control law of impedance control in Cartesian space in a single-degree-of-freedom system can be expressed as:  
\[M\ddot{x}_{cur}+D(\dot{x}_{cur}-\dot{x}_{des})+K(x_{cur}-x_{des})=F_{ext} \tag{9}\]  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Link** & \(q_{i}\)/(\({}^{\circ}\)) & \(\alpha_{i}\)/(\({}^{\circ}\)) & \(\alpha_{i}\)/(mm) & \(d_{i}\)/(mm) &
\begin{tabular}{c} **Motion** \\ **Range/(\({}^{\circ}\))** \\ \end{tabular} \\ \hline
1 & \(q_{1}\) & \(-90\) & \(0\) & \(340\) & \(-170\)–\(170\) \\
2 & \(q_{2}\) & \(90\) & \(0\) & \(0\) & \(-120\)–\(120\) \\
3 & \(q_{3}\) & \(90\) & \(0\) & \(400\) & \(-170\)–\(170\) \\
4 & \(q_{4}\) & \(-90\) & \(0\) & \(0\) & \(-120\)–\(120\) \\
5 & \(q_{5}\) & \(-90\) & \(0\) & \(400\) & \(-170\)–\(170\) \\
6 & \(q_{6}\) & \(90\) & \(0\) & \(0\) & \(-120\)–\(120\) \\
7 & \(q_{7}\) & \(0\) & \(0\) & \(152\) & \(-175\)–\(175\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: DH (Denavit & Hartenbrtg) parameters of the manipulator.  
\[\begin{array}{l}M=diag(m_{i})\\ D=diag(d_{i})\\ K=diag(k_{i})\end{array}\Bigg{\}}i\in\{x,y,z,A,B,C\} \tag{10}\]  
where \(F_{\text{est}}\) is the wrench of the end-effector of the robot, \(\dot{x}\) and \(\ddot{x}\) are the velocity and acceleration of the robot end-effector, \(x_{\text{c}ur}\) and \(x_{\text{d}os}\) are the measured and desired end-effector poses, \(M\) is the mass matrix constructed according to the expected motion, and \(D\) is the damping coefficient matrix, \(K\) is the stiffness coefficient matrix, \(A,B,C\) is the Euler angles of the robot end-effector. The robot end-effector behaves as a mass-damper-spring system, both when the robot is driven by an external force or moment or when following a given reference.