**5. Discussion**

In many humanoid robots, so far, one mainly focuses on building complicated high-level control structures while in the low-level framework simple controllers, such as PID or SMC, were normally employed to realize the given command [28, 33]. Obviously, to ensure the whole system operate as expected, auto-adjusting terms must be implemented at the upper-level framework to compensate for the imperfection of the simple low-level actions [34, 35]. With such the cross-over interference between the control layers, it was hard to provide high accuracies and fast responses for the overall system [28, 36]. Indeed, in our real-time experiments with the legged robot, well-tuned PID controllers could be adopted for squatting tests in a certain case. When the working condition changed, the control system could be damaged by the PID controller due to degradation of the control performance. Of course, precision controllers could be employed in the low-level layer but their simplicity in implementation and less computation burden should be preserved. The gain-adaptive robust backstepping control algorithm has been developed in comply with these strict requirements.

As noted in the control signal Eq. (8), if one chooses *k5 = 0* and *a1 = 0*, the nonlinear control method becomes an ordinary PID controller. In another sense, if the control gains *k4* and *k5* are removed, the control signal Eq. (8) presents for a

#### *Self-Learning Low-Level Controllers DOI: http://dx.doi.org/10.5772/intechopen.96732*

conventional form of the SMC scheme in which *e2* is the sliding surface. Hence, users have various options in adoption of the designed controller, which could be easily switched to basic control options [6, 8, 28, 35].

Note also that the input gain constant (*a2*) could be selected with an arbitrarily positive constant while the nominal dynamical constant (*a1*) could be zero or any bounded value. Their deviations could be counted into the lumped disturbance (*d*) or extended disturbance (*h*). One possible way to determine such the terms is use of the model-based identification method presented in previous works [27, 30, 31].

As comparing to other intelligent gain-learning algorithms such as neural network or fuzzy logic engines, the computational burden and fast response are noteworthy advantages [9–11, 37, 38]. However, in some cases, one does not need to use the nominal dynamics or (a1 = 0), and at that time, overall design of the proposed control method becomes a model-free controller.

The experimental results have confirmed the outperformance of the gain-learning controllers over other robust adaptive nonlinear controllers, such as ARCESO and RISE [13, 30], thanks to a high-degree-of-learning mechanism. Furthermore, the designed controller has been improved from the former controller [27] to increase the real-time applicability by removing third-order time-derivation terms in the control signal.

From the above analyses, the flexibility of the designed controller in terms of working efficiency and user implementation are intuitively observed. Its feasibility in movable robots have been also confirmed by intensive experiments.

#### **6. Summary**

**5. Discussion**

**Figure 8.**

**50**

**Table 3.**

*Collaborative and Humanoid Robots*

In many humanoid robots, so far, one mainly focuses on building complicated high-level control structures while in the low-level framework simple controllers, such as PID or SMC, were normally employed to realize the given command [28, 33]. Obviously, to ensure the whole system operate as expected, auto-adjusting terms must be implemented at the upper-level framework to compensate for the imperfection of the simple low-level actions [34, 35]. With such the cross-over interference between the control layers, it was hard to provide high accuracies and fast responses for the overall system [28, 36]. Indeed, in our real-time experiments with the legged robot, well-tuned PID controllers could be adopted for squatting tests in a certain case. When the working condition changed, the control system could be damaged by the PID controller due to degradation of the control performance. Of course, precision controllers could be employed in the low-level layer but

**Testing condition Force (N) Error (deg)** *u* **(%) Error (deg)** *u* **(%)** Small external disturbance 4.1 0.168 3.149 0.327 2.932 Large external disturbance 229.8 0.405 6.4653 0.782 9.7454 Fast-variation external disturbance 89.4 0.267 3.888 0.496 4.491

*Performance comparison of the garb controllers in the multiple-joint tests.*

**HIP KNEE**

their simplicity in implementation and less computation burden should be preserved. The gain-adaptive robust backstepping control algorithm has been

As noted in the control signal Eq. (8), if one chooses *k5 = 0* and *a1 = 0*, the nonlinear control method becomes an ordinary PID controller. In another sense, if the control gains *k4* and *k5* are removed, the control signal Eq. (8) presents for a

developed in comply with these strict requirements.

*Snapshots of the leg motion in the large external disturbance test.*

This chapter presents a gain-adaptive robust position-tracking controller for low-level subsystems of large robotic systems. The mathematical model of the system dynamics was reviewed to provide necessary information for the controller design. To realize the tracking control objective, a robust control signal based on the backstepping scheme was adopted. In fact, this design is a nonlinear extension of ordinary PID controller or conventional sliding mode controller. New adaptation laws were developed to automatically tune the control gains for different working conditions. The learning mechanism was activated by various forms of the control error and deactivated by the relaxation functions.

