# Online Tuning of PID Controller Using a Multilayer Fuzzy Neural Network Design for Quadcopter Attitude Tracking Control

^{1}Faculty of Mechanical and Aerospace, Sejong University, Seoul, South Korea^{2}Department of Convergence Engineering for Intelligent Drone, Sejong University, Seoul, South Korea^{3}Faculty of Mechatronics and Electronics, Lac Hong University, Bien Hoa, Vietnam

This study presents an online tuning proportional-integral-derivative (PID) controller using a multilayer fuzzy neural network design for quadcopter attitude control. PID controllers are simple but effective control methods. However, finding the suitable gain of a model-based controller is relatively complicated and time-consuming because it depends on external disturbances and the dynamic modeling of plants. Therefore, the development of a method for online tuning of quadcopter PID parameters may save time and effort, and better control performance can be achieved. In our controller design, a multilayer structure was provided to improve the learning ability and flexibility of a fuzzy neural network. Adaptation laws to update network parameters online were derived using the gradient descent method. Also, a Lyapunov analysis was provided to guarantee system stability. Finally, simulations concerning quadcopter attitude control were performed using a Gazebo robotics simulator in addition to a robot operating system (ROS), and their results were demonstrated.

## Introduction

In the 4th industrial revolution era, the application of multi-copters has significantly expanded, and it has thus attracted the interest of many researchers specialized in multi-copter control engineering. Multi-copters need to maintain accurate attitudes to ensure stable flight, so the development of accurate and stable controllers for multi-copters is essential. The most popular controller used for multi-copters is the cascaded proportional-proportional integral derivative controller (PPID) (Hernandez and Frias, 2016; Salas et al., 2019; Santos et al., 2019; Xuan-Mung and Hong, 2019a,b). Since PID is a linear controller, it is generally hard to use to achieve the highest control performance for non-linear control systems (Sarabakha et al., 2017). Furthermore, in the design of a PID controller, it is necessary to obtain the exact mathematical model of the control system and to optimize the gain value to achieve the desired performance. However, this work requires complexity calculations and an accurate modeling plant.

Gain tuning for PID controllers is time-consuming, as it depends on the knowledge of dynamic plants and the experience of expert operators (Kim et al., 2007). Mathematical models are different, as they depend on the size and appearance of multi-copters. Even if it is the same aircraft, the center of gravity can be different (Kurak and Hodzic, 2018). Therefore, the gain values are always flexible, and it may take longer to find suitable values. However, such tasks must be completed correctly, as an incorrect calculation can lead to terrible problems, such as falling or bumping into a people or objects. In past decades, many studies have been conducted to solve such problems (time-consuming, costly, etc.; Fatan et al., 2013; Kuantama et al., 2017; Noordin et al., 2017; Rouhani et al., 2017; Sumardi and Riyadi, 2017; Prayitno et al., 2018; Thanh and Hong, 2018; Chen et al., 2019; Rabah et al., 2019; Soriano et al., 2020). The Ziegler Nichols method is a well-known for tuning PID parameters (Azman et al., 2017). However, it produces oscillatory responses and yields overshoot problems (Zahir et al., 2018). Moreover, it cannot be applied in the online-tuning of parameters, and the control performance can be further improved.

In recognizing the above-mentioned limitation of traditional PID controllers, many researchers have provided methods for auto-tuning PID parameters (Amoura et al., 2016; De Keyser et al., 2016; Concha et al., 2017; Live et al., 2017; Mendes et al., 2017; Wang, 2017; Bernardes et al., 2019). In which, using the fuzzy neural network to tune PID parameter controllers has attracted the attention of many researchers. In 2018, Davanipour et al. proposed a self-tuning PID controller based on a fuzzy wavelet neural network (Davanipour et al., 2018). In 2019, Tripathy et al. introduced a fuzzy PID controller for load frequency control using spider monkey optimization (Tripathy et al., 2019). In 2017, Wang et al. provided an improved fuzzy PID controller design using predictive functional control structure (Wang et al., 2017). These studies could reduce the effort required for tuning the required parameters for PID controllers. However, most of their methods were complicated, but the control performance could be further improved.

