=Paper= {{Paper |id=Vol-2254/10000105 |storemode=property |title=The adaptive control system of quadrocopter motion |pdfUrl=https://ceur-ws.org/Vol-2254/10000105.pdf |volume=Vol-2254 |authors=Filipp Samoilov,Dmitry Vinokursky,Massimo Mecella,Marco Schaerf }} ==The adaptive control system of quadrocopter motion== https://ceur-ws.org/Vol-2254/10000105.pdf
    The adaptive control system of quadrocopter motion

                         Marco Schaerf                                   Massimo Mecella
                  Sapienza Universita di Roma,                     Sapienza Universita di Roma,
                          Rome, Italy                                      Rome, Italy
                   marco.schaerf@uniroma1.it                         mecella@dis.uniroma1.it

                   Dmitry Vinokursky                                       Filipp Samoilov
           North Caucasus Federal University,                     North Caucasus Federal University,
                    Stavropol, Russia                                     Stavropol, Russia
                dlvinokursky@gmail.com                                   fsamoilov@ncfu.ru




                                                        Abstract
                       In this paper we present a system for automatic control of a quadro-
                       copter based on the adaptive control system. The task is to ensure
                       the motion of the quadrocopter along the given route and to control
                       the stabilization of the quadrocopter in the air in a horizontal or in a
                       given angular position by sending control signals to the engines. The
                       nonlinear model of a quadrocopter is expressed in the form of a linear
                       non-stationary system.




1    Introduction
The UAV (Unmanned aerial vehicle) can be controlled by an occasional command or continuously, in the latter
case the UAV is called a remotely piloted aircraft (RPA). The main advantage of the UAV / RPA is the
significantly lower cost of its production and control (under the condition of equal efficiency in the performance
of the tasks).
    Nowadays unmanned aerial vehicles (UAVs), which are mainly flying robots, constitute an important part
of scientific research in military, civil and space fields. Replacing manned vehicles, UAVs have an advantage in
complex and dangerous environments. Their reliability in severe conditions for humans is much higher.
    In the last decade, studies on various types of unmanned multi-rotors have received much attention in the
field of automatic control. Quadrotor is the most popular type of multi-rotor UAV due to its simple mechanics
and high maneuverability such as the fast vertical take-off and landing. In addition, the implementation of
stable stationary flight is a valued opportunity for a quadrotor. However, controlling the motion of a quadrotor
is a difficult and challenging task because of its nonlinearity under controlled dynamics. Many methods for
controlling quadrotors were proposed [Alt03], and some strategies were developed for solving the issues which
follow the problems of this system type. Early control strategies are traditional PID control, feedback linearization
and LQR methods. Recently, nonlinear controllers such as TSMC [ Bes07], backstepping control [MBe06] and
model predictive control (MPC) [Ma16] have been used to improve tracking accuracy and resistance to model

Copyright c by the paper’s authors. Copying permitted for private and academic purposes.
In: Marco Schaerf, Massimo Mecella, Drozdova Viktoria Igorevna, Kalmykov Igor Anatolievich (eds.): Proceedings of REMS 2018
– Russian Federation & Europe Multidisciplinary Symposium on Computer Science and ICT, Stavropol – Dombay, Russia, 15–20
October 2018, published at http://ceur-ws.org
uncertainty and external disturbances. In addition, adaptive controllers are designed for a low-power non-linear
quadrotor system to eliminate the tracking error, despite disturbances.
   In spite of the fact that the mentioned controllers have the reliable tracking the trajectories, they are just
suitable for implementation on unmounted stationary the control units. On the other hand, they need fast
and heavy computing devices because of their complex and time-consuming control laws. In addition, they are
limited by long-range applications, when the delay of communication with the stationary control unit disrupts
the real-time operation of the quadrotor. The conventional proportional integral-derivative (PID controller) is
the most preferred control method for on-board implementation of the control unit in autonomous systems.
However, it is very difficult to adjust the PID gain to a number of operating points or for different continuous
trajectories. In addition, PID regulators are not very successful for controlling non-linear systems with reduced
voltage. Therefore, several methods are used to develop a PID controller with improved tracking characteristics,
which may be suitable for on-board implementation. Fuzzy logic is a powerful tool that is often used to obtain
excellent results compared to a conventional PID controller.
   Consequently, there is a need for a mathematical model which could describe the control of a quadcopter. The
difficulty is that a quadrocopter has 6 degrees of freedom, while we can control only 4 parameters: the angular
velocities of the engines.
   The next important task is to build a stabilizing algorithm. Controlled by four spaced apart engines, a
quadrocopter is an unstable dynamic system which, due to the nonlinearity of the mathematical model, must be
stabilized by the complex control algorithms.

2     Related work
Many modeling approaches have been presented [Erg07],[Bou04] and various control methods have been pro-
posed [Alt02], [Alt03]. First of all, several backstepping controllers have been developed. Madani studied a
full-state backstepping technique based on Lyapunov stability [Mad06], [MBe06]. E. Altug presented backstep-
ping control using single and double cameras as visual feedback [Alt02], [Alt03]. Other backstepping control
methods were used by Castillo. He used this controller with a saturation function and it performed well under
perturbation [Cas06]. Also, Metni used backstepping technique in order to obtain adaptive nonlinear tracking
law for quadrotors system [Met07].
   Feedback linearization controller was implemented by Altug [Alt02]. A PD controller was designed to control y
and and feedback linearization controller was implemented to control x and z. A. Benalleuge presented feedback
linearization high-order sliding mode observer for a quadrotor. The algorithm had shown robustness for wind
disturbances and noise [ Ben06].
   The method of quaternions for position stabilization was presented in [ Tay06]. With compensation of the
Coriolis and gyroscopic torques, the controller guaranteed exponential stability while a classical PD controller
without compensation of the Coriolis and gyroscopic torques could guarantee only asymptotic stability. A sliding
mode disturbance observer was shown [ Bes07] and designed as the robust controller for quadrocopters. This
controller showed the robustness for external disturbances, model uncertainties, and engine’s errors. The robust
adaptive fuzzy control was applied in [ Coz06]. This controller showed a good performance against sinusoidal
wind disturbances. Mokhtari presented in [Mok04] robust dynamical feedback controller of Euler angles which
used the estimation wind parameters.

3     Proposed method
3.1   The matrix of rotation
The rotation around axis OX is described by the matrix:
                                                                    
                                                1     0          0
                                        Rx =  0 cos ϑ         sin ϑ                                         (1)
                                                0 − sin ϑ      cos ϑ
    Around axis OY
                                                              
                                               cos Θ 0 − sin Θ
                                         Ry =  0    1    0                                                  (2)
                                               sin Θ 0 cos Θ
  And around axis OZ
                                                                       
                                                 cos Ψ        sin Ψ   0
                                         Rz =  − sin Ψ       cos Ψ   0                                    (3)
                                                   0            0     1

  The matrix D = Rx ∗ Ry ∗ Rz describes the transition from Earth-fixed frame to the Body-fixed frame. This
matrix is presented as:
                                                                                                 
                              cos Θ cos Ψ                        cos Θ sin Ψ            − sin Θ
              D =  sin ϑ sin Θ cos Ψ − cos ϕ sin Ψ   sin ϑ sin Θ cos Ψ + cos ϑ cos Ψ sin ϑ cos Θ          (4)
                    cos ϑ sin Θ cos Ψ + sin ϑ sin ϑ   cos ϕ sin Θ cos Ψ + sin ϑ cos ϑ cos ϑ cos Θ

  The transition from in Earth-fixed body to the velocities in Body fixed system is defined by equations:
                                                          
                                              ẋ           u
                                             ẏ  = D−1  v                                               (5)
                                              ż           ω

   Transformation angles velocities for the transition from one frame system to an-other one will be defined in
the following way:




                                           Figure 1: Euler’s angles


                                                           
                                                 p         ϕ̇
                                                q  = E  Θ̇                                              (6)
                                                 r         Ψ̇

  E matrix is represented
                                                                         
                                           1           0         sin Θ
                                       E= 0         cos ϑ    sin ϑ cos Θ                                  (7)
                                           0        − sin ϑ   cos ϑ cos Θ
3.2    The equation of moving
The written second law of Newton in Earth-fixed frame:

                                                       F = mV̇                                                 (8)

   Here m – a mass of a vehicle, which is constant. V – velocity of UAV in the Earth-fixed frame. Writing the
total derivative [Cas05] of velocity for time, we will rewrite the law:
                                                               →
                                                               −
                                                F = mV̇ + m(→
                                                            −
                                                            ω ∗V)                                              (9)
  or
                                                             
                                    Fx         u̇         p       u
                                   Fy  = m  v̇  + m  q  ∗  v                                          (10)
                                    Fz         ω̇         r       ω
  After a performance of cross product [Che03], the notation of Newton’s second law will be obtained:
                                                                 
                                         Fx            u̇ + qω − rv
                                       Fy  = m  v̇ + ru − pω                                              (11)
                                         Fz            ω + pv̇ − qu
   Neglecting all forces beside thrust force of propeller [Coo97] T and force of gravity [Lel11], the equation (11)
is writing as:
                                                                        
                                             0                u̇ + qω − rv
                                            0      = m  v̇ + ru − pω                                       (12)
                                          mg − T              ω + pv̇ − qu
  Transition to Body fixed frame with the help of transfer matrix D, we obtain equation:

                                              u̇ = rv − qω − g sin Θ
                                            v = pω − ru + g sin Θ sin ϕ                                       (13)
                                                                        1
                                        ω̇ = qu − pv + g cos ϕ cos Θ − m  .
  The thrust force of all engines can be shown in the following way [Bou04]:

                                                 T = b(Ω21 Ω22 Ω23 Ω24 )                                      (14)

  Where b – the trust coefficient [Dor07] and Ωi - the velocity of each engine (i = 1, 2, 3, 4). In this case, the
equation (13) is rewritten as:

                                                u̇ = rv − qω − g sin Θ
                                           v = pω − ru + g sin Θ sin ϕ                                        (15)
                                                                b 2
                              ω̇ = qr − pv + g cos ϕ cos Θ −     (Ω + Ω22 + Ω23 + Ω24 )
                                                                m 1
3.3    Rotating motion
The torques of quadrotor’s rotation represented as:

                                                       M = Ḣ                                                 (16)

  Total derivative of vector H is written as:

                                                  M = Ḣ + ω ∗ H                                              (17)

  Let
                                                      H =I ∗ω                                                 (18)
  Here I – torque of quadrocopter’s inertia ω = (p, q, r) - vector Tensor of torque inertia is written as:
                                                                     
                                                   Ix         0    0
                                               I= 0          Iy   0                                        (19)
                                                    0         0    Iy

  Then the equation (17) is rewritten:
                                                  M = I ω̇ + ω ∗ Iω
After substitution:

                                               Mx = ṗIx + qr(Iz Iy )
                                               Mx = q̇Iy + pr(Ix Iz )                                        (20)
                                               Mx = żIz + pq(Iy Ix )

  By symmetry relative planes XZ and YZ

                                                         Ix = Iy

  And equation (20) becomes simpler

                                              Mx = ṗIx + qr(Iz − Iy )
                                              Mx = q̇Iy + pr(Ix − Iz )                                       (21)
                                                    Mx = ṙIz

  Considering the thrust force and drag force the torques will be rewritten as:

                                                  Mx = lb(Ω22 Ω24 )
                                                  My = lb(Ω21 Ω23 )                                          (22)
                                                 Mz = d(Ω22 Ω24 Ω21 Ω23 )

  d - drag coefficient [Fra05], l – the length of the propeller Transforming the system (22) the last equations of
moving are presented in the following way:

                                                  lb 2 2        Iz − Ix
                                           ṗ =     (Ω Ω ) − qr
                                                  Ix 2 4           Ix

                                                  lb 2 2        Ix − Iz
                                           q̇ =     (Ω Ω ) − pr                                              (23)
                                                  Iy 1 3           Iy

                                                  d 2
                                          ṙ =      (Ω + Ω24 − Ω21 − Ω23 )
                                                  Iz 2

3.4   The dynamic of the engine [Hof07]:
Kirchhoff’s equation and the second law of Newton represent the equations of quadrocopter’s engines.
                                          
                                                 Jr ω̈m + bω̇m = Kt i,
                                                                                                             (24)
                                              L ddti + Ri = U − Ke .ω˙m

  Here
  Jr – torque of inertia shaft,
  b – coefficient of viscous friction,
  Ke – coefficient EMF,
  Kt – torque of engine rotation,
  R – electric resistance,
  L – inductivity.
4    Adaptive control
Adaptive control is a method used for automatic control of moving in the real time. It uses the online estimating
of external parameters and automatic control. The system of equations describes the kind of control presented:

                                  ẋ(t) = Am x(t) + b(u(t) + KxT x(t)),    x(0) = x0                        (25)


                                                   y(t) = C T x(t)                                          (26)
    Here Am known matrix, x(t) condition vector of system, b and c known constants, Kx – vector of unknowns.
    Let

                                           Unorm (t) = −kxT x(t) + kg r(t)                                  (27)

                                                              1
                                                    kg =                                                    (28)
                                                           cT A1m b
    Due to simplification the following equations for ideal system are obtained:

                                     x˙t (t) = Am x(t) + bkg r(t),    xm (0) = x0

                                                  ym (t) = C T x(t)                                         (29)

                                                  e(t) = xm (t) − x
    The law of adaptive control

                                       K̇x = −Γx(t)ẽT (t)pb,     Kx (0) = Kx0                              (30)
    Matrix P is defined from equation of Lyapunov

                                                ATm P + P Am = −Q                                           (31)
    The diagram of such control type has been represented:




                                    Figure 2: The diagram of adaptive control
                                             Figure 3: Angle response




                                             Figure 4: Error response

4.1   Transfer function
The system of equations (24) describes the work of engines. In order to obtain the transfer-function [Kiv06], the
transformation of Laplace was implemented in the system (24):
                                     
                                           S(Js S + b)C(s) = Kt I(s)
                                                                                                             (32)
                                        (Ls + R)I(s) = u(s) − Ke SC(s)

                                             Ċ(s)               kt
                                   W (s) =         =                                                        (33)
                                             u(s)    (Js S + b)(Ls + R) + ke kt
   Here Ċ(s)-the velocity of the motor shaft; u(s) - voltage input. The result of modeling is represented on the
graphics: 3, 4, 5.

Conclusion
The adaptive control as a control system has been considered. The evaluation has been used in the design
of the controller. Comparative results of simulation tests have been carried out in MatLab / Simulink. The
                                           Figure 5: Control vectors

results of simulations demonstrate that the quadrocopter is successfully stabilized, keeping the desired position
and altitude using the proposed controller, thereby showing the effectiveness of the proposed system under
conditions of uncertainty.

References
[Erg07] B. Erginer, E. Altug Modeling and PD control of a Quadrotor VTOL vehicle, Intelligent Vehicles
        Symposium, 2007.

[Bou04] S. Bouabdallah, A. Noth, R. Siegwart PID vs LQ Control Techniques Applied to an Indoor Micro
        Quadrotor, Intelligent Robots, and Systems, 2004.

[Alt02]   E. Altug, J. P. Ostrowski, and R. Mahony, “Control of a quadrotor helicopter using visual feedback,”
          Proc. of the IEEE International Conference on Robotics and Automation,2002. Vol. 1. Pp. 72-77.

[Alt03]   E. Altug, J. P. Ostrowski, and C. J. Taylor, “Quadrotor control using dual camera visual feedback,”
          Proc. of the IEEE International Conference on Robotics and Automation,2003. Vol. 3. Pp. 4294-4299,

[Mad06] T. Madani and A. Benallegue “Control of a quadrotor mini-helicopter via full state backstepping tech-
        nique,” Proc. of the 45th IEEE Conference on Decision and Control, 2006. Pp. 1515-1520.

[MBe06] T. Madani and A. Benallegue “Backstepping sliding mode control applied to a miniature quadrotor
        flying robot,” Proc. of IEEE Industrial Electronics, the 32nd Annual Conference, 2006. Pp. 700-705.

[Cas06] P. Castillo, P. Albertos, P. Garcia, and R. Lozano “Simple real-time attitude stabilization of a quadrotor
        aircraft with bounded signals,” Proc. of the 45th IEEE Conference on Decision and Control, 2006. Pp.
        1533-1538.

[Met07] N. Metni and T. Hamel “Visual tracking control of aerial robotic systems with adaptive depth estima-
        tion,” International Journal of Control, Automation, and Systems, 2007. Vol. 5, no. 1. Pp. 51-60.

[ Ben06] A. Benallegue, A. Mokhtari, and L. Fridman “Feedback linearization and high order sliding mode
         observer for a quadrotor UAV,” Proc. of the International Workshop on Variable Structure Systems,
         2006. Pp. 365-372.

[ Tay06] A. Tayebi and S. McGilvray “Attitude stabilization of a VTOL quadrotor aircraft,” IEEE Trans. On
         Control Systems Technology, 2006. Vol. 14, no. 3. Pp. 562-571.
[ Bes07] L. Besnard, Y. Shtessel, and B. Landrum “Control of a quadrotor vehicle using sliding mode disturbance
         observer,” Proc. of the American Control Conference, 2007. Pp. 5230-5235.

[ Coz06] 12. C. Coza and C. J. B. Macnab, “A new robust adaptive-fuzzy control method applied to quadrotor
         helicopter stabilization,” NAFIPS Annual meeting of the North American Fuzzy Information Society,
         2006. Pp. 454-458.
[Mok04] A. Mokhtari and A. Benallegue “Dynamic feedback controller of Euler angles and wind parameters
        estimation for a quadrotor unmanned aerial vehicle,” Proc. of the IEEE International Conference on
        Robotics and Automation, 2004. Pp. 2359-2366.
[Ant07] Antsaklis, P.J., Michel, A.N. A Linear Systems Primer 1st ed., Birkhuser Boston, 2007.
[Bla91]   Blakelock, J.H., 1991. Automatic Control of Aircraft and Missiles 2nd ed., Wiley-Interscience, 1991.
[Bou05] Bouabdallah, S., Murrieri, P., Siegwart, R. Towards Autonomous Indoor Micro VTOL. Autonomous
        Robots, 2005. 18(2).
[Cas05] Castillo, P., Lozano, R., Dzul, A. Stabilization of a mini rotorcraft with four rotors. Control Systems,
        IEEE, 2005. 25(6). Pp.45- 55.
[Che03] Chen, M., Huzmezan, M. A Simulation Model and H( Loop Shaping Control of a Quad Rotor Unmanned
        Air Vehicle. In Modelling, Simulation, and Optimization, 2003. Pp. 320-325.

[Coo97] Cook, M.V. Flight Dynamics Principles 1st ed., John Wiley and Sons,1997.
[Lel11]   De Lellis, Marcelo Modeling, Identification, and Control of a quadrotor Aircraft. Czech Technical
          University in Prague. 2011.
[Dor07] Dorf, R.C., Bishop, R.H. Modern Control Systems 11th ed., Prentice Hall. 2007.

[Fra05]   Franklin, G., Powell, J.D., Emami-Naeini, A. Feedback Control of Dynamic Systems 5th ed., Prentice
          Hall. 2005.
[Hof07]   Hoffmann, G.M. et al., Quadrotor helicopter flight dynamics and control: Theory and experiment. In
          Proceedings of the AIAA Guidance, Navigation, and Control Conference. 2007. Pp. 1–20.

[Kiv06] Kivrak, A. Design of control systems for quadrotor flight vehicles. Mechatronics Engineering Depart-
        ment: Atılim University. 2006.
[Ma16]    D. Ma and et.al., “Active disturbance rejection and predictive control strategy for a quadrotor heli-
          copter.” IET Control Theory and Application, 2016. Vol. 10, no. 17. Pp. 2213-2222.