*Article* **Smooth-Switching Gain Based Adaptive Neural Network Control of n-Joint Manipulator with Multiple Constraints**

**Qing Yang 1,2, Haisheng Yu 1,2,\*, Xiangxiang Meng 1,2, Wenqian Yu <sup>3</sup> and Huan Yang <sup>4</sup>**


**Abstract:** Modeling errors, external loads and output constraints will affect the tracking control of the n-joint manipulator driven by the permanent magnet synchronous motor. To solve the above problems, the smooth-switching for backstepping gain control strategy based on the Barrier Lyapunov Function and adaptive neural network (BLF-ANBG) is proposed. First, the adaptive neural network method is established to approximate modeling errors, unknown loads and unenforced inputs. Then, the gain functions based on the error and error rate of change are designed, respectively. The two gain functions can respectively provide faster response speed and better tracking stability. The smoothswitching for backstepping gain strategy based on the Barrier Lyapunov Function is proposed to combine the advantages of both gain functions. According to the above strategy, the BLF-ANBG strategy is proposed, which not only solves the influence of multiple constraints, unknown loads and modeling errors, but also enables the manipulator system to have better dynamic and steady-state performances at the same time. Finally, the proposed controller is applied to a 2-DOF manipulator and compared with other commonly used methods. The simulation results show that the BLF-ANBG strategy has good tracking performance under multiple constraints and model errors.

**Keywords:** manipulator; multiple constraints; adaptive neural network; smooth-switching for gain; Barrier Lyapunov Function

#### **1. Introduction**

The manipulator has been widely used in various scenarios such as medical treatment, automobile production and metal processing due to its strong safety, high precision and high efficiency [1–3]. The permanent magnet synchronous motor (PMSM) has the characteristics of small size, low loss and large starting torque [4,5], which is often used as the drive motor for the servo control of the manipulator [6,7]. The manipulator system driven by PMSM is a multi-variable, nonlinear and strongly coupled system. Therefore, as the production requirements increase, the rapidity, accuracy and stability of manipulator tracking have always been a research hotspot.

For manipulator tracking control, many scholars have proposed different control strategies. Traditional control strategies such as proportional integral derivative (PID) control, feedback linearization control, sliding mode control (SMC), adaptive control and backstepping control are commonly used. Intelligent control methods such as fuzzy control and neural network control are also widely used. Shojaei, Pradhan, and Kim respectively used self-tuning PID control, second-order PID control and PD control to effectively improve the steady-state tracking performance of the manipulator [8–10]. Feng, Yeh, and Huang respectively designed non-singular fast terminal SMC strategy [11], output

**Citation:** Yang, Q.; Yu, H.; Meng, X.; Yu, W.; Yang, H. Smooth-Switching Gain Based Adaptive Neural Network Control of n-Joint Manipulator with Multiple Constraints. *Actuators* **2022**, *11*, 127. https://doi.org/10.3390/act11050127

Academic Editors: Marco Carricato and Edoardo Idà

Received: 1 February 2022 Accepted: 25 April 2022 Published: 29 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

feedback SMC strategy [12] and adaptive SMC strategy [13]. Each method optimizes the traditional SMC strategy, however, the chattering phenomenon still exists. Gabriele and Meng adopted the feedback linearization strategy [14,15], but this strategy requires an accurate mathematical model. In literature [16–18], adaptive control was designed to effectively estimate the uncertainty of the system. Kanellakopoulos proposed a recursionbased backstepping control [19], which was then widely used. Cheng and Farrell applied backstepping strategy to the control of the manipulator [20,21]. Chang, Yang and Song designed fuzzy backstepping, fuzzy adaptive and fuzzy command filter controllers to improve the stability of position tracking [22–24]. The neural network control has strong approximation ability, so it is used by many scholars to approximate the modeling errors and nonlinear terms [25–28].

The above methods have improved the dynamic and steady-state performances of manipulator tracking, respectively, however, it is difficult to guarantee better dynamic and steady-state performance at the same time. In addition, most of the existing strategies only consider the manipulator system and ignore the drive motor system, along with failing to consider the effects of multiple constraints, unknown loads and modeling errors at the same time. These problems often affect the safe and smooth operation of the manipulator in engineering practice. Many scholars have devised different solutions to these problems. Singh proposed the modeling concept of fractional calculus [29,30], and systematically described the fractional order model of the manipulator in the book [31]. The fractional order dynamic model can describe the system model more accurately. Meng and Liu adopted the coordination strategy of two controllers, combining the advantages of the two controllers to improve the dynamic and steady-state characteristics at the same time, but the use of two different controllers will increase the complexity of the control system [32,33]. Other studies [34–36] used the Barrier Lyapunov Function (BLF) to satisfy the output constraint problem. Sung and Cheng proposed a neural network strategy to approximate the model uncertainty [37,38]. Yang et al. designed a variable-gain backstepping strategy to improve the rapidity and stability of the controller [39–42].

In this paper, the smooth-switching for backstepping gain control strategy based on BLF and adaptive neural network (BLF-ANBG) is designed. Combined with the manipulator and the drive motor, the overall model of the manipulator control system is obtained. The adaptive radial basis function (RBF) neural networks are designed to approximate the modeling errors, unknown loads and unenforced inputs of the system. The gain function based on the error and the change rate of error is designed, and the Gaussian function is used as the switching function to design the method of smooth-switching for backstepping gain, which combines the advantages of the two gain functions. When the error is large, the gain function based on the error plays a major role, and the error is proportional to the gain, which shortens the rise time of the system. On the contrary, when the error is small, the gain function based on the change rate of error plays a major role, and the change rate of error is inversely proportional to the gain, which improves the stability of the steady-state of the system. The smooth-switching for backstepping gain controller is designed based on BLF (BLF-GSS) to realize the normal operation of the system under asymmetric or symmetric time-varying output limited. The BLF-ANBG strategy is proposed by combining the adaptive neural network strategy and the BLF-GSS strategy.

The main contents of this article are organized as follows. In Section 2, the overall model of the manipulator control system is provided by combining the manipulator system and the driven motor system. In Section 3, the BLF-ANBG controller based on an adaptive neural network and BLF-GSS is designed. In Section 4, the stability of the control strategy is proved by using the Lyapunov function [43]. In Section 5, the controller is applied to the 2-DOF manipulator, and the feasibility of the controller is verified by a simulation example. Some conclusions are summarized in Section 6.

#### **2. The Overall System Model of n-Joint Manipulator Driven by PMSM**

#### *2.1. The Model of n-Joint Manipulator System*

The system model of the n-joint manipulator considering the modeling error and unknown load is

