Abstract
The ball and Plate (BaP) system is the typical example of the nonlinear dynamic system that is used in a wide range of engineering applications. So, many researchers in the control field are using the Bap system to check robust controllers under several points that challenge it, such as internal and external disturbances. Our manuscript proposed a position control intelligent technique with two directions (2D) for the BaP system by optimized multi Fuzzy Logic Controllers (FLC’s) with Chicken Swarm Optimization (CSO) for each one. The gains and rules of the FLC’s can tune based on the CSO. This proposal utilizes the ability of the FLC’s to observe the position of the ball. At our work, the BaP system that belonged to Control Laboratory/Systems and Control Engineering department is used for realtime proposal implementation. The results have been showing a very good percentage enhancement in settling time, rise time, and overshoot, of the Xaxis and Yaxis, respectively.
1 Introduction
BaP are electromechanical devices intended to mimic the behavior of some types of multivariable systems. It is a typical standard for control theory research because it has characteristics of underactuated, cascaded structure, and strongcoupling [1]. It is composed of a metallic ball that is free to roll on a flat plate due to electromechanical actuators’ twodimensional deflection. The plate must be placed on a special sort of spherical joint to allow this type of movement which usually approximates the BaP system application in the robotics field. Also, it may be a onedimensional with ball and beam [2]. The low cost and easy implementation are the main advantages of this type of system [3]. Also, it provides the ability to experimentally test theoretical expertise in simulation, control, and other engineering fields, such as computer vision and robotics.
In the literature, Ali et al. [2] had a new approach to control the position of the ball. They used a nonlinear controller with invasive weed optimization (IWO) which is used to obtain the optimal parameters for the proposed controller. The hybrid learning algorithm which is Genetic Algorithm Fuzzy Logic Neural Network Control (GAFNNC) was prepared by Dong et al. [4], who designed a controller for the stabilization of the BaP system. In [5], they had designed adaptive dynamic programming (ADP) based on optimal trajectory tracking controller for a BaP system and apply largescale on it. A type2 FLC had been designed for the stabilization of the BaP system by Farooq [6] and reference tracking of it. The controller had used plate angles as the premise variables for the scheduling of gains and a collection of linear matrix inequalities ensures its stability. The BaP with the controller was implemented in the virtual laboratory by Fabregas et al. [7]. In their work, they control the position of the ball by manipulating the inclination angles of the plate. In a manuscript published by Cheng et al. [8], their proposal was used as a visual servo control to illustrate the mechanical wrist dexterity from the standpoint of table tennis. At the first stage of their work, A BaP system had been chosen. The robotic wrist with a plate attached had been developed by two degrees of freedom. A video camera provided feedback for the control algorithm with a Linear Quadratic Regulator (LQR).
Most of the researchers use the BaP system in the control field to check the robustness of the control response because its complex dynamics depend on inherent instability and nonlinearity. This paper will be using the FLC, and the chicken swarm optimization (CSO) used to tune the I/O gains to increase the stability of the BaP system. Also, the CSO is used to find the best rules to enhance the stability of the BaP system. Our design aims to create an efficient and reliable controller that can produce signals that always force the BaP system states toward the reference states.
2 Modeling structure
In the BaP system, which is the extension of traditional ball and beam system, the mathematical model depends on Euler Lagrange’s equation. Figure 1 shows a simple schematic representation of the BaP system. The motion of the ball will be on the xaxis and the yaxis of the plane {x, y}, while the deflection angles of the plate are represented by the rotational variables are
The parameters and values for equations of the BaP system that use in our proposal are shown in Table 1.
The parameters and values of system
Parameter  Description  Value  Unit 
r  Radius of Ball  0.038  m 
m  Mass of Ball  0.223  Kg 
g  Acceleration of Gravitational  9.81  m s^{−2} 
J  Inertia Moment of Ball  1.76e−5  Kg m^{2} 
3 Fuzzy logic concept
In 1965, Fuzzy Sets was published by Lotfi A. Zadeh [9]. Zadeh then developed the Fuzzy Logic theory, which has proven to be useful in a variety of applications, ranging from consumer to industrial intelligent goods. Fuzzy Logic is one form of intelligence used that does not require detailed mathematical modeling knowledge such as a decision in the mind of a human [10]. Fuzzy logic assigns numeric values between 0 and 1 to each suggestion to represent uncertainty. Fuzzy logic tries to solve problems using an imprecise range of data that allows for a variety of accurate conclusions to be reached. The general diagram of fuzzy logic is shown in Fig. 2. The following three steps are needed to apply fuzzy logic to a real application [11].

