Introduction

With the development of communication technology, data sensing technologies, the applications that require the collaboration of multiple UAVs have gradually emerged. Compared with a single UAV, a multi-UAVs formation can achieve higher working efficiency and stronger fault tolerance through task allocation and collaborative computing. For instance, in Refs1,2,3,4. about logistics transportation, The payload capacity and flight range of traditional UAVs are limited by battery capacity, aircraft structure and power system. A single medium-sized logistics UAV can typically carry only 5–10 kg of cargo. However, through formation control, multiple UAVs can carry cargo together, and the overall payload capacity can be increased by 3–5 times. When performing tasks such as disaster search and rescue or terrain scanning5,6, the coverage area of multiple UAVs can expand to several times that of a single UAV, and the sensors that a single UAV can carry during the mission are usually limited. However, an UAVs formation can carry information collection devices such as visible light cameras, infrared thermal imagers, and laser radar respectively, collecting data in multiple dimensions. Through data fusion, the target recognition accuracy can be greatly improved. In the military field7,8, UAVs formations can real-time fuse optical, radar, and electronic reconnaissance data through data links, forming a large-scale “battlefield situation map”. The information blind areas of a single UAV can also be seamlessly filled by other UAVs, not only obtaining more battlefield information, but also significantly improving the fault tolerance of mission execution through information sharing among multiple UAVs. Even the objects of UAVs formations cannot be limited to UAV among themselves, but can also achieve formations between UAVs and land vehicles, or sea vehicles, achieving a combined air, land and sea operation9,10. In summary, UAVs formations break through physical limitations, make up for single-point deficiencies, and expand mission boundaries through group collaboration. With the development of AI autonomous decision-making algorithms, high-speed communication and power sources, future unmanned aerial vehicle formations may achieve “fully autonomous collaboration”.

The common formation control methods for UAVs include the pilot-follower method11,12,13,14, the consistency method15, the artificial potential field method16, and the virtual structure method17. Among them, the pilot-follower method has the characteristics of simple structure, easy implementation and strong applicability, and is currently the most widely used control scheme18. However, since its core control strategy relies on the dominance of a pilot, the stability of the formation is completely dependent on the pilot. Once the pilot fails due to actuator failure or external disturbances, the formation may collapse. Therefore, many researchers have proposed solutions to the fault tolerance and disturbance rejection problems of UAV pilot-follower formation19,20,21. In Ref22., an adaptive barrier function was adopted by designing variable gain to compensate for interference and faults, and a fast terminal sliding mode controller with an adaptive barrier function was designed to enhance the fault-tolerant performance of UAV formation. In Ref23., a fixed-time extended state observer was designed with noise suppression to estimate and compensate for actuator failures and disturbances that occur during the flight of UAVs. Meanwhile, a distributed fixed-time sliding mode controller is designed, which effectively handles actuator failures of UAVs while avoiding collision problems between formation UAVs. In addition to using adaptive functions and observers24,25,26, the neural networks method is also used to solve the formation fault tolerance problem. In Ref27., a reinforcement learning technology was adopted to compensate for the control output signals affected by system faults, which can maintain the integrity of control during faults and improv the fault tolerance capability of the system. To address the external disturbances in formation flight, a fully distributed model reference robust adaptive controller was proposed in Ref28.. By introducing an adaptive projection formation operator and a new high-frequency robust control term, the formation system was hold to be consistently asymptotically stable under the influence of uncertainty and disturbances. In Ref29., a distributed fixed-time observer and a finite-time stabilization controller were designed, which enable the system to be globally finite-time stable when subjected to unknown disturbances. In Ref30., a neural adaptive sliding mode controller was designed to compensates for complex uncertainties including nonlinearity, unmodeled dynamics and external disturbances for UAV formation to ensure the tracking performance.

In a multi-UAVs formation, it not only needs to consider the relative motion between the UAVs and the interaction of control strategies, but also should take into account that each individual UAV in the formation is an underactuated, highly coupled nonlinear control system. Moreover, during flight, it may be affected by multiple disturbances such as environmental disturbances, parameter changes, and unmodeled internal terms. These factors make the dynamic model of the formation more complex and high-dimensional, and the impact of disturbances is also more obvious, and pose a huge challenge to the formation flight control.

As the control performance for quadrotor UAV continue to increase, more and more control methods have been developed31,32,33. STSM control is a high-order sliding mode control method which can effectively suppress buffering while maintaining strong robustness against disturbances and parameter uncertainties. The advantages of the STSM control method are that the discontinuous signals in the traditional sliding mode control are transformed into continuous signals by introducing the integral term. However, the stability of the STSM depends on the matching of the gain and the upper bound of the disturbance. But in actual systems, the disturbance is often unknown or time-varying, and the fixed gain is difficult to adapt to dynamic changes. In Ref34., proposed an adaptive gain super twisting control algorithm was proposed for the gain problem, and the transient performance and disturbance rejection performance of the system was improved through dynamically adjusted gain. In Ref35., an adaptive super twisting control strategy was proposed for a nonlinear extended state observer based on a fuzzy neural network, A special piecewise dynamic adaptive gain is adopted for super twisting controller to counteract the uncertainties and estimation errors. Since the reaching law of the traditional STSM only contains the exponential current and the integral term, the convergence is slow when the system state is far from the equilibrium point. In Ref36., a linear term and its integral were introduced to the traditional STSM reaching law, and the convergence speed of the quadrotor UAV is enhanced.

Considering the practical application and applicability of the quadrotor UAV formation control scheme, the pilot-follower formation control scheme is selected in the paper. To enhance the dynamic performance and response speed of the UAV formation system, as well as the robustness of UAVs in the formation, the improved STSM control method and the non-singular sliding mode control method are introduced. The main contribution points of this article are as follows:

1) To address quadrotor UAVs in formation suffering from unmodeled terms and external disturbances, a NSTSTSM control method is designed. The proposed control method makes the following improvements on the STSM control method: By taking advantage of the finite-time convergence characteristic of the non-singular terminal sliding mode surface and the reducing chattering characteristic of the STSM, the sliding model surface is designed based the non-singular terminal sliding mode and STSM method. The integral term in the STSM reaching law is utilized to design the non-singular terminal STSM control method. The proposed control method enhances the control dynamic performance and robustness of the UAV control system and weaken the buffeting phenomenon. Take into account that the reaching law of STSM only contains exponential terms and integral terms, when the system state is far from the equilibrium point, the convergence of system is slow. Therefore, a linear function is introduced into the reaching law of STSM to enhance the system response speed.

2) In the position loop and attitude loop of the UAV, considering that the external unknown disturbances and unmodeled terms suffered by the quadrotor UAV are regarded as lumped disturbances, the finite-time disturbance observers are designed to estimate the lumped disturbances and compensates them in the controller, thereby improving the robustness of the control system.

3) The UAV formation flight adopts a leader-follower formation scheme. Considering that the UAVs in the formation are planar formation in horizontal space and the positional relationship between the leader and the follower is taken into account, the mathematical model of the positional relationship between the leader and the follower is constructed. Based on the constructed mathematical model, a linear function is introduced into the reaching law of STSM, and an improved STSM controller is designed for quadrotor UAV formation. The proposed control method not only ensures the control performance of the UAV formation but also improves the response speed of the UAV formation system.

Problem formulation

Dynamics of quadrotor UAV

The inertial coordinate system (\(\:{O}_{G}{,X}_{G}{,Y}_{G}{,Z}_{G}\)) and body coordinate system (\(\:{O}_{b}{,x}_{b}{,y}_{b}{,z}_{b}\)) are set for the quadrotor UAV as shown in Fig. 1. The coordinate origin \(\:{O}_{G}\) is the take-off position of the UAV, and the true north direction is the positive direction of the \(\:{X}_{G}\) axis of the inertial coordinate system, and the forward direction of the UAV is the positive direction of the \(\:{x}_{b}\) axis of the body coordinate system. The “X” type rack-mounted UAV is adopted. In order to better design the control system, the following assumptions are made:

Assumption 1

The UAV is a completely symmetrical rigid body with the center of gravity coinciding with the geometric center. The body coordinate origin \(\:{O}_{b}\) is the center of the UAV. During the flight of the UAV, the constant values of aerodynamic parameters such as gravity and air density remain unchanged.

Assumption 2

The operating conditions of the UAV sensors and actuators are always in good condition without any faults. The information communication among the UAVs is always smooth, with no communication delays or data packet losses.

Fig. 1
figure 1

Coordinate system diagram of quadrotor UAV.

