Fuzzy-PI Controller Tuned with HBBO for 2 DOF Robot Trajectory Control "2279

The main aim of our study is to control a 2 DOF robot manipulator with Fuzzy-PI and adjust its parameters with human behavior-based optimization. The fuzzy system that we have introduced is based on Takagi–Sugeno-type: it adequately handles uncertainties, ambiguities and it is able to tune the PID parameters in non-linearity situations. The HBBO was dedicated to find the best scaling factor of fuzzy logic as well as the PI’s parameter. The results of our study show the effectiveness of the proposed algorithm to optimize the controller’s parameter; therefore, the dynamics of robot follows perfectly a desired trajectories.


Introduction
The PID controller has gathered a lot of concern regarding its application in several industrial fields; nevertheless, it is difficult to design its parameters for a complex nonlinear system. Therefore, several techniques have been introduced such as Fuzzy logic and meta-heuristic optimization schema to fix this problem [1][2][3][4][5][6].
Among all methods that can address the abovementioned problem, there exists socalled fuzzy logic. Fuzzy logic was introduced by Lotfi Zeddah in 1965. It uses a set of mathematical principles expressed by a linguistic variable (spoken or non-numeric) rather than crisp membership of classical logic (0-1) [7], hence it can operate in an environment where the information is not well known. FLC has gained a lot of interest in recent years and has many applications in several industrial fields because of its simplicity and capability to reflect system uncertainties, as well as non-linearity situations. However, despite its success in many applications, it was a target of criticism for its mathematical rigor, requiring knowledge of expert and systematic design [8].
Other effective methods that can solve the aforementioned issue is meta-heuristic optimization schema. Meta-heuristic is an approach that seeks the minimum value for a minimization problem or maximum value for a maximization problem in a stochastic way. Many techniques have been introduced in this field in order to improve solutions and find the best optimum value and, regarding their behaviors, these methods might be divided into four principle groups, which are evolutionary algorithms (Genetic algorithm), physics-based methods (Gravitational Local Search), swarm-based technique (particle swam optimization) and population-based meta-heuristic optimization (teaching-learningbased optimization) [9].
Human behavior-based optimization HBBO is a relatively new meta-heuristic algorithm, which belongs to the fourth category and may be used to find the best optimum value in a wide range of search space. HBBO is able to solve several types of meta-heuristic 2 of 8 problems such as unimodel function and bypassing local minima; furthermore, it provides height accuracy and fast convergence.
In order to extract the best parameters from the Fuzzy and PID controllers, the control objective can be formulated as an optimization problem. Optimization problems can be solved using meta-heuristic optimization methods or other methods such as neural networks. In [10], particle swarm optimization-based fuzzy neural networks (FNN) were successfully employed in real life situations, especially for the navigation of a mobile robot and the motion control of a redundant manipulator. They proposed PSO to train FNNs, which can accurately output the crisp control signals for robot systems. The authors of [11] introduced a Takagi-Sugeno (TS)-type neuro-fuzzy system (NFS) trained by PSO, which provides a proper position, velocity and control strategy for the robot manipulators. In [12] Fuzzy-PI was used to control a 2 DOF robot manipulator and the parameters of this were later tuned with GWO. In [13], they test the performances of GWO, WOA and TLBO to tune the parameters of Fuzzy-PI controller to force a 2 DOF robot manipulator to follow a given trajectory. In [6], they used PSO to adjust the parameters of FLC and PID to force the dynamics of the manipulator robot to follow a given trajectory. The authors of [14] proposed ALO and ACO to control the trajectory of a mobile robot with HMI interface. In [15] they investigate the performance of HHO and WOA to the trajectory of a mobile robot with HMI interface.
Motivated by the above discussion, our study aims to control a 2 DOF robot manipulation with Fuzzy-PI in the presence of fractional force and to use HBBO in order to find the optimal parameters of this, later.

Dynamic Model of the Planar Robot
Robot dynamic analysis studies a relationship between torques/forces carried out by actuators on the position, speed and acceleration of the robot manipulator. The dynamic equations of the robot are mainly expressed by: where D(q) is the inertia matrix, C q, . q is the Coriolis/centripetal matrix, G(q) is the gravity vector and τ is the torque. The variable q is a vector of the angles for the robot manipulator. The dynamics of the robot with 2 degrees of freedom can be calculated by: where m i is the mass of the link, l i is the length of the link, g is the gravity and θ, θ, respectively, are the positions, speeds and accelerations of the robot.

Human Behavior-Based Optimization HBBO
HBBO is a new meta-heuristic optimization proposed by Seyed-Alireza Ahmadi. In spite of the biological, animal and societal inspiration, this newly developed optimization algorithm describes the behavior mechanism of humans in the way of getting success. Humans in society seek to obtain success based on their different personal purposes. A successful person is evaluated based on the achievement of their purposes. Since humans do not share the same objectives and viewpoints, every individual looks for success in different fields and opts to achieve it in a different manner; therefore, they are studying and working in different fields. After finding their own objectives and targets, people move toward experts in order to learn and enhance their ability. Furthermore, each person may have other passions, such as music, painting, etc., regardless of their own professional field. Due to life's conditions, every person may experience many undesired problems in their professional life or meet some people who can change their mind; hence, an individual's conviction and viewpoints may not remain the same throughout their entire life. Just for the sake of achieving a better position and improving their self, every individual in some societies may change their field by consulting advisors.
In order to model this aforementioned mechanism, HBBO uses five main phases which are Initialization, Education, Consultation, Field Changing probability and Finalization [16].

Initialization
As with all metaheuristic optimization algorithms, HBBO starts with initialization. In this step, HBBO engages and evaluates the initial people and divides them through different fields as depicted in Figure 1, in an optimization problem with Nvar variables, where people is expressed by: The algorithm employs N pop of initial people and aleatory divides them through N f ield of initial fields. The number of initial people in every domain is computed by: where N.Indi is the number of initial people in i-th field. After the initialization, the fitness values of each people can be evaluated by [16]: Eng. Proc. 2022, 14, 10 3 of 8 Furthermore, each person may have other passions, such as music, painting, etc., regardless of their own professional field. Due to life's conditions, every person may experience many undesired problems in their professional life or meet some people who can change their mind; hence, an individual's conviction and viewpoints may not remain the same throughout their entire life. Just for the sake of achieving a better position and improving their self, every individual in some societies may change their field by consulting advisors.
In order to model this aforementioned mechanism, HBBO uses five main phases which are Initialization, Education, Consultation, Field Changing probability and Finalization [16].

Initialization
As with all metaheuristic optimization algorithms, HBBO starts with initialization. In this step, HBBO engages and evaluates the initial people and divides them through different fields as depicted in Figure 1, in an optimization problem with variables, where people is expressed by: The algorithm employs of initial people and aleatory divides them through of initial fields. The number of initial people in every domain is computed by: where . is the number of initial people in i-th field. After the initialization, the fitness values of each people can be evaluated by [16]:

Education
This process describes the fact that individuals move toward the person with the lowest fitness value (if it is a minimization problem) or highest score (if it is a maximization problem) of their professional domain (field). For the sake of investigating this step, a coordinate system is implemented where the best person (expert) is the origin. The convergence of people toward the best person is highlighted in Figure 2, and the positions

