**1. Introduction**

Guidance constraints are a type of active constraints/virtual fixtures, which have been studied in the field of physical human–robot interaction (pHRI) by many researchers [1–7]. From the work of Rosenberg [1], the concept of perceptual overlay to increase task performance has been explored in different types of human–machine manipulation systems, such as telemanipulators and cooperative manipulators [3]. These virtual fixtures are often used to guide the movement of the robot towards desired targets while avoiding obstacles and preventing the robot from entering predefined forbidden regions. Although reference paths for the robot are generated in some applications, the accuracy of path following is not the focus of these techniques. Instead, compliant behavior of the robot that allows deviation of the path is the main concern of most pHRI studies. However, accurate path tracking and compliant behavior are not necessarily antinomies. They can be delicately tailored to meet the requirements for dedicated purposes and achieve better performance. For example, rehabilitation patients can benefit greatly from practicing with equipment that is capable of following a path while still being compliant along the path, because it allows the patient to closely track an optimal path predefined by medical experts, and progress in different levels of assistance, which has been shown to improve rehabilitation progress [8–10]. Another important application is in industrial assembly tasks. Many efforts have been reported in this area towards efficient human–robot collaboration [11–15]. The authors of [13] presented a force-overshoot-free controller for high-accuracy assembly tasks using an industrial robot. Furthermore, in [14] a collaborative task for a homokinetic

**Citation:** Reyes-Uquillas, D.; Hsiao, T. Compliant Human–Robot Collaboration with Accurate Path-Tracking Ability for a Robot Manipulator. *Appl. Sci.* **2021**, *11*, 5914. https://doi.org/10.3390/app11135914

Academic Editor: Luis Gracia

Received: 31 May 2021 Accepted: 23 June 2021 Published: 25 June 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

joint assembly is performed using admittance control. In [15], a method for robotic fixtureless approach of large flexible panels assembly using compliance force control is presented and evaluated with an industrial robot. The aim of these approaches is to relieve the operator from having to manipulate heavy components during the assembly and instead being able to focus only with the dexterous part of the assembly. Moreover, an important factor is that in high-precision assembly tasks static fixtures are necessary to keep in place the parts being joined and task performance depends on these fixtures. These tasks could benefit from a compliant path-tracking system. Furthermore, other direct application of path tracking in human–robot collaboration is for educational and physical training purposes where the robot system can be used as a tool to teach complex tasks that are best learned by hand-in-hand demonstration. Examples include practicing calligraphy, assisted hand–motor skills development, and so on [16,17]. In this sense, the robot system acts as the coach and the user is guided to follow an optimal path that perfectly accomplishes the task while obtaining different levels of assistance to trace the path, from completely passive to completely active. Based on these analyses, we found that in many manual guidance applications, it is beneficial for the robot to follow a path while being compliant along the path. Consequently, the goal of this paper is to investigate the related techniques.

Path-tracking is an important feature of most robotic systems. From manipulators to mobile platforms, the ability to follow a path with high accuracy has been investigated by many researchers [2,18,19]. Moreover, path-tracking in compliant human–robot collaboration has been the topic of recent studies. In [4], virtual fixtures were created and modified through an iterative method based on kinesthetic teaching and Akima splines. The approach was evaluated in a simulated sanding task using a 3-DOF collaborative robot and a user study which showed that virtual guide assistance improves the performance of co-manipulation tasks. Later, Raiola et al. in [20] defined virtual guides as virtual mechanisms using Gaussian mixtures model (GMM) from multiple user demonstrations, which can be refined through incremental training. They proposed to establish a library of multiple virtual guides which can be created, modified and used by the human operator. The performance was experimentally evaluated with a compliant 3-DOF robot and a user study. The algorithms in [4,20] concentrated on virtual guides construction and how to iteratively modify the nominal path, but there was no treatment of the accuracy of path-tracking. Wu et al. in [21] optimally reshaped the desired robot trajectory using an adaptive neural network controller to effectively complete co-manipulation tasks with a robotic exoskeleton. The experimental validation was demonstrated in a 2-DOF motion case but did not describe extensibility of the method to higher DOFs or to different types of manipulators. In other words, the research effort was to conceive an algorithm that allows the human to modify the desired trajectory using shared control; thus, the contributions focus on the path generation aspect of human–robot collaboration. However, the challenge of accuracy in human–robot interaction by regulating robot motion in the predetermined task direction remains.

