# Variable Admittance Control in Sliding Mode for Robust Physical Human-Robot Interaction
## 2 Human-Intention-Based VAC and PER
### Variable Admittance Control  
Admittance of a mechanical system refers to a linear relationship between input effort and output flow that is expressed in the Cartesian space as  
\[\mathbf{M_{d}}(t)\big{(}\ddot{\mathbf{x}_{c}}-\ddot{\mathbf{x}_{r}}\big{)}+\mathbf{D_{d}}(t) \big{(}\dot{\mathbf{x}_{c}}-\dot{\mathbf{x}_{r}}\big{)}+\mathbf{K_{d}}(t)(\mathbf{x_{c}}-\mathbf{x _{r}})=\mathbf{f_{h}} \tag{1}\]  
where \(\mathbf{x_{c}}\), \(\mathbf{x_{r}}\in\mathbb{R}^{n}\) and their time derivatives represent command and reference trajectories, respectively; reference variables are prescribed and known, while command variables are computed from Equation (1) as the robot's response; \(n\leq 6\) denotes the minimal representation of pose of the end effector under a specific configuration; \(\mathbf{M_{d}}\in\mathbb{R}^{n\times n}\) is desired virtual inertia; \(\mathbf{D_{d}}\in\mathbb{R}^{n\times n}\) is desired virtual damping; \(\mathbf{K_{d}}\in\mathbb{R}^{n\times n}\) is desired virtual stiffness; \(\mathbf{M_{d}}\), \(\mathbf{D_{d}}\), and \(\mathbf{K_{d}}\) are all symmetric matrices; and \(\mathbf{f_{h}}\in\mathbb{R}^{n}\) represents interaction force. It is worth mentioning that the actual system states do not appear in targeted admittance since admittance regulates the dynamics of the robot's response to interaction force but has no control over tracking.  
The robot has no reference trajectory and acts as a passive follower when the human leads motion in free space. To this end, the virtual stiffness term is omitted in Equation (1). If the inertia is constant, then the system is inherently passive. In this regard, the variable damping is updated considering two aspects: _(a) comfortable and effort-saving; (b) safe interaction response (i.e., safe operation speed) of the robot_.  
In order to save effort for the user, the following updating rule is proposed:  
\[\mathbf{D_{d}}(t)=diag\big{(}\mathbf{f_{n}}\cdot/\dot{\mathbf{x}}(t)\big{)} \tag{2}\]  
where \(\dot{\mathbf{x}}(t)\) represents the actual velocity of the end effector in Cartesian space, dot division denotes that the operation is elementwise,\(\mathbf{f_{n}}\in\mathbb{R}^{n}\) represents constant nominal interaction force determined by the user's comfort level, and \(diag(\ )\) is an operation used to map each entry of the target vector to be a diagonal element of the diagonal matrix. Velocity in Equation (2) can be regarded as the desired value in a steady state corresponding to nominal force at an instant. In such a way, damping correlating to any desired velocities under nominal force can be obtained or asymptotically obtained. As a result, velocity will be held at a higher value even under the restored nominal force. It enables users to interact with the robot using the lower force they prefer most of the time, such that the limitation of some variable damping models in the [17; 22] is relaxed. It is important to note that Equation (2) only applies when the velocity is within a minimum threshold value. Singularity and extremely high damping issues appear when velocity is reduced to or approximately to zero. Human intentions in fine motion (slow motion) are not considered in the scope, and constant damping (correlates to nominal force and velocity determined from task definition) is applied when motion is slow.  
Stiffness plays a crucial role when the prescribed trajectory is required, such as sit-to-stand transfer assistance. Its value shall increase to make the robot arm stiff enough if loss of balance or a fall is detected. To this end, a simple updating rule is defined according to the human-applied force:  
\[\mathbf{K_{d}}(t)=\mathbf{K_{c}}+\gamma\;diag(|\mathbf{f_{h}}(t)|) \tag{3}\]where \(\mathbf{K}_{\mathbf{c}}\in\mathbb{R}^{n}\) is constant stiffness, and \(\gamma\) is a positive constant used to adjust the tuning rate of stiffness. When interaction is abnormal but supportable, stiffness increases as the human-exerted force increases.