Due to the relatively slow speed and small rotation angle of the quadcopter, in order to better design the controller, the dynamics model of the quadrotor UAV is described as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}\ddot{x}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\theta\:\text{c}\text{o}\text{s}\psi\:+\text{s}\text{i}\text{n}\phi\:\text{s}\text{i}\text{n}\psi\:\right)-\frac{{k}_{d}\dot{x}}{m}+{d}_{x}\\\:\ddot{y}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\theta\:\text{s}\text{i}\text{n}\psi\:-\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\psi\:\right)-\frac{{k}_{d}\dot{y}}{m}+{d}_{y}\\\:\ddot{z}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{c}\text{o}\text{s}\theta\:\right)-\frac{{k}_{d}\dot{z}}{m}-g+{d}_{y}\end{array}\right.\end{array}$$
(1)
$$\:\begin{array}{c}\left\{\begin{array}{c}\ddot{\phi\:}=\frac{{u}_{2}}{{I}_{x}}-\frac{l{k}_{\tau\:}\dot{\phi\:}}{m}+{d}_{\phi\:}\\\:\ddot{\theta\:}=\frac{{u}_{3}}{{I}_{y}}-\frac{l{k}_{\tau\:}\dot{\theta\:}}{m}+{d}_{\theta\:}\\\:\ddot{\psi\:}=\frac{{u}_{4}}{{I}_{z}}-\frac{l{k}_{\tau\:}\dot{\psi\:}}{m}+{d}_{\psi\:}\end{array}\right.\end{array}$$
(2)

.

where (1) is the dynamic model of the quadrotor position subsystem, (2) is the dynamic model of the quadrotor attitude subsystem, \(\:\left[x,y,z\right]\) represents the position of the center of mass of the UAV in the inertial coordinate system, \(\:[{I}_{x},{I}_{y},{I}_{z}]\) represents the inertia moment of UAV around axis, \(\:m\) is the mass of quadrotor UAV, \(\:g\) is the gravity constant, \(\:l\) is the radius length of quadrotor which represents the distance from the rotation center of each rotor to the center of gravity of the UAV, \(\:{k}_{d}\), \(\:{k}_{\tau\:}\) represent the resistance coefficients of the UAV during translational and rotational operations respectively, \(\:{d}_{i}(i=x,y,z,\phi\:,\theta\:,\psi\:)\) is external disturbance, \(\:{u}_{1}\) is the lift of the quadrotor, and \(\:\:\:{u}_{i}(i=\text{2,3},4)\) is the rotational torque.

Since the control system of the quadrotor UAV is an under-driven system with four inputs and six outputs, it is impossible to control all six degrees of freedom. Therefore, the control object of the control scheme in this paper is the high-efficiency tracking trajectory of the desired value \(\:[{x}_{d},{y}_{d},{z}_{d}]\) and yaw angle \(\:{\psi\:}_{d}\). To facilitate the design process, virtual control quantities are introduced in the position loop as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{u}_{x}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\theta\:\text{c}\text{o}\text{s}\psi\:+\text{s}\text{i}\text{n}\phi\:\text{s}\text{i}\text{n}\psi\:\right)\\\:{u}_{y}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\theta\:\text{s}\text{i}\text{n}\psi\:-\text{c}\text{o}\text{s}\phi\:\text{s}\text{i}\text{n}\psi\:\right)\\\:{u}_{z}=\frac{{u}_{1}}{m}\left(\text{c}\text{o}\text{s}\phi\:\text{c}\text{o}\text{s}\theta\:\right)\end{array}\right.\end{array}$$
(3)

.

The desired attitude angles \(\:{\phi\:}_{d}\), \(\:{\theta\:}_{d}\) and the total lift \(\:{u}_{1}\) of the UAV can be calculated by the virtual control quantities \(\:[{u}_{x},{u}_{y},{u}_{z}]\) and the yaw Angle \(\:{\psi\:}_{d}\), and can be expressed as

$$\:\begin{array}{c}\left\{\begin{array}{c}{\theta\:}_{d}=arctan\left(\frac{{u}_{x}\text{c}\text{o}\text{s}{\psi\:}_{d}+{u}_{y}\text{s}\text{i}\text{n}{\psi\:}_{d}}{{u}_{z}}\right)\\\:{\phi\:}_{d}=arctan\left(\frac{\text{c}\text{o}\text{s}{\theta\:}_{d}\left({u}_{x}\text{s}\text{i}\text{n}{\psi\:}_{d}-{u}_{y}\text{c}\text{o}\text{s}{\psi\:}_{d}\right)}{{u}_{z}}\right)\\\:{u}_{1}=\frac{{u}_{z}m}{\text{c}\text{o}\text{s}{\theta\:}_{d}\text{c}\text{o}\text{s}{\phi\:}_{d}}\end{array}\right.\end{array}$$
(4)

.

For the convenience of expression, Eqs. (1) and (2) are rewritten as:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{x}}_{1}={x}_{2}\\\:{\dot{x}}_{2}=f\left({x}_{2}\right)+g\left({x}_{2}\right)u+d\end{array}\right.\end{array}$$
(5)

.

where

$$\:\begin{array}{c}\left\{\begin{array}{c}{x}_{1}={\left[x,y,z,\phi\:,\theta\:,\psi\:\right]}^{T}\\\:{x}_{2}={\left[\dot{x},\dot{y},\dot{z},\dot{\phi\:},\dot{\theta\:},\dot{\psi\:}\right]}^{T}\\\:f\left({x}_{2}\right)={\left[-\frac{{k}_{d}\dot{x}}{m},-\frac{{k}_{d}\dot{y}}{m},-\frac{{k}_{d}\dot{z}}{m},-\frac{l{k}_{\tau\:}\dot{\phi\:}}{m},-\frac{l{k}_{\tau\:}\dot{\theta\:}}{m},-\frac{l{k}_{\tau\:}\dot{\psi\:}}{m}\right]}^{T}\\\:g\left({x}_{2}\right)=diag\left[\frac{1}{m},\frac{1}{m},\frac{1}{m},\frac{1}{{I}_{x}},\frac{1}{{I}_{y}},\frac{1}{{I}_{z}}\right]\\\:d={\left[{d}_{x},{d}_{y},{d}_{z},{d}_{\phi\:},{d}_{\theta\:},{d}_{\psi\:}\right]}^{T}\\\:u={\left[{u}_{x},{u}_{y},{u}_{z},{u}_{2},{u}_{3},{u}_{4}\right]}^{T}\end{array}\right.\end{array}$$

.

Positional relationship model of UAV formation

The pilot-follower formation flight strategy is adopted in this paper. That is, the leader completes the tracking of the desired trajectory, while the follower only needs to maintain a fixed positional relationship with the pilot aircraft and follow the leader for formation flight. With considering the positional relationship of the UAVs on the same horizontal plane, the schematic diagram of the formation flight of two-UAVs on the horizontal plane is as follows.

Fig. 2
figure 2

Schematic diagram of formation flight of two UAVs on the horizontal plane.

The position model of UAV can be rewritten by using the velocity as follow

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{X}}_{i}={v}_{ix}\text{cos}\left({\psi\:}_{i}\right)-{v}_{iy}\text{sin}\left({\psi\:}_{i}\right)\\\:{\dot{Y}}_{i}={v}_{ix}\text{sin}\left({\psi\:}_{i}\right)+{v}_{iy}\text{cos}\left({\psi\:}_{i}\right)\\\:{\dot{\psi\:}}_{i}={\omega\:}_{i}\end{array}\right.\end{array}$$
(6)

.

where \(\:i=L,F\) represents the leader and follower respectively, \(\:{X}_{i}\), \(\:{Y}_{i}\) represent the position of UAV, \(\:{v}_{ix}\), \(\:{v}_{iy}\) represent the velocity component of the UAV along the X-axis and Y-axis in the body coordinate system, \(\:{\psi\:}_{i}\), \(\:{\omega\:}_{i}\) represent the yaw angle and yaw angular velocity.

Set the positional relationship between the pilot aircraft and the follower as: a distance constant \(\:\lambda\:\:\)and an angle constant \(\:{\psi\:}_{L}\) are kept, and the distance \(\:\lambda\:\) is projected along the body coordinate system of the leader, it can be obtained that the distance component \(\:{\lambda\:}_{x}\) along the X-axis and the distance component \(\:{\lambda\:}_{y}\) along the Y-axis of the distance λ in the body coordinate system. As shown in Fig. 2, the positional relationship between \(\:{\lambda\:}_{x}\), \(\:{\lambda\:}_{y}\) and UAV can be expressed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\lambda\:}_{x}=\left({X}_{L}-{X}_{F}\right)\text{cos}\left({\psi\:}_{L}\right)+\left({Y}_{L}-{Y}_{F}\right)\text{sin}\left({\psi\:}_{L}\right)\\\:{\lambda\:}_{y}=-\left({X}_{L}-{X}_{F}\right)\text{sin}\left({\psi\:}_{L}\right)+\left({Y}_{L}-{Y}_{F}\right)\text{cos}\left({\psi\:}_{L}\right)\end{array}\right.\end{array}$$
(7)

.

The derivative of Eq. (7) is obtained and Substituting (6) and (7) into it to obtain as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{\lambda\:}}_{x}={\lambda\:}_{y}{\omega\:}_{L}+{v}_{Lx}-{\dot{X}}_{F}\text{cos}\left({\psi\:}_{L}\right)-{\dot{Y}}_{F}\text{sin}\left({\psi\:}_{L}\right)\\\:{\dot{\lambda\:}}_{y}=-{\lambda\:}_{x}{\omega\:}_{L}+{v}_{Ly}+{\dot{X}}_{F}\text{sin}\left({\psi\:}_{L}\right)-{\dot{Y}}_{F}\text{cos}\left({\psi\:}_{L}\right)\end{array}\right.\end{array}$$
(8)

.

Let \(\:{e}_{\lambda\:\psi\:}={\psi\:}_{F}-{\psi\:}_{L}\) be the error of the leader and follower, and substituting \(\:{e}_{\lambda\:\psi\:}\) into (8), it is obtained as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{\lambda\:}}_{x}={\lambda\:}_{y}{\omega\:}_{L}+{v}_{Lx}-{v}_{Fx}\text{cos}\left({e}_{\lambda\:\psi\:}\right)+{v}_{Fy}\text{sin}\left({e}_{\lambda\:\psi\:}\right)\\\:{\dot{\lambda\:}}_{y}=-{\lambda\:}_{x}{\omega\:}_{L}+{v}_{Ly}-{v}_{Fx}\text{sin}\left({e}_{\lambda\:\psi\:}\right)-{v}_{Fy}\text{cos}\left({e}_{\lambda\:\psi\:}\right)\end{array}\right.\end{array}$$
(9)

