Next Article in Journal
An Efficient Authentication Scheme Using Blockchain as a Certificate Authority for the Internet of Drones
Previous Article in Journal
Detection of Micro-Doppler Signals of Drones Using Radar Systems with Different Radar Dwell Times
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Position and Attitude Tracking of MAV Quadrotor Using SMC-Based Adaptive PID Controller

by
Aminurrashid Noordin
1,2,
Mohd Ariffanan Mohd Basri
1,* and
Zaharuddin Mohamed
1
1
School of Electrical Engineering, Faculty of Engineering, Universiti Teknologi Malaysia (UTM), Skudai 81310, Johor, Malaysia
2
Faculty of Electrical and Electronic Engineering Technology, Universiti Teknikal Malaysia Melaka, Hang Tuah Jaya, Durian Tunggal 76100, Melaka, Malaysia
*
Author to whom correspondence should be addressed.
Drones 2022, 6(9), 263; https://doi.org/10.3390/drones6090263
Submission received: 9 August 2022 / Revised: 8 September 2022 / Accepted: 16 September 2022 / Published: 19 September 2022
(This article belongs to the Section Drone Design and Development)

Abstract

:
A micro air vehicle (MAV) is physically lightweight, such that even a slight perturbation could affect its attitude and position tracking. To attain better autonomous flight system performance, MAVs require good control strategies to maintain their attitude stability during translational movement. However, the available control methods nowadays have fixed gain, which is associated with the chattering phenomenon and is not robust enough. To overcome the aforementioned issues, an adaptive proportional integral derivative (PID) control scheme is proposed. An adaptive mechanism based on a second-order sliding mode control is used to tune the parameter gains of the PID controller, and chattering phenomena are reduced by a fuzzy compensator. The Lyapunov stability theorem and gradient descent approach were the basis for the automated tuning. Comparisons between the proposed scheme against SMC-STA and SMC-TanH were also made. MATLAB Simulink simulation results showed the overall favourable performance of the proposed scheme. Finally, the proposed scheme was tested on a model-based platform to prove its effectiveness in a complex real-time embedded system. Orbit and waypoint followers in the platform simulation showed satisfactory performance for the MAV in completing its trajectory with the environment and sensor models as perturbation. Both tests demonstrate the advantages of the proposed scheme, which produces better transient performance and fast convergence towards stability.

1. Introduction

In recent years, researchers have shown great interest in the micro air vehicle (MAV), which is a small-scale drone with a mass of less than 0.1 kg [1] due to its reliability and safety of operation in GPS-denied workspace [2]. Since their sizes are comparatively small, MAVs are very susceptible to perturbations, such as wind gusts, and this could become a significant problem for real-time implementation. Therefore, a controller that can guarantee a successful flight is very crucial for their operation.
There are several commercialized quadrotors for education today, but this study focuses on the Parrot Mambo Minidrone, which is categorized as an MAV. The Parrot Mambo Minidrone is a 6-DOF quadrotor that includes sensors such as ultrasonic sensors, an accelerometer, gyroscopes, air pressure sensors, and down-facing cameras (optical flow). Since MATLAB provides an open architecture by Simulink Support Package for Parrot Minidrones (SSPPM), it allows for a Bluetooth low-energy connection to deploy algorithms wirelessly via a personal area network (PAN). Hence, the possibility of low-level testing control to this Parrot Mambo Minidrone is the main advantage. The researcher utilized the provided add-on hardware support offered by MATLAB based on the Aerospace Blockset developed by MIT [3].
The MAV’s quadrotor fuselage is a small but underactuated and dynamically unstable system, making designing a complete controller to be such a challenging task. Due to its mass being less than 0.1 kg, the MAV’s performance is easily affected by small uncertainties and external disturbances such as wind gusts and noise. Many nonlinear and linear controls have therefore been established given these circumstances. For instance, adaptive control [4,5,6], backstepping control [7,8], sliding mode control [9,10,11,12,13,14], optimal control [15,16] and intelligent control [17,18,19,20,21] have been deployed.
An adaptive sliding mode is a core of the approach used in [4], where the benefits depend on the magnitude of the gain and robustness as well as not being overestimated by small perturbations. Owing to adaptive gains, only appropriate controls are used to fulfil the task of reducing the chattering effect, thus avoiding the perturbation effect. To show the effectiveness and benefits of the suggested controller successfully, the experiment is also carried out on the commercial Parrot Rolling Spider quadrotor MAV. The researchers discussed a comprehensive, adaptive sliding mode control design approach using the radial basis function neural network (RBF NN) in [5] for the Parrot Rolling Spider quadrotor MAV. In the case of nonlinearities, the suggested system claims to have the potential to estimate uncertainties, where the NN is used as a compensator parameter. Therefore, accelerated error reduction can be accomplished in the closed-loop control system.
By focusing on the MAV quadrotor, [9] simulated the uses of a hierarchical perturbation compensator (HPC) to improve the sliding mode controller. The three compensators, feed-forward perturbation compensator, feed-back perturbation compensator and sliding mode perturbation compensator, were built to reduce the perturbation hierarchically. Later on, [10,22] studied a super-twisting second order sliding mode controller based on a modified non-singular terminal sliding surface and successfully implemented it on the Parrot Rolling Spider quadrotor MAV. The control algorithm includes a new exponent term for a nonlinear switching surface that bypasses the singularity problem. Hence, the system achieved stability conditions with chattering phenomenon reduction to ensure the system’s robustness by perturbation rejection.
A conventional PID control technique was compared with optimal control in [15] to achieve stability at the hovering condition of the Parrot Rolling Spider quadrotor MAV. This paper introduces optimal control by an LQR controller that can ignore the difficulty in tuning the PID control parameters. Moreover, instead of six PID controllers, only one LQR controller is used to better track the system with minimum settling time in the simulation. The PI-PD and Fuzzy PI-PD controller were implemented on the Parrot Mambo Minidrone quadrotor MAV as reported in [23]. The FLC settings of 3 × 3 rules were based on triangle membership function as the input and singletons as the output. Finally, the center of sets was chosen for its defuzzification method to provide robustness against nonlinearities. Ref. [21] also proposed a PID control approach, which is based on an adaptive fuzzy PID-UAV attitude controller. It has been established that the control system has the advantages of high precision and ease of implementation. However, the fuzzy controller has the advantages of minimal overshoot and transient response, as well as the ability to achieve precise and rapid behavior control.
A fuzzy hybrid scheme that comprises fuzzy logic control to fine-tune the regulation pole-placement gains was proposed in [19]. For the stability of tri-motor UAV, this model reference adaptive control (MRAC) is utilized, which shows this algorithm has better transient performance with zero steady-state and fast convergence towards stability. To overcome the complexity of a coupled nonlinear model of a fixed-wing UAV system, [20] proposed a control algorithm combining fuzzy adaptive control and sliding mode variable structure control. The stability of the controllers was verified using the Lyapunov stability theorem. This method has a fast response speed, small steady-state error and strong robustness. It is recommended for complicated, nonlinear, strongly coupled and multiple uncertain models, such as the fixed-wing and multiple-rotor UAV model.
Ref. [24] proposed an auto-tuning PID using a sliding mode approach for a DC servomotor using FPGA, which showed better tracking responses after control parameter training. In [25], an adaptative PID control using sliding mode control has been proposed on a quadrotor UAV’s attitude, and the position control stabilization was compared to PID and SMC. In addition, a fuzzy compensator was included to reduce the chattering phenomenon. For the simulation part, a wind force disturbance was applied to show the robustness of the proposed control scheme with up to 100% changes in parameter uncertainties.
The motivation of this research is to develop an effective flight control system for a small micro aerial vehicle, which is less than 0.1 kg in weight. This is due to the MAV being relatively small and lightweight, and therefore its attitude and position tracking can be easily affected by a slight perturbation. Therefore, to attain a better-performing autonomous flight system, the MAV requires good control strategies to maintain attitude stability during translational movement. The main contribution of this paper is the implementation of an adaptive PID controller (APID) scheme using sliding mode control on the Parrot Mambo Minidrone quadrotor MAV, which has a mass of less than 0.1 kg. Ref. [25] implemented this scheme on a UAV, while [24] applied it to a DC motor. Nevertheless, in this paper, the proposed APIDC controller performances were compared to SMC with super twisting and SMC with a TanH function, whereas it was PID and SMC in [25]. By using sliding mode control as the adaptive mechanism, this approach may overcome the re-tuning gains of a proportional-integral-derivative controller’s manual controller. In addition, the chattering effect by sliding manifolds is eliminated using a fuzzy compensator. To demonstrate the advantages of the proposed flight control system, simulation and real-time experiments were conducted with a few adjustments to the flight control system in SSPPM. Furthermore, this paper also considers external disturbances from the environment model and noise from the sensors model. In conclusion, the APIDC system can produce better transient performance and fast convergence towards stability.
The organization of this manuscript is as follows. Section II describes the dynamics model of the MAV quadrotor. Section III shows the design of the APIDC for the altitude and attitude control of the quadrotor. Section IV presents the simulation and experimental results of the APIDC system, and finally, Section V presents the conclusion of the research work.

