*Communication* **A Finite-Time Trajectory-Tracking Method for State-Constrained Flexible Manipulators Based on Improved Back-Stepping Control**

**Yiwei Zhang 1,\*, Min Zhang 2, Caixia Fan <sup>1</sup> and Fuqiang Li <sup>1</sup>**


**Abstract:** In order to solve the trajectory-tracking-control problem of the state-constrained flexible manipulator systems, a finite-time back-stepping control method based on command filtering is presented in this paper. Considering that the virtual signal requires integration in each step, which will lead to high computational complexity in the traditional back-stepping, the finite-time command filter is used to filter the virtual signal and to obtain the intermediate signal in finite time, to thus reduce the computational complexity. The compensation mechanism is used to eliminate the error generated by the command filter. Furthermore, the adaptive estimation method is introduced to approach the uncertainty of the state-constrained flexible manipulator system. Then, the Lyapunov function is used to prove that the tracking error of the system can be stabilized in a sufficiently small origin neighborhood within a finite time. The simulation of a single rod flexible manipulator system demonstrates the effect of the proposed approach.

**Keywords:** flexible manipulator; state-constrained; finite-time control; back-stepping control

**Citation:** Zhang, Y.; Zhang, M.; Fan, C.; Li, F. A Finite-Time Trajectory-Tracking Method for State-Constrained Flexible Manipulators Based on Improved Back-Stepping Control. *Actuators* **2022**, *11*, 139. https://doi.org/ 10.3390/act11050139

Academic Editors: Marco Carricato and Edoardo Idà

Received: 24 April 2022 Accepted: 16 May 2022 Published: 19 May 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/).

#### **1. Introduction**

Due to the advantages of light weight, low power consumption, low cost and large payloads, flexible manipulators have been widely used in important fields, such as intelligent manufacturing, microsurgery and space operations [1–4].

A dynamic model of a flexible-joint manipulator system has the characteristics of nonlinearity, strong coupling and time variability. The design of its controller has always been a challenging problem. In recent years, many control methods have been applied to control manipulator systems, such as PID control, adaptive control, robust control, vibration control, fuzzy control and collaborative control [5–10]. Reference [5] proposed an adaptive sliding-mode control for uncertain single link flexible manipulator system; however, this controller does not deal with the chattering problem well.

Compared with sliding-mode control, the back-stepping control method overcomes this disadvantage, and thus the back-stepping controller design method is widely used in high-order nonlinear flexible manipulator system. In reference [7], the back-stepping method is applied to the controller design of a flexible manipulator system; however, the virtual control signal needs integration in each step of operation, which increases the computational complexity of the system. The dynamic surface control is introduced in reference [8–10] to reduce the computational complexity of the system by using a first-order filter but does not consider the filtering error caused by the introduction of filter, which reduces the tracking effect of a closed-loop system.

In addition, considering that the system is often subject to various restrictions in the actual operation process (such as saturation, physical restrictions, etc.) if the system state exceeds the given limit range, it will reduce the control effect and even lead to system instability. Therefore, how to design a controller to control the input and output of the system within the desired range should be considered. In order to control the system state within the desired range, the literature [11,12] has applied the barrier Lyapunov function to the nonlinear system; however, they did not consider the application of this control method in the manipulator system.

References [13–18] applied the barrier Lyapunov function to a manipulator system with limited output, and reference [19] further applied it to an n-order rigid manipulator system with full state constraints; however, the references [13–19] did not consider the flexibility in the actual manipulator system, and the design of the controller is based on the traditional back-stepping method, which requires a large amount of calculation. It was also indicated that the convergence speed of the system has not been considered in the literature [13–19], which will limit the control effect of the actual system.

At the same time, fast convergence, rapid response and good robustness are very important for the manipulator control system, and the finite-time control is very effective to improve these performances. Reference [20] applied finite-time control to the tracking control of a spacecraft system. Reference [21] applied finite-time control to the manipulator system with terminal sliding mode but ignores the flexibility of the manipulator system. Reference [22] studied the application of finite-time control based on a neural network with a flexible manipulator but does not consider the condition of limited state. Reference [23] applied adaptive command filtering control to nonlinear systems with full state constraints, without considering finite-time control.

At present, the problem of finite-time trajectory-tracking control of flexible manipulators with limited states has not been well solved. Aiming at this problem, a trajectorytracking control algorithm based on the barrier Lyapunov function and the command filter back-stepping control method is proposed in this paper, which can achieve finite-time convergence and solves the trajectory-tracking problem of the state-constrained flexible manipulator system.

Compared with dynamic surface control and traditional back-stepping control, the method designed in this paper not only eliminates the computational complexity by designing the finite-time command filter in the process of establishing the finite-time virtual control function but also designs the finite-time error-compensation mechanism to eliminate the error in the filtering process, and verifies the finite-time convergence of the closed-loop system by Lyapunov function.

This paper is divided into five sections. The next section introduces the dynamic model of flexible manipulators and the problem statement. Designs of the command filter back-stepping controller for the flexible manipulator system are given in Section 3. Simulation results is provided in Section 4, followed by a brief conclusion in Section 5.

#### **2. Preliminaries**

*2.1. Dynamic Model of Flexible Manipulator*

The flexible-joint model of a manipulator is shown in Figure 1.

**Figure 1.** The flexible-joint model of a manipulator.

The dynamic model of flexible manipulators studied in this paper is as follows.