Previous works on the accuracy aspect for compliant tasks by the use of virtual fixtures include [5–7], where virtual fixtures were used together with admittance control to allow for compliant path tracking tasks. A vision-based virtual fixture algorithm for cooperative manipulation was designed and implemented in [5], where the authors described how to create hard and soft virtual fixtures for two types of reference targets—point positioning and curve following—as well as the extensions to virtual geometries such as tubes or cones to confine motion to a volume for a cooperative system which uses admittance control. The experimental setup was validated using the "Steady Hand Robot" [22] in macroscale and microscale planar tasks. The results showed that the addition of vision-based virtual fixtures assistance increased performance regarding position error and execution time, and that there is a trade-off between performance and user control. However, the experimental validation consisted in using different fixed levels of admittance, but as covered in [23] adaptive admittance control has been proven more effective. Moreover, there is no distinction between the virtual fixture definition and the admittance control parameter

tuning. This complicates the definition of the virtual fixtures and directly influences the achievable tracking performance, as shown in their study. In [6], virtual fixtures were used to control the robot for robotic-assisted surgery. The task was defined and projected into a space of orthogonal directions that consisted of preferred directions and non-preferred ones. The authors of [6] explored and compared two types of error compensation—manual and autonomous—to reduce the path-tracking task error. The results showed that manual compensation was not sufficient for correction of all deviations, particularly when a translational virtual fixture was defined and the deviation error for orientation occurred, and vice versa. This was solved with their proposed autonomous compensation method where the user had control of the system along the preferred directions through the forces applied, while the robotic system independently compensated deviations. In [7], a framework for compliant path tracking tasks was proposed. The system used a virtual robot approach to obtain the desired velocities that were treated as the command to the internal position controller. Motion constraints and task space constraints can be defined in this framework. The proposed approach was experimentally evaluated using a 7-DOF KUKA LWR cobot. The results showed that it is easy to define different constraints in the framework by adjusting the properties and parameters in their algorithm. However, all parameters were tuned heuristically and specifically for the evaluated task. The authors of [24] presented a hybrid position-force control oriented to surface treatment tasks, e.g., sanding, deburring, polishing, etc. They used sliding mode concepts for the robot force control to maintain the orientation of the tool always perpendicular to the surface and to obtain the desired tool pressure on the surface. The lower-priority tracking controller was designed to follow the desired trajectory where deviations to satisfy safety constraints are allowed. Finally, redundancy resolution was also included to keep the manipulator near its home configuration for safety purposes. The method showed increased robustness and low computational cost, and experimental validation of the approach using a 7R manipulator proved its applicability and effectiveness.

The common drawbacks of the cited works are that, in many cases, the accuracy aspect of path tracking when compliance is combined for co-manipulation tasks was not explored. Besides, the experimental setup often relies on robots designed to be inherently suitable for manipulation tasks. Furthermore, kinematic constraints such as singularities, joint limits, task space limits, etc., if considered, are part of the virtual fixture definition and therefore task dependent. As a result, the task must be carefully planned to avoid these kinematic constraints, which imposes restrictions on the task definition. Given these recent references in the field and considering their contributions and stated drawbacks, we believe the topic of path tracking is highly relevant to human–robot collaboration applications, and the study of the associated design strategies is of great importance and value.

In this paper, we aim to achieve compliance of a robot manipulator along a predefined path, giving the robot the ability to move forward or backward depending on the direction of an external force applied to the end effector while tracking the path. Figure 1 illustrates this objective, where a desired path is shown and in the case of an external force is applied, the robot is compliant only along the path tangential direction, and not compliant along the normal direction. To accomplish this goal, we propose a dual-loop control structure, including an inner motion control loop and an outer admittance control loop. A modified sliding mode controller (SMC) is designed for the inner motion control, which guarantees desirable state tracking performance and robustness while significantly suppresses chattering. In the outer admittance loop, we define the compliance control problem in the tangential-normal-binormal (TNB) frame associated with the path to find the projection of the external force in the tangential direction and develop an atemporal path generation strategy by parameterizing the path with respect to the arc length to move along the path as desired by the user. Furthermore, an adaptive admittance law that has been experimentally verified in [23] is exploited to allow a timely, intuitive, and simple communication between the human and robot. In addition, the proposed adaptive admittance law considers the most common kinematics constraints that can appear in manual guidance interaction and