Stability of the overall system was concretely maintained by proper Lyapunovbased constraints. Extended real-time experiments were conducted to verify the performance of the proposed controller. The results achieved confirmed the advantages on the robustness, adaptation, high accuracy, and fast response of the proposed controller. Depending on the usage purpose of user, the controller could be simplified to become a gain-learning PID controller or an adaptive robust sliding mode controller.

## **Appendix A. Proof of Lemma 1**

Let define the following new disturbance:

$$h = -\ddot{\varkappa}\_{1d} + \dot{\nu} + k\_2 \nu + d \tag{A.1}$$

Also synthesize a new state variable and lumped term as follows:

$$\begin{cases} \rho = -\int ((k\_4 \varepsilon + k\_5 \operatorname{sgn}(e\_1))d\varepsilon) + h \\ 0 \\ \varepsilon = \nu + e\_2 \end{cases} \tag{A.2}$$

By noting Eqs. (3), (4), (8), and (A.2), the following dynamics are obtained:

$$\begin{cases} \dot{\varepsilon}\_1 = \varepsilon - k\_1 \varepsilon\_1 \\ \dot{\varepsilon} = -k\_3 \varepsilon\_1 - (k\_2 - k\_1)\varepsilon + \rho \end{cases} \tag{A.3}$$

where *P*1ð Þ*t* is a positive function defined as:

0

*P*1ð Þ¼ 0 2ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> Δ*<sup>e</sup> k*<sup>5</sup> þ Δ\_

<sup>1</sup> � *<sup>k</sup>*4ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>*<sup>2</sup>

€*<sup>ε</sup>* ¼ �ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>*\_ <sup>þ</sup> *<sup>k</sup>*1*k*3*e*<sup>1</sup> <sup>þ</sup> \_

**C. Proof of the positive function P1(t)**

*P*1ð Þ*t* ≥*P*1ð Þþ 0

ð*t*

0

inequality, we have.

*P*1ð Þ*t* ≥*P*1ð Þþ 0

**D. Proof of Lemma 2**

system is:

**53**

�ð Þ *k*<sup>2</sup> � *k*<sup>1</sup>

dynamics Eq. (A.3) and integral inequalities as follows:

ð*t*

0

ð*t*

\_ *he*\_<sup>1</sup>

0

*k*<sup>5</sup> � Δ\_ *h* � � *<sup>k</sup>*<sup>3</sup> <sup>þ</sup> *<sup>k</sup>*1*k*<sup>2</sup> � *<sup>k</sup>*<sup>2</sup>

the definition Eq. (A.1), and *Assumptions 1* and *2*.

2. By recalling (A.4), *e*\_<sup>1</sup> is bounded, and.

*<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

The proof of the function *P*1ð Þ*t* can be referred in *Appendix C*.

*h* � �

<sup>1</sup> � *<sup>k</sup>*4ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>*<sup>2</sup> <sup>þ</sup> *<sup>P</sup>*\_ <sup>1</sup>ðÞ�*<sup>t</sup> <sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

*h* � �ð Þ ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>* <sup>þ</sup> *<sup>k</sup>*3*e*<sup>1</sup> � �*d<sup>τ</sup>*

The time derivative of the Lyapunov function in adoption of Eqs. (A.6) and (B.2) is.

From Eqs. (2), (9)–(10), (A.6), (B.1)–(B.3), and *Assumptions 1* and *2*, we have:

It implies that *ε*\_ is bounded. Hence, by using Barbalat's lemma [39],*Theorem 1* is proven. ■

The function *P*1ð Þ*t* expressed in Eq. (B.2) can be expanded using the error

*h* � � *<sup>k</sup>*<sup>3</sup> <sup>þ</sup> *<sup>k</sup>*1*k*<sup>2</sup> � *<sup>k</sup>*<sup>2</sup>

By applying the integrating procedures in previous works [8] and comparison

1

The proof is completed by noting *Lemma 1*, the conditions Eqs. (10) and (B.2),

By applying the control input Eq. (11) to the dynamics Eq. (2), the closed-loop

� �j j *<sup>e</sup>*<sup>1</sup> � �*d<sup>τ</sup>* � ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> <sup>Δ</sup>\_

� �*d<sup>τ</sup>*

*<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

� �*d<sup>τ</sup>* � *<sup>k</sup>*5ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup>

*h* � �ð Þ ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>* <sup>þ</sup> *<sup>k</sup>*3*e*<sup>1</sup>

*h* � ð Þ *k*<sup>3</sup> þ *k*<sup>4</sup> *ε* � *k*<sup>5</sup> sgn ð Þ *e*<sup>1</sup> (B.4)

1

� �*e*<sup>1</sup>

*d e*ð Þ<sup>1</sup>

ð*e*1ð Þ*t*

*e*1ð Þ 0

(B.2)

(B.3)

(C.1)

