## 1 Introduction
In the field of autonomous driving, the APF method establishes a potential field within the road network. It considers other vehicles, pedestrians and obstacles as repulsive sources while regarding the target destination as an attractive source. This enables vehicles to navigate to their destination safely and smoothly [16; 17]. In multi-agent cooperation, the APF method guides robots to avoid collisions and collaboratively accomplish complex production tasks. It achieves this by considering robots and target positions as attractive sources, and other robots as repulsive sources [18; 19]. These application cases highlight the significant role of the APF method in achieving efficient, safe, and flexible industrial operations. The coordinate systems of the APF method can be divided into two categories: Cartesian space and joint space. If attraction and repulsion forces are calculated in Cartesian space, the coordinate system for this method is the Cartesian space. If attraction and repulsion forces are calculated in joint space, the coordinate system for this method is the joint space. In studies based on Cartesian space, [PERSON] et al. proposed an obstacle avoidance strategy for the dual-arm robot by improving the potential field into a velocity field [20]. [PERSON] et al. proposed a numerical method based on a Jacobian matrix to solve the obstacle avoidance problem of a redundant robotic arm [21]. All the above obstacle avoidance strategies in Cartesian space need to be mapped to joint space, and the inverse of the Jacobian matrix cannot be solved when the robotic arm falls into a singular configuration. In studies based on joint space, [PERSON] et al. uses a sampling method to generate anti-collision path points [22]. [PERSON] et al. used a numerical method to solve the gradient of potential field [23]. All of the above obstacle avoidance strategies in joint space require the multiple calculations of the potential field function, so the real-time performance is low. In Section 3, we introduced these above algorithms and compared them with the algorithm in this paper. In an intelligent workshop, the robotic arm is required to grip the workpieces on the conveyor belt and move them to the target position without collisions. Due to the uncertain initial position of the workpieces, a real-time obstacle avoidance algorithm is needed. This paper proposes an improved artificial potential field method specifically designed for the aforementioned industrial scenario. The algorithm generates a suitable trajectory for the robotic arm, so that it can start from any specified starting point and reach the target point without colliding with obstacles in the process. We propose a way to calculate the shortest distance from the obstacle to the joint of the robotic arm, whereby an analytic formula for the gradient of repulsive potential field can be solved in advance. In addition, we propose a way to make the robotic arm jump out of the local minimum. The contributions of this study are novel and unique in various aspects. (1) Compared with the APF method in Cartesian space, this algorithm does not need to calculate the inverse of the Jacobian matrix. (2) Compared with others' studies on the APF method in joint space, this algorithm only needs to calculate the potential field function once during each cycle. Therefore, the algorithm has a very high real-time performance. (3) In addition, the algorithm provides an effective way to avoid the robotic arm falling into the local optimum by introducing a virtual obstacle, which does not need additional information. The subsequent sections of this paper are structured as follows: in Section 2, the D-H parameters and kinematic model of the robot are presented. Section 3 describes the principle and flow of the algorithm, which is the focus of this paper. In Section 4, the simulations and experiments are presented. Section 5 discusses the advantages and disadvantages of the algorithm proposed in this paper compared to other algorithms. Section 6 summarizes the conclusions.