$$\Delta\left(M(q) + \Delta M(q)\right)\ddot{q} + \left(\mathcal{C}(q,\dot{q}) + \Delta\mathcal{C}(q,\dot{q})\right)\dot{q} + \left(\mathcal{G}(q) + \Delta\mathcal{G}(q)\right) = \tau\_r - \tau\_\perp - \tau\_f - \Delta E \tag{1}$$

$$
\pi\_{\mathbb{L}} = J^{\mathbb{T}} F, \quad \pi\_{f} = \mathcal{R}\_{f} \dot{q} + F\_{c} \text{sgn}(\dot{q}) \tag{2}
$$

where *q* = [*q*1, ··· , *qn*] <sup>T</sup> represents the position of each joint. *<sup>M</sup>*(*q*) and *<sup>C</sup>*(*q*, *<sup>q</sup>*˙) ∈ *<sup>R</sup>n*×*<sup>n</sup>* are the positive-definite inertia matrix and Coriolis force matrix of the nominal model, respectively. *<sup>G</sup>*(*q*) ∈ *<sup>R</sup><sup>n</sup>* is the system gravity vector of the nominal model. *<sup>τ</sup>r*, *<sup>τ</sup><sup>L</sup>* ∈ *<sup>R</sup><sup>n</sup>* and *τ<sup>f</sup>* are respectively expressed as the output torque, load torque and friction torque of the manipulator system. Δ*M*(*q*), Δ*C*(*q*, *q*˙) and Δ*G*(*q*) are the modeling error. *J* and *F* are the Jacobian matrix and load force of the manipulator, respectively. *Rf* and *Fc* are the diagonal viscous friction and Coulomb friction matrix. Δ*E* is the interference signal caused by position measurement error and velocity measurement noise.

#### *2.2. The Model of Drive Motor System*

The mathematical model of PMSM with modeling errors in the *d* − *q* rotating coordinate system is described by

$$L\_q \frac{di\_q}{dt} = -n\_p \Phi \omega - n\_p B L\_d i\_d - R\_s i\_q + \mu\_q \tag{3}$$

$$L\_d \frac{di\_d}{dt} = -R\_s i\_d + \nu\_p B L\_q i\_q + \nu\_d \tag{4}$$

$$(J\_m + \Delta J\_m)\frac{d\omega}{dt} = \tau - \tau\_{mL} - R\_m\omega \tag{5}$$

$$\frac{d\theta}{dt} = \omega \tag{6}$$

$$\pi = n\_p \left[ (L\_d - L\_q) i\_d i\_q + \Phi i\_q \right] \tag{7}$$

where *<sup>θ</sup>*, *<sup>ω</sup>* ∈ *<sup>R</sup><sup>n</sup>* indicate the rotation angle and speed of the PMSM. *Ld*, *Lq* is the diagonal square matrix of *d* − *q* axis inductance. *B* = *diag*{*ω*1, ··· , *ωn*}, *ω<sup>i</sup>* represents the *i*th component of the speed. *id*, *iq* and *ud*, *uq* denote the *d* − *q* axis stator current and voltage vector. *np*, <sup>Φ</sup> and *Rm* ∈ *<sup>R</sup>n*×*<sup>n</sup>* are pole logarithm, magnetic flux and friction matrix of PMSM, respectively. *Jm* ∈ *<sup>R</sup>n*×*<sup>n</sup>* denote the diagonal inertia matrix of PMSM. *<sup>τ</sup>*, *<sup>τ</sup>mL* ∈ *<sup>R</sup><sup>n</sup>* are the vector of electromagnetic torque and motor load torque, respectively. Δ*Jm* denote the modeling error of PMSM.

*dθ*

**Assumption 1.** *The input current of PMSM is strictly three-phase symmetrical.*

**Assumption 2.** *The core saturation of PMSM can be ignored.*

**Property 1.** *The manipulator system and the drive system are connected by the transmission with the reduction ratio of μ* > 0*, that is q* = *μθ and τ<sup>r</sup>* = *μ*−1*τmL.*

#### *2.3. The Overall Model of the Manipulator Driven by PMSM*

According to (1)–(7), combined with the model of the manipulator system and the PMSM system, the dynamic model of the manipulator driven by PMSM with unknown load and modeling errors can expressed as

$$\Delta \bar{M}(q)\ddot{q} + \mathcal{C}(q,\dot{q})\dot{q} + \mathcal{G}(q) = \tau - \mu(\tau\_f + \tau\_\perp + \Delta E) - \mu(\Delta M(q)\ddot{q} + \Delta \mathcal{C}(q,\dot{q})\dot{q} + \Delta G(q)) - \mu^{-1}\Delta I\_m \ddot{q} \tag{8}$$

where *M*¯ (*q*) =*μM*(*q*)+*μ*−<sup>1</sup> *Jm*, *C*¯(*q*, *q*˙) =*μC*(*q*, *q*˙)+*μ*−1*Rm*, *G*¯(*q*) =*μG*(*q*)

Considering the input saturation of the drive motor in the project, the actual input of PMSM electromagnetic torque *<sup>τ</sup>s*(*t*)=[*τs*1(*t*), ··· , *<sup>τ</sup>sn*(*t*)]<sup>T</sup> is defined as

$$\tau\_{si}(t) = \begin{cases} \tau\_{i\text{\ max}} \, \prime & \tau\_i(t) \ge \tau\_{i\text{\ max}} \\ \tau\_i(t) \, \prime & \tau\_{i\text{\ min}} < \tau\_i(t) < \tau\_{i\text{\ max}} \\ \tau\_{i\text{\ min}} \, \prime & \tau\_i(t) \le \tau\_{i\text{\ min}} \end{cases} \tag{9}$$

where the subscript *i* denotes the *i* th element of the electromagnetic torque vector. *τ<sup>i</sup>* max, *τ<sup>i</sup>* min are the upper and lower limit values of the electromagnetic torque input to the drive motor, respectively. The part of the control signal that cannot be executed by PMSM can be expressed as

$$\tau\_{\rm rii}(t) = \tau\_{\rm i}(t) - \tau\_{\rm si}(t) = \begin{cases} \tau\_{\rm i}(t) - \tau\_{\rm i\\_max} & \tau\_{\rm i}(t) \ge \tau\_{\rm i\\_max} \\ 0 & \tau\_{\rm i\\_min} < \tau\_{\rm i}(t) < \tau\_{\rm i\\_max} \\ \tau\_{\rm i}(t) - \tau\_{\rm i\\_min} & \tau\_{\rm i}(t) \le \tau\_{\rm i\\_min} \end{cases} \tag{10}$$

Substituting (4) and (5), Equation (3) is rewritten as

$$\mathcal{M}(q)\ddot{q} + \mathcal{C}(q,\dot{q})\dot{q} + \mathcal{G}(q) = \mathfrak{r}\_s - \mu \mathfrak{r}\_f + f(\mu, \ \mathfrak{r}\_{n\prime} \ \mathfrak{r}\_{\mathbb{L}^\prime}, \ \mathfrak{q}, \dot{\mathfrak{q}}, \ddot{\mathfrak{q}}) \tag{11}$$

where *<sup>f</sup>*(*μ*, *<sup>τ</sup>n*, *<sup>τ</sup><sup>L</sup>* , *<sup>q</sup>*, *<sup>q</sup>*˙, *<sup>q</sup>*¨)=*τn*− *<sup>μ</sup>*(*τ<sup>L</sup>* + <sup>Δ</sup>*E*)−*μ*(Δ*M*(*q*)*q*¨+Δ*C*(*q*, *<sup>q</sup>*˙)*q*˙ + <sup>Δ</sup>*G*(*q*))−*μ*−1Δ*Jmq*¨, represents unknown modeling error, load and unexecuted input. For the convenience of the following application we use *f* instead of *f*(*μ*, *τn*, *τ<sup>L</sup>* , *q*, *q*˙, *q*¨). Define the state vector as *x*<sup>1</sup> = *q*, *x*<sup>2</sup> = *q*˙. The state equation of the manipulator system can be described as

$$
\dot{x}\_1 = x\_2 \tag{12}
$$

$$\dot{\mathbf{x}}\_2 = \bar{M}^{-1}(\mathbf{x}\_1)[-\bar{\mathsf{C}}(\mathbf{x}\_1, \mathbf{x}\_2)\mathbf{x}\_2 - \bar{\mathsf{G}}(\mathbf{x}\_1) + f + \tau\_s - \mu \tau\_f] \tag{13}$$

$$y = x\_1 \tag{14}$$

In the actual servo tracking of the robot arm, it is necessary to ensure that the output of each joint is bounded and can normally track the desired position signal.

**Assumption 3.** *There exist time-varying output upper and lower bounds yi* max(*t*) *and yi* min(*t*) ( *i* = 1, 2, ··· , *n*)*, such that yi* min(*t*) ≤ *yi*(*t*) ≤ *yi* max(*t*)*,* ∀*t* > 0*.*

**Assumption 4.** *There are functions ydi* min(*t*) *and ydi* max(*t*) *that satisfy the inequality yi* min(*t*) ≤ *ydi* min(*t*) *and ydi* max(*t*) ≤ *yi* max(*t*)*,* ∀*t* > 0*, so that the desired position satisfies ydi* min(*t*) ≤ *ydi*(*t*) ≤ *ydi* max(*t*)*.*

**Lemma 1** ([34])**.** *For any* <sup>|</sup>*ς*<sup>|</sup> <sup>&</sup>lt; <sup>1</sup>*, the inequality* log <sup>1</sup> <sup>1</sup>−*ς*<sup>2</sup> <sup>&</sup>lt; *<sup>ς</sup>*<sup>2</sup> <sup>1</sup>−*ς*<sup>2</sup> *is satisfied.*

#### **3. Design of Controller**

In this section, the structure and approximation process of the adaptive RBF neural network are described. Then, the smooth-switching for backstepping gain method is designed. Finally, the BLF-ANBG controller is designed.

#### *3.1. Design of Adaptive Neural Network Approximation*

To estimate modeling error, external load torque and unexecuted input, an adaptive RBF neural network strategy composed of an input layer, middle layer and output layer is designed. The structure of the adaptive RBF neural network is shown in Figure 1.

The middle layer is composed of five neurons, the output of each neuron is

$$h\_k = \exp\left(-\frac{\|z - c\_k\|^2}{b\_k^2}\right) \text{ ( $k = 1, \dots, 5$ )}\tag{15}$$

where *z* = [*e*1,*e*˙1] <sup>T</sup> is the input vector. *ck*, *bk* represent the center point vector and width of the *k* th neuron, respectively. The output of the adaptive RBF neural network is

$$\hat{f}(\cdot) = \mathcal{W}^{\text{T}} h(\mathbf{x}) \tag{16}$$

where *h*(*x*) = [*h*1, ··· , *h*5] T. *w*ˆ is the adaptive weight, and the adaptive law is described as

$$
\psi = \psi h z^{\mathrm{T}} P B \tag{17}
$$

where *ψ* > 0 is the constant gain. *B* represents the input matrix of the closed-loop system. *P* is the positive definite matrix, and there exists the matrix *Q* ≥ 0 such that *P* satisfies the stability equation *PA* + *<sup>A</sup>*T*<sup>P</sup>* = −*Q*, where *<sup>A</sup>* is the state matrix of the closed-loop system and the equations are given in Section 3.3. The adaptive neural network proposed in this paper recalculates the adaptive weights through the position error, velocity error of the manipulator and the output of the hidden layer of the adaptive neural network in each iteration to achieve the training of the neural network.

**Property 2.** *Given a continuous function f*(·)*, there is an ideal weight w*ˆ <sup>∗</sup>*, and the adaptive neural network approximation error <sup>γ</sup>* <sup>=</sup> *<sup>f</sup>*(·) <sup>−</sup> <sup>ˆ</sup> *f* <sup>∗</sup>(·) *satisfies* max*γ*- ≤ *γ*<sup>0</sup> *. γ*<sup>0</sup> *is the upper bound of error, and satisfies γ*<sup>0</sup> ≤ *ε, ε is a very small positive number.*

**Figure 1.** The structure of the Adaptive RBF Neural Network.

#### *3.2. Design of Smooth-Switching for Backstepping Gain*

The change in the control gain can produce the contradiction between the system dynamics characteristics and the steady-state characteristics. The larger the gain, the faster the response, the higher the accuracy, but the worse the stability [37,38]. The smaller the gain, the better the stability, but the response time will be longer and the accuracy will be lower. In addition, considering safety in engineering, the control gain is often within a certain range. In this part, a new smooth-switching for backstepping gain strategy is proposed, and the control gain is designed with the error surface and the change rate of the error surface, respectively.

#### 3.2.1. The Variable Control Gain of the Error

Define the error surface as *eij*, where the subscript represents the *j* th component of the *i* th error surface. The variable control gain designed with error is expressed as

$$
\Delta k\_{i\bar{j}}(c\_{i\bar{j}}) = \frac{2a\_{i\bar{j}}}{\pi} \arctan\left(\frac{c\_{i\bar{j}}}{\beta\_{i\bar{j}}}\right)^2 + \delta\_{i\bar{j}}\tag{18}
$$

