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

: 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 ﬂight system performance, MAVs require good control strategies to maintain their attitude stability during translational movement. However, the available control methods nowadays have ﬁxed 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.


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, feedforward 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.

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.
vomotor using FPGA, which showed better tracking responses after control paramet training.In [25], an adaptative PID control using sliding mode control has been propos on a quadrotor UAV's attitude, and the position control stabilization was compared PID and SMC.In addition, a fuzzy compensator was included to reduce the chatteri phenomenon.For the simulation part, a wind force disturbance was applied to show t robustness of the proposed control scheme with up to 100% changes in parameter unce tainties.
The motivation of this research is to develop an effective flight control system for small micro aerial vehicle, which is less than 0.1 kg in weight.This is due to the MA being relatively small and lightweight, and therefore its attitude and position tracking c be easily affected by a slight perturbation.Therefore, to attain a better-performing auto omous flight system, the MAV requires good control strategies to maintain attitude s bility during translational movement.The main contribution of this paper is the imp mentation of an adaptive PID controller (APID) scheme using sliding mode control on t Parrot Mambo Minidrone quadrotor MAV, which has a mass of less than 0.1 kg.Ref. [2 implemented this scheme on a UAV, while [24] applied it to a DC motor.Nevertheless, this paper, the proposed APIDC controller performances were compared to SMC wi super twisting and SMC with a TanH function, whereas it was PID and SMC in [25].using sliding mode control as the adaptive mechanism, this approach may overcome t re-tuning gains of a proportional-integral-derivative controller's manual controller.In a dition, the chattering effect by sliding manifolds is eliminated using a fuzzy compensato To demonstrate the advantages of the proposed flight control system, simulation and re time experiments were conducted with a few adjustments to the flight control system SSPPM.Furthermore, this paper also considers external disturbances from the enviro ment model and noise from the sensors model.In conclusion, the APIDC system can pr duce better transient performance and fast convergence towards stability.
The organization of this manuscript is as follows.Section II describes the dynam model of the MAV quadrotor.Section III shows the design of the APIDC for the altitu and attitude control of the quadrotor.Section IV presents the simulation and experimen results of the APIDC system, and finally, Section V presents the conclusion of the resear work.

Modelling of MAV
The Parrot Mambo Minidrone is a quadrotor that belongs to the micro aerial vehic (MAV) category, which comprises four symmetrical arranged rotors and is independent mounted on a rigid fuselage, as illustrated in Figure 1.Rotors (1 and 3) rotate clockwis 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 ..
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: 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 xx , I yy , and I zz 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: 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.The dynamics provided in (1) and ( 2) are expressed as a conventional structure of second-order state-space equations: ..
To carry out a systematic control system design approach while maintaining simple notation, the state vector is expressed as: Drones 2022, 6, 263 5 of 18 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: where a 1 = and

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 are used in (1) as follows: ..
In a matrix form: ..
Therefore, by inverting (11), the desired angle of the roll, φ d and the pitch, θ d may be calculated as follows:

Flight Control Design
The flight control is designed by implementing the following algorithms: i.The tracking error is set as e = x d − x; ii.
The sliding surface is chosen as s = .
The PID controller, u pid = kp e + ki edt + kd The fuzzy compensator u f zc = r(w 1 − w 3 ) where the parameter r is estimated by −η r s(w The control law is given by u = u pid + u f zc .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: Consider that an optimum controller exists if all the variables in (4) are known and can be described as: 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: ..
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: ..
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: ..
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 + ∆gu + 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: where k 1 and k 2 are positive constants.The sliding-mode control law is outlined in [24,25] as: where u eq is the equivalent controller and is defined as: The hitting controller, u ht is designed to guarantee system stability and is described as: , where sign(s) The derivative of (18) gives: . s = . .
For stability .
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: here, u pid is the PID controller used to approximate the optimum controller, u*, and u f zc is the fuzzy logic compensators designed to reduce the remaining approximation error between both controllers [24,25].

Pid Controller Design
The conventional PID controller is described as: where , , and 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

Pid Controller Design
The conventional PID controller is described as: where kp , ki , and kd 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 2 e, substitute (27) into ( 29) and multiply by s gives, Using the gradient approach and the chain rule, kp , ki , and kd gains are updated using the principles given in [24,25]: Additionally, the design method requires the g value, which may be easily obtained from the controlled system's physical characteristics [24,25].

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: Rule 1 : I f s is P, the u f zc is P Rule 2 : I f s is Z, the u f zc is Z Rule 3 : 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: 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, and 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) Case 2: Rules 1 and 2 are triggered simultaneously (0 < s ≤ s a , 0 < w 1 , w 2 ≤ 1, w 3 = 0) Drones 2022, 6, 263 9 of 18 Case 3: Rules 2 and 3 are triggered simultaneously (s b < s ≤ 0, w 1 = 0, 0 < w 2 , w 3 ≤ 1) Case 4: Only rule 3 is triggered (s ≤ s b , w 1 = w 2 = 0, w 3 = 1) Then, (34)-(37) can be reproduced as: Furthermore, it can be seen from [24,25] is exclusive to the case of the triangle membership function, being not more than one.Let us reduce the strain on the calculations by = , = 0, = − .As a result, only one of the four scenarios will occur for any value of input , as mentioned in [24,25].

Stability Analysis
By substituting ( 27) into (4), it is revealed that
x = f + g u pid + u f zc (40) The error equation regulating the system can also be found by a simple manipulation of ( 14), (18), and (40), as shown below: ..
The optimal controller can be rewritten if an approximation error occurs as: where the approximation error, ε, is limited to 0 ≤ |ε| ≤ E, as E is a positive constant.Consequently, (41) is rewritable as: .
The states were initially set as ζ = [0, 0, 0, 0, 0, 1] for x, y, z, φ, θ, ψ, respectively.The quadro- tor was set to hover at 1 meter, and the desired position of x and y were set as follows: 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 adaptive PID (APID), the parameters were set as follows: 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.

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., in contrast to SMC with TahH, which produces chattering at inputs , , and but is clean with the APID.Hence, it clearly shows the most excellent performance of APID compared to another controller., in contrast to SMC with TahH, which produces chattering at inputs , , and but is clean with the APID.Hence, it clearly shows the most excellent performance of APID compared to another controller.

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.
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 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.

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-inloop, 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.
Table 3. Parameters in environment model.

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 hardwarein-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.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 Lookahead-Distance 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, Ts, 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.

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, , 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.

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 Looka-headDistance 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, Ts, 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 xyz plot to describe the Parrot Mambo Minidrone movement based on the setup waypoint.
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, , 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 plot to describe the Parrot Mambo Minidrone movement based on the setup waypoint.

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 realtime experiment can be conducted to verify the above-proposed control scheme.

Figure 2 .
Figure 2. Block diagram of an adaptive PID controller for a quadrotor UAV.

Case 1 :Figure 3 .
Figure 3.The fuzzy membership function.P is positive, Z is zero, and N is negative.

Figure 3 .
Figure 3.The fuzzy membership function.P is positive, Z is zero, and N is negative.
(a) state response (b) xyz plot
(a) state response (b) xyz plot
(a) state response (b) xyz plot

Figure 8
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, , with slight overshoot.The roll, pitch, and yaw responses show it can track the produced reference signal.The 3-dimensional plot of , , and in Figure 9 clearly shows the robustness of the APIDC to reject external disturbances from the environment model and noise from the sensors model.

Figure 8 .
Figure 8. Orbit follower-position and attitude responses through simulation.

Figure 11
shows the plot to describe the Parrot Mambo Minidrone movement based on the setup waypoint.

Figure 10 .
Figure 10.Waypoint follower-position and attitude response through simulation.

Table 2 .
ISE index performances without and with perturbation.

Table 2 .
ISE index performances without and with perturbation.

Table 2 .
ISE index performances without and with perturbation.

Table 3 .
Parameters in environment model.

Table 4 .
APIDC learning rate, sliding parameter, and fuzzy learning rate.

Table 5 .
Simulation performance index.

Table 5 .
Simulation performance index.