Function Analysis of Industrial Robot under Cubic Polynomial Interpolation in Animation Simulation Environment

In order to study the effect of cubic polynomial interpolation in the trajectory planning of polishing robot manipulator, firstly, the articular robot operating arm is taken as the research object, and the overall system of polishing robot operating arm with 7 degrees of freedom is constructed. Then through the transformation of space motion and pose coordinate system, Denavit-Hartenberg (D-H) Matrix is introduced to describe the coordinate direction and parameters of the adjacent connecting rod of the polishing robot, and the kinematic model of the robot is built, and the coordinate direction and parameters of its adjacent link are described. A multi-body Dynamic simulation software, Automatic Dynamic Analysis of Mechanical Systems (ADAMS), is used to analyze the kinematic simulation of the robot operating arm system. Finally, the trajectory of the robot manipulator is planned based on the cubic polynomial difference method, and the simulation is verified by Matrix Laboratory (MATLAB). Through calculation, it is found that the kinematic model of polishing robot operating arm constructed in this study is in line with the reality; ADAMS software is used to generate curves of the rotation angles of different joint axes and the displacement of end parts of the polishing robot operating arm changing with time. After obtaining relevant parameters, they are put into the kinematic equation constructed in this study, and the calculated position coordinates are consistent with the detection results; moreover, the polishing robot constructed in this study can realize the functions of deburring, polishing, trimming, and turning table. MATLAB software is used to generate the simulation of the movement trajectory of the polishing robot operating arm, which can show the change curve of angle and angular velocity. The difference between the angle at which the polishing robot reaches the polishing position, the change curve of angular velocity, and the time spent before and after the path optimization is compared. It is found that after path optimization based on cubic polynomial, the change curve of the polishing robot's angle and angular velocity is smoother, and the time is shortened by 17.21s. It indicates that the cubic polynomial interpolation method can realize the trajectory planning of the polishing robot operating arm, moreover, the optimized polishing robot has a continuous and smooth trajectory, which can improve the working efficiency of the robot.


I. Introduction
A T present, China's manufacturing industry is developing rapidly, and customers have higher and higher requirements on the surface quality of castings. Labor costs and environmental awareness are also increasing, which greatly limits the development of China's foundry industry. In the process of different casting production, sand treatment, molding, core making, and other processes have gradually achieved the goal of automatic production and intelligent management, but the post-processing technology of casting is still in the stage of manual operation [1], [2]. Facing the high demand of enterprises on the surface quality of castings, the research on casting polishing technology and related equipment has become a big trend. The appearance of flash and burr on the surface of the casting can not only affect the appearance of the casting, but also affect the performance of the casting and even the service life of the casting [3], [4]. Therefore, polishing the surface of the casting is a very important step in the manufacturing industry.
With the continuous progress of industrial technology, enterprises have been gradually moving towards the direction of intelligence and automation. The castings polished by the robot have the advantages of better quality, higher efficiency, strong flexibility, and strong adaptability [5]. Therefore, robot polishing automatic production line and casting polishing have gradually become the best choice for enterprises in the manufacturing field. Moreover, the polishing of sports robot can reduce the risk of injury to human body, ensure the uniformity of polishing quality, improve the efficiency of operation, and reduce the cost [6], [7]. In recent years, experts at home and abroad have explored robot polishing equipment and its automatic polishing technology, but relatively few studies have been conducted on the polishing of large castings [8]. Polishing large castings requires a high load on the robot, while for castings with complex surface shapes, manual polishing is still required [9]. The research prospect of polishing robot is broad, and the intelligent processing system of robot is of great significance to improve the working efficiency of polishing. Therefore, it is very important to shorten the running time of the robot to improve the efficiency. Some studies have shown that polynomial interpolation can carry out the optimal time trajectory planning [10], [11]. Among them, cubic polynomial interpolation is widely used. Zubko et al. calculated the accelerated light scattering based on cubic polynomial functions and found that the interpolation method could accurately calculate the light scattering characteristics [12]. Zhang et al. showed that cubic polynomial interpolation could present a better linear relation than quadratic polynomials [13]. Moreover, a large number of studies have proved that the application of cubic polynomial interpolation in motion trajectory planning under different conditions and constraints can effectively improve the running speed [14]. Dincer et al.combined cubic polynomial interpolation with Bézier curves for the trajectory planning of 2-dof parallel structure, and found that using cubic polynomial interpolation could obtain smoother trajectory curves [15].
However, at present, the research on the path planning of seven-degree-of-freedom polishing robot by cubic polynomial interpolation is still relatively few. Therefore, firstly, the mechanism types of common industrial robot operating arms are discussed, and the polishing robot operating arm system is designed with articular robot operating arms as the research object. Through the transformation of the spatial coordinate system, the kinematic model of the polishing robot manipulator is constructed. Then, virtual simulation software is used to verify the kinematic model of the polishing robot operating arm. Finally, based on cubic polynomial interpolation, the trajectory of the polishing robot manipulator is planned. The results of this study are intended to lay a foundation for optimizing the movement trajectory of the robot's operating arm and improving its polishing efficiency.

