Next Article in Journal
Techno-Environmental Evaluation of a Liquefied Natural Gas-Fuelled Combined Gas Turbine with Steam Cycles for Large Container Ship Propulsion Systems
Previous Article in Journal
Distributed Generation Based Virtual STATCOM Configuration and Control Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Position Control of Quadrotor UAV Based on Cascade Fuzzy Neural Network

1
Shanghai Key Laboratory of Intelligent Manufacturing and Robotics, School of Mechatronic Engineering and Automation, Shanghai University, Shanghai 200444, China
2
Faculty of Control, Institute of Robotics and Machine Intelligence, Robotics and Electrical Engineering, Poznan University of Technology, Piotrowo 3A, 60-965 Poznan, Poland
*
Authors to whom correspondence should be addressed.
Energies 2022, 15(5), 1763; https://doi.org/10.3390/en15051763
Submission received: 28 January 2022 / Revised: 24 February 2022 / Accepted: 25 February 2022 / Published: 26 February 2022

Abstract

:
In this article, a cascade fuzzy neural network (FNN) control approach is proposed for position control of quadrotor unmanned aerial vehicle (UAV) system with high coupling and underactuated. For the attitude loop with limited range, the FNN controller parameters were trained offline using flight data, whereas for the position loop, the method based on FNN compensation proportional-integral-derivative (PID) was adopted to tune the system online adaptively. This method not only combined the advantages of fuzzy systems and neural networks but also reduced the amount of calculation for cascade neural network control. Simulations of fixed set point flight and spiral and square trajectory tracking flight were then conducted. The comparison of the results showed that our method had advantages in terms of minimizing overshoot and settling time. Finally, flight experiments were carried out on a DJI Tello quadrotor UAV. The experimental results showed that the proposed controller had good performance in position control.

1. Introduction

The quadrotor unmanned aerial vehicle (UAV) plays an important role as a flying platform. With decades of rapid development, quadrotors are widely used in civilian and military applications for monitoring [1], transportation [2], cluster flight lighting shows, etc. Therefore, stable and precise position control is the basis of these applications and remains one of the key areas of research [3].
A quadrotor is a classical nonlinear underactuated system with multiple highly coupling variables. Generally, the quadrotor control system includes two control loops: the position loop (outer loop) and the attitude loop (inner loop). Until now, researchers have developed a significant number of control methods to deal with UAVs, including proportional integral derivative (PID) controller, linear quadratic regulator (LQR) [4], nonlinear [5] sliding mode controller [6], backstepping, fuzzy logic, adaptive neural networks, reinforcement learning, and so on [7]. Elie Hermand et al. proposed a constrained control scheme to steer an UAV to the desired position while ensuring constraint satisfaction at all times. They used the Explicit Reference Governor framework and validated the proposed scheme through extensive experimental studies [8]. Jian Dong and Bin He designed a novel fuzzy PID type iterative learning controller for a quadrotor and used fuzzy control to tune the PID parameters [9]. Fabio A. A. Andrade et al. proposed a novel control strategy for UAVs, combining a Cascaded-PID with a fuzzy logic controller [10] and provided a method for fine-tuning the fuzzy range of PID gains values. Khadija El Hamidi et al. deployed fuzzy logic and neural network to schedule PID gains and improve trajectory tracking performance [11]. The results presented therein confirmed the effectiveness of the proposed control strategy. Khadija El Hamidi et al. presented an effective control method based on neural network gain-scheduled proportional-derivative (PD) and model reference controller-based PD for quadcopter attitude stabilization and altitude tracking [12]. In Ref. [13], Guiqiu Liao and Jiankang Zhao presented a method based on neural network mapping for the cascade PID parameters tuning. However, their experiment data only demonstrated the efficiency of this method in altitude control while ignoring the effect of horizontal position. Rongjong Wai [14] and Vu Phi Tran [15,16] applied an online adaptive neural network controller to control a quadrotor with high stability in surveillance tasks, particularly in flight environments with uncertainties such as unpredictable wind gusts. Qualid Doukhi provided a robust adaptive controller with an artificial neural network (ANN) and PID, as well used a cascade neural network PID (NNPID) for trajectory tracking [17]. The simulation results demonstrated that the closed-loop system’s stability was guaranteed under extreme conditions. Qingzheng Xu developed a novel NN finite time backstepping controller based on an anti-saturation control approach [18], which not only retains the benefits of NN finite time back-stepping control, but also protects the system from deterioration or even instability caused by unknown nonsymmetric saturation nonlinearities in the actuator. The effectiveness of the controller was verified through the numerical simulation results.
The above-mentioned studies indicate that fuzzy logic and ANN can all tune PID parameters online to control UAVs adaptively, and the system’s stability can be achieved [19]. As a result, the method combining fuzzy logic with ANN could be a promising method, in which a fuzzy expert system is used for forward inference control, and ANN is used for online adaptive adjustment based on feedback information. Xinchen Qi et al. studied an aerial manipulator control based on a fuzzy neural network (FNN) for complex tasks [20]. The stability of a UAV with a manipulator is improved by blurring the attitude error signal as the input of the neural network. Halima Housny et al. researched a PSO-based ANFIS controller for quadrotor system trajectory-tracking control [21]. A PID control approach is used to obtain the training dataset to design an adaptive neuro-fuzzy inference system (ANFIS) controller. The controller is mainly for the inner loop and provides attitude stability; position error effects are not considered in this paper. Boumediene Selma et al. also proposed an intelligent controller based on ANFIS and improved ant colony optimization to govern the behavior of a three-degree-of-freedom quadrotor. The simulations revealed that the proposed controller provided results more satisfactory than those of other methods already developed in the same study [22,23]. To deal with the lack of modeling and flight uncertainties, Erdal Kayacan et al. used a learning controller composed of a fuzzy neural network in parallel with a conventional proportional controller for control and guidance of a fixed-wing UAV, and the simulation results showed efficiency in a real-time system [24]. Andriy Sarabakha et al. proposed a Levenberg–Marquardt-inspired sliding mode control theory based on adaptation laws to train an intelligent FNN controller for a quadrotor aircraft. Experimental results show that the combination of PD and FNN, which is tuned by SMC and LM algorithms, gives significantly less steady-state error than a conventional PD controller in the presence of time-varying wind conditions [25]. Erdal Kayacan et al. [26] and Tien-LOC LE et al. [27] used a type-2 FNN-based controller which included a multilayer structure in membership function for improvement of the learning ability and flexibility of the design network. This controller with the optimal tuning algorithm is superior to a conventional PD controller in noise reduction in presence of unmodeled noise and disturbances. To handle the payload uncertainties and disturbances in real time, Praveen Kumar Muthusamy developed a novel bidirectional fuzzy brain emotional learning (BFBEL) controller to control a six-degrees-of-freedom quadrotor UAV for accurate trajectory tracking [28]. Nevertheless, the controller proposed in the paper requires a large amount of calculation.
Therefore, this paper will try to develop a different cascade fuzzy neural network control strategy to realize the accurate position control of quadrotor UAV. According to the difference between in inner and outer loops, in attitude loop, we trained a FNN controller offline while training the FNN controller online in position control loop. This control strategy avoided the problems that arise when the inner and outer loop are learning at the same time and could also reduce the amount of computation.
The rest of the paper is organized into five parts as follows: Section 2 provides the model of the quadrotor UAV adopted in the experiment, while the cascade fuzzy neural network controller (FNN-FNN) is designed in Section 3. In Section 4, the simulation of quadrotor position control using MATLAB is studied. The experimental verification part is given in Section 5. Finally, the conclusion is drawn in Section 6.

