Dynamic analysis of a five degree of freedom robotic arm using MATLAB-Simulink Simscape

In this paper, a dynamic analysis for a 5 degree of freedom (DOF) robotic arm with serial topology is presented. The dynamic model of the robot is based on importing a tri-dimensional CAD model of the robot into Simulink®-SimscapeTM-MultibodyTM. The dynamic model of the robot in Simscape is a necessary and important step in development of the mechanical structure of the robot. The correct choice of the electric motors is made according to the resistant joint torques determined by running the dynamic analysis. One can import complete CAD assemblies, including all masses, inertias, joints, constraints, and tri-dimensional geometries, into the model block. The first step for executing a dynamic analysis is to resolve the Inverse Kinematics (IK) problem for the redundant robot. The proposed method for solving the inverse kinematic problem for this type of structure is based on a geometric approach and validated afterwards using SimScape Multibody. Solving the inverse kinematics problem is a mandatory step in the dynamic analysis of the robot, this is required to drive the robot on certain user-imposed trajectories. The dynamic model of the serial robot is necessary for the simulation of motion, analysis of the robot’s structure and design of optimal control algorithms.


Introduction
The benefits of introducing robots into the industry include control and productivity management and a marked increase in product quality. Robots can work day and night without getting tired or reducing their performance. They consistently achieve substantial cost price reductions primarily by reducing the consumption of raw materials and due to the automatic processing. The use of robots also brings advantages to the competitive market. Through the rapid development of industry and computing technology, we can observe the evolution of robots to intelligent generations that give them the characteristic to "understand" the environment in which they work. The general structure of robots depends very much on the utility and purpose for which they are produced. Generally, robots are made of components similar to those of human beings, so they have an anthropomorphic structure. They are designed to reproduce the behaviour of humans and animals. This quality of nonhuman systems of having human or human-like qualities is called anthropomorphism. The aim of this paper is to design an anthropomorphic robotic arm with five degrees of mobility, comparable to that of human beings and to examine, study and simulate its dynamics and kinematics. The main goal of this paper is to create an anthropomorphic, redundant robotic arm with a simple structure, light weight, capable of manipulating objects with a mass of up to 0.2 [Kg] and a minimum energy consumption and which can be attached to a mobile platform with high manoeuvrability, such as the one in the below Figure 1.

Fig. 1. Four-wheel drive platform for Mobile Manipulation
During the development of the project, aspects related to the mechanical structure of the arm, design, the kinematic part of the robot and the part of simulation and manipulation of a virtual model of the robotic arm were materialized. The conceptual result is a manipulator which acquires five degrees of mobility and a workspace comparable in shape to one of the human superior limbs, the dexterity being obtained with the help of the 5th class rotation joints. After consulting the literature, the mathematical equations for the corresponding kinematic part were determined, equations which are the foundation of a future virtual dynamic simulation [1][2][3][4].

Kinematics of industrial manipulators and robots
Kinematics deals with determining the main parameters that define the motion of a body. In this sense, various methods have been developed with which to determine the equations of positions, the distribution of speeds and the distribution of accelerations for any element in the structure of a kinematic chain [5][6][7][8][9]. Within the robot kinematics, two fundamental types of problems can be distinguished: direct kinematic problem and inverse kinematic problem. For the direct problem of positions, if the geometric characteristics of the kinematic chain and the laws of variation of the generalized coordinates are considered known, one must determine of the laws of variation of the absolute position and the absolute orientation of the characteristic point or the position of the final effector. Within the inverse kinematic problem, the geometric characteristics of the kinematic chain are considered known, as well as the laws of variation of the different absolute kinematic parameters and one must determine the relative kinematic parameters of the kinematic chain or the relative movements between two consecutive elements of the robot [10-13].

Direct kinematics analysis of positions
Knowing the relative parameters (i = 1..5) and the shape of the homogeneous transfer matrices between elements, respectively between the coordinate systems attached to the elements, one can determine the total transfer matrix between the system k 7 (x 7 , y 7 , z 7 ) and the system k 0 (x 0 , y 0 , z 0 ).

Fig. 2. Kinematic diagram of the 5 DOF robotic arm
Based on the above kinematic diagram of the robot, one can compute the direct and the inverse kinematics of the robotic arm. The first step in resolving the kinematics of the robot is to compute the total homogenous matrix that characterise the entire movement of the robot.

H05 = A1⸱A2⸱A3⸱A4⸱A5⸱A6⸱A7⸱A8⸱A9
(1) Were: The position and orientation of the end effector is expressed by the matrix: Using the Euler angles or the Pitch, Roll and Yaw angles, it results that the general transfer matrix that characterizes the absolute orientation of the robot, respectively: rotation around the OX axis with angle , rotation around the OY axis with angle and rotation around the OZ axis with angle is of the form: Equating the matrices (2) and (3) one obtains the following system of equations: { φ x = -arctan2(a 23 ,a 33 ) φ y = arcsin(a 13 ) respectively the absolute position of the final effector: In principle, this is the way to solve the direct kinematic problem for serial robots, by determining the homogeneous transfer matrices that characterize the structure of the robotic arm, followed by multiplying the matrices one by one, respecting the established order. Subsequently, the position and orientation of the end effector are extracted from the total transfer matrix Hi using the expressions (4), (5).

Inverse kinematic analysis of positions
To solve this type of kinematic problem we start from the fact that we know the position and orientation of the final effector x, y, z, , with respect to a fixed reference system and we want to find the relative positions between the robot elements. In 3D space it is known that a body can have six degrees of mobility. Thus, if a coordinate system , , is attached to this body, the position and orientation of this body with respect to a fixed coordinate system 0 , 0, 0 , 0 , 0 is expressed by the absolute parameters x, y, z, , where: x -represents the projection on the axis 0 x 0 , of the distance from ki to k0; y -represents the projection on the axis 0 y 0 , of the distance from ki to k0; z -represents the projection on the axis 0 z 0 , of the distance from ki to k0; -represents the rotation of the coordinate system ki around the axis 0 0 ; -represents the rotation of the coordinate system ki around the axis 0 0 ; -represents the rotation of the coordinate system ki around the axis 0 0 ; As a result, it is desired to determine the relative parameters which represent the rotations between elements at the level of kinematic joints. In this case (i = 1..5);

Fig. 3. Schematic used for indirect kinematics
Homogeneous transfer matrices are A1, A2, A3, A4, A5, A6, A7, A8, A9. The relative movement from the first joint, 1 is determined using the formula: To determine the position of C joint one can use the next system of equations: Hc=H ⸱ A 9 -1 , from where it results: (3,4) and The distance from C joint to A joint can be determined using the following expression: For 3 angle the generalized Pythagorean formula will be used, as following: In the BCD triangle, using the same theorem (P.G.): Next one can determine angle: In the ACD triangle, using the P.G theorem one can determine: The angle cand be determined using the expression: Knowing α and β angles we calculate the value of 2 : The following change, B=A 1 ·A 2 ·A 3 ·A 4 ·A 5 ·A 6 is made in the total transfer matrix H, because they are known, and it results that: This means that: = · 1−6 (17) From the above system of equations (16) it results: Knowing the values for all ci,j, it results that: and:

Robotic arm design
This chapter includes aspects related to the development of the mechanical and the electronic part of this robot, but also aspects regarding the dynamic analysis of the robot. One of the main objectives of the research was to develop a small payload robotic arm with 5 DOF and reduced power consumption. The robotic arm must equip a four-wheel drive mobile robot. A mandatory criterion in the development of the robot was choosing the right electrical motors so that the robot could perform imposed tasks. Because the robotic arm is mounted on an autonomous vehicle the power drawn from the vehicle battery should be minimized. The dynamic analysis of the structure contributes to the right sizing of the electrical motors.

Pre-determination of joint torques
The next step is to pre-determine the joint torques for the robotic arm so one can model the robot intro a 3D CAD software. For this step, the following issues were considered: -the whole ensemble was divided into three subassemblies.
-the maximum length of subassembly 1 is h2 = 106 [mm], of subassembly 2 is l1 = 95 [mm] and of subassembly 3 is l2 = 190 [mm]; -the centres of gravity for subassemblies were considered to be placed in the middle of segments h2, l1 and l2; -it was approximated that the maximum mass of the subassembly is m1 = 0.

Choice of servomotors specific to each kinematic coupling
The choice of the electrical servo motors was made based on the above results. Following the calculations, DC servo motors manufactured by Power HD were used to actuate the kinematic joints. The servomotor model used in robot structure is Power HD High Torque 1501MG for each joint. In the second kinematic joint two Power HD servo motors were used. It is one of the most popular servos with unique M/P technology and metal gear technology. This model offers one of the most powerful torque and speed available in any servo. The characteristics are: powerful three-pole ferrite motor, light weight metal gears, is equipped with a revolutionary metal / plastic case, has an output shaft with double ball bearing support.

Mechanical structure and design of the robotic arm
The mechanical structure of the robotic arm was designed using a 3D CAD program. After the 3D model was completed the virtual structure was converted into the Simulink-Simscape environment. Simscape offers to the users the possibility to analyse the dynamic behaviour of a kinematic chain in such way that one can introduce as input data, the forces acting on a mechanism and its desired motion and as output data one can collect the forces transmitted through the entire kinematic chain. The 3D virtual assembly consists of five subassemblies and a clamping device that will be presented and described in the following images in isometric view.

Dynamic analysis of the 5DOF robot
The dynamic model of the 5 DOF robot is modelled in Simscape and is based on an import form a 3D CAD model. The Simscape virtual model is presented in Figure 7 and Figure 8. This virtual 3D model is necessary because all the robot physical characteristics like elements mass, inertia, dimension vector are imported in Simscape. The Simscape inverse dynamics model is based on kinematic equations of motion and by using differential equations one obtains the joint torques needed to produce the imposed motions. To obtain the joint torques necessary for a given trajectory we have imposed that the forces acting on the end effector are those resulted from manipulating a cylindrical body with the mass m =0.2 [kg]. So, the forces acting on the end effector during a circular trajectory are as follows: Fz = -9.81⸱0.2 N; Fx, Fy = 0N. As a result of end effector circular motion, the torques determined from the dynamic analysis have a sine wave variation. The torque variation is presented in Figures 9.   Fig. 9. Joint torques variation after running the dynamic analysis The torque developed by Power HD High Torque 1501MG servomotor used in each kinematic joint is sufficient to pick and place a body with the mass of 0.2 [Kg]. The physical structure of the 5 DOF robot developed after the entire dynamical analysis is presented in Figure 10 and Figure 11.

Conclusions
The main goal of this work was to design and develop an anthropomorphic robotic arm with five degrees of mobility with a simple structure, light weight and capable of manipulating objects with a mass of up to 0.2 [Kg] and a minimum energy consumption. An important aspect was that the robot can be attached to a mobile platform with high manoeuvrability. To be able to develop the robotic arm the kinematics and the dynamics of the robot had to be analysed. The kinematics was necessary to drive the robot arm through an imposed trajectory and the dynamic model was necessary to determine the joint resistant torques when the robot manipulates a body with the mass of 0.2 [Kg]. The kinematics and the dynamics of the robot were simulated in Simulink-Simscape. After simulations, the inverse kinematics equations and the dynamic model of the robot were correct and were validated during the virtual simulations. The two-analysis the static