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

$$
\dot{\mathfrak{x}} = f(\mathfrak{x}),
\tag{1}
$$

**Definition 1.** *[47, Definition 1] Given the continuous system (*1*), the closed set* S *defined by (*2*)–(*4*), and continuously differentiable function h* : *<sup>n</sup>* ! *, a real-valued function* b : *Int*ð Þ! S *that is differentiable with respect to its argument is said to be a reciprocal BF, if there exist class K functions η*1*, η*2*, η*<sup>3</sup> *such that for all x*∈*Int*ð Þ S

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

1

*<sup>η</sup>*2ð Þ *h x*ð Þ , (5)

*<sup>∂</sup><sup>x</sup> f x*ð Þ≤*η*3ð Þ *h x*ð Þ *:* (6)

*x*\_ ¼ *f x*ð Þþ *g x*ð Þ*u*, (7)

<sup>X</sup><sup>0</sup> <sup>¼</sup> *<sup>x</sup>*<sup>∈</sup> *<sup>n</sup>* f g : *h x*ð Þ<sup>&</sup>gt; <sup>0</sup> (8) *<sup>∂</sup>*X<sup>0</sup> <sup>¼</sup> *<sup>x</sup>*<sup>∈</sup> *<sup>n</sup>* f g : *h x*ð Þ¼ <sup>0</sup> (9)

*<sup>η</sup>*2ð Þ *h x*ð Þ (10)

*<sup>∂</sup><sup>x</sup> f x*ð Þ along the vector field *f x*ð Þ and

1

*<sup>u</sup>*<sup>∈</sup> *<sup>m</sup>* <sup>L</sup>*<sup>f</sup>* <sup>b</sup>ð ÞþL *<sup>x</sup> <sup>g</sup>*bð Þ *<sup>x</sup> <sup>u</sup>* � *<sup>η</sup>*2ð Þ *h x*ð Þ <sup>≤</sup>0*:* (11)

*<sup>∂</sup><sup>x</sup> g x*ð Þ along the vector field *g x*ð Þ. Hence for the

<sup>1</sup>þ*h x*ð Þ, respectively [47]. Note that the candidate is

1

unbounded on the set boundary, i.e., <sup>b</sup>ð Þ! *<sup>x</sup>* <sup>∞</sup> as *<sup>x</sup>* ! *<sup>∂</sup>*S.

<sup>b</sup>ð Þ¼ *<sup>x</sup>* <sup>1</sup>

*h x*ð Þ and <sup>b</sup>ð Þ¼� *<sup>x</sup>* log *h x*ð Þ

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

following nonlinear affine control system

*2.2.1 Constructing the control barrier functions*

*K* functions *η*1,*η*2, and *η*<sup>3</sup> such that for all *x*∈*Int*ð Þ X<sup>0</sup> ,

inf

where <sup>L</sup>*<sup>f</sup>* <sup>b</sup>ð Þ *<sup>x</sup>* is the Lie-Derivative *<sup>∂</sup>*bð Þ *<sup>x</sup>*

assures the closed-set <sup>X</sup><sup>0</sup> <sup>⊂</sup> *<sup>n</sup>* is forward invariant.

<sup>L</sup>*g*bð Þ *<sup>x</sup>* is the Lie-Derivative *<sup>∂</sup>*bð Þ *<sup>x</sup>*

**133**

1

*<sup>η</sup>*1ð Þ *h x*ð Þ <sup>≤</sup> <sup>b</sup>ð Þ *<sup>x</sup>* <sup>≤</sup>

**2.2 Control barrier functions**

*<sup>∂</sup>*bð Þ *<sup>x</sup>*

*<sup>η</sup>*1ð Þ *h x*ð Þ <sup>≤</sup> <sup>b</sup>ð Þ *<sup>x</sup>* <sup>≤</sup>

Candidate reciprocal BFs are *inverse-type* and *logarithmic-type* BFs given by

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 *Int*ð Þ S is 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

be specified that will assure the solutions to remain inside the invariant set.

*h x*ð Þ<0 indicates a violation. The set of admissible state X<sup>0</sup> is defined by

with *<sup>f</sup>* and *<sup>g</sup>* locally Lipschitz, *<sup>x</sup>*<sup>∈</sup> <sup>X</sup> <sup>⊂</sup> *<sup>n</sup>*, and *<sup>u</sup>*<sup>∈</sup> *<sup>m</sup>* is the set of admissible input, in cases where the solutions of (7) do not stay in an invariant set S, a CBF can

In order to find a suitable CBF, the constraint on the system state *x* is encoded in a smooth constraint function *h x*ð Þ. A value *h x*ð Þ>0 indicates adherence, whereas

A Reciprocal CBF b : *Int*ð Þ! X*<sup>o</sup>* is a non-negative function, if there exist class

system in (7), any locally Lipschitz controller *<sup>u</sup>* : <sup>X</sup><sup>0</sup> ! *<sup>m</sup>* that is selected form (11)

where *<sup>f</sup>* : *<sup>n</sup>* ! *<sup>n</sup>* is a locally Lipschitz continuous nonlinear function and *x t*ð Þ<sup>∈</sup> <sup>X</sup> <sup>⊆</sup> *<sup>n</sup>* is the state of the system. A set <sup>S</sup> <sup>∈</sup> *<sup>n</sup>* is called *(forward) invariant* with respect to (1) if for any initial condition *x*ð Þ 0 ≔*x t*ð Þ<sup>0</sup> ∈S implies that *x t*ð Þ∈S, ∀*t*∈ [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 <sup>S</sup> <sup>⊂</sup> *<sup>n</sup>*, its interior and its boundary are defined as follows

$$\mathcal{S} = \{ \mathfrak{x} \in \mathbb{R}^n \; : \; h(\mathfrak{x}) \ge \mathbf{0} \}, \tag{2}$$

$$\mathcal{dS} = \{ \mathfrak{x} \in \mathbb{R}^n \; : \; h(\mathfrak{x}) = \mathbf{0} \}, \tag{3}$$

$$Int(\mathcal{S}) = \{ \mathfrak{x} \in \mathbb{R}^n \; : \; h(\mathfrak{x}) > \mathbf{0} \}, \tag{4}$$

where *<sup>h</sup>* : *<sup>n</sup>* ! is a continuously differentiable function.

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

**Definition 1.** *[47, Definition 1] Given the continuous system (*1*), the closed set* S *defined by (*2*)–(*4*), and continuously differentiable function h* : *<sup>n</sup>* ! *, a real-valued function* b : *Int*ð Þ! S *that is differentiable with respect to its argument is said to be a reciprocal BF, if there exist class K functions η*1*, η*2*, η*<sup>3</sup> *such that for all x*∈*Int*ð Þ S

$$\frac{1}{\eta\_1(h(\infty))} \le \mathfrak{b}(\infty) \le \frac{1}{\eta\_2(h(\infty))},\tag{5}$$

$$\frac{\partial \mathfrak{b}(\mathfrak{x})}{\partial \mathfrak{x}} f(\mathfrak{x}) \le \eta\_{\mathfrak{z}}(h(\mathfrak{x})). \tag{6}$$

Candidate reciprocal BFs are *inverse-type* and *logarithmic-type* BFs given by <sup>b</sup>ð Þ¼ *<sup>x</sup>* <sup>1</sup> *h x*ð Þ and <sup>b</sup>ð Þ¼� *<sup>x</sup>* log *h x*ð Þ <sup>1</sup>þ*h x*ð Þ, respectively [47]. Note that the candidate is unbounded on the set boundary, i.e., <sup>b</sup>ð Þ! *<sup>x</sup>* <sup>∞</sup> as *<sup>x</sup>* ! *<sup>∂</sup>*S.

#### **2.2 Control barrier functions**

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

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

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

Consider a continuous nonlinear dynamical system of the form

where *<sup>h</sup>* : *<sup>n</sup>* ! is a continuously differentiable function.

where *<sup>f</sup>* : *<sup>n</sup>* ! *<sup>n</sup>* is a locally Lipschitz continuous nonlinear function and *x t*ð Þ<sup>∈</sup> <sup>X</sup> <sup>⊆</sup> *<sup>n</sup>* is the state of the system. A set <sup>S</sup> <sup>∈</sup> *<sup>n</sup>* is called *(forward) invariant* with respect to (1) if for any initial condition *x*ð Þ 0 ≔*x t*ð Þ<sup>0</sup> ∈S implies that *x t*ð Þ∈S, ∀*t*∈ [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].

Given a closed set <sup>S</sup> <sup>⊂</sup> *<sup>n</sup>*, its interior and its boundary are defined as follows

*x*\_ ¼ *f x*ð Þ, (1)

S ¼ *<sup>x</sup>*<sup>∈</sup> *<sup>n</sup>* f g : *h x*ð Þ<sup>≥</sup> <sup>0</sup> , (2) *<sup>∂</sup>*S ¼ *<sup>x</sup>*<sup>∈</sup> *<sup>n</sup>* f g : *h x*ð Þ¼ <sup>0</sup> , (3) *Int*ð Þ¼ <sup>S</sup> *<sup>x</sup>*<sup>∈</sup> *<sup>n</sup>* f g : *h x*ð Þ<sup>&</sup>gt; <sup>0</sup> , (4)

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

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.

discussed.

*desired joint motions at each time step.*

*Collaborative and Humanoid Robots*

**Figure 1.**

**2.1 Barrier functions**

**132**

*2.1.1 Constructing the 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 *Int*ð Þ S is 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

$$
\dot{\mathfrak{x}} = f(\mathfrak{x}) + \mathfrak{g}(\mathfrak{x})\mathfrak{u},
\tag{7}
$$

with *<sup>f</sup>* and *<sup>g</sup>* locally Lipschitz, *<sup>x</sup>*<sup>∈</sup> <sup>X</sup> <sup>⊂</sup> *<sup>n</sup>*, and *<sup>u</sup>*<sup>∈</sup> *<sup>m</sup>* is 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 *x* is encoded in a smooth constraint function *h x*ð Þ. A value *h x*ð Þ>0 indicates adherence, whereas *h x*ð Þ<0 indicates a violation. The set of admissible state X<sup>0</sup> is defined by

$$\mathcal{X}\_0 = \{ \mathfrak{x} \in \mathbb{R}^n \, : \, \begin{array}{c} h(\mathfrak{x}) > 0 \end{array} \} \tag{8}$$

$$\partial \mathcal{X}\_0 = \{ \mathfrak{x} \in \mathbb{R}^n \, : \, h(\mathfrak{x}) = \mathbf{0} \} \tag{9}$$

A Reciprocal CBF b : *Int*ð Þ! X*<sup>o</sup>* is a non-negative function, if there exist class *K* functions *η*1,*η*2, and *η*<sup>3</sup> such that for all *x*∈*Int*ð Þ X<sup>0</sup> ,

$$\frac{1}{\eta\_1(h(\mathfrak{x}))} \le \mathfrak{b}(\mathfrak{x}) \le \frac{1}{\eta\_2(h(\mathfrak{x}))} \tag{10}$$

$$\inf\_{\mu \in \mathbb{R}^m} \left\{ \mathcal{L}\_f \mathfrak{b}(\mathfrak{x}) + \mathcal{L}\_\mathfrak{g} \mathfrak{b}(\mathfrak{x}) \mathfrak{u} - \eta\_2(h(\mathfrak{x})) \right\} \le \mathbf{0}.\tag{11}$$

where <sup>L</sup>*<sup>f</sup>* <sup>b</sup>ð Þ *<sup>x</sup>* is the Lie-Derivative *<sup>∂</sup>*bð Þ *<sup>x</sup> <sup>∂</sup><sup>x</sup> f x*ð Þ along the vector field *f x*ð Þ and <sup>L</sup>*g*bð Þ *<sup>x</sup>* is the Lie-Derivative *<sup>∂</sup>*bð Þ *<sup>x</sup> <sup>∂</sup><sup>x</sup> g x*ð Þ along the vector field *g x*ð Þ. Hence for the system in (7), any locally Lipschitz controller *<sup>u</sup>* : <sup>X</sup><sup>0</sup> ! *<sup>m</sup>* that is selected form (11) assures the closed-set <sup>X</sup><sup>0</sup> <sup>⊂</sup> *<sup>n</sup>* is forward invariant.

### **3. Review of barrier transformation**

In this section, review of barrier function transformation is presented. Consider the following logarithmic barrier function *B z*ð Þ ; *a*, *A* : ! defined on an open interval ð Þ *a*, *A* :

$$B(x;a,A) \triangleq \ln\left(\frac{A}{a}\frac{a-x}{A-x}\right), \forall x \in (a,A). \tag{12}$$

where **m**<sup>1</sup> and **m**<sup>2</sup> are positive constants, and ∥ � ∥ represents the Euclidean

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

*Remark* 1. Since *M q*ð Þ is a symmetric positive definite matrix, it can be shown

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

ð Þ*q* is also a positive definite matrix, and its 2-norm is upper and lower

where *<sup>Y</sup>* : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>m</sup>* is the regression matrix, and *<sup>θ</sup>* <sup>∈</sup> *<sup>n</sup>* is the set of

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

where *C*∈ denotes known positive bounding constant, and ∥ � ∥<sup>∞</sup> denotes the

where **<sup>f</sup>** : <sup>2</sup>*<sup>d</sup>* ! *<sup>d</sup>*, **<sup>g</sup>** : <sup>2</sup>*<sup>d</sup>* ! *<sup>d</sup>*�*<sup>d</sup>* are locally Lipschitz continuous nonlinear

where *<sup>f</sup> <sup>j</sup>* : <sup>2</sup>*<sup>d</sup>* ! , *<sup>g</sup> <sup>j</sup>* : <sup>2</sup>*<sup>d</sup>* ! <sup>1</sup>�*<sup>d</sup>* are nonlinear continuously differentiable

*<sup>T</sup>* are the constrained joint position and velocity vectors,

can be obtained using (13) and *<sup>δ</sup><sup>i</sup>*,*<sup>j</sup>*, <sup>Δ</sup>*<sup>i</sup>*,*<sup>j</sup>* are lower and

, and it is given by

upper bounds on state, respectively. Using the chain rule of differentiation, i.e.,

, <sup>∀</sup>*<sup>i</sup>* <sup>¼</sup> 1, 2 and <sup>∀</sup>*<sup>j</sup>* <sup>¼</sup> 1, <sup>⋯</sup>, *<sup>d</sup>* (22)

, <sup>∀</sup>*<sup>i</sup>* <sup>¼</sup> 1, 2 and <sup>∀</sup>*<sup>j</sup>* <sup>¼</sup> 1, <sup>⋯</sup>, *<sup>d</sup>* (23)

can be obtained using (14), and some algebraic manipula-

algebraic manipulations, the EL-dynamics can be written into *d* separate first and

ð Þ� *<sup>x</sup>*<sup>1</sup> ð Þ *C x*ð Þ 1, *<sup>x</sup>*<sup>2</sup> *<sup>x</sup>*<sup>2</sup> � *Gr*ð Þ *<sup>x</sup>*<sup>1</sup> , and **<sup>g</sup>**ð Þ¼ *<sup>x</sup> <sup>M</sup>*�<sup>1</sup>

ð Þ*q* ∥ ≤ *m*.

*Y q*ð Þ , *q*\_, €*q θ* ¼ *M q*ð Þ€*q* þ *C q*ð Þ , *q*\_ *q*\_ þ *Gr*ð Þ*q* , (17)

∥*C q*ð Þ , *q*\_ ∥<sup>∞</sup> ≤*C*∥*q*\_∥, (18)

*<sup>x</sup>*\_ <sup>2</sup> <sup>¼</sup> **<sup>f</sup>**ð Þþ *<sup>x</sup>* **<sup>g</sup>**ð Þ *<sup>x</sup> <sup>τ</sup>*, (19)

*x*\_ 1,*<sup>j</sup>* ¼ *x*2,*<sup>j</sup>*, (20)

ð Þ *x τ*, ∀*j* ¼ 1, ⋯, *d* (21)

, where *ϕ*<sup>1</sup> ¼ *φ*1,1, ⋯, *φ*1,*<sup>d</sup>*

, *<sup>x</sup>*<sup>2</sup> <sup>¼</sup> *<sup>q</sup>*\_ <sup>∈</sup> *<sup>d</sup>*, and the EL-dynamics

ð Þ *x*<sup>1</sup> . With some

*<sup>T</sup>*

norm.

that *M*�<sup>1</sup>

the unknown parameters.

induced infinity-norm of a matrix.

in (15) can be written as follows

**4.2 State space system model and control design**

*x*\_ 2,*<sup>j</sup>* ¼ *f <sup>j</sup>*

transformed into a constrained state <sup>Φ</sup> <sup>¼</sup> *<sup>ϕ</sup>*1, *<sup>ϕ</sup>*<sup>2</sup> ½ �*<sup>T</sup>* <sup>∈</sup> <sup>2</sup>*<sup>d</sup>*

; *δ<sup>i</sup>*,*<sup>j</sup>*, Δ*<sup>i</sup>*,*<sup>j</sup>*

*φ<sup>i</sup>*,*<sup>j</sup>* ¼ *B xi*,*<sup>j</sup>*; *δ<sup>i</sup>*,*<sup>j</sup>*, Δ*<sup>i</sup>*,*<sup>j</sup>*

*xi*,*<sup>j</sup>* <sup>¼</sup> *<sup>B</sup>*�<sup>1</sup> *<sup>φ</sup><sup>i</sup>*,*<sup>j</sup>*

*∂φi*,*<sup>j</sup>*

tions result in the transformed state *φ<sup>i</sup>*,*<sup>j</sup>*

*<sup>T</sup>* <sup>∈</sup> <sup>X</sup> <sup>⊂</sup> <sup>2</sup>*<sup>d</sup>*, where *<sup>x</sup>*<sup>1</sup> <sup>¼</sup> *<sup>q</sup>*<sup>∈</sup> *<sup>d</sup>*

*x*\_ <sup>1</sup> ¼ *x*2,

ð Þþ *x g <sup>j</sup>*

functions. Using the BF transformation (12), the system in (20)–(21) can be

following manner:

Let *x* ¼ ½ � *x*1, *x*<sup>2</sup>

functions, **<sup>f</sup>**ð Þ¼ *<sup>x</sup> <sup>M</sup>*�<sup>1</sup>

second order dynamics:

and *ϕ*<sup>2</sup> ¼ *φ*2,1, ⋯, *φ*2,*<sup>d</sup>*

respectively, as follows:

where *B*�<sup>1</sup> *φ<sup>i</sup>*,*<sup>j</sup>*; *δ<sup>i</sup>*,*<sup>j</sup>*, Δ*<sup>i</sup>*,*<sup>j</sup>*

*dt* , where *<sup>∂</sup>xi*,*<sup>j</sup>*

*dxi*,*<sup>j</sup> dt* <sup>¼</sup> *<sup>∂</sup>xi*,*<sup>j</sup> ∂φi*,*<sup>j</sup> dφi*,*<sup>j</sup>*

**135**

bounded with known constants, i.e., *m* ≤ ∥*M*�<sup>1</sup>

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

where *a* and *A* are two constants satisfying *a*< *A*. The barrier function in (12) takes finite value when its arguments are within the region ð Þ *a*, *A* and approaches to infinity as its arguments reach the boundary of the region, i.e., lim *<sup>z</sup>*!*a*,*AB z*ð Þ¼� ; *a*, *A* ∞.

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

$$B^{-1}(y;a,A) = \frac{aA\left(e^{\frac{-\gamma}{\Gamma}} - e^{\frac{\gamma}{\Gamma}}\right)}{Ae^{\frac{-\gamma}{\Gamma}} - ae^{\frac{\gamma}{\Gamma}}}, \quad \forall y \in \mathbb{R} \tag{13}$$

with the derivative defined as

$$\frac{dB^{-1}(y;a,A)}{dy} = \frac{Aa^2 - aA^2}{a^2e^y - 2aA + A^2e^{-y}}.\tag{14}$$

#### **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

$$\mathbf{M}(q)\ddot{q} + \mathbf{C}(q,\dot{q})\dot{q} + \mathbf{G}\_r(q) = \mathbf{r},\tag{15}$$

where *M q*ð Þ<sup>∈</sup> *<sup>d</sup>*�*<sup>d</sup>* denotes a generalized inertia matrix, *C q*ð Þ , *<sup>q</sup>*\_ <sup>∈</sup> *<sup>d</sup>*�*<sup>d</sup>* denotes a generalized centripetal-Coriolis matrix, *Gr*ð Þ*<sup>q</sup>* <sup>∈</sup> *<sup>d</sup>* denotes a generalized gravity vector, *τ* ¼ ½ � *τ*1, ⋯ , *τ<sup>d</sup> <sup>T</sup>* ∈ *<sup>d</sup>* represents the generalized input control vector, and *q t*ð Þ, *q t* \_ð Þ, €*q t*ð Þ<sup>∈</sup> *<sup>d</sup>* denote the link position, velocity, and acceleration vectors, respectively. The subsequent development is based on the assumption that all the states are observed, and that *M q*ð Þ, *C q*ð Þ , *q*\_ , and *Gr*ð Þ*q* , 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 *ξ*∈ *<sup>d</sup>*:

$$\|\mathbf{m}\_1\| \|\boldsymbol{\xi}\|\|^2 \le \xi^T M(q) \xi \le \mathbf{m}\_2 \|\boldsymbol{\xi}\|^2,\tag{16}$$

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

where **m**<sup>1</sup> and **m**<sup>2</sup> are positive constants, and ∥ � ∥ represents the Euclidean norm.

*Remark* 1. Since *M q*ð Þ is a symmetric positive definite matrix, it can be shown that *M*�<sup>1</sup> ð Þ*q* is also a positive definite matrix, and its 2-norm is upper and lower bounded with known constants, i.e., *m* ≤ ∥*M*�<sup>1</sup> ð Þ*q* ∥ ≤ *m*.

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

$$\mathcal{Y}(q, \dot{q}, \ddot{q})\theta = \mathcal{M}(q)\ddot{q} + \mathcal{C}(q, \dot{q})\dot{q} + \mathcal{G}\_r(q), \tag{17}$$

where *<sup>Y</sup>* : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>m</sup>* is the regression matrix, and *<sup>θ</sup>* <sup>∈</sup> *<sup>n</sup>* is the set of the unknown parameters.

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

$$\|\mathbf{C}(q,\dot{q})\|\_{\ast} \leq C \|\dot{q}\|\,\,,\tag{18}$$

where *C*∈ denotes known positive bounding constant, and ∥ � ∥<sup>∞</sup> denotes the induced infinity-norm of a matrix.

#### **4.2 State space system model and control design**

Let *x* ¼ ½ � *x*1, *x*<sup>2</sup> *<sup>T</sup>* <sup>∈</sup> <sup>X</sup> <sup>⊂</sup> <sup>2</sup>*<sup>d</sup>*, where *<sup>x</sup>*<sup>1</sup> <sup>¼</sup> *<sup>q</sup>*<sup>∈</sup> *<sup>d</sup>* , *<sup>x</sup>*<sup>2</sup> <sup>¼</sup> *<sup>q</sup>*\_ <sup>∈</sup> *<sup>d</sup>*, and the EL-dynamics in (15) can be written as follows

$$\begin{aligned} \dot{\boldsymbol{x}}\_1 &= \boldsymbol{x}\_2, \\ \dot{\boldsymbol{x}}\_2 &= \mathbf{f}(\boldsymbol{x}) + \mathbf{g}(\boldsymbol{x})\boldsymbol{\tau}, \end{aligned} \tag{19}$$

where **<sup>f</sup>** : <sup>2</sup>*<sup>d</sup>* ! *<sup>d</sup>*, **<sup>g</sup>** : <sup>2</sup>*<sup>d</sup>* ! *<sup>d</sup>*�*<sup>d</sup>* are locally Lipschitz continuous nonlinear functions, **<sup>f</sup>**ð Þ¼ *<sup>x</sup> <sup>M</sup>*�<sup>1</sup> ð Þ� *<sup>x</sup>*<sup>1</sup> ð Þ *C x*ð Þ 1, *<sup>x</sup>*<sup>2</sup> *<sup>x</sup>*<sup>2</sup> � *Gr*ð Þ *<sup>x</sup>*<sup>1</sup> , and **<sup>g</sup>**ð Þ¼ *<sup>x</sup> <sup>M</sup>*�<sup>1</sup> ð Þ *x*<sup>1</sup> . With some algebraic manipulations, the EL-dynamics can be written into *d* separate first and second order dynamics:

$$
\dot{\mathfrak{x}}\_{1\circ} = \mathfrak{x}\_{2\circ},
\tag{20}
$$

$$\dot{\mathbf{x}}\_{2j} = f\_{\ j}(\mathbf{x}) + \mathbf{g}\_{\ j}(\mathbf{x})\tau, \quad \forall j = \mathbf{1}, \dots, d \tag{21}$$

where *<sup>f</sup> <sup>j</sup>* : <sup>2</sup>*<sup>d</sup>* ! , *<sup>g</sup> <sup>j</sup>* : <sup>2</sup>*<sup>d</sup>* ! <sup>1</sup>�*<sup>d</sup>* are nonlinear continuously differentiable functions. Using the BF transformation (12), the system in (20)–(21) can be transformed into a constrained state <sup>Φ</sup> <sup>¼</sup> *<sup>ϕ</sup>*1, *<sup>ϕ</sup>*<sup>2</sup> ½ �*<sup>T</sup>* <sup>∈</sup> <sup>2</sup>*<sup>d</sup>* , where *ϕ*<sup>1</sup> ¼ *φ*1,1, ⋯, *φ*1,*<sup>d</sup> <sup>T</sup>* and *ϕ*<sup>2</sup> ¼ *φ*2,1, ⋯, *φ*2,*<sup>d</sup> <sup>T</sup>* are the constrained joint position and velocity vectors, respectively, as follows:

$$\rho\_{i,j} = B\left(\mathbf{x}\_{i,j}; \delta\_{i,j}, \Delta\_{i,j}\right), \qquad \forall i = 1, 2 \text{ and } \forall j = 1, \dots, d \tag{22}$$

$$\mathbf{x}\_{i\circ} = \mathbf{B}^{-1}(\rho\_{i,j}; \delta\_{i,j}, \Delta\_{i,j}), \qquad \forall i = 1, 2 \text{ and } \forall j = 1, \cdots, d \tag{23}$$

where *B*�<sup>1</sup> *φ<sup>i</sup>*,*<sup>j</sup>*; *δ<sup>i</sup>*,*<sup>j</sup>*, Δ*<sup>i</sup>*,*<sup>j</sup>* can be obtained using (13) and *<sup>δ</sup><sup>i</sup>*,*<sup>j</sup>*, <sup>Δ</sup>*<sup>i</sup>*,*<sup>j</sup>* are lower and upper bounds on state, respectively. Using the chain rule of differentiation, i.e., *dxi*,*<sup>j</sup> dt* <sup>¼</sup> *<sup>∂</sup>xi*,*<sup>j</sup> ∂φi*,*<sup>j</sup> dφi*,*<sup>j</sup> dt* , where *<sup>∂</sup>xi*,*<sup>j</sup> ∂φi*,*<sup>j</sup>* can be obtained using (14), and some algebraic manipulations result in the transformed state *φ<sup>i</sup>*,*<sup>j</sup>* , and it is given by

**3. Review of barrier transformation**

*Collaborative and Humanoid Robots*

interval ð Þ *a*, *A* :

In this section, review of barrier function transformation is presented. Consider the following logarithmic barrier function *B z*ð Þ ; *a*, *A* : ! defined on an open

> *a* � *x A* � *x*

where *a* and *A* are two constants satisfying *a*< *A*. The barrier function in (12) takes finite value when its arguments are within the region ð Þ *a*, *A* and approaches to infinity as its arguments reach the boundary of the region, i.e., lim *<sup>z</sup>*!*a*,*AB z*ð Þ¼� ; *a*, *A* ∞. 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

*aA e*�*<sup>y</sup>*

*Ae*�*<sup>y</sup>* <sup>2</sup> � *ae<sup>y</sup>* 2

*dy* <sup>¼</sup> *Aa*<sup>2</sup> � *aA*<sup>2</sup>

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.

where *M q*ð Þ<sup>∈</sup> *<sup>d</sup>*�*<sup>d</sup>* denotes a generalized inertia matrix, *C q*ð Þ , *<sup>q</sup>*\_ <sup>∈</sup> *<sup>d</sup>*�*<sup>d</sup>* denotes a generalized centripetal-Coriolis matrix, *Gr*ð Þ*<sup>q</sup>* <sup>∈</sup> *<sup>d</sup>* denotes a generalized gravity

*q t*ð Þ, *q t* \_ð Þ, €*q t*ð Þ<sup>∈</sup> *<sup>d</sup>* denote the link position, velocity, and acceleration vectors, respectively. The subsequent development is based on the assumption that all the states are observed, and that *M q*ð Þ, *C q*ð Þ , *q*\_ , and *Gr*ð Þ*q* , 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

**<sup>m</sup>**1∥*ξ*∥<sup>2</sup> <sup>≤</sup>*ξTM q*ð Þ*ξ*<sup>≤</sup> **<sup>m</sup>**2∥*ξ*∥<sup>2</sup>

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

<sup>2</sup> � *e y* 2 

*<sup>a</sup>*<sup>2</sup>*ey* � <sup>2</sup>*aA* <sup>þ</sup> *<sup>A</sup>*<sup>2</sup>

*M q*ð Þ€*q* þ *C q*ð Þ , *q*\_ *q*\_ þ *Gr*ð Þ¼ *q τ*, (15)

*<sup>T</sup>* ∈ *<sup>d</sup>* represents the generalized input control vector, and

, ∀*z*∈ ð Þ *a*, *A :* (12)

, ∀*y*∈ (13)

*<sup>e</sup>*�*<sup>y</sup> :* (14)

, (16)

*a*

*B z*ð Þ ; *<sup>a</sup>*, *<sup>A</sup>* <sup>≜</sup> ln *<sup>A</sup>*

ð Þ¼ *y*; *a*, *A*

ð Þ *y*; *a*, *A*

*B*�<sup>1</sup>

*dB*�<sup>1</sup>

**4.1 Euler-Lagrange dynamics for robot arm**

inequality for any arbitrary vector *ξ*∈ *<sup>d</sup>*:

vector, *τ* ¼ ½ � *τ*1, ⋯ , *τ<sup>d</sup>*

**134**

Consider the Euler–Lagrange (EL) dynamics

with the derivative defined as

*Collaborative and Humanoid Robots*

$$\dot{\rho}\_{1j} = \mathcal{K}\_{1j}\left(\rho\_{1j}\right)B^{-1}\left(\rho\_{2j}; \delta\_{2j}, \Delta\_{2j}\right) = F\_{1j}\left(\rho\_{1j}, \rho\_{2j}\right), \quad \forall j = 1, \cdots, d,\tag{24}$$

$$\dot{\rho}\_{2j} = \mathcal{K}\_{2j}\Big(\rho\_{2j}\Big) \left(f\_j(\mathbf{x}) + \mathbf{g}\_j(\mathbf{x})u\right) = F\_{2j}(\Phi) + G\_{2j}(\Phi)\mathbf{r}, \quad \forall j = 1, \cdots, d,\tag{25}$$

where

$$F\_{2j}(\Phi) = \mathcal{K}\_{2j}\left(\rho\_{2j}\right) f\_j\left(\begin{bmatrix} B^{-1}(\rho\_{1,1}) & \cdots & B^{-1}\left(\rho\_{2j}\right) \end{bmatrix}\right) \tag{26}$$

$$\mathbf{G}\_{2j}(\Phi) = \mathcal{K}\_{2j}\left(\boldsymbol{\rho}\_{2j}\right)\mathbf{g}\_j\left(\begin{bmatrix} \boldsymbol{B}^{-1}(\boldsymbol{\rho}\_{1,1}) & \cdots & \boldsymbol{B}^{-1}\left(\boldsymbol{\rho}\_{2j}\right) \end{bmatrix}\right) \tag{27}$$

and K*i*,*<sup>j</sup> φi*,*<sup>φ</sup>* � � <sup>¼</sup> *<sup>∂</sup>xi*,*<sup>φ</sup> ∂φi*,*<sup>j</sup>* � ��<sup>1</sup> , ∀*i* ¼ 1, 2 and ∀*j* ¼ 1, ⋯, *d*. The constrained system in terms of Φ can be expressed in a compact form as follows

$$
\dot{\Phi} = \mathcal{F}(\Phi) + \mathcal{G}(\Phi)\tau,\tag{28}
$$

**Assumption 2.** The terms K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ defined in (33) is positive definite, and its 2-norm is upper and lower bounded by known positive constants, i.e., *ki* ≤ ∥K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ∥ ≤*ki*, ∀*i* ¼

, ∀*i* ¼ 1, 2 and ∀*j* ¼ 1, ⋯, *d*, (34)

*<sup>i</sup>*,*<sup>d</sup> φi*,*<sup>d</sup>* can be upper

*<sup>i</sup> ϕ<sup>i</sup>* ð Þ, can be upper bounded by a positive constant

*<sup>i</sup> φ<sup>i</sup>* ð Þ can be upper bounded by a positive constant *κi*.

2 *<sup>θ</sup>*, (36)

<sup>1</sup> ð Þ*<sup>t</sup>* : <sup>þ</sup> ! *<sup>d</sup>*

*des* <sup>2</sup> are

<sup>2</sup> are uniformly continuous and bounded

<sup>2</sup> , and *<sup>ϕ</sup>*\_

<sup>1</sup> , *<sup>ϕ</sup>des*

<sup>1</sup> *<sup>v</sup>* <sup>þ</sup> *<sup>G</sup>*^*<sup>r</sup>* � *<sup>β</sup>*K2*r*, (37)

*<sup>i</sup>*,1 *<sup>φ</sup>i*,1 , <sup>⋯</sup> , <sup>K</sup>�<sup>1</sup>

*i*,*j e* �*φi*,*<sup>j</sup>* <sup>¼</sup> 0, (35)

**Lemma 1.** Given the term K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ defined in (33) with

*i*,*j e* �*φi*,*<sup>j</sup>*

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

*<sup>i</sup> <sup>ϕ</sup><sup>i</sup>* ð Þ¼ diag <sup>K</sup>�<sup>1</sup>

Δ*i*,*jδ*<sup>2</sup>

*<sup>i</sup>*,*<sup>j</sup>* � *<sup>δ</sup><sup>i</sup>*,*<sup>j</sup>*Δ<sup>2</sup> *i*,*j*

Now, using Property 2, the EL-dynamics in (30) can be linearly parameterized,

where *<sup>Y</sup>*<sup>1</sup> : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>n</sup>* is the regression matrix. Note that

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

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

In this subsection, an adaptive control technique is used to identify the parame-

ters of an uncertain system and track the desired joint position *ϕdes*

<sup>2</sup> ð Þ*<sup>t</sup>* : <sup>þ</sup> ! *<sup>d</sup>* trajectories.

<sup>2</sup> ∥ ≤*ϕdes*

Consider the following tracking control input design

*<sup>τ</sup>* <sup>¼</sup> *<sup>M</sup>*^ <sup>K</sup>�<sup>1</sup>

<sup>1</sup> , *ϕdes*

<sup>2</sup> , <sup>∥</sup>*ϕ*\_ *des*

<sup>2</sup> *<sup>a</sup>* <sup>þ</sup> *<sup>C</sup>*^K�<sup>1</sup>

<sup>2</sup> , *<sup>ϕ</sup>*\_ *des*

<sup>2</sup> ∥ ≤*ϕ*\_

where ð Þ^� denotes the parameter estimates and *β* is a positive scalar. Signals *a*, *v*, *r*

*des*

<sup>2</sup> , where *<sup>ϕ</sup>des*

in (36), and henceforth the parameter dependency of the elements in the

<sup>1</sup> *<sup>ϕ</sup>*<sup>2</sup> <sup>þ</sup> *Gr* <sup>¼</sup> *<sup>Y</sup>*<sup>1</sup> *<sup>φ</sup>p*, *<sup>φ</sup>v*, *<sup>ϕ</sup>*1, *<sup>ϕ</sup>*2, *<sup>ϕ</sup>*\_

*<sup>φ</sup>i*,*<sup>j</sup>* � <sup>2</sup>*δ<sup>i</sup>*,*<sup>j</sup>*Δ*<sup>i</sup>*,*<sup>j</sup>* <sup>þ</sup> <sup>Δ</sup><sup>2</sup>

is bounded, that is

*<sup>φ</sup>i*,*<sup>j</sup>* � <sup>2</sup>*δi*,*j*Δ*i*,*<sup>j</sup>* <sup>þ</sup> <sup>Δ</sup><sup>2</sup>

Δ*i*,*jδ*<sup>2</sup>

*<sup>i</sup>*,*<sup>j</sup>* � *<sup>δ</sup>i*,*j*Δ<sup>2</sup> *i*,*j*

1, 2.

K*i*,*<sup>j</sup> φi*,*<sup>j</sup>* <sup>¼</sup>

*<sup>κ</sup>i*, i.e., <sup>∥</sup>K�<sup>1</sup>

bounded because K�<sup>1</sup>

and it is given by

*x*ð Þ¼ 0 *x*<sup>0</sup> ∈ X.

and joint velocity *ϕdes*

known positive constants.

such that ∥*ϕdes*

are given by

**137**

*δ*2 *i*,*j e*

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

the 2-norm of its inverse, <sup>K</sup>�<sup>1</sup>

which implies that 2-norm ofK�<sup>1</sup>

*<sup>M</sup>*K�<sup>1</sup> <sup>2</sup> *<sup>ϕ</sup>*\_

EL-dynamics are dropped for brevity.

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

tracking objective of the original system.

**Assumption 3.** The signals *ϕdes*

<sup>1</sup> ∥ ≤ *<sup>ϕ</sup>des*

*4.2.1 Safe adaptive tracking control development*

<sup>1</sup> , ∥*ϕdes*

**Proof:** The 2-norm of <sup>K</sup>�<sup>1</sup>

*<sup>i</sup> ϕ<sup>i</sup>* ð Þ∥ ≤*κi*, ∀*i* ¼ 1, 2.

*<sup>i</sup>*,*<sup>j</sup> φi*,*<sup>j</sup>*

lim*<sup>φ</sup>i*,*j*!<sup>∞</sup>

*δ*2 *i*,*j e*

<sup>2</sup> <sup>þ</sup> *<sup>C</sup>*K�<sup>1</sup>

where <sup>F</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*<sup>d</sup>* and <sup>G</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*d*�*<sup>d</sup>* are given by

$$\mathcal{F}(\Phi) = \begin{bmatrix} F\_{1,1}(\rho\_{1,1}, \rho\_{2,1}) \\ \vdots \\ F\_{1,d}(\rho\_{1,d}, \rho\_{2,d}) \\ F\_{2,1}(\Phi) \\ \vdots \\ F\_{2,d}(\Phi) \end{bmatrix}, \quad \mathcal{G}(\Phi) = \begin{bmatrix} \mathbf{0}\_{d \times d} \\ \mathbf{G}\_{2,1}(\Phi) \\ \vdots \\ \mathbf{G}\_{2,d}(\Phi) \end{bmatrix}. \tag{29}$$

**Assumption 1.** The function <sup>F</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*<sup>d</sup>* is locally Lipschitz continuous, and there exists a positive constant F such that for Φ ∈ Ψ, ∥Fð Þ Φ ∥< F∥Φ∥, where Ψ ⊂ <sup>2</sup>*<sup>d</sup>* is 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

$$\mathcal{M}\left(\rho\_p\right)\mathbb{K}\_2^{-1}(\phi\_2)\dot{\phi}\_2 + \mathcal{C}\left(\rho\_p,\rho\_v\right)\mathbb{K}\_1^{-1}(\phi\_1)\phi\_2 + \mathcal{G}\_r\left(\rho\_p\right) = \mathfrak{r},\tag{30}$$

where

$$\boldsymbol{\rho}\_{p} = \begin{bmatrix} \boldsymbol{B}^{-1}(\boldsymbol{\rho}\_{1,1}), & \cdots & \boldsymbol{B}^{-1}(\boldsymbol{\rho}\_{1,d}) \end{bmatrix}^{T},\tag{31}$$

$$\boldsymbol{\rho}\_{\boldsymbol{\nu}} = \begin{bmatrix} \boldsymbol{B}^{-1}(\boldsymbol{\rho}\_{2,1}), & \cdots & \boldsymbol{B}^{-1}(\boldsymbol{\rho}\_{2,d}) \end{bmatrix}^{T}, \tag{32}$$

and

$$
\mathcal{K}\_i(\phi\_i) = \begin{bmatrix}
\mathcal{K}\_{i,1}(\varphi\_{i,1}) & & \mathbf{0} \\
& \ddots & \\
\mathbf{0} & & \mathcal{K}\_{i,d}(\varphi\_{i,d})
\end{bmatrix},
\tag{33}
$$

with K*<sup>i</sup>*,*<sup>j</sup> φ<sup>i</sup>*,*<sup>j</sup>* � � <sup>¼</sup> *<sup>∂</sup>B*�<sup>1</sup> ð Þ *<sup>φ</sup>i*,*<sup>j</sup> ∂φi*,*<sup>j</sup>* , ∀*i* ¼ 1, 2 and ∀*j* ¼ 1, ⋯, *d*. *Safe Adaptive Trajectory Tracking Control of Robot for Human-Robot Interaction Using… DOI: http://dx.doi.org/10.5772/intechopen.97255*

**Assumption 2.** The terms K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ defined in (33) is positive definite, and its 2-norm is upper and lower bounded by known positive constants, i.e., *ki* ≤ ∥K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ∥ ≤*ki*, ∀*i* ¼ 1, 2.

**Lemma 1.** Given the term K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ defined in (33) with

$$\mathcal{K}\_{i\bar{j}}\left(\rho\_{i,\bar{j}}\right) = \frac{\left(\delta\_{i,\bar{j}}^2 e^{\rho\_{i\bar{j}}} - 2\delta\_{i\bar{j}}\Delta\_{i\bar{j}} + \Delta\_{i\bar{j}}^2 e^{-\rho\_{i\bar{j}}}\right)}{\Delta\_{i\bar{j}}\delta\_{i\bar{j}}^2 - \delta\_{i\bar{j}}\Delta\_{i\bar{j}}^2}, \ \forall i = 1, 2 \text{ and } \forall \bar{j} = 1, \cdots, d,\tag{34}$$

the 2-norm of its inverse, <sup>K</sup>�<sup>1</sup> *<sup>i</sup> ϕ<sup>i</sup>* ð Þ, can be upper bounded by a positive constant *<sup>κ</sup>i*, i.e., <sup>∥</sup>K�<sup>1</sup> *<sup>i</sup> ϕ<sup>i</sup>* ð Þ∥ ≤*κi*, ∀*i* ¼ 1, 2.

**Proof:** The 2-norm of <sup>K</sup>�<sup>1</sup> *<sup>i</sup> <sup>ϕ</sup><sup>i</sup>* ð Þ¼ diag <sup>K</sup>�<sup>1</sup> *<sup>i</sup>*,1 *<sup>φ</sup>i*,1 , <sup>⋯</sup> , <sup>K</sup>�<sup>1</sup> *<sup>i</sup>*,*<sup>d</sup> φi*,*<sup>d</sup>* can be upper bounded because K�<sup>1</sup> *<sup>i</sup>*,*<sup>j</sup> φi*,*<sup>j</sup>* is bounded, that is

$$\lim\_{i\_{\partial j}\to\infty} \frac{\Delta\_{i\_{\vec{j}}}\delta\_{i\_{\vec{j}}}^2 - \delta\_{i\_{\vec{j}}}\Delta\_{i\_{\vec{j}}}^2}{\left(\delta\_{i\_{\vec{j}}}^2 e^{\rho\_{i\_{\vec{j}}}} - 2\delta\_{i\_{\vec{j}}}\Delta\_{i\_{\vec{j}}} + \Delta\_{i\_{\vec{j}}}^2 e^{-\rho\_{i\_{\vec{j}}}}\right)} = \mathbf{0},\tag{35}$$

which implies that 2-norm ofK�<sup>1</sup> *<sup>i</sup> φ<sup>i</sup>* ð Þ can 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

$$\mathbf{M}\mathbb{K}\_2^{-1}\dot{\boldsymbol{\phi}}\_2 + \mathbf{C}\mathbb{K}\_1^{-1}\boldsymbol{\phi}\_2 + \mathbf{G}\_r = \mathbf{Y}\_1 \Big(\boldsymbol{\varphi}\_p, \boldsymbol{\varphi}\_v, \boldsymbol{\phi}\_1, \boldsymbol{\phi}\_2, \dot{\boldsymbol{\phi}}\_2\Big)\boldsymbol{\theta},\tag{36}$$

where *<sup>Y</sup>*<sup>1</sup> : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>n</sup>* is 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 *x*ð Þ¼ 0 *x*<sup>0</sup> ∈ X.

**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 *ϕdes* <sup>1</sup> ð Þ*<sup>t</sup>* : <sup>þ</sup> ! *<sup>d</sup>* and joint velocity *ϕdes* <sup>2</sup> ð Þ*<sup>t</sup>* : <sup>þ</sup> ! *<sup>d</sup>* trajectories.

**Assumption 3.** The signals *ϕdes* <sup>1</sup> , *ϕdes* <sup>2</sup> , *<sup>ϕ</sup>*\_ *des* <sup>2</sup> are uniformly continuous and bounded such that ∥*ϕdes* <sup>1</sup> ∥ ≤ *<sup>ϕ</sup>des* <sup>1</sup> , ∥*ϕdes* <sup>2</sup> ∥ ≤*ϕdes* <sup>2</sup> , <sup>∥</sup>*ϕ*\_ *des* <sup>2</sup> ∥ ≤*ϕ*\_ *des* <sup>2</sup> , where *<sup>ϕ</sup>des* <sup>1</sup> , *<sup>ϕ</sup>des* <sup>2</sup> , and *<sup>ϕ</sup>*\_ *des* <sup>2</sup> are known positive constants.

Consider the following tracking control input design

$$
\pi = \hat{\mathsf{M}} \mathsf{K}\_2^{-1} \mathsf{a} + \hat{\mathsf{C}} \mathsf{K}\_1^{-1} \mathsf{v} + \hat{\mathsf{G}}\_r - \beta \mathsf{K}\_2 \mathsf{r},\tag{37}
$$

where ð Þ^� denotes the parameter estimates and *β* is a positive scalar. Signals *a*, *v*, *r* are given by

*φ*\_ 1,*<sup>j</sup>* ¼ K1,*<sup>j</sup> φ*1,*<sup>j</sup>*

*φ*\_ 2,*<sup>j</sup>* ¼ K2,*<sup>j</sup> φ*2,*<sup>j</sup>*

and K*i*,*<sup>j</sup> φi*,*<sup>φ</sup>*

where

� �

*f j*

*F*2,*j*ð Þ¼K Φ 2,*<sup>j</sup> φ*2,*<sup>j</sup>*

*G*2,*j*ð Þ¼K Φ 2,*<sup>j</sup> φ*2,*<sup>j</sup>*

terms of Φ can be expressed in a compact form as follows

where <sup>F</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*<sup>d</sup>* and <sup>G</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*d*�*<sup>d</sup>* are given by

*F*1,1 *φ*1,1, *φ*2,1 � � ⋮ *F*1,*<sup>d</sup> φ*1,*<sup>d</sup>*, *φ*2,*<sup>d</sup>* � �

> *F*2,1ð Þ Φ ⋮ *F*2,*<sup>d</sup>*ð Þ Φ

<sup>2</sup> þ *C φp*, *φ<sup>v</sup>* � �

*<sup>φ</sup><sup>p</sup>* <sup>¼</sup> *<sup>B</sup>*�<sup>1</sup> *<sup>φ</sup>*1,1

*<sup>φ</sup><sup>v</sup>* <sup>¼</sup> *<sup>B</sup>*�<sup>1</sup> *<sup>φ</sup>*2,1

2 6 4

K*<sup>i</sup>*,1 *φ<sup>i</sup>*,1

, ∀*i* ¼ 1, 2 and ∀*j* ¼ 1, ⋯, *d*.

K*<sup>i</sup> ϕ<sup>i</sup>* ð Þ¼

ð Þ *<sup>φ</sup>i*,*<sup>j</sup> ∂φi*,*<sup>j</sup>*

*∂φi*,*<sup>j</sup>* � ��<sup>1</sup>

Fð Þ¼ Φ

∥Gð Þ Φ ∥<G, where G is a positive scalar.

<sup>K</sup>�<sup>1</sup> <sup>2</sup> *<sup>ϕ</sup>*<sup>2</sup> ð Þ*ϕ*\_

*M φ<sup>p</sup>* � �

follows

where

and

**136**

with K*<sup>i</sup>*,*<sup>j</sup> φ<sup>i</sup>*,*<sup>j</sup>*

� �

<sup>¼</sup> *<sup>∂</sup>B*�<sup>1</sup>

� �

*Collaborative and Humanoid Robots*

� � <sup>¼</sup> *<sup>∂</sup>xi*,*<sup>φ</sup>*

*B*�<sup>1</sup> *φ*2,*j*; *δ*2,*j*, Δ2,*<sup>j</sup>* � �

ð Þ *x u*

� �

� �

ð Þþ *x g <sup>j</sup>*

� �

¼ *F*1,*<sup>j</sup> φ*1,*j*, *φ*2,*<sup>j</sup>* � �

*f <sup>j</sup> B*�<sup>1</sup> *φ*1,1

*g <sup>j</sup> B*�<sup>1</sup> *φ*1,1

**Assumption 1.** The function <sup>F</sup> : <sup>2</sup>*<sup>d</sup>* ! <sup>2</sup>*<sup>d</sup>* is locally Lipschitz continuous, and

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

K�<sup>1</sup>

� �, ⋯ , *B*�<sup>1</sup> *φ*1,*<sup>d</sup>* � � � � *<sup>T</sup>*

� �, ⋯ , *B*�<sup>1</sup> *φ*2,*<sup>d</sup>* � � � � *<sup>T</sup>*

> � � 0 ⋱ 0 K*<sup>i</sup>*,*<sup>d</sup> φ<sup>i</sup>*,*<sup>d</sup>*

<sup>1</sup> *ϕ*<sup>1</sup> ð Þ*ϕ*<sup>2</sup> þ *Gr φ<sup>p</sup>*

� �

� �

3 7

there exists a positive constant F such that for Φ ∈ Ψ, ∥Fð Þ Φ ∥< F∥Φ∥, where Ψ ⊂ <sup>2</sup>*<sup>d</sup>* is 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ð Þ¼ Φ

, ∀*j* ¼ 1, ⋯, *d*, (24)

(26)

(27)

¼ *F*2,*j*ð Þþ Φ *G*2,*j*ð Þ Φ *τ*, ∀*j* ¼ 1, ⋯, *d*, (25)

� � ⋯ *B*�<sup>1</sup> *φ*2,*<sup>j</sup>* � � h i � �

� � ⋯ *B*�<sup>1</sup> *φ*2,*<sup>j</sup>* � � h i � �

, ∀*i* ¼ 1, 2 and ∀*j* ¼ 1, ⋯, *d*. The constrained system in

<sup>Φ</sup>\_ ¼ Fð ÞþG <sup>Φ</sup> ð Þ <sup>Φ</sup> *<sup>τ</sup>*, (28)

0*<sup>d</sup>*�*<sup>d</sup> G*2,1ð Þ Φ ⋮ *G*2,*<sup>d</sup>*ð Þ Φ

5*:* (29)

¼ *τ*, (30)

, (31)

, (32)

<sup>5</sup>, (33)

$$a = \dot{\phi}\_2^{des} - \Lambda \ddot{\phi}\_2,\tag{38}$$

**5. Simulations**

denotes sin *q*<sup>2</sup>

straints,

**Figure 2.**

**139**

*θ*1þ2*θ*2c2 *θ*3þ*θ*2c2 *θ*3þ*θ*2c2 *θ*<sup>3</sup> � �


**constraints using BF**

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

where c1, c2, c12 denote cos *q*<sup>1</sup>

€*q*1 €*q*2 � �

The desired trajectory is selected as

*qd*<sup>1</sup> ¼ �4 � 6*e*

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

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

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),

