# Research on Robotic Peg-in-Hole Assembly Method Based on Variable Admittance
## 2 Materials and Methods
### Admittance Control Design
#### 2.2.2 Admittance Control Simulation  
The three virtual parameters in admittance control played a crucial role in the effectiveness and stability of the control system. Figure 2: System diagram of admittance control. Parameter M was the virtual mass, typically set as a constant based on experimental outcomes. Parameter B was the virtual damping, directly related to velocity, and served as the energy dissipation term. To ensure system stability, it was necessary to satisfy certain conditions. The larger the parameter B, the slower the system dissipated energy, resulting in smaller amplitude changes in the robot's posture after being subjected to a force. Parameter K was the virtual stiffness, directly associated with the desired position, and served as the energy storage term of the system. Since the focus of this study was on peg-in-hole assembly, and to prevent the robot from returning to the desired position upon the removal of external forces, the K term was set to 0. To further investigate and verify the effectiveness of the aforementioned admittance control algorithm, the following simulation experiments were conducted. Firstly, under the Modified Denavit-Hartenberg (MD-H) modeling rules, the nominal values of the Denavit-Hartenberg (DH) parameters for the AUBO-i5 robotic arm were established, as shown in Table 1.  
In this study, the robot's peg-insertion task shared similarities with the implementation of force-controlled traction robot work, with both expecting the robot to move in response to external forces. Therefore, to simplify the simulation and obtain qualitative results, a constant force traction simulation experiment was conducted. First, position admittance control was used to simulate a human pulling the end of the robot, thereby achieving the robot's follow-along motion. The force in the \(Z+\) direction of the robot's end-effector coordinate system was set to 5 N, with M = 10 N\(\cdot\)s\({}^{2}\cdot\)m\({}^{-1}\) and B = 10 N\(\cdot\)s\(\cdot\)m\({}^{-1}\) in the \(Z\)-direction, and 0 in all other directions. MATLAB R2022a was used for the simulation. The developer of MATLAB R2022a is MathWorks, headquartered in Natick, MA, USA. The positional changes of the robot before and after the motion are depicted in Figure 3 (with coordinate system O0-X0Y0Z0 being the initial coordinate system, and coordinate system O1-X1Y1Z1 being the coordinate system at the end of the motion). The cumulative displacement of the robot is illustrated in Figure 4. It was observed that the robotic arm took 1 s, and the cumulative displacement in the \(Z+\) direction was 0.183 m.  
Subsequently, a posture admittance simulation of the robot was conducted, with the Txe torque set to 0.5 N\(\cdot\)m. The virtual control parameters for rotation around the \(X\)-axis were set to M = 1 N\(\cdot\)m\(\cdot\)s\({}^{2}\cdot\)rad\({}^{-1}\) and B = 5 N\(\cdot\)m\(\cdot\)s\(\cdot\)rad\({}^{-1}\), while all other directions were set to 0. The positional changes of the robot before and after the simulation are shown in Figures 5 and 6. It was observed that the robot took 1 s to complete a cumulative rotation of 0.08 rad around the \(X\)-axis. The aforementioned experiments indicated that after fixing the deviation value of the force, and since the K term was set to 0 in this simulation, the amplitude of the robot's motion in the corresponding direction would increase over time. This was consistent with the derivation of the formulas. With the parameter M set according to the experimental design and K set to 0, it was theoretically possible to change the interaction state between the robot and the environment by adjusting the size of the virtual parameter B. This provided