## 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 human-robot collaboration are presented.

### Keywords

- Safety
- Barrier Transformation
- Trajectory Tracking Control
- Human-robot 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, 2, 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, 12, 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, 17, 18, 19, 20].

The literature related to the control of the robot in HR interaction focuses on designing impedance control laws [16, 21, 22, 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, 28, 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, 33, 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, 49, 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 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

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 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.

## 2. Review of barrier functions and control barrier functions

In this section, a brief review of BF and CBF are presented.

### 2.1 Barrier functions

Consider a continuous nonlinear dynamical system of the form

where * (forward) invariant*with respect to (1) if for any initial condition

#### 2.1.1 Constructing the barrier functions

Given a closed set

where

* [47, Definition 1] Given the continuous system*(1)

, the closed set

*(2)*defined by

*(4)*–

, and continuously differentiable function

, a real-valued function

that is differentiable with respect to its argument is said to be a reciprocal BF, if there exist class

functions

such that for all

Candidate reciprocal BFs are * inverse-type*and

*BFs given by*logarithmic-type

### 2.2 Control barrier functions

BFs are essential means to verify invariance of a set but they cannot be used in its direct form to design a controller [47]. In other words, to make sure that the set

with

#### 2.2.1 Constructing the control barrier functions

In order to find a suitable CBF, the constraint on the system state

A Reciprocal CBF

where

## 3. Review of barrier transformation

In this section, review of barrier function transformation is presented. Consider the following logarithmic barrier function

where

Due to the monotonic characteristic of the natural logarithm the inverse of the barrier function (12) exists within the range of its definition, and it is given by

with the derivative defined as

## 4. Adaptive control of a robot system with full-state constraints

When a robot moves in a constrained space, it is crucial for the robot to satisfy requirements, such as the joint trajectories’ boundedness, to safely carry out its operations within a prescribed bound. This section presents an adaptive safe tracking control design method that learns the parameters of an uncertain Euler–Lagrange (EL) system in an online manner using a gradient adaptive learning law. The controller is designed to track joint angles and joint velocities of the robot arm such that the bounds on the joint angles and joint velocities are maintained.

### 4.1 Euler-Lagrange dynamics for robot arm

Consider the Euler–Lagrange (EL) dynamics

where

** Property 1.**The inertia matrix is positive definite, and satisfies the following inequality for any arbitrary vector

where

* Remark*1. Since

** Property 2.**The EL-dynamics in (15) are linearly parametrizable as follows

where

** Property 3.**The norm of the centripetal-Coriolis can be upper bounded in the following manner:

where

### 4.2 State space system model and control design

Let

where

where

where

where

and

where

** Assumption 1.**The function

Following (28), the EL-dynamics can be represented in the constrained space as follows

where

and

with

** Assumption 2.**The terms

** Lemma 1.**Given the term

the

** Proof:**The

which implies that

Now, using Property 2, the EL-dynamics in (30) can be linearly parameterized, and it is given by

where

** Lemma 2.**Suppose that there exists a controller that tracks the desired trajectory for the system given in (30). Then, the same controller can also track the desired trajectory of the original system in (15) given that the initial state of the system

** Proof:**See proof of ([55], Lemma 1)

Lemma 2 proves that if the initial state is within the prescribed bound, a control law can be designed for the full-state constrained system such that it satisfies the tracking objective of the original system.

#### 4.2.1 Safe adaptive tracking control development

In this subsection, an adaptive control technique is used to identify the parameters of an uncertain system and track the desired joint position

** Assumption 3.**The signals

Consider the following tracking control input design

where

where

In terms of the linear parameterization of the EL-dynamics, i.e., Property 2, the control input (37) can be rewritten as

where

where

where

* Remark*2. The parameter estimation error

#### 4.2.2 Lyapunov stability analysis

To facilitate the following development of the Lyapunov stability analysis, let

* The controller and parameter update laws defined in*(41) and (43)

ensure SGUUB tracking of the desired state trajectories, provided the following sufficient conditions,

are satisfied, where

** Proof:**See details in [67].

## 5. Simulations

Simulation studies are conducted to verify and demonstrate the performance of the designed safe adaptive robot controller. The simulations are conducted using MacBook Pro running Intel i7 processor and 16 Gigabytes of memory and the controller and EL dynamic model is coded using MATLAB 2018a.

### 5.1 Safe tracking control of an uncertain EL-dynamics with full-state constraints using BF

In this section, the controller and adaptive laws developed in (37) and (43) are simulated for a two-link robot planar manipulator, with dynamics shown in (46), where

The nominal values of the parameter vector

The desired trajectory is selected as

The objective is to track the desired joint trajectory provided that the model parameters are unknown while the state

To this end, the barrier function formulation presented in Section 3 is used along with the adaptive control developed in Section 4. The feedback and adaptation gains for the proposed controller are selected as

## 6. Conclusions and future directions

This chapter provides a perspective on problems wherein humans and robots work collaboratively with one another. Research in this field aims to relax the current workplace constraints, such as fences, virtual curtains often seen in manufacturing settings between humans and robots or velocity limits on collaborative robots. This chapter develops an efficient robot control methodology to create a safe working environment without sacrificing the efficiency of the robots. In the context of the chapter, safety is defined as a constrained behavior of a system, and robot effectiveness, as driving the actual behavior of the robot to the desired behavior. To this end, an online safe tracking controller for an uncertain Euler–Lagrange robotic system with is developed where the constraints are placed on all the states. A barrier function transform is used to transform the full-state constrained EL-dynamics into an equivalent unconstrained system with no prior knowledge of the system parameters. An adaptive controller is developed along with a gradient based adaptive parameter estimation law on the transformed system that tracks the desired trajectories of the original system. The controller guarantees that the robot trajectories remain inside a pre-specified safe region, tracking the desired trajectories and the parameter estimation errors remain bounded. The method can be utilized for applications wherein robots must operate in a confined space to reach an object for grasping or other manipulation tasks such as pick and place.

In future, the usefulness of barrier transformation to design a visual servo controller will be shown. Constrained VS approach can guarantee target features to remain within the camera field of view for the duration of the task. Some recent efforts in that direction can be found in [73]. Utilizing CBF for developing safe robot controllers by utilizing human actions and workspaces can be another avenue of future research for safe human-robot interaction.

## Acknowledgments

The authors would like to thank Daniel Trombetta for discussions related to human-robot interaction application and control design.