adapts the admittance parameters appropriately based on the objectives of safety, accuracy, and comfort. In this approach, kinematic constraints are not task dependent and instead are configuration dependent, which means that they can be reused in multiple applications. Furthermore, these constraints are treated simultaneously, considering smooth transitions among them. Combining the TNB frame projection and adaptive admittance law, the outer admittance control loop realizes a safe and intuitive human-robot collaboration along a predefined path while the robust inner motion control loop guarantees that the robot follows the path accurately.

We validate the proposed approach with two experiments including a linear motion test to demonstrate the behavior of the robot to the direction of the external force applied and a general 3D path test. Both tests are performed on a traditional 6-DOF industrial robot equipped with a force/torque (F/T) sensor on its end effector. No dedicated hardware is required. We compare three types of motion—free motion (FM), force-applied motion (FAM), and combined motion with virtual forces (CVF)—to show the performance in both ends of the assistance range spectrum. FM demonstrates the fully assisted case, where no force from the user is needed; FAM is the no-assistance case, where the motion of the robot along the path depends on the force applied by the user; and CVF is the smooth transition between the previous two cases. To achieve the proposed objective of compliant human–robot collaboration with accurate path-tracking, the robot follows a reference path and the tracking error should be small, whether it is subject to external forces or not. Thus, we evaluate the tracking performance of each type of motion by calculating the root mean square error (RMSE). The experiments exhibit not only accurate path tracking with desired compliant behavior but also the applicability of the proposed approach to traditional industrial manipulators with F/T sensors. Therefore, the main contributions of this work are as follows:


**Figure 1.** Path tracking for human–robot interaction with compliance along a predefined path.

The paper is structured as follows. Section 2 covers the problem formulation and the methodology, including the inner motion control loop and the outer admittance control loop. In Section 3, we describe the experimental setup and tests performed to validate the proposed approach. Additionally, we present the results and analysis of RMSE, which is used to evaluate the tracking performance. Finally, the conclusions of the work are presented in Section 4.

### **2. Problem Formulation and Methodology**

As we discussed in the previous section, the most effective way to accomplish particular human–robot collaboration in the fields of rehabilitation, industrial assembly, education, and physical training is by guiding the user to closely follow an optimal path with robots, while reserving a certain degree of compliance for safe and smooth human–robot interaction. In these applications, the path is defined in advance by domain experts. The goal of this paper is to design a controller that confines the end effector of a robot on the path but allows it to move forward or backward freely along the path depending on the direction of external forces. If the external force is too weak or null, a virtual force is applied to the end effector from the controller to track the path autonomously and accurately. In other words, the proposed control system endows the robot with directional compliance along a prescribed path, and high stiffness in other directions for accurate path tracking. Moreover, the degree of compliance is online adjustable according to the applied forces and safety operation criteria of the robot such that the interaction between the human and the robot is safe, comfortable, and intuitive.

In this paper, we consider an n-joint robot that carries out tasks in the 3D task space, where *n* ≥ 3. An F/T sensor is mounted on the end effector of the robot to measure external forces. To accomplish the goal of this paper, we propose a dual-loop control structure as shown in Figure 2. The inner loop is dedicated to precision motion control in the joint space. Namely, given the desired trajectory in the joint space *qd* <sup>∈</sup> <sup>R</sup>*n*, the motion controller in the inner loop calculates the corresponding joint torque such that the actual joint angle follows *qd* accurately. *qd* is determined by the outer admittance control loop based on the desired task space path and the external force *Fext* <sup>∈</sup> <sup>R</sup>3. The filtered external force *fext* <sup>∈</sup> <sup>R</sup><sup>3</sup> is projected to the tangent direction of the path and then converted to the corresponding task space velocity *<sup>r</sup>*˙*<sup>d</sup>* <sup>∈</sup> <sup>R</sup><sup>3</sup> through an admittance function whose parameters are online adjustable. Then, *r*˙*<sup>d</sup>* is transformed to the joint space to obtain *qd*. In the following subsections, we present the details of the techniques used in the proposed dual-loop control structure.

