Adaptive Second-order Sliding Mode Control of UAVs for Civil ...

13 downloads 202 Views 3MB Size Report
Jul 31, 2017 - experimental responses. The paper ends with a conclusion and discussion for future work. arXiv:1707.09718v1 [cs.SY] 31 Jul 2017 ...
Adaptive Second-order Sliding Mode Control of UAVs for Civil Applications V.T. Hoang, A.M. Singh, M.D. Phung and Q.P. Ha Faculty of Engineering and Information Technology University of Technology Sydney, Australia E-mail: {VanTruong.Hoang, AnsuMan.Singh, ManhDuong.Phung, Quang.Ha}@uts.edu.au

arXiv:1707.09718v1 [cs.SY] 31 Jul 2017

Abstract Quadcopters, as unmanned aerial vehicles (UAVs), have great potential in civil applications such as surveying, building monitoring, and infrastructure condition assessment. Quadcopters, however, are relatively sensitive to noises and disturbances so that their performance may be quickly downgraded in the case of inadequate control, system uncertainties and/or external disturbances. In this study, we deal with the quadrotor low-level control by proposing a robust scheme named the adaptive second-order quasi-continuous sliding mode control (adaptive 2-QCSM). The ultimate objective is for robust attitude control of the UAV in monitoring and inspection of built infrastructure. First, the mathematical model of the quadcopter is derived considering nonlinearity, strong coupling, uncertain dynamics and external disturbances. The control design includes the selection of the sliding manifold and the development of quasi-continuous second-order sliding mode controller with an adaptive gain. Stability of the overall control system is analysed by using a global Lyapunov function for convergence of both the sliding dynamics and adaptation scheme. Extensive simulations have been carried out for evaluation. Results show that the proposed controller can achieve robustness against disturbances or parameter variations and has better tracking performance in comparison with experimental responses of a UAV in a real-time monitoring task.

Keywords Quadcopter, robustness, adaptation, quasi-continuous second-order sliding mode control, monitoring system

1

Introduction

Quadcopters have found many applications in civil engineering automation due to its flexibility in operational space and ability in vertical take off and landing. These include the use of UAVs in automatic 3D reconstruction for building condition assessment [2], securing superstructures of high-rise buildings [3], or monitoring and inspection of civil infrastructure [6, 12]. In those applications, it is critical to maintain robustness and resilience of the control system to cope with the highly non-linear dynamics of quadcopters and system uncertainties, sensor noise

and coupling effects between the rotational and translational motions, or disturbances from aerodynamics and other external factors. A number of control approaches have been developed for the quadcopter in the literature, for example PD, PID control [24], H∞ control [16], optimal control [17], or potential field [21]. Among them, the sliding mode control (SMC) is widely used as it can produce a robust closedloop control system under the influence of modelling errors and external disturbances [22, 1, 4]. In SMC, chattering may occur in the steady state and act as an oscillator that excites unmodeled frequencies of the system dynamics [10]. To reduce the chattering effect, high-order sliding modes (HOSM) have been introduced [7, 14, 18, 20]. In the HOSM control, the quasi-continuous (QC) SMC [5] introduces the capability of maintaining the properties of the first order SMC while creating smooth responses. Its performance however depends on the knowledge of disturbance boundaries which are not always available. In practice, the quadcopter may be subject to various disturbances and uncertainties such as wind gusts and modelling errors that may downgrade the control performance. To address this concern, the second-order sliding mode (SOSM) controller with an adaptive gain has been applied to drive the sliding variable and its derivative to zero in the presence of bounded disturbances [19]. In this work, we propose an adaptive quasi-continuous second-order sliding mode (AQCSM) scheme to control the attitude of quadcopters subject to nonlinear dynamics, strong coupling, high uncertainties and disturbances with unknown boundaries. The mathematical model of the quadcopter is first derived by considering various dynamic parameters. Here, the quasi-continuous SMC retains the advantage of robustness while attenuating the control chattering and facilitating the implementation. Its performance is verified by simulation with comparison to real-time datasets. The paper is organised as follows. The dynamic model of the quadcopter is presented in Section 2. Section 3 describes the development of the AQCSMC. Simulation results are presented in Section 4 with comparison to PID experimental responses. The paper ends with a conclusion and discussion for future work.