2. Quadrotor Modeling

Quadrotors have two types of layout configuration, as shown in Figure 1: type “+” and type “×”. The two types of quadrotors have different torque distributions [19]. Since the main perception direction of the camera, Lidar, and other sensors can be installed in line with the type “×” quadrotor’s heading to avoid being blocked by rotors, type “×” is a more popular layout type. In this paper, the type “×” quadrotor was the main research object for modeling and experiments.
Before modeling, two coordinate frames were introduced: the body frame (see Figure 1b) and the Earth frame. The rotation matrix from body frame to the Earth frame is:
R B E = c θ c ψ s φ s θ c ψ c φ s ψ c ψ s θ c φ + s ψ s φ c θ s ψ s ψ s θ s φ + c φ c ψ s ψ s θ c φ c ψ s φ s θ c θ s φ c θ c φ
where c θ and c ψ denote cos θ and cos ψ functions, respectively, whereas s φ and s ψ denote sin φ and sin ψ functions, respectively.
The following assumptions were made to simplify the modeling process:
①.
The aircraft is a rigid body and the mass and shape remain the same during the flight.
②.
Assuming that the discharge capacity of the battery does not decrease with time, the same lift force will be generated at the same speed.
③.
The area of motion is limited, where the density of hollow air and the gravitational acceleration remain constant during the flight.
According to Newton’s law of motion Euler equation, quadrotor dynamics and kinematics equation can be written as:
F T F g F d = m p ¨
J ω ˙ = ω × J ω + M τ
where F T = 0 , 0 , T T is the lift generated by the four rotors, F g = 0 , 0 , g T is the gravity of the Earth, F d is the translational drag of the airframe, p = p x , p y , p z T is the UAV’s position under the Earth frame, J is the matrix of rotational inertia, and ω = p , q , r T is the angular speed in the body frame.   p ,   q   and   r are the angular velocities of roll angle, pitch angle, and yaw angle in the body frame, respectively. M τ = τ X , τ Y , τ Z T are the roll, pitch and yaw torques, respectively.
The UAV control input relationship with the rotor velocity can be shown as Equation (4):
u 1 u 2 u 3 u 4 = T τ X τ Y τ Z = C T C T 2 2 d C T 2 2 d C T C T C T 2 2 d C T 2 2 d C T 2 2 d C T 2 2 d C T C M C M 2 2 d C T 2 2 d C T C M C M w 1 2 w 2 2 w 3 2 w 4 2
where C T is the lift coefficient of the propeller, d is the length of UAV arm, C M is propeller torque coefficient, and w i is the i-th rotor velocity, i = 1, 2, 3, 4.
The more detailed dynamic and kinematics relationship can be rewritten as:
x ¨ = c o s ψ s i n θ c o s φ + s i n ψ s i n φ u 1 C d x x ˙ m y ¨ = s i n ψ s i n θ c o s φ c o s ψ s i n φ u 1 C d y y ˙ m z ¨ = c o s θ c o s φ u 1 m g C d z z ˙ m φ ¨ = I y y I z z θ ˙ ψ ˙ + u 2 k d m x φ ˙ I x x θ ¨ = I z z I x x φ ˙ ψ ˙ + u 3 k d m y θ ˙ I y y ψ ¨ = I x x I y y φ ˙ θ ˙ + u 4 k d m z ψ ˙ I z z
where the relation between Euler angle φ ¨ ,   θ ¨ ,   ψ ¨ T and the body angular speed p ˙ ,   q ˙ ,   r ˙ T can be described as:
φ ¨ θ ¨ ψ ¨ = 1 s φ tan θ c φ tan θ 0 c φ s θ 0 s φ sec θ c φ sec θ p ˙ q ˙ r ˙
When the roll and pitch angles are very small, Equation (6) can be simplified as p ˙ ,   q ˙ ,   r ˙ T φ ¨ ,   θ ¨ ,   ψ ¨ T .