**Figure 2.** Block diagram of adaptive admittance control with path tracking.

#### *2.1. Inner Motion Control Loop*

The dynamic equation of an n-joint robot is given as follows:

$$M(q)\ddot{q} + \mathcal{C}(q,\dot{q})\dot{q} + \mathcal{G}(q) + F(\dot{q}) = \pi + J^T(q)F\_{ext} \tag{1}$$

where *<sup>q</sup>*, *<sup>q</sup>*˙, *<sup>q</sup>*¨, <sup>τ</sup> <sup>∈</sup> <sup>R</sup>*n*, denote the joint angle, angular velocity, angular acceleration, and torque, respectively. *<sup>M</sup>*(*q*), *<sup>C</sup>*(*q*, *<sup>q</sup>*˙) <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* are the inertial matrix, Coriolis, and centrifugal matrix, respectively. *<sup>G</sup>*(*q*), *<sup>F</sup>*(*q*˙) <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* are the gravitational torque and frictional torque, respectively. *<sup>J</sup>*(*q*) <sup>∈</sup> <sup>R</sup>3×*<sup>n</sup>* is the Jacobian matrix of the end effector, and *Fext* <sup>∈</sup> <sup>R</sup><sup>3</sup> is the external force applied to the end effector.

Given the desired joint space trajectory *qd* <sup>∈</sup> <sup>R</sup>*n*, we would like to design a robust motion control law that calculates the required joint torque τ for keeping the tracking error *<sup>q</sup>* <sup>=</sup> *<sup>q</sup>* <sup>−</sup> *qd* 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–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*, *q*˙), *G*0(*q*), and *Fo*(*q*˙) be the nominal models of *M*(*q*), *C*(*q*, *q*˙), *G*(*q*), and *F*(*q*˙), respectively. Then, (1) can be rewritten as

$$\dot{q} = -M\_0^{-1}(q)[\mathbb{C}\_0(q,\dot{q})\dot{q} + \mathbb{G}\_0(q) + \mathbb{F}\_0(\dot{q})] + (I + \Delta\_M)M\_0^{-1}(q)\left(\pi + J^T(q)\mathbb{F}\_{\text{ext}}\right) + d \tag{2}$$

where *d* is the lumped additive model uncertainties resulting from all model parameters in *M*(*q*), *C*(*q*, *q*˙), *G*(*q*) and *F*(*q*˙). Δ*<sup>M</sup>* is the multiplicative model uncertainty of *M*−1(*q*). We assume that Δ*M* ≤ κ < 1 and *d* ≤ *d* for all *q* and *q*˙.

Define the sliding variable <sup>σ</sup> <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* as

$$\sigma = \begin{bmatrix} \sigma\_1, \dots, \sigma\_n \end{bmatrix}^T = \dot{\tilde{q}} + \mathbb{C}\_1 \tilde{q} + \mathfrak{n} \tag{3}$$

where *<sup>C</sup>*<sup>1</sup> <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* is positive definite and <sup>η</sup> <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* is an auxiliary vector which will be determined shortly. The proposed control law is

$$\pi = \left[\mathcal{C}\_0(q,\dot{q})\dot{q} + \mathcal{G}\_0(q) + F\_0(\dot{q})\right] + M\_0(q)\left(\ddot{q}\_d - \mathcal{C}\_1\dot{\bar{q}} + \Lambda\_0 u\_1\right) \tag{4}$$

$$
\dot{u}\_1 = -\Lambda\_1 u\_1 + \eta \tag{5}
$$

$$
\dot{\mathfrak{q}} = -\Lambda \mathfrak{q} \mathfrak{u}\_1 - K\_5 \mathfrak{a} - \mathfrak{p} \tag{6}
$$

Note that the control law in (4) cancels the nominal nonlinear terms and introduces an auxiliary control input *<sup>u</sup>*<sup>1</sup> to enhance robustness. <sup>Λ</sup>1, <sup>Λ</sup>0, *Ks* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* are constant gain matrices and