In recent years, many studies have investigated the fuzzy neural network (FNN), which is a combination of fuzzy systems and neural networks. Therefore, combined FNN systems have the advantages of both fuzzy systems and neural networks, such as human-like reasoning and learning capabilities. Using the neural network structure, FNN parameters can be trained online to achieve suitable values. According to the above discussions, this study presents a method for auto-tuning PID parameters using multilayer fuzzy neural network (PID-MFNN) to control the attitude the quadcopters. Compared with the previous studies (Wang et al., 2017; Davanipour et al., 2018; Tripathy et al., 2019), our proposed PID-MFNN has some advantages, such as no need for offline training. The major differences and improvements among this study and related works are shown in Table 1. Also, the fuzzy weights and fuzzy membership functions can be updated online, and the multilayer structure is applied to improve the control performance. The main contributions of this study are summarized as follows: (1) the successful design of a multilayer structure was provided to improve the learning ability and flexibility of a FNN; (2) the adaptation laws for updating the parameters of a controller online were derived by using the gradient descent method; (3) the simulation results of controlling the attitude of a quadcopter were provided to illustrate the effectiveness of the control design method.

The rest of this paper is organized as follows. The quadcopter dynamics model and quadcopter controller are given in section Problem Formulation. The PID-MFNN structure and its learning parameter are described in section PID-MFNN Structure and Parameter Learning. The simulation results of controlling the quadcopter attitude are presented in section Simulation Results. Finally, the conclusions are given in section Conclusion.

## Problem Formulation

### Quadcopter Dynamics Model

The quadcopter schematic and its reference frames are shown in Figure 1. In which, the earth-frame and quadcopter body frame are denoted by *E*(*x*_{E}, *y*_{E}, *z*_{E}) and *B*(*x, y, z*). The dynamic equations of the quadcopter are given as:

where θ, ϕ, and ψ stand for the three Euler angles: roll, pitch, and yaw, respectively; *J*_{x}, *J*_{y} and *J*_{z} stand for the moment of inertia for the *x*, *y*, and *z* axes, respectively; *l* denotes the length of the quadcopter's arm; *U*_{1} denotes the total thrust on the body in the z-axis; *U*_{2}, *U*_{3}, and *U*_{4} denote the roll, pitch, and yaw torques, respectively, which are given as

where ${F}_{i}={C}_{t}{\Omega}_{i}^{2}$ denotes the thrust of the *i*-th motor; Ω_{i} denotes the speed of the *i*-th motor; *C*_{t} and *C*_{d} stand for the thrust and drag coefficients, respectively.

### Quadcopter Controller

The quadcopter controller scheme is given in Figure 2. There are two kinds of controllers that need to be considered in quadcopter control: position controller and attitude controller. The PPID attitude controller is given in Figure 3. The output of the outer-loop controller is given by

where *G*_{θ}, *G*_{ϕ}, and *G*_{ψ} denote the proportional gain for the roll, pitch, and yaw outer-loop controller, respectively; *e*_{θ}, *e*_{ϕ}, and *e*_{ψ} are the angle errors of the roll, pitch, and yaw, respectively.

where θ_{ref}, ϕ_{ref}, and ψ_{ref} are the angle references of the roll, pitch, and yaw, respectively.

The output of the PID inner-loop controller is given by

where ${K}_{p}^{\theta}$, ${K}_{i}^{\theta}$, ${K}_{d}^{\theta}$, ${K}_{p}^{\varphi}$, ${K}_{i}^{\varphi}$, ${K}_{d}^{\varphi}$, ${K}_{p}^{\psi}$, ${K}_{i}^{\psi}$, and ${K}_{d}^{\psi}$, are the PID gains for the roll, pitch, and yaw inner-loop controller; ${e}_{\stackrel{.}{\theta}}$, ${e}_{\stackrel{.}{\varphi}}$, and ${e}_{\stackrel{.}{\psi}}$ denote the angular velocity errors of the roll, pitch, and yaw, respectively.

To obtain suitable values for the PID gains in the outer-loop and inner-loop controller, the PID-MFNN was designed in the following section to adjust the gains for the PPID controller online.

## PID-MFNN Structure and Parameter Learning

### PID-MFNN Structure

The fuzzy rule forms for the proposed PID-MFNN controller are:

where *i*_{i} is the fuzzy input; μ_{ijk} is the membership function (MF) for the input *i-th*, block *j-th*, and layer *k-th*; *w*_{klo} is the fuzzy weight for the layer *k-th*, rule *l-th*, and output *o-th*.

The auto-tuning algorithm structure of the PID-MFNN controller is shown in Figure 4 in which, the MFNN structure is applied to adjust the PPID controller gains online. As shown in Figure 5, the MFNN structure includes five spaces as follows:

1) The input space: the fuzzy input vector, *I* = [*i*_{1}, *i*_{2}, …, *i*_{ni}], is prepared in this space. Each node corresponds to one input and is directly transferred to the next space.

2) The membership function space: the membership grades are calculated in this space using the fuzzy inputs and the Gaussian membership functions (GMFs). As shown in Figure 6, the multilayer fuzzy membership function is provided to improve the learning ability and flexibility of the FNN. The outputs of this space are computed as:

where *m*_{ijk} and *v*_{ijk} are the mean and variance of the GMFs.

3) The fuzzy firing space: the fuzzy firing strength is calculated in this space using the membership grades as follows:

where *f*_{kl} is the fuzzy firing strength for the l-th rule in the k-th layer.

Then, the fuzzy firing vector is presented as

4) The fuzzy weight space: in this space, the fuzzy weights *w*_{klo} are provided to connect the fuzzy firing space and output space. The fuzzy weight vector for the o-th output is presented as

5) The output space: the final outputs of this space are the PID gains for the outer-loop and inner-loop controllers. Defuzzification is performed using the product operation as follows:

Using the proposed MFNN to adjust the PID gains online, the desired performance of the control network can be achieved. The adaptation laws for updating the parameters of the proposed PID-MFNN controller online are explained in the following section.

**Figure 6**. Fuzzy membership function and rule base: **(A)** the conventional fuzzy system and **(B)** the proposed multilayer fuzzy neural network with two layers.

### Parameter Learning

First, considering the outer-loop controller, Equation (3) can be rewritten, where the gains *G*_{θ}, *G*_{ϕ}, and *G*_{ψ} are obtained using the output of the proposed MFNN in Equation (10).

where Θ is replaced by (θ, ϕ, ψ).

By rewriting the Equation (6),

A Lyapunov function is defined as $\text{}{E}_{1}(t)=\frac{1}{2}{({e}_{\stackrel{.}{\Theta}}(t))}^{2}$, using the gradient descent approach and chain rule, and the parameter update laws for PID-MFNN can be obtained as follows:

where ${\u0175}_{kl\Theta}^{g}$, ${\widehat{m}}_{ijk}^{g}$, and ${\widehat{v}}_{ijk}^{g}$ are the connecting weight, mean, and variance of the outer-loop MFNN controller; ${\eta}_{w}^{g}$, ${\eta}_{m}^{g}$, and ${\eta}_{v}^{g}$ are the positive learning rates.

Then, considering the inner-loop controller, Equation (5) can be rewritten, where the gains ${K}_{p}^{\theta}$, ${K}_{i}^{\theta}$, ${K}_{d}^{\theta}$, ${K}_{p}^{\varphi}$, ${K}_{i}^{\varphi}$, ${K}_{d}^{\varphi}$, ${K}_{p}^{\psi}$, ${K}_{i}^{\psi}$, and ${K}_{d}^{\psi}$ are obtained using the outputs of the proposed MFNN.

where ${G}_{p}^{\Theta}={e}_{\stackrel{.}{\Theta}}$; ${G}_{i}^{\Theta}={\int}_{0}^{t}{e}_{\stackrel{.}{\Theta}}$; ${G}_{d}^{\Theta}={\u0117}_{\stackrel{.}{\Theta}}$

Then

where α is replaced by (*p, i, d*).

By rewriting the Equation (4),

A Lyapunov function can be defined as $\text{}{E}_{2}(t)=\frac{1}{2}{({e}_{\Theta}(t))}^{2}$, using the gradient descent approach and chain rule, and the parameter update laws for PID-MFNN can be obtained as:

where ${\u0175}_{kl\Theta}^{\alpha}$, ${\widehat{m}}_{ijk}^{\alpha}$, and ${\widehat{v}}_{ijk}^{\alpha}$ are the connecting weight, mean, and variance of the inner-loop MFNN controller; *T*_{Θ} can be *T*_{ϕ}, *T*_{θ}, or *T*_{Ψ}, which are the quadcopter transfer functions for the yaw, pitch and roll angles; ${\eta}_{w}^{\alpha}$, ${\eta}_{m}^{\alpha}$, and ${\eta}_{v}^{\alpha}$ are the positive learning rates.

Using the proposed adaptation laws in (16–18) and (23–25), the parameters of the proposed PID-MFNN can be obtained. Then, the suitable gains for the outer-loop and inner-loop PPID controller can be achieved.