2. Modelling of MAV

The Parrot Mambo Minidrone is a quadrotor that belongs to the micro aerial vehicle (MAV) category, which comprises four symmetrical arranged rotors and is independently mounted on a rigid fuselage, as illustrated in Figure 1. Rotors (1 and 3) rotate clockwise, while rotors (2 and 4) rotate counterclockwise.
The mathematical model of this MAV is standardized in 6 degrees of freedom (DOF) x , y , z , ϕ , θ , ψ T , as referred to by researchers of UAV systems. Thus, the model may be split into two coordinate subsystems, where the vector x , y , z T describes the absolute positions, and the vector ϕ , θ , ψ T describes the orientation.
From the general Newton–Euler formulation, quadrotor translational dynamics are described as:
m x ¨ = U 1 s i n ψ s i n ϕ + c o s ψ s i n θ c o s ϕ m y ¨ = U 1 c o s ψ s i n ϕ + s i n ψ s i n θ c o s ϕ m z ¨ = m g U 1 c o s θ c o s ϕ
where m is the mass, g is the gravitational coefficient, and U 1 is the total thrust force. Meanwhile, the rotational dynamics are described as:
I x x ϕ ¨ = I y y I z z ψ ˙ θ ˙ J r Ω d θ ˙ + l U 2 I y y θ ¨ = I z z I x x ψ ˙ ϕ ˙ + J r Ω d ϕ ˙ + l U 3 I z z ψ ¨ = I x x I y y θ ˙ ϕ ˙ + U 4
where U 2 , U 3 and U 4 are the total torque for the roll, pitch, and yaw, respectively; l is the lateral arm length; I x x , I y y , and I z z are the moments of inertia for the quadrotor; J r is the rotor inertia, and Ω d is the total rotor speed generated from the torque related to the control inputs as:
u 1 = b Ω 1 2 + Ω 2 2 + Ω 3 2 + Ω 4 2 u 2 = b Ω 1 2 Ω 2 2 Ω 3 2 + Ω 4 2 u 3 = b Ω 1 2 + Ω 2 2 Ω 3 2 Ω 4 2 u 4 = d Ω 1 2 + Ω 2 2 Ω 3 2 + Ω 4 2 Ω d = Ω 1 + Ω 2 Ω 3 + Ω 4
where Ω i i = 1 , 2 , 3 , 4 is the rotor speed, and b and d are the thrust and drag coefficients, respectively. Finally, the Parrot Mambo Minidrone parameters are listed in Table 1.

2.1. Quadrotor State Space Representation