$$\rho = \begin{bmatrix} \operatorname{sgn}(\sigma\_1) \vec{d}\_{s1} \cdot \cdots \cdot \operatorname{sgn}(\sigma\_n) \vec{d}\_{sn} \end{bmatrix}^T \tag{7}$$

where *sgn*(·) denotes the sign function, and ¯*dsi* <sup>=</sup> ¯*<sup>d</sup>* <sup>+</sup> <sup>κ</sup> *<sup>q</sup>*¨*<sup>d</sup>* <sup>−</sup> *<sup>C</sup>*1˙ *q* + Λ0*u*<sup>1</sup> , *i* = 1, ··· , *n*, is the bound of the uncertain terms. Each component of ρ switches its sign across the sliding surface σ*<sup>i</sup>* = 0 and is used to suppress the model uncertainty. However, the high-frequency switching behavior of ρ causes significant chattering if it is directly added to the joint torque, just as the traditional SMC does.

Let *Ks* be positive definite, if we substitute (4)–(6) into (2), it can be shown that [30]

$$
\sigma^T \sigma \le -\sigma^T K\_s \sigma \tag{8}
$$

This implies that σ → 0 as *t* → ∞. In other words, the system will reach and stay on the sliding surface σ ≡ 0. Moreover, (5) and (6) can be combined into one equation:

$$
\ddot{u}\_1 + \Lambda\_1 \dot{u}\_1 + \Lambda\_0 u\_1 = -(K\_s \sigma + \wp) \tag{9}
$$

where <sup>Λ</sup>1, <sup>Λ</sup><sup>0</sup> <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* are chosen such that the left-hand side of (9) is a stable system. For example, Λ1, Λ<sup>0</sup> can be chosen as diagonal matrices with positive diagonal elements.

From (4) and (9) we see that, unlike traditional SMC, the switching term ρ does not appear in the joint torque directly. Instead, it is filtered by (9) before being incorporated into the joint torque. Therefore, the chattering phenomenon is significantly alleviated.

Once the sliding surface is reached, i.e., σ ≡ 0, the switching term is equivalent to the lumped effect of model uncertainty and external disturbance, and the closed-loop system can be expressed as

$$
\ddot{\boldsymbol{\mu}}\_1 + \boldsymbol{\Lambda}\_1 \dot{\boldsymbol{\mu}}\_1 + \boldsymbol{\Lambda}\_0 \boldsymbol{\mu}\_1 = -\boldsymbol{\wp} \tag{10}
$$

$$
\dot{\overline{q}} + \mathcal{C}\_1 \overline{q} = -\mathfrak{n} = -(\dot{\mathfrak{u}}\_1 + \Lambda\_1 \mathfrak{u}\_1) \tag{11}
$$

For ease of illustration, let us temporarily assume that Λ1, Λ0, and *C*<sup>1</sup> are diagonal matrices, i.e., Λ*<sup>i</sup>* = *diag*(λ*i*1, ··· , λ*in*), *i* = 0, 1, and *C*<sup>1</sup> = *diag*(*c*11, ··· , *c*1*n*). Then, the closed-loop system (10) and (11) can be expressed as Figure 3 below. It is clear from Figure 3 that the closed-loop system is stable. In addition, the switching term, which is equivalent to uncertainty and disturbance in the sliding mode, is filtered by a second-order system *s*+λ1*<sup>j</sup> s*2+λ1*js*+λ0*<sup>j</sup>* and affects the tracking error through a first-order system <sup>1</sup> *s*+*c*1*<sup>j</sup>* . Although the tracking error is not guaranteed to converge to zero, we can choose appropriate gain matrices Λ1, Λ0, and *C*<sup>1</sup> such that the tracking error is as small as desired.

**Figure 3.** The *j*th component of the closed-loop system when the sliding surface σ*<sup>j</sup>* = 0 is reached, *j* = 1, ··· , *n*.

Besides the chattering attenuation property, another appealing feature of the proposed modified SMC is that if the initial tracking error is known, we can set <sup>η</sup>(0) <sup>=</sup> <sup>−</sup>˙ *<sup>q</sup>*(0) <sup>−</sup> *<sup>C</sup>*1*q*(0). As a result, the system is on the sliding surface as it starts, which eliminates the reaching phase of the traditional SMC and reduces the transient response time.