.

Let \(\:{\lambda\:}_{x}^{d}\), \(\:{\lambda\:}_{y}^{d}\) be the distance component along the X-axis and Y-axis of the desired distance \(\:{\lambda\:}^{d}\) between two UAVs on the body coordinate system of the leader. Let \(\:{e}_{\lambda\:x}={\lambda\:}_{x}-{\lambda\:}_{x}^{d}\) be the distance component along the X-axis of the distance error of the desired position and the actual position between two UAVs. Let \(\:{e}_{\lambda\:y}={\lambda\:}_{y}-{\lambda\:}_{y}^{d}\) be the distance component along the Y-axis of the distance error of the desired position and the actual position between two UAVs. \(\:{\lambda\:}_{x}^{d}\), \(\:{\lambda\:}_{y}^{d}\) are constant, so that \(\:{\dot{\lambda\:}}_{x}^{d}=0\), \(\:{\dot{\lambda\:}}_{y}^{d}=0\). Substituting \(\:{e}_{x}\) and \(\:{e}_{y}\) into (9), the positional relationship model based on the leader-follower formation can be obtained as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{e}}_{\lambda\:x}=\left({\lambda\:}_{y}^{d}+{e}_{\lambda\:y}\right){\omega\:}_{L}+{v}_{Lx}-{v}_{Fx}\text{cos}\left({e}_{\lambda\:\psi\:}\right)+{v}_{Fy}\text{sin}\left({e}_{\lambda\:\psi\:}\right)\\\:{\dot{e}}_{\lambda\:y}=-\left({\lambda\:}_{x}^{d}+{e}_{\lambda\:x}\right){\omega\:}_{L}+{v}_{Ly}-{v}_{Fx}\text{sin}\left({e}_{\lambda\:\psi\:}\right)-{v}_{Fy}\text{cos}\left({e}_{\lambda\:\psi\:}\right)\\\:{\dot{e}}_{\lambda\:\psi\:}={\omega\:}_{F}-{\omega\:}_{L}\end{array}\right.\end{array}$$
(10)

.

For convenience, the (10) is rewritten as follower:

$$\:\begin{array}{c}{\dot{x}}_{m}=F\left({x}_{m}\right)+G\left({x}_{m}\right)v\end{array}$$
(11)

.

where

$$\:\begin{array}{c}\left\{\begin{array}{c}{x}_{m}={\left[{e}_{\lambda\:x},{e}_{\lambda\:y},{e}_{\psi\:}\right]}^{T}\\\:v={\left[{v}_{Fx},{v}_{Fy},{\omega\:}_{F}\right]}^{T}\\\:F\left({x}_{m}\right)=\left[\begin{array}{c}{\lambda\:}_{y}^{d}{\omega\:}_{L}+{e}_{\lambda\:y}{\omega\:}_{L}+{v}_{Lx}\\\:-{\lambda\:}_{x}^{d}{\omega\:}_{L}-{e}_{\lambda\:x}{\omega\:}_{L}+{v}_{Ly}\\\:-{\omega\:}_{L}\end{array}\right]\\\:G\left({x}_{m}\right)=\left[\begin{array}{c}-\text{cos}\left({e}_{\lambda\:\psi\:}\right),\text{sin}\left({e}_{\lambda\:\psi\:}\right),0\\\:-\text{sin}\left({e}_{\lambda\:\psi\:}\right),-\text{cos}\left({e}_{\lambda\:\psi\:}\right),0\\\:\text{0,0},1\end{array}\right]\end{array}\right.\end{array}$$

.

Preliminaries

Considering the following the nonlinear system:

$$\:\begin{array}{c}\dot{x}=f\left(x\left(t\right),u\right),\text{}\text{}\text{}\text{}\text{}x\left(0\right)={x}_{0}\end{array}$$
(12)

.

where \(\:x\) is state of system, \(\:u\) is control input, \(\:{x}_{0}\) is initial state of system.

Defined

for the nonlinear system (12), if the convergence time \(\:T\) satisfies

$$\:\begin{array}{c}\underset{t\to\:T}{\text{l}\text{i}\text{m}}x\left(t\right)=0,\forall\:t\geq\:T\end{array}$$
(13)

.

It can be obtained that the nonlinear system (12) is finite time stable.

Lemma

37: for the nonlinear system (12), if it exists a continuously positive definite Lyapunov function \(\:V\left(x\right)\), and \(\:V\left(x\right)\) satisfies

$$\:\begin{array}{c}\dot{V}\left(x\right)\le\:-\lambda\:{V}^{\gamma\:}\left(x\right)\end{array}$$
(14)

.

where \(\:0<\gamma\:<1\), \(\:\lambda\:>0\). Hence, the nonlinear system (12) is finite time convergent, and the convergent time satisfied

$$\:\begin{array}{c}T\le\:\frac{{V}_{0}^{1-\gamma\:}}{\lambda\:\left(1-\gamma\:\right)}\end{array}$$
(15)

.

Lemma

38: for the nonlinear system (12), if it exists a continuously positive definite Lyapunov function \(\:V\left(x\right)\), and \(\:V\left(x\right)\) satisfies

$$\:\begin{array}{c}\dot{V}\left(x\right)\le\:-\alpha\:{V}^{\gamma\:}\left(x\right)-\beta\:V+\lambda\:{V}^{1/2}\left(x\right)\end{array}$$
(16)

.

where \(\:\alpha\:,\beta\:,\lambda\:>0\), \(\:\frac{1}{2}<\gamma\:<1\). Hence, the state trajectory of the nonlinear system is finite time uniformly bounded stability, and the convergence domain and the convergence time satisfy respectively

$$\:\begin{array}{c}\begin{array}{c}D=\left\{x\left|{\mu\:}_{1}{V}^{\gamma\:-1/2}\right(x)+{\mu\:}_{2}{V}^{1/2}(x)\le\:\lambda\:\right\}\\\:T\le\:\frac{1}{\left(\beta\:-{\mu\:}_{1}\right)\left(1-\gamma\:\right)}ln\left(\frac{\left(\beta\:-{\mu\:}_{2}\right){V}_{0}^{1-\gamma\:}}{\alpha\:-{\mu\:}_{1}}+1\right)\end{array}\end{array}$$
(17)
$$\:\text{w}\text{h}\text{e}\text{r}\text{e}\:0<{\mu\:}_{1}<\alpha\:,\:0<{\mu\:}_{2}<\beta\:.$$

.

Lemma 3

39: for the nonlinear system (12), if it exists a continuously positive definite Lyapunov function \(\:V\left(x\right)\), and \(\:V\left(x\right)\) satisfies

$$\:\begin{array}{c}\dot{V}\left(x\right)\le\:-\alpha\:V\left(x\right)-\beta\:{V}^{\gamma\:}\left(x\right)+{c}^{*}\end{array}$$
(18)

.

where \(\:\alpha\:,\beta\:>\text{0,0}<\gamma\:<\text{1,0}<{c}^{*}<\infty\:\). It can be obtained that the state trajectory of the nonlinear system is finite time stable, and the convergence time \(\:t\) satisfies

$$\:\begin{array}{c}t\le\:\frac{1}{\alpha\:\left(1-\gamma\:\right)}ln\frac{\alpha\:{V}^{1-\gamma\:}\left({x}_{0}\right)+\lambda\:\beta\:}{\lambda\:\beta\:}\end{array}$$
(19)

.

where \(\:0<\lambda\:<1\). If \(\:{c}^{*}=0\), the trajectory of the system is finite time stable, and the convergence time \(\:t\) satisfies.

$$\:\begin{array}{c}t\le\:\frac{1}{\alpha\:\left(1-\gamma\:\right)}ln\frac{\alpha\:{V}^{1-\gamma\:}\left({x}_{0}\right)+\beta\:}{\beta\:}\end{array}$$
(20)

The trajectory tracking control of quadrotor UAV

To achieve the control of quadrotor system which is underactuated, the desired object of the designed in this paper is that high-efficiency tracking the desired position \(\:[{x}_{d},{y}_{d},{z}_{d}]\) and the desired yaw angle \(\:{\psi\:}_{d}\), while the virtual controller \(\:[{u}_{x},{u}_{y},{u}_{z}]\) is introduced on the position loop, and the desired roll angle \(\:{\phi\:}_{d}\) and pitch angle \(\:{\theta\:}_{d}\) are carried out by through calculation. The control system of the quadrotor UAV is divided into the inner loop control of the attitude loop and the outer loop control of the position loop. In the position loop and attitude loop control, the non-singular terminal super-twisting controller and the finite time disturbance observer for estimating external disturbances and internal couplings are designed respectively. The topology diagram of the trajectory tracking control scheme for quadrotor UAV is shown in Fig. 3.

Fig. 3
figure 3

Topology diagram of trajectory tracking control scheme.

Finite time disturbance observer design

Assumption

40: if unknown disturbance \(\:d\) and its first-order derivative \(\:\dot{d}\) are continuously bounded, there exist a positive constant \(\:\mu\:\), \(\:\left|{d}^{\left(j\right)}\right|\le\:\mu\:,\left(j=\text{0,1}\right)\) is satisfied, where\(\:j\) represents the \(\:j\)th derivative of \(\:d\).

To enhance the disturbance rejection performance of quadrotor UAV during flight, the finite time disturbance observer is proposed to estimate the disturbances and the coupling terms for the attitude loop and position loop, and the estimation is used to compensate the controller. According to the quadrotor UAV dynamics (15), the finite time disturbance observer is designed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{\widehat{x}}}_{2}=f\left({x}_{2}\right)+g\left({x}_{2}\right)u+\widehat{d}-{k}_{d1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)\\\:\dot{\widehat{d}}=-{k}_{d2}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)\end{array}\right.\end{array}$$
(21)

.

where \(\:{\widehat{x}}_{2}\) is the estimation of the state \(\:{x}_{2}\), \(\:\widehat{d}\) is the estimation of the disturbance \(\:d\), \(\:{k}_{d1}>0\), \(\:{k}_{d2}>0\), \(\:{\gamma\:}_{d}\in\:\left(1/\text{2,1}\right)\), \(\:{e}_{d1}={\widehat{x}}_{2}-{x}_{2}={\left[{e}_{dx},{e}_{dy,}{e}_{dz,}{e}_{d\phi\:},{e}_{d\theta\:},{e}_{d\psi\:}\right]}^{T}\), \(\:si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)={\left[{\left|{e}_{dx}\right|}^{{\gamma\:}_{d}}sign\left({e}_{dx}\right),\dots\:,{\left|{e}_{d\psi\:}\right|}^{{\gamma\:}_{d}}sign\left({e}_{d\psi\:}\right)\right]}^{T}\).

Set \(\:{e}_{d2}=\widehat{d}-d\), and unite the (5) and (21), the error model of the disturbance observer can be expressed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}{\dot{e}}_{d1}={\dot{\widehat{x}}}_{2}-{\dot{x}}_{2}=-{k}_{d1}\left(si{g}^{{\gamma\:}_{d}}\right({e}_{d1})+{e}_{d1})+{e}_{d2}\\\:{\dot{e}}_{d2}=\dot{\widehat{d}}-\dot{d}=-{k}_{d2}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}\left(si{g}^{{\gamma\:}_{d}}\right({e}_{d1})+{e}_{d1})-\dot{d}\end{array}\right.\end{array}$$
(22)

.

Stability proof of finite time disturbance observer

The proof of the finite time convergence of the proposed observer is derived as follows:

Select the Lyapunov function as follows:

$$\:\begin{array}{c}{V}_{d}={\xi\:}^{T}A\xi\:\end{array}$$
(23)

.

where \(\:\xi\:={\left[si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1},{e}_{2}\right]}^{T}\), \(\:A\) is the positive definite symmetric matrix, and derivate \(\:\xi\:\),

$$\:\begin{array}{c}\begin{array}{c}\dot{\xi\:}=\left[{\gamma\:}_{d}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}{\dot{e}}_{d1},{e}_{d2}\right]\\\:=\left[\begin{array}{c}{\gamma\:}_{d1}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}\left[-{k}_{d1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)+{e}_{d2}\right]\\\:-\frac{1}{2}{k}_{d2}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)\end{array}\right]+\\\:\left[\begin{array}{c}-{k}_{d1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)+{e}_{d2}\\\:-\frac{1}{2}{k}_{d2}{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}\left(si{g}^{{\gamma\:}_{d}}\left({e}_{d1}\right)+{e}_{d1}\right)\end{array}\right]+\left[\begin{array}{c}0\\\:-\dot{d}\end{array}\right]\end{array}\end{array}$$
(24)

.

Substituting (22) into (24),

$$\:\begin{array}{c}\dot{\xi\:}={\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}{P}_{1}\xi\:+{P}_{2}\xi\:+D\end{array}$$
(25)

.

where.

$$\:\begin{array}{c}{P}_{1}={\left[\begin{array}{c}-{\gamma\:}_{d}{k}_{d1},{\gamma\:}_{d}\\\:-\frac{1}{2}{k}_{d2},0\end{array}\right]}^{T}\end{array},\:\begin{array}{c}{P}_{2}={\left[\begin{array}{c}-{k}_{d1},1\\\:-\frac{1}{2}{k}_{d2,}0\end{array}\right]}^{T}\end{array},\:\begin{array}{c}D=\left[\begin{array}{c}0\\\:-\dot{d}\end{array}\right]\end{array}$$

The derivative of \(\:{V}_{d}\) is given as follows:

$$\:\begin{array}{c}{\dot{V}}_{d}={\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}{\xi\:}^{T}\left({P}_{1}^{T}A+A{P}_{1}\right)\xi\:+{\xi\:}^{T}\left({P}_{2}^{T}A+A{P}_{2}\right)\xi\:+2{\xi\:}^{T}AD\end{array}$$
(26)

.

\(\:{P}_{1}\), \(\:{\:P}_{2}\:\)are Herwitz matrix, and \(\:A\) is positive definite symmetric matrix, hence, there exist the positive definite matrix \(\:{Q}_{1}\), \(\:{Q}_{2}\), and satisfying

$$\:\begin{array}{c}\left\{\begin{array}{c}{P}_{1}^{T}A+A{P}_{1}=-{Q}_{1}\\\:{P}_{2}^{T}A+A{P}_{2}=-{Q}_{2}\end{array}\right.\end{array}$$
(27)

.

Substituting the (27) into (26),

$$\:\begin{array}{c}{\dot{V}}_{d}=-{\left|{e}_{d1}\right|}^{{\gamma\:}_{d}-1}{\xi\:}^{T}{Q}_{1}\xi\:-{\xi\:}^{T}{Q}_{2}\xi\:+2{\xi\:}^{T}AD\end{array}$$
(28)

.

According to the definition of the Euclidean norm, \(\:\parallel{e}_{d1}\parallel<{\parallel\xi\:\parallel}^{1/{\gamma\:}_{d}}\), and substituting it into (28),

$$\:\begin{array}{c}{\dot{V}}_{d}\le\:-{\parallel\xi\:\parallel}^{\left({\gamma\:}_{d}-1\right)/{\gamma\:}_{d}}{\xi\:}^{T}{Q}_{1}\xi\:-{\xi\:}^{T}{Q}_{2}\xi\:+2{\xi\:}^{T}AD\end{array}$$
(29)

.

Since \(\:{Q}_{1}\), \(\:{Q}_{2}\) are positive definite matrix, it can be obtained

$$\:\begin{array}{c}{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{i}\right){\parallel\xi\:\parallel}^{2}\le\:{\xi\:}^{T}{Q}_{i}\xi\:\le\:{\lambda\:}_{\text{m}\text{a}\text{x}}\left({Q}_{i}\right){\parallel\xi\:\parallel}^{2},\left(i=1.2\right)\end{array}$$
(30)

.

where \(\:{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{i}\right),\left(\text{i}=1.2\right)\) represents the minimum eigenvalue of the matrix \(\:{Q}_{1}\) and \(\:{Q}_{2}\), \(\:{\lambda\:}_{\text{m}\text{a}\text{x}}\left({Q}_{i}\right),\left(\text{i}=1.2\right)\) represents the max eigenvalue of the matrix \(\:{Q}_{1}\) and \(\:{Q}_{2}\).

Substituting (30) into (29),

$$\:\begin{array}{c}{\dot{V}}_{d}\le\:-{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{1}\right){\parallel\xi\:\parallel}^{\left(3{\gamma\:}_{d}-1\right)/{\gamma\:}_{d}}-{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{2}\right){\parallel\xi\:\parallel}^{2}+2\parallel\xi\:\parallel\parallel\:A\parallel\parallel\:D\parallel\end{array}$$
(31)

.

According to (27), \(\:{\lambda\:}_{\text{m}\text{i}\text{n}}\left(A\right){\parallel\xi\:\parallel}^{2}\le\:{V}_{d}\le\:{\lambda\:}_{\text{m}\text{a}\text{x}}\left(A\right){\parallel\xi\:\parallel}^{2}\), and substituting it into (31),

$$\:\begin{array}{c}\begin{array}{c}{\dot{V}}_{d}\le\:-{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{1}\right){\lambda\:}_{\text{m}\text{i}\text{n}}{\left(A\right)}^{-\left(3{\gamma\:}_{d}-1\right)/2{\gamma\:}_{d}}{V}_{d}^{\left(3{\gamma\:}_{d}-1\right)/2{\gamma\:}_{d}}-{\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{2}\right){\lambda\:}_{\text{m}\text{i}\text{n}}{\left(A\right)}^{1/2}{V}_{d}+2{\lambda\:}_{\text{m}\text{a}\text{x}}{\left(A\right)}^{-1/2}\parallel\:A\:\parallel\mu\:{V}_{d}^{1/2}\\\:\le\:-{\alpha\:}_{d}{V}_{d}^{\left(3{\gamma\:}_{d}-1\right)/2{\gamma\:}_{d}}-{\beta\:}_{d}{V}_{d}+{\lambda\:}_{d}{V}_{d}^{1/2}\end{array}\end{array}$$
(32)
$$\:\text{w}\text{h}\text{e}\text{r}\text{e},\:{\gamma\:}_{d1}=\left(3{\gamma\:}_{d}-1\right)/2{\gamma\:}_{d},\:{\alpha\:}_{d}={\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{1}\right){\lambda\:}_{\text{m}\text{i}\text{n}}{\left(A\right)}^{-\left(3{\gamma\:}_{d}-1\right)/2{\gamma\:}_{d}},\:{\beta\:}_{d}={\lambda\:}_{\text{m}\text{i}\text{n}}\left({Q}_{2}\right){\lambda\:}_{\text{m}\text{i}\text{n}}{\left(A\right)}^{1/2},\:{\lambda\:}_{d}=2{\lambda\:}_{\text{m}\text{a}\text{x}}{\left(A\right)}^{-1/2}\parallel\:A\parallel\mu\:.$$

.

On account of \(\:{\gamma\:}_{d}\in\:\left(\frac{1}{2},1\right)\), \(\:\frac{1}{2}<{\gamma\:}_{d1}<1\), and \(\:{\alpha\:}_{d},{\beta\:}_{d},{\lambda\:}_{d}>0\), hence, the (32) satisfies the Lemma 2, the second order disturbance observer (21) can converge within a finite time, and the convergence domain \(\:{D}_{d}\) and the convergence time \(\:{T}_{d}\) can be expressed as follows:

$$\:{D}_{d}=\left\{x\left|{\mu\:}_{d1}{V}_{d}^{{\gamma\:}_{d1}-1/2}\right(x)+{\mu\:}_{d2}{V}_{d}^{1/2}(x)\le\:{\lambda\:}_{d}\right\},\:{T}_{d}\le\:\frac{1}{\left({\beta\:}_{d}-{\mu\:}_{d1}\right)\left(1-{\gamma\:}_{d1}\right)}\text{l}\text{n}\left(\frac{\left({\beta\:}_{d}-{\mu\:}_{2}\right){V}_{d0}^{1-{\gamma\:}_{d1}}}{{\alpha\:}_{d}-{\mu\:}_{d1}}+1\right)$$

where \(\:0<{\mu\:}_{d1}<{\alpha\:}_{d},0<{\mu\:}_{d2}<{\beta\:}_{d}\).

NSTSTSM controller design

To enhance the trajectory tracking performance of quadrotor UAV and weaken the buffeting phenomenon, by taking advantage of the finite-time convergence characteristic of the non-singular terminal sliding mode surface and the reducing chattering characteristic of the STSM, a NSTSTSM controller is designed for quadrotor UAV in this paper. Meanwhile, to further improve the response speed of the control system, the STSM is improved which a linear term is introduced to the reaching law.

Considering the quadrotor UAV dynamics mode (5), the sliding surface is designed as follows:

$$\:\begin{array}{c}s={e}_{1}+\frac{1}{\beta\:}{e}_{2}^{{{p}_{1}/q}_{1}}\end{array}$$
(33)

.

where \(\:\beta\:>0\), \(\:{p}_{1}\) and \(\:{q}_{1}\) are positive odd number, and \(\:{p}_{1}>{q}_{1}\), \(\:{e}_{1}={x}_{1}-{x}_{1d}\), the desired value \(\:{x}_{1d}={\left[{x}_{d},{y}_{d},{z}_{d},{\phi\:}_{d},{\theta\:}_{d},{\psi\:}_{d}\right]}^{T}\), \(\:{e}_{2}={x}_{2}-{\dot{x}}_{1d}\), \(\:{\dot{e}}_{1}={e}_{2}\).

Considering the quadrotor UAV dynamics mode (5), the NSTSTSM controller is designed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}u=-g{\left({x}_{2}\right)}^{-1}\left(f\left({x}_{2}\right)+\beta\:\frac{{q}_{1}}{{p}_{1}}{e}_{2}^{2-{p}_{1}/{q}_{1}}-{\ddot{x}}_{1d}+\widehat{d}+{k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}sign\left(s\right)-z\right)\\\:\dot{z}=-{k}_{2}sign\left(s\right)\end{array}\right.\end{array}$$
(34)