3. Control System Design

For the quadrotor, six outputs including the three attitude angles and three-dimensional position values were controlled by four inputs of its control system, so it was a highly coupled underactuated object difficult to control.
Inspired by cascade control and the FNN control idea, a cascade FNN based control structure for a quadrotor UAV was designed as shown in Figure 2. In the position loop, rough adjustment results could be obtained by PID controllers, and FNN controllers would be trained to compensate the PID controller through online learning algorithms. In the attitude loop, the FNN attitude controllers were trained offline to save computational resource, since the Euler angles of the quadrotor changed within a certain range. In this structure and strategy, the training was focused on FNN controllers in the outer loop, and the mutual interference caused by synchronous learning of inner and outer FNN was avoided. Since in the position loop, the algorithm based on FNN-compensated PID reduced the required amount of calculation, thereby the stability of the system would be accelerated.
In the outer loop, the desired pitch and roll angles, θ d and φ d , were generated as the inputs of the inner loop through the attitude planner module. The desired attitudes could be obtained by Equation (7) as:
θ d φ d = s i n ψ c o s ψ c o s ψ s i n ψ   u x u y
where u x , u y are the output value of the x and y axis position controller. ψ is the yaw angle of UAV. In this study, the desired three-dimensional values of position and yaw angle built the vector x d , y d , z d , ψ d to be tracked.

3.1. Attitude Controller

FNNs were used for the attitude loop controller and were trained offline. The training datasets were obtained from variable universe fuzzy PID controllers [29], which have high speed of dynamic response and proper stability. In order to preserve the advantages of these controllers, reduce the computation and simplify control system structure, FNN controllers were used to substitute them. Figure 3 shows the structure of the FNN.
The FNN was composed of five layers neurons:
Layer 1 was the input layer, mainly including the position/attitude (velocity) error and the error rate. Input = [e, ec].
Layer 2 was the fuzzy layer. There were several membership functions in the universe of each input. The error and error rate would be fuzzified to three or more members with Gaussian membership function in this paper. The Gaussian membership function equation could be defined as:
μ i = f x , σ , c = e x c 2 2 σ 2
where μ i is i-th node Gaussian membership functions. σ and c are the standard deviation and the mean of the membership functions, respectively.
Layer 3 was the fuzzy reasoning layer. According to some expert experience, some rules could be made, and one of rules could be described as:
i f   M e i   i s   s m a l l ,   a n d   M e c i   i s   s m a l l ,   t h e n   d i j   i s   s m a l l .
Layer 4 was the defuzzification layer. This layer simulated the operation of the connection mode of the neural network:
x j = w i   d i + b
where x j is output of layer 4, d i is the output of layer 3, w i is the weights of third layer neurons, and b is the bias of neurons.
Layer 5 was the output layer. All node variables needed to be transformed into the output of the network, and the value would be the control input of the UAV. In this paper, the formula used was:
u = j = 1 9 x j   v j
where v j are the weights of fourth layer neurons, and u is the output signal of the FNN controller.
The forward propagation of the fuzzy neural network belonged to layer by layer, and the weight update relied on the neural network back-propagation algorithm, so the result of the weight update could be expressed as:
J = 1 2 y d y 2
w i = J w i = J y   y u   u x   x w
w i = w i 1 + η   w i
v j = J v j = J y   y u   u x
v j = v j 1 + η   v j
where J is the loss function. y d and y are desired position and actual position of UAV respectively. η is the learning rate.

3.2. Position Controller

Figure 4 shows the structure of each position control. In this structure, the FNN controller worked in parallel with the PID controller. It had the same structure as shown in Figure 3, and a saturation module was added to limit the upper and lower output of the FNN controller. The FNN controller had two inputs, position error and error rate. The FNN controller constantly observed the input signal e and ec in real time and established a loss function based on the expected position and actual position error. In every control cycle, the weights of the FNN were updated once through the back-propagation algorithm. Then, the FNN controller could output a control signal to compensate PID controllers for quick position tracking.

4. Simulation and Results