$$\begin{cases} M(q)\ddot{q} + \mathcal{C}\left(q, \dot{q}\right)\dot{q} + F\left(\dot{q}\right) = K(q\_m - q) \\\ J\ddot{q}\_m + B\dot{q}\_m + K(q\_m - q) = \tau \end{cases} \tag{1}$$

where *<sup>q</sup>* <sup>∈</sup> <sup>R</sup>*n*, . *<sup>q</sup>* <sup>∈</sup> <sup>R</sup>*n*, .. *<sup>q</sup>* <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* are the joint position, velocity and acceleration, respectively. *<sup>M</sup>*(*q*) <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* is a symmetric positive definite inertia matrix, and *<sup>C</sup> q*, . *q* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* is the Coriolis matrix. *<sup>F</sup>* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* is the joint friction coefficient matrix. *qm* <sup>∈</sup> <sup>R</sup>*n*, . *qm* <sup>∈</sup> <sup>R</sup>*n*, .. *qm* <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* are the position, velocity and acceleration of the motor rotor angle, respectively. *<sup>K</sup>* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* represents the flexibility of the model joints. *<sup>J</sup>* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* represents the inertia term of the model, *<sup>B</sup>* <sup>∈</sup> <sup>R</sup>*n*×*<sup>n</sup>* represents the damping term of the model joints, *<sup>τ</sup>* <sup>∈</sup> <sup>R</sup>*<sup>n</sup>* is the control input vector of the system. The dynamic model satisfies the following properties [24].

**Property 1.** *M*(*q*) is a symmetric positive definite matrix, *M*−1(*q*) is bounded, and *Mh* ≤ -*M*(*q*)-<sup>2</sup> ≤ *MH*, where *Mh* and *MH* are normal numbers.

**Property 2.** *<sup>M</sup>*−1(*q*)*<sup>K</sup>* is bounded, and -*<sup>M</sup>*−1(*q*)*K*-<sup>2</sup> ≤ *ρ*, where *ρ* is a constant and satisfies *ρ* > 0.

Let *q* = *x*1, . *q* = *x*2, *qm* = *x*3, . *qm* = *x*4, and then system (1) is equivalently transformed into .

$$\begin{cases}
\dot{\mathbf{x}}\_1 = \mathbf{x}\_2 \\
\dot{\mathbf{x}}\_2 = M^{-1}(\mathbf{x}\_1)[-\mathbb{C}(\mathbf{x}\_1, \mathbf{x}\_2)\mathbf{x}\_2 - F(\mathbf{x}\_2) - K(\mathbf{x}\_1 - \mathbf{x}\_3)] \\
\dot{\mathbf{x}}\_3 = \mathbf{x}\_4 \\
\dot{\mathbf{x}}\_4 = J^{-1}[-B\mathbf{x}\_4 - K(\mathbf{x}\_3 - \mathbf{x}\_1) + \tau]
\end{cases} \tag{2}$$

where *xi* = [*xi*,1, *xi*,2, ··· , *xi*,*n*],(*i* = 1, 2, 3, 4) is the state variable of the system, and *τ* is the control input of the system. The state variable of the system satisfies the following assumption

$$|x\_i| \le k\_i, k\_i > 0, i = (1, 2, 3, 4) \tag{3}$$

Furthermore, we define the desired trajectory *xd* = [*xd*,1, *xd*,2, ··· , *xd*,*n*] *<sup>T</sup>* <sup>∈</sup> <sup>R</sup>*n*, where *xd* and . *xd* are continuous and bounded.

#### *2.2. Problem Statement*

Design a nonlinear trajectory-tracking control strategy for the above state-constrained flexible manipulator system (1) to ensure that the joint position of the flexible manipulator *q* tracks the desired trajectory *qd*. The tracking error can converge to a neighborhood near zero, that is, ∀*β* > 0, ∃*t*<sup>0</sup> ≥ 0, when *t* > *t*0, there exists |*q* − *qd*| < *β*, and all state variables of the closed-loop system are continuously stable and bounded.

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

#### *3.1. Error Compensation*

According to the trajectory-tracking task in the problem description, the tracking error signal in the virtual control signal is defined as

$$\begin{cases} z\_1 = \mathbf{x}\_1 - \mathbf{x}\_d \\ z\_2 = \mathbf{x}\_2 - \phi\_2 \\ z\_3 = \mathbf{x}\_3 - \phi\_3 \\ z\_4 = \mathbf{x}\_4 - \phi\_4 \end{cases} \tag{4}$$

where *φi*+<sup>1</sup> = [*φi*,1,1, *φi*,2,1, ··· , *φi*,*n*,1] *<sup>T</sup>*, *i* = (1, 2, 3), which is output by the following command filter ⎧ .

$$\begin{cases} \begin{aligned} \phi\_{i,s,1} &= l\_{i,s,1} \\ l\_{i,s,1} &= -\lambda\_{i,s,1} |\phi\_{i,s,1} - a\_{i,s}|^{1/2} \text{sign}(\phi\_{i,s,1} - a\_{i,s}) + \phi\_{i,s,2} \\ \dot{\phi}\_{i,s,2} &= -\lambda\_{i,s,2} \text{sign}(\phi\_{i,s,2} - \dot{\phi}\_{i,s,1}) \end{aligned} \tag{5}$$

where *φi*,*n*,1 is the state of the *n*th command filter in *i*th step, *λi*,*s*,1 and *λi*,*s*,2 are all positive numbers, and the virtual control function *αi*,*<sup>s</sup>* is the input of the command filter.