The dynamics provided in (1) and (2) are expressed as a conventional structure of second-order state-space equations:
x ¨ = f x + g x u
To carry out a systematic control system design approach while maintaining simple notation, the state vector is expressed as:
x =   x 1   x 2   x 3   x 4   x 5   x 6 T = x   y   z   ϕ   θ   ψ T
And the input vector is u = u 1   u 2   u 3   u 4 T . The nonlinear function f x and g x can be rewritten as:
f x = f 1 x f 2 x f 3 x f 4 x f 5 x f 6 x = 0 0 g a 1 ψ ˙ θ ˙ a 2 Ω d θ ˙ a 3 ψ ˙ ϕ ˙ + a 4 Ω d ϕ ˙ a 5 θ ˙ ϕ ˙
g x = g 1 x 0 0 0 g 2 x 0 0 0 g 3 x 0 0 0 0 g 4 x 0 0 0 0 g 5 x 0 0 0 0 g 6 x = 1 m u x 0 0 0 1 m u y 0 0 0 1 m u z 0 0 0 0 b 1 0 0 0 0 b 2 0 0 0 0 b 3
where
a 1 = I y y I z z I x x ,   a 2 = J r I x x ,   a 3 = I z z I x x I y y a 4 = J r I y y ,   a 5 = I x x I y y I z z ,   b 1 = l I x x b 2 = l I y y ,   b 3 = 1 I z z
and
u x = S ψ S ϕ + C ψ S θ C ϕ u y = C ψ S ϕ + S ψ S θ C ϕ u z = C θ C ϕ

2.2. Position Control

U 1 cannot be used to control the quadrotor trajectory’s x and y positions. However, the roll and pitch angles can be used to control the x and y positions. Since the quadrotor’s operation relies on the hover position, minimal angle values for the roll and pitch angles are required. For a simplified translation dynamic, the small-angle assumptions ( S ϕ d ϕ d , S θ d θ d , C ϕ d = C θ d = 1 ) are used in (1) as follows:
x ¨ = 1 m ϕ d S ψ + θ d C ψ U 1 y ¨ = 1 m ϕ d C ψ + θ d S ψ U 1
In a matrix form:
x ¨ y ¨ = U 1 m S ψ C ψ C ψ S ψ ϕ d θ d
Therefore, by inverting (11), the desired angle of the roll, ϕ d and the pitch, θ d may be calculated as follows:
ϕ d = m U 1 S ψ d x ¨ C ψ d y ¨ θ d = m U 1 C ψ d x ¨ + S ψ d y ¨

3. Flight Control Design

The flight control is designed by implementing the following algorithms:
  • The tracking error is set as e = x d x ;
  • The sliding surface is chosen as s = e ˙ + k 1 e + k 2 e d t ;
  • The PID controller, u p i d = k ^ p e + k ^ i e d t + k ^ d e ˙ where parameter gains k ^ p ,   k ^ i   a n d   k ^ d are updated by
    • k ^ p ˙ = β p s e ;
    • k ^ i ˙ = β i s e d t ;
    • k ^ d ˙ = β d s e ˙ ;
  • The fuzzy compensator u f z c = r ^ w 1 w 3 where the parameter r ^ is estimated by η r s w 1 w 3 ;
  • The control law is given by u = u p i d + u f z c .
The control objective of the system is to find a control law so that the x can track the desired x d closely; thus, the tracking error can be defined as:
e = x d x
Consider that an optimum controller exists if all the variables in (4) are known and can be described as:
u = g 1 f + x ¨ d + k 1 e ˙ + k 2 e
Hence, to meet the Hurwitz criterion, k 1 and k 2 are selected as non-zero positive constants., which implies lim t e = 0 for any initial starting conditions. Substituting (14) into (4) yields:
e ¨ + k 1 e ˙ + k 2 e = 0
The ideal controller u* in (14) cannot be precisely determined since the system dynamics are typically unknown in actual applications. Nevertheless, this problem may be solved by using a sliding mode controller. The nominal model (4) may be reformulated as follows before building the requisite controller:
x ¨ = f n x + g n x u
where f n and g n represent the nominal behaviour of f and g , respectively. If uncertainties and external disturbances are considered, (16) can be further modified as:
x ¨ = f n + Δ f + g n + Δ g u + d = f n + g n u + w
where d is the external disturbance, i.e., wind, Δ f and Δ g are system uncertainties, w is lumped of uncertainties and defined as w = Δ f + Δ g u + d , with the assumption w W , where W is a positive constant. The main idea behind sliding mode control is to make sure the system satisfies the necessary condition and is certain to have a sliding condition. Therefore, the chosen characteristics of a sliding surface in this paper are as follows:
s = e ˙ + k 1 e + k 2 e d t
where k 1 and k 2 are positive constants. The sliding-mode control law is outlined in [24,25] as:
u s c = u e q + u h t
where u e q is the equivalent controller and is defined as:
u e q = g n 1 f + x ¨ d + k 1 e ˙ + k 2 e
The hitting controller, u h t is designed to guarantee system stability and is described as:
u h t = W g n s i g n s ,   w h e r e   s i g n s + 1   i f   s < 0 1   i f   s > 0
The derivative of (18) gives:
s ˙ = e ¨ + k 1 e ˙ + k 2 e
Inserting (19)–(21) into (17) yields:
e ¨ + k 1 e ˙ + k 2 e = w W s i g n s = s ˙
For stability, a Lyapunov function is considered as follows:
V 1 = 1 2 s 2
Differentiating (24) to time gives:
V 1 ˙ = s s ˙
For stability V 1 ˙ 0 , replacing (23) into (25) yields:
V ˙ 1 = W w s
In short, system stability can be achieved using the sliding mode control principles based on the Lyapunov theorem. A bigger control gain, W , on the other hand, will generate chattering. Moreover, the switching function is not easy to implement due to physical limitations on the rotor used by an MAV [24,25].
The block diagram for the quadrotor altitude and attitude control systems in an adaptive PID system is shown in Figure 2. A PID controller and a fuzzy logic compensator are included in the proposed approach as:
u = u p i d + u f z c
here, u p i d is the PID controller used to approximate the optimum controller, u*, and u f z c is the fuzzy logic compensators designed to reduce the remaining approximation error between both controllers [24,25].

