# A Novel Design of a Neural Network-Based Fractional PID Controller for Mobile Robots Using Hybridized Fruit Fly and Particle Swarm Optimization

Authors: Ghusn Abdul Redha Ibraheem; Ahmad Taher Azar; Ibraheem Kasim Ibraheem; Amjad J. Humaidi
Journal: Complexity
 (2020)

---

## Abstract

The design of a swarm optimization-based fractional control for engineering application is an active research topic in the optimization analysis. This work offers the analysis, design, and simulation of a new neural network- (NN) based nonlinear fractional control structure. With suitable arrangements of the hidden layer neurons using nonlinear and linear activation functions in the hidden and output layers, respectively, and with appropriate connection weights between different hidden layer neurons, a new class of nonlinear neural fractional-order proportional integral derivative (NNFOPID) controller is proposed and designed. It is obtained by approximating the fractional derivative and integral actions of the FOPID controller and applied to the motion control of nonholonomic differential drive mobile robot (DDMR). The proposed NNFOPID controller’s parameters consist of derivative, integral, and proportional gains in addition to fractional integral and fractional derivative orders. The tuning of these parameters makes the design of such a controller much more difficult than the classical PID one. To tackle this problem, a new swarm optimization algorithm, namely, MAPSO-EFFO algorithm, has been proposed by hybridization of the modified adaptive particle swarm optimization (MAPSO) and the enhanced fruit fly optimization (EFFO) to tune the parameters of the NNFOPID controller. Firstly, we developed a modified adaptive particle swarm optimization (MAPSO) algorithm by adding an initial run phase with a massive number of particles. Secondly, the conventional fruit fly optimization (FFO) algorithm has been modified by increasing the randomness in the initialization values of the algorithm to cover wider searching space and then implementing a variable searching radius during the update phase by starting with a large radius which decreases gradually during the searching phase. The tuning of the parameters of the proposed NNFOPID controller is carried out by reducing the MS error of 0.000059, whereas the MSE of the nonlinear neural system (NNPID) is equivalent to 0.00079. The NNFOPID controller also decreased control signals that drive DDMR motors by approximately 45 percent compared to NNPID and thus reduced energy consumption in circular trajectories. The numerical simulations revealed the excellent performance of the designed NNFOPID controller by comparing its performance with that of nonlinear neural (NNPID) controllers on the trajectory tracking of the DDMR with different trajectories as study cases.


---

## Body

## 1. Introduction

Mobile robots serve platforms with huge versatility within their environment; they are not limited to one location because they can be pushed autonomously in their own circumference. In other words, it has the capability of implementing tasks without assistance from external operators [1]. Mobile robots are unique to move freely in a predefined workplace to accomplish the preferred objectives. This skill of mobility makes the mobile robots appropriate for vast application fields in unstructured and structured surroundings. The ground mobile robot can be categorized into a wheeled mobile robot (WMR) and legged mobile robot (LMR). The WMRs are prevalent because they are tailored to particular applications with reasonably small mechanical complexities and power drain [2].Within the last decades, many different control structures were introduced into industrial societies to handle the restrictions of the classical controllers. The PID controller which has been dominated by the industrial organizations has been changed using the concept of differentiators and integrators of fractional power. It was shown that a combination of further degrees of freedom with differentiators and integrators of fractional power provided a greater degree of flexibility and performance that would otherwise be hard (even impossible) to come by the conventional PID controllers [3, 4]. The fractional-order PID (FOPID) controllers are the generalization of widely applicable PID controllers; in recent years, they have drawn much attention from both academics and industry [3–5]. Fractional controls are less sensitive to parameter changes in a controlled system. A fractional control unit can easily achieve the isodamping property. On the other hand, incorporating an integral action in the feedback loop has the advantage of eliminating steady-state errors on account of reducing relative stability of the system. It can be concluded that by designing more general controller laws in the form (1/sn), (sn), n ∈ R+, the feedback system with more favorable solutions between undesirable and constructive consequences of the above scenario could be attained and by combining these control actions.Tuning of a fractional PID controller is difficult as five parameters have to be tuned, which means two more parameters compared to a traditional PID controller [3–5]. Some methods were proposed for the proper choice of the parameters’ values of the PID controller. The method of Ziegler–Nichols tuning strategy was acquainted in 1942 for the parameters regulation of the PID controller coefficients; this tuning technique is utilized if the model of the system is a first order plus dead time.In recent years, methods of optimization which are theoretically different from classical optimization have been invented. They depend on specific properties and behavior of organic herd of birds and nature-inspired and neurobiological systems. These metaheuristic procedures have been developed in the last decade and are evolving as common methods for solving numerical optimization and intricate industrial case studies. Particle swarm optimization (PSO) is a metaheuristic optimization method which depends on the motion and intellect of bird’s colony behavior or fish bevy schooling. Kennedy and Eberhart initially suggested particle swarm optimization (PSO) technique in 1995 [6]. Advantages of PSO are as follows: (1) it does not need the derivative of the cost function, (2) it can be parallelized, and (3) it has fast convergence behavior.On the other hand, the fruit fly optimization (FFO) swarm technique is one of the state-of-the-art evolutionary computation techniques based on the foraging behavior of fruit flies which was pointed out by Pan [7]. The olfactory organ of a fruit fly can collect different smells from the air and even locate the source of the food from a distance of 40 km. Subsequently, the fruit flies travel to the source of the food and use their acute visionary system to locate the food destination (minimum or maximum of the function) where their companions form a swarm and then travel in that direction. The FFO algorithm seems to be an excellent optimization algorithm; it has numerous benefits such as speed to acquire solutions, the simplicity of its structure, and ease of implementation. So, FFO was effectively used and applied in a diverse class of applications [7–9].However, FFO algorithm suffers from some shortcomings. Firstly, there is inadequacy in the FFO algorithm concerning the searching policy, a necessary step to yield new solutions of the FFO algorithm using random information of the previous solutions. Moreover, the FFO algorithm has weak exploration ability, low convergence precision, and jumps out of the local minimum. Finally, the candidate solutions cannot be generated in a uniform manner in the domain. On the other hand, PSO experiences the premature convergence, a common phenomenon in the evolutionary methods in very sophisticated applications such as path planning and motion control of mobile robots. Also, it relies on user experience to find the optimum values of some parameters like the inertia weights and social and cognitive coefficients. Moreover, standard swarm optimization algorithms do not find the optimum solutions in a rational time [9]. Therefore, the structure of the FFO and PSO algorithms requires further improvements for attaining the optimum solutions to the real-world applications.The motivation for the hybridization between the MAPSO and EFFO algorithms is an attempt to combine the beneficial features of MAPSO and EFFO algorithms and conduct a sequential operation for these two optimization algorithms over the progression of the process. Moreover, the hybridization between MAPSO and EFFO algorithms will overcome the limitations of the individual MAPSO and EFFO algorithms mentioned above. This hybridization will be accomplished as described later in this paper.Many researchers have conducted research studies on motion control problem of DDMR under nonholonomic constraints, and so various kinds of controllers were demonstrated in the literature for the mobile robots to track specific trajectories. Trajectory tracking of wheeled mobile robots using hybrid visual servo equipped with onboard vision systems is described in [10]. In [11], the authors addressed the output feedback trajectory tracking problem for a nonholonomic wheeled mobile robot in the presence of parameter uncertainty, exogenous disturbances, and without velocity measurements using fuzzy logic techniques. The work in [12] focused on the localization, kinematics, and closed-loop motion control for a DDMR. The authors of [13] developed an online nonlinear optimal tracking control method for unmanned ground systems by firstly establishing the nonlinear tracking error model for unmanned ground systems (UGSs), and then the tracking control problem for UGS was converted to a continuous nonlinear optimal control problem with the help of a symplectic pseudospectral method based on the third kind of generation function. In [14], the authors proposed a kinematic-based neural network controller for nonlinear control of the DDMR with nonholonomic constraints. In [15], an iterative learning control over a wireless network for a class of unicycle type mobile robot systems is proposed, and the study included the channel noise effect and the robustness analysis of the proposed system. In [16], a sliding mode-based asymptotically stabilizing controller law has been proposed for a mobile robot. A dynamic prediction-based model predictive control method is offered in [17] for wheeled mobile robots taking into account the tire sideslip. Fuzzy based controllers for autonomous mobile robots have been argued in [18, 19], where the work in [19] dealt with unstructured environments. The work in [20] proposed a disturbance observer based on biologically inspired integral sliding mode control for trajectory tracking of mobile robots. A time-optimal velocity tracking controller for DDMR is presented in [21]. The authors in [22, 23] investigated a model predictive control (MPC) for differential drive mobile robots. Backstepping nonlinear control has been investigated on DDMR in [24]. Recently, researchers are applying a new control paradigm named active disturbance rejection control (ADRC) [25–30] on a wide range of applications [31, 32] and particularly on DDMR [33]. The authors in the literature proposed many algorithms for tuning parameters of the FOPID controller with different applications, where [34, 35] used the genetic algorithms and [36–39] utilized PSO algorithm. Others like Rajasekhar et al. [40] applied the gravitational search optimization technique based on the Cauchy and Gaussian mutation, and El-Khazali [41] exploited the artificial bee colony algorithm. Frequency-domain methods for the design of the FOPID controllers can be found in [42]. Finally, other algorithms like GA can be used to tune the FOPID controller and more complex controllers like [43].The contributions in this research work lie in twofold:(1)
Development of a MAPSO-EFFO algorithm: developing a modified adaptive particle swarm optimization (MAPSO) algorithm by adding an initial run phase with a massive number of particles. At the end of this initial running point, the smaller group of these fitness particles will be selected to continue with an adaptive PSO (APSO) algorithm. Moreover, the conventional fruit fly optimization (FFO) algorithm has been modified by increasing the randomness in the initialization values of the algorithm to cover wider searching space and then implementing a variable searching radius during the update phase by starting with a large radius which decreases gradually during the searching phase. Finally, adopting a hybridized MAPSO-EFFO algorithm by the serial blending of the MAPSO algorithm with EFFO one, i.e., the input to the EFFO algorithm is the output of the MAPSO. The hybridized MAPSO-EFFO technique is used for the evaluation of the parameters of the NNFOPID.(2)
New nonlinear fractional control structure: a new NNFOPID controller is proposed in this paper which employs the structure of the neural networks (NNs). With suitable arrangements of the hidden layer neurons using sigmoid nonlinear activation and linear functions in the hidden and output layers, respectively, and with appropriate connection weights between different neurons in different layers, a new class of nonlinear neural FOPID controller is obtained by approximating the fractional derivative and integral actions of the FOPID controller. The outputs of the neural networks are the control actions used to drive the motors of the DDMR.The paper is organized in the following structure. Section2 gives the motivation and problem statement. Section 3 presents the fractional calculus and the theoretical background of the fractional PID controllers. The kinematic model of the DDMR is introduced in Section 4. The proposed nonlinear neural conventional and fractional PID controllers for the trajectory tracking of the DDMR are explained in Section 5. Section 6 discusses the results and simulations of the designed motion controllers for the DDMR based on different trajectories. Finally, the conclusions are given in Section 7.


## 2. Problem Statement

Given a nonholonomic differential drive mobile robot (DDMR) following a particular path, the tracking error occurs because of many factors like noise, disturbances, slippage, and the errors measured from sensors due to both interior and exterior causes. These issues also make the mobile robot has the difficulty to turn left or right by direction set or by using various sensors. Therefore, the DDMR kinematic model has been employed in this paper to synthesize neural network fractional-order PID (NNFOPID) controllers to regulate its speed so that it would track the required path in the plane as fast as possible with minimum mean square tracking error; this is called trajectory tracking problem. Three FOPID controllers will be designed to control the position (x and y) of the DDMR in the 2D plane and its orientation θ. Moreover, the aim of the proposed tracking FOPID controllers is reducing the energy consumed by the left and right motors of the DDMR. Given a reference path that needs to be followed by the DDMR, which consists of a set of positions in the 2D plane together with the orientation, i.e., xr, yr, and θr, the actual path consists of a set of positions x, y, and θ. Then, it is required to design a NNFOPID controller to generate the control velocities of the kinematic model of the DDMR such that the mean square error between xr and x, yr and y, and θr and θ is minimum with minimum peak of the left and right velocities of the DDMR. In contrast to the FOPID controller, the NNFOPID controller has more capability to capture the nonlinearity of the DDMR model due to the nature of the neural network structure employed in the design where nonlinear activation functions are used with hidden layer that has adaptable parameters (NNFOPID controller parameters).


## 3. Fractional Control Analysis

Fractional calculus is a part of the mathematical analysis, which demonstrates the likelihood of the differential operator orders to be the complex or real number for the differentiation and integration. Generally, the form of the fractional-order operation represented byDabα is called as differintegral operator. The sign of α controls the action of differintegral Dabα whether to be an identity operator, an integrator, or a differentiator.The fractional integral and derivative using Grünwald–Letnikov (GL) definition follow the same procedures based on the multiderivative integer calculus. The general GL definition is stated as [42, 44](1)DaGLbαfb=limh⟶01hα∑j=0b−a/h−1jαjfb−jh,where b−a/h refers to the integer part, a and b are the start and final limit values, and h is the sampling time. The utilization of GL of (1) in the computation of the output response of any fractional-order system can be illustrated as follows. Given any fractional system expressed by the fractional-order linear constant coefficients differential equation as [44],(2)anD∝nyt+an−1D∝n−1yt+⋯+a0D∝0yt=bmDδmut+bm−1Dδm−1ut+⋯+b0Dδ0ut,where D∝=Dbα0;aii=0,….,nbii=0,….,m are constant and ∝ni=0,…,nandδii=0,…,m are real numbers. Without loss of generality, the parameters ∝’s and δ’s might be ∝n>∝n−1>⋯>∝0, and δm>δm−1>⋯>δ0. Consider (2) with its right-hand side equal to u (t) such that(3)anD∝nyt+an−1D∝n−1yt+⋯+a0D∝0yt=ut.Recall GL definition in (1); then, by substituting (1) into (3), the numerical solution of (3) can be evaluated as [44](4)yb=1∑i=0nai/hαiub−∑i=0naihαi∑j=1b−a/hwjαiyb−jh,and wjα can be evaluated in recursive manner as follows:(5)w0α=1,wjα=1−α+1jwj−1α,j=1,2,…,b−ah.Now reconsider (2), where its right-hand side is equal to ǔ (t):(6)u⌣t=bmDδmut+bm−1Dδm−1ut+⋯+b0Dδ0ut.Thus,ǔ (t) may be calculated firstly using (1), and then the output response due to ǔ (t) is computed from the solution of (6) as(7)y=∑j=1b−a/h∑i=0mbihδi∗wjδiyb+h−jh.The FOPID controller increases the efficiency and the possibility of better system performance because of its five parameters. The differential equation of the FOPID controller with fractional power denoted as PIλDα is described by(8)ut=kpet+kiD−λet+kdDαet.Taking Laplace transform to (8), we have(9)Us=kpes+kiessλ+kdsαes,where kd, kp, and ki are derivative, proportional, and integral control parameters, respectively, λ is the order of the fractional integral, and α is the fractional derivative order. It is obvious that the FOPID controller has the three standard coefficients kd, ki, and kp in addition to parameters λ and α, which are fractional powers for derivative and integral actions, respectively. The values of α and λ are nonintegers with the restriction of being positive real numbers.Discretization methods of continuous-time fractional operators have been studied widely by many researchers [45, 46]. The fundamental principle to discretize a continuous fractional-order operator sα (α ∈ R) is to define it by what is called as the generating function s = ω (z−1). Examples of such transformations are Euler, Tustin, and Simpson transformations. A more recent transformation formula is found as a weighted interpolation between the Euler and Tustin [45]. Usually, the aforementioned transformation schemes lead to a nonrational polynomial in z. To get a rational polynomial, one may find the power series expansion (PSE) of s = ω (z−1) and then truncate the z-polynomial function (in the form of finite impulse response (FIR) filters) to compute the final approximation. The Tustin method is applied since it is more accurate compared to other transforms such as backward and forward difference as given below:(10)sα=ωz−1α=2T1−z−11+z−1α.Based on the above analysis, the nonlinear control law that drives wheels of the DDMR will be derived in detail in the next sections. Before that, a concise review of DDMR modeling will be developed.


## 4. Kinematic Modeling of Nonholonomic DDMR

The position of the DDMR in the world coordinates axis {o, x, y} is illustrated in Figure 1. The kinematics model of the DDMR as shown in the figure consists of a castor wheel in the head of the cart and two driving wheels attached on one axis located at the back. The motion and the orientation of DDMR are achieved via two DC motors which form the actuators of the right and left wheels. Table 1 lists the parameters that have been used in the derivation of the DDMR kinematics.Figure 1
DDMR position representation in the world frame.Table 1
Parameters of the DDMR model kinematics.
Symbol
Definition
m
Center point between the two rear wheels of DDMR
D
Distance between the DDMR back wheels (m)
r
Wheel radius of DDMR (m)
V
Li
t
DDMR linear velocity (m/sec)
V
A
t
DDMR angular velocity (rad/sec)
V
left
t
Left wheel linear velocity (m/sec)
V
right
t
Right wheel linear velocity (m/sec)
θ
Orientation of the mobile robot from thex-axisThe motion of the DDMR can be determined by the linear velocities of the right and left wheels,Vright and Vleft. The angular and linear velocities of the DDMR, VA and VLi, can be described by Vleftt and Vrightt as follows [2]:(11)VAt=Vleftt−VrighttD,(12)VLit=Vleftt+Vrightt2.The kinematics equation of the DDMR in the world frame is derived as(13)x˙t=VLitcosθt,(14)y˙t=VLitsinθt,(15)θ˙t=VAt.Substituting (11) and (12) in (13)–(15), and integrating them, we get the solutions, xt, yt, and θt. Moreover, considering a sample interval Δt and a zero-order hold , we get the discrete representation of xt, yt, and θt as follows [38]:(16)xk=0.5Vleftk+VrightkcosθkΔt+xk−1,(17)yk=0.5Vleftk+VrightksinθkΔt+yk−1,(18)θk=1DVleftk−VrightkΔt+θk−1,where xk,yk,θk are the position components at the kth step of the motion and Δt is the interval between two adjacent samples. Equations (16)–(18) are used in the design of the NNFOPID controller. It should be remembered that the coordinates of the DDMR given in Figure 1 are in the global frame (world frame) and can be transformed into the local coordinate by the rotation matrix given below:(19)R=cosθsinθ0−sinθcosθ0001.The configuration error signals are acquired by this matrix to transform the DDMR from local coordinate to the global one.Assumption (H1):.
The DDMR moves to any location in the free workplace assuming that the wheels of DDMR are ideally set up such that they have no slipping with ideal rolling.


## 5. The Proposed Swarm-Based Nonlinear Neural FOPID (NNFOPID) Trajectory Controller for DDMR

The two main objectives of DDMR Trajectory controller are to establish a control strategy that prevents the DDMR from drifting out of the desired track and keep its movement smoothly within a minimum error with stability. The proposed configuration of the DDMR motion control in this research consists of two main parts as explained in the next sections.


### 5.1. Nonlinear Neural FOPID (NNFOPID) Kinematic Trajectory Controller Structure