where *αij* > 0 is the magnification of the gain designed with the error. *βij* > 0 is the scale parameter of variable gain. *δij* is a positive constant, ensure that Δ*kij*(*eij*) > 0, ∀*eij* ∈ *R*.

#### 3.2.2. The Variable Control Gain of the Change Rate of the Error

Take the derivative of the error surface *eij* to get *e*˙*ij*. The variable control gain designed with the change rate of error can be described as

$$
\Delta k\_{ij}(\dot{e}\_{ij}) = \delta\_{ij} - \frac{2\overline{\varepsilon}\_{ij}}{\pi} \arctan\left(\frac{\varepsilon\_{ij}}{\xi\_{ij}}\right)^2 \tag{19}
$$

where *ξij* > 0 is the magnification of the gain function designed based on the change rate of error. *ζij* is the positive scale parameter. *δij* > *ξij*, ensure that Δ*kij*(*e*˙*ij*) > 0, ∀*e*˙*ij* ∈ *R*.

3.2.3. Design of Smooth-Switching for Backstepping Gain

To solve the smoothness of the gain switching transition process, a smooth-switching function based on the error surface is designed as

$$f(e\_{ij}) = 1 - \exp\left(-\left(\frac{c\_{ij}}{\sigma\_{ij}}\right)^2\right) \tag{20}$$

where *σij* is the positive scale constant. The smooth-switching function curve with different values of *σij* are shown in Figure 2.

According to (18)–(20), the smooth-switching for backstepping gain strategy is designed as

$$
\Delta k\_{i\bar{j}} = f(\boldsymbol{\epsilon}\_{i\bar{j}}) \cdot \Delta k\_{i\bar{j}}(\boldsymbol{\epsilon}\_{i\bar{j}}) + [1 - f(\boldsymbol{\epsilon}\_{i\bar{j}})] \cdot \Delta k\_{i\bar{j}}(\boldsymbol{\epsilon}\_{i\bar{j}}) \tag{21}
$$

When the error is large, the control gain designed based on the error is mainly used. The greater the error, the greater the control gain, which ensures the rapid convergence of the system. When the error is small, the control gain designed by using the change rate of error is mainly used. The larger the change rate of error surface, the smaller the control gain. Thus, the jitter phenomenon caused by the large control gain of the manipulator system in the steady-state is reduced. When the error is in the middle range, the two gain functions transition in the form of smooth switching.

#### *3.3. Design of BLF-ANBG Controller*

To consider the time-varying asymmetric output limitation, the time-varying asymmetric BLF and adaptive neural network are used to design the smooth-switching for the backstepping gain controller. The block diagram of the manipulator system based on the BLF-ANBG controller is shown in Figure 3, and the design process is as follows

**Step (1)** Define the first tracking error surface vector as *e*<sup>1</sup> = *x*1−*xd* = [*e*11, ··· ,*e*1*n*] T, *xd* is the desired tracking position. The time-varying barrier of output is defined as

$$y\_{di}(t) = \mathbf{x}\_{di}(t) - y\_{i\min}(t) \tag{22}$$

$$y\_{bi}(t) = y\_{i\text{ max}}(t) - x\_{di}(t)\tag{23}$$

where *i* = 1, ··· , *n*, which means the *i*th component of the vector. Define the time-varying asymmetric output constraints BLF as

$$V\_1 = \sum\_{i=1}^{n} V\_{1i} = \sum\_{i=1}^{n} \left[ \frac{\lambda(c\_{1i})}{2} \log \frac{1}{1 - \varsigma\_{i+}^2(t)} + \frac{1 - \lambda(c\_{1i})}{2} \log \frac{1}{1 - \varsigma\_{i-}^2(t)} \right] \tag{24}$$

where

$$
\lambda(e\_{1i}) = \begin{cases} 1 & \text{if } e\_{1i} > 0 \\ 0 & \text{if } e\_{1i} \le 0 \end{cases} \tag{25}
$$

$$
\zeta\_{i\text{ }\min}(t) = \frac{\varepsilon\_{1i}}{y\_{ai}(t)'} \text{ } \zeta\_{i\text{ }\max}(t) = \frac{\varepsilon\_{1i}}{y\_{hi}(t)}\tag{26}
$$

Define the coordinate transformation as

$$
\zeta\_i(t) = (1 - \lambda(e\_{1i}))\zeta\_{i\text{ min}}(t) + \lambda(e\_{1i})\zeta\_{i\text{ max}}(t) \tag{27}
$$

Substituting (25) and (27) into (24), can obtain

$$V\_1 = \sum\_{i=1}^{n} V\_{1i} = \sum\_{i=1}^{n} \frac{1}{2} \log \frac{1}{1 - \varsigma\_i^2(t)}, \ |\varsigma\_i(t)| \le 1 \tag{28}$$

It can be obtained from (28) that when |*ςi*| ≤ 1, *V*<sup>1</sup> is positive definite. The differential of *V*<sup>1</sup> as

$$\begin{split} \dot{V}\_{1} = \sum\_{i=1}^{n} V\_{1i} = \sum\_{i=1}^{n} \left[ \frac{\lambda(e\_{li}) \varsigma\_{i\\_\text{max}}(t)}{y\_{li}(t)(1 - \varrho\_{i\\_\text{max}}^2(t))} (e\_{2i} + \chi\_{2di} - \dot{\chi}\_{di} - e\_{1i}\frac{y\_{li}(t)}{y\_{li}(t)}) \\ \qquad + \frac{(1 - \lambda(e\_{li})) \varsigma\_{i\\_\text{min}}(t)}{y\_{il}(t)(1 - \varrho\_{i\\_\text{min}}^2(t))} (e\_{2i} + \chi\_{2di} - \dot{\chi}\_{di} - e\_{1i}\frac{y\_{li}(t)}{y\_{li}(t)}) \right] \end{split} \tag{29}$$

where *x*2*di* is the *i*th component of the virtual control vector *x*2*d*, and the virtual control vector *x*2*<sup>d</sup>* is designed by using the backstepping method as

$$\mathbf{x}\_{2d} = - (\Delta k\_1 + \mathbb{k}\_1(t))c\_1 + \mathbb{x}\_d \tag{30}$$

$$
\Delta k\_{\bar{i}} = \operatorname{diag} \{ \Delta k\_{\bar{i}1\prime} \cdot \cdot \cdot \cdot \Delta k\_{\text{in}} \} \tag{31}
$$

$$
\bar{k}\_1(t) = \operatorname{diag} \{ \bar{k}\_{11}(t), \cdot, \cdot, \bar{k}\_{1n}(t) \} \tag{32}
$$

where ¯ *<sup>k</sup>*1*i*(*t*) = -*y*˙*ai*(*t*) *yai*(*t*) 2 + *y*˙*bi*(*t*) *ybi*(*t*) 2 + *a*, *a* > 0 is a constant to ensure that the derivative of *x*2*di* is bounded. Substituting (26) and (27) and (30)–(32) into (29) can be rewritten as

$$\dot{V}\_{1} = \sum\_{i=1}^{n} \dot{V}\_{1i} \le \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i} \varepsilon\_{i}^{2}}{1 - \varepsilon\_{i}^{2}} + \left( \frac{1 - \lambda(\varepsilon\_{1i})}{y\_{ii}^{2}(t) - \varepsilon\_{1i}^{2}} + \frac{\lambda(\varepsilon\_{1i})}{y\_{ii}^{2}(t) - \varepsilon\_{1i}^{2}} \right) \varepsilon\_{1i} \varepsilon\_{2i} \right] \tag{33}$$