� ), and cos *<sup>q</sup>*<sup>1</sup> <sup>þ</sup> *<sup>q</sup>*<sup>2</sup>

*q*\_ 1 *q*\_ 2 � �

þ

� � respectively, sin <sup>2</sup>

*θ*4*g*c1þ*θ*5*g*c12 *<sup>θ</sup>*5*g*c12 � � <sup>¼</sup> *<sup>τ</sup>*<sup>1</sup> *τ*2 � �

(46)

(47)


> *T* are

�*<sup>t</sup>* ð Þ cosð Þ*<sup>t</sup> :* (48)

controller and EL dynamic model is coded using MATLAB 2018a.

**5.1 Safe tracking control of an uncertain EL-dynamics with full-state**

� �, cos *<sup>q</sup>*<sup>2</sup>

<sup>þ</sup> �*θ*<sup>2</sup> sin <sup>2</sup>*q*\_ <sup>2</sup> �*θ*<sup>2</sup> sin <sup>2</sup> *<sup>q</sup>*\_ <sup>1</sup>þ*q*\_ ð Þ<sup>2</sup> *θ*<sup>2</sup> sin <sup>2</sup>*q*\_ <sup>1</sup> 0 � �

The nominal values of the parameter vector *θ* ¼ ½ � *θ*1, *θ*2, *θ*3, *θ*4, *θ*<sup>5</sup>