Experimental verification conducted in [30] showed that the proposed modified SMC has the best tracking performance in comparison with traditional first-order SMC (FOSMC), second-order SMC (SOSMC), and integral SMC (ISMC). Its chattering reduction ability is much better than FOSMC and ISMC, and similar to SOSMC. However, the proposed modified SMC does not need to find bounds to the time derivative of uncertainties as SOSMC does. Therefore, the proposed control law induces less vibration and achieves the best tracking performance with a simple structure.

#### *2.2. Outer Admittance Control Loop*

Suppose that the reference path with respect to an inertial frame in the 3D task space is

$$\sigma\_p(s) = \begin{bmatrix} \chi\_p(s) \ y\_p(s) \ z\_p(s) \end{bmatrix}^T \tag{12}$$

which is parameterized by a single parameter *s* ∈ [0, 1]. We assume that *rp* has finite length and choose the normalized arc length as the parameter *s*. Thus, *s* = 0 and *s* = 1 correspond to the start point and the end point of the reference path, respectively. Furthermore, we assume that *rp* is twice differentiable with respect to *s*. At any point on *rp*(*s*), we can find the unit tangent vector *t*(*s*), unit normal vector *n*(*s*) and unit binormal vector *b*(*s*) at that point as follows:

$$t(s) = \frac{r\_p'(s)}{||r\_p'(s)||'}, \; n(s) = \frac{t'(s)}{||t'(s)||'}, \; b(s) = t(s) \times n(s) \tag{13}$$

Note that *r <sup>p</sup>*(*s*) and *t* (*s*) denote the first derivatives of *rp*(*s*) and *t*(*s*) with respect to *s*, and × is the cross product of two vectors. These vectors comprise the TNB frame, which moves with the end effector along *rp*. Whenever an external force *Fext* is applied to the end effector, they are measured by the F/T sensor equipped on the end effector, and the measurements are preprocessed to alleviate noise, obtaining *fext* (see the output of the

signal conditioning block in Figure 2). If the magnitude of *fext* exceeds a threshold *fth*, the *fext* is projected to the unit tangent vector of the path. On the other hand, if *fext* is too weak or null, i.e., *fext* < *fth*, then a virtual force with magnitude *fv* > 0 is added along the tangent direction of the path. In other words,

$$f\_{proj} = \begin{cases} |f\_{\text{ext}}^T t(s)|t(s), & ||f\_{\text{ext}}|| \ge f\_{th} \\ f\_{\text{v}} t(s), & ||f\_{\text{ext}}|| < f\_{th} \end{cases} \tag{14}$$

Note that (14) is represented by the mode select block in Figure 2. Then, the desired velocity of the end effector in the task space, denoted by *r*˙*d*, is determined as *r*˙*<sup>d</sup>* = *g*(*t*) ∗ *fproj*, where ∗ denotes convolution, and *g*(*t*) is the impulse response of the desired admittance function *G*(*s*), which has the following first-order form:

$$G(s) = \frac{\frac{1}{c}}{\frac{m}{c}s + 1} \tag{15}$$

Parameters *m* and *c* denote the virtual mass and damping of the end effector, respectively, and they are online adjustable for avoiding common kinematic constraints such as singularities, joint limits, and task space limits. These constraints are directly related to the safety of the interaction because it may cause damage to the environment or the nearby human operators if any of these constraints is violated. Furthermore, providing the robot with awareness of these constraints and a way to preemptively deal with them relieves the operator from the mental load required to avoid them, which increases performance of the task [1,5–7,14,20]. If none of these constraints are going to be violated, the admittance parameters are adjusted to achieve safe, comfortable, and intuitive human–robot interaction. The online parameter tuning algorithm will be introduced shortly. Once the desired task space velocity *r*˙*<sup>d</sup>* is obtained, the desired joint space velocity is calculated by

$$\dot{q}\_d = \int^\dagger(q)[\dot{r}\_d + K(r\_d - r)]\tag{16}$$