**Figure 3.** The Block Diagram of the Manipulator System Based on the BLF-ANBG Controller.

**Step (2)** The second error surface vector is defined as *e*<sup>2</sup> = *x*<sup>2</sup> − *x*2*d*= [*e*21, ··· ,*e*2*n*] *T*. Define the stability function as *<sup>V</sup>*<sup>2</sup> <sup>=</sup> *<sup>n</sup>* ∑ *i*=1 *<sup>V</sup>*2*<sup>i</sup>* <sup>=</sup> *<sup>n</sup>* ∑ *i*=1 1 2 *e*2 2*i* . Substituting into (13), based on the backstepping control method, the actual control signal is selected as

$$\mathbf{x}\_{\mathfrak{s}} = \bar{M}(\mathbf{x}\_1)[-\Delta k\_2 \mathbf{e}\_2 + \dot{\mathbf{x}}\_{2d} - \eta \mathbf{e}\_1] + \bar{\mathcal{C}}(\mathbf{x}\_1, \mathbf{x}\_2)\mathbf{x}\_2 + \bar{\mathcal{G}}(\mathbf{x}\_1) + \mu \mathbf{r}\_{\mathfrak{f}} - \hat{\mathfrak{f}} \tag{34}$$

where *<sup>η</sup>* <sup>=</sup> *diag*, <sup>1</sup>−*λ*(*e*11) *y*2 *a*1(*t*)−*e*<sup>2</sup> 11 + *<sup>λ</sup>*(*e*11) *y*2 *b*1(*t*)−*e*<sup>2</sup> 11 , ··· , <sup>1</sup>−*λ*(*e*1*n*) *y*2 *an*(*t*)−*e*<sup>2</sup> 1*n* + *<sup>λ</sup>*(*e*1*n*) *y*2 *bn*(*t*)−*e*<sup>2</sup> 1*n* ., and <sup>ˆ</sup> *f* is the adaptive RBF neural network estimate of *f* . Substituting (30), Equation (34) can be rewritten as

$$\begin{aligned} \pi\_{\mathfrak{s}} &= \check{M}(\mathbf{x}\_{1}) \left[ \ddot{\mathbf{x}}\_{d} - \left( \Delta k\_{1} + \Delta k\_{2} + \bar{k}\_{1}(t) \right) \dot{e}\_{1} - \left[ \Delta k\_{2} \left( \Delta k\_{1} + \bar{k}\_{1}(t) \right) + \eta \right] e\_{1} \right] \\ &+ \mathbb{C}(\mathbf{x}\_{1}, \mathbf{x}\_{2}) \mathbf{x}\_{2} + \mathsf{G}(\mathbf{x}\_{1}) + \mu \tau\_{f} - f \end{aligned} \tag{35}$$

Substitute (35) into (11), subtracting *M*¯ (*x*1)*x*˙2 + *C*¯(*x*1, *x*2)*x*<sup>2</sup> + *G*¯(*x*1) from both sides, can get

$$\begin{aligned} \ddot{e}\_1 &+ \left(\Delta k\_1 + \Delta k\_2 + \ddot{k}\_1(t)\right)\dot{e}\_1 + \left[\Delta k\_2\left(\Delta k\_1 + \ddot{k}\_1(t)\right) + \eta\right]e\_1 = \ddot{M}^{-1}(\mathbf{x}\_1)\left(f - \hat{f}\right) \\ \ddot{e}\_1 &= \ddot{M}^{-1}(\mathbf{x}\_1)\left(f - \hat{f}^\* + \hat{f}^\* - \hat{f}\right) = \ddot{M}^{-1}(\mathbf{x}\_1)\left(\gamma - \ddot{w}^T h\right) \end{aligned} \tag{36}$$

where *w*˜ = *w*ˆ − *w*ˆ <sup>∗</sup>. Let *z* = [*e*1,*e*˙1] *<sup>T</sup>*, the closed-loop system equation is

$$dz = Az + B\left[\bar{M}^{-1}\left(\gamma - \bar{w}^T h\right)\right] \tag{37}$$

where *A* = 0*<sup>n</sup> In* −Δ*k*<sup>2</sup> Δ*k*1+¯ *k*1(*t*) <sup>−</sup>*<sup>η</sup>* <sup>−</sup>Δ*k*1−Δ*k*2−¯ *k*1(*t*) , *B* = 0 *In* . 0*<sup>n</sup>* and *In* represent *n* dimensional zero matrix and identity matrix, respectively.

#### **4. The Analysis of BLF-ANBG Controller**

In this section, the stability of the BLF-ANBG strategy is proved. Then, the manipulator joint output constraints are verified as not violated. Finally, the tracking error convergence is proved.

#### *4.1. Proof of BLF-ANBG Controller Stability*

The Lyapunov function of the BLF- ANBG controller is defined as

$$\begin{split} V &= V\_1 + V\_2 + \frac{1}{2} z^T P z + \frac{1}{2\tilde{\psi}} \|\psi\|^2 = \sum\_{i=1}^n \left[ \frac{\lambda(\epsilon\_{li})}{2} \log \frac{1}{1 - \varsigma\_{i\_+}^2(t)} \\ &+ \frac{1 - \lambda(\epsilon\_{li})}{2} \log \frac{1}{1 - \varsigma\_{i\_-}^2(t)} \right] + \sum\_{i=1}^n \frac{1}{2} e\_{2i}^2 + \frac{1}{2} z^T P z + \frac{1}{2\tilde{\psi}} \|\psi\|^2 \end{split} \tag{38}$$

