{'fraction_non_alphanumeric': 0.021386138613861388, 'fraction_numerical': 0.00809052333804809, 'mean_word_length': 4.935527199462727, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Modelling of Robotic Single Peg-In-Hole Assembly Using ADAMS/MATLAB Co-simulation

A virtual assembly model of robotic single peg-in-hole assembly environment is developed to determine contact force using ADAMS/MATLAB Co-simulation in this work. The existing dynamic models of the insertion process are incapable of replicating the real assembly scenarios due to its complicated mathematical expressions and handling variety of dynamic parameters. In order to address this problem, a co-simulation model is proposed to study the dynamic behaviour of a planar robot in executing an assembly process. Initially, the physical robotic assembly environment with 3-R planar manipulator is built in Solid Works and it is imported to ADAMS environment for the analysis. A Cartesian trajectory for the end-effector is given as input for executing the assembly process. Since simulation in ADAMS is executed with joint values, inverse kinematic calculations of the manipulator are employed in MATLAB environment to convert the given Cartesian descriptions into their corresponding joint descriptions. Further, the joint values are properly exchanged between these different software environments using co-simulation model to simulate the intended assembly process. Besides, the contact forces at peg end are analysed under defined lateral error condition.


Introduction
A peg-in-hole insertion task is considered as a typical and primitive assembly task by many researchers [1,7]. The peg-in-hole assembly has its application in various industrial sectors like camshaft assembly, flange assemblies in automobile industry, IC assemblies in electronics industries etc. [11]. Such assembly processes are complicated as the aligning and the insertion phases are path and force constrained. Henceforth, the process is automated using robotic manipulators due to its higher accuracy, flexibility and reflex to the dynamic environment. The robotic manipulators require sensors such as vision, force sensors to sense and localize the hole component with respect to the peg component. In this regard, the assembly operation is influenced by pose estimation of the mating components and positional error in the robotic manipulator. The positional error creates misalignments between the mating parts along their lateral and angular axes. Further, the misalignments in the peg component leads to large reactive forces by establishing contacts with the hole component. Successful assembly depends on how precisely the reactive forces are managed throughout the insertion depth [8]. These reactive forces are predominately controlled by introducing passive or active compliance devices such as RCC and force control techniques. In order to control compliance devices, the insertion process needs to be modelled as either quasi-static assembly or dynamic assembly. Since the peg is inserted at a very low speed, the insertion process is considered as static in quasi-static insertion modelling [7]. Due to this approach, inertial effects of the parts are negligible in static condition. In reality, the static condition is not replicating actual assembly scenario. The mass of the mating parts and the speed of insertion influence the insertion mechanics. In this regard, the dynamic modelling of the insertion including the acceleration and the inertial effects are developed by few researchers [1,5,7,11]. Shahinpoor and Zoohor [11] have developed a dynamic model of the insertion process with an assumption of having insertion depth as a known function of time. The insertion speed is calculated for the given insertion time and the dynamic model is developed using the insertion speed. Trong et al. [7] developed a dynamic model for compliantly supported chamfered peg-in-hole assembly including the factors like inertia, gravity, passive compliance, location of compliance center and insertion speed. Trong et al. presented the influence of insertion force and tilt angle with respect to time for the insertion process. Du et al. [1] derived an extensive dynamic model using the framework of Trong et al. to investigate the insertion process of a compliantly supported chamfered peg-in-hole assembly. They have also presented the insertion forces, tilt angle of the peg, lateral deviation of the peg and insertion depth with respect to time. Xia et al. [9] have proposed a dynamical insertion model of a pegin-hole including the elastic contact mechanics in order to allow small deformations at all the instances of contact during insertion. Since the traditional rigid body dynamic models are not exhibiting enough deformation of the mating parts. Xia et al. have developed a dynamic model by considering the limitation of elastic deformation that cannot destroy the assembly parts. The above proposed dynamic models were quite complicated and are computationally difficult to solve since they involve huge computation with different parameters like dimensions and material of the mating parts, mass, insertion speed, insertion depth etc., The dynamic models are also having inconsistent solutions and vary for the different values of the parameters. In order to overcome the above concern, the capabilities of a multibody dynamic simulation tool known as ADAMS, Automated Dynamic Analysis of Mechanical Systems have been utilized in this work. The software is capable of performing a virtual prototype analysis for a mechanical system with an interactive graphical interface. ADAMS solver module is based on the Euler-Lagrange technique similar to the previous dynamic models developed by the researchers. ADAMS has the capability to represent the motion of the joints as a function of time and it is incapable of addressing the Cartesian space inputs. However, the assembly task is executed with Cartesian space information. In order to simulate the assembly process in ADAMS, the joint angles are to be determined using inverse kinematic model of the manipulator in other numerical computing software such as MATLAB. Consequently, the resultant ICMEEP 2020 IOP Conf. Series: Materials Science and Engineering 995 (2020) 012008 IOP Publishing doi:10.1088/1757-899X/995/1/012008 3 joint angles are imported to the ADAMS environment for the intended simulation. This process of controlling the multibody system developed in ADAMS through other platform is termed as ADAMS co-simulation. MATLAB being a tool, with strong computation capability and capability to interface with ADAMS is used in this work. Several researchers have performed co-simulation using the above mentioned tools for various applications such as robot based welding, virtual bionic hand model and space exploration rovers [3,9,6,4]. ADAMS/MATLAB Co-simulation offers a virtual kinematic and dynamic analysis of robotic applications before the implementation in an actual robot. Guojun et al. [3] have experimented the Co-simulation for robot welding application. The welding coordinates are converted to joint space and the trajectory is planned using robotic toolbox of MatLab. The computed angles are implemented in ADAMS using the in-built step function. Haitao et al. [4] has established a virtual prototyping model for dynamic analysis of 2 DOF robot arm and the PD control system is developed using ADAMS/Control and MATLAB/Simulink. Zhiming et al. [10] has developed an intelligent bionic hand for virtual prosthetic prototyping using ADAMS and PD control using MATLAB. On this consideration, this work is intended to develop a virtual model of 3-R planar robotic single peg-in-hole assembly using ADAMS/MATLAB co-simulation and to carry out contact force analysis of the intended insertion process. This paper is organized as follows: Section 2 depicts the single pegin-hole robotic assembly environment adopted in this work, Section 3 presents the ADAMS/MATLAB Co-simulation of robotic assembly model, Section 4 discusses the dynamic insertion analysis results of the assembly from co-simulation and Section 5 provides the conclusion of this paper.

PROPOSED ROBOTIC PEG-IN-HOLE ASSEMBLY ENVIRONMENT
A robotic peg-in-hole assembly with position uncertainty is an intricate operation. In this regard, this work adopts a single peg-in-hole robotic assembly environment as shown in Figure 1. The assembly task is assumed to be performed in planar work space. A 3-R planar robotic manipulator is used in this work dexterously to assemble a rigid peg in a rigid hole. In this considered environment, the peg component is mounted on the end-effector and inserted into a static chamfered hole component. A positive clearance (clearance fit) between peg and hole is considered in this work. The assembly process is carried out in two phases: Alignment phase (rotation and translation take place) and insertion phase (only translation). In the alignment phase, the co-ordinate frames of the hole 'H' and peg 'P' components are aligned. The insertion task has been executed in insertion phase. The poses of the peg and hole component are assumed to be known using vision sensor. A offset distance above the hole axes is introduced to avoid the abrupt collision between the mating parts and to ensure minimal angular misalignment during the insertion. In the alignment phase, the peg frame at the initial stage is first translated and then rotated with respect to the base frame   . Further, frame P is also rotated for the required intermediate point orientation . The pose of the intermediate points i I change according to defined trajectory followed between the initial peg pose and the offset pose. The homogeneous transformation for this alignment phase is given as, T is the translation matrix between the peg frame and the base frame. B R is the rotation matrix to align the peg frame and the base frame.

ADAMS/MATLAB CO-SIMULATION OF ROBOTIC ASSEMBLY MODELLING
A Simulation of robotic assembly aids in understanding, prototyping and analyzing the environment. MSC ADAMS being dynamic analysis software is used to test and perform the simulation and contact force analysis during the constrained motion of the assembly task. Figure 2 represents the steps involved in ADAMS/MATLAB Co-Simulation modelling of a single peg-in-hole robotic assembly process.

CAD Modelling of 3-R Planar Robotic Assembly
The 3-DOF robot manipulator & mating parts are modelled and assembled in SolidWorks. The CAD model is converted into Parasolid.x_t file format in order to transfer the exact 3-D solid or surface data. Then the file is imported into the ADAMS / View environment. The CAD assembly model is illustrated in Figure 3.

Kinematic Modelling of the Robotic Assembly
The robotic assembly process is carried out in two phases: alignment phase and insertion phase. In the alignment phase the peg component is translated and rotated to an offset distance above the hole surface. The offset distance is provided to prevent the collision of the peg surface with the hole chamfers or the collision of end-effector with the hole surface. At the completion of this phase the hole and peg axes are aligned with zero/minimum misalignment. In the insertion phase, the peg component is only translated along the insertion axes since the axes are aligned in the previous phase. In this work, a simple straight line trajectory is assumed to be followed by the robotic arm during the alignment and the insertion phase as shown in Figure 4. The straight line trajectory is generated as, Corresponding translation and rotation matrices as in equation 1 are given as, . For the given joint angle values the end effector pose is calculated as The inverse kinematic solution is programmed in MATLAB to yield the joint angles for all three joints at various time instants corresponding to the intermediate points generated in the desired trajectory.

Co-Simulation Model
Co-simulation using ADAMS and MATLAB/SIMULINK software helps to build mechanical system in ADAMS and control it with the input information from MATLAB/SIMULINK. The control of the ADAMS model can be ensured by the proper data exchange between the two programs. The output function variable defined in the ADAMS model forms the input to the MATLAB control system and the input variable described by the MATLAB/Simulink application is the input to the ADAMS mechanical system. This forms a closed loop between ADAMS and MATLAB. The steps followed for the co-simulation are as follows: The required motion constraints are added for the considered 3-DOF planar robotic assembly system. The base of 3-DOF robot is fixed on the ground. The revolute joints are created in order to establish rotational relationship between the respective links. Then, the element variables for the mechanical system are assigned to provide motion in terms of joint angles about rotational axis (Z-axis). This is a significant step on the Co-simulation. The function variables that read the joint angles are given as the input and the position variable is given as the output in the ADAMS/Control Plugin. The ADAMS/MATLAB interface helping file is created as (.m) file format in the working directory. This interface file is opened in MATLAB/Simulink, to represents the physical element as a Simulink element. Figure 5 depicts the Co-simulation model with mechanical system, the input and output variables as blocks.

Figure 5. Co-simulation model with input and output variables
The adams_sub block in Figure 5 represents the robotic assembly system. The Joint angles determined from the inverse kinematic solution are read from the MATLAB workspace and forms the input for the ADAMS mechanical block. Subsequently the insertion simulation is performed for the determined joint angles at the specific time instants. The reactive forces produced between the peg and hole during the insertion is analyzed by loading the simulation results in ADAMS post processor.

RESULTS AND DISCUSSION OF DYNAMIC ANALYSIS
The developed co-simulation model of the robotic peg-in-hole assembly is simulated and analyzed for estimating the contact force. Dynamic analysis of the insertion process is performed in MATLAB/Simulink using the generated control plant file. The contact force during the insertion process is influenced by the material properties of the mating components. The material for the mating The simulation results file in Simulink is imported in ADAMS post processor to interpret the contact force results. Experiments are carried out with and without lateral error in the peg component. The contact forces generated during the insertion process for both the cases are shown in Figure 6.  When the contact occurs between the peg component and the hole, reactive forces are developed. It is evident from Figure 6 (a), that in case of no lateral error there are no contact force until the completion of the insertion depth. If the insertion force is exerted further, there is a steep increase in the contact force which ensures the completion of the assembly process. Figure 6 (b) shows the contact forces generated during insertion in case of 1mm lateral error along X-direction. It is observed that there is an ICMEEP 2020 IOP Conf. Series: Materials Science and Engineering 995 (2020) 012008 IOP Publishing doi:10.1088/1757-899X/995/1/012008 10 initial increase in the reactive force to a maximum of 8.23N when the first contact is established on the chamfer. The peg slides inside and establishes one point contact along the chamfer region and leads to a minimal the lateral error on applying forces continuously along the insertion axis. It is evident that there is a decrease in the reactive forces and it becomes zero when there is no lateral error. After the completion of the insertion depth there is a sudden increase in the reactive forces due to restricted motion. Any kind of reactive forces at the peg end are transferred to the robot links and further increases the force at the joints. Figure 7 gives the element force profile at joint 1 of the robotic manipulator with and without lateral error conditions. A constant force of 22.32 N is developed at the joint until the initial contact is established. It is evident from Figure 7 (b) on introduction of lateral error the joint force increase at the chamfer contact and reduces while sliding into the hole. At the completion of the insertion process, the contact between the surface of peg and hole leads to a significant increase in joint forces. The results of the contact forces at various stages can be used to set the threshold values in force control techniques or select RCC devices.

CONCLUSION
The experimentation of the robotic peg-in-hole environment requires a costly experimental setup and requires precise evaluation. To address this issue, a simulation environment using ADAMS-Multibody dynamics solver and MATLAB for developing an experimentation scenario. A virtual model of 3-R planar robotic single peg-in-hole assembly has been proposed using ADAMS/MATLAB co-simulation to carry out contact force analysis of the intended assembly process. The CAD model of the robotic manipulator is modelled in SolidWorks and it is imported to ADAMS platform. Since ADAMS works only with joint description in simulating the motions, the inverse kinematic calculations are performed in MATLAB environment to handle Cartesian coordinates of assembly descriptions. Consequently, these software are integrated using co-simulation model. The simulation results of the assembly with lateral error have also been analyzed for estimating contact forces of peg component during its insertion. The proposed co-simulation of robotic peg-in-hole assembly can be used to design the compliant devices in executing the real-time assembly.