Proceedings of the ASME 2014 International Mechanical Engineering Congress and Exposition IMECE2014 November 14-20, 2014, Montreal, Quebec, Canada

IMECE2014-39545

DEVELOPMENT OF SIMULATION USING CREO 2.0

Shubham Somani Anshul Jain Vimal Savsani Poonam Savsani Student Student Assistant Professor Assistant Professor [email protected] [email protected] [email protected] [email protected]

Department of Mechanical Engineering Pandit Deendayal Petroleum University Gandhinagar, Gujarat, India

ABSTRACT analysis of a 3R using PTC Creo Parametric 2.0 Simulation of systems is getting very popular, and also to identify its advantages and disadvantages. PTC Creo especially with the lowering cost of computers. The robotic arm Parametric 2.0 provides the broadest range of powerful yet is presumably the most mathematically complex for the flexible 3D CAD capabilities to help in most pressing design dynamic and kinematic analysis. The purpose of this paper is to challenges including accommodating late stage changes, build a simulation framework for a 3R robotic arm using PTC working with multi-CAD data, intuitive 3D design, create 2D Creo Parametric 2.0 and also to identify its advantages and drawings faster, test real world conditions etc [3]. In a disadvantages for such analysis. Trajectory of the robotic arm is kinematic analysis the position, velocity and acceleration of all optimized by considering the shortest path as an objective the links are calculated without considering the forces that function between the initial and final position which results in cause this motion. The kinematics separate in two types, straight line motion using an effective optimization technique forward kinematics and inverse kinematics. Both forward known as Teaching learning based optimization (TLBO). kinematics and inverse kinematics are used in this paper for the Intermediate positions of the optimized results are taken as an path planning of a 3R robotic arm [4,5] . The path planning is input for the simulation of the 3R robotic arm in PTC Creo the planning of the whole path which refers to the complete Parametric 2.0.The results obtained by using TLBO and PTC route traced from the start to the goal end point. The path is Creo Parametric 2.0, such as angular positions, joint velocities made up of a number of segments and each of these path and joint accelerations are compared based on RMS errors. The segments is continuous and is called trajectory. This is verification of the obtained results by both the methods allows significant, when considering a trajectory planner, which us to qualitatively evaluate, underline the rightness of the basically chooses a locally optimal direction, as opposed to a chosen model and to get the right conclusions. complete path [6]. Tasks of can be classified in different ways. For example, different path planning strategies can be used in the case of different situations. There are two INTRODUCTION types of constraints that must be considered in path planning. Simulation is the method for emulating and predicting the First, the motion of a robot can be restricted by obstacles and behavior and the operation of a robotic system based on the obstacle constraints have to be used. On the other hand there model of the physical system [1]. Simulation provides core can be some kind of constraints for path selection. These simulation tools to test designs and make the decisions to constraints are known as path constraints [7]. In this simulation, improve quality. The full integration creates a short learning straight line trajectory is considered as a path constraint. In this curve and eliminates the redundant tasks required with paper, to aid the description of the path planning problem, a traditional analysis tools. Component materials, connections, generalized statement of the optimization criteria is given. This and relationships defined during design development are fully is presented for both the measure of performance and understood in simulation [2]. Products can be tested for strength constraints. The first most important measure of performance is and safety, and also the kinematics can be fully analyzed. The initial and final coordinates of robotic and to get main aim of this paper is to generate a model for kinematic the straight line trajectory. To find this and other factors, a

1 Copyright © 2014 by ASME number of relations will be derived. First assume that the path is position will have well defined initial and final acceleration made up of a number of discrete segments (trajectories). These which requires fifth order trajectory to be used in this section. segments are linked together to form the path of motion. The fourth order trajectory to be used from the initial to the Straight line motion is defined as the motion along a straight intermediate position is given by Equation (1). line or movement of a rigid body along a straight line and  2 3  tatatataat 4 )1( represents the shortest distance between the two points in the ii 1,   iiii 210 i 3 4 iiii 3D workspace of any robot. The straight line motion from the Where (a ,…,a ) are constants to be determined. The required source to the goal covered is known as the straight line i0 i4 positions, velocities and accelerations can be determined as trajectory [8]. The applications of straight line motion includes given in Equations. conveyor belt operations, straight line seam arc welding, inserting peg into a hole, threading a nut onto a bolt, performing   aii 0 , screw transformations, for inserting electronic components onto  2 3  TaTaTaTaa 4 , PCB etc. In the present world of , dependency on  101 2 3 4 iiiiiiiiii robotics has significantly increased and hence the development .   a , in this field also. Various software, specialized for robotics are i1 available for specific and specialized purpose such as Webot, . 2 3 , RoKiSim, EyeSim, Robotics Simulator, RoboLogix etc. Apart  i1 21 3  432 4TaTaTaa iiiiiii from having these specialized software for robotics, PTC Creo .. Parametric 2.0 is used in this paper because it is easily   2ai2 (2) accessible, user friendly, used in many industries and is Where Ti is the execution time from point i (initial position) to relatively new version of PTC and so far no work has been point i+1(intermediate position). The above equation can be reported on simulation of 3-R robotic arm using PTC Creo solved for the required constants (ai0,…,ai4) from the given Parametric 2.0. In this paper, first the design of 3-R manipulator values of initial position and design variables. After obtaining system is generated and according to the problem statement, it values of constants, the intermediate point (i+1)'s acceleration is required to follow a straight line to move between desired can be obtained as given in Equation (3). .. coordinates using the inputs obtained from optimization through 2 TLBO. The procedure is discussed in the section of  i1 62 32  12 4TaTaa iiiii )3( methodology. The fifth order trajectory to be used between intermediate and final position is given by Equation (4). MATHEMATICAL MODELING AND OPTIMIZATION 2 3 4 5 In this paper, three degree of freedom planar robotic arm   ,1 fi )( 210 3 4  5tbtbtbtbtbbt iiiiiiiiiii )4( is considered as shown in Figure 3, where, the end effecter is required to move from starting point to final point in free work Where (bi0,…,bi5) are constants to be determined. The required space [9]. For the motion planning of the 3R robotic arm, point- positions, velocities and accelerations can be determined as to-point trajectory is considered which is connected by several given in Equation (5). small segments. For the considered problem the complete . trajectory is divided into two parts which results in one   b  i  b ii 0 , i1 intermediate position in-between initial and final position of the  2 3 4  TbTbTbTbTbb 5 robotic arm. Initial joint angles are obtained by using inverse  2101 3 4 5 iiiiiiiiiiii , kinematics, which requires coordinates of initial position (xi,yi) . 2 3 4 and angle Øe for the end effecter. Initial and final velocity (vip ,  i1  5432 TbTbTbTbb 21 3 4 5 iiiiiiiii , vfp =0, p=1,2,3) and acceleration (aip , afp =0, p=1,2,3) are assumed to be zero for all the joints. Intermediate position, ..  i  2b velocity and acceleration are considered as the design variables, i2 , .. which can vary during the optimization process in-between the 2 3 lower and the upper limits specified. As initial acceleration is  i1 62 32 iii 4 ii  2012 5TbTbTbb ii )5( specified and intermediate acceleration is required to be obtained, so, fourth order trajectory is used from the initial to Equation (5) is required to be solved for the six unknowns from the intermediate position, which only requires initial the given final position and design variables. acceleration. Trajectory from the intermediate to the final For obtaining a straight line trajectory, the robot motion position will have initial acceleration equals to the final planning is converted into an optimization problem , which acceleration of the fourth order trajectory at the intermediate minimizes the distance between the initial and the final position. position to maintain the continuity of the acceleration for the The expression for the minimum Cartesian length is given by trajectory. So, trajectory from the intermediate to the final equation 6.

2 Copyright © 2014 by ASME b optimization algorithms population consists of different design clength    j yxyxdf ),(,),( j1  )6( variables. In TLBO different design variables will be analogous j2 to different subjects offered to learners and the learners‟ result is analogous to the „fitness‟ as in other population based Where, (x,y)j represents the Cartesian coordinates of jth optimization techniques. The teacher is considered as the best position and d((x,y)j, (x,y)j-1)) calculates the distance between j solution obtained so far. The process of working of TLBO is and j-1 positions. divided into two parts. The first part consists of „Teacher Phase‟ The dynamic equations of the 3R robotic arm are calculated and the second part consists of „Learner Phase‟. The „Teacher using Lagrangian-Euler dynamics algorithm [10]. Constraints Phase‟ means learning from the teacher and the „Learner Phase‟ are imposed on the problem in the terms of maximum torques means learning due through the interaction between learners. taken by the joints calculated by using Lagrangian-Euler Teacher Phase: Update the solution using Equation (11). If the dynamics algorithm. The three constraints for three joints are new solution is better than the existing solution, replace the given by Equation (7). existing solution with the new one.

  MTMrXX  (11) gi(X): Tori≤Torimax, (7) , , iFnewiioldinew Obtain the value of objective function. If the new solution is where, i=1,2,3 represents joint, X represents the design better than the existing solution, replace the existing solution variables. with the new one. Further constraint is imposed on the problem to ensure the For i=1:P robotic arm to reach the final position. The solution is n Randomly choose another learner X , such that i≠j considered as infeasible, if the final position is not reached with j If f(X )

3 Copyright © 2014 by ASME METHODOLOGY The methodology of the whole procedure is shown in figure 2.

Problem statement (to obtain straight line)

Generation of 3-D model in PTC Creo Parametric 2.0 (b) with specified parameters

Optimization of shortest path between specified coordinates using TLBO

Data like intermediate position and intermediate time which are () obtained from TLBO are used as an

input to the generated model to achieve similar motion.

Kinematic parameters and coordinated are obtained

Comparison of results

(d) obtained from MATLAB and that from PTCCreo Parametric 2.0

Five such sets are obtained using same steps

Figure 2. Flow chart of methodology

First, the individual links are generated according to the (e) problem statement. Volume of the links is found out and Figure 1. Five best results obtained using TLBO accordingly the material with suitable density to satisfy the mass a-case1, b-case2, c-case3, d-case4, e-case5 property is selected. The base (separately generated) is fixed and the links are assembled and servo motor is introduced at each joint by giving different constraints in PTC Creo

Parametric 2.0 as shown in figure 3.

4 Copyright © 2014 by ASME After giving input in all the servo motors, kinematic analysis is done to obtain the motion from initial to final position. Starting and final time is given in the analysis in such a way that it satisfies the coordinate constraints as shown figure 5.

Figure 3. Initial position of generated model

The coordinate system is generated taking base as the origin and selecting axes such that the model‟s motion is in X-Z plane. Constructing of coordinate system can be done by two ways in PTC Creo Parametric 2.0. First option is CSYS axes which enable to rotate the X, Y and Z axes of the new coordinate system with respect existing coordinate system. The second option is reference; it enables to select reference geometry for any two axes of coordinate system. By defining these two axes will automatically orient the third axis. This model is created by using the first way. Intermediate angular positions at corresponding intermediate time are generated from TLBO for each link of the model. These respective data are used as an input after suitable conversion in PTC Creo Parametric 2.0 for each motor in the form of table input. Then interpolated values Figure 5. Analysis definition of generated model are obtained in the form of „spline fit‟ as shown in figure 4.

This analysis results in the motion leading final coordinate as given in the problem statement as shown in figure 6.

Figure 6. Final position of generated model in one of the cases

Now coordinates of the tip of the model is analyzed throughout the motion by giving suitable parameters like „Measure v/s Measure‟ and selecting proper axes in the Measure Results

option as shown in figure 7. Figure 4. Parameters in one of the servo motors

5 Copyright © 2014 by ASME The results in the form of graphs are exported to excel giving values of angular positions, velocities and acceleration with corresponding interpolated time; and coordinates. All these data, along with data (converted in same units to that of data from PTC Creo Parametric 2.0) obtained from TLBO are compared in the graphical form and then the RMS value of error/difference is found out. Following figures show graphical comparisons for one of the five sets of results.

Figure 7. Measurement analysis

Figure 10. Comparision between coordinates of PTC Creo Parametric 2.0 and TLBO

Figure 8. X (inch) v/s Z (inch) Coordinates

Now graphs for angular positions, velocity and acceleration with respect to time are obtained in PTC Creo Parametric 2.0 for each servo motor as shown in figure 9.

Figure 11. Position (degree) v/s Time (sec) of one of the links

Figure 9. Set of graph of angular positions (degree), joint 2 velocities (degree/sec) and joint acceleration (degree/ sec ) Figure 12. Velocity (degree/sec) v/s Time (sec) of one the links with respect to time respectively

6 Copyright © 2014 by ASME The graphs in figure (11-13) are for one of the three servo motors. Similar graphs are obtained for all three motors and for all the five set of values.

In order to judge the accuracy of TLBO to be used as reference for motion using PTC Creo Parametric 2.0, results of TLBO (coordinates of tip) are compared with that of ideal motion (called exact solution) and total distance travelled during motion of tip is found out for both TLBO and exact solution in all the five sets and RMS value of error is found out as shown in Table 1.

Figure 13. Accleration (degree/sec2) v/s Time (sec) of one of the links

Table 1. Comparison of errors (Here exact/ desired length is 3.07495 and all the errors are absolute errors with respect to length in exact solution)

Table 2. Comparison of errors of PTC Creo Parametric 2.0 and TLBO coordinates with the coordinates of exact solution (Straight- Line) given points

The results like angular positions, joint velocities, joint obtained and difference in the graphs are compared by finding accelerations for each link and coordinate of the tip in all the out the RMS values of differences/error for all the sets, the five cases in both TLBO and PTC Creo Parametric 2.0 are values of which are shown in Table 3.

Table 3. RMS Values of Positions, Velocities and Accelerations

7 Copyright © 2014 by ASME RESULTS AND DISCUSSIONS cannot be used as Polynomial Input in servo motor parameter Ideal total distance required to travel by tip of link is as maximum degree of input for polynomial is three. Apart 3.07495 and results from Table 1 show that distance travelled from that, the reference of angles between two entities (links in in results from TLBO has absolute value of variation with this case) cannot be changed manually; it is taken by PTC respect to exact solution ranging from 0.023684 to 0.026872. Creo Parametric 2.0 as default. It leads to enormous Also, results from Table 2 show the variation of coordinates calculation while converting in parameters similar to that of obtained in PTC Creo Parametric 2.0 and TBLO in the terms TLBO so that they can be compared. of RMS value of the difference. It varies in PTC Creo Parametric 2.0 from 0.062227 to 0.085634 and that in TBLO from 0.002827 to 0.029854, indicating variation is very small CONCLUSIONS TLBO is an effective method to obtain a straight line and motion is almost straight line. Results of Table 3 shows the motion as the RMS value of error between the exact solution RMS value of errors in PTC Creo Parametric 2.0 with respect and TLBO is significantly less. Also after observing various to results obtained in TLBO. Absolute average value of errors results and comparing TLBO and PTC Creo Parametric 2.0, it for Positions show that variation is little but for Velocities and may be concluded that the model generated in PTC Creo Accelerations show greater variation because only six values Parametric 2.0 follows almost straight line. There are also of intermediate time and positions were introduced out of forty some limitations along with certain possibilities of obtained values. But overall result suggests that PTC Creo improvement as having limitations lead to the focus on further Parametric 2.0 is a good method for simulation of 3-R robotic improvement. Work can be reported in future to have some arm. In spite of having so many advantages like being user generalized mathematical formula/model so as to achieve friendly, reliable, having wide applications etc. some of the desired motion just by giving initial and final coordinates, so limitations are found in PTC Creo Parametric 2.0 while that dependency on another model like TLBO can be working like- although the graphs obtained in PTC Creo eliminated. The future work will consist of implementing the Parametric 2.0 can be exported as excel files but tabular input, proposed methodology for a robotic arm considering tool directly from the excel cannot be used as Table Input in servo orientation and also it can be validated experimentally. motor parameter for kinematic analysis. Also upon having equation of angular displacement as a function of time, it

REFERENCES [1] Zha, X.F., Du, H., 2001, “Generation and simulation of colony (ABC) optimization techniques”, IEEE International robot trajectories in a virtual CAD-based off-line Systems Conference, pp. 381-386. programming environment”, The International Journal of [10] Craig, J.J., 1989, “Introduction to Robotics: Mechanics and Advanced Manufacturing Technology, 17(8), pp. 610- Control”, 7, Addison-Wesley. 624. [11] Rao, R.V., Savsani, V.J., Vakharia, D.P., 2011, “Teaching– [2] Vollmann, K., 2002, “A new approach to robot simulation learning-based optimization: A novel method for constrained tools with parametric components”, IEEE International mechanical design optimization problems. Computer-Aided Conference on Industrial Technology , 2, pp. 881-885. Design”, 43(3), pp. 303-315. [3] http://www.ptc.com/product/creo/parametric [12] Rao, R.V., Savsani, V.J., Vakharia, D.P., 2012, “Teaching– [4] Crane III, C.D., Duffy, J., 2008, “Kinematic analysis of learning-based optimization: an optimization method for robot manipulators”, Cambridge University Press. continuous non-linear large scale problems”, Information [5] Yetim, C., 2009, “Kinematic Analysis of Robotic Arm”, Sciences, 183(1), pp. 1-15. Yildiz Technical University, Istanbul (Turkey), pp. 1-2. [6] Pfeiffer, F., Johanni, R., 1987, “A concept for [13] Rao, R.V., Savsani, V.J., 2012, “Mechanical design manipulator trajectory planning”, IEEE Journal of optimization using advanced optimization techniques”, Robotics and Automation, 3(2), pp. 115-123. London Springer. [7] Shin, K.G., McKay, N.D., 1986, “Selection of near- [14] Hosseinpour, H., Niknam, T., Taheri, S.I., 2011, “A modified minimum time geometric paths for robotic manipulators”, TLBO algorithm for placement of AVRs considering DGs”, IEEE Transactions on Automatic Control, 31(6), pp. 501- 26th International Power System Conference, Tehran, Iran. 511. [15] Pawar, P.J., Rao, R.V., 2013, “Parameter optimization of [8] Taylor, R. H., 1979, “Planning and execution of straight machining processes using teaching–learning-based line manipulator trajectories”, IBM Journal of Research optimization algorithm”, The International Journal of and Development, 23(4), pp. 424-436. Advanced Manufacturing Technology, 67(5-8), pp. 995-1006. [9] Savsani, P., Jhala, R. L., Savsani, V. J. 2013, “ Optimized [16] Ramanand, K.R., Krishnanand, K.R., Panigrahi, B.K., trajectory planning of a robotic arm using teaching Mallick, M.K., 2012, “Brain Storming Incorporated Teaching learning based optimization (TLBO) and artificial bee

8 Copyright © 2014 by ASME Learning–Based Algorithm with Application to Electric [18] Niknam, T., Golestaneh, F., Sadeghi, M.S., 2012, Power Dispatch”, Swarm, Evolutionary, and Memetic “Multiobjective Teaching–Learning-Based Optimization for Computing, Springer Berlin Heidelberg, pp. 476-483. Dynamic Economic Emission Dispatch”, IEEE Systems

Journal, 6(2), pp. 341-352. [17] Toğan, V. 2012, “Design of planar steel frames using [19] Jani, A., Savsani, V.J., Pandya, A., 2013, “3D affine teaching–learning based optimization”, Engineering registration using teaching-learning based optimization”, 3D Structures, 34, pp. 225-232. Research, 4(3), pp. 1-6.

9 Copyright © 2014 by ASME