3.1. Pid Controller Design

The conventional PID controller is described as:
u p i d = k ^ p e + k ^ i e d t + k ^ d e ˙
where k ^ p , k ^ i , and k ^ d are the value of proportional, integral, and derivative gain, respectively. This paper proposed an adaptive mechanism to online determine these controller gains. For example, with a derivative of both sides of (22) and using (4), it can be observed that:
s ˙ = e ¨ + k 1 e ˙ + k 2 e = f g u + A d
where, A d = x ¨ d + k 1 e ˙ + k 2 e , substitute (27) into (29) and multiply by s gives,
s s ˙ = s g u p i d + u f z c + f A d
Using the gradient approach and the chain rule, k ^ p , k ^ i , and k ^ d gains are updated using the principles given in [24,25]:
k ^ ˙ p = s β p s i g n g e = β p s e k ^ ˙ i = s β i s i g n g e d t = β i s e d t k ^ ˙ d = s β d s i g n g e ˙ = β d s e ˙
where β p , β i , and β d represent the positive learning rates of k ^ ˙ p , k ^ ˙ i , and k ^ ˙ d , respectively. Additionally, the design method requires the g value, which may be easily obtained from the controlled system’s physical characteristics [24,25].

3.2. Design of the Fuzzy Compensator

Three ambiguous rules are presented for the compensator as described when P is positive, Z is zero, and N is negative in the expression below:
R u l e   1 :   I f   s   i s   P ,   t h e   u f z c   i s   P R u l e   2 :   I f   s   i s   Z ,   t h e   u f z c   i s   Z R u l e   3 :   I f   s   i s   N ,   t h e   u f z c   i s   N
where the input and output membership functions, as depicted in Figure 3a,b, are defined using triangular and singleton features. Finally, the defuzzification is achieved using the center-of-gravity approach as described below:
u f z c = i = 1 3 r i w i i = 1 3 w i = r 1 w 1 + r 2 w 2 + r 3 w 3
where the firing strength, w i   i = 1 ,   2 ,   3 , is bounded as 0   w i 1 and the sum of w i is exclusive to the case of the triangle membership function, being not more than one. Let us reduce the strain on the calculations by r 1 = r ^ ,     r 2 = 0 ,   a n d   r 3 = r ^ . As a result, only one of the four scenarios will occur for any value of input s , as mentioned in [24,25].
Case 1: Only rule 1 is triggered ( s > s a ,   w 1 = 1 ,   w 2 = w 3 = 0 )
u f z c = r 1 = r ^
Case 2: Rules 1 and 2 are triggered simultaneously ( 0 < s s a ,   0 < w 1 ,   w 2 1 , w 3 = 0 )
u f z c = r 1 w 1 = r ^ w 1
Case 3: Rules 2 and 3 are triggered simultaneously ( s b < s 0 ,   w 1 = 0 ,   0 < w 2 ,   w 3 1 )
u f z c = r 3 w 3 = r ^ w 3
Case 4: Only rule 3 is triggered ( s s b ,   w 1 = w 2 = 0 ,   w 3 = 1 )
u f z c = r 3 = r ^
Then, (34)–(37) can be reproduced as:
u f z c = r ^ w 1 w 3
Furthermore, it can be seen from [24,25]
s w 1 w 3 = s | ( w 1 w 3 ) | 0

3.3. Stability Analysis

By substituting (27) into (4), it is revealed that
x ¨ = f + g u p i d + u f z c
The error equation regulating the system can also be found by a simple manipulation of (14), (18), and (40), as shown below:
e ¨ + k i e ˙ + k 2 e = g u u p i d u f z c = s ˙
The optimal controller can be rewritten if an approximation error occurs as:
u = u p i d k ^ p , k ^ i , k ^ d + ε
where the approximation error, ε , is limited to 0 ε E , as E is a positive constant. Consequently, (41) is rewritable as:
s ˙ = g ε u f z c
Next, Lyapunov’s function is chosen as:
V 2 = 1 2 s 2
Differentiating (44) with respecting to time and applying (38) and (43) gives:
  V ˙ 2 = g s w 1 w 3 r ^ ε w 1 w 3
If the inequality that occurs in
r ^ > ε w 1 w 3
holds, then the sliding condition V ˙ 2 0 can be met. For practical applications, the value of r ^ cannot be determined in advance because of unidentified lumped uncertainties. According to (38), to attain and match the smallest sliding value, the optimal, r value is set as follows:
r = ε w 1 w 3 + κ
where κ stands for a positive constant. This research thus employs a simple adaptive algorithm to determine an optimal value, r . Hence the definition of the estimated error is:
r ˜ = r r ^
where r ^ represents the estimated optimal value of r . A new Lyapunov function is then defined as:
V 3 = 1 2 s 2 + g 2 η r r ˜ 2
where a constant learning rate η r > 0 . Differentiating (49) and substituting using (38), (43), and (47) yields:
V ˙ 3 = g s ε r ˜ g s w 1 w 3 + r ˜ ˙ η r r s g w 1 w 3
We choose the parameter tuning law as:
r ˜ ˙ = r ^ ˙ = η r s w 1 w 3
By using (47), (50) becomes:
  V ˙ 3 = g κ s w 1 w 3 0
Since V ˙ 3 is negative semidefinite, that is V 3 s , r ˜ , t V 3 s , r ˜ , 0 , it implies that s and r ˜ are bounded. Let function Ω τ g κ s w 1 w 3 V ˙ 3 ; integrating Ω t yields:
0 t Ω τ d τ V 3 s , r ˜ , 0 V 3 s , r ˜ , t
Because V 3 s , r ˜ , 0 is bounded, and V 3 s , r ˜ , t is non-increasing and bounded, the following result can be obtained:
lim t 0 t Ω τ d τ <
Moreover, since   Ω ˙ t is bounded by Barbalat’s Lemma [24,25], lim t Ω t = 0 , s 0 as t . Therefore, the proposed APIDC system’s stability can be guaranteed.
In short, if the β p , β i , and β d learning rate or initial k ^ p , k ^ i , and k ^ d of PID gains are not correctly chosen, the system’s state will diverge. Therefore, the learning rate can be adjusted manually or with the optimization method. The fuzzy compensator in Equation (38) is crucial in providing additional input for a state reversal.