*<sup>θ</sup>*<sup>2</sup> <sup>¼</sup> <sup>0</sup>*:*240 kg � <sup>m</sup><sup>2</sup> *<sup>θ</sup>*<sup>4</sup> <sup>¼</sup> <sup>2</sup>*:*4 kg � <sup>m</sup> *<sup>θ</sup>*<sup>5</sup> <sup>¼</sup> <sup>1</sup>*:*0 kg � <sup>m</sup>

�2*<sup>t</sup>* � � sin ð Þ*<sup>t</sup>* , *qd*<sup>2</sup> ¼ �<sup>4</sup> � <sup>3</sup>*<sup>e</sup>*

The objective is to track the desired joint trajectory provided that the model parameters are unknown while the state *<sup>Q</sup>* <sup>¼</sup> ½ � *<sup>q</sup>*, *<sup>q</sup>*\_ *<sup>T</sup>* satisfies the following con-

*q*<sup>1</sup> ∈ð Þ �4*:*4, 4*:*1 *q*\_ <sup>1</sup> ∈ ð Þ �10*:*2, 4*:*2

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, Λ ¼ diag 2ð Þ *:*01, 2*:*01 , and Γ ¼ diag 30, 30 ð Þ. The results of the simulation are shown in **Figures 2**–**4**. The joints

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

