Inverse Kinematics Solution for Redundant Robot Manipulator using Combination of GA and NN

A demonstration of the inverse kinematics is a very complex problem for redundant robot manipulator. This paper presents the solution of inverse kinematics for one of redundant robots manipulator (three link robot) by combing of two intelligent algorithms GA (Genetic Algorithm) and NN (Neural Network). The inputs are position and orientation of three link robot. These inputs are entering to Back Propagation Neural Network (BPNN). The weights of BPNN are optimized using continuous GA. The (Mean Square Error) MSE is also computed between the estimated and desired outputs of joint angles. In this paper, the fitness function in GA is proposed. The sinwave and circular for three link robot end effecter and desired trajectories are simulated by MATLAB program. Joint angles and end effecter positions of robot results values of circular trajectory are better than joint angles end effecter positions of robot results values of NN work in another paper. Three link redundant robot workspace is also simulated. The outputs results of best three joint angles are evaluated for two trajectories sinwave and circular, with 50 generations the algorithm is fast. This paper presents the simulations results that are obtained based on MATLAB R2010b program.


Introduction
One of the main problems for serial-chain manipulators robots is the inverse kinematics problem, where, it needs to find the values of the joint positions given the position and orientation of the end-effector relative to the base.For solving the inverse kinematics problem, there are many solutions [1].Neural networks have been widely applied to solve the robot manipulator inverse kinematics problems.The proposed hybrid approach combined the electromagnetismlike method and the neural network to solve the inverse kinematics problem.Extreme Learning Machine (ELM) is used to train the neural network [2].Another neural network solution of the inverse kinematics problem is used for a threejoint robotic manipulator where, the neural network is trained until the error is acceptable [3].In addition, an Artificial Neural Network (ANN) model is presented to find the inverse kinematics solution of a SCARA manipulator [4].The genetic algorithm is determined the optimal joint angles in a given search space for three planar manipulator robot that would contribute to a productive and a quality way of material handling and processing [5].The only genetic algorithm is used to optimization the inverse kinematics of three degrees of freedom model industrial robot manipulator and improving the efficiency of the model [6].

Related Work
1.The combing of GA and BPNN algorithm of the end effecter positions (x, y) and joint angles of circular trajectory are evaluated as shown in Figure 7.These positions and joint angles of circular trajectory are better than the positions and joint angles of circular trajectory of the Adrian's work [7].Adrian's work [7] is just used NN algorithm without GA.In addition, in this paper, the end effecter positions (x, y) and joint angles of the sinwave trajectory are demonstrated and simulated as shown in Figure 8, while in Adrian's work, the only circular trajectory is presented.2. The proposed flowchart of GA and BPNN algorithm is illustrated as shown in Figure 6 and the two difficult trajectories results are simulated, one for the sinwave trajectory and the second for the circular trajectory, but the researchers Md and Tania [10] are just presented GA and NN algorithm but they did not evaluated any results of any trajectory.

Modeling of Redundant Robot Manipulator
The modeling of three link redundant robot is presented as the following:

Forward Kinematics for Three Link Manipulator
The forward kinematics means that using the kinematic equations of the three link robot manipulator in order to evaluate the position of the end-effecter from the joint values [7][8].The three link manipulator robot configuration with all parameters is as shown in Figure 1.Where a , a , a are the three link of robot respectively and TH1, TH2, TH3 are the joint angles.Three links are connected by joints whose all axes are perpendicular to the plane of the links.
Where, di is distance, θi is angle, ai is length and αi is twist angle, θ * = TH , θ * = TH and θ * = TH The ranges of three joint movements are: The three link robot is required to move along the circular trajectory in its workspace.The coordinates of the circle equation are demonstrated as below: x x r cosφ y y r sinφ ...(3) Where, (x , y ) are the desired position of the end-effecter, (x , y ) are the coordinates of the circle's center, r is the circle's radius.The angle (φ) ranges between 0 and 2π.The desired orientation of the end-effecter is expressed by: TH !tan # y /x ...(4) The three link robot is also move along the sinwave trajectory in its workspace.The coordinates and the desired orientation of the endeffecter are expressed as: By using the forward kinematics Eq. 1 and Eq. 2 the workspace of redundant three link robot are simulated for 1000 random points as shown in Figure 2: Where the black line is the first link, the red line is the second link and the blue line is the third link of redundant robot.