A. Mechanism Type of industrial Robot Manipulator
Common industrial robot operating arm structures include rectangular coordinate type, cylindrical coordinate type, polar coordinate type, and joint coordinate type, etc. [16]. Among them, the rectangular robot operating nose has the simplest structure, with only three axes in the cartesian coordinate system: the X axis, the Y axis (the horizontal motion axis), and the Z axis (the vertical motion axis). Articular robots operate arms that are similar to human arms, with structures that mimic the human upper and lower arms, shoulder, elbow, and wrist joints. These manipulators have 5 to 6 degrees of freedom and can touch all the points in the workspace, and their movement trajectory while working can form most of the spherical motion. The operational performance of common structural industrial robot operating arms is compared, and the results are shown in Table  I. Among industrial robot operating arms with different structure types, articular robot operating arms are more compact in structure and manoeuvrable in working space. Therefore, it requires less joint torque, and its own energy consumption is low, and the joint sealing and dustproof effect is excellent. Therefore, joint coordinate robot arm is finally selected as the object of this study. There are two main methods for robot polishing and casting, which are respectively used for medium and large castings, medium and small castings. The former is the polishing tool held by the robot arm for polishing processing, while the latter is the casting held by the robot arm close to the polishing tool for polishing processing [17]. The automobile cylinder castings are taken as the polishing object, and the corresponding polishing robot structure is designed to improve the polishing efficiency of automobile manufacturing industry and reduce the cost in the production process [18]. Therefore, the robot structure with strong flexibility and simple structure should be selected. In the end, the way of polishing the casting with the polishing tool held by the robot arm to polish the automobile cylinder block is chosen. The height of each stand in the car cylinder block convex table is different, and the position distribution is not uniform. Therefore, the polishing robot arm designed in this study must have such characteristics as high motion accuracy, low return clearance, low rotational inertia, and nonvariability. Finally, the specific performance indicators are determined as follows: The grinding speed is 6000rpm/min. The grinding force is 110N. The quality roughness Ra of the cylinder surface after polishing should be equal to and less than 3.0. The arms of the polishing robot extend between 600 and 1000mm.
The operating arm of the polishing robot is mainly composed of the base, shoulder joint, big arm, elbow joint, forearm, and wrist joint. Moreover, the articular structure connected in series between the operating arms can best imitate the motion mode of human arms. The manipulator has 7 rotation axes, and the corresponding manipulator has 7 degrees of freedom. In the process of different coaxial rotation motions, it will receive loads in both radial and axial directions. Therefore, the connection mode of bearing between connecting rod and shaft adopts double-row angular contact ball. The specific structure of each joint of the manipulator is as follows: the shoulder joint is located at the top of the whole connecting rod drive chain and has 3 degrees of freedom (namely 3 rotating axes). The angles of different rotating axes are respectively 180°(-90°~+90°), 180°(-90°~+90°) and 210°(-60°~+150°); the elbow joint is located between the upper arm and the lower arm of the robot arm, and has 2 degrees of freedom (i.e. 2 joint axes). The angles of different joint axes are 240°(-180°~+60°) and 180°(-90°~+90°) respectively; The wrist joint has 2 degrees of freedom (i.e. 2 joint axes), and the angles of different joint axes are all 180°(-90°~+90°). The structure of the polishing robot arm designed in this study is briefly shown in Fig. 1.
In order to better meet the operating requirements of the polishing robot operating arm [19], AC servo motor is selected for this study. In addition, other joint modules include harmonic gear reducer, encoder, brake, transmission gear, and support frame. According to the actual volume of the cylinder block to be polished, the outer cylinder working space size of 350*350*350 mm 2 is finally selected in this study, and the cylinder with the length and height of the bottom surface of 500 mm and 350 mm are selected as the target working space.

