Neural Network Implementation for Invers Kinematic Model of Arm Drawing Robot
R. Y. Putra1), S. Kautsar1), R.Y. Adhitya1), Mat Syai’in1), N. Rinanto1) , Ii Munadhif1), S.T. Sarena1), J. Endrasmono1) , Adi Soeprijanto2)
1) Automation Engineering Study Program, Marine Electrical Engineering, Shipbuilding Institute of Polytechnic Surabaya (SHIPS/PPNS), Indonesia
2)Department of Electrical Engineering, Institut Teknologi Sepuluh Nopember, Surabaya, Indonesia
Abstract - Nowadays, the research in robotics field is growing.
One of the studies in robotics is the control method of the robotic arm movement. In this research, a 3 DOF arm drawing robot was built. An inverse kinematic models of the robot arm is made using artificial neural network method. Artificial neural network model was implemented in a GUI application. The ANN model can work in real-time to control arm robot movement to reach certain coordinates. Based on test results, the inverse kinematic models of the arm drawing robot had an error rate under 2%. It is of 0.16%
for X coordinate and 0.46% for Y coordinate.
Index Terms – Neural Network Backpropagation, arm robot, invers kinematic
I. INTRODUCTION
Nowadays, robotics technology progress very quick. In the previous decade, robot was only functioned to aid the industrial manufacturing process[1]. In this century, the robotics technology began to be used to support the human daily activities[2]. Robots are widely used as a restaurant chef[3] or home assistant[4,5]. The robotic technology also can be used to help people with physical disabilities such as the blind people.
Sabien at al [6] developed an arm robot which can be controlled by using eyes movement. This technology can help people with disabilities to do a normal human activity.
A robot is generally composed of hardware and software[7]. In order to get the optimum performance of the robot, the basic mechanical structure must be designed properly. A simple and reliable mechanic is needed in order to make the robot movement became more flexible and can be used in certain circumstances. For example, a mobile robot which is equiped with manipulator[8]. It can improve the robot ability such as doing room exploration and manipulate the position of the dangerous object.
Robotic algorithm has been developed with various methods of artificial intelligence[9-11]. It is able to minimize errors in the robot as well as improve accuracy and precision of the robot movement[12]. Conventional PID is one method that is often used to control processes in the industry[1]. Simple control structure and parameters wich can be changed while the process is running, is one of the advantages of this method[13].
But when faced with the complex mechanisms and high response of nonlinear systems, this method has a problem with parameters tuning and slow variables process adaptation. The
combination of PID and fuzzy control is a solution of the nonlinear condition[14]. Fuzzy-PID control with various forms of structural models have been compared intensely by the literature[15] and the stability conditions were analyzed further using small gain theory. From the analysis, the Fuzzy-PID method could not adapt to the continous changes process. It is caused by the fuzzy parameters and membership functions which are not be able to be changed and the weakness of the fuzzy rule base which is made by individuals or researchers.
This research is the application of a robotic arm with three degrees of freedom for the drawing process with the implementation of neural network algorithms to model[16] the movement of the robot arm based on the coordinates (x and y) that had been predetermined. The nature of the operation of back propagation neural network allows the algorithm to model the system with a high nonlinearitas though. Iteration method and flexible layer weights adjustment are able to minimize errors robotic arm movement. Hence, the artificial neural network (ANN) model is suitable to be applied to the movement of the robotic arms that are dynamic and complex.
II.ARM DRAWING ROBOT
A. Arm Robot Structure
The arm drawing robot’s actuator consists of 4 units of Dynamixel AX-12A servo motors. Each motor has 300o working angle with 0.293o/bit resolution. Servo AX12A has a 12Nm stall torque at 12 Volts DC. 3 servo are used as the driving joints manipulator, and other servo is used to drive a pen holder.
Each motor is connected in series using a plastic bracket.
Each bracket has a different length. Based figure 1, L0 is the distance between coordinate (0, 0) with the servo1 shaft. L1 is the distance between servo1 shafts with servo2 shaft. L2 is the distance between servo2 shafts with servo3 shaft. L3 is the distance between servo3 with the center point of the markers.
The value of L0 = 3cm, L1 = 3 cm, L2 = 3 cm, and L3 = 3 cm.
Hereafter, the center point of the markers is called P (x, y).
The arm drawing robot is mounted on a white board that had been marked as Cartesian coordinates in milimeter units.
The black block seen on figure 1 is a working area of the arm drawing robot. The block size is 10cm x 10cm. The working area is located at coordinates (-15, -10) to (-25, -20). Based on 2016 International Symposium on Electronics and Smart Devices (ISESD) November 29-30, 2016
Kampus ITS, Surabaya, Indonesia
figure 2, ϴ1 is the working angle of servo1, ϴ2 is the working angle of servo2, and ϴ3 is the working angle of servo3. Each P(x, y) position has different ϴ1, ϴ2, andϴ3 value. The pair of that data is used as ANN data learning.
Fig.1 Arm robot structure
Fig. 2 Arm drawing robot hardware.
Dynamixel digital servo allows users to write and read the angular position of the servo accurately. Additionally, the torque value of Dynamixel servo can be disabled. This makes the retrieval of data for neural network learning becomes easier.
AX-12A servo uses half duplex serial communication. It need USB2Dynamixel module for interfacing between dynamixel servo and the PC. The wiring diagram of arm robot actuators is shown on figure 3.
Fig. 3 Dynamixel AX-12A wiring diagaram
B. GUI Software
A graphical user interface (GUI) application was made
network output data. Figure 4 is the view of the arm drawing robot GUI.
Fig. 4 Arm drawing robot GUI.
III.NEURALNETWORKIMPLEMENTATION A. Getting Data for Neural Network Training
The first step is taking the data for NN training by positioning P point on some coordinates and stored the ϴ1,ϴ2
& ϴ3 values on the database. ϴ1,ϴ2 & ϴ3 is a 10 bit value of the servo working angle. X and Y coordinates were stored in mm units. The data was stored on the coordinates (-15, -10) to (-25, -20), while increasing every 10 mm. Based on experiment, 121 pairs of the data were obtained. The data is shown in table I.
B. NN Training
ANN model requires data values with a range between -1 and 1. Therefore, the input and output data in table I need to be normalized. The min max normalitation is used. It is represented as follow:
= . 1 ... (1)
Levenberg-Marquardt algorithm [17] is used as ANN training method. The updating weight of the Levenberg- Marquardt training method is represented as below:
= − ( . + . ) . . ...(2) The ANN training perfomance is shown on figure 5. Based on the training result, the ANN model met the MSE value (10-
5) at 646th titration.. Figure 6 is the output data plotting result of the ANN model. The ANN model consists of three hidden layers. The first hidden layer consists of 7 neurons. Second hidden layer consists of 5 neurons. The third hidden layer consists of 3 neurons. Sigmoid tangen is used as activation function in all hidden layers. The ANN structure for invers kinematic model of arm drawing robot is shown in figure 7.
TABLE I. ANNDATA TRAINING SAMPLE
Fig. 5 ANN training performance
Fig. 6 ANN output data plotting
Fig. 7 ANN structure for arm drawing robot
C. NN implementation.
The final step is copying the neural network model to the GUI application. All of the weights of the hidden layer and bias were stored in the program. Table II is the input weight data. It consists of 2x5 matrix data. ANN model implementation refers to the feed forward equation. The input data, that is already normalized, multiplied by input weights and summed with a bias (3). The first and second hidden layer weight data is shown on table III & table IV.
= + ∑ . ... (((3)
Furthermore, the value of each unit of the 1st hidden layer is processed using the tangent sigmoid activation function.
Equation (4) is Tangen sigmoid function.
= . − 1 ...(4)
The output signal on the next hidden layer unit is multiplied by the weight and added with a bias on the output unit. The bias data is shown in table V. The output value is obtained from the calculation using this formula:
= ( + ∑ . ) ... (5)
TABLE II. INPUT WEIGHT X (mm) Y (mm) ϴ1 (bit) ϴ2 (bit) ϴ3 (bit)
1 -150 100 511 720 794
2 -160 100 523 717 781
3 -170 100 533 713 765
4 -180 100 543 709 751
5 -190 100 553 707 734
6 -200 100 562 707 717
... ... ... ... ... ...
116 -200 200 517 722 602
117 -210 200 534 713 588
118 -220 200 553 704 575
119 -230 200 572 692 559
120 -240 200 593 676 544
121 -250 200 621 650 529
OUTPUT INPUT
Data
Row /
column 1 2
1 112,5562 101,887 2 40,41899 14,4262 3 -75,7824 9,366886 4 50,18497 -46,2418 5 -4,43507 16,16989 6 -172,187 117,706 7 -173,539 -52,565
TABLE III. 1STHIDDENT LAYER WEIGHTS
TABLE IV. 2ND HINDDENT LAYER WEIGHTS
TABLE V. BIAS WEIGHTS
IV.TEST RESULT
Once the model was successfully implemented, NN models is tested by inputting random X,Y coordinate on the GUI application. 5 sample data is used and compared the results with P(x,y) real coordinates. Table VI is the result of a comparison between the coordinates on the GUI and real P(x, y) coordinates. Figure 9 is the result of the ANN output test.
TABLE VI. TEST RESULT DATA
TEST X (GUI) Y (GUI) X (REAL) Y (REAL)
I -250 mm 200 mm -248 mm 200 mm
II -240 mm 130 mm -240 mm 130 mm
III -220 mm 110 mm -220 mm 108 mm
IV -200 mm 100 mm -200 mm 100 mm
V -150 mm 100 mm -150 mm 102 mm
Based on the testing data in table VI, the error can be calculated from the system (6). From the test, the average error for the coordinates x is 0.16% and the coordinates y is 0.406%.
Error arising due to the tolerance of the working angle of the digital servo. Table VII is the result of an error calculation.
Figure 10 is a test results of line drawing from point (25.10) to (25.15). Seen that the line is not smooth. In future studies,
Fig. 9 The testing result of neural network implementation
Fig. 10 Line drawing test TABLE VII. ERROR DATA
V.CONCLUTION
A research of a drawing arm robot has been conducted. The movement of the arm robot was modeled using inverse kinematic. The model formula then used to obtain the aimed coordinate. Furthermore, the automatic movement to determine the coordinate was trained using Back Propagation Neural Network (BPNN). The result of this research shows that the drawing arm robot works well using BPNN method. BPNN is very powerful to be implemented in reading pattern of high non-linear data. The precision of the drawing arm robot is shown by the very small error under 2% both in X & Y coordinate.
Row /
Column 1 2 3 4 5 6
1 -10,3802 -21,0334 41,35508 -5,3964 -13,1173 1,372866 2 -32,3368 47,46116 28,16509 -21,9506 11,30731 18,29507 3 0,023892 -0,31654 -1,04067 1,931503 5,239662 -15,0271 4 -4,91758 12,58369 -10,1024 7,556546 36,55327 19,61844 5 -3,20058 13,22922 45,60993 -31,714 35,82765 2,418188
Row /
Column 1 2 3 4 5
1 48,75428 37,89111 -30,0083 5,74467 0,524182 2 -96,4308 -79,9543 64,15998 -7,63693 -3,7188 3 42,52289 50,78383 -38,475 -5,03455 9,516551
Baris /
kolom 1 2 3 1 -32,0273 -28,1659 -0,61519 2 -8,95619 -37,603 -2,18695 3 18,79361 -4,15038 3,594343 4 -1,19336 -13,5464
5 -1,4293 -31,2194 6 0,016548
7 27,6365
TEST X (%) Y (%)
I 0,8 0
II 0 0
III 0 1,83
IV 0 0
V 0 0,2
Average 0,16 0,406
REFERENCES
[1] Rocco P., “Stability of PID control for industrial robot arms,” IEEE Transactions on Robotics and Automation, Vol: 12, Issue: 4, Aug 1996.
[2] Kun Zhang, et al, “Modeling the stroke process in table tennis robot using neural network,” IEEE International Conference on ROBIO, Dec 2015.
[3] Jiaxin Zhai, et al, “Dynamix analysis of a dual-arm humanoid cooking,”
IEEE 10th Conference on ICIEA, Nov 2015.
[4] Kimitoshi Yamazaki, et al, “Home-Assistant Robot for an Aging Society,” Proceedings of the IEEE, Vol. 100, Issue: 8, Aug 2012.
[5] J. Annisa, et al, “Development of upper limb rehabilitation robot prototype for home setting,” 5th Brunei International Conference on BICET, Nov 2014.
[6] Dziemian S., Abbott W., Faisal A. Aldo, “Gaze-based teleprosthetic enables intuitive continuous control of complex robot arm use: writing &
drawing”, 6th IEEE Conference on BioRob, June 2016.
[7] Patrick Elfert, Tobias T., Sergej F., “Integration of different hardware interfacing protocols into a robotic software framework”, International Conference on MARSS, July, 2016
[8] Karol Cieslik, S. Konopka, “Concept and preliminary research of anthropomorphic manipulator with hydrostatic drive system for mobile robot,” International Conference on MMAR, September, 2016.
[9] Chih-Lyang Hwang, et al, “Humanoid Robot's Visual Imitation of 3-D Motion of a Human Subject Using Neural-Network-Based Inverse Kinematics,” IEEE System Journal, vol. 10, pp. 685-696, 2014.
[10] S. Kautsar, P.A. Darwito, S. T. Sarena et al, “Kinect Depth Image Processing for Hand Motion Recognition using Neural Network Backpropagation,” 1st IPTEK Journal of Proceedings Series, 2015.
[11] Fransisco G. Rossomando, Carlos M. Soria, “Adaptive Neural Sliding Mode Control in Discrete Time for a SCARA robot arm,” IEEE Latin America Transactions, Vol.14, Issue: 6, p.2556-2564, 2016.
[12] Zhi Liu, Ci Chen, Yun Zhang, C. L. P. Chen “Adaptive Neural Control for Dual-Arm Coordination of Humanoid Robot With Unknown Nonlinearities in Output Mechanism,” IEEE Transactions on Cybernetics, vol. 45, pp. 507-518, 2014
[13] Kim J H, Oh S J, “A fuzzy PID controller for nonlinear and uncertain systems,” Soft Computing, vol.4, no.2, pp.123-129, 2000.
[14] Jie Zhao, et al, “The Fuzzy PID Control Optimized by Genetic Algorithm for Trajectory Tracking of Robot Arm,” World Congress on Intelligent Control and Automation, June, 2016.
[15] Mohan B M, Sinha A, “Analytical structure and stability analysis of a fuzzy PID controller,” Applied Soft Computing, vol.8, no.1, pp.749-758, 2008.
[16] Vicente Ruiz de Angulo, Carme Torras, “Learning Inverse Kinematics:
Reduced Sampling Through Decomposition Into Virtual Robots,”, IEEE Transactions on Systems, Man, and Cybernetics, vol. 38, pp. 1571-1577, 2008.
[17] Wenle Zhang, MIMO system indentification with extended MADALINE neural network trained by Levenberg Marquardt Method, 26th Chinese Control and Decision Conference, June, 2014.