(C.2)

*<sup>h</sup>* þ *k*<sup>5</sup> � �j j *<sup>e</sup>* � *<sup>e</sup>*ð Þ <sup>0</sup>

*<sup>P</sup>*1ðÞ¼ *<sup>t</sup> <sup>P</sup>*1ð Þþ <sup>0</sup> <sup>Ð</sup>*<sup>t</sup>*

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

*Self-Learning Low-Level Controllers*

2

2

8 ><

>:

*<sup>V</sup>*\_ <sup>11</sup> ¼ �*k*3*k*4*k*1*<sup>e</sup>*

¼ �*k*3*k*4*k*1*e*

½ � *<sup>e</sup>*1, *<sup>ε</sup> <sup>T</sup>* <sup>∈</sup>*L*<sup>2</sup>

The following positive function is studied:

$$\dot{V}\_{10} = 0.5k\_4k\_3\epsilon\_1^2 + 0.5k\_4\epsilon^2 + 0.5\rho^2 + \int\_0^t (k\_5\operatorname{sgn}(e\_1) - \dot{h})\dot{e}d\tau + V\_{100} \tag{A.4}$$

where *V*<sup>100</sup> is a positive constant selected as.

$$W\_{100} = \frac{0.5\left(k\_5 + \Delta\_{\dot{h}}\right)^2}{k\_4} + \left(k\_5 + \Delta\_{\dot{h}}\right)|\varepsilon(\mathbf{0})|\tag{A.5}$$

Here, Δ• ¼ max ð Þ j•j is the maximum absolute value of function ð Þ• *:*

The proof of the positive function *V*<sup>10</sup> can be obtained by applying integral inequalities and the condition Eq. (A.5).

The time derivative *V*\_ <sup>10</sup> is simplified using combinations of Eqs. (A.2) and (A.3), as follows:

$$\begin{split} \dot{V}\_{10} &= k\_4 k\_3 e\_1 (\varepsilon - k\_1 e\_1) + k\_4 e \dot{e} + \left( k\_5 \operatorname{sgn} \left( e\_1 \right) - \dot{h} \right) \dot{e} \\ &- (\dot{e} + (k\_2 - k\_1) e + k\_3 e\_1) \left( k\_4 e + k\_5 \operatorname{sgn} \left( e\_1 \right) - \dot{h} \right) \\ &\le - k\_3 k\_5 |e\_1| - k\_3 k\_4 k\_1 \left( |e\_1| - \frac{\Delta\_{\dot{h}}}{2k\_4 k\_1} \right)^2 + \frac{k\_3 \Delta\_{\dot{h}}^2}{4 k\_4 k\_1} \\ &- (k\_2 - k\_1) k\_4 \left( |e| - \frac{(k\_5 + \Delta\_{\dot{h}})}{2k\_4} \right)^2 + \frac{(k\_2 - k\_1) \left( k\_5 + \Delta\_{\dot{h}} \right)^2}{4 k\_4} \end{split} \tag{A.6}$$

Let define the following positive constants:

$$\begin{cases} \varepsilon\_{\uparrow} = \frac{\Delta\_{\dot{h}}}{2k\_{4}k\_{1}} + \sqrt{\frac{1}{k\_{3}k\_{4}k\_{1}} \left(\frac{k\_{3}\Delta\_{\dot{h}}^{2}}{4k\_{4}k\_{1}} + \frac{(k\_{2}-k\_{1})\left(k\_{5}+\Delta\_{\dot{h}}\right)^{2}}{4k\_{4}}\right)} \\\\ \varepsilon\_{\uparrow} = \frac{(k\_{5}+\Delta\_{\dot{h}})}{2k\_{4}} + \sqrt{\frac{1}{(k\_{2}-k\_{1})k\_{4}} \left(\frac{k\_{3}\Delta\_{\dot{h}}^{2}}{4k\_{4}k\_{1}} + \frac{(k\_{2}-k\_{1})\left(k\_{5}+\Delta\_{\dot{h}}\right)^{2}}{4k\_{4}}\right)} \end{cases}$$

By noting *Assumption 2*, the terms Δ\_ *<sup>h</sup>*,*e*†, *ε*† are bounded. If (∣*e*1∣>*e*†) and/or (∣*ε*∣>*ε*†), *V*\_ <sup>10</sup> is negative. It implies *e*<sup>1</sup> and*ε*are bounded [19, 29]. Therefore, *Lemma <sup>1</sup>* is proven. ■

#### **B. Proof of Theorem 1**

A new Lyapunov function is investigated.

$$V\_{11} = V\_{10} + P\_1(t) \tag{\text{B.1}}$$

By noting Eqs. (3), (4), (8), and (A.2), the following dynamics are obtained:

*ε*\_ ¼ �*k*3*e*<sup>1</sup> � ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> *ε* þ *φ*

