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.
TABLE 1
Table 1. The major differences and improvements among this study and related works.
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(xE, yE, zE) and B(x, y, z). The dynamic equations of the quadcopter are given as:
⎧⎩⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪ẍ=1M(cosϕsinθcosψ+sinϕsinψ)U1y¨=1M(cosϕsinθsinψ+sinϕcosψ)U1z¨=g−1M(cosϕcosθ)U1ϕ¨=(Jy−JzJx)θ.ψ.+lJxU2θ¨=(Jz−JxJy)ϕ.ψ.+lJyU3ψ¨=(Jx−JyJz)ϕ.θ.+1JzU4 (1) {ẍ=1M(cosϕsinθcosψ+sinϕsinψ)U1y¨=1M(cosϕsinθsinψ+sinϕcosψ)U1z¨=g-1M(cosϕcosθ)U1ϕ¨=(Jy-JzJx)θ.ψ.+lJxU2θ¨=(Jz-JxJy)ϕ.ψ.+lJyU3ψ¨=(Jx-JyJz)ϕ.θ.+1JzU4 (1)
where θ, ϕ, and ψ stand for the three Euler angles: roll, pitch, and yaw, respectively; Jx, Jy and Jz stand for the moment of inertia for the x, y, and z axes, respectively; l denotes the length of the quadcopter's arm; U1 denotes the total thrust on the body in the z-axis; U2, U3, and U4 denote the roll, pitch, and yaw torques, respectively, which are given as
⎧⎩⎨⎪⎪⎪⎪⎪⎪U1=F1+F3+F2+F4U2=F4−F2U3=F3−F1U4=Cd(F1+F3−F2−F4) (2) {U1=F1+F3+F2+F4U2=F4-F2U3=F3-F1U4=Cd(F1+F3-F2-F4) (2)
where Fi=CtΩ2i Fi=CtΩi2 denotes the thrust of the i-th motor; Ωi denotes the speed of the i-th motor; Ct and Cd stand for the thrust and drag coefficients, respectively.
FIGURE 1
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
θ.ref=Gθeθϕ.ref=Gϕeϕψ.ref=Gψeψ (3) θ.ref=Gθeθϕ.ref=Gϕeϕψ.ref=Gψeψ (3)
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.
eθ=θref−θeϕ=ϕref−ϕeψ=ψref−ψ (4) eθ=θref-θeϕ=ϕref-ϕeψ=ψref-ψ (4)
where θref, ϕref, and ψref are the angle references of the roll, pitch, and yaw, respectively.
FIGURE 2
FIGURE 3
Figure 3. Control scheme of the quadcopter attitude controller ([theta] is replaced for ϕ, [theta], or ψ).
The output of the PID inner-loop controller is given by
uθ=Kθpeθ.+Kθi∫t0eθ.+Kθdėθ.uϕ=Kϕpeϕ.+Kϕi∫t0eϕ.+Kϕdėϕ.uψ=Kψpeψ.+Kψi∫t0eψ.+Kψdėψ. (5) uθ=Kpθeθ.+Kiθ∫0teθ.+Kdθėθ.uϕ=Kpϕeϕ.+Kiϕ∫0teϕ.+Kdϕėϕ.uψ=Kpψeψ.+Kiψ∫0teψ.+Kdψėψ. (5)
where Kθp Kpθ , Kθi Kiθ , Kθd Kdθ , Kϕp Kpϕ , Kϕi Kiϕ , Kϕd Kdϕ , Kψp Kpψ , Kψi Kiψ , and Kψd Kdψ , are the PID gains for the roll, pitch, and yaw inner-loop controller; eθ. eθ. , eϕ. eϕ. , and eψ. eψ. denote the angular velocity errors of the roll, pitch, and yaw, respectively.
eθ.=θ.ref−θ.eϕ.=ϕ.ref−ϕ.eψ.=ψ.ref−ψ. (6) eθ.=θ.ref-θ.eϕ.=ϕ.ref-ϕ.eψ.=ψ.ref-ψ. (6)
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:
lthrule: IF i1 is μ1jk and i2 is μ2jk,..., and ini is μnijk Then out = wkloi=1,2,...,ni;j=1,2,...,nj;k=1,2,...,nk;l=1,2,...,nl;o=1,2,...,no (7) lthrule: IF i1 is μ1jk and i2 is μ2jk,..., and ini is μnijk Then out = wkloi=1,2,...,ni;j=1,2,...,nj;k=1,2,...,nk;l=1,2,...,nl;o=1,2,...,no (7)
where ii is the fuzzy input; μijk is the membership function (MF) for the input i-th, block j-th, and layer k-th; wklo 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 = [i1, i2, …, ini], 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:
μijk=exp{−(ii−mijk)2v2ijk} (8) μijk=exp{-(ii-mijk)2vijk2} (8)
where mijk and vijk 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:
fkl=∏i=1niμijk (9) fkl=∏i=1niμijk (9)
where fkl is the fuzzy firing strength for the l-th rule in the k-th layer.
Then, the fuzzy firing vector is presented as
⎡⎣⎢⎢⎢⎢⎢f1lf2l⋮fnkl⎤⎦⎥⎥⎥⎥⎥=⎡⎣⎢⎢⎢⎢⎢⎢f11,f12,...,f1nlf21,f22,...,f2nl⋮⋮⋮fnk1,fnk2,...,fnknl⎤⎦⎥⎥⎥⎥⎥⎥ (10) [f1lf2l⋮fnkl]=[f11,f12,...,f1nlf21,f22,...,f2nl⋮⋮⋮fnk1,fnk2,...,fnknl] (10)
4) The fuzzy weight space: in this space, the fuzzy weights wklo are provided to connect the fuzzy firing space and output space. The fuzzy weight vector for the o-th output is presented as
⎡⎣⎢⎢⎢⎢⎢w1low2lo⋮wnklo⎤⎦⎥⎥⎥⎥⎥=⎡⎣⎢⎢⎢⎢⎢w11o,w12o,...,w1nlow21o,w22o,...,w2nlo⋮⋮⋮wnk1o,wnk2o,...,wnknlo⎤⎦⎥⎥⎥⎥⎥ (11) [w1low2lo⋮wnklo]=[w11o,w12o,...,w1nlow21o,w22o,...,w2nlo⋮⋮⋮wnk1o,wnk2o,...,wnknlo] (11)
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:
uo=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwklo)∑l=1nlfkl⎞⎠⎟⎟⎟ (12) uo=∑k=1nk(∑l=1nl(fklwklo)∑l=1nlfkl) (12)
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 4
FIGURE 5
FIGURE 6
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).
Θ.ref=GΘeΘ (13) Θ.ref=GΘeΘ (13)
GΘ=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwgklΘ)∑l=1nlfkl⎞⎠⎟⎟⎟ (14) GΘ=∑k=1nk(∑l=1nl(fklwklΘg)∑l=1nlfkl) (14)
where Θ is replaced by (θ, ϕ, ψ).
By rewriting the Equation (6),
eΘ.=Θ.ref−Θ. (15) eΘ.=Θ.ref-Θ. (15)
A Lyapunov function is defined as E1(t)=12(eΘ.(t))2 E1(t)=12(eΘ.(t))2 , using the gradient descent approach and chain rule, and the parameter update laws for PID-MFNN can be obtained as follows:
ŵgklΘ(t+1)=ŵgklΘ(t)−ηgw∂E1∂ŵgklΘ =ŵgklΘ(t)−ηgw∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂ŵgklΘ =ŵgklΘ(t)−ηgweΘ.eΘfkl∑l=1nlfkl (16) ŵklΘg(t+1)=ŵklΘg(t)-ηwg∂E1∂ŵklΘg =ŵklΘg(t)-ηwg∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂ŵklΘg =ŵklΘg(t)-ηwgeΘ.eΘfkl∑l=1nlfkl (16)
mˆgijk(t+1)=mˆgijk(t)−ηgm∂E1∂mˆgijk =mˆgijk(t)−ηgm∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂fkl∂fkl∂μijk∂μijk∂mˆgijk =mˆgijk(t)−ηgmeΘ.eΘ(ŵgklΘ−GΘ)∑l=1nlfklfkl(ii−mˆgijk)(vˆgijk)2 (17) m^ijkg(t+1)=m^ijkg(t)-ηmg∂E1∂m^ijkg =m^ijkg(t)-ηmg∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂fkl∂fkl∂μijk∂μijk∂m^ijkg =m^ijkg(t)-ηmgeΘ.eΘ(ŵklΘg-GΘ)∑l=1nlfklfkl(ii-m^ijkg)(v^ijkg)2 (17)
vˆgijk(t+1)=vˆgijk(t)−ηgv∂E1∂vˆgijk =vˆgijk(t)−ηgv∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂fkl∂fkl∂μijk∂μijk∂vˆgijk =vˆgijk(t)−ηgveΘ.eΘ(ŵgklΘ−GΘ)∑l=1nlfklfkl(ii−mˆgijk)2(vˆgijk)3 (18) v^ijkg(t+1)=v^ijkg(t)-ηvg∂E1∂v^ijkg =v^ijkg(t)-ηvg∂E1∂eΘ.∂eΘ.∂Θ.ref∂Θ.ref∂GΘ∂GΘ∂fkl∂fkl∂μijk∂μijk∂v^ijkg =v^ijkg(t)-ηvgeΘ.eΘ(ŵklΘg-GΘ)∑l=1nlfklfkl(ii-m^ijkg)2(v^ijkg)3 (18)
where ŵgklΘ ŵklΘg , mˆgijk m^ijkg , and vˆgijk v^ijkg are the connecting weight, mean, and variance of the outer-loop MFNN controller; ηgw ηwg , ηgm ηmg , and ηgv ηvg are the positive learning rates.
Then, considering the inner-loop controller, Equation (5) can be rewritten, where the gains Kθp Kpθ , Kθi Kiθ , Kθd Kdθ , Kϕp Kpϕ , Kϕi Kiϕ , Kϕd Kdϕ , Kψp Kpψ , Kψi Kiψ , and Kψd Kdψ are obtained using the outputs of the proposed MFNN.
uΘ=uΘp+uΘi+uΘd=KΘpGΘp+KΘiGΘi+KΘdGΘd (19) uΘ=upΘ+uiΘ+udΘ=KpΘGpΘ+KiΘGiΘ+KdΘGdΘ (19)
where GΘp=eΘ. GpΘ=eΘ. ; GΘi=∫t0eΘ. GiΘ=∫0teΘ. ; GΘd=ėΘ. GdΘ=ėΘ.
KΘp=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwpklΘ)∑l=1nlfkl⎞⎠⎟⎟⎟;KΘi=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwiklΘ)∑l=1nlfkl⎞⎠⎟⎟⎟;KΘd=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwdklΘ)∑l=1nlfkl⎞⎠⎟⎟⎟ (20) KpΘ=∑k=1nk(∑l=1nl(fklwklΘp)∑l=1nlfkl);KiΘ=∑k=1nk(∑l=1nl(fklwklΘi)∑l=1nlfkl);KdΘ=∑k=1nk(∑l=1nl(fklwklΘd)∑l=1nlfkl) (20)
Then
KΘα=∑k=1nk⎛⎝⎜⎜⎜∑l=1nl(fklwαklΘ)∑l=1nlfkl⎞⎠⎟⎟⎟;uΘα=KΘαGΘα (21) KαΘ=∑k=1nk(∑l=1nl(fklwklΘα)∑l=1nlfkl);uαΘ=KαΘGαΘ (21)
where α is replaced by (p, i, d).
By rewriting the Equation (4),
eΘ=Θref−Θ (22) eΘ=Θref-Θ (22)
A Lyapunov function can be defined as E2(t)=12(eΘ(t))2 E2(t)=12(eΘ(t))2 , using the gradient descent approach and chain rule, and the parameter update laws for PID-MFNN can be obtained as:
ŵαklΘ(t+1)=ŵαklΘ(t)−ηαw∂E2∂ŵαklΘ =ŵαklΘ(t)−ηαw∂E2∂eΘ∂eΘ∂Θ∂Θ∂uΘα∂uΘα∂KΘα∂KΘα∂ŵαklΘ =ŵαklΘ(t)+ηαweΘTΘGΘαfkl∑l=1nlfkl (23) ŵklΘα(t+1)=ŵklΘα(t)-ηwα∂E2∂ŵklΘα =ŵklΘα(t)-ηwα∂E2∂eΘ∂eΘ∂Θ∂Θ∂uαΘ∂uαΘ∂KαΘ∂KαΘ∂ŵklΘα =ŵklΘα(t)+ηwαeΘTΘGαΘfkl∑l=1nlfkl (23)
mˆαijk(t+1)=mˆαijk(t)−ηαm∂E2∂mˆαijk =mˆαijk(t)−ηαm∂E2∂eΘ∂eΘ∂Θ∂Θ∂uΘα∂uΘα∂KΘα∂KΘα∂fkl∂fkl∂μijk∂μijk∂mˆαijk =mˆαijk(t)+ηαmeΘTΘGΘα(ŵαklΘ−KΘα)∑l=1nlfklfkl(ii−mˆαijk)(vˆαijk)2 (24) m^ijkα(t+1)=m^ijkα(t)-ηmα∂E2∂m^ijkα =m^ijkα(t)-ηmα∂E2∂eΘ∂eΘ∂Θ∂Θ∂uαΘ∂uαΘ∂KαΘ∂KαΘ∂fkl∂fkl∂μijk∂μijk∂m^ijkα =m^ijkα(t)+ηmαeΘTΘGαΘ(ŵklΘα-KαΘ)∑l=1nlfklfkl(ii-m^ijkα)(v^ijkα)2 (24)
vˆαijk(t+1)=vˆαijk(t)−ηαv∂E2∂vˆαijk =vˆαijk(t)−ηαv∂E2∂eΘ∂eΘ∂Θ∂Θ∂uΘα∂uΘα∂KΘα∂KΘα∂fkl∂fkl∂μijk∂μijk∂vˆαijk =vˆαijk(t)+ηαveΘTΘGΘα(ŵαklΘ−KΘα)∑l=1nlfklfkl(ii−mˆαijk)2(vˆαijk)3 (25) v^ijkα(t+1)=v^ijkα(t)-ηvα∂E2∂v^ijkα =v^ijkα(t)-ηvα∂E2∂eΘ∂eΘ∂Θ∂Θ∂uαΘ∂uαΘ∂KαΘ∂KαΘ∂fkl∂fkl∂μijk∂μijk∂v^ijkα =v^ijkα(t)+ηvαeΘTΘGαΘ(ŵklΘα-KαΘ)∑l=1nlfklfkl(ii-m^ijkα)2(v^ijkα)3 (25)
where ŵαklΘ ŵklΘα , mˆαijk m^ijkα , and vˆαijk v^ijkα 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; ηαw ηwα , ηαm ηmα , and ηαv ηvα 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
V(t)=E1=12(eΘ.(t))2 (26) V(t)=E1=12(eΘ.(t))2 (26)
Then,
ΔV(t)=V(t+1)−V(t)=12[(eΘ.(t+1))2−(eΘ.(t))2] (27) ΔV(t)=V(t+1)-V(t)=12[(eΘ.(t+1))2-(eΘ.(t))2] (27)
By applying the Taylor expansion,
eΘ.(t+1)=eΘ.(t)+ΔeΘ.(t)≅eΘ.(t)+[∂eΘ.(t)∂ŵgklΘ]ΔŵgklΘ (28) eΘ.(t+1)=eΘ.(t)+ΔeΘ.(t)≅eΘ.(t)+[∂eΘ.(t)∂ŵklΘg]ΔŵklΘg (28)
From (16),
∂eΘ.(t)∂ŵgklΘ=eΘfkl∑l=1nlfkl=ζ (29) ∂eΘ.(t)∂ŵklΘg=eΘfkl∑l=1nlfkl=ζ (29)
By rewriting (28) using (29) and (16),
eΘ.(t+1)=eΘ.(t)−ζ(ηgweΘ.(t)ζ)=eΘ.(t)[1−ηgwζ2] (30) eΘ.(t+1)=eΘ.(t)-ζ(ηwgeΘ.(t)ζ)=eΘ.(t)[1-ηwgζ2] (30)
By rewriting (27) using (30),
ΔV(t)=12(eΘ.(t))2[(1−ηgwζ2)2−1] =12(eΘ.(t))2[(ηgwζ2)2−2ηgwζ2] =12ηgw(eΘ.(t))2ζ2(ηgwζ2−2) (31) ΔV(t)=12(eΘ.(t))2[(1-ηwgζ2)2-1] =12(eΘ.(t))2[(ηwgζ2)2-2ηwgζ2] =12ηwg(eΘ.(t))2ζ2(ηwgζ2-2) (31)
From (31), if ηgw ηwg is chosen to satisfy 0<ηgw<2ζ2 0<ηwg<2ζ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 ηαw ηwα , ηαm ηmα , and ηαv ηvα can be obtained.
The computational complexity of our approaches using big O notation is given as:
+ Big O notation for PID-CFNN:
Big−O=O(T*[max(n1,n2)+n1*n2]) (32) Big-O=O(T*[max(n1,n2)+n1*n2]) (32)
+ Big O notation for PID-MFNN:
Big−O=O(T*nk[max(nj1,nj2)+(nj1*nj2)]) (33) Big-O=O(T*nk[max(nj1,nj2)+(nj1*nj2)]) (33)
where:
T: is the simulation time.
nj1: the number of membership functions in input 1.
nj2: the number of membership functions in input 2.
nk: the number of layers.
In our proposed network, we choose nj1 = nj2 = 3 and nk = 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.
TABLE 2
Table 2. The 3DR's IRIS parameters inside the Gazebo simulation used in the experiment.
The goal of the control system is to control the attitude of the quadcopter following the reference set-point trajectory:
θref=5*square(0.2πt)ϕref=5*square(0.2πt)ψref=90+5*square(0.2πt) (34) θref=5*square(0.2πt)ϕref=5*square(0.2πt)ψref=90+5*square(0.2πt) (34)
θref=5*sin(0.2πt)ϕref=5*sin(0.2πt)ψref=90+5*sin(0.2πt) (35) θref=5*sin(0.2πt)ϕref=5*sin(0.2πt)ψref=90+5*sin(0.2πt) (35)
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:
RMSE=1ns∑s=1ns((esΘ)2)−−−−−−−−−−−−−⎷, (36) RMSE=1ns∑s=1ns((eΘs)2), (36)
where ns is the number of samples.
FIGURE 7
FIGURE 8
Figure 8. The tracking performance for the quadcopter attitude control for the square wave commands.
FIGURE 9
Figure 9. The control signals for the quadcopter attitude control for the square wave commands.
FIGURE 10
Figure 10. The tracking errors for the quadcopter attitude control for the square wave commands.
FIGURE 11
Figure 11. The quadcopter attitude control tracking performance for the sine wave commands.
FIGURE 12
FIGURE 13
Figure 13. The quadcopter attitude control tracking performance error for the sine wave commands.
TABLE 3
Table 3. RMSE comparison for the quadcopter attitude control for the square wave commands.
TABLE 4
Table 4. RMSE comparison for the quadcopter attitude control for the sine wave commands.
The parameter settings of the proposed PID-MFNN controller were chosen as ni = 2, nj = 3, and nk = 2; the initial GMF for the fuzzy rules are given as mij1 = [−0.6, 0, 0.6], vij1 = [0.3, 03, 0.3], mij2 = [−0.4, 0, 0.4], and vij2 = [0.2, 02, 0.2]; the initial fuzzy weight is wklo = 0.2; the learning rates were chosen as ηgw=ηαw=ηαm=ηαv=0.005 ηwg=ηwα=ηmα=ηvα=0.005 ; the sampling time was 0.01 s. The same parameters were chosen for PID-CFNN, but only the number of layers was nk = 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.
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 46th 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
Zahir, A., Alhady, S., Othman, W., and Ahmad, M. (2018). “Genetic algorithm optimization of PID controller for brushed DC motor,” in Intelligent Manufacturing & Mechatronics, ed M. H. A. Hassan (Pekan: Springer), 427–437. doi: 10.1007/978-981-10-8788-2_38
Daewon Park1,2†, Tien-Loc Le1,3†, Nguyen Vu Quynh3, Ngo Kim Long3 and Sung Kyung Hong1*
* 1Faculty of Mechanical and Aerospace, Sejong University, Seoul, South Korea
* 2Department of Convergence Engineering for Intelligent Drone, Sejong University, Seoul, South Korea
* 3Faculty of Mechatronics and Electronics, Lac Hong University, Bien Hoa, Vietnam
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2021. This work is licensed under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
This study presents an online-tuning proportional-integral-derivative (PID) controller using multilayer fuzzy neural network design for the quadcopter attitude control. The PID controller is a simple but effective control method. However, finding the suitable gain of a model-based controller is relatively complicated and time-consuming because it depends on the dynamic modeling of the plant and external disturbances. Therefore, the development of a method for online tuning the quadcopter PID parameter will be a way to save time and effort, as well as obtaining better control performance. In our controller design, the multilayer structure is provided to improve the learning ability and flexibility of the fuzzy neural network. The adaptation laws for online updating network parameters are derived by using the gradient descent method. The Lyapunov analysis is given to guarantee system stability. Finally, the simulation results on control of the quadcopter attitude are performed through the Gazebo robotics simulator and robot operating system (ROS).
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer