Enhanced Potential Field-Based Collision Avoidance in Cluttered Three-Dimensional Urban Environments

: With the various applications of unmanned aerial vehicles (UAVs), the number of UAVs will increase in limited airspace, leading to an increased risk collision. To reduce such potential risk, this work proposes a collision avoidance strategy for UAVs using an enhanced potential ﬁeld (EPF) approach in cluttered three-dimensional urban environments. Using the EPF formulated in a two-dimensional environment, the avoidance maneuvers for both horizontal and vertical planes are generated by introducing rotation matrices, and these maneuvers are combined by applying a weighting factor. The numerical simulations with various meaningful scenarios are conducted to validate the performance of the proposed approach. To mimic practical situations, UAV dynamics and sensor limitations were considered. The simulation results show that the proposed approach provides an efﬁcient, reliable, and collision-free path without local minima and unreachable goal issues.


Introduction
Unmanned aerial vehicles (UAVs) have recently been used in several fields to perform various missions, such as search and rescue [1], surveillance [2], monitoring [3], delivery [4], and inspection [5]. UAVs are being increasingly used due to their cost efficiency, high reliability, and good performance. These needs lead to an increased demand for UAV airspace and an increased risk of collisions in that limited airspace. To perform successful missions and reduce the risk of collisions, the safe operation of UAVs must be ensured. That is, UAVs must equip a certain sensing system to detect threats and have a collision avoidance (CA) system to avoid threats without collision. This is called sense and avoid for UAVs [6].
Among several CA techniques, one of the most widely used algorithms is the artificial potential field (APF) method [7]. With its simple principle, the APF efficiently provides a smooth and safe trajectory. However, the APF faces some problems when one or multiple obstacles block an agent's path toward the goal position with the symmetric pattern or obstacles are located near the goal position. The former is called local minima, and this generally occurs when obstacles are exactly located between the agent and the goal location. The latter is called the goal non-reachable obstacles nearby (GNRON) problem. Indeed, when the goal location is within the influence of the repulsive potential field, the agent faces a GNRON situation.
Several researchers have attempted to resolve these two issues by applying other techniques or modifying formulations. Some researchers have combined the APF with other existing algorithms. As an illustration, Amiryan et al. [8] used the rapidly-exploring random tree method as a global planner in the presence of static obstacles to generate a global path that does not encounter the local minima and GNRON problems and then applied the APF as a local planner to the global path generated beforehand. In Ref. [9], a bug algorithm was introduced to resolve the issues when the agent faces local minima or GNRON situation. Moreover, to deal with these issues, other scholars have suggested making modifications of the potential functions or fields of the APF. Triharminto et al. [10] modified the repulsive potential field formulation by adding a fractional term and another term with the signum function to solve the local minima and GNRON problems, respectively. In Ref. [11], the relative distance between an agent and a goal location was multiplied to the repulsive potential function to resolve the GNRON problem. Furthermore, the local minima problem was resolved by multiplying a term with exponential functions into the repulsive potential function. In Ref. [12], a fuzzy inference system based on the APF was considered to deal with the local minima problem. Furthermore, Zhang et al. [13] revised the repulsive potential field formulation by multiplying an additional term and combining it with the rolling window approach to resolve the APF's two issues, and the intermediate target position was used to avoid obstacles. In addition, exponential functions [14] and Gaussian-like functions [15] have been utilized to formulate attractive and repulsive potential fields. Choi et al. [16] introduced the concept of the curl-free vector field to resolve the local minima issue. Although several researchers have proposed various techniques for resolving the APF's issues, the aforementioned approaches have been applied in a two-dimensional (2D) environment and are not suitable in a situation where the 3D motion of UAVs has to be considered.
This research proposes a CA approach based on an enhanced potential field (EPF) building on the authors' previous work developed in 2D environments to expand to become applicable to 3D environments by combining the horizontal and vertical avoidance maneuvers. Although the aforementioned studies undertaken by several researchers assumed that the obstacles' position information is always given to an agent, this study used a 3D scanner to measure the obstacles' point cloud information for practical sensing when the obstacles are within the sensing range and field of view (FOV). In addition, the dynamics of UAV are taken into account to describe the practical behaviors of the UAV. The proposed CA approach is validated at realistic cluttered urban simulation environments generated using real urban datasets. This paper is organized as follows: Section 2 describes the dynamics and kinematic equations, the control logic, and the formulation of the proposed CA approach. Section 3 presents the analysis results for the key parameters of the proposed CA algorithm and the numerical simulation results to validate the performance of the proposed CA algorithm. Finally, the conclusion is described in Section 4.