ð*t*

*<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

þ *k*<sup>5</sup> þ Δ\_

� �

þ

<sup>þ</sup> ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

4*k*<sup>4</sup>

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

vu ! ut

� �

*h* 2*k*4*k*<sup>1</sup> � �<sup>2</sup>

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi

*k*3Δ<sup>2</sup> \_ *h* 4*k*4*k*<sup>1</sup>

vu ! ut

*h* � � 2*k*<sup>4</sup> � �<sup>2</sup>

> *k*3Δ<sup>2</sup> \_ *h* 4*k*4*k*<sup>1</sup>

1 ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> *k*<sup>4</sup>

(∣*ε*∣>*ε*†), *V*\_ <sup>10</sup> is negative. It implies *e*<sup>1</sup> and*ε*are bounded [19, 29]. Therefore, *Lemma <sup>1</sup>* is proven. ■

*h*

*h*

*k*3Δ<sup>2</sup> \_ *h* 4*k*4*k*<sup>1</sup>

<sup>þ</sup> ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

4*k*<sup>4</sup>

*h* � �<sup>2</sup>

*h* � �<sup>2</sup>

<sup>þ</sup> ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

*<sup>h</sup>*,*e*†, *ε*† are bounded. If (∣*e*1∣>*e*†) and/or

*V*<sup>11</sup> ¼ *V*<sup>10</sup> þ *P*1ð Þ*t* (B.1)

4*k*<sup>4</sup>

*h* � �<sup>2</sup>

*ε*\_

*h*

� �

*h*

� �j j *<sup>ε</sup>*ð Þ <sup>0</sup> (A.5)

0

*h* � �<sup>2</sup> *k*4

The time derivative *V*\_ <sup>10</sup> is simplified using combinations of Eqs. (A.2) and (A.3),

Here, Δ• ¼ max ð Þ j•j is the maximum absolute value of function ð Þ• *:* The proof of the positive function *V*<sup>10</sup> can be obtained by applying integral

(A.3)

(A.6)

*ε*\_*dτ* þ *V*<sup>100</sup> (A.4)

*e*\_<sup>1</sup> ¼ *ε* � *k*1*e*<sup>1</sup>

�

<sup>1</sup> <sup>þ</sup> <sup>0</sup>*:*5*k*4*ε*<sup>2</sup> <sup>þ</sup> <sup>0</sup>*:*5*φ*<sup>2</sup> <sup>þ</sup>

*<sup>V</sup>*<sup>100</sup> <sup>¼</sup> <sup>0</sup>*:*<sup>5</sup> *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

*<sup>V</sup>*\_ <sup>10</sup> <sup>¼</sup> *<sup>k</sup>*4*k*3*e*1ð Þþ *<sup>ε</sup>* � *<sup>k</sup>*1*e*<sup>1</sup> *<sup>k</sup>*4*εε*\_ <sup>þ</sup> *<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

<sup>≤</sup> � *<sup>k</sup>*3*k*5j j *<sup>e</sup>*<sup>1</sup> � *<sup>k</sup>*3*k*4*k*<sup>1</sup> j j *<sup>e</sup>*<sup>1</sup> � <sup>Δ</sup>\_

1 *k*3*k*4*k*<sup>1</sup>

�ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>k</sup>*<sup>4</sup> j j *<sup>ε</sup>* � *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

Let define the following positive constants:

*h* � � 2*k*<sup>4</sup>

A new Lyapunov function is investigated.

By noting *Assumption 2*, the terms Δ\_

þ

*<sup>e</sup>*† <sup>¼</sup> <sup>Δ</sup>\_ *h* 2*k*4*k*<sup>1</sup> þ

8 >>>>>>><

>>>>>>>:

**B. Proof of Theorem 1**

**52**

*<sup>ε</sup>*† <sup>¼</sup> *<sup>k</sup>*<sup>5</sup> <sup>þ</sup> <sup>Δ</sup>\_

�ð Þ *<sup>ε</sup>*\_ <sup>þ</sup> ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> *<sup>ε</sup>* <sup>þ</sup> *<sup>k</sup>*3*e*<sup>1</sup> *<sup>k</sup>*4*<sup>ε</sup>* <sup>þ</sup> *<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

The following positive function is studied:

where *V*<sup>100</sup> is a positive constant selected as.

2

inequalities and the condition Eq. (A.5).

*V*<sup>10</sup> ¼ 0*:*5*k*4*k*3*e*

*Collaborative and Humanoid Robots*

as follows:

where *P*1ð Þ*t* is a positive function defined as:

$$\begin{cases} P\_1(t) = P\_1(\mathbf{0}) + \int\_0^t \left( \left( k\_5 \operatorname{sgn}(\varepsilon\_1) - \dot{h} \right) ((k\_2 - k\_1)\varepsilon + k\_3 \varepsilon\_1) \right) d\tau \\\ P\_1(\mathbf{0}) = 2(k\_2 - k\_1)\Delta\_\epsilon (k\_5 + \Delta\_h) \end{cases} \tag{B.2}$$

The proof of the function *P*1ð Þ*t* can be referred in *Appendix C*. The time derivative of the Lyapunov function in adoption of Eqs. (A.6) and (B.2) is.

$$\begin{split} \dot{V}\_{11} &= -k\_3 k\_4 k\_1 \varepsilon\_1^2 - k\_4 (k\_2 - k\_1) \varepsilon^2 + \dot{P}\_1(t) - \left( k\_5 \operatorname{sgn}(e\_1) - \dot{h} \right) ((k\_2 - k\_1)\varepsilon + k\_3 \varepsilon\_1) \\ &= -k\_3 k\_4 k\_1 \varepsilon\_1^2 - k\_4 (k\_2 - k\_1) \varepsilon^2 \end{split} \tag{B.3}$$

From Eqs. (2), (9)–(10), (A.6), (B.1)–(B.3), and *Assumptions 1* and *2*, we have: ½ � *<sup>e</sup>*1, *<sup>ε</sup> <sup>T</sup>* <sup>∈</sup>*L*<sup>2</sup> 2. By recalling (A.4), *e*\_<sup>1</sup> is bounded, and.

$$\ddot{\varepsilon} = -(k\_2 - k\_1)\dot{\varepsilon} + k\_1 k\_3 e\_1 + \dot{h} - (k\_3 + k\_4)\varepsilon - k\_5 \text{sgn}\,(e\_1) \tag{B.4}$$

It implies that *ε*\_ is bounded. Hence, by using Barbalat's lemma [39],*Theorem 1* is proven. ■

## **C. Proof of the positive function P1(t)**

The function *P*1ð Þ*t* expressed in Eq. (B.2) can be expanded using the error dynamics Eq. (A.3) and integral inequalities as follows:

$$\begin{aligned} P\_1(t) \ge P\_1(0) + \int\_0^t \left( \left( k\_5 \operatorname{sgn}(e\_1) - \dot{h} \right) \left( k\_3 + k\_1 k\_2 - k\_1^2 \right) e\_1 \right) d\tau \\ \overset{t}{\to} \left( k\_2 - k\_1 \right) \int\_0^t \left( \dot{h} e\_1 \right) d\tau - k\_5 (k\_2 - k\_1) \int\_{e\_1(0)} d(e\_1) \end{aligned} \tag{C.1}$$

By applying the integrating procedures in previous works [8] and comparison inequality, we have.

$$P\_1(t) \ge P\_1(0) + \int\_0^t (\left(k\_5 - \Delta\_{\dot{h}}\right) \left(k\_3 + k\_1k\_2 - k\_1^2\right) |e\_1|\right) d\tau \ - \left(k\_2 - k\_1\right) \left(\Delta\_{\dot{h}} + k\_5\right) |e - e(0)|\tag{C.2}$$

The proof is completed by noting *Lemma 1*, the conditions Eqs. (10) and (B.2), the definition Eq. (A.1), and *Assumptions 1* and *2*.

### **D. Proof of Lemma 2**

By applying the control input Eq. (11) to the dynamics Eq. (2), the closed-loop system is:

$$\begin{cases} \dot{e}\_1 = \varepsilon - k\_1 e\_1 \\ \dot{\varepsilon} = -(k\_2 - k\_1)\varepsilon - \left(k\_3 - \text{sat}\left(\stackrel{\cdot}{k}\_1\right) - \stackrel{\cdot}{k}\_1\right)e\_1 + \rho. \end{cases} \tag{D.1}$$

*P*2ð Þ¼ 0 2 *k*<sup>5</sup> þ Δ\_

*k*<sup>5</sup> ≥ Δ\_ *h*

<sup>1</sup> � *k*<sup>2</sup> � *k*<sup>1</sup>

*^* 4sat *k ^* 4 � � � *<sup>η</sup>*5*σ*5*<sup>k</sup>*

� � <sup>þ</sup> arc

8 >><

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

>>:

2

**F. Inverse Kinematics of the robot leg**

*x*1*dh* ¼ atan2 *Px*, *Py*

\* and Joonbum Bae<sup>2</sup>

\*Address all correspondence to: badx@hcmute.edu.vn

provided the original work is properly cited.

function leads to.

kinematics:

8 >>><

>>>:

**Author details**

Dang Xuan Ba<sup>1</sup>

Vietnam

Korea

**55**

*<sup>V</sup>*\_ <sup>2</sup> ¼ �*k*3*k*4*k*1*<sup>e</sup>*

*Self-Learning Low-Level Controllers*

