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) , as referred to by researchers of UAV systems. Thus, the model may be split into two coordinate subsystems, where the vector describes the absolute positions, and the vector describes the orientation.
From the general Newton–Euler formulation, quadrotor translational dynamics are described as:
where
is the mass,
is the gravitational coefficient, and
is the total thrust force. Meanwhile, the rotational dynamics are described as:
where
,
and
are the total torque for the roll, pitch, and yaw, respectively;
is the lateral arm length;
,
, and
are the moments of inertia for the quadrotor;
is the rotor inertia, and
is the total rotor speed generated from the torque related to the control inputs as:
where
is the rotor speed, and
and
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:
To carry out a systematic control system design approach while maintaining simple notation, the state vector is expressed as:
And the input vector is
. The nonlinear function
and
can be rewritten as:
where
and
2.2. Position Control
cannot be used to control the quadrotor trajectory’s
and
positions. However, the roll and pitch angles can be used to control the
and
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:
Therefore, by inverting (11), the desired angle of the roll,
and the pitch,
may be calculated as follows:
3. Flight Control Design
The flight control is designed by implementing the following algorithms:
The tracking error is set as ;
The sliding surface is chosen as ;
The PID controller, where parameter gains are updated by
The fuzzy compensator where the parameter is estimated by ;
The control law is given by .
The control objective of the system is to find a control law so that the
can track the desired
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,
and
are selected as non-zero positive constants., which implies
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
and
represent the nominal behaviour of
and
respectively. If uncertainties and external disturbances are considered, (16) can be further modified as:
where
is the external disturbance, i.e., wind,
and
are system uncertainties,
is lumped of uncertainties and defined as
, with the assumption
, where
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
and
are positive constants. The sliding-mode control law is outlined in [
24,
25] as:
where
is the equivalent controller and is defined as:
The hitting controller,
is designed to guarantee system stability and is described as:
The derivative of (18) gives:
Inserting (19)–(21) into (17) yields:
For stability, a Lyapunov function is considered as follows:
Differentiating (24) to time gives:
For stability
, replacing (23) into (25) yields:
In short, system stability can be achieved using the sliding mode control principles based on the Lyapunov theorem. A bigger control gain,
, 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,
is the PID controller used to approximate the optimum controller, u*, and
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:
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 that:
where,
, substitute (27) into (29) and multiply by
gives,
Using the gradient approach and the chain rule,
,
, and
gains are updated using the principles given in [
24,
25]:
where
,
, and
represent the positive learning rates of
,
, and
, 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:
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,
, is bounded as
and the sum of
is exclusive to the case of the triangle membership function, being not more than one. Let us reduce the strain on the calculations by
As a result, only one of the four scenarios will occur for any value of input
, as mentioned in [
24,
25].
Case 1: Only rule 1 is triggered
Case 2: Rules 1 and 2 are triggered simultaneously (
Case 3: Rules 2 and 3 are triggered simultaneously (
Case 4: Only rule 3 is triggered (
Then, (34)–(37) can be reproduced as:
Furthermore, it can be seen from [
24,
25]
3.3. Stability Analysis
By substituting (27) into (4), it is revealed that
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
, as
is a positive constant. Consequently, (41) is rewritable as:
Next, Lyapunov’s function is chosen as:
Differentiating (44) with respecting to time and applying (38) and (43) gives:
If the inequality that occurs in
holds, then the sliding condition
can be met. For practical applications, the value of
cannot be determined in advance because of unidentified lumped uncertainties. According to (38), to attain and match the smallest sliding value, the optimal,
value is set as follows:
where
stands for a positive constant. This research thus employs a simple adaptive algorithm to determine an optimal value,
. Hence the definition of the estimated error is:
where
represents the estimated optimal value of
. A new Lyapunov function is then defined as:
where a constant learning rate
. Differentiating (49) and substituting using (38), (43), and (47) yields:
We choose the parameter tuning law as:
By using (47), (50) becomes:
Since
is negative semidefinite, that is
, it implies that
and
are bounded. Let function
; integrating
yields:
Because
is bounded, and
is non-increasing and bounded, the following result can be obtained:
Moreover, since
is bounded by Barbalat’s Lemma [
24,
25],
,
as
. Therefore, the proposed APIDC system’s stability can be guaranteed.
In short, if the , and learning rate or initial , , and 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
for
respectively. The quadrotor was set to hover at 1 meter, and the desired position of
and
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 super twisting sliding mode (STA), the parameters were set as follows: , , , for (), , , and for ().
For the sliding mode with TanH (SMC TanH), the parameters were set as follows: , , , and , for (), , , and finally .
For the adaptive PID (APID), the parameters were set as follows: , , , , for . , , , , and for .
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
, 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.
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
and
. In addition, a normal Gaussian noise was injected as
for
[
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
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,
, 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.
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,
, 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.