Figure2 illustrates the structure of the NNFOPID-based kinematic trajectory controller for the DDMR. The suggested trajectory tracking control for the DDMR in this work is the NNFOPID. Mathematically, it can be derived as follows. Inspired by the work in [47] and starting from (10) and assuming ω=z−1, the PSE of the right-hand side of (10) is given as(20)sα=ωz−1α=2T1−z−11+z−1α=2Tα∑i=0∞giαωi,ω<1.Figure 2
The NNFOPID-based trajectory tracking controller for DDMR.It is mapped inside the unit circle in thez-plane, with region of convergence (ROC) z>1, i.e.,(21)sα=2Tα∑i=0∞giαz−i,z>1.g
α
’
s coefficients are calculated from the following equation:(22)giα=1i!⋅didωi1−ω1+ωαω=0.The integral terms−λ of (9) can be treated as follows:(23)s−λ=1ss1−λ.Applying Tustin transformation of (10) on (23), we get(24)s−λ=T21+z−11−z−1⋅2T1−z−11+z−11−λ=2T−λ1+z−11−z−1⋅∑i=0∞gi1−λz−k,z>1,where g1−λ can be calculated using (22). Now, substituting (21) and (24) into (9) yields the general discrete-type PID controller with a long memory:(25)Cz=KP+KD∑i=0∞giαz−i+KI1+z−11−z−1⋅∑i=0∞gi1−λz−i,where KP=kp,KD=2/Tαkd, and KI=2/T−λki. The upper limit in the of the sum in (25) cannot be considered for practical limitations. So, we calculate the sum up to L; then,(26)Cz=KP+KD∑i=0Lgiαz−k+KI1+z−11−z−1⋅∑i=0Lgi1−λz−i.Multiplying both sides of (26) by 1−z−1 and remembering that Uz=Cz⋅Ez,(27)1−z−1Uz=1−z−1KPEz+1−z−1KDEz∑i=0Lgiαz−k+KI1+z−1⋅Ez∑i=0Lgi1−λz−k.Then, the general difference equation relatingek to Uk looks like(28)Uk=Uk−1+KPek−ek−1+KD∑i=0Lgiαek−i−ek−i−1+KI⋅∑i=0Lgi1−λek−i+ek−i−1.Equation (28) describes the control signal for the discrete-time FOPID controller. Then, the suggested feedback control law of the NNFOPID trajectory tracking controller for the DDMR is given as(29)Vleftk=U1k=Oxk+Oyk+Vleftk−1,Vrightk=U2k=Oθk+Oyk+Vrightk−1,where Vrightk−1 and Vleftk−1 are the delayed signals of the control signals Vrightk and Vleftk. The signals Oxk,Oyk,andOθk correspond to the neural network’s outputs of the hidden layer neurons with the sigmoid signal as an activation function and are described as(30)Oδk=21+e−netδk−1,for δ=x,y,andθ, and netδk is given as(31)netδk=KPδeδk−eδk−1+KDδ∑i=0Lgiαeδk−i−eδk−i−1+KIδ⋅∑i=0Lgi1−λeδk−i+eδk−i−1,for δ=x,y,andθ. Figure 3 portrays the proposed NNFOPID controller for the DDMR used in the block diagram of Figure 2.Figure 3
The proposed structure of the NNFOPID controller for DDMR.The proposed NN structure is a multilayer perceptron (MLP) which consists of three layers. The first layer is the input layer which sums the error input signals and its past values. The second layer is the hidden layer; it consists of three neurons with nonlinear activation function; they are there to implement the three FOPID controllers needed for thex, y, and θ subsystems of the mobile robot. The connection weights for this hidden layer are the coefficients of the FOPID controllers, i.e., KPδ, KIδ, and KDδ, and δ=x,y,andθ. Finally, the third layer is the output layer; it consists of a single neuron with linear activation function; it adds up the three outputs of the hidden layer. The fractional derivatives are translated into a weighted sum of the past and current values of the input error signal eδk for δ=x,y,andθ as indicated by (31). So, the tuning input vector of the NNFOPID controller consists of eδk,eδk−1,eδk−2,…,eδk−L−1, for δ=x,y,andθ. The activation function of the output layer in Figure 3 is linear. Its proposed structure is different from the NN-based FOPID controllers proposed in [48, 49], where in these works, the outputs of the neural networks are the parameters of the FOPID controller themselves, while in the proposed scheme, the structure of the neural network itself has been used as a nonlinear fractional-order PID controller where the coefficients of the fractional-order PID controller themselves are the connection weights of the NN structure, and the output of the neural networks are the control actions used to drive the motors of the DDMR. The NNFOPID neural controller parameters KD, KI, KP,α,andλ are adjusted using the proposed MAPSO-EFFO described next.


### 5.2. Hybridized MAPSO-EFFO-Based Tuning Algorithm

PSO and FFO algorithms are the metaheuristic procedures which have been invented in the last decade and are evolving as common procedures for solving numerical optimization and industrial case studies. They require only function evaluations (and not the integral or derivative values). The next section presents the modified PSO and FFO algorithms, namely, the MAPSO and EFFO and the hybridization between them to produce a hybridized algorithm with fast convergence behavior. This is to overcome the limitations of the individual PSO and FFO algorithms like premature convergence, user dependence on setting parameter values, and exploration ability. In the following section, the individual algorithms used in this work are discussed, and then the hybridization between them is introduced.


#### 5.2.1. Modified Adaptive PSO (MAPSO) Algorithm

In this work, improvement is added to increase the speed and efficiency of the algorithm where the optimal solutions are found by spreading a large amount of population size (from 6M to 10M, where M is the standard population size and lies between 20 and 30 particles) in the search space. Then, choosing the best (20–30 particles) from all these populations as initial populations, the best particles are the ones that have the minimum of the following fitness function:(32)MSE=1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2,(33)MSE=0.5∗1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2+0.5∗U12k+U22k,where Q is the maximum number of samples, k is the current sample, xr, yr, and θr are reference values, and U1 and U2 are the control signals. Moreover, the social and cognitive parameters c1andc2 are considered variable through the iterative process, in contrast to being constant in the standard PSO. Figure 4 illustrates this modification. The pseudocode for the calculations of the values of the optimal coefficients of the NNFOPID controller using the MAPSO is listed in Algorithm 1.Figure 4
The proposed modification of MAPSO algorithm. (a) Standard PSO algorithm. (b) MAPSO. (c) After selecting the best pop. of the MAPSO.
(a)
(b)
(c)Algorithm 1: Tuning of the optimal NNFOPID parameters for DDMR using MAPSO.
(1)
Initialize the swarm in the range of about (6M–10M) particles.
(2)
Choose the bestM swarm and randomly assign the initial location and velocities and other related parameters. Randomly assign the position values of PSO particles with zero velocities and initialize the constants imax, wmax, wmin, c1max,c1min, c2max,c2min. Set i = 1 and go to the step (3)
(3)
For
j = 1, 2, …, M
Calculate the fitness function of the particlej, i.e., MSEj using (32) or (33) to each particle j,
set local best cost = currentMSE
Local best position = current position
End
Set global best MSE = min (for all local best MSE)
(4)
w
i
=
w
max
−
w
max
−
w
min
/
i
max
i
,
c
1
i
=
c
1
min
+
c
1
max
−
c
1
min
/
i
max
i, c2i=c2min+c2max−c2min/imaxi
For δ=x,y,θ
For X=KP,KI,KD,α,λ
Forj = 1, 2, …, M
V
X
δ
,
j
i
=
w
i
V
X
δ
,
j
i
−
1
+
c
1
i
⋅
R
1
P
Best
δ
,
j
−
X
δ
,
j
i
−
1
+
c
2
i
⋅
R
2
G
Best
−
X
δ
,
j
i
−
1, Xδ,ji=Xδ,ji−1+VXδ,ji
Calculate the MSE of (32) or (33)
End
End
End
(5)
Seti = i + 1 and go to step 4 until either iteration i reaches imax or convergence is achieved.


#### 5.2.2. Enhanced Fruit Fly Optimization (EFFO) Algorithm

The process of finding food by fruit fly can be explained as follows. First, fruit flies smell the food location using the organ osphresis and then fly towards the food source. When fruit flies become in the neighboring of the food source, they use the visual sense to locate the food and the next location for the fruit flies swarm. Finally, it flies towards the food direction. The standard FFO has been explained in detail in the literature [7], and some improvements have been added in this paper to the standard EFFO as follows:(a)
Assign a range of values as an upper and lower limits for the initialization of the decision variables.(b)
A dynamic change of the search radius with some iteration has been proposed for the standard FFO algorithm to improve its performance and exclude the drawbacks of the fixed value searching radius (see Figure5). The modification to the standard FFOA is proposed by adding an inertia weight as follows:(34)wi=wmax−wmini+wmin,where w is the weight of the inertia used to adjust the radius of spread and δ=x,y,andθ. The pseudocode for the calculation of the optimal values of the NNFOPID controller’s coefficients using the EFFO algorithm is listed in Algorithm 2.Figure 5
The proposed enhancement of EFFO algorithm. (a) Initial FFO. (b) Standard FFO. (c) Enhanced FFO (EFFO).
(a)
(b)
(c)Algorithm 2: Tuning of the optimal NNFOPID parameters for DDMR using EFFO.
(1)
Initialization phase.
Assign random initializations with upper and lower limits and initialize other algorithm parameters.
X
_
axis
=
U
+
U
−
ℒ
∗
ℛ
∗
ℛ
Y
_
axis
=
U
+
U
−
L
∗
ℛ
∗
ℛ
whereX_axis is the initial value of the fruit fly position in the x-direction and ℒ and U are the lower and upper limits of X-position, respectively, ℛ ∈ [0, 1] is a random value, Y_axis is the initial value of Y in the y-direction, and ℒ and U are the upper and lower limits of Y, respectively. Define imax, Smell_best=1. Define the number of fruit flies N, wmax,wmin. Set iteration i = 1.
(2)
Osphresis searching process
Every individual searches about food in all directions randomly around the initial locations of the previous step using the osphresis organ to generate the next population.
For δ=x,y,θ
For L=KP,KI,KD,α,λ,
Whilei < imax
Forj = 1, 2, …, N
w
L
δ
,
j
i
=
w
max
−
w
min
/
i
+
w
min
X
L
δ
,
j
i
=
X
_
axis
+
ℛ
∗
w
L
δ
,
j
i
Y
L
δ
,
j
i
=
Y
_
axis
+
ℛ
∗
w
L
δ
,
j
i
(3)
Path construction phase.
Dis
L
δ
,
j
i
=
X
L
δ
,
j
i
2
+
Y
L
δ
,
j
i
2
L
δ
,
j
i
=
1
/
Dis
L
δ
,
j
i
(4)
Fitness calculation phase.
Calculate the fitness function by the following equations, where (32) or (33) are calculated with the updated values of the NNFOPID parameters Lδ,ji, i.e.,
Sme
δ
L
,
j
i
=
MSE
L
δ
,
j
i
End For
best_smell, best_index
=
min
Sme
L
δ
i
whereSmeLδi is the vector of the concentration of smell for the fruit fly swarm, best_smell represents the smallest elements, best_index are its indices along the different dimensions of smell vectors, and min SmeLδi is the minimum concentration of smell in the fly swarm.
(5)
Vision searching process
The fruit flies keep the best value of smell concentration and will use visionary sense to fly in the direction of that location according to the subsequent equations,
If best_smell < Smell_best
Smell_best=best_smell
X_axis=Xbest_index
Y_axis=Ybest_index
End if
i
=
i
+
1
End while
End For
End For


### 5.3. Hybridized Swarm Optimization Algorithm: The MAPSO-EFFO Algorithm