Note that, in order to ensure that the system state converges in a finite time, the filtering error of the command filter satisfies lim *t*→*T*<sup>1</sup> *φ*<sup>2</sup> − *α*1- ≤ *ω*1, lim *t*→*T*<sup>2</sup> *φ*<sup>3</sup> − *α*2- ≤ *ω*2, lim *t*→*T*<sup>3</sup> *φ*<sup>4</sup> − *α*3- ≤ *ω*3, where *ω*1, *ω*<sup>2</sup> and *ω*<sup>3</sup> are all positive numbers, *T*1, *T*<sup>2</sup> and *T*<sup>3</sup> are the convergence times of the command filter used for the first step, the second step and the third step, respectively.

In order to reduce the error existing between the virtual control signal and the finitetime command filter output signal, the error-compensation mechanism is constructed as follows

$$\begin{cases} \dot{\boldsymbol{\upsilon}}\_{1} = -p\_{1}\boldsymbol{\upsilon}\_{1} + \boldsymbol{\upsilon}\_{2} + (\boldsymbol{\phi}\_{2} - \boldsymbol{\alpha}\_{1}) - \left[q\_{1,1}\operatorname{sign}(\boldsymbol{\upsilon}\_{1,1}), \boldsymbol{\upsilon}\_{1}, \boldsymbol{\upsilon}\_{1}\operatorname{sign}(\boldsymbol{\upsilon}\_{1,n})\right]^{T} \\ \dot{\boldsymbol{\upsilon}}\_{2} = -p\_{2}\boldsymbol{\upsilon}\_{2} + (\boldsymbol{\phi}\_{3} - \boldsymbol{\alpha}\_{2}) - \boldsymbol{\upsilon}\_{1} + \boldsymbol{\upsilon}\_{3} - \left[q\_{2,1}\operatorname{sign}(\boldsymbol{\upsilon}\_{2,1}), \boldsymbol{\upsilon}\_{1}, \boldsymbol{\upsilon}\_{2,n}\operatorname{sign}(\boldsymbol{\upsilon}\_{2,n})\right]^{T} \\ \dot{\boldsymbol{\upsilon}}\_{3} = -p\_{3}\boldsymbol{\upsilon}\_{3} + \boldsymbol{\upsilon}\_{4} + (\boldsymbol{\phi}\_{4} - \boldsymbol{\alpha}\_{3}) - \left[q\_{3,1}\operatorname{sign}(\boldsymbol{\upsilon}\_{3,1}), \boldsymbol{\upsilon}\_{1}, \boldsymbol{\upsilon}\_{4}, \operatorname{sign}(\boldsymbol{\upsilon}\_{3,n})\right]^{T} \\ \dot{\boldsymbol{\upsilon}}\_{4} = -p\_{4}\boldsymbol{\upsilon}\_{4} - \boldsymbol{\upsilon}\_{3} - \left[q\_{4,1}\operatorname{sign}(\boldsymbol{\upsilon}\_{4,1}), \boldsymbol{\upsilon}\_{1}, \boldsymbol{\upsilon}\_{4}, \operatorname{sign}(\boldsymbol{\upsilon}\_{4,n})\right]^{T} \end{cases} \tag{6}$$

where *υ* represents the error compensation vector, and *pi* > 0 and *qi* > 0 are the tuning parameters that need to be designed.

Then, the compensated tracking error signal is designed as

$$\begin{cases} v\_1 = z\_1 - \upsilon\_1 \\ v\_2 = z\_2 - \upsilon\_2 \\ v\_3 = z\_3 - \upsilon\_3 \\ v\_4 = z\_4 - \upsilon\_4 \end{cases} \tag{7}$$

Ultimately, the virtual control signals in the controller are

$$\begin{cases} a\_1 = -p\_1 z\_1 + \dot{x}\_d - \left[ a\_{1,1} v\_{1,1}^r, \cdots, a\_{1,n} v\_{1,n}^r \right]^T \\\ a\_2 = -p\_2 z\_2 - z\_1 + \dot{\phi}\_2 - \frac{1}{2} v\_2 - \frac{1}{2h^2} \left[ v\_{2,1} \hat{\theta}\_2 S\_{2,1}^T S\_{2,1}, \cdots, v\_{2,n} \hat{\theta}\_2 S\_{2,n}^T S\_{2,n} \right]^T - \left[ a\_{2,1} v\_{2,1}^r, \cdots, a\_{2,n} v\_{2,n}^r \right]^T \\\ a\_3 = -p\_3 z\_3 - z\_2 + \dot{\phi}\_3 - \left[ a\_{3,1} v\_{3,1}^r, \cdots, a\_{3,n} v\_{3,n}^r \right]^T \\\ \tau = -p\_4 z\_4 - z\_3 + \dot{\phi}\_4 - \frac{1}{2} v\_4 - \frac{1}{2h^2} \left[ v\_{4,1} \hat{\theta}\_4 S\_{4,1}^T S\_{4,1}, \cdots, v\_{4,n} \hat{\theta}\_4 S\_{4,n}^T S\_{4,n} \right]^T - \left[ a\_{4,1} v\_{4,1}^r, \cdots, a\_{4,n} v\_{4,n}^r \right]^T \end{cases} (8)$$

where *a* and *h* are all positive numbers, and 0 < *r* < 1. ˆ *θ*<sup>2</sup> and ˆ *θ*<sup>4</sup> are the estimated variables obtained by the adaptive update law in (21).