4. Simulation Result

The simulation was set up on MATLAB Simulink based on dynamics Equations (1) and (2) and with the Parrot Mambo Minidrone parameters as tabulated in Table 1. The above-proposed controller, APIDC, was compared to a sliding mode control with TanH function (SMC TanH) [26] and a sliding mode control with a super twisting algorithm (SMCSTA) [27]. The states were initially set as ζ = 0 , 0 , 0 , 0 , 0 , 1 for x , y , z , ϕ , θ ,   ψ , respectively. The quadrotor was set to hover at 1 meter, and the desired position of x and y were set as follows:
x d = s i n 2 π t 60 y d = c o s 2 π t 60
The desired ψ was set as 0 rad, while the desired ϕ and θ were produced by the virtual controller as stated in Equation (12). The simulation ran about 60 s.
For the super twisting sliding mode (STA), the parameters were set as follows: λ i = 1.2 , k 1 i = 1 , k 2 i = 0.002 , for ( i = z , ϕ , θ , ψ ), λ j = 0.7 , k 1 j = 0.5 , and k 2 j = 0.001 for ( j = x , y ).
For the sliding mode with TanH (SMC TanH), the parameters were set as follows: λ i = 1.5 , η i = 2 , k i = 1 , and ϵ i = 0.01 , for ( i = ϕ , θ , ψ ), λ z , x , y = 1.2 ,   1.44 ,   1.44 ,   η z , x , y = 3 ,   0.36 ,   0.36 , k z , x , y = 0.01 ,   0.018 ,   0.018 , and finally ϵ z , x , y = 0.01 ,   0.018 ,   0.018 .
For the adaptive PID (APID), the parameters were set as follows: β p j = 1 , β i j = 0 , β d j = 1 , k 1 j = 1 , k 2 j = 0.1 , n f z j = 0.01 , for j = ϕ ,   θ ,   ψ . β p k = 1 , β i k = 0 , β d k = 1 , k 1 k = 1 , k 2 k = 0.01 , and n f z j = 0.1 for k = z ,   x ,   y .
These parameters are set to achieve better performance by comparing the integral square error (ISE) index performances of the above controllers without and with perturbation during simulation.

4.1. Circle Trajectory without Perturbation

The states’ response is shown in Figure 4a. All states can follow the desired trajectory with minimum errors. Based on Figure 4b, APID shows a more significant response to follow the desired reference with satisfaction of integral square error (ISE) performance compared to another controller, as stated in Table 2. Figure 5 shows the input response towards the system to achieve stabilization where STA produces little chattering on input U 2 , in contrast to SMC with TahH, which produces chattering at inputs U 1 , U 2 , and U 3 but is clean with the APID. Hence, it clearly shows the most excellent performance of APID compared to another controller.

4.2. Circle Trajectory with Perturbation

The simulation continued with a perturbation of a pulse with an amplitude of 0.025 injected to mimic a small perturbation every 15 seconds to observe the robustness of the proposed control scheme on x , y , and z . In addition, a normal Gaussian noise was injected as d k = N 0 , 0.08 for k = ϕ ,   θ , ψ [28]. The perturbation was relatively small because the MAV was smaller than 1 kg. A large force will make the system unstable and incapable of performing as desired.
The stabilization of state variables is shown in Figure 6a. All controllers work properly to converge to the desired point. For the desired trajectory, as shown in Figure 6b, the APID shows a more significant response to follow the desired reference with satisfaction of integral square error (ISE) performance compared to another controller, as stated in Table 2. Figure 7 shows the input response towards the system to achieve stabilization; only U 1 shows a ripple of pulse every 15 s for all controllers. However, the other U inputs remain steady. Hence, this clearly shows the most excellent performance of APID compared to another controller.

4.3. Model-Based Simulation

The simulation continued using MATLAB/Simulink R2020b via a Simulink Support Package for Parrot Minidrones. This model is provided by MATLAB based on Aerospace Blockset developed by MIT [29]. This model-based simulation can perform hardware-in-loop, which shortens the programming process by directly using a Simulink block to perform the algorithm. This simulation is vital to show the effectiveness of the proposed control scheme before being implemented directly on a real-time platform.
The simulation starts by calling the ‘parrotMinidroneHoverStart’ command. The simulation used a third-order solver with a fixed sampling time of Ts = 0.005 seconds.
Table 3 shows the parameter used in the environment model. Based on sliding surface in (18), fuzzy logic adaptive parameter tuning law in (45), fuzzy logic compensator in (51), and adaptive parameter gains tuning law in (31), the control algorithm was designed by modifying the controller box inside the flight control system. The PID learning rate, fuzzy learning rate, and sliding parameter are listed in Table 4.
The simulations are based on planning two paths, ‘Orbit Follower’ and ‘Waypoint Follower’, taken from the UAV toolbox. In addition, the landing logic (LL) is also implemented to prevent the Parrot Mambo Minidrone from crashing during landing. This LL will be triggered 5 seconds before stop times. The performance index for all states is recorder and tabulated in Table 5.

4.3.1. Orbit Follower Simulation

For this orbit follower, the orbit radius was set as 0.5 m, and in the clockwise orbit direction, LookaheadDistance was set at a minimum of 0.1 m to 0.195 m. The LookaheadDistance input was a positive scalar to control how closely the UAV follows the circular path. Small values improve tracking but can lead to oscillations in the path [30].
Figure 8 shows the response of the position and attitude states over 60 seconds of simulation. The figure indicates that the Parrot Mambo Minidrone can perform flight simulation using APIDC where the MAV can stabilize the altitude at 1 m height from the ground within 6 seconds of settling time, T s , with slight overshoot. The roll, pitch, and yaw responses show it can track the produced reference signal. The 3-dimensional plot of x , y , and z in Figure 9 clearly shows the robustness of the APIDC to reject external disturbances from the environment model and noise from the sensors model.