where *<sup>r</sup>* is the actual position of the end effector and *<sup>K</sup>* <sup>∈</sup> <sup>R</sup>3×<sup>3</sup> is a positive definite gain matrix which guarantees that *<sup>r</sup>* → *rd* as *<sup>t</sup>* → <sup>∞</sup>. *<sup>J</sup>*†(*q*) is the pseudo-inverse of *<sup>J</sup>*(*q*). We assume that the reference path *rp* does not pass through any singularity of the robot; therefore, *J*(*q*) is full rank and *J*†(*q*) exists for all points on *rp*. Existence of singularities is an inherent limitation for industrial robots, regardless of the method used. However, one desirable feature of the proposed method is that it forces the robot to stop before reaching singularities and allows the robot to retract along the path without getting stuck when guided by the human operator. This is accomplished by the outer admittance control loop. Therefore, violation of the no-singularities-on-the-reference-path assumption does not fail the normal operation of the robot. It just restricts its motion on the portion of the reference path without singularities.

Note that only the tangential component of *fext* is used to generate *r*˙*<sup>d</sup>* which is in the tangent direction of *rp*. In other words, the robot moves along *rp* when the end effector is pushed by an external tangential force. However, if a large force, i.e., *fext* ≥ *fth*, is applied in the perpendicular direction of *rp*, then *fproj* is zero. Consequently, *r*˙*<sup>d</sup>* reduces to zero exponentially with time constant *<sup>m</sup> <sup>c</sup>* , and the robot stops almost immediately if the time constant is very small. In this way, the robot rejects perpendicular forces while complies with tangential forces based on an adaptive admittance law.

The first-order admittance function *G*(*s*) is widely used in many compliance control problems [31–34], but the appropriate admittance parameters are task dependent and are often set by heuristics. To deal with this problem, we have proposed an online parameter tuning approach in [23] that considers the safety, comfort, and intuition of manual guidance. The underlying idea is to reduce compliance without significantly changing the dynamic behavior of the admittance function whenever the robot is close to constrained areas such as singularities, joint limits, and task space limits. If no constraints are going to be breached, the compliance varies with the external force, allowing the user to guide the motion of the robot more comfortably and intuitively. In this paper, the desired task space path *rp* is defined in advance and the end effector does not deviate from this path; thus, we can assume that the robot will not pass through or go near any constrained areas. Therefore, the admittance parameters are adapted based on the applied forces.

To tune the admittance parameters, we first set up the varying range for the virtual damping *c*. The maximum allowable motion speed is considered when selecting the limits of the range for damping *c*. This ensures that any motion is below the safety relative speed limit defined in the Annex A of ISO/TS 15066:2016 [35] for transient and quasi-static contact. Let *c* ∈ [*cmin* , *cmax*], where *cmin* and *cmax* are the pre-established minimum and maximum limits of *c*, respectively. Then, the projected force *fproj* is normalized with respect to an estimated maximum value ¯ *f* , which could be determined either experimentally or heuristically. Define

$$\hat{f} = \min\left\{ \frac{||f\_{proj}||}{\bar{f}}, 1 \right\} \tag{17}$$

Therefore, ˆ *f* ∈ (0, 1]. The proposed parameter adaptive law is

$$
\mathcal{L} = (\mathcal{c}\_{\min} - \mathcal{c}\_{\max})\hat{f} + \mathcal{c}\_{\max} \tag{18}
$$

Notice that the largest force ˆ *f* = 1 is mapped to the minimum damping *cmin*, which corresponds to the largest DC gain of *G*(*s*), while the smallest force ˆ *f* ≈ 0 is mapped to the maximum damping *cmax* corresponding to the smallest DC gain of *G*(*s*). Consequently, the user can guide the robot to move faster and reach the destination quickly just by applying a larger force. On the other hand, the user slows down the robot to accomplish fine work with high accuracy when a smaller force is applied. Once the virtual damping *c* is determined, the virtual mass *m* is adjusted accordingly to keep the ratio *<sup>m</sup> <sup>c</sup>* unaltered. The ratio *<sup>m</sup> <sup>c</sup>* is the time constant of *G*(*s*), which is related to the response time of *G*(*s*). Fixed time constant gives consistent dynamic behavior of the admittance function and allows the user to quickly get accustomed to the way for operating the robot.