#### The Convergence Analysis

The Lyapunov cost function is defined as

Then,

By applying the Taylor expansion,

From (16),

By rewriting (28) using (29) and (16),

By rewriting (27) using (30),

From (31), if ${\eta}_{w}^{g}$ is chosen to satisfy $0<{\eta}_{w}^{g}<\frac{2}{{\zeta}^{2}}$, then Δ*V*(*t*) < 0. Consequently, the convergence of the adaptation law is guaranteed by the Lyapunov theorem. Similarly, the convergence of the adaptation laws for ${\eta}_{w}^{\alpha}$, ${\eta}_{m}^{\alpha}$, and ${\eta}_{v}^{\alpha}$ can be obtained.

The computational complexity of our approaches using big O notation is given as:

+ Big O notation for PID-CFNN:

+ Big O notation for PID-MFNN:

where:

T: is the simulation time.

*n*_{j1}: the number of membership functions in input 1.

*n*_{j2}: the number of membership functions in input 2.

*n*_{k}: the number of layers.

In our proposed network, we choose *n*_{j1} = *n*_{j2} = 3 and *n*_{k} = 2.

## Simulation Results

This section presents the results of the quadcopter attitude control using the proposed PID-MFNN controller, which is performed using the Gazebo robotics simulator and ROS. The Gazebo simulation is a multi-robot simulator for outdoor environments. It supports the interface of the quadcopter's firmware, Pixhawk 4 (PX4). Therefore, it is easy to implement our algorithm on the quadcopter and to receive or transmit necessary data. The basic commands using MAVlink are also supported. Inside PX4, many terrains, sensors, and quadcopter types are provided using JavaScript. In this study, the 3D Robotics IRIS quadcopter was used without additional sensors, which were simulated on the basic terrain as a real world environment for verifying our designed control system. The wind disturbances of 1.0 m/s are considered as external disturbances.

The quadcopter parameters used in this model were chosen as shown in Table 2.

The goal of the control system is to control the attitude of the quadcopter following the reference set-point trajectory:

The Gazebo simulation interface is shown in Figure 7. The tracking performances of the quadcopter attitude under square wave and sine wave commands are given in Figures 8, 11, respectively. The black line presents the reference set-point trajectory. The red and blue lines present the quadcopter attitude output using the PID-MFNN controller and the PID conventional fuzzy controller (PID-CFNN), respectively. The control signals under the square wave and sine wave commands are shown in Figures 9, 12, respectively. The tracking errors under the square wave and sine wave commands are given in Figures 10, 13, respectively. The comparison results concerning the root mean square error (RMSE) between the proposed PID-MFNN controller and PID-CFNN controller are given in Tables 3, 4. From Figures 8–13, it can be seen that the proposed PID-MFNN controller has better control performance with a faster convergence speed and smaller tracking errors compared with the conventional fuzzy controller, which demonstrates the effectiveness of our proposed control method. The RMSE was used to evaluate the effectiveness of the control performance as follows:

where *n*_{s} is the number of samples.

**Figure 8**. The tracking performance for the quadcopter attitude control for the square wave commands.

The parameter settings of the proposed PID-MFNN controller were chosen as *n*_{i} = 2, *n*_{j} = 3, and *n*_{k} = 2; the initial GMF for the fuzzy rules are given as *m*_{ij1} = [−0.6, 0, 0.6], *v*_{ij1} = [0.3, 03, 0.3], *m*_{ij2} = [−0.4, 0, 0.4], and *v*_{ij2} = [0.2, 02, 0.2]; the initial fuzzy weight is *w*_{klo} = 0.2; the learning rates were chosen as ${\eta}_{w}^{g}={\eta}_{w}^{\alpha}={\eta}_{m}^{\alpha}={\eta}_{v}^{\alpha}=0.005$; the sampling time was 0.01 s. The same parameters were chosen for PID-CFNN, but only the number of layers was *n*_{k} = 1, and all GMFs were put in one layer.

The simulation results in Figures 8, 10 show that the proposed PID-MFNN controller has better performance than the PID-CFNN controller in terms of the rising time, settling time, and overshoot. The multilayer structure in our proposed controller, which contains a multilayer MF, provides it with a better scope regarding errors and disturbances compared with the single MF structure in PID-CFNN. The proposed PID-MFNN had a little longer computation time than the PID-CFNN due to the processing time of the multilayer structure. However, this did not affect the control performance, and the proposed PID-MFNN controller could achieve a smaller RMSE in both simulation cases. Apply some methods such as latent analysis in Wu et al. (2019) and Wu et al. (2020) to reduce the computational cost for the proposed multilayer fuzzy neural network will be our future work.

* Remark 1*. The conventional PID usually hard to achieve high control performance for controlling non-linear systems due to its parameters are usually tuned for local points based on a linearization method (Mohan and Sinha, 2008; Cetin and Iplikci, 2015). Therefore, it is not suitable for controlling highly complex and non-linear systems, such as quadcopters. However, in our proposed PID-MFNN method, we designed adaptation laws for updating the MFNN network parameters online, so the output of the MFNN network can auto-tune the PID gains. Therefore, our proposed PID-MFNN is suitable for quadcopters as well as other non-linear control systems.

* Remark 2*. By separating the member functions into a multilayer structure, the proposed method can better cover the changes in inputs. Moreover, with the proposed multilayer structure, the learning ability and flexibility of the network can be further improved.

* Remark 3*. The difficulties and limits in this study are described as follows. When applying our method in an experiment with real quadcopters, suitable initial parameters needed to be chosen. Otherwise, control could be lost. In our study, the simulation results were obtained using a Gazebo robot simulator, and it was easy to choose these parameters using the trial-and-error method. In our future work, we plan to apply some optimal algorithms to realize suitable initial parameters.

## Conclusion

In this study, auto-tuning PID parameters using MFNN were successfully designed for controlling the attitude of quadcopters. The proposed method provided an effective method for obtaining suitable gains for PID controllers without the need for a mathematical system model or complicated calculations. In addition, a new multilayer structure was provided to improve the learning ability and flexibility of the used FNN. The parameters of the proposed network could be updated online using adaptation laws. Finally, the effectiveness of the proposed method was illustrated through the results of the conducted numerical simulations of quadcopter attitude control using a Gazebo robotics simulator and ROS. Our designed controller can also apply to a real quadcopter, and in our future work, we plan to apply some optimal algorithms to achieve suitable initial parameters.

## Data Availability Statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author/s.

## Author Contributions

All authors listed have made a substantial, direct and intellectual contribution to the work, and approved it for publication.

## Funding

This work was supported by the Basic Science Research Program through the National Research Foundation of Korea (NRF) funded by the Ministry of Education (2020R1A6A1A03038540) and by Korea Institute for Advancement of Technology (KIAT) grant funded by the Korea Government (MOTIE) (N0002431, the Competency Development Program for Industry Specialist).

## Conflict of Interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

## References

Amoura, K., Mansouri, R., Bettayeb, M., and Al-Saggaf, U. M. (2016). Closed-loop step response for tuning PID-fractional-order-filter controllers. *ISA Trans.* 64, 247–257. doi: 10.1016/j.isatra.2016.04.017

Azman, A. A., Rahiman, M. H. F., Mohammad, N. N., Marzaki, M. H., Taib, M. N., and Ali, M. F. (2017). “Modeling and comparative study of PID Ziegler Nichols (ZN) and Cohen-Coon (CC) tuning method for multi-tube aluminum sulphate water filter (MTAS),” in 2017 *IEEE 2nd International Conference on Automatic Control and Intelligent Systems (I2CACIS)* (Sabah: IEEE), 25–30. doi: 10.1109/I2CACIS.2017.8239027

Bernardes, N. D., Castro, F. A., Cuadros, M. A., Salarolli, P. F., Almeida, G. M., and Munaro, C. J. (2019). Fuzzy logic in auto-tuning of fractional PID and backstepping tracking control of a differential mobile robot. *J. Intell. Fuzzy Syst.* 37, 4951–4964. doi: 10.3233/JIFS-181431

Cetin, M., and Iplikci, S. (2015). A novel auto-tuning PID control mechanism for nonlinear systems. *ISA Trans.* 58, 292–308. doi: 10.1016/j.isatra.2015.05.017

Chen, Y., Zhang, G., Zhuang, Y., and Hu, H. (2019). Autonomous flight control for multi-rotor UAVs flying at low altitude. *IEEE Access* 7, 42614–42625. doi: 10.1109/ACCESS.2019.2908205