Fuzzification: crisp data or classical data is converted into Membership Functions (MFs) or fuzzy data.

Fuzzy Inference Process: membership functions are combined with the control rules to get the fuzzy output.

Defuzzification: fuzzy control is converted into real control action or real output by using different methods to calculate each associated output that is fuzzy.
FLC is a control system that depends on fuzzy logic. In the last few years, fuzzy logic control has witnessed a lot of interest for robust performance as a controller on the system. The systems which have fuzzy logic control are more stable. A FLC is to provide stable controllers applicable to the BaP system and AQM system [12, 13]. In our proposed method, the FLC provides an action control into the BaP system. The gain of error and change error will tune based on Chicken Swarm Optimization (CSO). The rules of fuzzy logic need more experience to be written, where the CSO will tune the rules of fuzzy logic. Fig. 3 shows the FLC which is designed to provide the stability of the BaP system in our proposal.
The simulation of the BaP system has two inputs that control the movement of the ball toward an xaxis and yaxis. The FLC has two input variables, which are error and change of error and the output is action control for the xaxis or xaxis. The values of the error and change of error are in the range of −1 and 1. The input memberships of the FLC for the error and change of error are two, which are Negative (N) and Positive (P). The output memberships of the FLC for the action control are nine, which are Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero Left (ZL), Zero Center (ZC), Zero Right (ZR), Positive Big (PB), Positive Medium (BM) and Positive Small (PB). A shape of membership of the FLC is the Gaussian membership for input and triangular for output. The number of rules in our work is four, which multiply the number of input memberships. The centroid (center of gravity) and Mamdani type in the inference process are used in the Defuzzification.
4 Optimization algorithm
The CSO is to tune the rules and gain the RLC based on the fitness function which is described in Eq. 9. The fitness function represents the error of the path for the ball on the plate.
5 Non linear dynamic modeling: simulation and implementation
At this point, the program Matlab 2018b will be used to simulate the BaP system. Moreover, FLC after tuning by CSO, will be designed. Eqs. 1 and 2 which represent the BaP system, are simulated in Simulink such as shown in Figs 4 –7.
Our proposal is implemented in the Control Laboratory/Control and Systems Engineering Department by using the BaP system. Where the 310 and 230 mm are the width and height of the BaP system in Control Laboratory. The BaP system consists of two servo motors, a touch screen, Arduino mega, and a power supply. The touch screen is used to get coordinates of the ball. The Arduino mega receives a signal from it with noise. So, the low pass filter was used to remove the noise.
6 The simulation and experimental results
The CSO uses the fitness function to get the best I/O gains and rules for the multi fuzzy logic of the controller. Figure 8 illustrates the path of the solution. Where iteration is 50 and the best minimum value of the fitness function is (0.06173780).
The unit step is used as input to the Xaxis and Yaxis of the BaP system to check a characteristics of our proposal. Figure 9 is shown target and actual trajectories for line path responses of the BaP system. The percentage enhancement of our proposal is the best when compared with published work in reference [2] such as shown in Table 2.
Line path characteristic of Proposed controllers and published work in reference [2]
Controller  Proposed controllers  Published work in reference [2].  Enhancement Efficiency in Yaxis  Proposed controllers  Published work in reference [2].  Enhancement Efficiency in Xaxis 
Characteristic  Yaxis  Yaxis  Xaxis  Xaxis  
Rise Time  1.3387  2.0753  35.4937%  1.2514  2.2165  43.5416% 
Settling Time  2.3301  6.3936  63.5557%  2.2857  6.8587  66.6744% 
Overshoot  0  6.4990  100%  0  6.2476  100% 
Table 3 represents the gain parameters of the proposed controller which was founded by using the optimization technique (CSO).
Optimal gain parameters of proposed controllers
Xaxis  K1  0.456658699380614 
K2  0.337016262939350  
Yaxis  K1  0.349028015147271 
K2  0.280045644230414 
Another experiment is applied on the BaP system with a circular path to demonstrate the effectiveness of the proposed control method. The sine wave form is used as input to the Xaxis while the cos is used as input to the Yaxis of the BaP system. The sine and cos wave form have the same frequency to generate the circular path in which the ball moves it. The path of the ball is exactly on the target trajectory such as shown in Fig. 10.
When the sine and cos wave form do not have the same frequency, the infinite path had generated in which the ball moves in such a way as shown in Fig. 11.
The efficiency of our proposal is clear when the square path has been generated in which the ball moves in such a way as shown in Fig. 12.
Finally, the results of the practical experiment had been collected from Embedded system like Arduino mega and drawn in Fig. 13. The practical results in our proposal demonstrate the controller characteristics robustness with optimized I/O gains and rules for the BaP system which had tuned in the CSO.
7 Conclusions
In this work, the MFLC’s have been proposed to control the path of a ball in the (2D) BaP system. The nonlinear dynamics equations of the BaP system have been simulated in Simulink of Matlab to tune the parameter of the MFLC’s by CSO. Many states of targeted trajectory have been simulated and implemented to test and validate the designed controllers. Rise time, settling time, and overshoot, for the results of the simulation were (1.3339 s, 2.3445 s and zero), respectively. The Laboratory BaP system has been used to test/implement MFLC’s design and obtained practical results that are very close to simulation results. The practical part is implemented by using two very robust controllers that lead two servo motors in the Xaxis and Yaxis. The big challenge scenario in future work will be using one central servo DC motor for both axes to control it.
References
 [1]↑
