Open access peer-reviewed chapter - ONLINE FIRST

Safe Adaptive Trajectory Tracking Control of Robot for Human-Robot Interaction Using Barrier Function Transformation

By Iman Salehi, Ghananeel Rotithor and Ashwin Dani

Submitted: September 28th 2020Reviewed: March 15th 2021Published: April 22nd 2021

DOI: 10.5772/intechopen.97255

Downloaded: 15


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.


  • 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 L1adaptive 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 directions of the method and its applicability to safety in collaborative robotics are discussed.

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.

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 f:RnRnis a locally Lipschitz continuous nonlinear function and xtXRnis the state of the system. A set SRnis called (forward) invariantwith respect to (1) if for any initial condition x0xt0Simplies that xtS, tR[68]. BFs define a forward invariant safe region, where the solutions of a dynamical system in this region remain in the region for all time [46, 47, 69].

2.1.1 Constructing the barrier functions

Given a closed set SRn, its interior and its boundary are defined as follows


where h:RnRis a continuously differentiable function.

Definition 1.[47, Definition 1] Given the continuous system(1), the closed setSdefined by(2)(4), and continuously differentiable functionh:RnR, a real-valued functionb:IntSRthat is differentiable with respect to its argument is said to be a reciprocal BF, if there exist classKfunctionsη1, η2, η3such that for allxIntS


Candidate reciprocal BFs are inverse-typeand logarithmic-typeBFs given by bx=1hxand bx=loghx1+hx, respectively [47]. Note that the candidate is unbounded on the set boundary, i.e., bxas xS.

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 IntSis forward invariant under the dynamics of the system (1), a controller that guarantees the invariance of the set is required. Similar on how Lyapunov functions are extended to control Lyapunov functions [70], the concept of BFs can be extended to the case of control systems through the use of CBFs. Given the following nonlinear affine control system


with fand glocally Lipschitz, xXRn, and uRmis the set of admissible input, in cases where the solutions of (7) do not stay in an invariant set S, a CBF can be specified that will assure the solutions to remain inside the invariant set.

2.2.1 Constructing the control barrier functions

In order to find a suitable CBF, the constraint on the system state xis encoded in a smooth constraint function hx. A value hx>0indicates adherence, whereas hx<0indicates a violation. The set of admissible state X0is defined by


A Reciprocal CBF b:IntXoRis a non-negative function, if there exist class Kfunctions η1,η2, and η3such that for all xIntX0,


where Lfbxis the Lie-Derivative bxxfxalong the vector field fxand Lgbxis the Lie-Derivative bxxgxalong the vector field gx. Hence for the system in (7), any locally Lipschitz controller u:X0Rmthat is selected form (11) assures the closed-set X0Rnis forward invariant.

3. Review of barrier transformation

In this section, review of barrier function transformation is presented. Consider the following logarithmic barrier function BzaA:RRdefined on an open interval aA:


where aand Aare two constants satisfying a<A. The barrier function in (12) takes finite value when its arguments are within the region aAand approaches to infinity as its arguments reach the boundary of the region, i.e., limza,ABzaA=±.

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 MqRd×ddenotes a generalized inertia matrix, Cqq̇Rd×ddenotes a generalized centripetal-Coriolis matrix, GrqRddenotes a generalized gravity vector, τ=τ1τdTRdrepresents the generalized input control vector, and qt,q̇t,q¨tRddenote the link position, velocity, and acceleration vectors, respectively. The subsequent development is based on the assumption that all the states are observed, and that Mq, Cqq̇, and Grq, are unknown. The following properties, found in [71, 72], are also exploited in the subsequent development.

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


where m1and m2are positive constants, and represents the Euclidean norm.

Remark1. Since Mqis a symmetric positive definite matrix, it can be shown that M1qis also a positive definite matrix, and its 2-norm is upper and lower bounded with known constants, i.e., m¯M1qm¯.

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


where Y:Rd×Rd×RdRd×mis the regression matrix, and θRnis the set of the unknown parameters.

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


where C¯Rdenotes known positive bounding constant, and denotes the induced infinity-norm of a matrix.

4.2 State space system model and control design

Let x=x1x2TXR2d, where x1=qRd, x2=q̇Rd, and the EL-dynamics in (15) can be written as follows


where f:R2dRd, g:R2dRd×dare locally Lipschitz continuous nonlinear functions, fx=M1x1Cx1x2x2Grx1, and gx=M1x1. With some algebraic manipulations, the EL-dynamics can be written into dseparate first and second order dynamics:


where fj:R2dR, gj:R2dR1×dare nonlinear continuously differentiable functions. Using the BF transformation (12), the system in (20)(21) can be transformed into a constrained state Φ=ϕ1ϕ2TR2d, where ϕ1=φ1,1φ1,dTand ϕ2=φ2,1φ2,dTare the constrained joint position and velocity vectors, respectively, as follows:


where B1φi,jδi,jΔi,jcan be obtained using (13) and δi,j, Δi,jare lower and upper bounds on state, respectively. Using the chain rule of differentiation, i.e., dxi,jdt=xi,jφi,jdφi,jdt, where xi,jφi,jcan be obtained using (14), and some algebraic manipulations result in the transformed state φi,j, and it is given by