Concha, A., Varadharaj, E., Hernandez-Rivera, N., and Gadi, S. (2017). “A novel implementation technique for genetic algorithm based auto-tuning PID controller,” in 2017 *IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI)* (Chennai: IEEE), 1403–1408. doi: 10.1109/ICPCSI.2017.8391942

Davanipour, M., Javanmardi, H., and Goodarzi, N. (2018). Chaotic self-tuning PID controller based on fuzzy wavelet neural network model. *Iran. J. Sci. Technol. Trans. Electr. Eng.* 42, 357–366. doi: 10.1007/s40998-018-0069-1

De Keyser, R., Muresan, C. I., and Ionescu, C. M. (2016). A novel auto-tuning method for fractional order PI/PD controllers. *ISA Trans.* 62, 268–275. doi: 10.1016/j.isatra.2016.01.021

Fatan, M., Sefidgari, B. L., and Barenji, A. V. (2013). “An adaptive neuro pid for controlling the altitude of quadcopter robot,” in *2013 18th International Conference on Methods & Models in Automation & Robotics (MMAR)* (Miȩdzyzdroje: IEEE), 662–665. doi: 10.1109/MMAR.2013.6669989

Hernandez, Y. L., and Frias, O. O. G. (2016). Design and control of a four-rotary-wing aircraft. *IEEE Latin Am. Trans.* 14, 4433–4438. doi: 10.1109/TLA.2016.7795811

Kim, T.-H., Maruta, I., and Sugie, T. (2007). “Particle swarm optimization based robust PID controller tuning scheme,” in 2007 46*th IEEE Conference on Decision and Control* (New Orleans, LA: IEEE), 200–205.

Kuantama, E., Vesselenyi, T., Dzitac, S., and Tarca, R. (2017). PID and Fuzzy-PID control model for quadcopter attitude with disturbance parameter. *Int. J. Comput. Commun. Control* 12, 519–532. doi: 10.15837/ijccc.2017.4.2962

Kurak, S., and Hodzic, M. (2018). Control and estimation of a quadcopter dynamical model. *Period. Eng. Nat. Sci.* 6, 63–75. doi: 10.21533/pen.v6i1.164

Live, H., Wang, H., Zhu, X., Shen, Z., and Chen, J. (2017). “Simulation research of fuzzy auto-tuning PID controller based on matlab,” in *2017 International Conference on Computer Technology, Electronics and Communication (ICCTEC)* (Dalian: IEEE), 180–183. doi: 10.1109/ICCTEC.2017.00047

Mendes, J., Osório, L., and Araújo, R. (2017). Self-tuning PID controllers in pursuit of plug and play capacity. *Control Eng. Pract.* 69, 73–84. doi: 10.1016/j.conengprac.2017.09.006

Mohan, B., and Sinha, A. (2008). Analytical structures for fuzzy PID controllers? *IEEE Trans. Fuzzy Syst.* 16, 52–60. doi: 10.1109/TFUZZ.2007.894974

Noordin, A., Basri, M. M., Mohamed, Z., and Abidin, A. Z. (2017). Modelling and PSO fine-tuned PID control of quadrotor UAV. *Int. J. Adv. Sci. Eng. Inform. Technol.* 7, 1367–1373. doi: 10.18517/ijaseit.7.4.3141

Prayitno, A., Indrawati, V., and Trusulaw, I. I. (2018). Fuzzy gain scheduling PID control for position of the AR. Drone. *Int. J. Electr. Comput. Eng.* 8, 1939–1946. doi: 10.11591/ijece.v8i4.pp1939-1946

Rabah, M., Rohan, A., Mohamed, S. A., and Kim, S.-H. (2019). Autonomous moving target-tracking for a UAV quadcopter based on fuzzy-PI. *IEEE Access* 7, 38407–38419. doi: 10.1109/ACCESS.2019.2906345

Rouhani, H., Same, M., Masani, K., Li, Y. Q., and Popovic, M. R. (2017). PID controller design for FES applied to ankle muscles in neuroprosthesis for standing balance. *Front. Neurosci.* 11:347. doi: 10.3389/fnins.2017.00347

Salas, F. G., Orrante-Sakanassi, J., Juarez-Del-Toro, R., and Parada, R. P. (2019). A stable proportional-proportional integral tracking controller with self-organizing fuzzy-tuned gains for parallel robots. *Int. J. Adv. Rob. Syst.* 16:1729881418819956. doi: 10.1177/1729881418819956