*<sup>q</sup>*<sup>2</sup> <sup>∈</sup>ð Þ �7*:*1, 4*:*<sup>2</sup> *<sup>q</sup>*\_ <sup>2</sup> <sup>∈</sup>ð Þ �4*:*2, 4*:*<sup>93</sup> (49)

*<sup>θ</sup>*<sup>1</sup> <sup>¼</sup> <sup>0</sup>*:*325 kg � <sup>m</sup><sup>2</sup> *<sup>θ</sup>*<sup>3</sup> <sup>¼</sup> <sup>0</sup>*:*217 kg � <sup>m</sup><sup>2</sup>


� �, and *g* is the gravitational constant.

$$
\upsilon = \phi\_2^{des} - \Lambda \check{\phi}\_1,\tag{39}
$$

$$r = \tilde{\phi}\_2 + \Lambda \tilde{\phi}\_1,\tag{40}$$

where *<sup>ϕ</sup>*~<sup>1</sup> <sup>≜</sup> *<sup>ϕ</sup>*<sup>1</sup> � *<sup>ϕ</sup>des* <sup>1</sup> and *<sup>ϕ</sup>*~<sup>2</sup> <sup>≜</sup>*ϕ*<sup>2</sup> � *<sup>ϕ</sup>des* <sup>2</sup> are position and velocity tracking errors, respectively. Λ∈ *<sup>d</sup>*�*<sup>d</sup>* is 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