**Remark 1.** *In the process of designing the tracking controller of the flexible manipulator system using the traditional back-stepping method, each step needs to design a virtual control signal as (4) to ensure that each subsystem has the desired performance. However, using virtual controlled derivatives results in increased computational complexity. In this paper, the output of the finite-time command filter (5) is used to approximate the virtual signal and the derivative of the virtual signal to replace the calculation of the derivative of the virtual signal in the traditional back-stepping process; thereby, the computational complexity is eliminated. However, filter errors will persist until the finite-time command filter stabilizes, which will affect the control quality. Therefore, this paper proposes a finite-time error-compensation mechanism of (6) to quickly eliminate filtering errors.*

#### *3.2. Stability Analysis*

This section investigates the command filtering back-stepping control strategy with state constraints and error compensation. Some necessary and sufficient conditions are derived for the main results.

**Lemma 1 [25].** *If xi* ∈ *R,i* = (1, 2, ··· , *n*) *and* 0 < *p* ≤ 1*, then the following inequality holds*

$$\left(\sum\_{i=1}^{n} |\mathbf{x}\_{i}|\right)^{p} \le \sum\_{i=1}^{n} |\mathbf{x}\_{i}|^{p} \le n^{1-p} \left(\sum\_{i=1}^{n} |\mathbf{x}\_{i}|\right)^{p} \tag{9}$$