M. Jie , H. Tao , and J. Huang , “Observer integrated backstepping control for a BaP system,” Int. J. Dyn. Control, pp. 1–8, 2020.
 [2]↑
H.I. Ali , H.M. Jassim , and A.F. Hasan , “Optimal nonlinear model reference controller design for BaP system,” Arabian J. Sci. Eng., vol. 44, no. 8, pp. 6757–6768, 2019.
 [3]↑
D. Núñez , G. Acosta , and J. Jiménez , “Control of a ballandplate system using a Statefeedback controller,” Ingeniare: Revista Chilena de Ingenieria, vol. 28, no. 1, pp. 6–15, 2020.
 [4]↑
X. Dong , Z. Zhang , and J. Tao , “Design of fuzzy logic neural network controller optimized by GA for BaP system,” in 2009 Sixth International Conference on Fuzzy logic Systems and Knowledge Discovery, vol. 4, IEEE, 2009.
 [5]↑
F. Köpf , S. Kille , J. Inga , and S. Hohmann , “Adaptive optimal trajectory tracking control applied to a largescale ballonplate system,” arXiv preprint arXiv:2010.13486, 2020.
 [6]↑
U. Farooq , J. Gu , and J. Luo , “On the interval type2 fuzzy logic logic control of BaP system,” in 2013 IEEE International Conference on Robotics and Biomimetics (ROBIO), IEEE, 2013.
 [7]↑
E. Fabregas , et al., “Virtual laboratory of the BaP system,” IFACPapersOnLine, vol. 48, no. 29, pp. 152–157, 2015.
 [8]↑
C.C. Cheng and C.H. Tsai , “Visual servo control for balancing a ballplate system,” Int. J. Mech. Eng. Robotics Res., vol. 5, no. 1, p. 28, 2016.
 [9]↑
I. Dzitac , F.G. Filip , and M.J. Manolescu , “Fuzzy logic is not fuzzy: worldrenowned computer scientist Lotfi A. Zadeh,” Int. J. Comput. Commun. Control, vol. 12, no. 6, pp. 748–789, 2017.
 [10]↑
R.S. Salman and A.T. Abdulsadda , “Network scheduling by using expert nonlinear controller,” 2020.
 [11]↑
B.P. Ganthia and K. Rout , “Deregulated power system based study of agc using pid and FLC,” Int. J. Adv. Res., vol. 4, no. 06, 2016.
 [12]↑
R. Moezzi , V.T. Minh , and M. Tamre , “Fuzzy logic control for a ball and beam system: fuzzy logic control for a ball and beam system,” Int. J. Innovative Technol. Interdiscip. Sci., vol. 1, no. 1, pp. 39–48, 2018.
 [13]↑
H.M. Kadhim and A.A. Oglah , “Interval type2 and type1fuzzy logic controllers for congestion avoidance in internet routers,” IOP Conf. Ser. Mater. Sci. Eng., vol. 881, August 2020, Paper no. 012135.
 [14]↑
S. Deb , et al., “Recent studies on chicken swarm optimization algorithm: a review (2014–2018),” Artif. Intelligence Rev., pp. 1–29, 2019.
 [15]↑
D. Wu , S. Xu , and F. Kong , “Convergence analysis and improvement of the chicken swarm optimization algorithm,” IEEE Access, vol. 4, pp. 9400–9412, 2016.
 [16]↑
X. Meng , et al., “A new bioinspired algorithm: chicken swarm optimization,” in International Conference in Swarm Intelligence, Springer, Cham, 2014.