$$\tau = Y\_2 \left( \varphi\_p, \varphi\_v, \mathcal{K}\_2^{-1}(\phi\_2)a, \mathcal{K}\_1^{-1}(\phi\_1)v \right) \hat{\theta} - \beta \mathcal{K}\_2(\phi\_2)r,\tag{41}$$

where *<sup>Y</sup>*<sup>2</sup> : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>n</sup>* is the regression matrix. Substituting (37) in the EL-dynamics (30) yields the following closed-loop error dynamics given by

$$\mathbf{M}\mathbb{K}\_2^{-1}\dot{r} + \mathbf{C}\mathbb{K}\_1^{-1}r + \beta\mathbb{K}\_2r = \mathbf{Y}\_2\tilde{\theta},\tag{42}$$

where <sup>~</sup>*<sup>θ</sup>* <sup>¼</sup> ^*<sup>θ</sup>* � *<sup>θ</sup>* is the parameter estimation error. The parameter ^*<sup>θ</sup>* update rule is given by

$$\dot{\hat{\theta}} = \text{proj}(-\Gamma^{-1} Y\_2^T \mathcal{K}\_2 r),\tag{43}$$

where <sup>Γ</sup><sup>∈</sup> *<sup>n</sup>*�*<sup>n</sup>* is a diagonal and positive definite matrix, and projð Þ� is a standard projection operator that ensures the parameter estimates are bounded, i.e., *θ* ≤^*θ* ≤*θ* (for further details see [71]).