where *w*˜ - = *tr*(*w*˜ <sup>T</sup>*w*˜) is the Frobenius norm of *w*˜, and also represents the trace of matrix *w*˜ <sup>T</sup>*w*˜. From (38), it can be known that *V* is positive definite. Taking the derivative of *w*˜ and substituting (17) into ˙*w*˜ can obtain

$$
\dot{w} = \dot{w} - \dot{w}^\* = \psi h z^T P B \tag{39}
$$

Taking the derivative of (38) can be known that

$$\begin{split} \mathcal{V} &\leq \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i}\varsigma\_{1i}^{2}}{1-\varsigma\_{1}^{2}} + \left( \frac{1-\lambda(e\_{1i})}{y\_{ii}^{2}(t)-e\_{1i}^{2}} + \frac{\lambda(e\_{1i})}{y\_{ii}^{2}(t)-e\_{1i}^{2}} \right) e\_{1i}e\_{2i} \right] \\ &+ \sum\_{i=1}^{n} \left[ -\Delta k\_{1i}\varepsilon\_{2i}^{2} - \left( \frac{1-\lambda(e\_{1i})}{y\_{ii}^{2}(t)-e\_{1i}^{2}} + \frac{\lambda(e\_{1i})}{y\_{ii}^{2}(t)-e\_{1i}^{2}} \right) e\_{1i}e\_{2i} \right] \\ &+ \frac{1}{2} \left[ z^{\mathsf{T}}P\dot{z} + z^{\mathsf{T}}Pz \right] + tr(\boldsymbol{\mathcal{B}}^{\mathsf{T}}Pz\boldsymbol{h}^{\mathsf{T}}\boldsymbol{\bar{w}}) \\ &= \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i}\varsigma\_{i}^{2}}{1-\varsigma\_{i}^{2}} - \Delta k\_{1i}e\_{2i}^{2} \right] + \frac{1}{2} \left[ z^{\mathsf{T}}P\dot{z} + z^{\mathsf{T}}P\dot{z} \right] + tr(\boldsymbol{\mathcal{B}}^{\mathsf{T}}Pz\boldsymbol{h}^{\mathsf{T}}\boldsymbol{\bar{w}}) \end{split} \tag{40}$$

Substituting (37) into (40), it becomes

$$\begin{aligned} \dot{V} \le \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i}\varepsilon\_i^2}{1 - \varepsilon\_i^2} - \Delta k\_{1i}\varepsilon\_{2i}^2 \right] + \frac{1}{2} \left[ z^T P A z + z^T P B \gamma - z^T P B \vec{w}^T h \right. \\ \left. + z^T A^T P z + \gamma^T B^T P z - h^T \vec{w} B^T P z \right] + tr (B^T P z h^T \vec{w}) \end{aligned} \tag{41}$$

Noting that *h*T*wB*˜ <sup>T</sup>*Pz* = *z*T*PBw*˜ <sup>T</sup>*h* = *tr*(*B*T*Pzh*T*w*˜) and *γ*T*B*T*Pz* = *z*T*PBγ* , (41) is rewritten as

$$\dot{V} \le \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i} z\_i^2}{1 - \varsigma\_i^2} - \Delta k\_{1i} e\_{2i}^2 \right] - \frac{1}{2} z^T Q z + \gamma^T B^T P z \tag{42}$$

Combining **Property 2** to get

$$\dot{V} \le \sum\_{i=1}^{n} \left[ -\frac{\Delta k\_{1i}\varepsilon\_i^2}{1 - \varepsilon\_i^2} - \Delta k\_{1i}\varepsilon\_{2i}^2 \right] - ||z|| \left[ \frac{1}{2}\lambda\_{\text{min}}(Q) ||z|| - ||\gamma\_0||\lambda\_{\text{max}}(P) \right] \tag{43}$$

where *λ*min(·) and *λ*max(·) represent the upper and lower bounds of the eigenvalues, respectively. From (43), it can be seen that all signals in the system are uniformly ultimately bounded (UUB) [44,45]. The system is semi-global and practically stable [46].

**Remark 1.** *To satisfy <sup>V</sup>*˙ <sup>≤</sup> <sup>0</sup>*, choose appropriate controller parameters such that z*- <sup>≥</sup> <sup>2</sup>*γ*0*λ*max(*P*) *<sup>λ</sup>*min(*Q*) *. In this paper, the appropriate eigenvalues of Q are selected to satisfy the above conditions to make the system asymptotically converge to the small neighborhood of the origin. When the approximation error γ tends to 0, the system asymptotically converges to the origin.*

#### *4.2. Proof That the Manipulator Joint Outputs Constraints Are Not Violated*

From (27), it can be obtained that when *e*1*<sup>i</sup>* < 0, which yields *ςi*(*t*) = *ς<sup>i</sup>* min(*t*), and because |*ςi*| ≤ 1 and *yai*(*t*) > 0, according to (26) can be known that −1 < *ς<sup>i</sup>* min(*t*) ≤ 0, then −*yai*(*t*) < *e*1*i*(*t*) ≤ 0. Similarly, when *e*1*<sup>i</sup>* ≥ 0, 0 ≤ *e*1*i*(*t*) < *ybi*(*t*) can be obtained. In conclusion, that

$$-y\_{di}(t) \prec c\_{1i}(t) \prec y\_{bi}(t), \ |\varsigma\_i(t)| < 1\tag{44}$$

Adding *xdi*(*t*) to each term in the inequality, (45) can be rewritten as

$$-y\_{di}(t) + x\_{di}(t) < e\_{1i}(t) + x\_{di}(t) < y\_{bi}(t) + x\_{di}(t), \ |\varrho\_i(t)| < 1\tag{45}$$

So *yi* min(*t*) < *y*(*t*) < *yi* max(*t*), each joint is within the given constraints.

#### *4.3. Proof of Tracking Error Convergence*

According to **Lemma 1** and (38), *<sup>V</sup>*(*t*) <sup>≤</sup> *<sup>V</sup>*(0)*e*−*ρ<sup>t</sup>* , *t* ≥ 0 can be obtained [34,47], where *ρ* = min 2Δ*k*1*j*, 2Δ*k*2*<sup>j</sup>* , *j* = 1, ··· , *n*. It can be obtained that

$$
\sigma\_2^1 \log \frac{1}{1 - \varsigma\_i^2(t)} \le V(0)e^{-\rho t} \tag{46}
$$

Hence,

$$
\sigma\_i^2(t) \le 1 - e^{-2V(0)e^{-\rho t}} \tag{47}
$$

When *<sup>e</sup>*1*<sup>i</sup>* <sup>≤</sup> 0, *<sup>ς</sup>i*(*t*) =*ς<sup>i</sup>* min(*t*) = *<sup>e</sup>*1*<sup>i</sup> yai*(*t*),−*yai*(*t*) <sup>1</sup>−*e*−2*V*(0)*e*−*ρ<sup>t</sup>* <sup>≤</sup> *<sup>e</sup>*1*<sup>i</sup>* <sup>≤</sup> 0. When *<sup>e</sup>*1*<sup>i</sup>* <sup>&</sup>gt; 0, *<sup>ς</sup>i*(*t*) = *<sup>ς</sup><sup>i</sup>* max(*t*) = *<sup>e</sup>*1*<sup>i</sup> ybi*(*t*), <sup>0</sup> <sup>&</sup>lt; *<sup>e</sup>*1*<sup>i</sup>* <sup>≤</sup> *ybi*(*t*) <sup>1</sup> <sup>−</sup> *<sup>e</sup>*−2*V*(0)*e*−*ρ<sup>t</sup>* . Combining both cases, can conclude that

$$-y\_{ai}(t)\sqrt{1-e^{-2V(0)e^{-\rho t}}} \le e\_{1i} \le y\_{bi}(t)\sqrt{1-e^{-2V(0)e^{-\rho t}}}\tag{48}$$

where

$$\lim\_{t \to \infty} \left( -y\_{ai}(t)\sqrt{1 - e^{-2V(0)e^{-pt}}} \right) = 0 \tag{49}$$

$$\lim\_{t \to \infty} \left( y\_{bi}(t) \sqrt{1 - e^{-2V(0)e^{-pt}}} \right) = 0 \tag{50}$$

From (49) and (50), the upper and lower bounds of *e*1*<sup>i</sup>* converge to 0, so *e*1*<sup>i</sup>* converges to 0.

#### **5. Simulink Results and Analysis**

In this section, the BLF-ANBG control strategy is applied to a 2-DOF manipulator for simulation experiments to verify the feasibility of the strategy. The simulation experiment is divided into three parts. First, to verify the effectiveness of the smooth-switching for the backstepping control method, it is compared with the two variable gains functions without the smooth-switching strategy. Second, the BLF-ANBG strategy is used to control the manipulator to track the unit-step and periodic signals without modeling error and unknown load, and compare with other commonly used control strategies. Finally, the BLF-ANBG strategy is compared with the commonly used strategies in the presence of modeling errors and unknown loads. The parameters of the manipulator system in all simulation experiments in this section are shown in Table 1.

**Table 1.** The parameters of the manipulator system.


The dynamics model of the 2-DOF manipulator system can be described as (8), where the inertia matrix *M*(*q*), Coriolis force matrix *C*(*q*, *q*˙) and gravity matrix *G*(*q*) can be defined as

$$M(q) = \begin{bmatrix} M\_{11} & M\_{12} \\ M\_{21} & M\_{22} \end{bmatrix}, \; \mathcal{C}(q, \; \dot{q}) = \begin{bmatrix} \mathcal{C}\_{11} & \mathcal{C}\_{12} \\ \mathcal{C}\_{21} & \mathcal{C}\_{22} \end{bmatrix}, \; \mathcal{G}(q) = \begin{bmatrix} \mathcal{G}\_{1} \\ \mathcal{G}\_{2} \end{bmatrix}$$

where

$$\begin{cases} M\_{11} = m\_1l\_1^2 + m\_2l\_1^2 + m\_2l\_2^2 + 2m\_2l\_1l\_2\cos q\_2\\ M\_{12} = M\_{21} = m\_2l\_2^2 + m\_2l\_1l\_2\cos q\_2\\ M\_{22} = m\_2l\_2^2\\ C\_{11} = -m\_2l\_1l\_2q\_1\sin q\_2\\ C\_{12} = -m\_2l\_1l\_2q\_1\sin q\_2 - -m\_2l\_1l\_2q\_2\sin q\_2\\ C\_{21} = m\_2l\_1l\_2q\_1\sin q\_2\\ C\_{22} = 0\\ G\_1 = m\_1l\_1\mathcal{g}\cos q\_1 + m\_2l\_1\mathcal{g}\cos q\_1 + m\_2l\_2\mathcal{g}\cos(q\_1 + q\_2)\\ G\_2 = m\_2l\_2\mathcal{g}\cos(q\_1 + q\_2) \end{cases} \tag{51}$$

The parameters of the BLF-ANBG controller are described in Table 2.


**Table 2.** The parameters of controller.

From Table 2, 0 < *βij* < 1, 0 < *ζij* < 1, the values of *βij* and *ζij* are obtained by trial and error within an appropriate range. When *βij* and *ζij* are larger, the dynamic response of the system is faster, and when *βij* and *ζij* are smaller, the transition process is smoother. If *αij* is larger, the upper bound of the variable gain function of the error is larger, and the systems response is faster, which can be appropriately increased on the premise of ensuring the safety of the system. *δij* is the lower and upper bounds of the two gain functions, and *δij* > *ξij* ensures that the system is stable. *Q* can be appropriately increased to enhance the system convergence effect.

#### *5.1. Simulation Comparison Results of Smooth-Switching for Backstepping Gain Strategy*

In this part, the manipulator system uses the smooth-switching for backstepping gain strategy to track the unit-step signal, and compares it with two variable gain functions without the smooth-switching strategy. The initial position of each joint of the manipulator system is *q*(0) = [0, 0] T, the execution saturation is <sup>±</sup><sup>20</sup> N·m, and the output constraints of each joint are *yi* min <sup>=</sup> <sup>−</sup>0.3 <sup>+</sup> 0.1 sin(0.8*<sup>t</sup>* <sup>+</sup> *<sup>π</sup>* <sup>3</sup> ), *yi* max <sup>=</sup> 1.3 <sup>+</sup> 0.2 sin(0.5*<sup>t</sup>* <sup>+</sup> *<sup>π</sup>* <sup>2</sup> ). The tracking and error curves for the unit-step signal are provided in Figure 4.

As can be seen from Figure 4, using only the gain function based on the error has a faster response speed and can reach the steady-state faster, but there will be overshoot, and large jitter will occur after reaching the steady state. Using only the gain function based on the change rate of error can improve steady-state performance but has a long response time. The smooth-switching for backstepping gain strategy combines the advantages of two gain functions and can have good dynamic and steady-state performances at the same time.

**Figure 4.** The unit-step tracking curves compared to two variable gain functions.

#### *5.2. Without Modeling Error and Unknown Load*

