TRACKING TRAJECTORY OF THE MOBILE ROBOT KHEPERA II USING APPROACHES OF ARTIFICIAL INTELLIGENCE

This paper introduces a solution to the reference trajectory tracking problem done by a differential wheeled mobile robot Khepera II. The paper includes a kinematic part and a dynamic part of the mathematical model of mobile robot. In this paper two approaches of the artificial intelligence are used i.e. genetic algorithm approach from evolutionary computing techniques and theory of neural networks. Genetic algorithm is used for parameters optimizing PID controller and K parameter so-called parameter speed of rotation at the tracking reference trajectory into defined control structure. For the creation forward and inverse neural model by the approach of neural networks are used forward neural networks of MLP type. The neural models are verified using Neural Network Toolbox. The forward neural model of the mobile robot is implemented into the IMC control structure together with the inverse neural model, which is used as a nonparametric neural controller. The purpose of the designed control structure is tracking the defined trajectory of the mobile robot using approaches of the artificial intelligence, which are verified by the simulations in the language Matlab/Simulink.


INTRODUCTION
The mobile robots are used for different applications in various branches of industries. The primary task for every mobile robot is to move along a defined trajectory. To ensure that mobile robot moves along the reference trajectory it is possible to use the predictive control approach [4] or can devise neuro-fuzzy controller [7]. In our paper we have decided to apply for the task of tracking entered reference trajectory approaches of the artificial intelligence (AI) -evolutionary computing techniques and theory of neural networks. Evolutionary computing techniques (ECT) are increasingly used for solving of optimization tasks. In this paper ECT are used for parameter optimization of the PID controller and the parameter speed of rotation K which they ensure that mobile robot tracks the reference trajectory. Another approach of the AI, which is used in this paper, is forward neural networks of MLP type. Neural networks are able to model of nonlinear dynamic systems without knowing their internal structure and physical description. Training data necessary to obtain nonparametric neural controller are received from designed control structure, which ensures the movement of model of mobile robot along the predefined trajectory. The simulation model of kinematics and dynamics of mobile robot, which is used for verifying the proposed algorithms of tracking reference trajectory, is based on real mobile robot Khepera III of K-Team Corp. [5]. The paper is organized as follows. Part two includes a mathematical model of the mobile robot, which consists of kinematic and dynamic parts. Part three contains a control of the mobile robot into defined control structure using PID control, whose parameters are calculated by using genetic algorithm. There the process of devise of the genetic algorithm from definition of the individuals in the generation to resulting graphs of tracking defined trajectory is mentioned. In part four tracking trajectory of the mobile robot using theory of neural networks is solved. There is a design of the forward and inverse neural models, which are implemented into IMC structure, which allows to tracks the defined trajectory of mobile robot.

MATHEMATICAL MODEL OF MOBILE ROBOT KHEPERA II
The created a model is based on several assumptions, namely that the robot moves on a perfect flat surface without sliding and also neglects the rolling resistance of the wheels. Position of the mobile robot is given by the coordinates x, y and angle θ, which represents the rotation of the mobile robot in relation to the chosen coordinate system. Mobile robot is controlled by the angular velocities of the wheels ω L , ω R . Between the angular velocities ω L , ω R and peripheral speeds v L , v R there are the following relations where r is radius of the wheel. Position and rotation of the robot in the space can be based on the following equations, which form a kinematic model of the mobile robot ( Fig.1 where the inputs into the kinematic model are speeds wheels v L resp. v R and the outputs are x, y, θ. The kinematic model (Fig.1) allows us to determine the position and rotation of the robot under the condition that we know the initial state of the robot and we have updated information about the speed of the individual wheel. The kinematic model does not include friction forces acting on the wheel and the total mass of the mobile robot, so we have extended the mathematical -physical model about the dynamic part ( Fig.2), which has the following shape: where tangent acceleration a t is given by mass of the robot m and tangent forces F L and F R , acting on the wheels due to changes in the rotation speed [6]. Angular acceleration ε is determined by the same forces, the moment of inertia of the robot J and distance between the wheels b (3).
where the state variables and their derivates have the following physical meaning and inputs into the system of mobile robot are:

Fig. 2 Dynamic model of mobile robot
We programmed simulation scheme of the mobile robot ( Fig.3)as two subsystems in the Matlab/Simulink language, based on the equations of the kinematics (2) and dynamics model (3) (4)

Fig. 3 Simulation scheme of mobile robot -kinematics
We proposed a control structure to ensure that the mobile robot can track one of the set reference trajectories (Fig.4). The inputs into control structure of model robot are coordinates of the current position of model robot real x, real y and coordinates of reference trajectory reference x, reference y. The Euclidean distance between current and desired position of the model robot is calculated by means of these coordinates. The outputs from control structure are angular velocities for the left and the right wheels (fider_L, fider_R). The mathematical model of the mobile robot together with proposal control structure, is used to verify suitability parameter K and parameters of PID controller for left and right wheel of mobile robot designed by genetic algorithm (Fig.5) and also it is used to obtain training data for design forward and inverse neural model [8].

TRACKING REFERENCE TRAJECTORY OF THE MOBILE ROBOT USING GENETIC ALGORITHM
In this paper we used to track reference trajectory of the mobile robot Khepera II approaches of AI i.e. evolutionary computing techniques and neural networks. The most important and the most widely used ECT are genetic algorithms, which are used to solve optimization tasks related with optimal setting parameters of the systems [9].
In this part of paper are optimized using genetic algorithm parameters of PID controller for left and right wheel and parameter speed of rotation K into defined control structure of cascade control (Fig.5).

USING GENETIC ALGORITHM FOR TRACKING REFERENCE TRAJECTORY OF THE MOBILE ROBOT KHEPERA
Genetic algorithm deals with optimization or the potential solutions (genes, strings) in the population, which are subject to reproduction. The process of reproduction consists of the following three basic operations [10]: • selection of chromosomes • crossing of chromosomes • mutation of chromosomes Reproduction of population improves her features, on the basis of evaluation of chromosomes by so-called fitness function. In the process of resolving the GA global maximum of fitness function is searched, i.e. to find the best solution to a given problem. In this part of the paper, GA serves for proposing parameters of PID controller and parameter of speed of rotation K, which is used to control structure, to control of mobile robot Khepera II during the tracking defined reference trajectory.
Numbers of individuals in one population, is considered fixed and consists of parameters of PID controller and parameter of speed of rotation K, so the final share of generation is : {P,I,D,K}.
Before starting with solving the task, it is needed to set ranges of parameters P∈(P MIN ,P MAX ), I∈(I MIN ,I MAX ), D∈(D MIN ,D MAX ), K∈(K MIN ,K MAX ). For evaluation of suitability of generations is used the Euclidean distance between the reference and actual location of mobile robot during simulation. The formula for calculating the Euclidean distance has the following form:

VERIFICATION OF SUITABILITY OF THE PROPOSED PARAMETERS
The proposed genetic algorithm, which runs over a population of potential solutions {P,I,D,K} is expressed by the following steps: these files are then used in calculating the suitability of the current generation parameters,

5.
after verification of the individuals using Euclidean distance (6) the best individuals is selected and are applied for reproduction to current generation,

6.
selection of parents is the first step in the process of reproduction. The selection of the parents is based on tournament selection, 7. the next step there is a single point crossover between the parents to obtain new individuals (children) to a new generation, 8.
the final step is mutation of new individuals, in our case additive mutation is used, 9. after finishing the reproduction is tested condition of termination, which in our case given number of generations, if the condition is not fulfilled, then we return to step 2.

TRACKING REFERENCE TRAJECTORY OF THE MOBILE ROBOT USING FORWARD NEURAL NETWORK
In this section are used forward neural networks for tracking predefined reference trajectory of mobile robot. Neural networks with their universal approximation properties are capable to model and control nonlinear dynamic systems without mathematical and physical description. They use data entering and leaving from system, which represents dynamics of the system. Base on these training data using chosen optimization algorithm then adjusts synaptic weights of neural network. This process is called learning neural network. Thus correctly learned network can be then used to model and control almost any nonlinear dynamic system without hard nonlinearities, [3] [13].
In part three, we obtained, using of genetic algorithm PID controller parameters which ensured us that mobile robot tracked the defined reference trajectory in the proposed control structure of cascade control. In this part of paper the possibility of using neural network method for obtains the forward and inverse neural model of mobile robot is showed. In this case the inverse neural model represents nonparametric neural controller. These two obtained neural models are implemented into the Internal Model Control structure, which allows to track the defined trajectory of mobile robot, [12].

FORWARD NEURAL MODEL OF MOBILE ROBOT
The neural model, which approximates dynamics of the system is called forward model. Neural network is placed in parallel with identification system and error between output of the neural network ŷ(k+1) and output of the dynamic system y(k+1), the so-called prediction error, is used as training signal for neural network (Fig.8).
where fˆ represents the nonlinear input-output representation by the neural model and y(k) resp. u(k) is n -output resp. m -input of the previous values [3]. Training data for proposal forward neural model are obtained from simulation scheme to simulate the movement of the robot along the defined reference trajectory. Reference trajectory is represented by vectors x and y coordinate.
For training the forward neural model, is used a forward neural network of Multi Layer Perceptron (MLP) type with 10 neurons in the input layer, with 10 neurons in the hidden layer and with 2 neurons in the output layer (Fig.9). The training of forward neural model is carried out by the Levenberg-Marquardt algorithm using Neural Network Toolbox. Simulation scheme for obtain training data is in the paper [8].
k- Fig. 9 Forward neural model of mobile robot The validation of the neural model is the next step after training of the neural model. The result of testing of trained forward neural model (Fig.9) is shown in the Fig.10. Picture (Fig.10) shows that forward neural model can approximate with accuracy, which meets for its further use at the tracking the defined reference trajectory.

INVERSE NEURAL MODEL OF MOBILE ROBOT
Inverse neural model of the system is an important part of the theory of control. If the forward neural model was described by the equation (7), then the inverse model can be expressed in the form:  (8) where y(k+1) is an unknown value, therefore it is substituted by the reference value of the control variable r(k+1). To obtain inverse neural model, we have chosen General training architecture (Fig.11), which requires a known reference trajectory r(k) (Fig.5 -system, red square). Signal u(k) is applied on the inputs of structure based on input predictive error with the aim of to obtain a corresponding system output y(k), while the neural network is trained by the error e u (k), which is obtained as the difference of the neural model output û(k) and input signal u(k) into the system, [3], [13]. Fig. 11 General training architecture For training the inverse neural model, is used forward neural network of Multi Layer Perceptron (MLP) type with 14 neurons in the input layer, with 5 neurons in the hidden layer and with 2 neurons in the output layer (Fig.12). Training of forward neural model is carried out by the Levenberg-Marquardt algorithm. Simulation scheme for obtaining training data is in the paper [8].
x r ( 1) k- ∆y k- We applied inverse neural model (Fig.12) together with forward neural model ( Fig.9) into control structure IMC (Fig.12), which has been used for tracking defined reference trajectory. Also the IMC filter into control structure for better tracking trajectory is proposed.  Fig. 13 Control structure Internal Model Control The output from control structure IMC is current trajectory of simulation model of mobile robot (Fig.14), which is controlled by nonparametric neural controller.

CONCLUSION
In this paper we have discussed the problem of tracking defined reference trajectory of mobile robot. This problem we have been solved by using known methods of classical theory of control by modified approaches of artificial intelligence. The proposed genetic algorithm optimized parameters of PID controller and parameter of speed of rotation K. The obtained optimized parameters then have been applied on simulation scheme of cascade control structure in pursuit track reference trajectory.
The second way as we have solved the task of tracking trajectory was use forward neural networks. We have proposed a forward and an inverse neural model, which we then applied into IMC structure.
The results of our simulations present that either genetic algorithm or neural networks are suitable approaches to solve problem of tracking predefined reference trajectory of mobile robot Khepera II. Each of those approaches has its basic advantages -approach of genetic algorithm is universal optimization tool, which can be used for wide range optimization tasks while neural network approach does not need to know physical description of system when its proposing. From our view it is preferable to use approach of genetic algorithm for solving problem of tracking reference trajectory. In the genetic algorithm, if we want to change the shape of the reference trajectory, just run the algorithm, which generates optimal settings of four parameters {P,I,D,K}, while using the neural network we must train the new forward and inverse neural models from new training data.
We want to use the obtained knowledge in the field tracking reference trajectory of the mobile robot for real mobile robot Khepera III, which is at disposal in our laboratory of Distributed Control Systems in the Department of Cybernetics and Artificial Intelligence.