**Lemma 2 [26].** *If there exists a real number λ*<sup>1</sup> > 0*, λ*<sup>2</sup> > 0 *and* 0 < *γ* < 1*, the finite-time stable extended Lyapunov condition can be obtained by* . *<sup>V</sup>*(*x*) <sup>+</sup> *<sup>λ</sup>*1*V*(*x*) <sup>+</sup> *<sup>λ</sup>*2*Vγ*(*x*) <sup>≤</sup> <sup>0</sup>*, and the convergence time Tr* <sup>≤</sup> *<sup>t</sup>*<sup>0</sup> <sup>+</sup> [1/(*λ*1(<sup>1</sup> <sup>−</sup> *<sup>γ</sup>*))] ln*λ*1*V*1−*γ*(*t*0) <sup>+</sup> *<sup>λ</sup>*<sup>2</sup> /*λ*<sup>2</sup> .

**Theorem 1.** *For the flexible-joint manipulator (1), using the error-compensation mechanism in (6) and the virtual control signal in (8), the joint position track the desired joint position in a finite time, and all system states in the closed-loop system are bounded in a finite time.*

**Proof of Theorem 1.** The stability of the closed-loop system is proven by the following four steps.

Step 1. Select Lyapunov function *V*<sup>1</sup> = <sup>1</sup> <sup>2</sup> *<sup>v</sup><sup>T</sup>* <sup>1</sup> *v*1, taking the time derivative of *V*<sup>1</sup> yields

$$\begin{array}{lcl}\dot{V}\_{1} &= v\_{1}^{T}\dot{v}\_{1} = v\_{1}^{T}(\dot{z}\_{1} - \dot{\upsilon}\_{1}) = v\_{1}^{T}(\dot{\alpha}\_{1} - \dot{\alpha}\_{d} - \dot{\upsilon}\_{1}) \\ &= v\_{1}^{T} \left[\alpha\_{1} + z\_{2} + (\phi\_{2} - \alpha\_{1}) - \dot{\dot{\alpha}}\_{d} - \dot{\upsilon}\_{1}\right] \end{array} \tag{10}$$

Substitute *α*<sup>1</sup> and *υ*<sup>1</sup> into (20) to find

.

$$\dot{V}\_1 = -k\_1 v\_1^T v\_1 + v\_2^T v\_2 - \begin{bmatrix} a\_{1,1} v\_{1,1}^r \ \cdots \ \end{bmatrix}^T + \begin{bmatrix} v\_{1,1} q\_{1,1} \text{sign}(v\_{1,1}) \ \cdots \ v\_{1,n} q\_{1,n} \text{sign}(v\_{1,n}) \end{bmatrix}^T \tag{11}$$

Step 2. Select Lyapunov function *V*<sup>2</sup> = *V*<sup>1</sup> + <sup>1</sup> <sup>2</sup> *<sup>v</sup><sup>T</sup>* <sup>2</sup> *v*2, and taking the derivative of *V*<sup>2</sup> yields

$$\begin{aligned} \dot{V}\_2 &= \dot{V}\_1 + v\_2^T \dot{v}\_2 = \dot{V}\_1 + v\_2^T (\dot{z}\_2 - \dot{\upsilon}\_2) \\ &= \dot{V}\_1 + v\_2^T \left(\dot{x}\_2 - \dot{\phi}\_2 - \dot{\upsilon}\_2\right) \\ &= \dot{V}\_1 + v\_2^T \left(f\_2 + g\_2 x\_2 - \dot{\phi}\_2 - \dot{\upsilon}\_2\right) \end{aligned} \tag{12}$$

where *<sup>f</sup>*<sup>2</sup> = −*M*−1(*x*1)[*C*(*x*1, *<sup>x</sup>*2)*x*<sup>2</sup> + *Fx*<sup>2</sup> + *Kx*1], *<sup>g</sup>*<sup>2</sup> = *<sup>M</sup>*−1(*x*1)*K*.

Since the function *f*<sup>2</sup> contains uncertainty, it is approximated by a neural network [27], then *f*<sup>2</sup> = [ *f*2,1, *f*2,2, ··· , *f*2,*n*] *<sup>T</sup>* can be approximately expressed as

$$f\_{2,i} = W\_{2,i}^T \mathbb{S}\_{2,i} + \mathbb{S}\_{2,i}, i = (1, 2, \cdots, n) \tag{13}$$

where *W*2,*<sup>i</sup>* is the weight matrix, *S*2,*<sup>i</sup>* is the basis function vector, and *ζ*2,*<sup>i</sup>* is the approximation error and satisfies *ζ*2,*i*-≤ *ε*2, *ε*<sup>2</sup> > 0.

According to the Young inequality, we can find

$$
v\_2^T f\_2 \le \sum\_{i=1}^n \left( \frac{v\_{2,i}^2 \left\|\mathcal{W}\_{2,i}\right\|^2 S\_{2,i}^T S\_{2,i}}{2h^2} + \frac{h^2 + v\_{2,i}^2 + \varepsilon\_2^2}{2} \right) \tag{14}$$

where *h* is a positive number. Substitute *α*2, . *υ*<sup>2</sup> and *v<sup>T</sup>* <sup>2</sup> *f*<sup>2</sup> into (14), we obtain

$$\begin{split} \dot{V}\_{2} \leq & -\sum\_{i=1}^{2} \left( p\_{i} v\_{1}^{T} v\_{i} \right) + g\_{2} v\_{2}^{T} v\_{3} + \sum\_{i=1}^{n} \left( \frac{v\_{2,i}^{2} \left( \|\mathbf{v}\_{2,i}\|^{2} - \theta\_{2} \right) \mathbf{S}\_{2,i}^{T} \mathbf{S}\_{2,i}}{2h^{2}} + \frac{h^{2} + v\_{2}^{2}}{2} \right) \\ & -\sum\_{i=1}^{n} \left( a\_{1,i} v\_{1,i}^{\gamma+1} + a\_{2,i} v\_{2,i}^{\gamma+1} \right) + \sum\_{i=1}^{n} \left( v\_{1,i} q\_{1,i} \operatorname{sign}(v\_{1,i}) + v\_{2,i} q\_{2,i} \operatorname{sign}(v\_{2,i}) \right) \end{split} \tag{15}$$

Step 3. Select Lyapunov function *V*<sup>3</sup> = *V*<sup>2</sup> + <sup>1</sup> <sup>2</sup> *<sup>v</sup><sup>T</sup>* <sup>3</sup> *v*3, and taking the derivative of *<sup>V</sup>*<sup>3</sup> yields .

$$\begin{aligned} \dot{V}\_3 &= \dot{V}\_2 + v\_3^T \dot{v}\_3 \\ &= \dot{V}\_2 + v\_3^T \left( a\_3 + z\_4 + (\phi\_4 - a\_3) - \dot{\phi}\_3 - \dot{\upsilon}\_3 \right) \end{aligned} \tag{16}$$

Substitute *<sup>α</sup>*<sup>3</sup> and . *υ*<sup>3</sup> into (20) to obtain

$$\begin{aligned} \dot{V}\_3 &= \dot{V}\_2 - p\_3 v\_3^T v\_3 - g\_2 v\_3^T v\_2 + v\_3^T v\_4 \\ &- \begin{bmatrix} a\_{3,1} v\_{3,1}^{r+1} \cdot \cdot \cdot \cdot, a\_{3,n} v\_{3,n}^{r+1} \end{bmatrix}^T + \begin{bmatrix} v\_{3,1} q\_{3,1} \text{sign}(v\_{3,1}) \cdot \cdot \cdot \cdot, v\_{3,n} q\_{3,n} \text{sign}(v\_{3,n}) \end{bmatrix}^T \end{aligned} \tag{17}$$

Step 4. Select Lyapunov function *V*<sup>4</sup> = *V*<sup>3</sup> + <sup>1</sup> <sup>2</sup> *<sup>v</sup><sup>T</sup>* <sup>4</sup> *v*4, and take the derivative of *V*<sup>4</sup> yields

$$\begin{aligned} \dot{V}\_4 &= \dot{V}\_3 + v\_4^T \dot{v}\_4 = \dot{V}\_3 + v\_4^T (\dot{z}\_4 - \dot{v}\_4) \\ &= \dot{V}\_3 + v\_4^T \left(\dot{x}\_4 - \dot{\phi}\_4 - \dot{v}\_4\right) \\ &= \dot{V}\_3 + v\_4^T \left(f\_4 + g\_4 \tau - \dot{\phi}\_4 - \dot{v}\_4\right) \end{aligned} \tag{18}$$

where *<sup>f</sup>*<sup>4</sup> = −*J*−1[*Bx*<sup>4</sup> + *<sup>K</sup>*(*x*<sup>3</sup> − *<sup>x</sup>*1)], *<sup>g</sup>*<sup>4</sup> = *<sup>J</sup>*<sup>−</sup>1. Similar to (13), *<sup>f</sup>*<sup>4</sup> can be written as

$$f\_{4,i} = \mathcal{W}\_{4,i}^T \mathcal{S}\_{4,i} + \mathcal{J}\_{4,i}, i = (1, 2, \cdot, \cdot, n) \tag{19}$$

where *W*4,*<sup>i</sup>* is weight matrix, *S*4,*<sup>i</sup>* is the basis function vector, and *ζ*4,*<sup>i</sup>* is the approximation error and satisfies *ζ*4,*i*-≤ *ε*4, *ε*<sup>4</sup> > 0.

In view of (18) and the Young inequality, we have

. *<sup>V</sup>*<sup>4</sup> ≤ − <sup>4</sup> ∑ *i*=1 *piv<sup>T</sup> <sup>i</sup> vi* <sup>+</sup> *<sup>n</sup>* ∑ *i*=1 !*v*<sup>2</sup> 2,*i* -*W*2,*i*-2 − ˆ *θ*2 *ST* 2,*i S*2,*<sup>i</sup>* <sup>2</sup>*h*<sup>2</sup> <sup>+</sup> *<sup>h</sup>*2+*ε*<sup>2</sup> 2 2 " + *n* ∑ *i*=1 !*v*<sup>2</sup> 4,*i* -*W*4,*i*-2 − ˆ *θ*4 *ST* 4,*i S*4,*<sup>i</sup>* <sup>2</sup>*h*<sup>2</sup> <sup>+</sup> *<sup>h</sup>*2+*ε*<sup>2</sup> 4 2 " − 4 ∑ *i*=1 *n* ∑ *j*=1 *ai*,*jv<sup>γ</sup>*+<sup>1</sup> *i*,*j* <sup>+</sup> <sup>4</sup> ∑ *i*=1 *n* ∑ *j*=1 *vi*,*jqi*,*jsign υi*,*<sup>j</sup>* ≤ − <sup>4</sup> ∑ *i*=1 *pi* <sup>−</sup> *qi* 2 *vT <sup>i</sup> vi* <sup>+</sup> *<sup>n</sup>* ∑ *i*=1 !*v*<sup>2</sup> 2,*i* -*W*2,*i*-2 − ˆ *θ*2 *ST* 2,*i S*2,*<sup>i</sup>* <sup>2</sup>*h*<sup>2</sup> <sup>+</sup> *<sup>h</sup>*2+*ε*<sup>2</sup> 2 2 " + *n* ∑ *i*=1 !*v*<sup>2</sup> 4,*i* -*W*4,*i*-2 − ˆ *θ*4 *ST* 4,*i S*4,*<sup>i</sup>* <sup>2</sup>*h*<sup>2</sup> <sup>+</sup> *<sup>h</sup>*2+*ε*<sup>2</sup> 4 2 " − 4 ∑ *i*=1 *n* ∑ *j*=1 *ai*,*jv<sup>γ</sup>*+<sup>1</sup> *i*,*j* <sup>+</sup> <sup>4</sup> ∑ *i*=1 *n* ∑ *j*=1 *qi*,*<sup>j</sup>* 2 (20)

Let *<sup>θ</sup>*<sup>2</sup> <sup>=</sup> max -*W*2,*i*-2 , *<sup>θ</sup>*<sup>4</sup> <sup>=</sup> max -*W*4,*i*-2 , *<sup>i</sup>* <sup>=</sup> (1, 2, ··· , *<sup>n</sup>*), then the estimate <sup>ˆ</sup> *θ*2 and ˆ *θ*<sup>4</sup> of *θ*<sup>2</sup> and *θ*<sup>4</sup> can be obtained by the following adaptive update law

$$\begin{cases} \dot{\theta}\_2 = -m\_2 l\_2 \dot{\theta}\_2 + \frac{1}{2h^2} m\_2 \sum\_{i=1}^n v\_{2,i}^2 S\_{2,i}^T S\_{2,i} \\\\ \dot{\theta}\_4 = -m\_4 l\_4 \dot{\theta}\_2 + \frac{1}{2h^2} m\_4 \sum\_{i=1}^n v\_{4,i}^2 S\_{4,i}^T S\_{4,i} \end{cases} \tag{21}$$

where *m*<sup>2</sup> > 0, *m*<sup>4</sup> > 0, *l*<sup>2</sup> > 0, *l*<sup>4</sup> > 0. Let *θ* /<sup>2</sup> <sup>=</sup> *<sup>θ</sup>*<sup>2</sup> <sup>−</sup> <sup>ˆ</sup> *θ*2, *θ* / <sup>4</sup> <sup>=</sup> *<sup>θ</sup>*<sup>4</sup> <sup>−</sup> <sup>ˆ</sup> *θ*4; furthermore, we construct the following Lyapunov function *<sup>V</sup>*/<sup>4</sup> <sup>=</sup> *<sup>V</sup>*<sup>4</sup> <sup>+</sup> <sup>1</sup> 2*m*<sup>2</sup> *θ* /2 <sup>2</sup> + <sup>1</sup> 2*m*<sup>4</sup> *θ* /2 <sup>4</sup>, and take the derivative of *V*/4, we have