In this paper, a hybridization between MAPSO and EFFO is proposed. The first phase utilizes MAPSO algorithm, where a particle swarm spreads in different orientations and the global best solution is obtained. The second phase includes the EFFO for updating the preceding best locations of the swarm particles. By taking advantages of the MAPSO and EFFO, the hybridized MAPSO-EFFO algorithm is illustrated in the following pseudocode (Algorithm3).Algorithm 3: Tuning of the optimal NNFOPID parameters for DDMR using MAPSO-EFFO
(1)
Initializeimax
(2)
Start MAPSO algorithm and initialize its parameters (Algorithm1).
(3)
Obtain theGbest position from the MAPSO for each of the NNFOPID controller parameters.
(4)
Start EFFO algorithm and calculate the initial parameter values using
X
_
axis
L
δ
,
j
=
G
best
position
2
/
2
Y
_
axis
L
δ
,
j
=
G
best
position
2
/
2
(5)
Follow the steps of the EFFO algorithm (Algorithm2).
(6)
Seti = i + 1 and go to step 5 until either iteration i reaches imax or convergence is achieved.The advantage of the proposed hybridized MAPSO-EFFO algorithm will overcome the limitations of the individual particle swarm optimization (PSO) and fruit fly optimization (FFO) algorithms like premature convergence, user dependence on setting parameter values, and exploration ability. The salient features of the hybridized MAPSO-EFFO algorithm are the simplicity of its structure and ease of implementation. Knowing that the hybridized MAPSO-EEFO algorithm does not need the derivative of the cost function and since the MAPSO and EFFO algorithms will run sequentially, the proposed hybridized MAPSO-EEFO algorithm can be parallelized, which results in fast convergence behavior. Finally, the proposed hybridized algorithm will not rely on user experience to find the optimum values of some parameters like the inertia weights and social and cognitive coefficients.


## 5.1. Nonlinear Neural FOPID (NNFOPID) Kinematic Trajectory Controller Structure

Figure2 illustrates the structure of the NNFOPID-based kinematic trajectory controller for the DDMR. The suggested trajectory tracking control for the DDMR in this work is the NNFOPID. Mathematically, it can be derived as follows. Inspired by the work in [47] and starting from (10) and assuming ω=z−1, the PSE of the right-hand side of (10) is given as(20)sα=ωz−1α=2T1−z−11+z−1α=2Tα∑i=0∞giαωi,ω<1.Figure 2
The NNFOPID-based trajectory tracking controller for DDMR.It is mapped inside the unit circle in thez-plane, with region of convergence (ROC) z>1, i.e.,(21)sα=2Tα∑i=0∞giαz−i,z>1.g
α
’
s coefficients are calculated from the following equation:(22)giα=1i!⋅didωi1−ω1+ωαω=0.The integral terms−λ of (9) can be treated as follows:(23)s−λ=1ss1−λ.Applying Tustin transformation of (10) on (23), we get(24)s−λ=T21+z−11−z−1⋅2T1−z−11+z−11−λ=2T−λ1+z−11−z−1⋅∑i=0∞gi1−λz−k,z>1,where g1−λ can be calculated using (22). Now, substituting (21) and (24) into (9) yields the general discrete-type PID controller with a long memory:(25)Cz=KP+KD∑i=0∞giαz−i+KI1+z−11−z−1⋅∑i=0∞gi1−λz−i,where KP=kp,KD=2/Tαkd, and KI=2/T−λki. The upper limit in the of the sum in (25) cannot be considered for practical limitations. So, we calculate the sum up to L; then,(26)Cz=KP+KD∑i=0Lgiαz−k+KI1+z−11−z−1⋅∑i=0Lgi1−λz−i.Multiplying both sides of (26) by 1−z−1 and remembering that Uz=Cz⋅Ez,(27)1−z−1Uz=1−z−1KPEz+1−z−1KDEz∑i=0Lgiαz−k+KI1+z−1⋅Ez∑i=0Lgi1−λz−k.Then, the general difference equation relatingek to Uk looks like(28)Uk=Uk−1+KPek−ek−1+KD∑i=0Lgiαek−i−ek−i−1+KI⋅∑i=0Lgi1−λek−i+ek−i−1.Equation (28) describes the control signal for the discrete-time FOPID controller. Then, the suggested feedback control law of the NNFOPID trajectory tracking controller for the DDMR is given as(29)Vleftk=U1k=Oxk+Oyk+Vleftk−1,Vrightk=U2k=Oθk+Oyk+Vrightk−1,where Vrightk−1 and Vleftk−1 are the delayed signals of the control signals Vrightk and Vleftk. The signals Oxk,Oyk,andOθk correspond to the neural network’s outputs of the hidden layer neurons with the sigmoid signal as an activation function and are described as(30)Oδk=21+e−netδk−1,for δ=x,y,andθ, and netδk is given as(31)netδk=KPδeδk−eδk−1+KDδ∑i=0Lgiαeδk−i−eδk−i−1+KIδ⋅∑i=0Lgi1−λeδk−i+eδk−i−1,for δ=x,y,andθ. Figure 3 portrays the proposed NNFOPID controller for the DDMR used in the block diagram of Figure 2.Figure 3
The proposed structure of the NNFOPID controller for DDMR.The proposed NN structure is a multilayer perceptron (MLP) which consists of three layers. The first layer is the input layer which sums the error input signals and its past values. The second layer is the hidden layer; it consists of three neurons with nonlinear activation function; they are there to implement the three FOPID controllers needed for thex, y, and θ subsystems of the mobile robot. The connection weights for this hidden layer are the coefficients of the FOPID controllers, i.e., KPδ, KIδ, and KDδ, and δ=x,y,andθ. Finally, the third layer is the output layer; it consists of a single neuron with linear activation function; it adds up the three outputs of the hidden layer. The fractional derivatives are translated into a weighted sum of the past and current values of the input error signal eδk for δ=x,y,andθ as indicated by (31). So, the tuning input vector of the NNFOPID controller consists of eδk,eδk−1,eδk−2,…,eδk−L−1, for δ=x,y,andθ. The activation function of the output layer in Figure 3 is linear. Its proposed structure is different from the NN-based FOPID controllers proposed in [48, 49], where in these works, the outputs of the neural networks are the parameters of the FOPID controller themselves, while in the proposed scheme, the structure of the neural network itself has been used as a nonlinear fractional-order PID controller where the coefficients of the fractional-order PID controller themselves are the connection weights of the NN structure, and the output of the neural networks are the control actions used to drive the motors of the DDMR. The NNFOPID neural controller parameters KD, KI, KP,α,andλ are adjusted using the proposed MAPSO-EFFO described next.


## 5.2. Hybridized MAPSO-EFFO-Based Tuning Algorithm

PSO and FFO algorithms are the metaheuristic procedures which have been invented in the last decade and are evolving as common procedures for solving numerical optimization and industrial case studies. They require only function evaluations (and not the integral or derivative values). The next section presents the modified PSO and FFO algorithms, namely, the MAPSO and EFFO and the hybridization between them to produce a hybridized algorithm with fast convergence behavior. This is to overcome the limitations of the individual PSO and FFO algorithms like premature convergence, user dependence on setting parameter values, and exploration ability. In the following section, the individual algorithms used in this work are discussed, and then the hybridization between them is introduced.


### 5.2.1. Modified Adaptive PSO (MAPSO) Algorithm

In this work, improvement is added to increase the speed and efficiency of the algorithm where the optimal solutions are found by spreading a large amount of population size (from 6M to 10M, where M is the standard population size and lies between 20 and 30 particles) in the search space. Then, choosing the best (20–30 particles) from all these populations as initial populations, the best particles are the ones that have the minimum of the following fitness function:(32)MSE=1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2,(33)MSE=0.5∗1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2+0.5∗U12k+U22k,where Q is the maximum number of samples, k is the current sample, xr, yr, and θr are reference values, and U1 and U2 are the control signals. Moreover, the social and cognitive parameters c1andc2 are considered variable through the iterative process, in contrast to being constant in the standard PSO. Figure 4 illustrates this modification. The pseudocode for the calculations of the values of the optimal coefficients of the NNFOPID controller using the MAPSO is listed in Algorithm 1.Figure 4
The proposed modification of MAPSO algorithm. (a) Standard PSO algorithm. (b) MAPSO. (c) After selecting the best pop. of the MAPSO.
(a)
(b)
(c)Algorithm 1: Tuning of the optimal NNFOPID parameters for DDMR using MAPSO.
(1)
Initialize the swarm in the range of about (6M–10M) particles.
(2)
Choose the bestM swarm and randomly assign the initial location and velocities and other related parameters. Randomly assign the position values of PSO particles with zero velocities and initialize the constants imax, wmax, wmin, c1max,c1min, c2max,c2min. Set i = 1 and go to the step (3)
(3)
For
j = 1, 2, …, M
Calculate the fitness function of the particlej, i.e., MSEj using (32) or (33) to each particle j,
set local best cost = currentMSE
Local best position = current position
End
Set global best MSE = min (for all local best MSE)
(4)
w
i
=
w
max
−
w
max
−
w
min
/
i
max
i
,
c
1
i
=
c
1
min
+
c
1
max
−
c
1
min
/
i
max
i, c2i=c2min+c2max−c2min/imaxi
For δ=x,y,θ
For X=KP,KI,KD,α,λ
Forj = 1, 2, …, M
V
X
δ
,
j
i
=
w
i
V
X
δ
,
j
i
−
1
+
c
1
i
⋅
R
1
P
Best
δ
,
j
−
X
δ
,
j
i
−
1
+
c
2
i
⋅
R
2
G
Best
−
X
δ
,
j
i
−
1, Xδ,ji=Xδ,ji−1+VXδ,ji
Calculate the MSE of (32) or (33)
End
End
End
(5)
Seti = i + 1 and go to step 4 until either iteration i reaches imax or convergence is achieved.


### 5.2.2. Enhanced Fruit Fly Optimization (EFFO) Algorithm

The process of finding food by fruit fly can be explained as follows. First, fruit flies smell the food location using the organ osphresis and then fly towards the food source. When fruit flies become in the neighboring of the food source, they use the visual sense to locate the food and the next location for the fruit flies swarm. Finally, it flies towards the food direction. The standard FFO has been explained in detail in the literature [7], and some improvements have been added in this paper to the standard EFFO as follows:(a)
Assign a range of values as an upper and lower limits for the initialization of the decision variables.(b)
A dynamic change of the search radius with some iteration has been proposed for the standard FFO algorithm to improve its performance and exclude the drawbacks of the fixed value searching radius (see Figure5). The modification to the standard FFOA is proposed by adding an inertia weight as follows:(34)wi=wmax−wmini+wmin,where w is the weight of the inertia used to adjust the radius of spread and δ=x,y,andθ. The pseudocode for the calculation of the optimal values of the NNFOPID controller’s coefficients using the EFFO algorithm is listed in Algorithm 2.Figure 5
The proposed enhancement of EFFO algorithm. (a) Initial FFO. (b) Standard FFO. (c) Enhanced FFO (EFFO).
(a)
(b)
(c)Algorithm 2: Tuning of the optimal NNFOPID parameters for DDMR using EFFO.
(1)
Initialization phase.
Assign random initializations with upper and lower limits and initialize other algorithm parameters.
X
_
axis
=
U
+
U
−
ℒ
∗
ℛ
∗
ℛ
Y
_
axis
=
U
+
U
−
L
∗
ℛ
∗
ℛ
whereX_axis is the initial value of the fruit fly position in the x-direction and ℒ and U are the lower and upper limits of X-position, respectively, ℛ ∈ [0, 1] is a random value, Y_axis is the initial value of Y in the y-direction, and ℒ and U are the upper and lower limits of Y, respectively. Define imax, Smell_best=1. Define the number of fruit flies N, wmax,wmin. Set iteration i = 1.
(2)
Osphresis searching process
Every individual searches about food in all directions randomly around the initial locations of the previous step using the osphresis organ to generate the next population.
For δ=x,y,θ
For L=KP,KI,KD,α,λ,
Whilei < imax
Forj = 1, 2, …, N
w
L
δ
,
j
i
=
w
max
−
w
min
/
i
+
w
min
X
L
δ
,
j
i
=
X
_
axis
+
ℛ
∗
w
L
δ
,
j
i
Y
L
δ
,
j
i
=
Y
_
axis
+
ℛ
∗
w
L
δ
,
j
i
(3)
Path construction phase.
Dis
L
δ
,
j
i
=
X
L
δ
,
j
i
2
+
Y
L
δ
,
j
i
2
L
δ
,
j
i
=
1
/
Dis
L
δ
,
j
i
(4)
Fitness calculation phase.
Calculate the fitness function by the following equations, where (32) or (33) are calculated with the updated values of the NNFOPID parameters Lδ,ji, i.e.,
Sme
δ
L
,
j
i
=
MSE
L
δ
,
j
i
End For
best_smell, best_index
=
min
Sme
L
δ
i
whereSmeLδi is the vector of the concentration of smell for the fruit fly swarm, best_smell represents the smallest elements, best_index are its indices along the different dimensions of smell vectors, and min SmeLδi is the minimum concentration of smell in the fly swarm.
(5)
Vision searching process
The fruit flies keep the best value of smell concentration and will use visionary sense to fly in the direction of that location according to the subsequent equations,
If best_smell < Smell_best
Smell_best=best_smell
X_axis=Xbest_index
Y_axis=Ybest_index
End if
i
=
i
+
1
End while
End For
End For


## 5.2.1. Modified Adaptive PSO (MAPSO) Algorithm

In this work, improvement is added to increase the speed and efficiency of the algorithm where the optimal solutions are found by spreading a large amount of population size (from 6M to 10M, where M is the standard population size and lies between 20 and 30 particles) in the search space. Then, choosing the best (20–30 particles) from all these populations as initial populations, the best particles are the ones that have the minimum of the following fitness function:(32)MSE=1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2,(33)MSE=0.5∗1Q∑k=1Qxrk−xk2+yrk−yk2+θrk−θk2+0.5∗U12k+U22k,where Q is the maximum number of samples, k is the current sample, xr, yr, and θr are reference values, and U1 and U2 are the control signals. Moreover, the social and cognitive parameters c1andc2 are considered variable through the iterative process, in contrast to being constant in the standard PSO. Figure 4 illustrates this modification. The pseudocode for the calculations of the values of the optimal coefficients of the NNFOPID controller using the MAPSO is listed in Algorithm 1.Figure 4
The proposed modification of MAPSO algorithm. (a) Standard PSO algorithm. (b) MAPSO. (c) After selecting the best pop. of the MAPSO.
(a)
(b)
(c)Algorithm 1: Tuning of the optimal NNFOPID parameters for DDMR using MAPSO.
(1)
Initialize the swarm in the range of about (6M–10M) particles.
(2)
Choose the bestM swarm and randomly assign the initial location and velocities and other related parameters. Randomly assign the position values of PSO particles with zero velocities and initialize the constants imax, wmax, wmin, c1max,c1min, c2max,c2min. Set i = 1 and go to the step (3)
(3)
For
j = 1, 2, …, M
Calculate the fitness function of the particlej, i.e., MSEj using (32) or (33) to each particle j,
set local best cost = currentMSE
Local best position = current position
End
Set global best MSE = min (for all local best MSE)
(4)
w
i
=
w
max
−
w
max
−
w
min
/
i
max
i
,
c
1
i
=
c
1
min
+
c
1
max
−
c
1
min
/
i
max
i, c2i=c2min+c2max−c2min/imaxi
For δ=x,y,θ
For X=KP,KI,KD,α,λ
Forj = 1, 2, …, M
V
X
δ
,
j
i
=
w
i
V
X
δ
,
j
i
−
1
+
c
1
i
⋅
R
1
P
Best
δ
,
j
−
X
δ
,
j
i
−
1
+
c
2
i
⋅
R
2
G
Best
−
X
δ
,
j
i
−
1, Xδ,ji=Xδ,ji−1+VXδ,ji
Calculate the MSE of (32) or (33)
End
End
End
(5)
Seti = i + 1 and go to step 4 until either iteration i reaches imax or convergence is achieved.


## 5.2.2. Enhanced Fruit Fly Optimization (EFFO) Algorithm

The process of finding food by fruit fly can be explained as follows. First, fruit flies smell the food location using the organ osphresis and then fly towards the food source. When fruit flies become in the neighboring of the food source, they use the visual sense to locate the food and the next location for the fruit flies swarm. Finally, it flies towards the food direction. The standard FFO has been explained in detail in the literature [7], and some improvements have been added in this paper to the standard EFFO as follows:(a)
Assign a range of values as an upper and lower limits for the initialization of the decision variables.(b)
A dynamic change of the search radius with some iteration has been proposed for the standard FFO algorithm to improve its performance and exclude the drawbacks of the fixed value searching radius (see Figure5). The modification to the standard FFOA is proposed by adding an inertia weight as follows:(34)wi=wmax−wmini+wmin,where w is the weight of the inertia used to adjust the radius of spread and δ=x,y,andθ. The pseudocode for the calculation of the optimal values of the NNFOPID controller’s coefficients using the EFFO algorithm is listed in Algorithm 2.Figure 5
The proposed enhancement of EFFO algorithm. (a) Initial FFO. (b) Standard FFO. (c) Enhanced FFO (EFFO).
(a)
(b)
(c)Algorithm 2: Tuning of the optimal NNFOPID parameters for DDMR using EFFO.
(1)
Initialization phase.
Assign random initializations with upper and lower limits and initialize other algorithm parameters.
X
_
axis
=
U
+
U
−
ℒ
∗
ℛ
∗
ℛ
Y
_
axis
=
U
+
U
−
L
∗
ℛ
∗
ℛ
whereX_axis is the initial value of the fruit fly position in the x-direction and ℒ and U are the lower and upper limits of X-position, respectively, ℛ ∈ [0, 1] is a random value, Y_axis is the initial value of Y in the y-direction, and ℒ and U are the upper and lower limits of Y, respectively. Define imax, Smell_best=1. Define the number of fruit flies N, wmax,wmin. Set iteration i = 1.
(2)
Osphresis searching process
Every individual searches about food in all directions randomly around the initial locations of the previous step using the osphresis organ to generate the next population.
For δ=x,y,θ
For L=KP,KI,KD,α,λ,
Whilei < imax
Forj = 1, 2, …, N
w
L
δ
,
j
i
=
w
max
−
w
min
/
i
+
w
min
X
L
δ
,
j
i
=
X
_
axis
+
ℛ
∗
w
L
δ
,
j
i
Y
L
δ
,
j
i
=
Y
_
axis
+
ℛ
∗
w
L
δ
,
j
i
(3)
Path construction phase.
Dis
L
δ
,
j
i
=
X
L
δ
,
j
i
2
+
Y
L
δ
,
j
i
2
L
δ
,
j
i
=
1
/
Dis
L
δ
,
j
i
(4)
Fitness calculation phase.
Calculate the fitness function by the following equations, where (32) or (33) are calculated with the updated values of the NNFOPID parameters Lδ,ji, i.e.,
Sme
δ
L
,
j
i
=
MSE
L
δ
,
j
i
End For
best_smell, best_index
=
min
Sme
L
δ
i
whereSmeLδi is the vector of the concentration of smell for the fruit fly swarm, best_smell represents the smallest elements, best_index are its indices along the different dimensions of smell vectors, and min SmeLδi is the minimum concentration of smell in the fly swarm.
(5)
Vision searching process
The fruit flies keep the best value of smell concentration and will use visionary sense to fly in the direction of that location according to the subsequent equations,
If best_smell < Smell_best
Smell_best=best_smell
X_axis=Xbest_index
Y_axis=Ybest_index
End if
i
=
i
+
1
End while
End For
End For


## 5.3. Hybridized Swarm Optimization Algorithm: The MAPSO-EFFO Algorithm

In this paper, a hybridization between MAPSO and EFFO is proposed. The first phase utilizes MAPSO algorithm, where a particle swarm spreads in different orientations and the global best solution is obtained. The second phase includes the EFFO for updating the preceding best locations of the swarm particles. By taking advantages of the MAPSO and EFFO, the hybridized MAPSO-EFFO algorithm is illustrated in the following pseudocode (Algorithm3).Algorithm 3: Tuning of the optimal NNFOPID parameters for DDMR using MAPSO-EFFO
(1)
Initializeimax
(2)
Start MAPSO algorithm and initialize its parameters (Algorithm1).
(3)
Obtain theGbest position from the MAPSO for each of the NNFOPID controller parameters.
(4)
Start EFFO algorithm and calculate the initial parameter values using
X
_
axis
L
δ
,
j
=
G
best
position
2
/
2
Y
_
axis
L
δ
,
j
=
G
best
position
2
/
2
(5)
Follow the steps of the EFFO algorithm (Algorithm2).
(6)
Seti = i + 1 and go to step 5 until either iteration i reaches imax or convergence is achieved.The advantage of the proposed hybridized MAPSO-EFFO algorithm will overcome the limitations of the individual particle swarm optimization (PSO) and fruit fly optimization (FFO) algorithms like premature convergence, user dependence on setting parameter values, and exploration ability. The salient features of the hybridized MAPSO-EFFO algorithm are the simplicity of its structure and ease of implementation. Knowing that the hybridized MAPSO-EEFO algorithm does not need the derivative of the cost function and since the MAPSO and EFFO algorithms will run sequentially, the proposed hybridized MAPSO-EEFO algorithm can be parallelized, which results in fast convergence behavior. Finally, the proposed hybridized algorithm will not rely on user experience to find the optimum values of some parameters like the inertia weights and social and cognitive coefficients.


## 6. Simulation Results and Discussion

In this section, the simulation results of applying the NNFOPID as a kinematic controller to the DDMR given in (11)–(18) to track a certain trajectory will be presented.


### 6.1. Simulation Considerations

Various examinations have been done with the recommended NNFOPID-based kinematic controller for the DDMR tuned by the proposed hybridized MAPSO-EFFO algorithm. These examinations are built on the parameter values of the Eddie DDMR model [50]: D = 0.452 m, r = 0.076 m, and the sampling time is equal to 0.5 seconds.


### 6.2. Parameter Settings for Hybridized MAPSO-EFFO Algorithm

For simulations, comparisons between the nonlinear neural PID (NNPID) controller and nonlinear neural fractional-order PID (NNFOPID) controller are made considering the MAPSO-EFFO as a tuning algorithm for both controllers. The simulation parameters are the first population size = 150 particles, the second population size = 25 particles,c1min=c2min=0.25, c1max=c2max=0.85, wmin=0.2, wmax=0.9, the maximum generation size = 25 gen for EFFO, wmin=0.1, wmax=0.9, and iteration number = 100 iteration.


### 6.3. Trajectory Tracking Results

#### 6.3.1. Study Case 1 (Circular Trajectory)

(35)
y
d
t
=
sin
t
10
,
θ
d
t
=
π
2
+
t
10
.The DDMR starts from the initial postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The effectiveness of the proposed NNFOPID and NNPID controllers is validated in the case of tracking an orbicular trajectory. The proposed controllers for the DDMR give an excellent trajectory tracking based on hybrid MAPSO-EFFO algorithm as shown in Figure6. The results of the simulations prove the high efficiency of the offered NNFOPID controller based on hybrid MAPSO-EFFO algorithm to yield bounded and smooth left and right wheels’ velocities. When both the proposed NNFOPID and NNPID controllers are tuned using the proposed hybrid MAPSO-EFFO algorithm, the proposed NNFOPID controller presents a superior results by eliminating the overshoots in the wheel's velocities as compared to the NNPID one, this is evident from Figure 7. The plot in Figure 8 illustrates the left and right wheels’ velocities of (control action) of DDMR with orbicular trajectory when 0.5 ∗ MSE + 0.5 ∗ (U12 + U22) performance index is used.Figure 6
The desired and actual orbicular trajectory of DDMR. (a) Trajectory tracking with NNFOPID controller and (b) trajectory tracking with NNPID controller.
(a)
(b)Figure 7
The left and right wheels’ velocity of DDMR for circular trajectory. (a) Wheels’ velocity with NNPID and (b) wheels’ velocity with NNFOPID.
(a)
(b)Figure 8
The left and right wheels’ velocity of DDMR for circular trajectory tracking adopting 0.5∗ MSE + 0.5 ∗ (U12 + U22) index. (a) The left and right wheels with NNFOPID and (b) the left and right wheels with NNPID.
(a)
(b)By comparing Figures7 and 8, the difference between the two fulfillment indices (MSE and 0.5 ∗ MSE + 0.5 ∗ (U12 + U22)) can be found. The mean velocity of the left wheel is 0.07729 and 0.07218 m/sec and the mean velocity of the right wheel is 0.1219 and 0.1165 m/sec for NNFOPID and NNPID, respectively. The maximum right and left wheels’ velocities are 0.1463 m/sec and 0.08375 m/sec and 0.1983 m/sec and 0.1783 m/sec with NNFOPID and NNPID, respectively. Obviously, by adding the control action term in the performance index, it decreases the velocity amplitude for both wheels.Figure9 shows the convergence of the posture path and orientation motion MSEs for the DDMR model (ex,ey,eθ) which in this case are (0.0000732, 0.00017, 0.000349), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) is (0.000226, 0.000371, 0.00019), respectively, for the NNPID controller.Figure 9
The error ofx and y coordinates and orientation θ of DDMR in orbicular trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


#### 6.3.2. Study Case 2 (Lemniscates Trajectory)

The required lemniscates trajectory is drawn using the following equations:(36)xdt=−0.5∗sin2πt30,ydt=0.5∗sin2πt20,θdt=2tan−1ΔydtΔxdt2+Δydtt2+Δxdt.The DDMR moves from the first postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The efficiency of the NNFOPID controller is verified to track a lemniscates trajectory. Compared with the same case study by using an NNPID controller, the DDMR trajectory tracking obtained by the NNFOPID proposed controllers is an excellent tracking based on crossbreed MAPSO-EFFO as shown in Figure10(a). The corresponding results using an NNPID controller are shown in Figure 10(b). The simulation results demonstrate the high success of the offered NNFOPID controllers based on hybrid MAPSO-EFFO algorithm by showing its capability to give bounded and flat velocities for the left and right wheels. Also, it dismisses all the unexpected overshoots as compared to NNPID controller with the same optimization algorithm and the same trajectory (see Figure 11). Figure 12 interprets the convergence of the posture path and orientation MSE for the DDMR model. The motion MSE (ex,ey,eθ) values are (0.000049, 0.00001732, 0.0000283), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) values are (0.000072, 0.000051, 0.00016), respectively using the NNPID controller.Figure 10
Desired and actual lemniscates trajectory of DDMR: (a) with NNFOPID controller and (b) with NNPID controller.
(a)
(b)Figure 11
The left and right wheels’ velocity of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)Figure 12
The error ofx and y coordinates and orientation θ of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


#### 6.3.3. Study Case 3 (Line Trajectory)

The following equations give the required line trajectory:(37)xdt=t∗0.1,ydt=t∗0.1,θdt=π4.The DDMR starts from the initial postureP (0) = [0, −0.2, π/2].The actual initial posture of the DDMR isPd (0) = [0, 0, π/4].A graphical comparison between the the proposed NNFOPID controller with the NNPID one is depicted in Figure13 for the line trajectory; evidently, the proposed NNFOPID controller shows excellent performance in tracking the desired trajectory compared to the NNPID controller. Figure 14 illustrates the convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms for the line trajectory. As can be seen, the MAPSO-EFFO outperforms the two other remaining algorithms in terms of time and MSE. This is also evident from Tables 2–4, where they summarize the hybridized MAPSO-EFFO, MAPSO, and EFFO algorithms, respectively, used to obtain the optimum controller's parameters after 100 iterations. These tables show the MSE performance index for the NNPID controller which is higher than its corresponding index adopted by the NNFOPID controller in the three simulation case studies. Table 5 shows the MSE of the error of x and y coordinates and error of θ orientation for the NNPID and NNFOPID controllers. Table 6 tabulates the parameters of the NNFOPID controller for three case studies with the hybridized MAPSO-EFFO tuning algorithm.Figure 13
Desired and actual trajectories for the line trajectory.Figure 14
Convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms.Table 2
The MSE for NNPID and NNFOPID controllers with MAPSO-EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00079
0.0012
0.00028
NNFOPID
0.000059
0.00073
0.00009Table 3
MSE for NNPID and NNFOPID controllers with MAPSO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00094
0.00134
0.00031
NNFOPID
0.00082
0.00082
0.00016Table 4
The MSE for NNPID and NNFOPID controllers with EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.0008
0.0013
0.0003
NNFOPID
0.00071
0.0008
0.00012Table 5
The MSE of the position and orientation using MAPSO-EFFO algorithm.
Controller type
Case studies
Case 1
Case 2
Case 3
NNPID
x
0.000226
0.000237
0.000072
y
0.000372
0.00234
0.000051
θ
0.000193
0.000563
0.00016
NNFOPID
x
0.0000598
0.000232
0.0000543
y
0.000182
0.0000357
0.00002283
θ
0.000474
0.00053
0.0000433Table 6
The control parameters of NNFOPID controller by MAPSOA-EFFO.
Control parameter
Case1
Case2
Case3
K
Px
0.7213
0.2770
0.7706
K
Ix
1.1883
1.4497
8.6215
K
Dx
1.2108
0.5298
3.81077
λ
x
0.8284
0.8389
1.1176
α
x
1.0864
0.6049
0.0623
K
Py
0.1204
−0.2191
−1.1972
K
Iy
−1.581
−3.6139
0.5654
K
Dy
0.5246
−1.3169
−2.7585
λ
y
1.3507
0.3169
0.7094
α
y
1.3507
0.8025
0.0009
K
Pθ
0.6078
1.07
−3.776
K
Iθ
1.1686
1.0355
−5.8303
K
Dθ
0.3714
0.4932
−1.8916
λ
θ
0.644
0.8384
1.3287
α
θ
1.176
0.6879
0.1969


### 6.4. Discussion