Education
This process describes the fact that individuals move toward the person with the lowest fitness value (if it is a minimization problem) or highest score (if it is a maximization problem) of their professional domain (field). For the sake of investigating this step, a coordinate system is implemented where the best person (expert) is the origin. The convergence of people toward the best person is highlighted in Figure 2, and the positions Eng. Proc. 2022, 14, 10 4 of 8 will be updated according to the spherical coordinates system. The position of every individual is restricted by a sphere around the best person of their field. will be updated according to the spherical coordinates system. The position of every individual is restricted by a sphere around the best person of their field.
In meta-heuristic schema with more than three decision variables, by performing the coordinates of a spherical system with more than three dimensions of Euclidean space [17], the proposed technique will determine a random radial coordinate (r) between rmin = k1d and rmax = k2d, where d is the Euclidian distance between the expert and people, and ki is a constant that will be set by a designer. Furthermore, the proposed meta-heuristic will determine N − 1 random angular coordinates (θ1, θ2... θN−1), where θN−1 will be determined between 0 and 2π radians and the other angles will be found between 0 and π radians [16].

Consultation
As we have already mentioned, each person can randomly find within society an adviser who can change their way of perceiving things. This consultation can be effective if the fitness score in a minimization problem is a smallest score or in a maximization problem is a bigger score; therefore, an advisor will change some of the individual variables in a way that is shown in Figure 3-otherwise, nothing will be changed, meaning the consultation was not effective. The number of random decisions variables which will be replaced is found by: where is the consultation constant that will select the number of random variables, , which might be replaced in this step [16].

Field Changging Probability
According to the above discussion, an individual in a field may change their field. This step is devoted to calculating the changing probability of each field by using the rank probability. In order to compute this probability, we first sort each field based on the fitness score of its best person through this method: In meta-heuristic schema with more than three decision variables, by performing the coordinates of a spherical system with more than three dimensions of Euclidean space [17], the proposed technique will determine a random radial coordinate (r) between r min = k 1 d and r max = k 2 d, where d is the Euclidian distance between the expert and people, and ki is a constant that will be set by a designer. Furthermore, the proposed meta-heuristic will determine N − 1 random angular coordinates (θ 1 , θ 2 ... θ N−1 ), where θ N−1 will be determined between 0 and 2π radians and the other angles will be found between 0 and π radians [16].

Consultation
As we have already mentioned, each person can randomly find within society an adviser who can change their way of perceiving things. This consultation can be effective if the fitness score in a minimization problem is a smallest score or in a maximization problem is a bigger score; therefore, an advisor will change some of the individual variables in a way that is shown in Figure 3-otherwise, nothing will be changed, meaning the consultation was not effective. The number of random decisions variables which will be replaced is found by: where σ is the consultation constant that will select the number of random variables, N c , which might be replaced in this step [16].
Eng. Proc. 2022, 14, 10 4 of 8 will be updated according to the spherical coordinates system. The position of every individual is restricted by a sphere around the best person of their field. In meta-heuristic schema with more than three decision variables, by performing the coordinates of a spherical system with more than three dimensions of Euclidean space [17], the proposed technique will determine a random radial coordinate (r) between rmin = k1d and rmax = k2d, where d is the Euclidian distance between the expert and people, and ki is a constant that will be set by a designer. Furthermore, the proposed meta-heuristic will determine N − 1 random angular coordinates (θ1, θ2... θN−1), where θN−1 will be determined between 0 and 2π radians and the other angles will be found between 0 and π radians [16].

Consultation
As we have already mentioned, each person can randomly find within society an adviser who can change their way of perceiving things. This consultation can be effective if the fitness score in a minimization problem is a smallest score or in a maximization problem is a bigger score; therefore, an advisor will change some of the individual variables in a way that is shown in Figure 3-otherwise, nothing will be changed, meaning the consultation was not effective. The number of random decisions variables which will be replaced is found by: where is the consultation constant that will select the number of random variables, , which might be replaced in this step [16].

Field Changging Probability
According to the above discussion, an individual in a field may change their field. This step is devoted to calculating the changing probability of each field by using the rank probability. In order to compute this probability, we first sort each field based on the fitness score of its best person through this method:

Field Changging Probability
According to the above discussion, an individual in a field may change their field. This step is devoted to calculating the changing probability of each field by using the rank probability. In order to compute this probability, we first sort each field based on the fitness score of its best person through this method: Eng. Proc. 2022, 14, 10 5 of 8 where the best person of f ield 1 and f ield N possess the minimum and the maximum fitness score of the remaining fields, respectively. Then, the ranking probability for every domain (field) can be obtained by: where p i and O i are ranking probability and the index of the i-th sorted field, respectively. By performing this technique, the field whose best person possesses a lower fitness score has less of a chance, and the field whose best person possesses an upper fitness score has a higher chance to make this process occur. Secondly, we provide a random number between 0 and 1, and by checking the equation below we will determine if the field change for one of the people in this field will occur: In this step, from the fitness score, a selection probability for every person is computed by: where P.S j is the selection probability for the j-th individual and Nind is the number of people in the selected field. Finally, by adopting the roulette wheel selection technique [18], a person will be determined and will go to a random different field [16].

Finalization
After performing the abovementioned steps, the function value of all individuals is evaluated and the algorithm will repeat the processes until the consummation of all iterations [16]. where the best person of and possess the minimum and the maximum fitness score of the remaining fields, respectively. Then, the ranking probability for every domain (field) can be obtained by:

Optimization of Fuzzy-PI with HBBO
where and are ranking probability and the index of the i-th sorted field, respectively. By performing this technique, the field whose best person possesses a lower fitness score has less of a chance, and the field whose best person possesses an upper fitness score has a higher chance to make this process occur. Secondly, we provide a random number between 0 and 1, and by checking the equation below we will determine if the field change for one of the people in this field will occur: In this step, from the fitness score, a selection probability for every person is computed by: where . is the selection probability for the j-th individual and is the number of people in the selected field. Finally, by adopting the roulette wheel selection technique [18], a person will be determined and will go to a random different field [16].

Finalization
After performing the abovementioned steps, the function value of all individuals is evaluated and the algorithm will repeat the processes until the consummation of all iterations [16].

Optimization of Fuzzy-PI with HBBO
where ( ) is the error of the position of the i-th sample for the first angle, ( ) is the error of the position of the i-th sample for the second angle, is the number of samples. For the sake of examining the performances of the proposed algorithms, we engaged 50 individuals in 60 iterations and we set k1 = 0, k2 = 2.5 and σ = 0.2 to tune the parameters of Fuzzy-PI.

Results and Discussions
The purpose of the controller is to force the angles of the robot and to follow the desired trajectory defined by: , = 0.3. sin under the presence of a frictional force defined by: ( ) = .
The numerical simulation results of angle position, two link errors and control input obtained by Fuzzy-PI tuned by HBBO are represented in Figures 6-8. Figure 6 evidently shows that both angles for first and second links converge rapidly to their respective set point. It is clearer from Figure 7 that Fuzzy-PI exhibits height accuracy and was able to stabilize the errors around 10 −4 and 10 −3 for both the first and second links and cost function in 0.0056. Figure 8, meanwhile, highlights that the control signals acquire a periodicity form, which varies around 0 to 15 for the first link and −10 to 10 for the second link. It is obvious from the above discussions that HBBO was able to provide the best parameters of Fuzzy-PI and, consequently, the two positions (angles) of the robot perfectly follow the given reference positions.
where e 1 (i) is the error of the position of the i-th sample for the first angle, e 2 (i) is the error of the position of the i-th sample for the second angle, N is the number of samples. For the sake of examining the performances of the proposed algorithms, we engaged 50 individuals in 60 iterations and we set k 1 = 0, k 2 = 2.5 and σ = 0.2 to tune the parameters of Fuzzy-PI.