Based on the quadrotor dynamic mathematic model and the control system structure shown in Figure 2, the simulation model was developed in MATLAB Simulink environment, and the simulation time step was set to 0.01 s. The quadrotor model was based on a Tello quadrotor from DJI Ltd. (Shenzhen, China). We determined the parameters with reference to the methods of parameter measurement and calculation in [30], and the parameters provided by DJI (parameters are shown in Table 1).
The FNN controllers in the attitude loop were trained offline. Firstly, we obtained the training data required by FNN offline training through a corresponding variable universe fuzzy PID controller. These data were collected by different flight tasks such as hovering, waypoint following, path line tracking, etc., to cover the actual quadrotor workspace as comprehensively as possible. The range of pitch, roll angle, and yaw angle of the quadrotor was (−π/2, π/2), (−π/2, π/2), and (−π, π), respectively. Taking yaw channel as an example, yaw error, yaw error rate, and output of the PID controller training data are shown in Figure 5a. Then, the offline training of the yaw angle FNN controller was carried out by the obtained data. Each input variable of the FNN controller was divided into five Gaussian membership functions, the learning algorithm was the traditional back-propagation algorithm, and the maximum number of training cycles was set to 100. Training stopped when the error was less than 0.0001. The training error is shown in Figure 5b, and the final error was 0.0008958. Finally, we used the trained FNN controller to verify the yaw angle, and the output of the FNN controller and the original PID controller are shown in Figure 5c. The output of the FNN controller highly matched the output of the PID controller. It showed that the trained fuzzy neural network controller had high precision and could be used to replace the PID controller of the inner loop. The same training was carried out on its FNN controller with the data obtained from pitch and roll angle channels, and the errors were 0.0011844 and 0.00144, respectively, which also indicated that the trained FNN controller had high accuracy.
As for the position controllers, PID control gain should be tuned simultaneously, and the Ziegler–Nichols method was not applicable. In this paper, the PID gain was tuned initially to obtain stable flight and was further tuned manually to optimize the settling time and rise time according to expert experience. By this approach, satisfactory flight performance was achieved and was used for comparison. The PID controller values are shown in Table 2.
In order to test the proposed control system, the result of our method (denoted as FNN-FNN) was compared with those of two other controllers, a PID-PID controller (PID controllers for position control and a variable universe fuzzy PID controller for attitude control) and a PID-FNN controller (a PID controller for the outer loop and a FNN controller for the inner loop, respectively). Since the flight trajectories of a quadrotor mainly consist of hovering, curve, and straight line, in this section flight simulations of fixed set-point flight, spiral tracking, and square trajectory tracking were studied, and the results were obtained and compared, respectively.

4.1. Fixed Set-Point Flight Simulation

In this simulation, the drone was required to fly from the origin to the target position (1,1,1). Figure 6 shows the position simulation results under control of different controllers. Figure 6d shows simulation results with a pulse height input of 0.3 m.
It can also be seen that the overshoot in the axis x and y using our FNN-FNN control method was obviously the smallest. The x position tended to be stable soon after reaching an overshoot, although there were some small oscillations. The overshoot of cascade PID controller was in the majority. After reaching an overshoot, it oscillated back and forth to reach a stable value. The PID-FNN control mode had the largest overshoot, but the response time of this mode was faster than that of the cascade PID controller, and there was less vibration. As for the y position, the settling time of PID-PID method was the longest, and our FNN-FNN controller had a significant effect on reducing overshoot and the response time. Since axis z position control was a direct channel without coupling with an attitude loop, the results of our method and traditional PID controller are compared in Figure 6c. It can be seen that the proposed FNN+PID controller had significantly faster response and shorter settling time than the counterpart. In Figure 6d, a pulse height flight of up and down of 0.3 m for 3 s from 40 s was simulated. FNN+PID controller could follow this pulse change quickly and precisely. According to the simulation results, the algorithm proposed in this paper could quickly provide the fixed set-point flight control, with small overshot and significantly better response speed than the traditional PID control method.
The quantitative results of overshoot and the settling time of simulations are compared in Table 3. The settling time was when the error of output was no more than 5%.

4.2. Spiral Trajectory Tracking Flight Simulation

To test the tracking performance of the proposed controller, a flight simulation of a spiral path tracking was carried out. In the simulation, the yaw angle was set to change with the same frequency. The trajectory path of this simulation was set as:
x d = c o s   0.3   t y d = s i n   0.3   t z d = 1 + 0.1   t ψ d = s i n   0.3   t
The simulation results are shown as Figure 7. A comprehensive comparison of axis x and y results showed that the proposed FNN-FNN had a smaller tracking error and shorter settling time on the horizontal component than the other two controllers. In addition, the simulation result of the yaw angle showed that the proposed controller could realize angle tracking well, and the change of yaw angle did not affect the tracking of position. Figure 7e shows the 3D process of spiral trajectory tracking simulation. It was clear that a satisfactory control effect of spiral trajectory tracking was achieved using the FNN-FNN controller. In Figure 7f,g, the results of error of x and y position under three different controllers are compared, which showed that the proposed method had significantly lower overshoot and quicker settling time. Since every position controller had a PID module and a FNN module for compensation, there were six outputs that are shown in Figure 7h. When position error existed, the FNN controller tuned the network weight in real-time to compensate the nonlinearity of the system. Meanwhile, the saturation module was used to limit the maximum output value of FNN, so the output value of the FNN controller oscillated back and forth, which showed a feature similar to the nonlinear sliding model. The results show that FNN controller could compensate the PID controller to follow the input target quickly. When the position error was very small, the output of the FNN controller tended to be stable.

4.3. Square Trajectory Tracking Flight Simulation

Square trajectory tracking is a practical application with a challenge for quadrotor UAV, since it consists of linear trajectory and sudden change of direction. In this subsection, a quadrotor flight from (0,0,0) following the trajectory defined by waypoints (0,0,1), (0,1,1), (−1,1,1), (−1,0,1) and (0,0,1) subsequently was simulated. Based on the previous two subsections’ research, the results of PID-PID control and FNN-FNN control were compared analogously.
The simulation results of x position tracking are given in Figure 8a,b, respectively, and the 3D position is given in Figure 8c. According to the simulation results, it could be seen that the overshoot of the FNN-FNN controller was smaller than that of the PID-PID controller in the position loop, and the adjustment response speed was also slightly faster. From the 3D simulation results, we could also see that the FNN-FNN controller had better performance than the PID-PID controller in the square trajectory tracking flight.

5. Experiments

Based on the study in previous section, flight experiments were conducted, and some experimental results are given to illustrate the control performance of the developed algorithm in this section.
Experimental equipment: A quadrotor experimental environment was established as shown in Figure 9. A DJI Tello drone was used as the experimental quadrotor platform. It is small and portable and has good indoor flight performance. It was also equipped with a barometer, a 720 p camera, an infrared sensor, and a WIFI module for direct connection to a PC, etc. The cloud controller was developed in a portable notebook computer using Tello Python SDK. It sent the processing results to the Tello drone directly through UDP port to control the Tello’s movement. It was a suitable aircraft platform for secondary development of indoor intelligent application. To collect the real-time flight data of the quadrotor, a Qualisys optical motion capture system with four infrared cameras was used in the experiments. Through a computer with Qualisys software, the position and attitude data of the UAV were captured and processed. The sampling frequency of the Qualisys system was set to 100 Hz. The cloud controller received the desired trajectory, real-time trajectory, and attitude of Tello, then sent the control output to Tello to form a control loop. Through replacing control algorithms, the control performances of different controllers could be tested. To avoid the drone hitting the lens, the motion range of the quadrotor was limited in 1 × 1 m 2 between the cameras of the motion capture system. Therefore, the angles of the four lenses were adjusted and arranged as a square with a side length of 4 m. The experimental equipment is shown as Figure 9.
Camera calibration: The Qualisys optical motion capture system in the experiments had four cameras to locate the position and attitude of UAV. Therefore, data calibration of four cameras was needed to ensure accurate positioning. Firstly, L-shaped and T-shaped rods were used for calibration. In the calibration process, we needed to tune the threshold and brighten to ensure that the camera could accurately receive calibration signals. The configuration should be saved after the calibration. Then, four markers were attached to four rotors of the drone, and the drone was placed in a recognizable area, making sure that each camera could read the four markers.
The experimental process is shown in Figure 10. Firstly, the controller developed in the simulation process was deployed on a PC, and then Qualisys software was used to receive the collected data and transfer it to the controller. As shown in Figure 2, the controller calculated the required lift force and torques according to the position error and attitude error. Since DJI SDK only opened the interfaces of four remote control channels, a conversion module was added to calculate the lift and torques as control values of four channels (roll, pitch, yaw, and throttle). Using the “rc control” command provided by Djitello SDK, the control values were transferred to control the flight of Tello via a UDP protocol. Thus, a closed loop could be formed to realize the experiment.
To verify performance of the proposed control system, three groups of experiments were carried out, and the experimental results were analyzed.
Figure 11 shows the experiment results of hovering flight with a step height command. Figure 11a,b shows the error of x and y position. The position error of the FNN-FNN controller was smaller than that of the PID-PID controller in the horizontal plane. Figure 11c presents the control results of the height channel. The FNN-compensated PID controller had better control effect than PID in both response speed and overshoot.
Figure 12 and Figure 13 describe the experiment results of spiral and square trajectory tracking flights. The left column represents the experimental results on the horizontal component, while the right column presents the 3D experimental tracking trajectory.
The position root mean square error (RMSE) values for each flight are listed in Table 4. In the hovering experiment, it could be observed that the FNN-PID controller gave significantly less error than the conventional PID controller when it worked alone in z axis position. From the three experiment results, the FNN-FNN controller had lower RMSE than the cascade PID controller by more than 10% in most experiments.

6. Discussion

Although it was verified that the FNN-FNN controller presented in this paper had a smoother control effect and could track the ideal trajectory better through comparison of these experiments, the advantages of FNN-FNN were not significantly reflected in the experiments. The reasons might be as follows. Firstly, during training, we took the attitude angle error and error rate as the input, and the PID controller output as the output data set for the training, so the generated controller results were lift force and torques. However, in actual use, the signals of four channels needed to be used, so the mapping relationship of this step was very important. Since we used linear mapping, it decreased the precision of the control system. Secondly, since the quadrotor was controlled via a wireless network UDP protocol, wireless network delays influenced real-time control of the quadrotor UAV.
Therefore, there are still some areas worthy of improvement in future work research. For example, the mapping between lift forces and torques and remote channels could be nonlinear. At the same time, there may be room for further optimization of network structure, which can be tested by an RBF neural network. In addition, we also want to use reinforcement learning in the future to achieve precise position control of a quadrotor in model-free state.

7. Conclusions

In this paper, a cascade FNN control idea was presented for quadrotor position control. The model of quadrotor with type “x” layout configuration was studied. To prevent the interference in the online learning of cascade FNN, offline-trained FNN controllers were used for the attitude loop. For the position loop, FNN-based online learning was adopted to complement the disadvantages of PID. The FNN controller could constantly modify itself online according to the position error to ensure that the desired result could be achieved more quickly. In this way, the calculation amount of FNN could be reduced, and the response time of the control system could be accelerated. Based on this approach and the quadrotor model, a flight simulation environment was built. Control effects were compared through simulations of a hovering flight test and spiral and square trajectory tracking. Finally, flight experiments on a DJI Tello drone verified that the proposed controller had good performance in position control.

Author Contributions

Methodology, J.R. and B.L.; software, Z.Z.; validation, B.L. and D.C.; writing—original draft preparation, B.L.; writing—review and editing, J.R. and W.G.; supervision, J.R. All authors have read and agreed to the published version of the manuscript.

Funding

This paper was sponsored by National Natural Science Foundation of China (NSFC) under Grant 61573236.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to the data also forms part of an ongoing study.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Popescu, D.; Stoican, F.; Stamatescu, G.; Ichim, L.; Dragana, C. Advanced UA V–WSN System for Intelligent Monitoring in Precision Agriculture. Sensors 2020, 20, 817. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  2. Guerrero-Sánchez, M.E.; Hernández-González, O.; Lozano, R.; García-Beltrán, C.D.; Valencia-Palomo, G.; López-Estrada, F.R. Energy-Based Control and LMI-Based Control for a Quadrotor Transporting a Payload. Mathematics 2019, 7, 1090. [Google Scholar] [CrossRef] [Green Version]
  3. Mo, H.; Farid, G. Nonlinear and adaptive intelligent control techniques for quadrotor uav—A survey. Asian J. Control 2019, 21, 989–1008. [Google Scholar] [CrossRef]
  4. Farrell, M.; Jackson, J.; Nielsen, J.; Bidstrup, C.; McLain, T. Error-State LQR Control of a Multirotor UAV. In Proceedings of the 2019 International Conference on Unmanned Aircraft Systems (ICUAS), Atlanta, GA, USA, 11–14 June 2019; pp. 704–711. [Google Scholar] [CrossRef]
  5. Guerrero-Sánchez, M.; Lozano, R.; Castillo, P.; Hernández-González, O.; García-Beltrán, C.; Valencia-Palomo, G. Nonlinear control strategies for a UAV carrying a load with swing attenuation. Appl. Math. Model. 2021, 91, 709–722. [Google Scholar] [CrossRef]
  6. Xiong, J.-J.; Zheng, E.-H. Position and attitude tracking control for a quadrotor UAV. ISA Trans. 2014, 53, 725–731. [Google Scholar] [CrossRef]
  7. Gu, W.; Alavanis, K.P.; Rutherford, M.J.; Rizzo, A. UAV Model-based Flight Control with Artificial Neural Networks: A Survey. J. Intell. Robot. Syst. 2020, 100, 1469–1491. [Google Scholar] [CrossRef]
  8. Hermand, E.; Nguyen, T.W.; Hosseinzadeh, M.; Garone, E. Constrained Control of UA Vs in Geofencing Applications. In Proceedings of the 2018 26th Mediterranean Conference on Control and Automation (MED), Zadar, Croatia, 19–22 June 2018; pp. 217–222. [Google Scholar] [CrossRef]
  9. Dong, J.; He, B. Novel fuzzy PID-type iterative learning control for quadrotor UAV. Sensors 2019, 19, 24. [Google Scholar] [CrossRef] [Green Version]
  10. Andrade, F.A.A.; Guedes, I.P.; Carvalho, G.F.; Zachi, A.R.L.; Haddad, D.B.; Almeida, L.F.; de Melo, A.G.; Pinto, M.F. Unmanned Aerial Vehicles Motion Control with Fuzzy Tuning of Cascaded-PID Gains. Machines 2022, 10, 12. [Google Scholar] [CrossRef]
  11. El Hamidi, K.; Mjahed, M.; El Kari, A.; Ayad, H. Neural network and fuzzy-logic-based self-tuning PID control for quadcopter path tracking. Stud. Inform. Control 2019, 28, 401–412. [Google Scholar] [CrossRef]
  12. El Hamidi, K.; Mjahed, M.; Kari, A.; Ayad, H. Quadcopter attitude and altitude tracking by using improved PD controllers. Int. J. Nonlinear Dyn. Control 2019, 1, 287. [Google Scholar] [CrossRef]
  13. Liao, G.; Zhao, J. Auto-tuning for cascade PID height position controller of rotorcraft. MATEC Web Conf. 2019, 277, 01008. [Google Scholar] [CrossRef]
  14. Wai, R.J.; Prasetia, A.S. Adaptive Neural Network Control and Optimal Path Planning of UAV Surveillance System with Energy Consumption Prediction. IEEE Access 2019, 7, 126137–126153. [Google Scholar] [CrossRef]
  15. Tran, V.P.; Santoso, F.; Garrat, M.A.; Anavatti, S.G. Neural Network-Based Self-Learning of an Adaptive Strictly Negative Imaginary Tracking Controller for a Quadrotor Transporting a Cable-Suspended Payload with Minimum Swing. IEEE Trans. Ind. Electron. 2021, 68, 10258–10268. [Google Scholar] [CrossRef]
  16. Tran, J.; Mabrok, M.; Garratt, M.; Petersen, I. Hybrid adaptive negative imaginary-neural-fuzzy control with model identification for a quadrotor. IFAC J. Syst. Control 2021, 16, 100156. [Google Scholar] [CrossRef]
  17. Doukhi, O.; Lee, D.J. Neural Network-based Robust Adaptive Certainty Equivalent Controller for Quadrotor UA V with Unknown Disturbances. Int. J. Control. Autom. Syst. 2019, 17, 2365–2374. [Google Scholar] [CrossRef]
  18. Xu, Q.; Wang, Z.; Zhen, Z. Adaptive neural network finite time control for quadrotor UAV with unknown input saturation. Nonlinear Dyn. 2019, 98, 1973–1998. [Google Scholar] [CrossRef]
  19. Ferdaus, M.M.; Anavatti, S.G.; Pratama, M.; Garratt, M.A. Towards the use of fuzzy logic systems in rotary wing unmanned aerial vehicle: A review. Artif. Intell. Rev. 2018, 53, 257–290. [Google Scholar] [CrossRef]
  20. Zeng, J.; Alassafi, M.; Song, K. Simulation of Fuzzy Neural Network Algorithm in Dynamic Nonlinear System. Fractals 2021, 2, 2240106. [Google Scholar] [CrossRef]
  21. Housny, H.; Chater, E.A.; Fadil, H.E. PSO-Based ANFIS for Quadrotor System Trajectory-Tracking Control. In Proceedings of the 2020 1st International Conference on Innovative Research in Applied Science, Engineering and Technology (IRASET), Meknes, Morocco, 16–19 April 2020; pp. 1–6. [Google Scholar] [CrossRef]
  22. Selma, B.; Chouraqui, S.; Abouaissa, H. Optimization of ANFIS controllers using improved ant colony to control an UAV trajectory tracking task. SN Appl. Sci. 2020, 2, 878. [Google Scholar] [CrossRef] [Green Version]
  23. Selma, B.; Chouraqui, S.; Abouaissa, H. Hybrid ANFIS-ant colony based optimisation for quadrotor trajectory tracking control. Int. J. Model. Identif. Control 2020, 34, 13. [Google Scholar] [CrossRef]
  24. Kayacan, E.; Khanesar, M.A.; Rubio-Hervas, J.; Reyhanoglu, M. Learning Control of Fixed-Wing Unmanned Aerial Vehicles Using Fuzzy Neural Networks. Int. J. Aerosp. Eng. 2017, 2017, 5402809. [Google Scholar] [CrossRef] [Green Version]
  25. Sarabakha, A.; Imanberdiyev, N.; Kayacan, E.; Khanesar, M.A.; Hagras, H. Novel Levenberg–Marquardt based learning algorithm for unmanned aerial vehicles. Inf. Sci. 2017, 417, 361–380. [Google Scholar] [CrossRef] [Green Version]
  26. Kayacan, E.; Maslim, R. Type-2 Fuzzy Logic Trajectory Tracking Control of Quadrotor VTOL Aircraft with Elliptic Membership Functions. IEEE/ASME Trans. Mechatron. 2017, 22, 339–348. [Google Scholar] [CrossRef]
  27. Le, T.L.; Quynh, N.V.; Long, N.K.; Hong, S.K. Multilayer Interval Type-2 Fuzzy Controller Design for Quadcopter Unmanned Aerial Vehicles Using Jaya Algorithm. IEEE Access 2020, 8, 181246–181257. [Google Scholar] [CrossRef]
  28. Muthusamy, P.K.; Garratt, M.; Pota, H.; Muthusamy, R. Real-Time Adaptive Intelligent Control System for Quadcopter Unmanned Aerial Vehicles with Payload Uncertainties. IEEE Trans. Ind. Electron. 2021, 69, 1641–1653. [Google Scholar] [CrossRef]
  29. Liu, Y.; Xing, H.; Hou, T. Research on attitude control of cascade variable universe fuzzy PID for quadrotor UAV. J. Electron. Meas. Instrum. 2019, 33, 46–52. [Google Scholar] [CrossRef]
  30. Quan, Q. Modeling and Evaluation of Propulsion System. In Introduction to Multicopter Design and Control; Springer Nature: Singapore, 2017; pp. 75–94. [Google Scholar]
