## The outer position loop

The desired joint torque vector can be designed as [14-19]

$${\tau }_{d}=\widehat{D}{\dot{v}}_{p}+\widehat{C}{v}_{p}+\widehat{g}+{K}_{Dp }{s}_{p}+\kappa sgn\left({s}_{p}\right)$$

4

where the symbol \(\left(\widehat{.}\right)\) refers to estimated value, \({K}_{Dp }\in {R}^{n\times n}\) is a position feedback gain matrix with a positive definite property, \(\kappa \in {R}^{n\times n}\)is a diagonal matrix associated with the last robust term and

$${s}_{p}={v}_{p}-\dot{q}$$

5a

$${v}_{p}={\dot{q}}_{d}+{\gamma }_{p}({q}_{d}-q)$$

5b

with being the desired joint trajectory, is the velocity error, is a reference velocity, and , where is the sliding time constant.

Using Eq. (5a), Eq. (3a) can be expressed as

$$\tau =D\left({\dot{v}}_{p}-{\dot{s}}_{p}\right)+\text{C}\left({v}_{p}-{s}_{p}\right)+g$$

6a

Using the idea of approximation technique, Eq. (6a) becomes

$$\tau ={W}_{p}^{T}{F}_{p}-D{\dot{s}}_{p}-\text{C}{s}_{p}+{ϵ}_{p}$$

6b

with

$$D{\dot{v}}_{p}+\text{C}{v}_{p}+g={W}_{p}^{T}{F}_{p}+{ϵ}_{p}$$

where \({W}_{p}\in {R}^{n\beta \times n}\) represents the weighting coefficient matrix, \({F}_{p}\in {R}^{n\beta \times n}\) is the corresponding basis-function matrix, and \({ϵ}_{\text{p}}\in {R}^{n}\) refers to the approximation (modeling) error.

Thus, the control law of Eq. (4) can be reformulated as

$${\tau }_{d}={\widehat{W}}_{p}^{T}{F}_{p}+{K}_{Dp}{s}_{p}$$

7

with

$${\widehat{W}}_{p}^{T}{F}_{p}=\widehat{D}{\dot{v}}_{p}+\widehat{C}{v}_{p}+\widehat{g}$$

Subtracting Eq. (7) from Eq. (6a) leads to the following closed-loop dynamics

$$D{\dot{s}}_{p}+C{s}_{p}+{K}_{Dp}{s}_{p}+\kappa sgn\left({s}_{p}\right)={\tilde{W}}_{p}^{T}{F}_{p}+{ϵ}_{p}+{e}_{t}$$

8

Equation (8) is stable as along as \({\tilde{W}}_{p}^{}\to 0\), \({ϵ}_{p}\to 0\) and \({e}_{t}\to 0\), where \({e}_{t}=\tau -{\tau }_{d}\).

## The inner joint torque loop

In this inner (minor loop), the input control is the applied input control vector (u) while the output state variable is the joint torque vector (\(\tau )\) associated with flexible element. Therefore, the following control law can be designed

$$u={\widehat{I}}_{j}{\dot{v}}_{j}+{\widehat{B}}_{j}{v}_{j}+{\widehat{\eta }}_{j}+{K}_{Dj}{s}_{j}$$

9a

where \({K}_{Dj}\in {R}^{n\times n}\) is a symmetrical positive definite matrix, and

$${s}_{j}={v}_{j}-\dot{\tau }$$

9b

$${v}_{j}={\dot{\tau }}_{d}+{\gamma }_{j}({\tau }_{d}-\tau )$$

9c

with

is the joint torque error, is a reference joint torque derivative defined in Eq. (9c), , where is the sliding time constant related to the inner torque loop. Using the concept of global approximation technique, Eq. (9a) can be re-expressed as

$$u={\widehat{W}}_{j}^{T}{F}_{j}+{K}_{Dj}{s}_{j}$$

10a

where Eq. (3b) can be reformulated as follows.

$${I}_{j}\ddot{\tau }+{B}_{j}\dot{\tau }+\eta ={W}_{j}^{T}{F}_{j}+{ϵ}_{j}$$

10b

with \({ϵ}_{j}\in {R}^{n}\) referring to the approximation error associated with the inner torque dynamics. Whereas, the following closed-loop dynamics is produced by subtracting Eq. (10a) from Eq. (10b).

$${I}_{j}{\dot{s}}_{j}+{B}_{j}{s}_{j}+{K}_{Dj}{s}_{j}={\tilde{W}}_{j}^{T}{F}_{j}+{ϵ}_{j}$$

10c

Equation (10c) is stable if \({\tilde{W}}_{j}^{}\to 0\) and \({ϵ}_{j}\to 0\).

**Remark 4**