and Ki,jφi,φ=xi,φφi,j1, i=1,2and j=1,,d. The constrained system in terms of Φcan be expressed in a compact form as follows


where F:R2dR2dand G:R2dR2d×dare given by


Assumption 1.The function F:R2dR2dis locally Lipschitz continuous, and there exists a positive constant F¯such that for ΦΨ, FΦ<F¯Φ, where ΨR2dis a compact set containing the origin. Moreover, the system is assumed to be controllable over Ψwith GΦbeing locally Lipschitz and bounded in Ψ, i.e., GΦ<G¯, where G¯is a positive scalar.

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






with Ki,jφi,j=B1φi,jφi,j, i=1,2and j=1,,d.

Assumption 2.The terms Kiϕidefined in (33) is positive definite, and its 2-norm is upper and lower bounded by known positive constants, i.e., k¯iKiϕik¯i, i=1,2.

Lemma 1.Given the term Kiϕidefined in (33) with


the 2-norm of its inverse, Ki1ϕi, can be upper bounded by a positive constant κ¯i, i.e., Ki1ϕiκ¯i, i=1,2.

Proof:The 2-norm of Ki1ϕi=diagKi,11φi,1Ki,d1φi,dcan be upper bounded because Ki,j1φi,jis bounded, that is


which implies that 2-norm of Ki1φican be upper bounded by a positive constant κ¯i.

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


where Y1:Rd×Rd×Rd×Rd×RdRd×nis the regression matrix. Note that in (36), and henceforth the parameter dependency of the elements in the EL-dynamics are dropped for brevity.

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 x0=x0X.

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 ϕ1dest:R+Rdand joint velocity ϕ2dest:R+Rdtrajectories.

Assumption 3.The signals ϕ1des, ϕ2des, ϕ̇2desare uniformly continuous and bounded such that ϕ1desϕ¯1des, ϕ2desϕ¯2des, ϕ̇2desϕ̇¯2des, where ϕ¯1des, ϕ¯2des, and ϕ̇¯2desare known positive constants.

Consider the following tracking control input design


where ^denotes the parameter estimates and βis a positive scalar. Signals a, v, rare given by


where ϕ˜1ϕ1ϕ1desand ϕ˜2ϕ2ϕ2desare position and velocity tracking errors, respectively. ΛRd×dis a positive definite diagonal matrix, and its 2-norm is upper bounded by a known positive constant, i.e., ΛΛ¯.

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


where Y2:Rd×Rd×Rd×RdRd×nis the regression matrix. Substituting (37) in the EL-dynamics (30) yields the following closed-loop error dynamics given by


where θ˜=θ̂θis the parameter estimation error. The parameter θ̂update rule is given by


where ΓRn×nis a diagonal and positive definite matrix, and projis a standard projection operator that ensures the parameter estimates are bounded, i.e., θ¯θ̂θ¯(for further details see [71]).

Remark2. The parameter estimation error θ˜is bounded and uniformly continuous since θ̂evolves according to the update law in (43).

4.2.2 Lyapunov stability analysis

To facilitate the following development of the Lyapunov stability analysis, let ζ:0R2d+ndenote the composite state vector, i.e., ζtrTtϕ1Ttθ˜TtT. Let λminand λmaxdenote the minimum and maximum eigenvalues of its argument.

Theorem 1.1.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 c1, c2, c12denote cosq1, cos(q2), and cosq1+q2respectively, sin2denotes sinq2, and gis the gravitational constant.


The nominal values of the parameter vector θ=θ1θ2θ3θ4θ5Tare


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 Q=qq̇Tsatisfies the following constraints,


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 β=14, Λ=diag2.01,2.01, and Γ=diag3030. The results of the simulation are shown in Figures 24. The joints position evolution q1tand q2tof a two degrees-of-freedom planar robot using an adaptive law with and without BF are shown in Figure 2. It can be observed from Figure 2 that when the adaptive law with BF is used, the estimated trajectories are blocked from crossing over the boundaries that are set for each of the joints. The position and velocity estimation errors are depicted in Figure 3. From Figures 2 and 3, it is clear that the tracking error asymptotically converges to zero, and, because the Lyapunov candidate does not contain any terms that are negative definite in θ˜, the parameter estimation does not converge but it does remain bounded. Boundedness of the parameter estimation errors can be seen in Figure 4.

Figure 2.

Evolution of the joint angles for the planar robot simulation using an adaptive law with and without BF.

Figure 3.

Evolution of the joint angle errors and joint velocity errors for the planar robot simulation using an adaptive law with BF.

Figure 4.

Evolution of the parameter estimation error for the planar robot simulation.


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.


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

Download for free

chapter PDF

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

How to cite and reference

Link to this chapter Copy to clipboard

Cite this chapter Copy to clipboard

Iman Salehi, Ghananeel Rotithor and Ashwin Dani (April 22nd 2021). Safe Adaptive Trajectory Tracking Control of Robot for Human-Robot Interaction Using Barrier Function Transformation [Online First], IntechOpen, DOI: 10.5772/intechopen.97255. Available from:

chapter statistics

15total chapter downloads

More statistics for editors and authors

Login to your personal dashboard for more detailed statistics on your publications.

Access personal reporting

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.

More About Us