*Remark* 2*.* 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 *ζ* : ½ Þ! 0, <sup>∞</sup> <sup>2</sup>*d*þ*<sup>n</sup>* denote the composite state vector, i.e., *<sup>ζ</sup>*ð Þ*<sup>t</sup>* <sup>≜</sup> *rT*ð Þ*<sup>t</sup>* , *<sup>ϕ</sup><sup>T</sup>* <sup>1</sup> ð Þ*<sup>t</sup>* , <sup>~</sup>*<sup>θ</sup> T* ð Þ*t* h i*<sup>T</sup>* . Let *λmin*f g� and *λmax*f g� denote 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,*

$$
\gamma\_1 > 2(\mathbf{1} + \gamma\_5 + \gamma\_7), \qquad \gamma\_3 > 2(\mathbf{1} + \gamma\_5 + \gamma\_6), \tag{44}
$$

are satisfied, where

$$\begin{aligned} \chi\_1 &= \beta \underline{m} & \underline{k}\_2^2 \chi\_5 &= \beta \overline{k}\_2^2 \overline{m} \\ \chi\_2 &= \lambda\_{\max} \left\{ \Lambda^T \Lambda \right\} \overline{a} & \chi\_6 &= (\chi\_2 + \chi\_4) \overline{\phi}\_2^{d\sigma} \\ \chi\_3 &= \chi\_1 \lambda\_{\min} \left\{ \Lambda^T \Lambda \right\} & \chi\_7 &= (\overline{a} + \chi\_4) \overline{\phi}\_2^{d\sigma} \\ \chi\_4 &= \overline{\Lambda} \overline{a} & \overline{a} &= \overline{k}\_2 \overline{m} \overline{\chi} \overline{\kappa}\_1^2 \end{aligned} \tag{45}$$

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

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