Results and Discussions
The purpose of the controller is to force the angles of the robot θ 1 and θ 2 to follow the desired trajectory defined by: y d1,2 = 0.3. sin t under the presence of a frictional force de-  Figure 6 evidently shows that both angles for first and second links converge rapidly to their respective set point. It is clearer from Figure 7 that Fuzzy-PI exhibits height accuracy and was able to stabilize the errors around 10 −4 and 10 −3 for both the first and second links and cost function in 0.0056. Figure 8, meanwhile, highlights that the control signals acquire a periodicity form, which varies around 0 to 15 for the first link and −10 to 10 for the second link. It is obvious from the above discussions that HBBO was able to provide the best parameters of Fuzzy-PI and, consequently, the two positions (angles) of the robot perfectly follow the given reference positions.
Eng. Proc. 2022, 14, 10 6 of 8 The optimization was performed under the following cost function of the absolute magnitude of the mean error (MAE): where ( ) is the error of the position of the i-th sample for the first angle, ( ) is the error of the position of the i-th sample for the second angle, is the number of samples. For the sake of examining the performances of the proposed algorithms, we engaged 50 individuals in 60 iterations and we set k1 = 0, k2 = 2.5 and σ = 0.2 to tune the parameters of Fuzzy-PI.

Results and Discussions
The purpose of the controller is to force the angles of the robot and to follow the desired trajectory defined by: , = 0.3. sin under the presence of a frictional force defined by: ( ) = .
The numerical simulation results of angle position, two link errors and control input obtained by Fuzzy-PI tuned by HBBO are represented in Figures 6-8. Figure 6 evidently shows that both angles for first and second links converge rapidly to their respective set point. It is clearer from Figure 7 that Fuzzy-PI exhibits height accuracy and was able to stabilize the errors around 10 −4 and 10 −3 for both the first and second links and cost function in 0.0056. Figure 8, meanwhile, highlights that the control signals acquire a periodicity form, which varies around 0 to 15 for the first link and −10 to 10 for the second link. It is obvious from the above discussions that HBBO was able to provide the best parameters of Fuzzy-PI and, consequently, the two positions (angles) of the robot perfectly follow the given reference positions.

Conclusions
Our study proposes the HBBO algorithm to determine the scaling factor of fuzzy membership and PI parameter in order to get a best convergence of a robot's state toward desired inputs. The proposed algorithm is capable of dealing with height-dimensional functions and bypassing local minimas. Furthermore, it relies on rather simple concepts and is easy to implement. The fuzzy system that we have opted is of the Takagi-Sugeno type. Future research should move in the direction of identifying additional cost functions and testing other algorithms.
Author Contributions: A.M. and Y.Z. propose in this paper a new architecture control design aims to control a 2 DOF robot manipulation with Fuzzy-PI in the presence of fractional force and to use HBBO in order to find the optimal parameters of this, later. All authors have read and agreed to the published version of the manuscript.

Conclusions
Our study proposes the HBBO algorithm to determine the scaling factor of fuzzy membership and PI parameter in order to get a best convergence of a robot's state toward desired inputs. The proposed algorithm is capable of dealing with height-dimensional functions and bypassing local minimas. Furthermore, it relies on rather simple concepts and is easy to implement. The fuzzy system that we have opted is of the Takagi-Sugeno type. Future research should move in the direction of identifying additional cost functions and testing other algorithms.
Author Contributions: A.M. and Y.Z. propose in this paper a new architecture control design aims to control a 2 DOF robot manipulation with Fuzzy-PI in the presence of fractional force and to use HBBO in order to find the optimal parameters of this, later. All authors have read and agreed to the published version of the manuscript.

Conclusions
Our study proposes the HBBO algorithm to determine the scaling factor of fuzzy membership and PI parameter in order to get a best convergence of a robot's state toward desired inputs. The proposed algorithm is capable of dealing with height-dimensional functions and bypassing local minimas. Furthermore, it relies on rather simple concepts and is easy to implement. The fuzzy system that we have opted is of the Takagi-Sugeno type. Future research should move in the direction of identifying additional cost functions and testing other algorithms.
Author Contributions: A.M. and Y.Z. propose in this paper a new architecture control design aims to control a 2 DOF robot manipulation with Fuzzy-PI in the presence of fractional force and to use HBBO in order to find the optimal parameters of this, later. All authors have read and agreed to the published version of the manuscript.