4.3.2. Waypoint Follower Simulation

For this waypoint follower, a square trajectory point was set as 1.5 m × 1.5 m above 1 m height. The LookaheadDistance was set at a minimum of 0.1 m to 0.2 m. The LookaheadDistance input is a positive scalar that controls how closely the UAV follows the path. Small values improve tracking but can lead to oscillations in the path [30].
The APIDC parameters were unchanged, as stated in Table 4. Figure 10 shows the position and attitude responses over 60 seconds of simulation. The figure indicates that the Parrot Mambo Minidrone is able to perform flight simulation using APIDC where the MAV can stabilize the altitude at 1 m height from the ground within 6 seconds of settling time, T s , with slight overshoot. Furthermore, the roll, pitch, and yaw responses show it can track the produced reference signal. This shows the robustness of the APIDC to reject external disturbances from the environment model and noise from the sensors model. Figure 11 shows the x y z plot to describe the Parrot Mambo Minidrone movement based on the setup waypoint.

5. Conclusions

In this paper, the simulation of SMC with STA, SMC with TanH, and Adaptive PID was provided and tested on the MAV quadrotor model. The control algorithms were tested without and with perturbation injected into the systems. After that, the adaptive PID was tested on model-based Parrot Mambo Minidrones provided by the MATLAB Simulink support package. This adaptive mechanism control, which was based on a second-order sliding mode, was used to tune the parameter gains of the proportional-integral-derivative controller. A fuzzy compensator was also used to reduce the chattering phenomena caused by the sliding mode control. Moreover, the automated tuning was based on the technique of gradient descent, and the Lyapunov stability theorem proved the stability of the proposed APIDC. Finally, results from the orbit follower and the waypoint follower demonstrate the advantages of the control algorithms, which produced better transient performance and faster convergence towards stability. In the future, a real-time experiment can be conducted to verify the above-proposed control scheme.

Author Contributions

Conceptualization, A.N. and M.A.M.B.; methodology, A.N.; software A.N.; validation, A.N. and M.A.M.B.; formal analysis, A.N.; investigation A.N., writing—original draft preparation, A.N.; writing—review and editing, M.A.M.B. and Z.M.; supervision, M.A.M.B. and Z.M. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The study did not report any data.

Acknowledgments