�*η*3*σ*3*k*4*k ^* 3sat *k ^* 3 � � � *<sup>η</sup>*4*σ*4*<sup>k</sup>*

*h* � �ð Þ <sup>Δ</sup>*e*\_ <sup>þ</sup> *<sup>k</sup>*2 max <sup>Δ</sup>*<sup>e</sup>*

Substituting Eqs. (D.1) and (13) to the time derivative of the new Lyapunov

� �*k*4*ε*<sup>2</sup> � *<sup>k</sup>*4*σ*1ð Þ *<sup>e</sup>*1*<sup>ε</sup>* <sup>2</sup> � *<sup>η</sup>*2*σ*2*k*4*<sup>k</sup>*

*Theorem 2* is proven by noting Eqs. (2), (D.1), (E.1), (E.4), *Assumptions 1* and *2*, and the discussions in the proof of *Theorem 1*. ■

The desired angles of the leg joints (hip ð Þ *x*1*dh* and knee ð Þ *x*1*dk* ) can be calculated

*P*2 *<sup>x</sup>* <sup>þ</sup> *<sup>P</sup>*<sup>2</sup> *<sup>y</sup>* þ *l* 2 <sup>1</sup> � *l* 2 2

0

B@

*x*1*dk* ¼ atan2ð*Px* � *l*<sup>1</sup> sin ð Þ *x*1*dh* , *Px* � *l*<sup>1</sup> cosð Þ *x*1*dh* Þ � *x*1*dh*

where *l*<sup>1</sup> ¼ 0*:*21m and *l*<sup>2</sup> ¼ 0*:*295m are the link lengths of robot (thigh and shank), respectively. *Px* and *Py* are the end-effector position of the robot foot with respect to the robot coordinate setting at the hip joint, as sketched in **Figure 2(b)**. The feasible working range of the hip joint was selected to be 0½ � ! þ80 deg*:*

1 HCMC University of Technology and Education (HCMUTE), Ho Chi Minh City,

2 Ulsan National Institute of Science and Technology (UNIST), Ulsan City, South

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/ by/3.0), which permits unrestricted use, distribution, and reproduction in any medium,

2*l*<sup>1</sup>

q

ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi *P*2 *<sup>x</sup>* <sup>þ</sup> *<sup>P</sup>*<sup>2</sup> *y* 1

CA

from the position of the foot (the end-effector) using the following inverse

*^* 1

*^* 5sat *k ^* 5

min >0

> *^* 2sat *k ^* 2 � �

� � (E.4)

(E.3)

(E.5)

*k*<sup>3</sup> þ ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> *k*<sup>1</sup> � sat *k*

� � � �

A new positive function is studied.

$$\begin{aligned} V\_{20} &= 0.5\rho^2 + \int\_0^t \left(k\_5 \text{sgn}\left(e\_1\right) - \dot{h}\right) i d\tau + \int\_0^t k\_4 \left(k\_3 - \text{sat}\left(\dot{k}\_1\right) - \dot{\bar{k}}\_1\right) e\_1 i\_1 d\tau + \int\_0^t k\_4 e i d\tau \\ &+ V\_{200} \end{aligned} \tag{D.2}$$

where *V*<sup>200</sup> is a positive constant selected as.

$$\begin{split} V\_{200} &= \frac{0.5(k\_{5\max} + \Delta\_{\hat{h}})^2}{k\_{4\min}} + (k\_{5\max} + \Delta\_{\hat{h}})|e(\mathbf{0})| \\ &+ 0.5k\_{4\max}(e(\mathbf{0}))^2 + 0.5k\_{4\max} \left(k\_{3\max} + \Delta\_{\hat{k}\_1} + \Delta\_{\hat{h}\_1}\right)(e\_1(\mathbf{0}))^2 \end{split} \tag{D.3}$$

The proof of *Lemma 1* can be reused for the positive function *V*<sup>20</sup> based on Eq. (D.3) and for its time derivative. Then, the time derivative of the new function is:

$$\begin{split} \dot{V}\_{20} &= \left(k\_5 \operatorname{sgn}\left(e\_1\right) - \dot{\bar{h}}\right) \dot{\varepsilon} + k\_4 \left(k\_3 - \operatorname{sat}\left(\ddot{k}\_1\right) - \dot{\bar{k}}\right) e\_1 (\varepsilon - k\_1 e\_1) + k\_4 e \dot{\varepsilon} \\ &- \left(\dot{\varepsilon} + (k\_2 - k\_1)\varepsilon + \left(k\_3 - \operatorname{sat}\left(\ddot{k}\_1\right) - \dot{\bar{k}}\right) e\_1\right) \left(k\_4 \varepsilon + k\_5 \operatorname{sgn}\left(e\_1\right) - \dot{\bar{h}}\right) \\ &\leq -|e\_1| \left(k\_3 - \operatorname{sat}\left(\ddot{k}\_1\right) - \dot{\bar{k}}\right) \left(k\_4 k\_1 |e\_1| + k\_5 - \Delta\_{\dot{h}}\right) - (k\_2 - k\_1) |e| \left(k\_4 |e| - k\_5 \max\left(-\Delta\_{\dot{h}}\right)\right) \end{split} \tag{D.4} \end{split} \tag{D.4}$$