.

*<sup>V</sup>*/<sup>4</sup> <sup>=</sup> . *V*<sup>4</sup> + <sup>1</sup> 2*m*<sup>2</sup> *θ* /2 . *θ* /<sup>2</sup> <sup>+</sup> <sup>1</sup> 2*m*<sup>4</sup> *θ* / 4 . *θ* /4 ≤ − <sup>4</sup> ∑ *i*=1 *piv<sup>T</sup> <sup>i</sup> vi* <sup>−</sup> *qi* <sup>2</sup> *<sup>v</sup><sup>T</sup> <sup>i</sup> vi* + <sup>1</sup> *m*<sup>2</sup> *θ* /2 . *θ*<sup>2</sup> − . ˆ *θ*2 + <sup>1</sup> *m*<sup>4</sup> *θ* / 4 . *θ*<sup>4</sup> − . ˆ *θ*4 − 4 ∑ *i*=1 *n* ∑ *j*=1 *ai*,*jv<sup>γ</sup>*+<sup>1</sup> *i*,*j* + *n* ∑ *i*=1 *v*<sup>2</sup> 2,*i θ* / <sup>2</sup>*S<sup>T</sup>* 2,*i S*2,*i*+*v*<sup>2</sup> 4,*i θ* / 4*S<sup>T</sup>* 4,*i S*4,*<sup>i</sup>* <sup>2</sup>*h*<sup>2</sup> <sup>+</sup> *<sup>ε</sup>*<sup>2</sup> 2+*ε*<sup>2</sup> 4 <sup>2</sup> + *<sup>h</sup>*<sup>2</sup> ≤ − <sup>4</sup> ∑ *i*=1 *piv<sup>T</sup> <sup>i</sup> vi* <sup>−</sup> *qi* <sup>2</sup> *<sup>v</sup><sup>T</sup> <sup>i</sup> vi* + *<sup>n</sup>* 2 *ε*2 <sup>2</sup> + *<sup>ε</sup>*<sup>2</sup> 4 <sup>+</sup> *nh*<sup>2</sup> <sup>−</sup> <sup>4</sup> ∑ *i*=1 *n* ∑ *j*=1 *ai*,*jv<sup>γ</sup>*+<sup>1</sup> *i*,*j* +*l*2*θ* /2 ˆ *θ*<sup>2</sup> + *l*4*θ* / 4 ˆ *θ*4 ≤ − <sup>4</sup> ∑ *i*=1 *piv<sup>T</sup> <sup>i</sup> vi* <sup>−</sup> *qi* <sup>2</sup> *<sup>v</sup><sup>T</sup> <sup>i</sup> vi* + *<sup>n</sup>* 2 *ε*2 <sup>2</sup> + *<sup>ε</sup>*<sup>2</sup> 4 <sup>+</sup> *nh*<sup>2</sup> <sup>−</sup> <sup>4</sup> ∑ *i*=1 *n* ∑ *j*=1 *ai*,*jv<sup>γ</sup>*+<sup>1</sup> *i*,*j* +*l*2*d*2*θ*<sup>2</sup> <sup>2</sup> + *<sup>l</sup>*4*d*4*θ*<sup>2</sup> <sup>4</sup> <sup>−</sup> *<sup>χ</sup>*<sup>2</sup> *p*2 *θ* /2 <sup>2</sup> <sup>−</sup> *<sup>χ</sup>*<sup>4</sup> *p*4 *θ* /2 4 (22)