The control law described in Eq. (10a) requires calculation of the first derivative of the desired joint torque resulted from the outer position loop. In [3], the authors proved that the control law is bounded since it will be function to the desired joint references up to the third derivatives, the output joint displacement and its derivative, and the joint torque measurement assuming all the kinematic variables (displacements, velocities and accelerations) are bounded. However, in this paper, we will see that the requirement of presence of derivative of desired joint in Eq. (10a) makes the dynamic response of the input control jumping abruptly at the beginning of the transient region response. Therefore, Albu-Schäffer et al. [23] have avoided using this term in their control law. In this work, an approximation for the derivative is proposed as follows.

\({\dot{\tau }}_{di}={\tau }_{di}\left(\frac{s}{{\sigma }_{i}s+1}\right)\) , i=1,2,3,…,n (11)

where s is Laplace variable and \({\sigma }_{i}\) is a time constant for the low-pass transfer function of (11). This time constant should be smaller than the time constant of the system dynamics.

**Theorem 1**

The dynamic modeling described in Eq. (3) with the control law, and closed-loop dynamics introduced in Eqs. (7), (10a), (8) and (10c) respectively is stable according to Lyapunov theory provided that:

$${\dot{\widehat{W}}}_{p}=-{Q}_{p}^{-1}{F}_{p}{s}_{p}^{T}$$

$${\dot{\widehat{W}}}_{j}=-{Q}_{j}^{-1}{F}_{j}{s}_{j}^{T}$$

12b

\({\gamma }_{j}^{T}{K}_{Dj}{\gamma }_{j}>\frac{1}{4}{K}_{Dp}^{-1}, {K}_{Dj}\ge {{\Gamma }}_{j}^{-1}\) , and \({B}_{j}\ge 0.\) (13)

where \({Q}_{(.)}^{-1}\in {R}^{n\beta \times n\beta }\) is an adaptation diagonal matrix that is important in estimation process, \({{\Gamma }}_{p}^{}\) and \({{\Gamma }}_{j}^{}\) are both positive definite matrices such that \({{\Gamma }}_{j}^{}={{\Gamma }}_{j}^{T}>0\), and [21]

$${{\Gamma }}_{j}^{T}{ϵ}_{j}{{\Gamma }}_{j}\le {\stackrel{-}{ϵ}}_{j}$$

$${s}_{j}^{T}{ϵ}_{j}\le {s}_{j}^{T}{{\Gamma }}_{j}^{-1}{s}_{j}+{ϵ}_{j}^{T}{{\Gamma }}_{j}^{}{ϵ}_{j}\le {s}_{j}^{T}{{\Gamma }}_{j}^{-1}{s}_{j}+{\stackrel{-}{ϵ}}_{j}$$

14

where \({\stackrel{-}{ϵ}}_{j}\) is a lower bound for and \({ϵ}_{j}\).

**Proof**

To prove the validity of Theorem 1, let us consider the following non-negative Lyapunov function

$$V=\frac{1}{2}{s}_{p}^{T}D{s}_{p}+\frac{1}{2}{s}_{j}^{T}{I}_{j}{s}_{j}+\frac{1}{2}tr\left({\tilde{W}}_{p}^{T}{Q}_{p}{\tilde{W}}_{p}+{\tilde{W}}_{j}^{T}{Q}_{j}{\tilde{W}}_{j}\right)+{e}_{j}^{T}{\gamma }_{j}^{T}{K}_{Dj}{e}_{j}$$

15

Taking the time derivative of the above equation to get

$$\dot{V}={s}_{p}^{T}D{\dot{s}}_{p}+\frac{1}{2}{s}_{p}^{T}\dot{D}{s}_{p}+{s}_{j}^{T}{I}_{j}{\dot{s}}_{j}+tr\left({\tilde{W}}_{p}^{T}{Q}_{p}{\dot{\widehat{W}}}_{p}+{\tilde{W}}_{j}^{T}{Q}_{j}{\dot{\widehat{W}}}_{j}\right)+2{e}_{j}^{T}{\gamma }_{j}^{T}{K}_{Dj}{\dot{e}}_{j}$$

16

Substituting Eqs. (8) and (11) in Eq. (16) to get

$$\dot{V}={s}_{p}^{T}\left({\tilde{W}}_{p}^{T}{F}_{p}+{ϵ}_{p}+{e}_{j}-C\left(q,\dot{q}\right){s}_{p}-{K}_{Dp}{s}_{p}\right)+\frac{1}{2}{s}_{p}^{T}\dot{D}{s}_{p}+{s}_{j}^{T}\left({\tilde{W}}_{j}^{T}{F}_{j}+{ϵ}_{j}-{B}_{j}{s}_{j}-{K}_{Dj}{s}_{j}\right)+2{e}_{j}^{T}{\gamma }_{j}^{T}{K}_{Dj}{\dot{e}}_{j}+tr\left({\tilde{W}}_{p}^{T}{Q}_{p}{\dot{\widehat{W}}}_{p}+{\tilde{W}}_{j}^{T}{Q}_{j}{\dot{\widehat{W}}}_{j}\right)$$

$$={s}_{p}^{T}\left({\tilde{W}}_{p}^{T}{F}_{p}+{ϵ}_{p}+{e}_{j}-C\left(q,\dot{q}\right){s}_{p}-{K}_{Dp}{s}_{p}-\kappa sgn\left({s}_{p}\right)\right)+\frac{1}{2}{s}_{p}^{T}\dot{D}{s}_{p}+{s}_{j}^{T}\left({\tilde{W}}_{j}^{T}{F}_{j}+{ϵ}_{j}-{B}_{j}{s}_{j}-{\dot{\text{e}}}_{j}^{T}{K}_{Dj}{\dot{\text{e}}}_{j}^{}\right)-{e}_{j}^{T}{\gamma }_{j}^{T}{K}_{Dj}{\gamma }_{j}{e}_{j}^{}+tr\left({\tilde{W}}_{p}^{T}{Q}_{p}{\dot{\widehat{W}}}_{p}+{\tilde{W}}_{j}^{T}{Q}_{j}{\dot{\widehat{W}}}_{j}\right)$$

17

Using the property of skew matrix of (\(\dot{D}-2C)\) with some manipulations to obtain

$$\dot{V}=-{s}_{p}^{T}{K}_{Dp}{s}_{p}+{s}_{p}^{T}{e}_{j}-{e}_{j}^{T}{\gamma }_{j}^{T}{K}_{Dj}{\gamma }_{j}{e}_{j}^{}-\kappa sgn\left({s}_{p}\right)+{s}_{p}^{T}{ϵ}_{p}-{s}_{j}^{T}{K}_{Dj}{s}_{j}-{s}_{j}^{T}{B}_{j}{s}_{j}+{s}_{j}^{T}{ϵ}_{j}+tr\left\{{\tilde{W}}_{p}^{T}\left({F}_{p}{s}_{p}^{T}+{Q}_{p}{\dot{\widehat{W}}}_{p}\right)+{\tilde{W}}_{j}^{T}\left({F}_{j}{s}_{j}^{T}+{Q}_{j}{\dot{\widehat{W}}}_{j}\right)\right\}$$

18

$$\dot{V}=-\left[\begin{array}{cc}{s}_{p}^{T}& {e}_{j}^{T}\end{array}\right]R\left[\begin{array}{c}{s}_{p}\\ {e}_{j}\end{array}\right]+{s}_{p}^{T}{ϵ}_{p}-\kappa sgn\left({s}_{p}\right)-{s}_{j}^{T}{K}_{Dj}{s}_{j}-{s}_{j}^{T}{B}_{j}{s}_{j}+{s}_{j}^{T}{ϵ}_{j}+tr\left\{{\tilde{W}}_{p}^{T}\left({F}_{p}{s}_{p}^{T}+{Q}_{p}{\dot{\widehat{W}}}_{p}\right)+{\tilde{W}}_{j}^{T}\left({F}_{j}{s}_{j}^{T}+{Q}_{j}{\dot{\widehat{W}}}_{j}\right)\right\}$$

19

with

$$R=\left[\begin{array}{cc}{K}_{Dp}& -\frac{1}{2}{I}_{n}\\ -\frac{1}{2}{I}_{n}& {\gamma }_{j}^{T}{K}_{Dj}{\gamma }_{j}\end{array}\right]$$

Since the matrix R is a symmetric, the first inequality of Eq(13) is satisfied according to [3]. By substituting Eqs. (12a,b) and substituting Eqs. (14a,b) we can get

$$\dot{V}=-\left[\begin{array}{cc}{s}_{p}^{T}& {e}_{j}^{T}\end{array}\right]R\left[\begin{array}{c}{s}_{p}\\ {e}_{j}\end{array}\right]+{s}_{p}^{T}{ϵ}_{p}-\sum _{i}{\kappa }_{i}\left|{{s}_{p}}_{i}\right|+-{s}_{j}^{T}{B}_{j}{s}_{j}+-{s}_{j}^{T}({K}_{Dj}{-{{\Gamma }}_{j}^{-1})s}_{j}+{\stackrel{-}{ϵ}}_{j}$$

20

To ensure stability, it is required that \({\kappa }_{i}\ge {\delta }_{i}\)+\({{s}_{p}}_{i}\) and \({K}_{Dj}\ge {{\Gamma }}_{j}^{-1}\) such that \(\dot{V}\) is lower bounded guaranteeing the asymptotic system stability when t\(\to \infty\) according to Barbalat’s lemma [20], [22].

**Remark 5**

In effect, the overall control structure including control laws and the corresponding update laws (Eqs. (7), (10a), and (12)) are fully decoupled with diagonal parameter and gain matrices. Therefore, it is easy to be applied to high DoF robotic manipulators .