The simulations results and a comparison analysis between the NNPID and NNFOPID showed that the NNFOPID is a perfect trajectory tracking kinematic controller because of its flexibility and capability that stem from the fractional power of the derivative and integral actions. The following are the advantages of the NNFOPID controller over the kinematic NNPID one:(i)
The ability to reduce the tracking MSEs for the DDMR model after 100 iterations (MSE is 0.000059 for the circular path, is 0.00073 for line path, and is 0.00009 for lemniscate path) to follow a desired continuous track.(ii)
Competence of breeding soft and perfect proper velocity control actions without sharp upswings (the linear velocity is 0.1 m/s, and the angular velocity is 0.1 rad/s for orbicular path). The linear velocity is 0.18 m/s, and the angular velocity is 0 rad/s for line path with a linear velocity of 0.04 m/s, and the angular velocity is ±0.3 rad/s for lemniscates path.(iii)
The results of the three case studies’ simulation elucidate the ability of all searching methods (MAPSO, EFFO and mixture MAPSO-EFFO) to get the best parameters for the NNPID and NNFOPID kinematic controllers in spite of all the difficult challenges to control the DDMR by three controllers in the same time (one controller for each ofx, y, and θ).(iv)
The hybrid MAPSO-EFFO presents higher accuracy to give a minimum MSE, so it better tunes the control parameters of the NNPID and the NNFOPID controllers than other algorithms as noticed by the simulation results (see Tables2–4). The reasons behind this improvement lie in two main points: firstly, instead of initializing the controllers’ parameters within a space of particles of size 150, the MAPSO algorithm starts from a refined particles’ space of size M which represents the best M particles of the original space. The second reason is that in the EFFO algorithm, two significant modifications have been added to the algorithm to speed up the convergence. The first modification is the inertia weight; the main advantage of the inertia weight is to accelerate the convergence rate of the fruit flies. The second modification is the initialization of the EFFO algorithm which starts from the best of the M best particles that the MAPSO has found and considers as the initial positions for the fruit flies.(v)
0.5∗ MSE + 0.5 ∗ (U12 + U22) yields a less control energy for the DDMR by eliminating the upswings and overshoots of the velocity for the left and right wheels of the DDMR and limiting the values of these control signals. This resulted in a significant advantage in reducing the energy necessary to drive the mobile robot to the required position. In addition, it avoids actuator saturation that protects the drives of the mobile robot from damage.


## 6.1. Simulation Considerations

Various examinations have been done with the recommended NNFOPID-based kinematic controller for the DDMR tuned by the proposed hybridized MAPSO-EFFO algorithm. These examinations are built on the parameter values of the Eddie DDMR model [50]: D = 0.452 m, r = 0.076 m, and the sampling time is equal to 0.5 seconds.


## 6.2. Parameter Settings for Hybridized MAPSO-EFFO Algorithm

For simulations, comparisons between the nonlinear neural PID (NNPID) controller and nonlinear neural fractional-order PID (NNFOPID) controller are made considering the MAPSO-EFFO as a tuning algorithm for both controllers. The simulation parameters are the first population size = 150 particles, the second population size = 25 particles,c1min=c2min=0.25, c1max=c2max=0.85, wmin=0.2, wmax=0.9, the maximum generation size = 25 gen for EFFO, wmin=0.1, wmax=0.9, and iteration number = 100 iteration.


## 6.3. Trajectory Tracking Results

### 6.3.1. Study Case 1 (Circular Trajectory)

(35)
y
d
t
=
sin
t
10
,
θ
d
t
=
π
2
+
t
10
.The DDMR starts from the initial postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The effectiveness of the proposed NNFOPID and NNPID controllers is validated in the case of tracking an orbicular trajectory. The proposed controllers for the DDMR give an excellent trajectory tracking based on hybrid MAPSO-EFFO algorithm as shown in Figure6. The results of the simulations prove the high efficiency of the offered NNFOPID controller based on hybrid MAPSO-EFFO algorithm to yield bounded and smooth left and right wheels’ velocities. When both the proposed NNFOPID and NNPID controllers are tuned using the proposed hybrid MAPSO-EFFO algorithm, the proposed NNFOPID controller presents a superior results by eliminating the overshoots in the wheel's velocities as compared to the NNPID one, this is evident from Figure 7. The plot in Figure 8 illustrates the left and right wheels’ velocities of (control action) of DDMR with orbicular trajectory when 0.5 ∗ MSE + 0.5 ∗ (U12 + U22) performance index is used.Figure 6
The desired and actual orbicular trajectory of DDMR. (a) Trajectory tracking with NNFOPID controller and (b) trajectory tracking with NNPID controller.
(a)
(b)Figure 7
The left and right wheels’ velocity of DDMR for circular trajectory. (a) Wheels’ velocity with NNPID and (b) wheels’ velocity with NNFOPID.
(a)
(b)Figure 8
The left and right wheels’ velocity of DDMR for circular trajectory tracking adopting 0.5∗ MSE + 0.5 ∗ (U12 + U22) index. (a) The left and right wheels with NNFOPID and (b) the left and right wheels with NNPID.
(a)
(b)By comparing Figures7 and 8, the difference between the two fulfillment indices (MSE and 0.5 ∗ MSE + 0.5 ∗ (U12 + U22)) can be found. The mean velocity of the left wheel is 0.07729 and 0.07218 m/sec and the mean velocity of the right wheel is 0.1219 and 0.1165 m/sec for NNFOPID and NNPID, respectively. The maximum right and left wheels’ velocities are 0.1463 m/sec and 0.08375 m/sec and 0.1983 m/sec and 0.1783 m/sec with NNFOPID and NNPID, respectively. Obviously, by adding the control action term in the performance index, it decreases the velocity amplitude for both wheels.Figure9 shows the convergence of the posture path and orientation motion MSEs for the DDMR model (ex,ey,eθ) which in this case are (0.0000732, 0.00017, 0.000349), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) is (0.000226, 0.000371, 0.00019), respectively, for the NNPID controller.Figure 9
The error ofx and y coordinates and orientation θ of DDMR in orbicular trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


### 6.3.2. Study Case 2 (Lemniscates Trajectory)

The required lemniscates trajectory is drawn using the following equations:(36)xdt=−0.5∗sin2πt30,ydt=0.5∗sin2πt20,θdt=2tan−1ΔydtΔxdt2+Δydtt2+Δxdt.The DDMR moves from the first postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The efficiency of the NNFOPID controller is verified to track a lemniscates trajectory. Compared with the same case study by using an NNPID controller, the DDMR trajectory tracking obtained by the NNFOPID proposed controllers is an excellent tracking based on crossbreed MAPSO-EFFO as shown in Figure10(a). The corresponding results using an NNPID controller are shown in Figure 10(b). The simulation results demonstrate the high success of the offered NNFOPID controllers based on hybrid MAPSO-EFFO algorithm by showing its capability to give bounded and flat velocities for the left and right wheels. Also, it dismisses all the unexpected overshoots as compared to NNPID controller with the same optimization algorithm and the same trajectory (see Figure 11). Figure 12 interprets the convergence of the posture path and orientation MSE for the DDMR model. The motion MSE (ex,ey,eθ) values are (0.000049, 0.00001732, 0.0000283), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) values are (0.000072, 0.000051, 0.00016), respectively using the NNPID controller.Figure 10
Desired and actual lemniscates trajectory of DDMR: (a) with NNFOPID controller and (b) with NNPID controller.
(a)
(b)Figure 11
The left and right wheels’ velocity of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)Figure 12
The error ofx and y coordinates and orientation θ of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


### 6.3.3. Study Case 3 (Line Trajectory)

The following equations give the required line trajectory:(37)xdt=t∗0.1,ydt=t∗0.1,θdt=π4.The DDMR starts from the initial postureP (0) = [0, −0.2, π/2].The actual initial posture of the DDMR isPd (0) = [0, 0, π/4].A graphical comparison between the the proposed NNFOPID controller with the NNPID one is depicted in Figure13 for the line trajectory; evidently, the proposed NNFOPID controller shows excellent performance in tracking the desired trajectory compared to the NNPID controller. Figure 14 illustrates the convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms for the line trajectory. As can be seen, the MAPSO-EFFO outperforms the two other remaining algorithms in terms of time and MSE. This is also evident from Tables 2–4, where they summarize the hybridized MAPSO-EFFO, MAPSO, and EFFO algorithms, respectively, used to obtain the optimum controller's parameters after 100 iterations. These tables show the MSE performance index for the NNPID controller which is higher than its corresponding index adopted by the NNFOPID controller in the three simulation case studies. Table 5 shows the MSE of the error of x and y coordinates and error of θ orientation for the NNPID and NNFOPID controllers. Table 6 tabulates the parameters of the NNFOPID controller for three case studies with the hybridized MAPSO-EFFO tuning algorithm.Figure 13
Desired and actual trajectories for the line trajectory.Figure 14
Convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms.Table 2
The MSE for NNPID and NNFOPID controllers with MAPSO-EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00079
0.0012
0.00028
NNFOPID
0.000059
0.00073
0.00009Table 3
MSE for NNPID and NNFOPID controllers with MAPSO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00094
0.00134
0.00031
NNFOPID
0.00082
0.00082
0.00016Table 4
The MSE for NNPID and NNFOPID controllers with EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.0008
0.0013
0.0003
NNFOPID
0.00071
0.0008
0.00012Table 5
The MSE of the position and orientation using MAPSO-EFFO algorithm.
Controller type
Case studies
Case 1
Case 2
Case 3
NNPID
x
0.000226
0.000237
0.000072
y
0.000372
0.00234
0.000051
θ
0.000193
0.000563
0.00016
NNFOPID
x
0.0000598
0.000232
0.0000543
y
0.000182
0.0000357
0.00002283
θ
0.000474
0.00053
0.0000433Table 6
The control parameters of NNFOPID controller by MAPSOA-EFFO.
Control parameter
Case1
Case2
Case3
K
Px
0.7213
0.2770
0.7706
K
Ix
1.1883
1.4497
8.6215
K
Dx
1.2108
0.5298
3.81077
λ
x
0.8284
0.8389
1.1176
α
x
1.0864
0.6049
0.0623
K
Py
0.1204
−0.2191
−1.1972
K
Iy
−1.581
−3.6139
0.5654
K
Dy
0.5246
−1.3169
−2.7585
λ
y
1.3507
0.3169
0.7094
α
y
1.3507
0.8025
0.0009
K
Pθ
0.6078
1.07
−3.776
K
Iθ
1.1686
1.0355
−5.8303
K
Dθ
0.3714
0.4932
−1.8916
λ
θ
0.644
0.8384
1.3287
α
θ
1.176
0.6879
0.1969


## 6.3.1. Study Case 1 (Circular Trajectory)