Dynamic and Kinematic Equations
This work considers a quadcopter as an UAV. To describe the motion of a quadcopter, the reference frames and the vectors with the quadcopter model are displayed in Figure 1. The inertial frame is defined byn k for k = 1,2, and 3, and the body frame fixed on the center of mass of the quadcopter is defined byb k . The quadcopter's position and velocity vectors expressed in the body frame are defined as r ∈ R 3 and v ∈ R 3 , respectively. The quadcopter's attitude is defined using the 3-2-1 set of the Euler angles, and the yaw, pitch, and roll angles of the quadcopter with respect to the inertial frame are defined as ψ, θ, and φ, respectively. In addition, the quadcopter's angular velocity vector with respect to the inertial frame is defined by ω ∈ R 3 . The direction cosine matrix from the inertial frame to the body frame of the quadcopter is defined as [17] C BN =   cos θ cos ψ cos θ sin ψ − sin θ sin φ sin θ cos ψ − cos φ sin ψ sin φ sin θ sin ψ + cos φ sin ψ sin φ cos θ cos φ sin θ cos ψ + sin φ sin ψ cos φ sin θ sin ψ − sin φ cos ψ cos φ cos θ  Using Equation (1), the position and velocity vector expressed in the inertial frame are defined as where a vector with the superscript N denotes the vector expressed in the inertial frame. Note that the superscript B is omitted in the vectors with the body frame expression. The motion of the quadcopter is composed of rotational and translational motions. The rotational motion of the quadcopter with respect to the inertial frame is defined as [17] Jω where J ∈ R 3×3 is the inertia matrix, [ω × ] is the skew-symmetric matrix composed of the elements of the angular velocity vector (ω 1 , ω 2 and ω 3 ), τ b ∈ R 3 is the external torque, and τ g = [ω × ][0, 0, I r Ω r ] T is the gyroscopic torque generated by the quadcopter's rotors.
Here, I r is the inertia of the rotor, and Ω r is the sum of the rotors' speed, which is defined as Ω r = Ω 1 − Ω 2 + Ω 3 − Ω 4 . Here, Ω i for i = 1, 2, 3, and 4 represents the rotation speed of the i-th rotor. The quadcopter's translational motion is defined as [18] mv where m is the mass of the quadcopter and f g ∈ R 3 is the gravitational force defined as where N g = [0, 0, −mg] T is the gravitational force vector expressed in the inertial frame with the gravitational constant g. Furthermore, the thrust force vector is defined by f b = [0, 0, f th ] T , and the thrust force along with theb 3 axis generated by the quadcopter's rotors is expressed as where k f is the aerodynamic force constant. In addition, the control input vector for controlling the quadcopter is defined as where τ k for k = 1, 2, and 3 is the body axes' torque generated by the rotors' speed difference, k τ is the aerodynamic torque constant, and l is the distance between the center of the quadcopter and the center position of propellers 1 and 2, as shown in Figure 1.
The kinematic differential equation composed of the Euler angles and the angular velocity is defined as [17]  ψ θφ

