# Compliant Human-Robot Collaboration with Accurate Path-Tracking Ability for a Robot Manipulator
## 2 Problem Formulation and Methodology
### Inner Motion Control Loop  
The dynamic equation of an n-joint robot is given as follows:  
\[M(q)\dot{q}+C(q,\dot{q})\dot{q}+G(q)+F(\dot{q})=\tau+J^{T}(q)F_{ext} \tag{1}\]  
where \(q,\dot{q},\dot{q},\tau\in\mathbb{R}^{n}\), denote the joint angle, angular velocity, angular acceleration, and torque, respectively. \(M(q),C(q,\dot{q})\in\mathbb{R}^{n\times n}\) are the inertial matrix, Coriolis, and centrifugal matrix, respectively. \(G(q),F(\dot{q})\in\mathbb{R}^{n}\) are the gravitational torque and frictional torque, respectively. \(J(q)\in\mathbb{R}^{3\times n}\) is the Jacobian matrix of the end effector, and \(F_{ext}\in\mathbb{R}^{3}\) is the external force applied to the end effector. Figure 2: Block diagram of adaptive admittance control with path tracking. Given the desired joint space trajectory \(q_{d}\in\mathbb{R}^{n}\), we would like to design a robust motion control law that calculates the required joint torque \(\tau\) for keeping the tracking error \(\widetilde{q}=q-q_{d}\) as small as possible, even in the presence of model uncertainties and external disturbance. It is well known that SMC has desirable robustness with respect to matched uncertainties, but high-frequency chattering causes degradation of performance and should be suppressed carefully. Many variations of SMC have been investigated in the past for alleviating chattering with minor cost in performance deterioration [25; 26; 27; 28; 29]. Among all these techniques, we adopt the modified SMC developed and experimentally verified by our research group in [30]. Let \(M_{0}(q),C_{0}(q,\dot{q}),G_{0}(q)\), and \(F_{0}(\dot{q})\) be the nominal models of \(M(q),C(q,\dot{q}),G(q)\), and \(F(\dot{q})\), respectively. Then, (1) can be rewritten as  
\[\ddot{q}=-M_{0}^{-1}(q)[C_{0}(q,\dot{q})\dot{q}+G_{0}(q)+F_{0}(\dot{q})]+(I+ \Delta_{M})M_{0}^{-1}(q)\Big{(}\tau+J^{T}(q)F_{ext}\Big{)}+d \tag{2}\]  
where \(d\) is the lumped additive model uncertainties resulting from all model parameters in \(M(q),C(q,\dot{q}),G(q)\) and \(F(\dot{q})\). \(\Delta_{M}\) is the multiplicative model uncertainty of \(M^{-1}(q)\). We assume that \(\|\Delta_{M}\|\leq\kappa<1\) and \(\|d\|\leq d\) for all \(q\) and \(\dot{q}\). Define the sliding variable \(\sigma\in\mathbb{R}^{n}\) as  
\[\sigma=[\sigma_{1},\cdots,\sigma_{n}]^{T}=\overset{\sim}{q}+C_{1}\widetilde{ q}+\eta \tag{3}\]  
where \(C_{1}\in\mathbb{R}^{n\times n}\) is positive definite and \(\eta\in\mathbb{R}^{n}\) is an auxiliary vector which will be determined shortly. The proposed control law is  
\[\tau=[C_{0}(q,\dot{q})\dot{q}+G_{0}(q)+F_{0}(\dot{q})]+M_{0}(q)\big{(}\dot{q}_ {d}-C_{1}\overset{\sim}{\dot{q}}+\Lambda_{0}u_{1}\big{)} \tag{4}\]  
\[\dot{u}_{1}=-\Lambda_{1}u_{1}+\eta \tag{5}\]  
\[\dot{\eta}=-\Lambda_{0}u_{1}-K_{s}\sigma-\rho \tag{6}\]  
Note that the control law in (4) cancels the nominal nonlinear terms and introduces an auxiliary control input \(u_{1}\) to enhance robustness. \(\Lambda_{1},\Lambda_{0},K_{s}\in\mathbb{R}^{n\times n}\) are constant gain matrices and  
\[\rho=\big{[}sgn(\sigma_{1})\bar{d}_{s1},\cdots,\ sgn(\sigma_{n})\bar{d}_{sn} \big{]}^{T} \tag{7}\]  
where \(sgn(\cdot\ )\) denotes the sign function, and \(\bar{d}_{si}=\bar{d}+\kappa\|\bar{d}_{d}-C_{1}\overset{\sim}{\dot{q}}+\Lambda_ {0}u_{1}\|\), \(i=1,\,\cdots,n\), is the bound of the uncertain terms. Each component of \(\rho\) switches its sign across the sliding surface \(\sigma_{i}=0\) and is used to suppress the model uncertainty. However, the high-frequency switching behavior of \(\rho\) causes significant chattering if it is directly added to the joint torque, just as the traditional SMC does. Let \(K_{s}\) be positive definite, if we substitute (4)-(6) into (2), it can be shown that [30]  
\[\sigma^{T}\dot{\sigma}\leq-\sigma^{T}K_{s}\sigma \tag{8}\]  
This implies that \(\sigma\to 0\) as \(t\to\infty\). In other words, the system will reach and stay on the sliding surface \(\sigma\equiv 0\).