Experimental verification of the proposed adaptive admittance law and comparison with other parameter tuning methods were conducted in [23] by implementing a 3D shape tracing task. The admittance laws in comparison included constant parameters and adaptive virtual damping with fixed virtual mass. Objective evaluation of the test results was done by analyzing the path length errors and task execution time. Meanwhile, a subjective evaluation was also conducted by collecting questionnaires that asked each test user to score the performance of each parameter tuning method in terms of vibration of the system, required efforts, and ease of completing the task. The results showed that the proposed adaptive admittance law has the best performance among all compared methods for both objective and subjective evaluation.

The outer admittance control loop is summarized as Algorithm 1 below.


#### **3. Experiments and Results**

*3.1. Experimental Setup*

The tests are performed using a HIWIN RA605 6-DOF robot arm with a Robotiq 2F-85 gripper attached to the end effector. An ATI Gamma F/T sensor with analog output sampled at 1 kHz was used to measure the external force applied to the end effector. See Figure 4.

**Figure 4.** Experimental setup used for the tests showing the robot equipped with the force/torque (F/T) sensor and a gripper on the end-effector.

In this section, the two experiments conducted to validate the proposed approach are detailed. They include a linear motion test and a 3D path test. For these tests, the robot moves with constant orientation. Furthermore, the robot tool actual position is obtained from the robot joint encoders. The sliding mode control parameters used are summarized in Table 1. Regarding the admittance law parameters, the limits for damping *c* were chosen as *cmin* = 300 N·s·m−<sup>1</sup> and *cmax* = 1200 N·m·s−1. From these values, the maximum speed is 266 mm·s−1, which allows us to comply with the relative speed limits defined in Annex A of ISO/TS 15066:2016 [35] for applications where contact between body areas and the robot system is possible. In our case, these body areas include the lower arm and hand/finger, where the speeds are restricted to 1300 and 650 mm·s−<sup>1</sup> for transient and quasi-static contact, respectively, considering an estimated robot mass of 20 kg. In addition, the user has an emergency button at hand throughout the experiments conducted. The time constant of *G*(*s*) is the ratio *<sup>m</sup> <sup>c</sup>* = 0.0167 s. Finally, *fth* = 1.2 N and *fv* = 40 N.

**Table 1.** Sliding mode controller (SMC) parameters.


Illustrated in Figure 5 are all the coordinate frames and their corresponding relations with each other in the environment used for the experiments. In the linear motion test, we define a horizontal line in front of the robot to demonstrate the behavior as external forces are applied to the end effector from different directions. The line is defined from points *A* = [0.34, 0.45, 0.15] *<sup>T</sup>* to *B* = [0.0, 0.6, 0.15] *<sup>T</sup>* in robot base frame, see Figure 5 and Figure 6a, and parametrized with respect to *<sup>s</sup>* as in (19), where −→*AB* <sup>=</sup> *<sup>B</sup>* <sup>−</sup> *<sup>A</sup>* is the 3 <sup>×</sup> <sup>1</sup> direction vector from *A* to *B* and *s* ∈ [0, 1].

$$r(s) = A + s\overrightarrow{AB} \tag{19}$$

**Figure 5.** Coordinate frames description. Force sensor frame in blue, robot base frame in red, tangential-normal-binormal (TNB) frame in black, and predefined path in green.

For the second test, the 3D path we chose to demonstrate the path-tracking capability of our system is a helix, defined in (20)–(22) and parametrized with respect to *s* ∈ [0, 1], where *s* = 0 marks the initial point of the path and *s* = 1 marks the end point of the path. *R* = 0.1 m is the helix radius centered at *o* = [0.24, 0.45, 0.15] *<sup>T</sup>*, *n* = 2 is the number of rounds for the helix, *bo* = 0.05 m is the increase in *z* per round.

$$\mathbf{x}(\mathbf{s}) = o\_{\mathbf{x}} + R\cos(2\pi ms) \tag{20}$$

$$y(s) = o\_{\mathcal{Y}} + R\sin(2\pi ns) \tag{21}$$

$$z(s) = o\_{\mathbb{Z}} + nb\_{\mathbb{O}}s \tag{22}$$