(35)
y
d
t
=
sin
t
10
,
θ
d
t
=
π
2
+
t
10
.The DDMR starts from the initial postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The effectiveness of the proposed NNFOPID and NNPID controllers is validated in the case of tracking an orbicular trajectory. The proposed controllers for the DDMR give an excellent trajectory tracking based on hybrid MAPSO-EFFO algorithm as shown in Figure6. The results of the simulations prove the high efficiency of the offered NNFOPID controller based on hybrid MAPSO-EFFO algorithm to yield bounded and smooth left and right wheels’ velocities. When both the proposed NNFOPID and NNPID controllers are tuned using the proposed hybrid MAPSO-EFFO algorithm, the proposed NNFOPID controller presents a superior results by eliminating the overshoots in the wheel's velocities as compared to the NNPID one, this is evident from Figure 7. The plot in Figure 8 illustrates the left and right wheels’ velocities of (control action) of DDMR with orbicular trajectory when 0.5 ∗ MSE + 0.5 ∗ (U12 + U22) performance index is used.Figure 6
The desired and actual orbicular trajectory of DDMR. (a) Trajectory tracking with NNFOPID controller and (b) trajectory tracking with NNPID controller.
(a)
(b)Figure 7
The left and right wheels’ velocity of DDMR for circular trajectory. (a) Wheels’ velocity with NNPID and (b) wheels’ velocity with NNFOPID.
(a)
(b)Figure 8
The left and right wheels’ velocity of DDMR for circular trajectory tracking adopting 0.5∗ MSE + 0.5 ∗ (U12 + U22) index. (a) The left and right wheels with NNFOPID and (b) the left and right wheels with NNPID.
(a)
(b)By comparing Figures7 and 8, the difference between the two fulfillment indices (MSE and 0.5 ∗ MSE + 0.5 ∗ (U12 + U22)) can be found. The mean velocity of the left wheel is 0.07729 and 0.07218 m/sec and the mean velocity of the right wheel is 0.1219 and 0.1165 m/sec for NNFOPID and NNPID, respectively. The maximum right and left wheels’ velocities are 0.1463 m/sec and 0.08375 m/sec and 0.1983 m/sec and 0.1783 m/sec with NNFOPID and NNPID, respectively. Obviously, by adding the control action term in the performance index, it decreases the velocity amplitude for both wheels.Figure9 shows the convergence of the posture path and orientation motion MSEs for the DDMR model (ex,ey,eθ) which in this case are (0.0000732, 0.00017, 0.000349), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) is (0.000226, 0.000371, 0.00019), respectively, for the NNPID controller.Figure 9
The error ofx and y coordinates and orientation θ of DDMR in orbicular trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


## 6.3.2. Study Case 2 (Lemniscates Trajectory)

The required lemniscates trajectory is drawn using the following equations:(36)xdt=−0.5∗sin2πt30,ydt=0.5∗sin2πt20,θdt=2tan−1ΔydtΔxdt2+Δydtt2+Δxdt.The DDMR moves from the first postureP (0) = [2.1, −0.1, π/2].The actual initial posture of the DDMR isPd (0) = [2, 0, π/2].The efficiency of the NNFOPID controller is verified to track a lemniscates trajectory. Compared with the same case study by using an NNPID controller, the DDMR trajectory tracking obtained by the NNFOPID proposed controllers is an excellent tracking based on crossbreed MAPSO-EFFO as shown in Figure10(a). The corresponding results using an NNPID controller are shown in Figure 10(b). The simulation results demonstrate the high success of the offered NNFOPID controllers based on hybrid MAPSO-EFFO algorithm by showing its capability to give bounded and flat velocities for the left and right wheels. Also, it dismisses all the unexpected overshoots as compared to NNPID controller with the same optimization algorithm and the same trajectory (see Figure 11). Figure 12 interprets the convergence of the posture path and orientation MSE for the DDMR model. The motion MSE (ex,ey,eθ) values are (0.000049, 0.00001732, 0.0000283), respectively, for the NNFOPID controller, while the MSE (ex,ey,eθ) values are (0.000072, 0.000051, 0.00016), respectively using the NNPID controller.Figure 10
Desired and actual lemniscates trajectory of DDMR: (a) with NNFOPID controller and (b) with NNPID controller.
(a)
(b)Figure 11
The left and right wheels’ velocity of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)Figure 12
The error ofx and y coordinates and orientation θ of DDMR for lemniscates trajectory with (a) NNFOPID controller and (b) NNPID controller.
(a)
(b)


## 6.3.3. Study Case 3 (Line Trajectory)

The following equations give the required line trajectory:(37)xdt=t∗0.1,ydt=t∗0.1,θdt=π4.The DDMR starts from the initial postureP (0) = [0, −0.2, π/2].The actual initial posture of the DDMR isPd (0) = [0, 0, π/4].A graphical comparison between the the proposed NNFOPID controller with the NNPID one is depicted in Figure13 for the line trajectory; evidently, the proposed NNFOPID controller shows excellent performance in tracking the desired trajectory compared to the NNPID controller. Figure 14 illustrates the convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms for the line trajectory. As can be seen, the MAPSO-EFFO outperforms the two other remaining algorithms in terms of time and MSE. This is also evident from Tables 2–4, where they summarize the hybridized MAPSO-EFFO, MAPSO, and EFFO algorithms, respectively, used to obtain the optimum controller's parameters after 100 iterations. These tables show the MSE performance index for the NNPID controller which is higher than its corresponding index adopted by the NNFOPID controller in the three simulation case studies. Table 5 shows the MSE of the error of x and y coordinates and error of θ orientation for the NNPID and NNFOPID controllers. Table 6 tabulates the parameters of the NNFOPID controller for three case studies with the hybridized MAPSO-EFFO tuning algorithm.Figure 13
Desired and actual trajectories for the line trajectory.Figure 14
Convergence curve of the MAPSO, EFFO, and MAPSO-EFFO algorithms.Table 2
The MSE for NNPID and NNFOPID controllers with MAPSO-EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00079
0.0012
0.00028
NNFOPID
0.000059
0.00073
0.00009Table 3
MSE for NNPID and NNFOPID controllers with MAPSO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.00094
0.00134
0.00031
NNFOPID
0.00082
0.00082
0.00016Table 4
The MSE for NNPID and NNFOPID controllers with EFFO.
Controller type
MSE
Case 1
Case 2
Case 3
NNPID
0.0008
0.0013
0.0003
NNFOPID
0.00071
0.0008
0.00012Table 5
The MSE of the position and orientation using MAPSO-EFFO algorithm.
Controller type
Case studies
Case 1
Case 2
Case 3
NNPID
x
0.000226
0.000237
0.000072
y
0.000372
0.00234
0.000051
θ
0.000193
0.000563
0.00016
NNFOPID
x
0.0000598
0.000232
0.0000543
y
0.000182
0.0000357
0.00002283
θ
0.000474
0.00053
0.0000433Table 6
The control parameters of NNFOPID controller by MAPSOA-EFFO.
Control parameter
Case1
Case2
Case3
K
Px
0.7213
0.2770
0.7706
K
Ix
1.1883
1.4497
8.6215
K
Dx
1.2108
0.5298
3.81077
λ
x
0.8284
0.8389
1.1176
α
x
1.0864
0.6049
0.0623
K
Py
0.1204
−0.2191
−1.1972
K
Iy
−1.581
−3.6139
0.5654
K
Dy
0.5246
−1.3169
−2.7585
λ
y
1.3507
0.3169
0.7094
α
y
1.3507
0.8025
0.0009
K
Pθ
0.6078
1.07
−3.776
K
Iθ
1.1686
1.0355
−5.8303
K
Dθ
0.3714
0.4932
−1.8916
λ
θ
0.644
0.8384
1.3287
α
θ
1.176
0.6879
0.1969


## 6.4. Discussion

The simulations results and a comparison analysis between the NNPID and NNFOPID showed that the NNFOPID is a perfect trajectory tracking kinematic controller because of its flexibility and capability that stem from the fractional power of the derivative and integral actions. The following are the advantages of the NNFOPID controller over the kinematic NNPID one:(i)
The ability to reduce the tracking MSEs for the DDMR model after 100 iterations (MSE is 0.000059 for the circular path, is 0.00073 for line path, and is 0.00009 for lemniscate path) to follow a desired continuous track.(ii)
Competence of breeding soft and perfect proper velocity control actions without sharp upswings (the linear velocity is 0.1 m/s, and the angular velocity is 0.1 rad/s for orbicular path). The linear velocity is 0.18 m/s, and the angular velocity is 0 rad/s for line path with a linear velocity of 0.04 m/s, and the angular velocity is ±0.3 rad/s for lemniscates path.(iii)
The results of the three case studies’ simulation elucidate the ability of all searching methods (MAPSO, EFFO and mixture MAPSO-EFFO) to get the best parameters for the NNPID and NNFOPID kinematic controllers in spite of all the difficult challenges to control the DDMR by three controllers in the same time (one controller for each ofx, y, and θ).(iv)
The hybrid MAPSO-EFFO presents higher accuracy to give a minimum MSE, so it better tunes the control parameters of the NNPID and the NNFOPID controllers than other algorithms as noticed by the simulation results (see Tables2–4). The reasons behind this improvement lie in two main points: firstly, instead of initializing the controllers’ parameters within a space of particles of size 150, the MAPSO algorithm starts from a refined particles’ space of size M which represents the best M particles of the original space. The second reason is that in the EFFO algorithm, two significant modifications have been added to the algorithm to speed up the convergence. The first modification is the inertia weight; the main advantage of the inertia weight is to accelerate the convergence rate of the fruit flies. The second modification is the initialization of the EFFO algorithm which starts from the best of the M best particles that the MAPSO has found and considers as the initial positions for the fruit flies.(v)
0.5∗ MSE + 0.5 ∗ (U12 + U22) yields a less control energy for the DDMR by eliminating the upswings and overshoots of the velocity for the left and right wheels of the DDMR and limiting the values of these control signals. This resulted in a significant advantage in reducing the energy necessary to drive the mobile robot to the required position. In addition, it avoids actuator saturation that protects the drives of the mobile robot from damage.


## 7. Conclusions

This paper presented a novel nonlinear fractional control structure based on neural networks. Two tuning optimization algorithms are also introduced in the work, namely, MAPSO and EFFO. Furthermore, a hybridization between MAPSO and EFFO algorithms has been proposed to produce a new algorithm, namely, MAPSO-EFFO algorithm. It is employed to optimize controllers’ coefficients of the two proposed neural network-based nonlinear PID controllers. i.e., NNPID and NNFOPID controllers. A comprehensive demonstration and assessment between these two controllers through simulations on DDMR with different trajectories as study cases showed the effectiveness and robustness of the suggested NNFOPID controller tuned by MAPSO-EFFO algorithm, which has excellent trajectory tracking, and it has the ability to generate soft and satisfactory linear and angular velocities. It has excellent performance over the NNPID controller. Moreover, the hybridized MAPSO-EFFO results in convergence behavior and enhances the performance of the individual algorithms. It has better performance than the individual MAPSO and EFFO algorithms in tuning the parameters of the NNPID and NNFOPID controllers and avoids the premature convergence of the original MAPSO and EFFO algorithms.



---

*Source: 3067024-2020-04-29.xml*