By employing the same discussion with *Lemma 1* under *Assumption 2, Lemma 2* is proven*.*■

### **E. Proof of Theorem 2**

Let consider the following Lyapunov function:

$$V\_2 = 0.5\left(\overline{k}\_3 \overline{k}\_4 e\_1^2 + \overline{k}\_4 e^2 + 2P\_2(t) + \rho^2 + \sigma\_2 \overline{k}\_4 \overline{k}\_2^2 + \sigma\_3 \overline{k}\_4 \overline{k}\_3^2 + \sigma\_4 \overline{k}\_4^2 + \sigma\_5 \overline{k}\_5^2\right) \tag{E.1}$$

where *P*2ð Þ*t* is a positive function which is chosen as follows:

$$P\_2(t) = P\_2(\mathbf{0}) + \int\_0^t \left( \left( \overline{k}\_5 \operatorname{sgn} \left( e\_1 \right) - \dot{h} \right) \rho \right) d\tau\_2 \tag{E.2}$$

The proof of the function *P*2ð Þ*t* can be satisfactory using the similar arguments presented in *Appendix C* with the following conditions:

*Self-Learning Low-Level Controllers DOI: http://dx.doi.org/10.5772/intechopen.96732*

*e*\_<sup>1</sup> ¼ *ε* � *k*1*e*<sup>1</sup>

*<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

where *V*<sup>200</sup> is a positive constant selected as.

� �<sup>2</sup> *k*4 min

*h*

<sup>þ</sup>0*:*5*k*4 max ð Þ *<sup>ε</sup>*ð Þ <sup>0</sup> <sup>2</sup> <sup>þ</sup> <sup>0</sup>*:*5*k*4 max *<sup>k</sup>*3 max <sup>þ</sup> <sup>Δ</sup>*<sup>k</sup>*

*ε*\_ þ *k*<sup>4</sup> *k*<sup>3</sup> � sat *k*

� �

Let consider the following Lyapunov function:

<sup>1</sup> <sup>þ</sup> *<sup>k</sup>*4*ε*<sup>2</sup> <sup>þ</sup> <sup>2</sup>*P*2ðÞþ*<sup>t</sup> <sup>φ</sup>*<sup>2</sup> <sup>þ</sup> *<sup>σ</sup>*2*k*4*<sup>k</sup>*

where *P*2ð Þ*t* is a positive function which is chosen as follows:

ð*t*

0

*P*2ðÞ¼ *t P*2ð Þþ 0

presented in *Appendix C* with the following conditions:

*^* 1 � � � \_ *k ^* 1

� �

� �

8 < :

*Collaborative and Humanoid Robots*

ð*t*

0

*<sup>V</sup>*<sup>200</sup> <sup>¼</sup> <sup>0</sup>*:*<sup>5</sup> *<sup>k</sup>*5 max <sup>þ</sup> <sup>Δ</sup>\_

*h*

*^* 1 � � � \_ *k ^* 1

� �

� *ε*\_ þ ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> *ε* þ *k*<sup>3</sup> � sat *k*

*<sup>V</sup>*<sup>20</sup> <sup>¼</sup> <sup>0</sup>*:*5*φ*<sup>2</sup> <sup>þ</sup>

þ *V*<sup>200</sup>

*<sup>V</sup>*\_ <sup>20</sup> <sup>¼</sup> *<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

� �

≤ � j j *e*<sup>1</sup> *k*<sup>3</sup> � sat *k*

**E. Proof of Theorem 2**

2

*V*<sup>2</sup> ¼ 0*:*5 *k*3*k*4*e*

proven*.*■

**54**

A new positive function is studied.

*ε*\_ ¼ �ð Þ *k*<sup>2</sup> � *k*<sup>1</sup> *ε* � *k*<sup>3</sup> � sat *k*

*h*

*ε*\_*dτ* þ

þ *k*5 max þ Δ\_

The proof of *Lemma 1* can be reused for the positive function *V*<sup>20</sup> based on Eq. (D.3) and for its time derivative. Then, the time derivative of the new function is:

> *^* 1 � � � \_ *k ^* 1

> > *e*1

By employing the same discussion with *Lemma 1* under *Assumption 2, Lemma 2* is

*h*

*^*2

*<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

� �

� �

� �

The proof of the function *P*2ð Þ*t* can be satisfactory using the similar arguments

<sup>2</sup> þ *σ*3*k*4*k*