### **5. Simulations**

*<sup>a</sup>* <sup>¼</sup> *<sup>ϕ</sup>*\_ *des*

*<sup>v</sup>* <sup>¼</sup> *<sup>ϕ</sup>des*

respectively. Λ∈ *<sup>d</sup>*�*<sup>d</sup>* is a positive definite diagonal matrix, and its 2-norm is upper

<sup>2</sup> *<sup>ϕ</sup>*<sup>2</sup> ð Þ*a*, <sup>K</sup>�<sup>1</sup>

In terms of the linear parameterization of the EL-dynamics, i.e., Property 2, the

where *<sup>Y</sup>*<sup>2</sup> : *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* � *<sup>d</sup>* ! *<sup>d</sup>*�*<sup>n</sup>* is the regression matrix. Substituting (37) in the EL-dynamics (30) yields the following closed-loop error dynamics given by

where <sup>~</sup>*<sup>θ</sup>* <sup>¼</sup> ^*<sup>θ</sup>* � *<sup>θ</sup>* is the parameter estimation error. The parameter ^*<sup>θ</sup>* update rule

<sup>1</sup> *ϕ*<sup>1</sup> ð Þ*v*

<sup>1</sup> *r* þ *β*K2*r* ¼ *Y*<sup>2</sup>

*YT*

� �^*<sup>θ</sup>* � *<sup>β</sup>K*<sup>2</sup> *<sup>ϕ</sup>*<sup>2</sup> ð Þ*r*, (41)

<sup>1</sup> and *<sup>ϕ</sup>*~<sup>2</sup> <sup>≜</sup>*ϕ*<sup>2</sup> � *<sup>ϕ</sup>des*

bounded by a known positive constant, i.e., ∥Λ∥ ≤Λ.

*<sup>τ</sup>* <sup>¼</sup> *<sup>Y</sup>*<sup>2</sup> *<sup>φ</sup>p*, *<sup>φ</sup>v*, <sup>K</sup>�<sup>1</sup>

*<sup>M</sup>*K�<sup>1</sup>

\_

continuous since ^*θ* evolves according to the update law in (43).

½ Þ! 0, <sup>∞</sup> <sup>2</sup>*d*þ*<sup>n</sup>* denote the composite state vector, i.e., *<sup>ζ</sup>*ð Þ*<sup>t</sup>* <sup>≜</sup> *rT*ð Þ*<sup>t</sup>* , *<sup>ϕ</sup><sup>T</sup>*

*<sup>γ</sup>*<sup>1</sup> <sup>¼</sup> *<sup>β</sup><sup>m</sup> <sup>k</sup>*<sup>2</sup>

<sup>2</sup> *<sup>r</sup>*\_ <sup>þ</sup> *<sup>C</sup>*K�<sup>1</sup>

^*<sup>θ</sup>* <sup>¼</sup> proj �Γ�<sup>1</sup>

where <sup>Γ</sup><sup>∈</sup> *<sup>n</sup>*�*<sup>n</sup>* is a diagonal and positive definite matrix, and projð Þ� is a standard projection operator that ensures the parameter estimates are bounded, i.e.,

*Remark* 2*.* The parameter estimation error ~*θ* is bounded and uniformly

To facilitate the following development of the Lyapunov stability analysis, let *ζ* :

*λmin*f g� and *λmax*f g� denote 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*

*<sup>γ</sup>*<sup>2</sup> <sup>¼</sup> *<sup>λ</sup>max* <sup>Λ</sup>*<sup>T</sup>*<sup>Λ</sup> � �*α γ*<sup>6</sup> <sup>¼</sup> *<sup>γ</sup>*<sup>2</sup> <sup>þ</sup> *<sup>γ</sup>*<sup>4</sup> ð Þ*ϕdes*

*<sup>γ</sup>*<sup>3</sup> <sup>¼</sup> *<sup>γ</sup>*1*λmin* <sup>Λ</sup>*<sup>T</sup>*<sup>Λ</sup> � � *<sup>γ</sup>*<sup>7</sup> <sup>¼</sup> *<sup>α</sup>* <sup>þ</sup> *<sup>γ</sup>*<sup>4</sup> ð Þ*ϕdes*

*<sup>γ</sup>*<sup>4</sup> <sup>¼</sup> <sup>Λ</sup>*<sup>α</sup> <sup>α</sup>* <sup>¼</sup> *<sup>k</sup>*2*mCκ*<sup>2</sup>

*γ*<sup>1</sup> > 2 1 þ *γ*<sup>5</sup> þ *γ*<sup>7</sup> ð Þ, *γ*<sup>3</sup> > 2 1 þ *γ*<sup>5</sup> þ *γ*<sup>6</sup> ð Þ, (44)

<sup>2</sup>*γ*<sup>5</sup> ¼ *βλk*

2 2*m*

1

2

2

where *<sup>ϕ</sup>*~<sup>1</sup> <sup>≜</sup> *<sup>ϕ</sup>*<sup>1</sup> � *<sup>ϕ</sup>des*

*Collaborative and Humanoid Robots*

is given by

*conditions,*

**138**

control input (37) can be rewritten as

*θ* ≤^*θ* ≤*θ* (for further details see [71]).

*4.2.2 Lyapunov stability analysis*

are satisfied, where

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

<sup>2</sup> � <sup>Λ</sup>*ϕ*~2, (38)

<sup>2</sup> � <sup>Λ</sup>*ϕ*~1, (39)

<sup>2</sup> are position and velocity tracking errors,

<sup>2</sup> <sup>K</sup>2*<sup>r</sup>* � �, (43)

~*θ*, (42)

<sup>1</sup> ð Þ*<sup>t</sup>* , <sup>~</sup>*<sup>θ</sup> T* ð Þ*t*

. Let

(45)

h i*<sup>T</sup>*

*<sup>r</sup>* <sup>¼</sup> *<sup>ϕ</sup>*~<sup>2</sup> <sup>þ</sup> <sup>Λ</sup>*ϕ*~1, (40)

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.