where *χ*<sup>2</sup> = (*p*2*l*2(2*d*<sup>2</sup> − 1))/2*d*2, *χ*<sup>4</sup> = (*p*4*l*4(2*d*<sup>4</sup> − 1))/2*d*4, *d*<sup>2</sup> > 0.5, *d*<sup>4</sup> > 0.5. By Lemma 1, we obtain .

$$
\dot{\mathcal{V}}\_4 \le -\rho \mathcal{V}\_4 - \sigma \dot{\mathcal{V}}\_4^{\frac{\gamma+1}{2}} + c \tag{23}
$$

in which

$$\rho = \min(2p\_i - q\_i, 2\chi\_2, 2\chi\_4),$$

$$\sigma = \min\left(a\_{i,j}2^{\frac{\gamma+1}{2}}, 2\chi\_2^{\frac{\gamma+1}{2}}, 2\chi\_2^{\frac{\gamma+1}{2}}\right),$$

$$\sigma = \frac{n}{2}\left(\varepsilon\_2^2 + \varepsilon\_4^2\right) + n\hbar^2 + n\sum\_{i=1}^4 \frac{q\_i}{2} + l\_2 d\_2 \theta\_2^2 + l\_4 d\_4 \theta\_4^2.$$

It is clear that we can find a positive number 0 < *δ* < 1 such that

$$
\dot{\tilde{V}}\_4 \le -\delta \rho \tilde{V}\_4 - (1 - \delta) \rho \tilde{V}\_4 - \sigma \tilde{V}\_4^{\frac{\gamma + 1}{2}} + \varepsilon \tag{24}
$$

Furthermore, it can be seen from Lemma 2 that, if *<sup>V</sup>*/<sup>4</sup> <sup>&</sup>gt; *<sup>c</sup>* (1−*δ*)*<sup>ρ</sup>* , then we have

$$
\dot{\tilde{V}}\_4 \le -\delta \rho \tilde{V}\_4 - \sigma \tilde{V}\_4^{\frac{\gamma+1}{2}} \tag{25}
$$

which indicates that *vi*, *θ* /2, *θ* / <sup>4</sup> will converge to the following region in finite time

$$\left(\upsilon\_{i\prime}\,\tilde{\theta}\_2, \tilde{\theta}\_4\right) \in \left\{\vec{V}\_4 \le \frac{c}{(1-\delta)\rho}\right\}\tag{26}$$

The time *Tr* required to reach the region in (26) is

$$T\_r \le \frac{1}{\delta \rho \left(1 - \frac{\gamma + 1}{2}\right)} \ln \left( \left( \delta \rho \vec{V}\_4^{1 - \frac{\gamma + 1}{2}}(0) + \sigma \right) / \sigma \right), \tag{27}$$

which means that the state of the system converges in the desired neighborhood near the origin in finite time, and all control signals in the closed-loop system are bounded in finite time. -