*h*

*φ*

*^*2 <sup>3</sup> þ *σ*4*k ^*2 <sup>4</sup> þ *σ*5*k ^*2 5

*k*4*k*1j j *e*<sup>1</sup> þ *k*<sup>5</sup> � Δ\_

� �

*h* � �j j *<sup>ε</sup>*ð Þ <sup>0</sup>

> *^* 1 þ Δ \_ *k ^* 1

*e*1ð Þþ *ε* � *k*1*e*<sup>1</sup> *k*4*εε*\_

*<sup>k</sup>*4*<sup>ε</sup>* <sup>þ</sup> *<sup>k</sup>*<sup>5</sup> sgn ð Þ� *<sup>e</sup>*<sup>1</sup> \_

� � � ð Þ *<sup>k</sup>*<sup>2</sup> � *<sup>k</sup>*<sup>1</sup> j j *<sup>ε</sup> <sup>k</sup>*4j j *<sup>ε</sup>* � *<sup>k</sup>*5 max � <sup>Δ</sup>\_

� �

� �

ð*t*

0

*^* 1 � �

� �

*k*<sup>4</sup> *k*<sup>3</sup> � sat *k*

� \_ *k ^* 1

> *^* 1 � �

� �

*e*<sup>1</sup> þ *φ:*

� \_ *k ^* 1

*e*1*e*\_1*dτ* þ

ð Þ *<sup>e</sup>*1ð Þ <sup>0</sup> <sup>2</sup>

*h*

ð*t*

0

(D.1)

*k*4*εε*\_*dτ*

(D.2)

(D.3)

*h*

(D.4)

(E.1)

*dτ*<sup>2</sup> (E.2)

� �

$$\begin{cases} P\_2(\mathbf{0}) = 2(\overline{k}\_5 + \Delta\_{\dot{h}})(\Delta\_{\dot{\epsilon}} + k\_{2\max}\Delta\_{\epsilon}) \\ \left(k\_3 + (k\_2 - k\_1)k\_1 - \text{sat}\left(\bar{k}\_1\right)\right)\_{\text{min}} > 0 \\ \overline{k}\_5 \ge \Delta\_{\dot{h}} \end{cases} \tag{E.3}$$

Substituting Eqs. (D.1) and (13) to the time derivative of the new Lyapunov function leads to.

$$\begin{split} \dot{V}\_{2} &= -\overline{k}\_{3}\overline{k}\_{4}k\_{1}e\_{1}^{2} - \left(\overline{k}\_{2} - k\_{1}\right)\overline{k}\_{4}e^{2} - \overline{k}\_{4}\sigma\_{1}(e\_{1}e)^{2} - \eta\_{2}\sigma\_{2}\overline{k}\_{4}\overline{k}\_{2}\text{sat}\left(\bar{k}\_{2}\right) \\ &- \eta\_{3}\sigma\_{3}\overline{k}\_{4}\overline{k}\_{3}\text{sat}\left(\bar{k}\_{3}\right) - \eta\_{4}\sigma\_{4}\overline{k}\_{4}\text{sat}\left(\bar{k}\_{4}\right) - \eta\_{5}\sigma\_{5}\overline{k}\_{5}\text{sat}\left(\bar{k}\_{5}\right) \end{split} \tag{E.4}$$

*Theorem 2* is proven by noting Eqs. (2), (D.1), (E.1), (E.4), *Assumptions 1* and *2*, and the discussions in the proof of *Theorem 1*. ■

### **F. Inverse Kinematics of the robot leg**

The desired angles of the leg joints (hip ð Þ *x*1*dh* and knee ð Þ *x*1*dk* ) can be calculated from the position of the foot (the end-effector) using the following inverse kinematics:

$$\begin{cases} \varkappa\_{1dh} = \mathfrak{atan2}(P\_{\ge}, P\_{\ge}) + \mathrm{arc}\left(\frac{P\_{\ge}^2 + P\_{\ge}^2 + l\_1^2 - l\_2^2}{2l\_1\sqrt{P\_{\ge}^2 + P\_{\ge}^2}}\right) \\\\ \varkappa\_{1dh} = \mathfrak{atan2}(P\_{\ge} - l\_1 \sin\left(\varkappa\_{1dh}\right), P\_{\ge} - l\_1 \cos\left(\varkappa\_{1dh}\right)) - \varkappa\_{1dh} \end{cases} \tag{E.5}$$

where *l*<sup>1</sup> ¼ 0*:*21m and *l*<sup>2</sup> ¼ 0*:*295m are the link lengths of robot (thigh and shank), respectively. *Px* and *Py* are the end-effector position of the robot foot with respect to the robot coordinate setting at the hip joint, as sketched in **Figure 2(b)**. The feasible working range of the hip joint was selected to be 0½ � ! þ80 deg*:*