In this part, the manipulator tracks the unit-step signal and the expected periodic signal *qd* = 0.8*sin*(0.5*t* + *<sup>π</sup>* <sup>2</sup> ), 0.9*sin*(0.8*<sup>t</sup>* <sup>+</sup> *<sup>π</sup>* 3 ) <sup>T</sup> without modeling error and load, respectively. The input torque saturation of each joint is ±20 N·m. The joint constraints that track the unit-step signal are *yi* min <sup>=</sup> <sup>−</sup>0.3+0.1 sin(0.8*t*<sup>+</sup> *<sup>π</sup>* <sup>3</sup> ), *yi* max <sup>=</sup> 1.3+0.2 sin(0.5*t*<sup>+</sup> *<sup>π</sup>* <sup>2</sup> ). The joint constraints that track the periodic signal signal are *yi* min <sup>=</sup> <sup>−</sup>1.1 <sup>+</sup> 0.1 sin(0.6*t*<sup>+</sup> *<sup>π</sup>* 3 ), *yi* max = 1.2 + 0.2 sin(0.5*t*). The proposed BLF-ANBG strategy is compared with the conventional backstepping strategy under large gain and small gain. The tracking and error curves for the unit-step signal and periodic signal are as shown in Figures 5 and 6. The dynamic performance and steady-state performance of the tracking two signals are as shown in Table 3.

**Figure 5.** The unit-step tracking curves compared to traditional backstepping.

**Figure 6.** The periodic signal tracking curves compared to traditional backstepping.


**Table 3.** The rise time and error range compared to traditional backstepping.

From these figures and tables, it is easy to see that the joint outputs are all within the given constraints. The fixed gain of the traditional backstepping strategy without smooth-switching for gain can affect the performance of the system tracking. When the gain is large, although the system reaches the steady state in 0.1525 s and the accuracy is high, the system has a large jitter in the steady state, and the jitter range is 0.032 rad. When the gain is small, the jitter range is 0.0002 rad, which is smaller than that when the gain is large, but the system reaches the steady state at 0.6712 s and the accuracy is low. Therefore, the value of the backstepping gain will cause the contradiction between the dynamic characteristics and the steady-state characteristics of the system. When the BLF- ANBG strategy is applied, this contradiction can be effectively solved, the system can quickly reach the steady state and have better steady-state performance.

Secondly, the feasibility of this strategy is verified by comparing two commonly used SMC strategies and PD gravity compensation strategies. The tracking and error curves of the unit-step signal and periodic signal of the three strategies are presented in Figures 7 and 8, respectively. The tracking performances are shown in Table 4.

**Figure 7.** The unit-step signal tracking and error curves of the three strategies.

**Figure 8.** The expected periodic signal tracking and error curves of the three strategies.

**Table 4.** The rise time and error range without modeling error and load.


It can be seen from Figures 7 and 8 and Table 4 that the SMC can quickly reach the steady-state when tracking the unit-step signal and the periodic signal, but the chattering phenomenon occurs, and the jitter range of each joint is 0.004 rad and 0.0046 rad. The jitter of the PD gravity compensation strategy is obviously reduced, yet the tracking accuracy is poor, and the tracking error is ±0.0067 rad. Compared with these two strategies, BLF-ANBG has better tracking accuracy and stability, and can reach steady state faster.

#### *5.3. With Modeling Error and Unknown Load*

In this part, time-varying modeling errors and time-varying unknown loads are added to simulate the tracking effect of the manipulator in practical engineering applications. The controller parameters are the same as in Table 2. The parameters of modeling error and unknown load are described in Table 5.


**Table 5.** The parameters of modeling error and unknown load.

To verify the performance of the BLF-ANBG strategy, the BLF-GSS strategy, the SMC strategy and the PD gravity compensation strategy are used for comparison. The initial position of the joint is 0. The approximation curves of the adaptive neural network strategy are shown in Figure 9.

**Figure 9.** The approximation curves for the unit-step signal and expected periodic signal.

Figure 9 clearly shows that although the adaptive neural network has large approximation error in the initial stage, it can effectively approximate the modeling error and unknown load within 2 s. The tracking result and error curves of the unit-step signal are given in Figure 10, the tracking result and error curves of the expected periodic signal are provided in Figure 11. The controller performance is shown in Table 6.

According to Figures 10 and 11 and Table 6, it can be known that modeling errors and unknown loads have an impact on the tracking accuracy of the manipulator. In the absence of adaptive neural network compensation, the BLF-GSS strategy, the SMC strategy and the PD gravity compensation strategy all generate large tracking errors; the maximum tracking errors of the three strategies are ±0.0007 rad, ±0.0022 rad, ±0.0054 rad. The BLF-ANBG strategy can effectively reduce the modeling error and the influence of unknown loads, and can cause each joint to reach the steady-state within 0.156 s; the steady-state accuracy is also high. At the same time, the joints are all within the given constraints.

**Figure 11.** The expected periodic signal tracking and error curves of the four strategies.

**Table 6.** The tracking performance with modeling error and load.


Summarizing the above results, the strategy proposed in this article can track the desired position signal quickly and stably in the presence of modeling errors and unknown loads. The contradiction between dynamic and steady-state caused by backstepping method gain is significantly improved.

#### **6. Conclusions**

This article presents a new tracking control strategy to solve the contradiction between the dynamic and steady-state characteristic caused by the control gain of the manipulator when there are uncertain interference terms. In this work, an overall model of the manipulator driven by PMSM with multiple constraints, modeling errors, and unknown loads is established. The proposed BLF-ANBG control strategy is applied to the 2-DOF manipulator. The simulation comparison shows that the proposed control strategy can effectively improve the contradiction between the dynamic and the steady-state performances of the system, and make the system take into account both excellent dynamic and steady-state characteristics. Additionally, the strategy effectively compensates for model errors, external disturbances and actuator saturation, while limiting the output of the system within the time-varying asymmetric constraint, which is more suitable for practical engineering needs. In actual engineering, the state of the speed and acceleration of the manipulator will also be constrained. In the future work, we will work hard to solve the problem of the full-state constraints of the manipulator system.

**Author Contributions:** Conceptualization, H.Y. (Haisheng Yu) and Q.Y.; methodology, Q.Y.; software, Q.Y.; validation, X.M., W.Y. and H.Y. (Huan Yang); formal analysis, Q.Y.; investigation, Q.Y.; resources, H.Y. (Haisheng Yu); data curation, X.M.; writing—original draft preparation, Q.Y.; writing—review and editing, X.M.; visualization, W.Y. and H.Y. (Huan Yang); supervision, H.Y. (Huan Yang); project administration, H.Y. (Haisheng Yu); funding acquisition, H.Y. (Haisheng Yu). All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the National Natural Science Foundation of China with grant number 61573203 and the Shandong Province Natural Science Foundation with grant number ZR2021MF005.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **References**

