**Abstract**

In this chapter, safety methods in human-robot (HR) interaction/collaboration are presented. Ensuring the safety of humans, objects, or even the robot itself in the robot's operating environment is one of the crucial aspects of collaborative robotics. Since there are limited ways of controlling the behavior of humans, e.g., by placing physical barriers, shaping the behavior of the robot is a feasible option. The chapter discusses current methods of placing barriers for human safety in an industrial setting and novel methods of placing virtual barriers by designing robot controllers using barrier transformation. The concepts of barrier functions (BFs), control barrier functions (CBFs), and barrier transformations are reviewed. The barrier transformation concept is used to design an adaptive trajectory tracking controller for the robot such that the robot does not cross the virtual barriers. The designed controller is tested in simulations. Future directions of safety technology in humanrobot collaboration are presented.

**Keywords:** Safety, Barrier Transformation, Trajectory Tracking Control, Humanrobot collaboration, Safe adaptive control

#### **1. Introduction**

In many robotics and other engineering applications, maintaining system states within a prescribed bound is essential to satisfy the system safety property. For example, in a manufacturing collaborative robotics context, it is crucial for the robot to satisfy requirements, such as trajectory boundedness and to safely carry out its operations [1–3]. In medical robotics context, when a robot is interacting with a person, the person undergoing surgery cannot move so the robot must stay within virtual barriers in 3D space so that it does not harm the person. See [4] for an example cobot architecture. A review of recent methods for safe human-robot (HR) interaction methods is presented in [5].

In this chapter, safety in the context of HR collaboration is defined such that the robot does not cross over a prescribed physical space where humans or other robots are operating or the robot does not cross joint or the task space limits when the robot is collaborating with the person. The violation of constraints can lead to severe degradation of the robot's performance, unsafe behavior, and sometimes

failure of the robot's components. In collaborative robotics applications such as collaborative manipulation [6], collaborative construction [7], teleoperations [8, 9], for human-in-the-loop control applications [10], or distributed multi-robot control applications [11–13], restricting the motion of the robot to a constrained configuration or task space is essential. Safe HR collaboration/interaction is also important for introducing robot factory co-workers in manufacturing automation [14, 15], developing robotic assistants for astronauts [5], for assistive robotics [16–20].

quadcopter is shown which avoids unsafe obstacle regions. Robustness properties of the CBFs are studied in [46], which shows that if a perturbation (or model error) makes it impossible to satisfy the invariance condition for a reciprocal barrier function, then the solution of the model must cease to exist because the control input becomes unbounded. For the Zeroing CBFs, Input-to-State stability (ISS) result holds in the presence of model uncertainties. A concept of exponential BFs and CBFs is introduced in [52]. The method of CBFs is extended to position-based constraints with relative degree 2 in [53] to address the safety constraints for systems with a higher relative degree. Furthermore, a backstepping based design method to design CBFs with a higher relative degree is also introduced. However, achieving a backstepping-based CBF design for systems with a higher relative degree is challenging. In [52], a concept of exponential CBFs is introduced that can handle state-dependent constraints for systems with a higher relative degree. In

*Safe Adaptive Trajectory Tracking Control of Robot for Human-Robot Interaction Using…*

Barrier Lyapunov function (BLF) is another method that is used for the control of nonlinear systems when the outputs and states have upper and lower bound constraints (cf. [55, 56]). The BLF is constructed such that its value grows to infinity whenever its argument approaches the bounds. In [55, 57], an adaptive controller is developed using BLF defined over the output tracking error for single-input and single-output (SISO) nonlinear systems in a strict-feedback form. The controller works when the constraints are either constant or time-varying output constraints. An extension to output tracking with partial state constraints is developed in [58]. Using a similar BLF, in [59], an adaptive neural network with full-state feedback control that uses a Moore-Penrose pseudoinverse term in the control law design is developed for an uncertain robot dynamics with output constraints, and the signals of the closed-loop systems are proven to be semi-global uniformly ultimately bounded (SGUUB). In [54, 60], a BLF method that uses reinforcement learning (RL) is developed for a state regulation problem of a SISO nonlinear systems in the