C. The Transformation of the Spatial Coordinate System of the Operating Arm of the Polishing Robot
Robot time -space motion is mainly divided into: firstly, forward kinematics, which refers to the relationship and parameters among the structure types and lengths of the robot's connecting rod, base and end-effector, etc, and finally, the pose problem of end-effector relative to the base coordinates is solved; secondly, inverse kinematics, it is necessary to use algebraic operation and other methods to obtain the relationship between each linkage structure, structural parameters, end-effector pose, and other information, and finally solve the variable values of each joint. In this study, the homogeneous transformation matrix method [20] is used to describe the spatial motion of the robot and the transformation relation of the linkage coordinate system, and the matrix calculation is used to solve the kinematic analysis problem of the robot manipulator.
In the spatial coordinate system, any point on the target object can be used to describe its pose. To determine the pose state of the target object on the relatively fixed coordinate system by using the 3*1 position matrix and 3*3 attitude matrix, the moving point coordinate system is {H}, and the fixed coordinate system is {O}. Then the 3*1 position matrix can be expressed as follows. (1) The cosine value of the included angle between {H} and {O}x, y, and z axes is used to describe the third-order attitude matrix. (2) And the initial coordinate system of any point P in space is {i}, and the changed coordinate system is {j}. In the general transformation of coordinate equation, P ij is the translation change matrix and R ij is the rotation transformation matrix. Then homogeneous coordinate transformation is introduced to describe the transformation process between coordinate systems, and finally the matrix M ij is obtained.
Trans (P x , P y , P z ) is the homogeneous coordinate transformation matrix after translation; Rot (k, θ) is the homogeneous coordinate transformation matrix after rotation; k is the rotation axis vector; θ is the rotation angle; n, o, and a are the cosines of the 3 directions from the coordinate system {j} to the coordinate system {i}.

D. Construction of the Kinematic Model of Polishing Robot Operating Arm
To construct the kinematic equation of the robot manipulator, the corresponding coordinate system should be set on each revolute joint. The corresponding homogeneous coordinate system equation is obtained from the relative position of each coordinate system, and then the kinematics equation of the robot manipulator is obtained [21]. In this study, D-H method is introduced to describe the coordinate direction and parameters of the adjacent connecting rod of the robot manipulator. The schematic diagram of connecting rod parameters of robot operating arm is shown in Fig. 2. The d j , θ j , a j, and α j in Fig. 2  Then in the d-h coordinate system, the pose matrix between adjacent links is as follows.
In Eq. (5), d j is linkage migration; z j-1 is the axis; θ j is the joint angle; a j is the length of connecting rod; α j is the torsion Angle of the connecting rod.
According to the homogeneous coordinate transformation method, the pose of the end-effector of the manipulator arm is solved.
D-H parameters are obtained according to the linkage coordinate system, as shown in Table II. Then, the 7 degrees of freedom is used to polish the structure characteristics of robot operating arm. Using joint variable collapse method, the 7-degree-of-freedom manipulator is transformed into a typical 6-degree-of-freedom manipulator. The inverse kinematics of manipulator is solved by algebraic method. The kinematic equation of the robot manipulator is as follows.
After a series of solutions, it is concluded that when θ 5 is 0, the robot manipulator is in a singular configuration, that is, the joint axis 5 and 7 are in a straight line. Therefore, when calculating θ 7 , the value of θ 5 can be referred to.

E. Virtual Simulation Analysis of Polishing Robot Operating Arm
In this study, ADAMS is used to analyze the kinematic simulation of the polishing robot operating arm system [22]. ADAMS is a popular virtual simulation software, and its simulation analysis steps are similar to those of CAE software [23]. The specific simulation process is shown in Fig. 3, which is mainly divided into 6 steps.
Step 1: preparation before modeling. The main work is the choice of path, coordinate system, unit system, and the setting of gravity acceleration.
Step 2: construction of the model. The main purpose of this step is to simplify the model. Under the premise of not affecting the visual effect, only the motion-related components should be retained, which can effectively reduce the difficulty of the model and improve the accuracy of model simulation.
Step 4: drive application. The Time function, STEP function, and AKISPL function can be used to define the driver.
Step 5: verification of the model. Before the simulation, the model needs to be tested, and the model is verified successfully if there is no under constraint or over constraint.
Step 6: simulation running. The Kinematic type of interactive simulation is chosen. The simulation time is set to 25s and the simulation times to 350.  When the driver is applied, the AKISPL function needs to interpolate the data using the Akima fitting method. When the manipulator is conducting forward kinematic analysis, it is necessary to define the pose of each joint and then obtain the pose of the terminal part. Therefore, in the forward kinematics simulation of the robot operating arm, it is necessary to increase the driving force for all the 7 joint axes, so that the connecting rod outside the terminal can carry out known regular motion. Taking joint shaft 1 for example, the rotary drive diagram is chosen in the software Motions, and the rotation pair at the left and right turning joints of the shoulder is selected to create the rotation drive. Functions are input into Function(time): STEP(time,0,0d,3,90d)+ STEP(time,3,0d,6,-90d)+ STEP(time,9,0d,12,-90d)+ STEP(time,12,0d,15,90d), and the type is set to Displacement. The same method is used to apply the drive to the remaining joint shafts.

F. Trajectory Planning of Polishing Robot Manipulator Based on Cubic Polynomial Interpolation
Trajectory planning is mainly to translate the command input by the operator of the robot arm into a process of describing the specific movement trajectory. Its purpose is mainly to determine the movement trajectory, movement time, speed, and other parameters of the target joint [24]. Trajectory planning of joint space mainly uses different functions to describe trajectories, and the commonly used methods are polynomial interpolation and linear interpolation based on parabolic transition [25]. In order to meet the accuracy of robot arm motion trajectory, the cubic polynomial interpolation is adopted to plan robot arm motion trajectory. Assuming that the smooth trajectory function of the joint angles at the starting and ending positions in joint space is q(t), then the trajectory function q(t) of different joints should meet the constraints of position and velocity. In order to ensure the continuity of joint motion speed, the starting and ending joint speeds are set to 0. Then the trajectory function before and after can be expressed as follows.
In Eq. (8), q 0 is the initial joint angle; q f is the joint angle of termination. t f is the termination time.
The cubic polynomial of the constraint conditions of the boundary is determined through Eq. (8).
According to Eq. (9), the equations of joint velocity and acceleration are obtained. (10) According to Eq. (9) and Eq. (10), different linear equations containing coefficients a 0 , a 1 , a 2, and a 3 are obtained.
The boundary constraint condition is set as a unique cubic polynomial, and the corresponding constraint condition is substituted into Eq. (8) to obtain the corresponding linear equation. In order to ensure the continuity and stability of the motion when the critical starting and ending velocities are 0, the cubic polynomial function can be expressed as follows.
Then the calculation equations of joint angular velocity and angular acceleration are as follows. (14) According to Eq. (14), the function curve of joint angular velocity is a parabola, while the function curve of angular acceleration is a straight line. If the angular acceleration follows the principle of constant change, it will cause the vibration of the mechanical arm, thus increasing the wear rate of the joint parts. The robot arm doesn't stay in motion at all path points, so the information of intermediate points should be considered. The path is divided into several sections, and the adjacent path points are defined as the initial point and the termination point, then the cubic polynomial function can be used for interpolation processing, and various paths are connected smoothly. Therefore, the joint velocity is not equal to 0 just for different segments. Therefore, the constraint conditions in Eq. (8) are adjusted accordingly. (15) In this case, the cubic polynomial correlation equation is as follows.  Then, MATLAB software is used for the simulation analysis of the motion trajectory planning of the polishing robot operating arm. The whole running time is set as 5s. The starting path is X0, the middle point X1 is passed through at 2.5s, and then the end point X2 is reached after 2.5s. At the start and end of the manipulator, the joint velocities are 0. First, the inverse kinematics equation is used to calculate the angles of each joint at different path points, and then interpolation is performed every 20ms. Finally, using cubic polynomial interpolation method to plan the motion trajectory, the curve of joint axis angle with time is obtained.

A. Verification of Kinematic Solution of Operating Arm of Polishing Robot
Since the forward kinematic solution method of the robot manipulator is relatively simple, while the reverse kinematic solution operation is complicated and there are many methods, the inverse kinematic solution method proposed has been verified by an example [26]. MATLAB software is used for verification. The corresponding solver is written first, and then the inverse solution of the end of the operating arm of the robot is obtained. Finally, the different solutions obtained are put into the forward kinematic equation to determine whether the equation is applicable. The coordinates of a target point are randomly selected as (-150, 550, -450), and the attitude of the end piece when the robot manipulates the arm to reach the target point is . After the calculation of MATLAB software, the inverse solutions of each joint of the robot operating arm are obtained, and the results are shown in Table III. The results of 8 inverse kinematic solutions with different joint angles show the trend of arcs, and the forward kinematic equation is substituted to solve the problem.  ADAMS software is used to process the curve graph of the output processing data of the module, so as to generate the function curve of the operating arm of the polishing robot with different coaxial changes over time to observe the specific situation of the changes of each parameter with time more intuitively. The curves of the angles of different joint axes and the displacement of end parts over time are shown in Fig. 5. It can be concluded from Fig. 5A that the change trend of the rotation Angle of axis 4 and axis 5 is basically the same, while the change trend of the rotation Angle of axis 6 and axis 7 is basically the same. As can be concluded from Fig. 5B, the initial displacement of the manipulator in the X-axis direction (End piece1) is about -450mm, and the position moves to the positive maximum at about 15s (about 600mm), and to the negative maximum at about 21s (about -500mm). The initial displacement on the Y-axis direction (End piece2) is about -350mm, and the position reaches the positive maximum at about 14s (about 810mm), and the position reaches the negative maximum at about 21s (about -500mm). The initial displacement on the z-axis direction (End piece3) is about 400mm, and the position reaches the maximum forward direction (about 550mm) at around 16s, and the position reaches the maximum negative direction (about -810mm) at about 12s. As shown in Fig. 5, the movement trajectory curves of each joint axis and the end parts of the polishing robot constructed in this study present a continuous and smooth change trend, without any sudden change, which indicates that when the robot manipulators move, the joints and connecting rods present a stable and non-violent movement trend [27]. This also verifies the reliability of the mechanical structure of the polishing robot designed in this study. Finally, all can return to the starting position. The displacement of the end piece is calculated as (550.8mm, 400.5mm, -80.1mm), and the joint angles are θ 1 =0°, θ 2 =-90°, θ 3 =-180°, θ 4 =0°, θ 5 =0°, θ 6 =0°, θ 7 =-90°, respectively. It is put into the kinematic equation constructed in this study, and the position coordinates obtained after calculation are consistent with the detection results, which reflects that ADAMS software is used for the simulation analysis of the polishing robot operating arm, with high accuracy and reliability [28].

C. Simulation of Trajectory Planning of the Robot Operating Arm
MATLAB is the software often used for trajectory analysis simulation, which can be directly generated through programming data curve. The Robotic toolbox can be used to simulate track planning, and then output the relevant data curve. And for some special difference function, VC++ and other programming can be used to automatically generate the trajectory of the simulation program [29], [30]. MATLAB software is used to generate the movement trajectory of the polishing robot operating arm. The starting point X1 coordinate is set as (17.32, -100.00, 99.09), the intermediate point X2 coordinate is (92.17, -100.00, 79.37), and the termination point X3 coordinate is (54.88, -100.00, -100.00). The inverse kinematics equation is used to calculate the angles of each joint of the robot arm at the three path points, and the results are shown in Table IV. After the command program is input into MARLAB software, the angle curves and angular velocity curves of each joint axis are calculated and obtained. The results are shown in Fig. 6. From the simulation curve diagram, it can be intuitively observed of the changes in the angle and angular velocity of each joint axis in the whole process from the starting point of path planning to the middle point and finally to the end point. It can be concluded from Fig. 6A that the rotation angle of joint pumping 1 changes gently, while the rotation angle of joint axis 2, 3, and 7 increases gradually, and the rotation angle of joint axis 4, 5, and 6 decreases gradually. As shown in Fig. 6B Taking joint axis 1 as an example, the change trends of angular displacement and angular velocity before and after optimization are compared, and the results are shown in Fig. 7. It can be concluded from Fig. 7A and Fig. 7B that under the premise of satisfying each constraint condition, the changes of angular displacement and angular velocity of the optimized joint axis 1 are continuous smooth curves. Both the angular displacement and angular velocity curves of the joint axis 1 before optimization show a certain degree of mutation, and the time to reach the maximum displacement and angular velocity of the joint axis 1 before optimization is longer than that after optimization. Based on cubic polynomial interpolation, Walambe et al. realized the planning of vehicle prototype motion trajectory, and obtained the continuous, smooth, and optimized path trajectory, which is basically consistent with the results of this study [31]. MATLAB software is used to simulate the movement trajectory of the polishing robot operating arm reaching the polishing target point before and after optimization, and the difference of operation time before and after optimization is compared, and the results are shown in Table V. The time for the optimized polishing robot to reach the polishing position required by the motion trajectory is 45.14s, while the time after the optimization is only 27.93s, which is shortened by about 17.21s. Moreover, the polishing position required by the trajectory after optimization is consistent with that before optimization, and there is no deviation in the position. This indicates that the trajectory planning of polishing robot based on cubic polynomial interpolation can better improve the motion speed and work efficiency of polishing robot operating arm [32]- [33].

IV. Conclusion
In order to explore the effect of cubic polynomial interpolation in polishing robot path optimization, in the study, firstly, a 7-degreeof-freedom articular polishing robot operating arm system is constructed. The d-h method is introduced to construct the kinematic model of the manipulator system. The kinematic model of the robot manipulator is simulated and analyzed by ADAMS software. It is found that the kinematic model of the robot operating arm is accurate. Then, the trajectory of the robot is planned based on cubic polynomial interpolation. Finally, MATLAB software is used for simulation and verification, and it is found that it could accurately show the displacement and angular velocity changes of the robot end parts. Moreover, the path planning of polishing robot is carried out using cubic polynomial interpolation method, which can effectively reduce the time to reach the polishing position compared with the unoptimized method. However, only simulation software is analyzed to carry out simulation tests, and subsequent application analysis is needed to verify the reliability of the polishing robot operating arm system proposed in this study. To sum up, the results of this study can provide theoretical basis for improving the working efficiency of polishing robot.