Combination of GA and NN Algorithm
In this paper, the GA is used in order to optimize the weights of NN as explained in below: 1-The initialize inputs are end effecter position and orientation x , y , TH ) from Eq. 1 and Eq. 2 and initialization the weights and biases values randomly.2-BPNN algorithm is divided into three programs in order to evaluate each target output so that we have three programs one for TH , second for TH and third for TH .3-The multilayer feed forward neural networks consist of three layers.There are three programs, in each program the number of these layers is: input layer= 3, hidden=3 and output=1 for neuron=30 so that finally there are three outputs of joint angles.4-The back propagation neural network (BPNN) is used and the epoch=1000 as shown in Figures (3, 4, 5).Where, n: total number of samples.6-If the MSE < minimum error then go to optimise the weights and biases values by using continuous GA. 7-The continuous GA is programmed using toolbox [9] and the parameters are shown in Table 2: …(8) According to the step 2 there are three programs so that the Eq. 8 is applied once time in each program in order to get the optimal angles outputs (TH1, TH2, TH3) by optimization the NN weight values.Figure 6 shows that the proposed flowchart of the combination GA and BPNN algorithm as compared with [10].In this paper, the proposed equation is used as a fitness function as in Eq. 8 and also, the continues GA is used in order to optimize the weights values.
The continues GA is used because is faster than the binary GA.The two difficult trajectories are presented, one for sinwave trajectory and second for circular trajectory.The results of this paper are demonstrated the best results of joint angles for three link redundant robot.As compared with another work of the researchers Md and Tania [10] where, they did not have any results of any trajectory.

Simulation and Discussion Results
MATLAB program version R2010b is used in this work in order to simulate the results of three link redundant robot by using combination of GA and NN algorithm.In this paper the outputs results is evaluated of best three joints angles TH , TH , TH in radians of the sinwave and the circular trajectory for the redundant three link robot as shown in the following Table 3 and Table 4: Figure 7 below shows that the desired circular trajectory is simulated depending on Eq. 3 and Eq. 4. Where, the combing of GA and BPNN algorithm of the end effecter circular trajectory is evaluated and it is better than the circular trajectory of the Adrian's work [7] where, the Adrian's work is just used NN algorithm.In Figure 8 the three link robot sinwave end effecter trajectory is simulated according to combine of GA and BPNN algorithm, while, the desired sinwave trajectory is simulated according to the Eq. 5 and Eq. 6.In each trajectory there are three fitness functions are evaluated according to the Eq. 8 as shown in Figures (9,10,11,12,13,14), where the black color is the best fitness values and the blue color is mean fitness:

Conclusions
In this paper the combing of GA and NN algorithm is presented in order to solve the problem of inverse kinematics for three link redundant robot.The inputs ( x , y , TH ) are end effecter position and orientation of the three link robot.The Back Propagation Neural Network (BPNN) is used for training the data.The outputs of BPNN are computed then the MSE is evaluated between the estimated and desired outputs.The proposed fitness function is computed with GA.The continues GA is used in order to optimize the weights values with training the data in BPNN by combing GA and NN algorithm.This algorithm is presented in order to solve the inverse kinematics problem and to compute the best values of three joint angles.The continues GA is so fast with 50 generations.The best joint angles outputs results (TH1, TH2, TH3) of sinwave and circular trajectories are evaluated from the combing GA and NN algorithm.In addition, the simulation of three link redundant robot workspace is presented.

Fig. 7 .
Fig. 7.The three link robot end effecter and the desired circular trajectories.

Fig. 8 .
Fig. 8.The three link robot end effecter and the desired sinwave trajectories.
x , y position of end effector three link robot TH , TH , TH three joint angles of three link robot TH orientation of three link robot x , y desired position of the end-effecter of the and sinwave circle trajectories

Table 3 . Best three joints angles results of the sinwave trajectory for three link redundant robot. Table 4, Best three joints angles results of the circular trajectory for three link redundant robot.
Raşit Köker, Cemil Oz, Tarık C¸ akarb and Hüseyin Ekiz, A study of neural network based inverse kinematics solution for a threejoint robot, ELSEVIER, Robotics and AutonomousSystems 49 -227-234, 2004.