The authors would like to thank Universiti Teknikal Malaysia Melaka (UTeM), Universiti Teknologi Malaysia (UTM), Ministry of Higher Education (MOHE) through the Fundamental Research Grant Scheme (FRGS/1/2021/TK0/UTM/02/56), and Advanced Academia-Industrial Testing Laboratory (AiTL), UTeM for supporting this research.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Cai, G.; Dias, J.; Seneviratne, L. A Survey of Small-Scale Unmanned Aerial Vehicles: Recent Advances and Future Development Trends. Unmanned Syst. 2014, 2, 175–199. [Google Scholar] [CrossRef]
  2. Noordin, A.; Basri, M.A.M.; Mohamed, Z. Simulation and experimental study on PID control of a quadrotor MAV with perturbation. Bull. Electr. Eng. Inform. 2020, 9, 1811–1818. [Google Scholar] [CrossRef]
  3. Glazkov, T.V.; Golubev, A.E. Using Simulink Support Package for Parrot Minidrones in nonlinear control education. AIP Conf. Proc. 2019, 2195, 020007. [Google Scholar] [CrossRef]
  4. Castañeda, H.; Gordillo, J.L. Spatial Modeling and Robust Flight Control Based on Adaptive Sliding Mode Approach for a Quadrotor MAV. J. Intell. Robot. Syst. 2018, 93, 101–111. [Google Scholar] [CrossRef]
  5. Alqaisi, W.K.; Brahmi, B.; Ghommam, J.; Saad, M.; Nerguizian, V. Adaptive Sliding mode Control Based on RBF Neural Network Approximation for Quadrotor. In Proceedings of the 019 IEEE International Symposium on Robotic and Sensors Environments (ROSE), Ottawa, ON, Canada, 17–18 June 2019. [Google Scholar] [CrossRef]
  6. Mofid, O.; Mobayen, S. Adaptive Finite-Time Backstepping Global Sliding Mode Tracker of Quad-Rotor UAVs Under Model Uncertainty, Wind Perturbation, and Input Saturation. IEEE Trans. Aerosp. Electron. Syst. 2021, 58, 140–151. [Google Scholar] [CrossRef]
  7. Kartal, Y.; Kolaric, P.; Lopez, V.; Dogan, A.; Lewis, F. Backstepping approach for design of PID controller with guaranteed performance for micro-air UAV. Control Theory Technol. 2019, 18, 19–33. [Google Scholar] [CrossRef]
  8. Basri, M.; Ariffanan, M.; Danapalasingam, K.A.; Husain, A.R. Design and Optimization of Backstepping Controller For An Underactuated Autonomous Quadrotor Unmanned Aerial Vehichle. Trans. FAMENA 2014, 38, 27–44. [Google Scholar]
  9. Alqaisi, W.; Brahmi, B.; Ghommam, J.; Saad, M.; Nerguizian, V. Sliding Mode Controller and Hierarchical Perturbation Compensator in a UAV Quadrotor. In Proceedings of the CIVEMSA 2018—2018 IEEE International Conference on Computational Intelligence and Virtual Environments for Measurement Systems and Applications, Ottawa, ON, Canada, 12–13 June 2018; pp. 4–9. [Google Scholar] [CrossRef]
  10. Alqaisi, W.; Kali, Y.; Ghommam, J.; Saad, M.; Nerguizian, V. Position and attitude tracking of uncertain quadrotor unmanned aerial vehicles based on non-singular terminal super-twisting algorithm. Proc. Inst. Mech. Eng. Part I J. Syst. Control. Eng. 2019, 234, 396–408. [Google Scholar] [CrossRef]
  11. Castañeda, H.; Rodriguez, J.; Gordillo, J.L. Continuous and smooth differentiator based on adaptive sliding mode control for a quad-rotor MAV. Asian J. Control 2019, 23, 661–672. [Google Scholar] [CrossRef]
  12. Waslander, S.; Hoffmann, G.; Jang, J.S.; Tomlin, C. Multi-agent quadrotor testbed control design: Integral sliding mode vs. reinforcement learning. In Proceedings of the 2005 IEEE/RSJ International Conference on Intelligent Robots and Systems, Edmonton, AB, Canada, 2–6 August 2005. [Google Scholar] [CrossRef]
  13. Wang, H.; Ye, X.; Tian, Y.; Zheng, G.; Christov, N. Model-free–based terminal SMC of quadrotor attitude and position. IEEE Trans. Aerosp. Electron. Syst. 2016, 52, 2519–2528. [Google Scholar] [CrossRef]
  14. Abaunza, H.; Castillo, P. Quadrotor Aggressive Deployment, Using a Quaternion-Based Spherical Chattering-Free Sliding-Mode Controller. IEEE Trans. Aerosp. Electron. Syst. 2019, 56, 1979–1991. [Google Scholar] [CrossRef]
  15. Ashis, C.K.; Sharma, K.R. Dynamic Modeling and Altitude Control of Parrot Rolling Spider using LQR. In Proceedings of the 2019 2nd International Conference on Intelligent Computing, Instrumentation and Control Technologies, ICICICT, Kannur, India, 5–6 July 2019; pp. 1377–1381. [Google Scholar] [CrossRef]
  16. Mohammed, M.J.; Ali, A.A. Design Optimal PID Controller for Quad Rotor System. Int. J. Comput. Appl. 2014, 106, 15–20. [Google Scholar]
  17. Santos, M.; Lopez, V.; Morata, F. Intelligent fuzzy controller of a quadrotor. In Proceedings of the 2010 IEEE International Conference on Intelligent Systems and Knowledge Engineering, Hangzhou, China, 15–16 November 2010. [Google Scholar] [CrossRef]
  18. Basri, M.A.M.; Husain, A.R.; Danapalasingam, K.A. Intelligent adaptive backstepping control for MIMO uncertain non-linear quadrotor helicopter systems. Trans. Inst. Meas. Control 2014, 37, 345–361. [Google Scholar] [CrossRef]
  19. Ali, Z.A.; Wang, D.; Aamir, M. Fuzzy-Based Hybrid Control Algorithm for the Stabilization of a Tri-Rotor UAV. Sensors 2016, 16, 652. [Google Scholar] [CrossRef] [PubMed]
  20. Guo, Y.; Luo, L.; Bao, C. Design of a Fixed-Wing UAV Controller Combined Fuzzy Adaptive Method and Sliding Mode Control. Math. Probl. Eng. 2022, 2022, 2812671. [Google Scholar] [CrossRef]
  21. Yan, L.; Webber, J.L.; Mehbodniya, A.; Moorthy, B.; Sivamani, S.; Nazir, S.; Shabaz, M. Distributed optimization of heterogeneous UAV cluster PID controller based on machine learning. Comput. Electr. Eng. 2022, 101, 108059. [Google Scholar] [CrossRef]
  22. Kali, Y.; Rodas, J.; Saad, M.; Gregor, R.; Alqaisi, W.; Benjelloun, K. Robust Finite-time Position and Attitude Tracking of a Quadrotor UAV using Super-Twisting Control Algorithm with Linear Correction Terms. In Proceedings of the ICINCO 2019—Proceedings of the 16th International Conference on Informatics in Control, Automation and Robotics, Prague, Czech Republic, 29–31 July 2019. [Google Scholar] [CrossRef]
  23. Kaplan, M.R.; Eraslan, A.; Beke, A.; Kumbasar, T. Altitude and Position Control of Parrot Mambo Minidrone with PID and Fuzzy PID Controllers. In Proceedings of the ELECO 2019—11th International Conference on Electrical and Electronics Engineering, Bursa, Turkey, 28–30 November 2019; pp. 785–789. [Google Scholar] [CrossRef]
  24. Hsu, C.; Chiu, C.; Tsai, J. Auto-tuning PID controller design using a sliding-mode approach for DC servomotors. Int. J. Intell. Comput. Cybern. 2011, 4, 93–110. [Google Scholar] [CrossRef]
  25. Noordin, A.; Basri, M.A.M.; Mohamed, Z.; Lazim, I.M. Adaptive PID Controller Using Sliding Mode Control Approaches for Quadrotor UAV Attitude and Position Stabilization. Arab. J. Sci. Eng. 2020, 46, 963–981. [Google Scholar] [CrossRef]
  26. Noordin, A.; Basri, M.A.M.; Mohamed, Z.; Lazim, I.M. Position and Attitude Control of Quadrotor MAV Using Sliding Mode Control with Tanh Function. In Enabling Industry 4.0 through Advances in Mechatronics; Springer: Singapore, 2022; pp. 193–204. [Google Scholar] [CrossRef]
  27. Noordin, A.; Basri, M.A.M.; Mohamed, Z.; Lazim, I.M. Adaptive Super Twisting Sliding Mode Control of Quadrotor MAV. In Control, Instrumentation and Mechatronics: Theory and Practice; Wahab, N.A., Mohamed, Z., Eds.; Springer: Singapore, 2022; pp. 299–309. [Google Scholar]
  28. Noordin, A.; Basri, M.A.M.; Mohamed, Z. Sliding Mode Control with Tanh Function for Quadrotor UAV Altitude and Attitude Stabilization. In Intelligent Manufacturing and Mechatronics; Lecture Notes in Mechanical Engineering; Springer: Singapore, 2021; pp. 471–491. [Google Scholar] [CrossRef]
  29. MathWorks. Parrot Minidrones Support from Simulink. 2019. Available online: https://www.mathworks.com/hardware-support/parrot-minidrones.html (accessed on 10 July 2019).
  30. Wang, S.; Xu, G.; Liu, T.; Zhu, Y. Robust Real-time Obstacle Avoidance of Wheeled Mobile Robot based on Multi-Sensor Data Fusion. In Proceedings of the 2021 IEEE 5th Advanced Information Technology, Electronic and Automation Control Conference (IAEAC), Chongqing, China, 12–14 March 2021; pp. 2383–2387. [Google Scholar]