[54], a safety aware RL framework using BFs is proposed.

*DOI: http://dx.doi.org/10.5772/intechopen.97255*

Brunovsky form with full-state and control input constraints.

presented in [66].

**131**

Designing safe controllers using learning-based control methods are also presented in the literature. For example, in [61], a safe, online, model-free approach to path planning with Q-learning is discussed. A general safety framework for learning-based control using reachability analysis is presented in [62]. In [63], a receding horizon safe path planning approach using mixed integer linear programming (MILP) is presented. Safe trajectory generation for autonomous operation of spacecraft using convex optimization formulation is proposed in [64]. When the region is non-convex, successive convexification can be performed [65]. A detailed survey and tutorial of L<sup>1</sup> adaptive control architecture for safety critical systems is

In this chapter, barrier function transformation, presented in [67], is used to design a safe adaptive trajectory tracking controller for the robot using Euler– Lagrange (EL) system. The safe adaptive trajectory tracking control architecture of a robot system presented in this chapter is shown in **Figure 1**. Full state constraints are used while designing the torque control law. A gradient parameter update law is designed along with projection laws to keep the parameter estimates bounded. A Lyapunov-based stability analysis is presented which concludes semi-global uniformly ultimately bounded tracking result. Simulations studies are conducted using 2-link robot such that the tracking controller does not cross the bounds placed on the joint angles of the robot leading to a desired end-effector motion within a certain bounds. In addition to the control design and its testing in simulation, the chapter presents a review of standard techniques of designing safe robot controllers using BFs and CBFs, followed by a review of Barrier transformations which is used to design adaptive robot controller of EL robot system in this chapter. Future

The literature related to the control of the robot in HR interaction focuses on designing impedance control laws [16, 21–23] or admittance control laws [23, 24] for adapting the interaction forces exerted by the human on the robot, when the robot is physically interacting with the human. In [24], an admittance controller is designed which takes inputs from human actions to achieve safer HR interaction. In [25], a physical human-robot interaction in the context of bikebot is presented. In [21], a an adaptive impedance controller for HR interaction is developed that is based on the NN model of the human intention. In [26], a controller is developed for human robot handover interaction based on dynamic movement primitives. In these examples, the human is physically interacting with the robot.

Other studies in the literature address the problem of robot/autonomous system control to avoid running into humans by modeling them as obstacles [27–29]. Most of these studies view the problem as a collision avoidance problem and solve the collision avoidance using potential field approach [30]. These control actions are purely reactionary in nature [31]. To achieve pro-activeness, studies in literature have designed controllers and motion planners that incorporate the probabilistic information about the possible intentions of human actions [32–34]. When humans and robots collaborate, inference of the person's intentions or robot's intentions improves the overall performance of the collaborative task [35]. Many studies in the literature have focused on designing scheduling and planning algorithms. In [36], a stochastic trajectory optimizer for motion planning is used for planning robot arm motion based on human intentions. In [37], scheduling, planning and control algorithms are presented that adapt to the changing preferences of a human co-worker, while providing strong guarantees for synchronization and timing of activities. In [38], new hierarchical planners based on Hierarchical Goal Networks are developed for assembly planning in human-robot team.

In the context of control architecture design for human-in-the-loop systems, adaptive controllers are presented using the inner-outer loop control structure in [10]. Stability studies of human-in-the-loop telerobotics with time-delay is presented in [39]. However, these studies do not explicitly consider safety aspects of the human-in-the-loop systems. Providing safety guarantees on the learned controller of machine/robot is typically achieved by adjusting the reference command using a pre-filter called a reference governor [40, 41] or by using optimal control under uncertainty in a differential game setting.