2 2.1

τp , and aerodynamic friction τa . The torque τ consists of three components corresponding the roll, pitch and yaw rotations, τ = [τφ τθ τψ ]T . They are given by:

System modelling Kinematics

Two coordinate systems are used to model the kinematτφ = l(F2 − F4 ), (4) ics and dynamics of quadrotors, as shown in Fig. 1. The inertial frame (xE , yE , zE ) is defined by the ground with τθ = l(−F1 + F3 ), (5) gravity pointing downward in zE direction. The body frame (xB, yB, zB ) is specified by the orientation of the τψ = b(−F1 + F2 − F3 + F4 ), (6) quadcopter with the rotor axes pointing in the positive zB where l is the distance from the motor to the UAV centre direction and the arms pointing in xB and yB directions. of mass and b is the drag factor. The body gyroscopic torque τb is given by: τb = −S(ω)Iω,

(7)

where S(ω) is a skew-symmetric matrix,   0  S(ω) =  r   −q 

−r 0 p

q −p 0

   .   

(8)

The propeller gyroscopic torque τp is determined as:   Ir Ωr q  τp =  −Ir Ωr p  0  

Figure 1: A schematic diagram of quadcopter The orientation of quadcopters is described by the roll, pitch, and yaw angles corresponding to its rotations around the xB , yB and zB axes. Denoting those angles as Θ = Û = (φ, Û ψ) Û θ, Û T . The (φ, θ, ψ)T , their rates are then given by Θ T rates relate with angular velocities, ω = [p, q, r] , by the following transformation: Û ω = H Θ,

(1)

where H is given by:   1  H= 0   0 

0 cφ −sφ

−sθ cθ sφ cθ cφ

   ,   

   ,   

where Ir is the inertial moment of rotor, Ωr = −Ω1 + Ω2 − Ω3 + Ω4 is the residual angular velocity of rotor in which Ωk denotes the angular velocity of the propeller k (k=1,2,3,4). Finally, the aerodynamic friction torque τa is given by: τa = k a ω2, (9) where k a depends on aerodynamic friction factors, k a = [k ax, k ay, k az ]T . Given those torque components, the attitude dynamic model of the quadcopter is described as: Ü = τb + τ + τp − τa, IΘ

(10)

where I = diag[Ixx, Iyy, Izz ] is the inertia matrix when the quadrotor is assumed to be symmetrical. In our system, the gyroscopic and aerodynamic torques in which sx = sin(x) and cx = cos(x). As the result, the are considered as external disturbances. Thus, the control rotational matrix of the quadcopter is described by: inputs mainly depend on torque τ and from (4), (5) and (6), they can be represented as:    cψ cθ cψ sθ sφ − sψ cφ cψ sθ cφ + sψ sφ           R =  sψ cθ sψ sθ sφ + cψ cφ sψ sθ cφ − cψ sφ  . (3)  uφ   τφ   0 l 0 −l   F1           cθ sφ cθ cφ 0   F2   −sθ   uθ   τθ   −l 0 l    = =   , (11)  uψ   τψ   −c c −c c   F3         1   F4   uz   F   1 1 1 2.2 Quadcopter Dynamics        (2)

Since the focus is on the attitude control so only torque where F = F1 + F2 + F3 + F4 is the UAV lift, uz represents components that cause changes in the orientation are con- the total thrust acting on the four propellers and uφ , uθ and sidered. They include torques caused by thrust forces τ, uψ respectively represent the roll, pitch and yaw torques, body gyroscopic effects τb , propeller gyroscopic effects c is a force-to-torque scaling coefficient. As only the