Figure 1. Parrot Mambo Minidrone MAV.
Figure 1. Parrot Mambo Minidrone MAV.
Drones 06 00263 g001
Figure 2. Block diagram of an adaptive PID controller for a quadrotor UAV.
Figure 2. Block diagram of an adaptive PID controller for a quadrotor UAV.
Drones 06 00263 g002
Figure 3. The fuzzy membership function. P is positive, Z is zero, and N is negative.
Figure 3. The fuzzy membership function. P is positive, Z is zero, and N is negative.
Drones 06 00263 g003
Figure 4. Circle trajectory without perturbation.
Figure 4. Circle trajectory without perturbation.
Drones 06 00263 g004
Figure 5. U 1 , U 2 , U 3 , U 4 input for STA, SMC TanH, and APID controllers without perturbation.
Figure 5. U 1 , U 2 , U 3 , U 4 input for STA, SMC TanH, and APID controllers without perturbation.
Drones 06 00263 g005
Figure 6. Circle trajectory with perturbation.
Figure 6. Circle trajectory with perturbation.
Drones 06 00263 g006
Figure 7. U 1 , U 2 , U 3 , U 4 input for STA, SMC TanH, and APID controllers with perturbation.
Figure 7. U 1 , U 2 , U 3 , U 4 input for STA, SMC TanH, and APID controllers with perturbation.
Drones 06 00263 g007
Figure 8. Orbit follower—position and attitude responses through simulation.
Figure 8. Orbit follower—position and attitude responses through simulation.
Drones 06 00263 g008
Figure 9. Orbit follower through simulation.
Figure 9. Orbit follower through simulation.
Drones 06 00263 g009
Figure 10. Waypoint follower—position and attitude response through simulation.
Figure 10. Waypoint follower—position and attitude response through simulation.
Drones 06 00263 g010
Figure 11. Waypoint follower through simulation.
Figure 11. Waypoint follower through simulation.
Drones 06 00263 g011
Table 1. Parrot Mambo Model Physical Parameters [2].
Table 1. Parrot Mambo Model Physical Parameters [2].
SpecificationParameterUnitValue
Quadrotor mass m kg 0.0630
Lateral moment arm l m 0.0624
Thrust coefficient b Ns 2 0.0107
Drag coefficient d Nms 2 0.7826400 × 10 3
Rolling moment of inertia I x x kgm 2 0.0582857 × 10 3
Pitching moment of inertia I y y kgm 2 0.0716914 × 10 3
Yawing moment of inertia I z z kgm 2 0.1000000 × 10 3
Rotor moment of inertia J r   kgm 2 0.1021 × 10 6
Table 2. ISE index performances without and with perturbation.
Table 2. ISE index performances without and with perturbation.
Without perturbation
STASMC TanHAPID
x 0.08982 1.1560 0.596900
y 0.01400 0.9769 0.008548
z 1.32090 0.6067 0.953600
ϕ 2.0080 × 10 3 4.534 × 10 5 3.635 × 10 7
θ 3.0520 × 10 3 7.990 × 10 5 4.972 × 10 3
ψ 0.6807 × 10 3 8.362 × 10 9 3.646 × 10 14
With perturbation
STASMC TanHAPID
x 0.096550 2.0950 0.58480
y 0.017780 1.5850 0.01069
z 1.329000 0.6069 0.95470
ϕ 2.1250 × 10 3 0.268 × 10 3 4.759 × 10 5  
θ 3.4190 × 10 3 0.319 × 10 3 4.950 × 10 3
ψ 0.6821 × 10 3 2.385 × 10 7 5.385 × 10 7
Table 3. Parameters in environment model.
Table 3. Parameters in environment model.
ParameterSymbolConstant Value
Air Temp T 288   K
Speed of Sound a 340 m / s
Pressure P 101.3 × 10 3 Pa
Air Density ρ 1.1840   kg / m 3
Table 4. APIDC learning rate, sliding parameter, and fuzzy learning rate.
Table 4. APIDC learning rate, sliding parameter, and fuzzy learning rate.
PositionAttitude
Learning Rate x y z ϕ θ ψ
β p 0.20.20.010.10.14
β i 0.70.70.010.10.010.01
β d 220.010.010.010.01
Sliding constant x y z ϕ θ ψ
k 1 110.1520.5
k 2 0.010.010.5212
Fuzzy learning rate x y z ϕ θ ψ
η r −0.15−0.25−0.001−0.001−0.001−0.001
Table 5. Simulation performance index.
Table 5. Simulation performance index.
PositionAttitude
IAE x y z ϕ θ ψ
Orbit 6.4330 6.2010 1.1290 0.03619 0.04502 0.00118
Waypoint 6.6441 4.8270 1.1280 0.05802 0.05134 0.00116
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Noordin, A.; Mohd Basri, M.A.; Mohamed, Z. Position and Attitude Tracking of MAV Quadrotor Using SMC-Based Adaptive PID Controller. Drones 2022, 6, 263. https://doi.org/10.3390/drones6090263

AMA Style

Noordin A, Mohd Basri MA, Mohamed Z. Position and Attitude Tracking of MAV Quadrotor Using SMC-Based Adaptive PID Controller. Drones. 2022; 6(9):263. https://doi.org/10.3390/drones6090263

Chicago/Turabian Style

Noordin, Aminurrashid, Mohd Ariffanan Mohd Basri, and Zaharuddin Mohamed. 2022. "Position and Attitude Tracking of MAV Quadrotor Using SMC-Based Adaptive PID Controller" Drones 6, no. 9: 263. https://doi.org/10.3390/drones6090263

Article Metrics

Back to TopTop