Quadcopter Control Logic
To control the position of the quadcopter with respect to the inertial frame, the translational motion of the quadcopter expressed in the inertial frame is derived as [19] and Nr in Equation (10) is rewritten as Since positions x and y are coupled with the attitude of the quadcopter, they cannot be directly controlled using thrust force. Therefore, Equation (10) is rewritten as whereẍ d andÿ d are the desired accelerations with regard to x and y, and φ d , θ d , and ψ d are the desired roll, pitch, and yaw angles, respectively. To compute the desired attitude angles, small angle assumptions were considered in this work (sin . This assumption is generally valid except for the large changes of the roll and pitch angles duirng a short time period. Hence, Equations (12) and (13) are rewritten asẍ The desired x and y accelerations are obtained by the PID control as follows: where k P,pos , k I,pos , and k D,pos are the proportional, integral, and derivative control gains for position control, respectively. Moreover, for the altitude control of the quadcopter, the thrust force is obtained by the PID control as follows: After obtaining the desired accelerations, the desired attitude is obtained using Equations (14) and (15). Then, a PD controller is developed to control the attitude of the quadcopter. The control torque for attitude control is derived as where k P,att and k D,att are the proportional and derivative control gains for attitude control, respectively.

Collision Avoidance Algorithm
The widely used CA algorithm is known as the APF due to its simple principle. The APF consists of attractive and repulsive potential fields. For example, a goal position attracts a quadcopter in the attractive potential field while obstacles repel the quadcopter in the repulsive potential field. As mentioned in Section 1, however, the APF has GNRON and local minima issues. The GNRON issue is resolved by introducing an additional term in the repulsive potential function. The total potential function is defined as [20,21] where Here, U a ( N r) is the attractive potential function, U r ( N r) is the repulsive potential function, N r ∈ R 3 is the quadcopter position in the inertial frame, N r g ∈ R 3 is the goal position, N r o ∈ R 3 is the obstacle's position, d(a, b) is the relative distance between generic vectors a ∈ R 3 and b ∈ R 3 , d o is the distance influenced by the repulsive potential function, and n g is the order of the relative distance term. Furthermore, k a and k r are the gain coefficients of attractive and repulsive potential functions, respectively. Due to d( N r, N r g ) n g , the total potential function solely becomes zero when the quadcopter arrives at the goal position. This is how the GNRON issue is resolved. Since the potential functions with n g = 0 are the same as the original one presented by Khatib [7], n g should be greater than 0. By taking the negative gradient to the potential functions, the potential fields, which are the vector form, are derived as where Note that f a ( N r) ∈ R 3 is the attractive potential field and f r ( N r) ∈ R 3 is the repulsive potential field. Also, ∂ d( N r, N r o )/∂ N r is the direction from the quadcopter to the obstacle, and ∂ d( N r, N r g )/∂ N r is the direction from the quadcopter to the goal position. When the goal position is under the influence of the repelling force, the quadcopter can arrive at the goal position because the repulsive potential field also contains f r,g which produces the potential field toward the goal position. That is, this term contributes to resolving the GNRON issue. By summing up two potential fields, the total potential field (f t ) is computed.
Since Equations (25)-(28) only resolve the GNRON issue, the local minima issue still remains. Hence, this study focuses on resolving the local minima issue by redefining the first-term f r,o ( N r) of the repulsive potential field in Equation (27) as follows: It is important to note that the direction of f r,o ( N r) is replaced withq ∈ R 3 because the local minima issue is highly related to the determination of the direction in front of the obstacles, as shown in Figure 2. This shows the difference between the generated total potential field of the conventional and proposed approaches in the local minima situation. While the conventional one has a total potential field of zero (i.e., f a + f r,o + f r,g = 0), the proposed approach results in the non-zero total potential field by utilizing f r,e instead of f r,o . The new direction vectorq is defined by combining the horizontal avoidance direction with the vertical one. The horizontal and vertical avoidance direction vectors (i.e., q h = [q h,1 , q h,2 , q h,3 ] T ∈ R 3 and q v = [q v,1 , q v,2 , q v,3 ] T ∈ R 3 ) are defined as where R h ∈ R 3×3 and R v ∈ R 3×3 are the rotation matrices that rotate the direction of the conventional repulsive potential field into a horizontal new direction and a vertical new direction, respectively. These new directions seek to avoid the situation in which the quadcopter becomes stuck in front of the obstacle. Once avoidance directions are determined for each plane,q is calculated as follows: where Here, α ∈ [0, 1] is a weighting factor for consolidating two avoidance directions. Note that q h,1 and q h,2 for the horizontal direction and q v,3 for the vertical direction are only used because these are the dominant terms for generating the maneuvers in each direction.
To determine the proper rotation matrices for the collision-free repelling direction of the repulsive potential field, this work considers the relative angles between the quadcopter's velocity vectors and the relative position vector between the quadcopter and the obstacle in the horizontal and vertical planes. To obtain the relative angles, an additional reference frame (i.e., E frame) is defined usingê k for k = 1, 2, and 3, as shown in Figure 3a. Note thatê 1 is a unit vector that has the same direction along with the quadcopter's velocity direction, andê 2 is defined asn 3 ×ê 1 . Then,ê 3 is determined byê 1 ×ê 2 . Here, the E frame is not defined during take-off and landing because the CA algorithm is not activated during these phases. Then, the relative angle ρ h defined in the horizontal plane is shown in Figure 3b, and ρ v is defined in the vertical plane, as displayed in Figure 3c. Note that ρ h and ρ v provide the relative location of the obstacle from the quadcopter with respect to the horizontal and vertical planes, respectively. Based on this information, the rotation matrices to determine the avoidance direction are obtained by the criteria listed in Table 1. Figure 3. Definitions of (a) E frame and relative angles between the quadcopter and the nearest obstacle in (b) horizontal and (c) vertical planes. Table 1. Criteria for rotation matrices to determine the avoidance direction.

Relative Angle Rotation Matrix Remark
Horizontal plane In the formulation of the proposed algorithm, there are several free parameters that need to be determined by a user. In particular, α and γ, which are the newly introduced parameters in this paper, are critical because they highly affect the performance of the proposed approach. Here, α plays a role in determining the portion of each avoidance direction. For example, when α = 1, the quadcopter only performs a horizontal avoidance maneuver, and when α = 0, it only flies on a vertical plane. When the quadcopter's operation altitude is less than the height of buildings (i.e., obstacles to the quadcopter) in urban areas, the horizontal avoidance maneuver is sufficient. However, when the quadcopter is operating near building tops, a combination of the horizontal and vertical maneuvers is preferable since the horizontal maneuver only may require a longer trajectory than the combined maneuvers. Therefore, α needs to be properly determined between 0 and 1. In addition to this, γ directly affects the direction of f r,e , as shown in Figure 2. When γ = 0 deg, the proposed algorithm is performed as the same with the conventional approach. When γ is greater than 90 deg, f r,e (i.e., the repelling direction) is in the direction of the obstacle. This means that f r,e does not play a role in repelling the quadcopter anymore. Hence, γ is needed to be selected between 0 and 90 deg. These two parameters will be analyzed in the next section.

Analysis and Selection of the Key Parameters
Among several parameters of the proposed CA approach in this paper, the effects of α and γ were analyzed through numerical simulations to select proper values. To plainly evaluate the effect of each parameter independently, the quadcopter's dynamics are not considered in this subsection. In other words, the inclusion of dynamics makes it difficult to analyze the CA trajectories purely affected by α and γ because the quadcopter's motion is being affected by the controller and the quadcopter's parameters. Simulation studies are performed with several values of α and γ within the ranges mentioned in the previous section. The other simulation parameters for the proposed algorithm are listed in Table 2. To analyze the effect of γ's changes, only the horizontal avoidance maneuver (i.e., α = 0) was considered. The local minima situation was selected to test, and in this situation, the conventional APF approach cannot find the proper path, so the γ = 0 case does not need to be tested. Figure 4 shows the trajectories of the quadcopter with various γ values, and Figure 5 displays the total path lengths of the quadcopter and the minimum relative distances between the quadcopter and the nearest obstacle in accordance with γ. As γ increases, the quadcopter's trajectory tends to approach the obstacles, and this result can be confirmed in Figure 5. The shorter the total path length, the lesser the energy consumption will be, by assuming the constant velocity-based operation for example. However, since too close a relative distance may cause a collision, a safety perspective must also be considered when selecting a γ value. This study assumed that the quadcopter is safe when the relative distance to the nearest obstacle is greater than 8 m. The minimum relative distance (i.e., safety margin) is highlighted with the red-dotted line in Figure 5. Here, the quadcopter may approach the obstacle closer than the safety margin if the dynamics of the quadcopter is considered. Furthermore, since the safety margin is 8 m, the quadcopter may collide with the nearest obstacle in 3 s when the quadcopter flies at a nominal velocity of 3 m/s. Based on this setting and information, γ = 45 deg is the best selection in this study, and the selection of γ = 45 deg results in the minimum relative distance of 8.3 m. With the fixed γ = 45 deg, the next analysis is that of the effect of α's changes. To analyze the vertical avoidance maneuver, the operational altitude of the quadcopter in this simulation is selected around the top height of the building. Similar to the analysis process for γ, Figure 6 describes the trajectories of the quadcopter with various α values, and Figure 7 shows the total path lengths of the quadcopter and the minimum relative distances between the quadcopter and the nearest obstacle in accordance with α. As α changes, the degree of the portion of horizontal and vertical maneuvers on the planned trajectory also changes. Since the quadcopter operates near the top of the obstacle, the vertical avoidance maneuver (i.e., α = 0) provides better performance than the others in terms of path length. However, when α = 0.5, the result is best, as shown in Figure 7, because the minimum relative distance it is required to maintain is greater than the safety margin (8 m).

Numerical Simulation Results in an Urban Environment
To test the proposed CA approach in realistic environments, a high-resolution urban area was simulated using real datasets measured by an airborne LiDAR. Since the open source urban data are available, this work utilized data obtained from Open-Topography (https://opentopography.org/, accessed on 17 October 2021). Note that LiDAR data (i.e., "*.las" file here) of San Diego downtown were selected as an example of 3D urban environments. The data are classified into x, y, and z components of a point cloud, and one filters out the data so that all of z is less than 200 m. The filtered point cloud data are visualized in Figure 8. To validate the CA performance of the proposed approach, the numerical simulations of three scenarios in the selected urban environment were performed. The local minima and GNRON cases were chosen as the first and second scenarios, respectively, to highlight the fact that the proposed approach resolves the conventional APF's well-known issues. The third case is a complex urban environment in the presence of multiple static obstacles (e.g., buildings). In addition, a quadcopter in this study is mounted on a 3D scanner (e.g., depth camera) to simulate practical sensing. By the 3D scanner, the point cloud of objects (i.e., obstacles here) existing within the sensing range and FOV of the sensor are measured. The simulation parameters for the quadcopter, sensor's specifications, and control gains are listed in Table 3. Here, the quadcopter's dynamics and control logic are considered, unlike in Section 3.1. Furthermore, the quadcopter's diameter size was chosen based on information about the commercial drone's specifications [22]. Moreover, this work assumed that the quadcopter maintains a constant nominal speed during operation. In addition, the parameters for the proposed CA algorithm listed in Table 2, and α and γ values selected in Section 3.1 were used. For each case, the start and goal positions are tabulated in Table 4. Table 3. Simulation parameters for the quadcopter system.

Parameter Value
Quacopter's diameter Attitude control gains k P,att 0.28 k D,att 0.05 Table 4. Start and goal positions of the quadcopter for each case.

Description Start Position (m) Goal Position (m)
Case In Case 1, an obstacle point is located exactly between the start and goal positions. Figure 9 shows the quadcopter's avoidance trajectory and the nearest obstacle point sensed by the 3D scanner at each simulation discrete-time. Note that the blue trajectory represents the desired trajectory obtained from the proposed CA algorithm, while the black one indicates the quadcopter's actual trajectory. At every time step, the CA algorithm computes the desired position for avoiding obstacles, and the control logic mentioned in Section 2.2 uses the desired position calculated. Furthermore, Figure 10 depicts the relative distance between the quadcopter and the nearest obstacle point. In the trajectory figure, it is observed that there are slight changes in the quadcopter's altitude near the obstacle, and this is because of the portion of the vertical avoidance direction inclusion. In addition, the relative distance during the maneuver remains greater than the collision threshold 2 m that represents physical collision. Note that the obstacle threshold of 10 m denotes the relative distance that activates the repulsive potential field, as defined in Table 2. Since the smallest relative distance is observed at 8.42 m, one can say that the quadcopter completes the mission safely.
In Case 2, to construct the GNRON case, the goal position is placed near the obstacle. The quadcopter's CA trajectory by the proposed approach is described in Figure 11. The quadcopter completes the mission without any collision, although the goal position is within the range (10 m) in which the repulsive potential field is activated. That is, although the repelling force is produced near the goal position by the repulsive potential field, the quadcopter smoothly arrives at the goal position. Unlike in Case 1, a few altitude changes were observed due to the smooth direction changes required. Figure 12 shows the relative distance to the nearest obstacle. The relative distance continuously decreases within the obstacle threshold until the quadcopter reaches the goal position. Once the quadcopter arrives at the goal position, the relative distance is not measured to perform the landing.
Thus, there is no time history after 70 s. The closest distance 7.62 m was measured at the goal position, and the quadcopter complied with the collision threshold of 2 m.  The last case is that of a complex environment with several static obstacles. In this scenario, the quadcopter must avoid three buildings to achieve the mission. Figure 13 shows the quadcopter's 3D and 2D trajectories. The quadcopter mainly performs the horizontal avoidance maneuver near the first and third buildings and the vertical avoidance maneuver for the second building. Since the proposed approach combines the horizontal and vertical maneuvers, the quadcopter can successfully avoid several obstacles without collision. Figure 14 illustrates the relative distance from the quadcopter to the nearest obstacle between the sensing range of 20 m and the collision threshold of 2 m. The smallest relative distance can be observed at 8.5 m so that the quadcopter safely reaches the goal position without collision-even in the presence of multiple static obstacles within the limited 3D urban environment.

Conclusions
This paper proposes a novel collision avoidance (CA) approach that reformulates the repulsive potential function of the artificial potential field. The new formulation of the proposed CA approach was mainly developed in two-dimensional (2D) planes, i.e., the horizontal and vertical planes, by introducing the rotation matrices that resolve the local minima issue. Then, the avoidance maneuvers for each 2D plane were combined using a weighting factor to avoid obstacles in cluttered 3D urban environments. Numerical simulations were executed to validate the performance of the proposed CA approach. Urban LiDAR data were utilized for creating an urban environment, and 3D scanner's characteristics and quadcopter's dynamics were considered for simulating the practical sensing and motion. The resulting quadcopter's trajectory and relative distance between the quadcopter and the nearest obstacle evidently show that the quadcopter reaches the goal position without collision for several of the meaningful scenarios. In the future, more realistic and practical environments, such as those involving the presence of dynamic obstacles and the 3D simulator that utilizes high-performance physics engines (e.g., Gazebo), will be considered to further improve the proposed approach.