.

where \(\:1<{q}_{1}/{p}_{1}<2\), \(\:{k}_{1},{k}_{2},{k}_{3}>0\). \(\:\widehat{d}\) is the estimation value of the disturbance \(\:d\), which is from the observer (21).

There exists the exponential term \(\:{e}_{1}^{{p}_{1}/{q}_{1}-1}{\dot{e}}_{1}\) (\(\:{p}_{1},{q}_{1}\) are positive odd numbers, and \(\:{p}_{1}>{q}_{1}\)) in the traditional terminal sliding model arithmetic, and the exponential of it satisfies \(\:{p}_{1}/{q}_{1}-1<0\). When \(\:{e}_{i}=0\) and \(\:{\dot{e}}_{i}\ne\:0\), the traditional terminal sliding mode controller will have singularity problems. The exponent of exponential term \(\:{e}_{2}^{2-{p}_{1}/{q}_{1}}\) is \(\:2-{p}_{1}/{q}_{1}>0\) (\(\:1<{q}_{1}/{p}_{1}<2\), \(\:{G}_{i}\) and \(\:{H}_{i}\) are positive odd number) in the controller (34), so that the controller (34) is no problem of singular values.

In the controller (34), \(\:{k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}\) is used instead of \(\:{k}_{1}{\left|s\right|}^{1/2}\) in the traditional STSM control scheme. That is, a linear term has been introduced to the reaching law of the traditional STSM control mothed. Meanwhile, by adjusting the gain coefficient \(\:{k}_{3}\), it can enhance the improvement of the convergence speed of the STSM, while maintain the characteristic that the STSM can reject the chattering phenomenon.

Stability proof of NSTSTSM controller

The proof of the finite time convergence of the NSTSTSM controller (34) is deduced as follows:

Substituting the controller (34) into (5), and \(\:{e}_{2}={x}_{2}-{\dot{x}}_{1d}\), as

$$\:\begin{array}{c}\begin{array}{c}{\dot{e}}_{2}={\dot{x}}_{2}-{\ddot{x}}_{1d}\\\:=-\beta\:\frac{{q}_{1}}{{p}_{1}}{e}_{2}^{2-{p}_{1}/{q}_{1}}-{k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}sign\left(s\right)+z-{e}_{d2}\end{array}\end{array}$$
(35)

.

Take the derivative of \(\:s\), and substituting (35) into it, as

$$\:\begin{array}{c}\begin{array}{c}\dot{s}={e}_{2}+\frac{{p}_{1}}{\beta\:{q}_{1}}{e}_{2}^{{p}_{1}/{q}_{1}-1}{\dot{e}}_{2}\\\:=\frac{{p}_{1}}{\beta\:{q}_{1}}{e}_{2}^{{p}_{1}/{q}_{1}-1}\left(-{k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}sign\left(s\right)+z-{e}_{d2}\right)\end{array}\end{array}$$
(36)

.

Set \(\:{z}_{1}=z-{e}_{d2}\), \(\:{\dot{z}}_{1}={-k}_{2}sign\left(s\right)-{\dot{e}}_{d2}\), \(\:H=\frac{{p}_{1}}{\beta\:{q}_{1}}{e}_{2}^{{p}_{1}/{q}_{1}-1}>0\), and substituting them into (36)

$$\:\begin{array}{c}\left\{\begin{array}{c}\dot{s}=H\left(-{k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}sign\left(s\right)+{z}_{1}\right)\\\:{\dot{z}}_{1}={-k}_{2}sign\left(s\right)-{\dot{e}}_{d2}\end{array}\right.\end{array}$$
(37)

.

Define the process variables,

$$\:\begin{array}{c}\left\{\begin{array}{c}{\xi\:}_{1}={k}_{1}\sqrt{{s}^{2}+{k}_{3}\left|s\right|}sign\left(s\right)\\\:{\xi\:}_{2}={z}_{1}\\\:\xi\:={\left[{\xi\:}_{1},{\xi\:}_{2}\right]}^{T}\end{array}\right.\end{array}$$
(38)

.

Take the derivative of \(\:\xi\:\),

$$\:\dot{\xi\:}={\left[{\dot{\xi\:}}_{1},{\dot{\xi\:}}_{2}\right]}^{T}=\frac{H}{\left|{\xi\:}_{1}\right|}{B}_{1}\xi\:+\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{B}_{2}\xi\:+{D}_{1}$$
(39)

.

The detailed derivation process can be found in Appendix A.

where

$$\:{B}_{1}=\left[\begin{array}{c}\frac{-{k}_{1}{k}_{3}}{2},\frac{1}{2}\\\:-{k}_{2},0\end{array}\right],\:{B}_{2}=\left[\begin{array}{c}-{k}_{1},1\\\:\text{0,0}\end{array}\right],\:{D}_{1}=\left[\begin{array}{c}0\\\:-{\dot{e}}_{d2}\end{array}\right]$$

.

Select the Lyapunov function as

$$\:\begin{array}{c}V={\xi\:}^{T}F\xi\:\end{array}$$
(40)

.

where \(\:F\) is positive definite symmetric matrix.

Take the derivative of \(\:V\) as follow:

$$\:\begin{array}{c}\begin{array}{c}\dot{V}=\frac{H}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{B}_{1}^{T}F\xi\:+\frac{H}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{B}_{1}F\xi\:+\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{B}_{2}^{T}F\xi\:+\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{B}_{1}F\xi\:+2{\xi\:}^{T}F{D}_{1}\\\:=\frac{H}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}\left({B}_{1}^{T}F+F{B}_{1}\right)\xi\:+\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}\left({B}_{2}^{T}F+{FB}_{2}\right)\xi\:+2{\xi\:}^{T}F{D}_{1}\end{array}\end{array}$$
(41)

.

The matrix \(\:{B}_{1}\) is the Herwitz matrix, so that the positive definite matrix \(\:{R}_{1}\) satisfies \(\:{B}_{1}^{T}F+F{B}_{1}={-R}_{1}\). For the convenience of calculation, \(\:{R}_{1}=I\) (\(\:I\) is the unit matrix.). Set the positive definite symmetric matrix \(\:F=\left[\begin{array}{c}{F}_{11},{F}_{12}\\\:{F}_{21},{F}_{22}\end{array}\right]\) as follows:

$$\:\begin{array}{c}{F}_{11}=\frac{1+2{k}_{2}}{{k}_{1}{k}_{3}},{F}_{12}={F}_{21}=-1,{F}_{22}=\frac{{k}_{1}{k}_{3}}{2{k}_{2}}+\frac{1+2{k}_{2}}{2{k}_{1}{k}_{2}{k}_{3}}\end{array}$$
(42)