Santos, M., Honório, L., Costa, E., Silva, M., Vidal, V., Neto, A. S., et al. (2019). “Detection time analysis of propulsion system fault effects in a hexacopter,” in *2019 20th International Carpathian Control Conference (ICCC)* (Kraków-Wieliczka: IEEE), 1–6. doi: 10.1109/CarpathianCC.2019.8765990

Sarabakha, A., Fu, C., Kayacan, E., and Kumbasar, T. (2017). Type-2 fuzzy logic controllers made even simpler: from design to deployment for UAVs. *IEEE Trans. Industr. Electron.* 65, 5069–5077. doi: 10.1109/TIE.2017.2767546

Soriano, L. A., Zamora, E., Vazquez-Nicolas, J., Hernández, G., Barraza, J. A., and Balderas, D. (2020). PD control compensation based on the reinforcement learning applied to a robot manipulator. *Front. Neurorobot.* 14:78. doi: 10.3389/fnbot.2020.577749

Sumardi, M., and Riyadi, M. A. (2017). “Particle swarm optimization (PSO)-based self tuning proportional integral derivative (PID) for bearing navigation control system on quadcopter,” in *2017 4th International Conference on Information Technology, Computer, and Electrical Engineering (ICITACEE)* (Semarang), 181–186

Thanh, H. L. N. N., and Hong, S. K. (2018). Quadcopter robust adaptive second order sliding mode control based on PID sliding surface. *IEEE Access* 6, 66850–66860. doi: 10.1109/ACCESS.2018.2877795

Tripathy, D., Barik, A. K., Choudhury, N. B. D., and Sahu, B. K. (2019). “Performance comparison of SMO-based fuzzy PID controller for load frequency control,” in *Soft Computing for Problem Solving*, eds J. C. Bansal, K. N. Das, A. Nagar, K. Dee, and A. K. Ojha (Khordha: Springer), 879–892. doi: 10.1007/978-981-13-1595-4_70

Wang, L. (2017). Automatic tuning of PID controllers using frequency sampling filters. *IET Control Theory Appl.* 11, 985–995. doi: 10.1049/iet-cta.2016.1284

Wang, Y., Jin, Q., and Zhang, R. (2017). Improved fuzzy PID controller design using predictive functional control structure. *ISA Trans.* 71, 354–363. doi: 10.1016/j.isatra.2017.09.005

Wu, D., Luo, X., Shang, M., He, Y., Wang, G., and Wu, X. (2020). A data-characteristic-aware latent factor model for web services QoS prediction. *IEEE Trans. Knowl. Data Eng*. doi: 10.1109/TKDE.2020.3014302. [Epub ahead of print].

Wu, D., Luo, X., Shang, M., He, Y., Wang, G., and Zhou, M. (2019). A Deep latent factor model for high-dimensional and sparse matrices in recommender systems. *IEEE Trans. Syst. Man Cybern. Syst*. doi: 10.1109/TSMC.2019.2931393. [Epub ahead of print].

Xuan-Mung, N., and Hong, S. K. (2019a). Improved altitude control algorithm for quadcopter unmanned aerial vehicles. *Appl. Sci.* 9:2122. doi: 10.3390/app9102122

Xuan-Mung, N., and Hong, S. K. (2019b). Robust adaptive formation control of quadcopters based on a leader-follower approach. *Int. J. Adv. Rob. Syst.* 16:1729881419862733. doi: 10.1177/1729881419862733

Keywords: quadcopter attitude, fuzzy neural network, proportional-integral-derivative, attitude tracking control, fuzzy PID

Citation: Park D, Le T-L, Quynh NV, Long NK and Hong SK (2021) Online Tuning of PID Controller Using a Multilayer Fuzzy Neural Network Design for Quadcopter Attitude Tracking Control. *Front. Neurorobot.* 14:619350. doi: 10.3389/fnbot.2020.619350

Received: 21 October 2020; Accepted: 14 December 2020;

Published: 18 January 2021.

Edited by:

Jose De Jesus Rubio, Instituto Politécnico Nacional (IPN), MexicoReviewed by:

Jiancheng Lyu, Qualcomm, United StatesYu Cao, Huazhong University of Science and Technology, China

Di Wu, Chongqing Institute of Green and Intelligent Technology (CAS), China

Copyright © 2021 Park, Le, Quynh, Long and Hong. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Sung Kyung Hong, skhong@sejong.ac.kr

^{†}These authors share first authorship