attitude of quadcopter will be controlled, uz is assumed to 3.2 QCSM control design and problem formulation balance with the gravity. Consequently, the dynamics of The second-order sliding mode control proposed in [8, quadcopters can be represented in the following form for 9] is used in this paper, for which a conventional QCSM attitude control: is defined as follows:  ωÛ = I −1 −S(ω)Iω + U + d , (12) Û +|σ| 1/2 sign(σ) σ U = −α , (16) Û +|σ| 1/2 | σ| T where U = [uφ, uθ , uψ ] is the input vector and d = [dφ, dθ , dψ ]T is the disturbance vector. In our system, where α is the control gain to be adjusted. The control is continuous everywhere apart from the origin where σ = the following assumptions are made: Û = 0. σ Since I is symmetric and positive definite, the following A.1 The quadcopter structure is rigid and symmetric. The Lyapunov function is chosen to avoid the inversion of the propellers are rigid. inertia matrix: 1 Û can be measured by on-board A.2 The signals Θ and Θ (17) V0 = σT Iσ. 2 sensors. Taking the time derivative of V gives   A.3 The reference trajectories and their first and second  1 1Û 1 T T T Û T Û Û + Iσ . Û Iσ + σ I σ Û + σ Iσ = σ I σ σ V0 = time derivatives are bounded. 2 2 2 (18) A.4 The velocity and the acceleration of the quadcopter By substituting σ Û from (18) to (15), one has are bounded.     Ü d + IΛeÛ − S(ω)Iω + U + d + 1 Iσ Û0 = σT −I Θ Û . V π π 2 A.5 The orientation angles are limited to φ ∈ − , , 2 2 (19)   π π Let I = I0 + ∆I, where I0 and ∆I represent the nominal and ψ ∈ [−π, π]. θ∈ − , and uncertain parts of the inertia matrix. According to A1, 2 2 we have IÛ = 0, equation (19) becomes A.6 The rotational speeds of rotors are bounded. Ü d + ∆IΛeÛ + d + 1 Iσ Û VÛ0 = σT { − S(ω)∆Iω − ∆I Θ 2 Ü d + I0 ΛeÛ + U − S(ω)I0 ω − I0 Θ (20) 3 Control Design The control signals uφ, uθ and uψ in (12) are used to control the three angles {φ, θ, ψ} to reach the reference value Θd = {φ d, θ d, ψd }T . 3.1

Sliding Manifold

= σT {∆P + U + P},

(21)

where Ü d + ∆IΛeÛ + d, ∆P = −S(ω)∆Iω − ∆I Θ Ü d + I0 Λe. Û P = −S(ω)I0 ω − I0 Θ

(22) (23)

T The sliding function determining the system’s equiva- Let Ξ = [Ξ1, Ξ2, Ξ3 ] denote the sum of ∆P and P. Since the disturbance d and uncertain parameter ∆I are bounded, lent dynamics is presented as: from (22) and (23) it can be seen that Ξ is also bounded, σ = eÛ + Λe, (13) i.e., |Ξi | ≤ Ξ M,i, i = 1, 2, 3. Consider system (12) with the sliding variable σ(ω, t) as in (13). From assumptions A1-A6, the sliding motion on the manifold is achieved by where Λ = diag(λφ, λθ , λψ ) is a positive definite matrix to the controller (16) if we can select the gain αi such that be designed, and e = Θd − Θ is the control error. Taking [15]: the derivative of σ, we have: αi ≥ Ξ M,i . (24) Ü −Θ Ü d + ΛÛe. Û =Θ σ (14) However, the bound Ξ M,i is not easy to evaluate in practice and besides, there is a trade-off with chattering if a high For small angular rotations of the quadcopter, we can ap- value of αi is chosen. The problem is now to drive the slidÛ [23]. Substituting Θ Ü (12) to (14) yields: ing variable σ and its derivative σ proximate ω to Θ Û to zero in finite time by means of quasi-continuous SMC without overestimation Ü d + ΛÛe + I −1 [−S(ω)Iω + U + d]. Û = −Θ σ (15) of the control gain.

3.3

4

Adaptive QCSM Design

The proposed gain-adaptation law is supposed to minÛ imise the chattering phenomenon while driving σ and σ to zero even in the presence of disturbances. For initial conditions ωi (0), σi (0), and αi (0) > 0, the reaching and sliding on the manifold is globally achieved in finite time by the controller (16) with the following adaptive gain [13]: (

ω¯ i σi (ω, t) sign(|σi (ω, t)| − i ) αÛ i = ηi

if αi > αm,i if αi ≤ αm,i, (25)

Simulation and Validation

Extensive simulation has been carried out to evaluate the performance of the proposed control algorithm. The model of the test quadcopter used is obtained from the 3DR Solo drone shown in Fig. 2 in which Lx , dx , rx and hx are measured distances used to compute system parameters, as listed in Table 1. Design parameters used for the controllers are given in Table 2. The UAV, with technical specifications and accessories described in [11], was deployed to perform the tasks of infrastructure inspection, as shown in Fig. 3. rm

where ω¯ i > 0, i , ηi are small positive constants, and αm,i is a threshold of the adaptation.

dm

3 Õ 1 (αi − αM,i )2, 2γ i i=1

La

daz

dmz

To analyse the stability of the proposed controller, let us first define a global Lyapunov function candidate for σ and α as: V(σ, α) = V0 +

day ra

hm

dax

dm

Lh rh

(26)

y z

x

where V0 has been defined in Eq. (17), γi is some positive constant and αM,i is the maximum possible value of the adaptive gain αi . The derivative of the Lyapunov function Figure 2: The 3DR Solo drone with body coordinate frame. (26) is obtained as Û V(σ, α) = VÛ0 +

3 Õ 1 (αi − αM,i )αÛ i . γ i=1 i

(27)

Taking VÛ0 from (2) and αÛ i from (25), equation (27) under the control law (16) becomes !   Û i +|σi | 1/2 sign(σi )  σ  σi Ξi − αi + Û i | +|σi | 1/2 |σ   i=1   3 Õ 1 + (αi − αM,i )ω¯ i |σi | sign(|σi | − i ). (28) γ i=1 i

Û V(σ, α) =

3 Õ

Û i (t) is very small and When σi is slowly time-varying, σ can be negligible, then equation (28) becomes Figure 3: Insfrastructure inspection. Û V(σ, α) =

3 Õ

  σi Ξi − αi sign(σi ) +

i=1 3 Õ 1 + (αi − αM,i )ω¯ i |σi | sign(|σi | − i ). (29) γ i=1 i

It can be seen that VÛ ≤ 0 given (23) and αi ≤ αM,i [13].

4.1

Control performance in nominal conditions

In this simulation, the quadcopter starts from zero initial conditions, i.e. all angles and velocities are zeros. Its roll and pitch angles are then set to φ = −100 and θ = 100 at time 0.5 s and its yaw angle is then set to ψ = 450 at time

Table 1: Parameters of the quadcopter model Parameter m l g Ixx Iyy Izz

Value 1.50 0.205 9.81 8.85 · 10−3 15.5 · 10−3 23.09 · 10−3

Unit kg m m/s2 kg.m2 kg.m2 kg.m2

Table 2: Control design parameters Variable λ1 λ3 α0 αm,1 αm,3

Value 4.68 3.84 1.24 0.01 0.03

Variable λ2 1,2,3 ω¯ 1,2,3 αm,2 η1,2,3

Figure 5: Control torques.

Value 4.68 0.7 200 0.02 0.01

P Q R

desired

2 s. The results are shown in Fig. 4 and Fig. 5, where the time scale in the latter is zoomed in to observe the abrupt change in the control torque and coupling effect. It can be seen that all controllers smoothly drive the angles to the desired values with relatively small overshoot and Figure 6: Angular velocity and angle responses in the within two seconds. According to (11), there exist strong presence of disturbances. coupling relations between the control states. As a result, it can been seen that the AQCSM controller can handle 4.3 Responses to parametric variations this problem to control the attitude to reach the reference values and then track them without being perturbed. To evaluate the performance of the proposed controller in different conditions of loads and inertial moments, simulation parameters are varied to tolerate some modelling errors. Specifically, a load of 0.8 kg, corresponding to 4.2 Responses to disturbances the maximum payload of the 3DR Solo drone, is added to the model and the following uncertainties are added to the In this simulation, a torque disturbance with the ampli- inertial matrix: tude of 0.5N.m is added to all three axes of the quadcopter.   The reference values are chosen to be the same as in the 0 0.0044 −0.0077     previous simulation. The responses are shown in Fig. 6. 0 0.0115  . ∆I =  0.0044 (30)   As can be seen from the plots, the AQCSM controller can 0  −0.0077 0.0115    cope with disturbances to reach the references and maintain the drone stability. Figure 7 shows the results in comparison with the nominal desired desired

P Q R

desired desired desired

desired AQCSM AQCSM desired AQCSM AQCSM

Figure 7: Angle and angular velocity responses in the Figure 4: Responses of the quadcopter in nominal condi- presence of parametric variations. tions (P, Q and R- roll, pitch and yaw angular velocities). conditions. The almost identical settling time and over-

shoot between responses corresponding to those scenarios indicates robustness of the proposed AQCSM controller. The adaptive gain α1 (t) response versus time is shown in Fig. 8. The higher gain magnitudes are observed in the two bottom sub-figures imply more energy is required to stabilise the system in dealing with disturbances and uncertainties. This also suggests feasibility of the control scheme. 10-3

10.002 10 9.998 9.996 9.994 1

1.05

1.1

1.15

1.2

1.25

1.05

1.1

1.15

1.2

1.25

10-3 10.02 10 9.98 9.96

quadcopters. The control design is based on the selection of a sliding surface and some parameters for adaptation of the control gain taking account into chattering reduction. Control performance is evaluated in simulation for the cases of both external disturbances and system uncertainties. This robustness property is quite important for civil engineering applications which require accurate attitudes during collecting data for monitoring and inspection tasks. The validity of the proposed control scheme is also judged through comparison with experimental real-time data. Our future work will focus on implementing the proposed controller to develop further high-level planning strategies to take full advantage of UAV-based monitoring and inspection of built infrastructure.

9.94 9.92 1 10-3

10.002

References

10

9.998

9.996 1

1.05

1.1

1.15

1.2

1.25

Figure 8: The adaptation of gain α1 (t) in various scenarios.

4.4

[1] Lénaïck Besnard, Yuri B Shtessel, and Brian Landrum. Control of a quadrotor vehicle using sliding mode disturbance observer. In American Control Conference, 2007. ACC’07, pages 5230– 5235. IEEE, 2007.

Comparison with real-time data

To further evaluate the performance of the proposed controller, simulation results are compared with SMC and real time data obtained by using the built-in PID controller of the 3DR Solo drone when performing attitude control during a monitoring task [11]. The comparison is carried out by setting the same reference yaw angle to the simulated and real quadcopters. Figure 9 shows the responses of simulation for AQCSM and SMC as well as experiment for the Solo drone’s PID. All controllers reach the reference value without causing much overshoot or oscillation but the AQCSM controller produces better performance with a smoother response.

[2] Baohua Chen, Lei Deng, Yueqi Duan, Siyuan Huang, and Jie Zhou. Building change detection based on 3d reconstruction. In Image Processing (ICIP), 2015 IEEE International Conference on, pages 4126– 4130. IEEE, 2015. [3] Sung-suk Choi and Eung-kon Kim. Design and implementation of vision-based structural safety inspection system using small unmanned aircraft. In Advanced Communication Technology (ICACT), 2015 17th International Conference on, pages 562– 567. IEEE, 2015. [4] L Derafa, A Benallegue, and L Fridman. Super twisting control algorithm for the attitude tracking of a four rotors uav. Journal of the Franklin Institute, 349(2):685–699, 2012. [5] Shihong Ding, Arie Levant, and Shihua Li. New families of high-order sliding-mode controllers. In 2015 54th IEEE Conference on Decision and Control (CDC), pages 4752–4757. IEEE, 2015.

Figure 9: Tracking errors - Yaw angular velocity and Yaw angle

5

Conclusion

In this paper, an adaptive quasi-continuous sliding mode controller has been developed for robust control of the

[6] Youngjib Ham, Kevin K Han, Jacob J Lin, and Mani Golparvar-Fard. Visual monitoring of civil infrastructure systems via camera-equipped unmanned aerial vehicles (uavs): a review of related works. Visualization in Engineering, 4(1):1, 2016. [7] Arie Levant. Sliding order and sliding accuracy in sliding mode control. International journal of control, 58(6):1247–1263, 1993.

[8] Arie Levant. Higher-order sliding modes, differen- [19] Yuri Shtessel, Mohammed Taleb, and Franck tiation and output-feedback control. International Plestan. A novel adaptive-gain supertwisting slidjournal of Control, 76(9-10):924–941, 2003. ing mode controller: methodology and application. Automatica, 48(5):759–769, 2012. [9] Arie Levant. Principles of 2-sliding mode design. Automatica, 43(4):576 – 586, 2007. [20] Vadim Utkin. Discussion aspects of high-order sliding mode control. IEEE Transactions on Automatic [10] Malik Manceur, Najib Essounbouli, and Abdelaziz Control, 61(3):829–833, 2016. Hamzaoui. Second-order sliding fuzzy interval type2 control for an uncertain system with real ap- [21] A. Woods, H. M. La, and Q. P. Ha. A novel extended plication. Fuzzy Systems, IEEE Transactions on, potential field controller for use on aerial robots. In 20(2):262–275, 2012. Automation Science and Engineering (CASE), 2016 IEEE International Conference on, pages 286–291, [11] M. D. Phung, T. H. Dinh, V. T. Hoang, and 2016. Q. P. Ha. Automatic crack detection in built infrastructure using unmanned aerial vehicles. In [22] Rong Xu and Ümit Özgüner. Sliding mode control Automation and Robotics in Construction (ISARC), of a quadrotor helicopter. In Decision and Control, 2017 International Symposium on, 2017. 2006 45th IEEE Conference on, pages 4957–4962. IEEE, 2006. [12] MD Phung, CH Quach, DT Chu, NQ Nguyen, TH Dinh, and QP Ha. Automatic interpretation [23] En-Hui Zheng, Jing-Jing Xiong, and Ji-Liang Luo. of unordered point cloud data for uav navigation Second order sliding mode control for a quadrotor in construction. In Control, Automation, Robotics uav. ISA transactions, 53(4):1350–1356, 2014. and Vision (ICARCV), The 2016 14th International [24] Z. Zuo. Trajectory tracking control design with Conference on, 2016. command-filtered compensation for a quadrotor. IET [13] Franck Plestan, Yuri Shtessel, Vincent Bregeault, Control Theory Appl., 4(11):2343–2355, 2010. and Alexander Poznyak. New methodologies for adaptive sliding mode control. International journal of control, 83(9):1907–1919, 2010. [14] Andrei Polyakov and Alex Poznyak. Lyapunov function design for finite-time convergence analysis: "twisting" controller for second-order sliding mode realization. Automatica, 45(2):444–448, 2009. [15] Chutiphon Pukdeboon, Alan SI Zinober, and May-Win L Thein. Quasi-continuous higher order sliding-mode controllers for spacecraft-attitudetracking maneuvers. IEEE Transactions on Industrial Electronics, 57(4):1436–1444, 2010. [16] Guilherme V Raffo, Manuel G Ortega, and Francisco R Rubio. An integral predictive/nonlinear H∞ control structure for a quadrotor helicopter. Automatica, 46(1):29–39, 2010. [17] R. Ritz, M. Hehn, S. Lupashin, and R. D’Andrea. Quadrocopter performance benchmarking using optimal control. In Intelligent Robots and Systems (IROS), 2011 IEEE/RSJ International Conference on, pages 5179–5186, Sept 2011. [18] Guillermo J Rubio, José M Cañedo, Vadim I Utkin, and Alexander G Loukianov. Second order sliding mode block control of single-phase induction motors. International Journal of Robust and Nonlinear Control, 24(4):682–698, 2014.