For keeping the robot state bounded in a prescribed bound saturated controllers can be used [42, 43]. Barrier function (BF) is a commonly used approach to certify the forward invariance of a closed set with respect to a system model, which can be used to examine the system's safety property [44, 45]. There are two candidates to construct BFs, namely, Reciprocal BFs and Zeroing BFs. The Reciprocal BFs can be of inverse-type and logarithmic-type. Extensions of BFs to controlled systems called as control Barrier Functions (CBF) have also been developed in the literature [46, 47]. Applications of BFs or CBFs in many autonomous robotic systems, such as robot manipulators, autonomous vehicles, and walking robots, are shown in [48–50]. In [47, 49, 51], BFs were successfully applied to dynamical systems where ensuring safety conditions are critical. In [51], time-varying BFs and CBFs for avoiding moving and static obstacles are derived, and their application to flying

#### *Safe Adaptive Trajectory Tracking Control of Robot for Human-Robot Interaction Using… DOI: http://dx.doi.org/10.5772/intechopen.97255*

quadcopter is shown which avoids unsafe obstacle regions. Robustness properties of the CBFs are studied in [46], which shows that if a perturbation (or model error) makes it impossible to satisfy the invariance condition for a reciprocal barrier function, then the solution of the model must cease to exist because the control input becomes unbounded. For the Zeroing CBFs, Input-to-State stability (ISS) result holds in the presence of model uncertainties. A concept of exponential BFs and CBFs is introduced in [52]. The method of CBFs is extended to position-based constraints with relative degree 2 in [53] to address the safety constraints for systems with a higher relative degree. Furthermore, a backstepping based design method to design CBFs with a higher relative degree is also introduced. However, achieving a backstepping-based CBF design for systems with a higher relative degree is challenging. In [52], a concept of exponential CBFs is introduced that can handle state-dependent constraints for systems with a higher relative degree. In [54], a safety aware RL framework using BFs is proposed.

Barrier Lyapunov function (BLF) is another method that is used for the control of nonlinear systems when the outputs and states have upper and lower bound constraints (cf. [55, 56]). The BLF is constructed such that its value grows to infinity whenever its argument approaches the bounds. In [55, 57], an adaptive controller is developed using BLF defined over the output tracking error for single-input and single-output (SISO) nonlinear systems in a strict-feedback form. The controller works when the constraints are either constant or time-varying output constraints. An extension to output tracking with partial state constraints is developed in [58]. Using a similar BLF, in [59], an adaptive neural network with full-state feedback control that uses a Moore-Penrose pseudoinverse term in the control law design is developed for an uncertain robot dynamics with output constraints, and the signals of the closed-loop systems are proven to be semi-global uniformly ultimately bounded (SGUUB). In [54, 60], a BLF method that uses reinforcement learning (RL) is developed for a state regulation problem of a SISO nonlinear systems in the Brunovsky form with full-state and control input constraints.

Designing safe controllers using learning-based control methods are also presented in the literature. For example, in [61], a safe, online, model-free approach to path planning with Q-learning is discussed. A general safety framework for learning-based control using reachability analysis is presented in [62]. In [63], a receding horizon safe path planning approach using mixed integer linear programming (MILP) is presented. Safe trajectory generation for autonomous operation of spacecraft using convex optimization formulation is proposed in [64]. When the region is non-convex, successive convexification can be performed [65]. A detailed survey and tutorial of L<sup>1</sup> adaptive control architecture for safety critical systems is presented in [66].

In this chapter, barrier function transformation, presented in [67], is used to design a safe adaptive trajectory tracking controller for the robot using Euler– Lagrange (EL) system. The safe adaptive trajectory tracking control architecture of a robot system presented in this chapter is shown in **Figure 1**. Full state constraints are used while designing the torque control law. A gradient parameter update law is designed along with projection laws to keep the parameter estimates bounded. A Lyapunov-based stability analysis is presented which concludes semi-global uniformly ultimately bounded tracking result. Simulations studies are conducted using 2-link robot such that the tracking controller does not cross the bounds placed on the joint angles of the robot leading to a desired end-effector motion within a certain bounds. In addition to the control design and its testing in simulation, the chapter presents a review of standard techniques of designing safe robot controllers using BFs and CBFs, followed by a review of Barrier transformations which is used to design adaptive robot controller of EL robot system in this chapter. Future

failure of the robot's components. In collaborative robotics applications such as collaborative manipulation [6], collaborative construction [7], teleoperations [8, 9], for human-in-the-loop control applications [10], or distributed multi-robot control applications [11–13], restricting the motion of the robot to a constrained configuration or task space is essential. Safe HR collaboration/interaction is also important for introducing robot factory co-workers in manufacturing automation [14, 15], developing robotic assistants for astronauts [5], for assistive robotics [16–20]. The literature related to the control of the robot in HR interaction focuses on designing impedance control laws [16, 21–23] or admittance control laws [23, 24] for adapting the interaction forces exerted by the human on the robot, when the robot is physically interacting with the human. In [24], an admittance controller is designed which takes inputs from human actions to achieve safer HR interaction. In [25], a physical human-robot interaction in the context of bikebot is presented. In [21], a an adaptive impedance controller for HR interaction is developed that is based on the NN model of the human intention. In [26], a controller is developed for human robot handover interaction based on dynamic movement primitives. In

*Collaborative and Humanoid Robots*

these examples, the human is physically interacting with the robot.

for assembly planning in human-robot team.

under uncertainty in a differential game setting.

**130**

Other studies in the literature address the problem of robot/autonomous system control to avoid running into humans by modeling them as obstacles [27–29]. Most of these studies view the problem as a collision avoidance problem and solve the collision avoidance using potential field approach [30]. These control actions are purely reactionary in nature [31]. To achieve pro-activeness, studies in literature have designed controllers and motion planners that incorporate the probabilistic information about the possible intentions of human actions [32–34]. When humans and robots collaborate, inference of the person's intentions or robot's intentions improves the overall performance of the collaborative task [35]. Many studies in the literature have focused on designing scheduling and planning algorithms. In [36], a stochastic trajectory optimizer for motion planning is used for planning robot arm motion based on human intentions. In [37], scheduling, planning and control algorithms are presented that adapt to the changing preferences of a human co-worker, while providing strong guarantees for synchronization and timing of activities. In [38], new hierarchical planners based on Hierarchical Goal Networks are developed

In the context of control architecture design for human-in-the-loop systems, adaptive controllers are presented using the inner-outer loop control structure in [10]. Stability studies of human-in-the-loop telerobotics with time-delay is presented in [39]. However, these studies do not explicitly consider safety aspects of the human-in-the-loop systems. Providing safety guarantees on the learned controller of machine/robot is typically achieved by adjusting the reference command using a pre-filter called a reference governor [40, 41] or by using optimal control

For keeping the robot state bounded in a prescribed bound saturated controllers can be used [42, 43]. Barrier function (BF) is a commonly used approach to certify the forward invariance of a closed set with respect to a system model, which can be used to examine the system's safety property [44, 45]. There are two candidates to construct BFs, namely, Reciprocal BFs and Zeroing BFs. The Reciprocal BFs can be of inverse-type and logarithmic-type. Extensions of BFs to controlled systems called as control Barrier Functions (CBF) have also been developed in the literature [46, 47]. Applications of BFs or CBFs in many autonomous robotic systems, such as robot manipulators, autonomous vehicles, and walking robots, are shown in [48–50]. In [47, 49, 51], BFs were successfully applied to dynamical systems where ensuring safety conditions are critical. In [51], time-varying BFs and CBFs for avoiding moving and static obstacles are derived, and their application to flying

**Figure 1.**

*A block diagram that illustrates the control flow in a robotic system. The architecture constitutes of two main loops. The inner-loop represents an equivalent unconstrained Euler–Lagrange (EL)-dynamics used to design an adaptive controller. The outer-loop contains the constrained EL-dynamics and a controller that defines the desired joint motions at each time step.*

directions of the method and its applicability to safety in collaborative robotics are discussed.

Rest of the chapter is organized as follows. A review of BFs and CBFs and Barrier transformations is presented. Barrier transformation is then used to design adaptive robot controller of EL robot system in this chapter. A design and analysis of the safe adaptive trajectory tracking controller is then discussed. Simulation results of the designed controller on a 2-link EL robot system model are presented. Future directions of robot control design for safe human-robot collaboration are provided at the end.