.

Unite (41) and (42),

$$\:\begin{array}{c}\dot{V}=-\frac{H}{\left|{\xi\:}_{1}\right|}{\parallel\xi\:\parallel}^{2}+\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}\left({B}_{2}^{T}F+F{B}_{2}\right)\xi\:+2{\xi\:}^{T}F{D}_{1}\end{array}$$
(43)

.

Define \(\:{B}_{2}^{T}F+F{B}_{2}={-R}_{2}\), as

$$\:\begin{array}{c}{B}_{2}^{T}F+F{B}_{2}={-R}_{2}=-\left[\begin{array}{c}{r}_{11},{r}_{12}\\\:{r}_{21},{r}_{22}\end{array}\right]\end{array}$$
(44)

.

Substitute \(\:F\) into (44), as

$$\:\begin{array}{c}{r}_{11}=\frac{2\left(1+2{k}_{2}\right)}{{k}_{3}},{r}_{12}={r}_{21}=-\left({k}_{1}+\frac{1+2{k}_{2}}{{k}_{1}{k}_{3}}\right),{r}_{22}=2\end{array}$$
(45)

.

\(\:{R}_{2}\) is positive definite symmetric matrix, so that \(\:\begin{array}{c}\left\{\begin{array}{c}{r}_{11}>0\\\:{r}_{11}{r}_{22}-{r}_{12}{r}_{21}>0\end{array}\right.\end{array}\), and it can also be expressed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}\frac{1+2{k}_{2}}{{k}_{3}}>0\\\:\frac{4\left(1+2{k}_{2}\right)}{{k}_{3}}+{\left({k}_{1}+\frac{1+2{k}_{2}}{{k}_{1}{k}_{3}}\right)}^{2}>0\end{array}\right.\end{array}$$
(46)

.

For the first inequality, \(\:{k}_{3}>0\), so, \(\:\left(1+2{k}_{2}\right)>0\), that is, \(\:{k}_{2}>-\frac{1}{2}\). For the second inequality, \(\:{k}_{1},{k}_{2}\) are rational number. \(\:\dot{V}\) can be expressed as follows:

$$\:\begin{array}{c}\dot{V}=-\frac{H}{\left|{\xi\:}_{1}\right|}{\parallel\xi\:\parallel}^{2}-\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{R}_{2}\xi\:+2{\xi\:}^{T}F{D}_{1}\end{array}$$
(47)

.

According to the definition of Euclidean norm, \(\:\left|{\xi\:}_{1}\right|\le\:\parallel\xi\:\parallel\), and \(\:H>0\), so

$$\:\begin{array}{c}\dot{V}\le\:-H\parallel\xi\:\parallel-\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\xi\:}^{T}{R}_{2}\xi\:+2{\xi\:}^{T}F{D}_{1}\end{array}$$
(48)

.

On account of \(\:{\lambda\:}_{\text{m}\text{i}\text{n}}{\parallel\xi\:\parallel}^{2}\le\:{\xi\:}^{T}{R}_{2}\xi\:\le\:{\lambda\:}_{\text{m}\text{a}\text{x}}{\parallel\xi\:\parallel}^{2}\), \(\:{\lambda\:}_{\text{m}\text{i}\text{n}}\left({R}_{2}\right)\), \(\:{\lambda\:}_{\text{m}\text{a}\text{x}}\left({R}_{2}\right)\) are the maximum and minimum eigenvalues of the matrix \(\:{R}_{2}\) respectively.

$$\:\begin{array}{c}\begin{array}{c}\dot{V}\le\:-\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\lambda\:}_{\text{m}\text{i}\text{n}}\left({R}_{2}\right){\parallel\xi\:\parallel}^{2}-H\parallel\xi\:\parallel+2\parallel\xi\:\parallel\parallel\:F\parallel\parallel\:{D}_{1}\parallel\\\:\le\:-{\alpha\:}_{1}V-{\beta\:}_{1}{V}^{1/2}+{c}^{*}\end{array}\end{array}$$
(49)
$$\:\text{w}\text{h}\text{e}\text{r}\text{e}\:{\alpha\:}_{1}=\frac{\left|s\right|}{\left|{\xi\:}_{1}\right|}{\lambda\:}_{\text{m}\text{i}\text{n}}\left({R}_{2}\right)>0,\:{\beta\:}_{1}=H>0,\:{c}^{*}=2\mu\:\parallel\xi\:\parallel\parallel\:F\parallel>0.$$

.

According to Lemma 3, it can be proved that the sliding mode surface \(\:s\) converges in finite time, and the convergence time \(\:{T}_{1}\) satisfies \(\:{T}_{1}\le\:\frac{2}{{\alpha\:}_{1}}\text{l}\text{n}\frac{{\alpha\:}_{1}{V}^{1/2}+\lambda\:{\beta\:}_{1}}{\lambda\:{\beta\:}_{1}}\), where \(\:0\le\:\lambda\:\le\:1\).

Suppose when \(\:t={t}_{r}\), the state of control system arrives the sliding surface \(\:s\). When \(\:t\ge\:{t}_{r}\),

$$\:\begin{array}{c}s={e}_{1}+\frac{1}{\beta\:}{e}_{2}^{{p}_{1}/{q}_{1}}=0\end{array}$$
(50)

.

On account of \(\:{e}_{2}=d{e}_{1}/dt\), so

$$\:\begin{array}{c}\begin{array}{c}\frac{d{e}_{1}}{dt}=-\beta\:{e}_{1}^{{q}_{1}/{p}_{1}}\\\:dt=-\frac{1}{\beta\:}{e}_{1}^{-{q}_{1}/{p}_{1}}\end{array}\end{array}$$
(51)

.

Integrate both sides of the second equation of (51) simultaneously,

$$\:\begin{array}{c}{\int\:}_{0}^{{t}_{r}}dt={\int\:}_{{e}_{1}\left(0\right)}^{0}-\frac{1}{\beta\:}{e}_{1}^{-{q}_{1}/{p}_{1}}d{e}_{1}\end{array}$$
(52)

.

The solution that can be obtained from the equation is

$$\:\begin{array}{c}{t}_{r}=\frac{{p}_{1}}{\beta\:\left({p}_{1}-{q}_{1}\right)}{\left|{e}_{1}\left(0\right)\right|}^{\left({p}_{1}-{q}_{1}\right)/{p}_{1}}\end{array}$$
(53)

.

Thus, it is obtained that for any initial state \(\:{e}_{1}\left(0\right)\), the time to reach the equilibrium state along the sliding mode surface (33) is \(\:{t}_{r}\). Therefore, under the NSTSTSM controller (34), the trajectory tracking system of the quadrotor UAV (15) converges in a finite time.

Quadrotor UAV formation flight controller design

The formation flight control system structure diagram is shown in Fig. 4. The pilot-follower formation control strategy is adopted in the paper by constructing the positional relationship between the pilot aircraft and the follower. During the formation flight, the leader is required to track the desired trajectory, and the tracking desired trajectory of the follower is calculated through the positional relationship between the leader and follower. The construction and solution of the positional relationship between the two UAVs are respectively accomplished by the formation flight position system and the formation flight controller. The input state of the formation flight position system is the position and attitude of the two UAVs, and the output state of the formation flight position system is the desired tracking trajectory of the follower. The formation flight control scheme is designed as follows:

Fig. 4
figure 4

Structure diagram of formation flight control system.

For the formation flight position system (11), the sliding mode surface is designed as

$$\:\begin{array}{c}{s}_{m}={x}_{m}+{c}_{m}\int\:{x}_{m}dt\end{array}$$
(54)

.

where \(\:{c}_{m}>0\).

The super twisting sliding controller for UAV formation is designed as follows:

$$\:\begin{array}{c}\left\{\begin{array}{c}v=-G\left({x}_{m}\right)\left(F\left({x}_{m}\right)+{c}_{m}{x}_{m}+{k}_{m1}\sqrt{{s}_{m}^{2}+{k}_{m3}\left|{s}_{m}\right|}sign\left({s}_{m}\right)-{z}_{m}\right)\\\:{\dot{z}}_{m}={k}_{m2}sign\left({s}_{m}\right)\end{array}\right.\end{array}$$
(55)

.

The stability of the proposed controller is proved below.

Substitute the controller (55) into the system (11),

$$\:\begin{array}{c}{\dot{x}}_{m}=-{c}_{m}{x}_{m}-{k}_{m1}\sqrt{{s}_{m}^{2}+{k}_{m3}\left|{s}_{m}\right|}sign\left({s}_{m}\right)+{z}_{m}\end{array}$$
(56)

.

Take the derivative of \(\:{s}_{m}\),

$$\:\begin{array}{c}\begin{array}{c}{\dot{s}}_{m}={\dot{x}}_{m}+{c}_{m}{x}_{m}\\\:=-{k}_{m1}\sqrt{{s}_{m}^{2}+{k}_{m3}\left|{s}_{m}\right|}+{z}_{m}\end{array}\end{array}$$
(57)

.

Define the process variables,

$$\:\begin{array}{c}\left\{\begin{array}{c}{\xi\:}_{m1}={k}_{m1}\sqrt{{s}_{m}^{2}+{k}_{m3}\left|{s}_{m}\right|}sign\left({s}_{m}\right)\\\:{\xi\:}_{m2}={z}_{m}\\\:{\xi\:}_{m}={\left[{\xi\:}_{m1},{\xi\:}_{m2}\right]}^{T}\end{array}\right.\end{array}$$
(58)

.

Select the Lyapunov function as

$$\:\begin{array}{c}{V}_{m}={\xi\:}_{m}^{T}M{\xi\:}_{m}\end{array}$$
(59)

.

Similar to the stability proof of the trajectory tracking controller for quadrotor UAV. Take the derivative of \(\:{V}_{m}\),

$$\:\begin{array}{c}{\dot{V}}_{m}=-\frac{1}{\left|{\xi\:}_{m1}\right|}{\parallel{\xi\:}_{m}\parallel}^{2}-\frac{\left|{s}_{m}\right|}{\left|{\xi\:}_{m1}\right|}{\xi\:}_{m}^{2}{R}_{m}{\xi\:}_{m}\end{array}$$
(60)

.

When \(\:{k}_{m1}>0\) and \(\:{k}_{m1},{k}_{m2}\) are elements of the same Herwitz matrix, \(\:{R}_{m}\) is positive definite matrix. The (60) can be expressed as follows

$$\:\begin{array}{c}{\dot{V}}_{m}\le\:-\frac{1}{\left|{\xi\:}_{m1}\right|}{\parallel{\xi\:}_{m}\parallel}^{2}\end{array}$$
(61)

.

According to the definition of Euclidean norm, \(\:\left|{\xi\:}_{m1}\right|\le\:\parallel{\xi\:}_{m}\parallel\).

$$\:\begin{array}{c}\begin{array}{c}{\dot{V}}_{m}\le\:-\parallel{\xi\:}_{m}\parallel\\\:\le\:{V}_{m}^{1/2}\end{array}\end{array}$$
(62)

.

According to the Lemma 1, \(\:{s}_{m}\) can converge in finite time, and the convergence time satisfies \(\:T\le\:{V}_{m}{\left(0\right)}^{1/2}\).

Simulation experiment

Trajectory tracking simulation experiment of quadrotor UAV

In order to verify that the NSTSTSM control algorithm (NTSTSM) designed in the paper can effectively control the quadrotor UAV in the formation, the simulation experiments are carried out. the main parameters of the quadrotor UAV are shown in Table 1.

Table 1 The main parameters of the quadrotor UAV.

In order to verify the superiority of the designed NTSTSM method, traditional STSM algorithm and fast non-singular terminal sliding mode algorithm (FNTSM)41 are used for comparative simulation. When \(\:t=0\)s, the initial position of the quadrotor UAV is \(\:{[{x}_{0},{y}_{0},{z}_{0}]}^{T}={[\text{0,0},0]}^{T}\), the initial attitude\(\:\:{\left[{\phi\:}_{0},{\theta\:}_{0},{\psi\:}_{0}\right]}^{T}={\left[\text{0,0},0\right]}^{T}\), the desired tracking trajectory is a circular trajectory, i.e., \(\:{x}_{d}=\text{s}\text{i}\text{n}\left(2\pi\:t/5\right)\), \(\:{y}_{d}=\text{c}\text{o}\text{s}\left(2\pi\:t/5\right)\), \(\:{z}_{d}=1\), and the desired yaw angle is set to 0. The parameters of the designed NTSTSM controller (34) were designed as \(\:\beta\:=diag\left[\text{5,5},\text{5,15,15,15},\right]\), \(\:{p}_{1}=7\), \(\:{q}_{1}=5\), \(\:{k}_{1}=diag\left[\text{8,8},\text{5,30,30,30}\right]\), \(\:{k}_{2}=diag\left[\text{1,1},\text{1,10,10,10}\right]\), \(\:{k}_{3}=diag\left[\text{2,2},\text{2,5},\text{5,5}\right]\).

Figure 5 shows a three-dimensional diagram of the tracking trajectory of the quadrotor UAV. It can be clearly seen that all three control methods can enable the quadrotor UAV to track the desired circular trajectory.

Fig. 5
figure 5

three-dimensional diagram of trajectory of the quadcopter UAV.

Fig. 6
figure 6

Trajectory tracking curve of quadrotor UAV.

Fig. 7
figure 7

trajectory tracking error of quadrotor UAV.

Figures 6 and 7 respectively show the tracking trajectories and tracking errors of the quadrotor UAV in the x, y, and z axes. From Fig. 6, it can be seen that the desired tracking trajectories of the quadrotor UAV in the x, y, and z axes are sinusoidal signals, cosine signals, and step signals respectively. For convenience, the convergence times and steady-state errors of the three methods in the x, y, and z channels are shown in Tables 2 and 3. Through quantitative comparison, it can be concluded that: when there is a large initial error in the tracking trajectory, the convergence speed of the NTSTSM method is at least 20% faster than that of the STSM method and slightly faster than that of the FNTSM method. When tracking the changing trajectory, the steady-state error of the NTSTSM method is at least 50% smaller than that of the STSM method and the FNTSM method. It is worth noting that, from Figs. 7(a) and 7(b), it can be seen that compared with the other two control methods, the steady-state error of the NTSTSM method not only has a smaller amplitude but is also more stable. In summary, the NTSTSM method designed in the paper has a faster response speed, higher convergence accuracy and better dynamic performance in the trajectory tracking control of the quadrotor UAV compared with the STSM algorithm and the NTSTSM algorithm.

Table 2 Convergence time of quadrotor UAV trajectory tracking.
Table 3 Steady state error of quadrotor UAV trajectory tracking.
Fig. 8
figure 8

Attitude tracking curve of quadrotor UAV.

Fig. 9
figure 9

Attitude tracking error of quadrotor UAV.

Figures 8 and 9 respectively show the attitude tracking and tracking errors of the quadrotor UAV. By observing these figures, the tracking convergence times and steady-state errors of the three methods for the attitude can be obtained, as shown in Tables 4 and 5. From Table 4, it can be seen that the NTSTSM method does not have a faster tracking convergence speed of roll angle and pitch angle compared to the other two methods. The reason for this is that the attitude loop is the inner loop of the quadrotor UAV control system, and the desired control target is derived from the position loop. The result of the calculation is usually a rapid transformation of complex signals, so the gain of the inner loop of the controller is usually much larger than that of the outer loop. While the reaching law of the NTSTSM method is a linear function, under the effect of a large gain, it is prone to overshoot when tracking such a fast and complex trajectory, resulting in a slower convergence time. From Fig. 9; Table 5, it can be seen that after the attitude tracking curve converges, the steady-state error of the NTSTSM method is much smaller than the other two control methods, and compared with the STSM method, the error curve is more straight and stable after convergence. In conclusion, the designed NTSTSM method has higher convergence accuracy and better dynamic performance in quadrotor UAV attitude tracking compared to the STSM method and the FNTSM method.

Table 4 Convergence time of quadrotor UAV attitude tracking.
Table 5 Steady state error of quadrotor UAV attitude tracking.

Trajectory tracking simulation experiment of quadrotor UAV formation

In order to verify that the proposed control scheme can effectively control the quadrotor UAVs formation flight, the simulation experiments are carried out by using Simulink. The formation flight structure of the quadrotor UAV is shown in Fig. 10, and the formation includes a leader and two followers. The formation flight of three UAVs forms an isosceles right triangle with a waist length of \(\:\sqrt{2}\text{m}\). Set that the parameters of the follower 1 are \(\:{\lambda\:}_{x}^{d}=1\), \(\:{\lambda\:}_{y}^{d}=1\) and \(\:{\psi\:}_{L}=0\), and the parameters of the follower 2 are \(\:{\lambda\:}_{x}^{d}=-1\), \(\:{\lambda\:}_{y}^{d}=1\) and \(\:{\psi\:}_{L}=0\).

Fig. 10
figure 10

Formation flight structure of quadrotor UAVs.

The simulation experiment process is as follows: Three UAVs are lined up in a row at the initial position. After ascending to a horizontal height of 1 m, the quadrotor UAVs fly forward in an S-shaped trajectory along the positive Y-axis direction of the inertial coordinate system in a triangular formation. The initial values are set as: when \(\:t=0\), the initial coordinate value of leader is \(\:[\text{0,0},0]\), the initial coordinate value of follower 1 is \(\:[-\text{1,0},0]\), the initial coordinate value of follower 2 is \(\:[\text{1,0},0]\), the desired tacking trajectory of the leader is \(\:{x}_{d}=0.5\text{s}\text{i}\text{n}(2\pi\:t/10),{y}_{d}=0.5t,{z}_{d}=1,{\psi\:}_{d}=0\).

In order to verify that the designed quadrotor UAV formation flight control scheme can ensure the stable flight of the quadrotor UAV formation suffering from complex disturbances, the different disturbances are set for the three quadrotor UAVs respectively. In order to simulate the impact of disordered air currents and the disturbances of gusts of varying directions and magnitudes on quadrotor UAVs during flight, the step signals of different amplitudes and sinusoidal signals of different periods and amplitudes are used to simulate external disturbances. Suppose that the position and attitude of each quadrotor UAV are suffering from the same disturbances, \(\:{d}_{\phi\:}={d}_{\theta\:}={d}_{\psi\:}={d}_{x}={d}_{y}={d}_{z}\). Set the disturbances in segments: when \(\:t<10\text{s}\), the disturbances are not added. When \(\:10\text{s}\le\:t\le\:20\text{s}\), the step disturbances are added. When \(\:t>20\text{s}\), the primary disturbances are added on the basis of step disturbances. The values of the disturbances are shown in Table 6.

Table 6 The values of the disturbances.

The parameters of the controller for leader are set as: \(\:\beta\:=diag\left[\text{5,5},\text{5,15,15,15},\right]\), \(\:{p}_{1}=7\), \(\:{q}_{1}=5\), \(\:{k}_{1}=diag\left[\text{5,5},\text{5,30,30,30}\right]\), \(\:{k}_{2}=diag\left[\text{0.5,0.5,0.5,10,10,10}\right]\), \(\:{k}_{3}=diag\left[\text{2,2},\text{2,5},\text{5,5}\right]\). The parameters of the controller for follower are set as: \(\:\beta\:=diag\left[\text{5,5},\text{5,15,15,15},\right]\), \(\:{p}_{1}=7\), \(\:{q}_{1}=5\), \(\:{k}_{1}=diag\left[\text{5,5},\text{5,30,30,30}\right]\), \(\:{k}_{2}=diag\left[\text{0.1,0.1,0.1,10,10,10}\right]\), \(\:{k}_{m3}=diag\left[\text{0.01,0.01,0.01}\right]\). The parameters of the disturbance observer are set as: \(\:{k}_{d1}=diag\left[\text{4,4},\text{4,4},\text{4,4}\right]\), \(\:{k}_{d2}=diag\left[\text{200,200,200,200,200,200}\right]\), \(\:{\gamma\:}_{d}=5/7\). The parameters of the formation flight controller are set as: \(\:{c}_{m}=diag\left[\text{1,1},1\right]\), \(\:{k}_{m1}=diag\left[\text{2,2},2\right]\), \(\:{k}_{m2}=diag\left[\text{0.1,0.1,0.1}\right]\), \(\:{k}_{m3}=diag\left[\text{0.01,0.01,0.01}\right]\).

The Fig. 11 shows the three-dimensional diagram of trajectory of the formation flight, and the Fig. 12 shows the horizontal projection of tracking trajectory of formation flight on the x-y plane. From the Figs. 11 and 12, it can be obtained that under the proposed control scheme in the paper, three UAVs can form the set triangular formation from the initial positions lined up in a row, and maintain the formation to fly forward along the S-shaped trajectory.

Fig. 11
figure 11

Three-dimensional diagram of trajectory of the formation flight.

Fig. 12
figure 12

Horizontal projection of tracking trajectory of formation flight.

The Fig. 13 shows the tracking trajectory of the formation flight on the \(\:x\), \(\:y\), \(\:z\) channel. It can be seen from the initial tracking stage (0–1 s) that the tracking trajectory of the leader can track the desired trajectory within 1 s in three channels, and the tracking trajectory of the follower can track the desired trajectory within 4 s in \(\:x\) channel, and the tracking trajectory of the follower can track the desired trajectory within 2 s in \(\:y\), \(\:z\) channel. The reason for the above result is that the position control of the UAVs formation flight adopts the pilot-follower control scheme, and the tracking trajectory of the leader is set, while the tracking trajectory of the follower is calculated from the actual flight trajectory of the leader, so that the convergence speed of tracking trajectory of the leader is faster than that of the follower. the tracking trajectory of the formation flight is projected onto the x, y and z axes, corresponding respectively to the sine function trajectory, the linear function trajectory and the step function trajectory. It can be obtained that under the non-singular terminal super twisting controller (34), the quadrotor UAVs in the formation can track the desired trajectory quickly and accurately under different initial values and different control targets.

Fig. 13
figure 13

Tracking trajectory of quadrotor UAV formation.

The Fig. 14 shows the tracking errors of quadrotor UAV in \(\:x\), \(\:y\), and \(\:z\) channels. It can be seen that the tracking error of the leader in \(\:x\), \(\:y\), and \(\:z\) channels can all converge to zero within 2 s, and the errors curves are straight and stable after convergence. The tracking error of the follower in \(\:x\), \(\:y\), and \(\:z\) channels can all converge to zero within 5s. In order to further verify the performance of the proposed control scheme, different amplitudes of step disturbances are added in 10 s after the start of the simulation, and different amplitudes and periods of sinusoidal disturbances are added in 30s. There is tiny fluctuation in the tracking error in \(\:x\) channel after the disturbances added. However, the fluctuation amplitude is within 0.01 m, which is several orders of magnitude smaller than the amplitude of the tracking trajectory and can be ignored. There is a slight fluctuation in the tracking error in \(\:x\) channel after the disturbances added. The tracking errors in the \(\:y\), and \(\:z\) channels only show slight fluctuations when disturbances are added, and remain straight and stable at other times.

Fig. 14
figure 14

Tracking error curve of quadrotor UAV.

Figures 15 and 16 show the cures of the position relationship variable \(\:{\lambda\:}_{x}\), \(\:{\lambda\:}_{y}\), \(\:{\psi\:}_{L}\) between the leader and follower in the formation and tracking errors. It can be obtained that the position relationship variable \(\:{\lambda\:}_{x}\), \(\:{\lambda\:}_{y}\) can achieve the desired trajectory tracking within 5 s, and the variable \(\:{\psi\:}_{L}\) is set to zero at the beginning, so there is no change. Hence, the STSM controller (55) can control multiple unmanned aerial vehicles at different initial positions to complete the formation quickly and accurately, and maintain the formation unchanged after the formation is formed.

Fig. 15
figure 15

Variation curve of position relationship variable between leader and follower.

Fig. 16
figure 16

Tracking error curve of position relationship variable between leader and follower.

Figures 17 and 18 shows the desired attitude and tracking trajectory of three UAVs in the formation and the tracking error of quadrotor attitude. It can be obtained from Figs. 12 and 13 that the amplitudes of the calculated desired attitude angles of the three UAVs are all of the same order of magnitude. When the UAV is subjected to the same type of interference, the variation trend of the attitude Angle is similar, thus, the formation of the quadrotor formation flight is maintained. From the attitude tracking curve, when different amplitudes of step disturbances are added to the three UAVs at 10 s, the attitude Angle tracking curves of the three UAVs show corresponding step responses, and the control system can return to stability within 0.5s. When different amplitudes and periods of the sinusoidal disturbances are added on the basis of step disturbances at 30 s, the attitude angle tracking curves of the three UAVs show corresponding sinusoidal responses. From the tracking error curve of the attitude angle, it can be seen that at the initial moment, the attitude tracking error of the leader can converge within 1 s, and the followers can converge within 2s. Therefore, it can be proved that the tracking trajectory of the quadrotor attitude can be achieved quickly and accurately under the proposed NSTSTSM controller, and the proposed control scheme can significantly enhance the disturbance rejection performance of the control system.

Fig. 17
figure 17

UAV attitude angle tracking curve.

Fig. 18
figure 18

UAV attitude angle tracking error.

Figures 19 and 20 show the estimation curves and error curves of the finite-time disturbance observer (21) for the preset disturbance. From the figures, it can be obtained that when a step disturbance is added at 10 s, for different amplitudes and directions of step interference, although there is a certain overshoot during the convergence process, all observers can complete convergence at around 0.5s, and the steady-state error is much less than 0.1. As high-gain systems, when the observer estimates sudden changes like step disturbance, a certain overshoot is a normal phenomenon, and the overshoot is within the preset disturbance amplitude, with a short occurrence time and not affecting the controller within an acceptable range. At 30 s, different amplitudes and periods of sine disturbance are added on the basis of the step disturbance. The proposed observer can still complete convergence within 0.5 s. However, from the estimation curves and error curves, it can be seen that when the observer estimates the disturbance like a sine signal with such changes, the observer actually has a certain observation delay. This is because when adjusting the gain of the observer, the overshoot and tracking accuracy are a pair of conflicting observation performances. The preset disturbance not only includes slow changes like sine but also sudden changes like step. To balance the overshoot and tracking accuracy, an appropriate gain value needs to be selected. From the figures, it can be seen that the delay error is less than 0.1 when the observer estimates the sine disturbance, which is much smaller than the disturbance amplitude. In conclusions, the proposed finite-time disturbance observer can quickly and accurately estimate different types of complex disturbances. The estimation convergence time is around 0.5s, and the steady-state error is less than 0.1.

Fig. 19
figure 19

Disturbance estimation curve.

Fig. 20
figure 20

Disturbance estimation error.

Conclusion

This paper studies the trajectory tracking and formation control problems of quadrotor UAV subject to complex and variable disturbances. With the external disturbances and internal unmodeled items suffered by the quadrotor UAV as lumped disturbances, the finite-time disturbance observer is designed to estimate the lumped disturbances and the estimation is used to compensate the controller. Combining the finite-time convergence characteristic of the non-singular terminal sliding and the buffering suppression characteristic of the STSM, a NSTSTSM controller is designed for the position and attitude tracking trajectory of quadrotor UAV. Meanwhile, Considering the condition that the UAVs are at the same height and the position relationship between the pilot and the follower, a STSM control method is designed for UAV formation controller. A linear function is introduced into the STSM reaching law to improve the response speed of the control system. The simulation results show that compared to the STSM method and the FNTSM method, the proposed NTSTSM method can has higher control stability and accuracy. The proposed control scheme can quickly and accurately form the formation and track the predetermined trajectory. Meanwhile, the disturbance observer can accurately estimate step disturbances of different amplitudes and sinusoidal signals of different periods, enabling the control system to have strong robustness.

The research in the paper still has many shortcomings. Such as, vehicle actuators and signal delays are not taken into account; the proposed formation controller is based on the premise of the same horizontal plane and does not consider the synchronous tracking control of the horizontal height. In order to improve and continue the research on the pilot-follower quadrotor UAV formation, the following aspects will be studied in detail.

(1) Extend the current pilot-follower quadrotor UAV formation control to three-dimensional space.

(2) Combine the pilot-follower control method with other distributed cooperative control methods (such as the consensus method) to achieve control of larger-scale formation groups.

(3) After studying the external disturbance problem of the quadrotor UAV formation system, research will be conducted on actuator failures, sensor failures, and communication delays between quadrotor UAVs.