**Remark 2.** *In view of the definition of convergence region, it can be seen that we can obtain a smaller convergence area by increasing the parameters pi*, *ai*, *qi*, *χ*2, *χ*4,*i* = (1, 2, 3, 4).

#### **4. Simulation**

In this section, a simulation example of a single joint flexible manipulator is provided to illustrate the theoretical result. The parameter of system (1) is shown in Table 1.


**Table 1.** Parameters of the flexible manipulator.

The structure diagram of the control system is shown in Figure 2.

**Figure 2.** The structure diagram of the control system.

Suppose that the desired tracking trajectory is set as *qd* = sin(*t*), then the initial state is *<sup>x</sup>*1(0) <sup>=</sup> *<sup>q</sup>*(0) <sup>=</sup> 0.2, *<sup>x</sup>*2(0) <sup>=</sup> . *q*(0) = 0. The term of joint friction is set as *F* . *q* <sup>=</sup> 0.01 cos . *q*. The constraints of the system state are *x*1- ≤ 1.8, *x*2- ≤ 2, *x*3- ≤ 3, *x*4-≤ 10, respectively.

The parameters of the command filter (5) are set as *λi*,*s*,1 = *λi*,*s*,2 = 30. The parameters of the error-compensation mechanism (6) are selected as *p*<sup>1</sup> = 1, *p*<sup>2</sup> = 15, *p*<sup>3</sup> = *p*<sup>4</sup> = 20, and *q*<sup>1</sup> = *q*<sup>2</sup> = *q*<sup>3</sup> = *q*<sup>4</sup> = 1. The parameters of virtual control signals (8) are set as *a*<sup>1</sup> = 1,*a*<sup>2</sup> = *a*<sup>3</sup> = 5, *a*<sup>4</sup> = 7, *h* = 1, *r* = 3/5. The parameters of the adaptive update law (21) are set as *m*<sup>2</sup> = *m*<sup>4</sup> = 1, *l*<sup>2</sup> = *l*<sup>4</sup> = 1. The other parameters used in (22) are selected as *γ* = 1/2, *ε*<sup>2</sup> = *ε*<sup>4</sup> = 0.1, *d*<sup>2</sup> = *d*<sup>4</sup> = 1.

First, in order to verify the effectiveness of the error-compensation mechanism for the flexible manipulator system (1), the position and velocity tracking curves are shown in Figure 3 in the case that the error-compensation mechanism is not used in the controller, and the position tracking error curves without error compensation are shown in Figure 4. Then, the position and velocity tracking curves are shown in Figure 5 by using the errorcompensation mechanism, and the position tracking error curves with error compensation are shown in Figure 6.

**Figure 3.** Position and velocity tracking curves without error compensation.

**Figure 4.** Position tracking error curves without error compensation.

**Figure 5.** Position and velocity tracking curves with error compensation.

**Figure 6.** Position tracking error curves with error compensation.

As can be seen from Figure 3 to Figure 6, the use of the error-compensation mechanism in the controller can improve the accuracy of the position and velocity tracking effectively. In addition, after using the error-compensation mechanism, the system state can satisfy the state constraints at the same time. Then, the effectiveness of the error-compensation mechanism designed in this paper is verified.

Secondly, the finite-time control effect of the control algorithm proposed in this paper is verified by adjusting parameters in the following two cases. The parameters is set as *pi* = 5, *ai* = 2, *qi* = 1, *i* = (1, 2, 3, 4) in the first case. The parameters is set as *pi* = 10, *ai* = 5, *qi* = 1, *i* = (1, 2, 3, 4) in the second case.

Figures 7 and 8 show the joint position tracking curves under two different control parameters. It can be seen from Figure 7 that, in the first case, the joint trajectory can track the desired trajectory in 2.3 s, while by increasing the adjustment parameters, the joint can track the desired trajectory in 0.2 s, as shown in Figure 8. As can be seen from Figures 7 and 8, we can improve the convergence efficiency by increasing the gain of the control parameters.

**Figure 7.** Position tracking curves under the first case.

**Figure 8.** Position tracking curves under the second case.

#### **5. Conclusions**

Aiming at the finite-time tracking-control problem of state-constrained flexible manipulator systems, this paper proposes an adaptive neural network command filtering back-stepping control method. Compared with the traditional back-stepping control, the computational complexity is eliminated by designing a finite-time command filter in the process of establishing a finite-time virtual control function, and a finite-time errorcompensation mechanism is designed to eliminate errors in the filtering process. The Lyapunov function is used to verify the finite-time convergence of the closed-loop system. In future work, the method designed in this paper will be extended to a multi-joint flexible manipulator system, and an adaptive robust control method will be considered to overcome the influence of unknown external disturbances.

**Author Contributions:** Conceptualization, Y.Z. and M.Z.; methodology, Y.Z.; software, M.Z.; validation, Y.Z., C.F. and F.L.; formal analysis, C.F.; investigation, F.L.; resources, Y.Z.; data curation, Y.Z.; writing—original draft preparation, Y.Z.; writing—review and editing, C.F.; visualization, C.F.; supervision, Y.Z.; project administration, Y.Z.; funding acquisition, Y.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the National Natural Science Foundation of China, grant number 61703146; the Scientific and Technological Project of Henan Province, grant number 202102110126; the Backbone teacher project of Henan Province grant number, 2020GGJS048; the key scientific research projects of colleges and universities in Henan Province, grant number 19B413002.

**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. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

#### **References**