Figure 1. Two types of quadrotor layout. (a) Type “+”; (b) type “x”.
Figure 1. Two types of quadrotor layout. (a) Type “+”; (b) type “x”.
Energies 15 01763 g001
Figure 2. The block diagram of the control system.
Figure 2. The block diagram of the control system.
Energies 15 01763 g002
Figure 3. Fuzzy neural network controller structure.
Figure 3. Fuzzy neural network controller structure.
Energies 15 01763 g003
Figure 4. Structure of FNN-compensated PID position controller.
Figure 4. Structure of FNN-compensated PID position controller.
Energies 15 01763 g004
Figure 5. Training data sets, error chart, and validation results. (a) Training data sets; (b) error chart. (c) Comparison of the trained FNN controller and PID output verification.
Figure 5. Training data sets, error chart, and validation results. (a) Training data sets; (b) error chart. (c) Comparison of the trained FNN controller and PID output verification.
Energies 15 01763 g005
Figure 6. Results of fixed set-point flight simulation. (a) x position, (b) y position, (c) z position, and (d) z position with a pulse input.
Figure 6. Results of fixed set-point flight simulation. (a) x position, (b) y position, (c) z position, and (d) z position with a pulse input.
Energies 15 01763 g006
Figure 7. Results of a spiral trajectory tracking simulation. (a) x position, (b) y position, (c) z position, (d) yaw angle, (e) 3D spiral trajectory tracking simulation, (f) error of x position, (g) error of y position, and (h) outputs of position controllers.
Figure 7. Results of a spiral trajectory tracking simulation. (a) x position, (b) y position, (c) z position, (d) yaw angle, (e) 3D spiral trajectory tracking simulation, (f) error of x position, (g) error of y position, and (h) outputs of position controllers.
Energies 15 01763 g007aEnergies 15 01763 g007b
Figure 8. Results of square trajectory simulation. (a) x position, (b) y position, and (c) 3D square trajectory tracking.
Figure 8. Results of square trajectory simulation. (a) x position, (b) y position, and (c) 3D square trajectory tracking.
Energies 15 01763 g008
Figure 9. Quadrotor experimental environment. (a) Experimental equipment and control loop and (b) experimental field.
Figure 9. Quadrotor experimental environment. (a) Experimental equipment and control loop and (b) experimental field.
Energies 15 01763 g009
Figure 10. Experimental process using a Tello quadrotor.
Figure 10. Experimental process using a Tello quadrotor.
Energies 15 01763 g010
Figure 11. Experiment results of hovering flight with step height command. (a) Error of x position, (b) Error of y position, (c) z position.
Figure 11. Experiment results of hovering flight with step height command. (a) Error of x position, (b) Error of y position, (c) z position.
Energies 15 01763 g011
Figure 12. Experiment results of spiral trajectory tracking.
Figure 12. Experiment results of spiral trajectory tracking.
Energies 15 01763 g012
Figure 13. Experiment results of square trajectory tracking.
Figure 13. Experiment results of square trajectory tracking.
Energies 15 01763 g013
Table 1. Parameters of the quadrotor UAV.
Table 1. Parameters of the quadrotor UAV.
ParametersDescriptionValueUnit
mMass0.08 k g
darm length0.06m
gAcceleration of gravity9.81 m / s 2
JThe matrix of rotational inertia I x x   = I y y   = 0.679 e 2 ,   I z z   = 1.313 e 2 k g · m 2
C m Comprehensive torque coefficient 0.762 e 7 N · m / r a d / s 2
C d Translational resistance coefficient 3.365 e 2 N / m / s 2
C t Composite tension coefficient 0.566 e 5 N / r a d / s 2
T m Motor response time constant0.0163s
J r The moment of inertia of propeller 4.95 e 5 k g · m 2
C d m Airframe damping moment coefficient 4.609 e 3 N · m / r a d / s 2
Table 2. Controller values used for the simulation.
Table 2. Controller values used for the simulation.
ParametersX ControlY ControlZ Control
P1.683 16
I0.860.12.02
D1.68210.8
Table 3. Quantitative analysis of several simulation results.
Table 3. Quantitative analysis of several simulation results.
ControllerOvershoot (%)Settling Time (s)
X-PID-PID27%6.40
X-PID-FNN35.17%7.05
X-FNN-FNN16.4%4.37
Y-PID-PID8.93%13.2
Y-PID-FNN5.3%4.13
Y-FNN-FNN0.59%3.7
Z-PID07.35
Z-FNN+PID2.42%1.66
Table 4. Position RMSE values of experiments.
Table 4. Position RMSE values of experiments.
CasesXPID-PIDXFNN-FNNYPID-PIDYFNN-FNNZPIDZFNN + PID
Hovering0.047460.032560.063590.02180.146920.11345
Spiral trajectory0.76130.70600.93810.93640.11350.088175
Square trajectory0.074730.036880.10370.060960.11260.08819
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Rao, J.; Li, B.; Zhang, Z.; Chen, D.; Giernacki, W. Position Control of Quadrotor UAV Based on Cascade Fuzzy Neural Network. Energies 2022, 15, 1763. https://doi.org/10.3390/en15051763

AMA Style

Rao J, Li B, Zhang Z, Chen D, Giernacki W. Position Control of Quadrotor UAV Based on Cascade Fuzzy Neural Network. Energies. 2022; 15(5):1763. https://doi.org/10.3390/en15051763

Chicago/Turabian Style

Rao, Jinjun, Bo Li, Zhen Zhang, Dongdong Chen, and Wojciech Giernacki. 2022. "Position Control of Quadrotor UAV Based on Cascade Fuzzy Neural Network" Energies 15, no. 5: 1763. https://doi.org/10.3390/en15051763

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop