SELF-ADAPTIVE ASYMMETRICAL ARTIFICIAL POTENTIAL FIELD APPROACH DEDICATED TO THE PROBLEM OF POSITION TRACKING BY NONHOLONOMIC UAVS IN WINDY ENIVROMENTS

: Artificial potential fields (APFs) are a popular method of planning and controlling the path of robot movement, including unmanned aerial vehicles (UAVs). However, in the case of nonholonomic robots such as fixed-wing UAVs, the distribution of velocity vectors should be adapted to their limited manoeuvrability to ensure stable and precise position tracking. The previously proposed local asymmetrical potential field resolves this issue, but it is not effective in the case of windy environments, where the UAV is unable to maintain the desired position and drifts due to the wind drift effect. This is reflected in the growth of position error, which, similar to the steady-state error in the best case, is constant. To compensate for it, the asymmetrical potential field approach is modified by extending definitions of potential function gradient and velocity vector field (VVF) with elements based on the integral of position tracking error. In the case of wind drift, the value of this integral increases over time, and lengths and orientations of velocity vectors will also be changed. The work proves that redefining gradient and velocity vector as a function of position tracking error integrals allows for minimisation of the position tracking error caused by wind drift.


INTRODUCTION
The field of unmanned aerial vehicles (UAVs) is one of the most rapidly developing ones in the field of robotics. Intensive research on technology and algorithms applied in UAVs is making them more and more autonomous. However, there remains much work to be done on core topics such as obstacle avoidance, path planning or formation flight to make them fully autonomous. The major contribution of UAVs to military or civil applications belongs to unmanned multirotor vehicles, their main advantage being their capability of hovering. This makes it easier to control a flight path, especially in an urban environment with plenty of obstacles. Unfortunately, the endurance of multi-rotor flights is limited as a result of their low power efficiency. Missions of fixed-wing UAVs are longer, but due to their limited manoeuverability as nonholonomic vehicles, it is more difficult to precisely control the flight path. This particularly concerns such applications as obstacle avoidance, path planning or formation flight under windy conditions.
Artificial potential field (APF) methods are a convenient way to implement precise and stable position control in applications of position guidance or obstacle avoidance, and this also applies in the case of UAVs (Frew et al., 2007). The main advantage of APF comes from the fact that potential functions are Lyapunov functions with local minimums. This ensures asymptotically stable control of robot position to achieve the desired shape of the path. Therefore, various approaches to APF are widely applied in algorithms dedicated to problems of obstacle avoidance discussed in Budiyanto et al. (2015) and Nieuwenhuisen Suzuki and Uchiyama (2011) and Suzuki and Uchiyama (2010) or their combinations given in Cetin and Yilmaz (2016), Chen et al. (2015) and Mukherjee and Anderson (1993). Even the rules of birds flocking, i.e. repulsion and cohesion, which are applied in formation flights, can be considered implementations of APF (Kownacki and Ołdziej, 2016;Virágh et al., 2014). APF precisely and clearly defines a relation between the velocity vector designating a specific guidance route and the actual position relative to other UAVs, obstacles or mission targets (Frew et al., 2007). As mentioned in Nagao and Uchiyama (2014), known APFs applied in the majority of articles concerning APF, also in those referred above, fail in the case of position tracking by nonholonomic vehicles. Typically, APF's definitions provide a symmetrical distribution of velocity vectors around their minimums. This, combined with nonholonomic constraints, leads to instability that manifests as violent changes of airspeed and heading angle (Frew et al., 2007;Kownacki and Ambroziak, 2017). This happens when a UAV is just near the point of tracked position and position tracking error decreases towards zero. Then, even small unintentional displacement produces a violent change of the desired heading. Violent changes of heading can be explained by the fact that it is usually calculated from the ratio of position differences on the x and y axes of a navigational coordinate frame and the arctangent function. The varying ratio of distances on the x and y axes, from low values to high, occurring when both distance values oscillate around zero, results in significantly different values of angle according to the curve of arctangent.
The circular potential function based on a sigmoid function is one of the ideas meant to prevent these violent changes of heading values and achieve a circular loiter pattern tracked by the UAV. Its effectiveness is the result of the symmetrical gradient distribution on both sides of the circular flight pattern, attracting the UAV to its line (Frew et al., 2007;Nagao and Uchiyama, 2014). The flight pattern is a local minimum of the attractive potential function created as a combination of circular sigmoid functions. In turn, in work of Kownacki and Ambroziak (2017), the novel approach based on an asymmetrical artificial potential function (AAPF), defined in a local coordinate system, provides position tracking stability in the case of formation flights of nonholonomic fixed-wing UAVs. The definition of the asymmetrical potential function is used to create a velocity vector field (VVF), which guides a fixed-wing UAV in a way that smoothly aligns its heading and airspeed to the heading angle and airspeed of the tracked point. In the subsequent work (Kownacki and Ambroziak, 2019), the approach is modified by expanding it by a rotation mechanism of the VVF. It counteracts increments of tracking error during manoeuvres as the result of formation rotation when a UAV is behind the leader and the tracked position.
Unfortunately, none of the examples of application of artificial potential functions that are available in the literature account for external disturbances such as wind drift. A VVF is a geometrical representation of the relation between the expected direction of a UAV's movement and its positions relative to a reference point. In turn, wind treated as the movement of air mass with a constant velocity can be represented by a homogeneous VVF. Thus, combining the guidance VVF with the wind velocity vector field (WVVF) causes a UAV to drift from the desired position and its desired path of flight. The issue is especially important for nonholonomic UAVs. Therefore, this work proposes a self-adaptive asymmetrical potential function mechanism which prevents such drift error, having the meaning of the steady-state error. The effectiveness of the presented adaptation mechanism is proven by the numerical simulation results discussed in Section 5. The idea of the mechanism is to consider integrals of tracking errors in definitions of potential function gradient and VVF only if there is any constant movement of air mass causing wind drift. The slope of the potential function, spatial orientation and lengths of gradients and velocity vectors will be changing depending on wind drift incrementing the integrals' values. Therefore, the main contribution of this work is defining a new approach to the asymmetrical potential function from works of Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019), which considers integrals of position tracking errors so as to minimise them in the case of wind drift effect.
The next part of the article is divided into four sections. The first one formulates the problem of wind drift increasing position tracking error and producing a steady-state error. The second section presents new definitions of potential function gradient and VVF, which are based on the asymmetrical potential function approach modified by a self-adaptive mechanism applying integrals of tracking error. In the third section, the results of numerical simulations compare responses to a step change of wind velocity in the cases of the proposed novel self-adaptive asymmetrical potential function approach and the previous approach from Kownacki and Ambroziak (2019). The conclusions and discussion are in the final section.

PROBLEM FORMULATION
Flight control based on artificial potential functions is convenient as it transforms geometrical relations between a UAV's position and characteristic mission points into a VVF which accomplishes predefined rules of guidance, e.g. obstacle avoidance. Velocity vectors implementing guidance rules are used to calculate navigational parameters such as desired heading and pitch angles and desired airspeed. These parameters are mostly controlled by traditional PID (Proportional-Integral-Derivative) control loops with a two-level structure (Kownacki and Ambroziak, 2017; Kownacki and Ambroziak, 2019). Unfortunately, reaching the desired values of heading and pitch angles and airspeed by a UAV does not guarantee that flight will be controlled stably in the steady state. In windy environments, where there is a constant wind treated as the flow of air mass, the flight guidance of nonholonomic UAVs can be disturbed, especially if it is a crosswind. What results is that the ground speed of fixed-wing UAVs is the sum of True Air Speed (TAS) and wind speed, and in aviation, this is called the wind drift effect. The problem of wind drift is presented in Fig. 1a, where the asymmetrical artificial potential field (AAPF) approach is applied to track a moving point associated with the origin of a local coordinate system OxPiyPizPi. Arrows labelled with symbols VT, VW, VG, and VUAV represent, respectively, the velocity vector of the frame OxPiyPizPi (the velocity of the tracked point), the velocity vector of wind, the airspeed vector of the UAV obtained from the AAPF and the ground speed vector, which is the sum of the last two. Thus, the final flight path will be determined by the velocity vector VUAV, not by the velocity vector field VG. There is an angle between the reference velocity vector VG given by AAPF and the ground speed vector VUAV, which is called the drift angle. (b) the UAV is unable to reach a tracked position due to its resultant ground speed vector VUAV being parallel to the velocity vector of the tracked position. AAPF -asymmetrical artificial potential field, UAV -unmanned aerial vehicle In Fig. 1b, there is a case where the UAV is unable to reach its desired position due to the fact that ground speed vector VUAV is parallel to the velocity vector of the tracked position VT. Therefore, the relative positions, i.e. the position tracking error, will be constant in the steady-state. For this and similar cases, constant wind can be considered as a homogenous VVF that modifies the tracking guidance, accordingly to the superposition of both fields of the velocity vector (Fig. 2). The superposition of these two fields makes it impossible for a fixed-wing UAV to achieve precise position tracking. Therefore, the VVF constructed on AAPF should not be constant over time, but should change automatically in a way that minimises any position error in the steady-state caused by wind drift. The most convenient and simplest way to minimise errors in the steady state is to include integrals of these errors in the definitions of the VVF. The novel definition of the VVF based on the AAPF approach for fixed-wing UAVs is given in the next section. The method, which utilises this novel definition, is called the self-adaptive AAPF approach, and it is addressed to the problem of wind drift for nonholonomic UAVs. AAPF -asymmetrical artificial potential field; VVF -velocity vector field; WVVF -wind velocity vector field.

SELF-ADAPTIVE ASYMMETRICAL POTENTIAL FIELD
The AAPF ensures stable position tracking in the case of nonholonomic UAVs, which is proven in Kownacki and Ambroziak (2017). In turn, the rotation mechanism described in Kownacki and Ambroziak (2019) minimises tracking error during manoeuvres when nonholonomic UAVs fly in a rigid formation. The novel approach proposed in this work is also dedicated to nonholonomic vehicles; hence, the definition of AAPF from Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019) will be the starting point. Let us consider a scenario where a UAV tracks a virtual point which is simultaneously the origin of a local coordinate system OxPiyPizPi. Spatial orientations of axes xPi, yPi and zPi are determined by vertical and horizontal movements of that point in the global coordinate system OxGyGzG. UAV coordinates given in the frame OxPiyPizPi are values of tracking errors. The proposed novel approach aims to minimise values of those coordinates when a fixed-wing UAV flies under windy conditions. The definition of AAPF will be the same as in Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019): where VL -is the airspeed of the tracked virtual point, , , coefficients regulating the slope of the potential function, i.e. in the forward longitudinal direction; (xPi0) -rate of deceleration, in backward direction; (xPi0) -rate of acceleration, and in both perpendicular directions, lateral and vertical; (yPi and zPi) -respectively, rate of heading and pitch. According to Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019), the gradient of the potential function is as follows: The gradient ∇ is only a function of the relative position given in the local frame OxPiyPizPi. As shown in Fig. 1b, it can be insensitive to position tracking error at the steady state as a result of wind drift. Therefore, gradient definition (2) must be modified in a way that relates gradient components to cumulative tracking error expressed by its integral. According to Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019), gradient ∇ is the basis for creating the VVF that is used to calculate the desired heading, pitch and airspeed. Therefore, if the integral of tracking error modifies elements of gradient ∇ , it will affect UAV guidance.
Modifications of gradient definition (2) on the longitudinal axis xPi will first be discussed. To minimise the steady-state tracking error on axis xPi, the length of gradient ∇ and the length of the related velocity vector on this axis should be changed according to the increasing integral of tracking error. For xPi  0, the lengths should be decreased, and for xPi  0, increased. Therefore, the definition of the potential function gradient (2) must be modified by inserting coefficients dependent on the current value of the integral IX. It adapts the gradient length on axis xPi with a strength depending on the values of gains 1 , 2 . The modified gradient ∇ is defined by Eq. (3), and differences between definitions (2) and (3) are highlighted by bold font. In Eq.
(3), these coefficients are, respectively, the sum of  and 1 ⋅ | | and the sum of  and 2 ⋅ | |; therefore, they are time-variant and depend on the constant tracking error caused by wind drift. To formulate a new definition of velocity vector field , gradient ∇ must be replaced with ∇ . However, for the yPi and zPi axes, both definitions (2) and (3) are identical. To change values of desired heading and pitch angles, it is necessary to introduce compensation vector I, which is a function of integrals IY and IZ.
where IX -is the value of the integral (Eq. 3) on axis xPi, 1 , 2 -gains of IX.
These integrals have the same role as integral IX in Eq. (3), but they are used to compensate wind drift on axes yPi and zPi by changing the direction of flight defined by heading and pitch angles. The value of integral IX has an impact on the -axis component of gradient ∇ only when the sign of integral ∫ 0 is the same as the sign of . Otherwise, the value of IX equals zero, and the definition of the gradient ∇ is identical to that of ∇ . This rule is necessary, because integral IX should compensate for wind drift as follows: its negative value should only accel-erate the UAV when < 0 and its positive value should decelerate the UAV only when ≥ 0 (Fig. 3). For other cases, gradient ∇ must be the same as gradient ∇ to prevent oscillations. Therefore, the sign of integral IX must be correlated with the sign of Pi x , and its change switches guidance rules on axis Pi x between ∇ and ∇ (Fig. 3). This happens when the UAV crosses the y-z plane.
The next modifications related to the novelty of the selfadaptive asymmetrical potential function are addressed directly to velocity vector field from Kownacki and Ambroziak (2019). Velocity vector field based on gradient ∇ is given by Eq. (5) (Kownacki and Ambroziak, 2019).
where Ψ̇ -is the rate of heading angle of the tracked virtual point; -gain coefficient having the meaning of the time constant related to inertia of response to tracked point turns; I -compensation vector dependent on integrals of tracking errors on the y-axis (IY) and z-axis (IZ); and , -gains of integrals IY and IZ, respectively.
Definitions of the integral values IY and IZ are given below: where zPi, yPi -are UAV coordinates (tracking errors) on axes zPi and yPi of frame OxPiyPizPi.
Integrals IY and IZ modify lengths of velocity vectors on the zPi and yPi axes, which changes both lengths and spatial orientations of velocity vectors. Also, in this case, the signs of integrals IY and IZ must be the same as the signs of tracking errors on the yPi and zPi axes. Otherwise, values of these integrals should equal zero, and Eq. (6) becomes the same as Eq. (5), or almost the same when ∇ is identical to ∇ for IX different from zero. This switching prevents situations when the UAV crosses planes defined by axes xPi-zPi or xPi-yPi, and the sign of the corresponding tracking error on the yPi or zPi axis is reversed. If the integrals IY or IZ are non-zero values with signs opposite to tracking errors, velocity vector field will guide the UAV in the same direction as the wind, and the wind drift effect will be amplified. This could cause position oscillations on the yPi or zPi axis. Therefore, the compensation should work only in the direction opposite to the wind (Fig. 4).
In the next section, results of numerical simulations prove that the novel self-adaptive potential field approach, which uses integrals IX, IY and IZ to modify gradient ∇ and velocity vector field , effectively minimises the steady-state tracking error caused by the wind.

NUMERICAL SIMULATIONS
In numerical simulations, the same dynamical model of a fixed-wing UAV was utilised as in works of Kownacki and Ambroziak (2017) and Kownacki and Ambroziak (2019). The UAV's dynamics are defined by a set of six differential equations, namely Eqs (9) and (10): where , , -are components of the total force vector applied to the UAV i.e. the sum of aerodynamic forces, force of gravity, and the force of the propulsion system; L, M, N -moments on the x, y and z axis, respectively; , , -mass moments of inertia around the x, y, z axes, respectively, of the UAV body frame; product of inertia for the x -z symmetry plane; p, q, r -angular velocities of banking, tilt, deflection; u, v, w -linear velocities; and m -mass of the vehicle.
Equations of the related kinematic model describing both position and orientation in the global frame G are given by Ambroziak and Gosiewski (2015) and Kownacki and Ambroziak (2017): where: mg -force of gravity, Fp -propulsion force (Eq. 12),lifting force, -drag force, -lateral force. The force Fp generated by the propulsion system, i.e. propeller and electrical engine, is modelled by the equation (Ambroziak and Gosiewski, 2015; Kownacki and Ambroziak, 2017): where VA -is airspeed of UAV;  -air density; km -the relation between throttle control signal, t and engine revolutions; and Athe area swept out by the propeller blade. The sum of aerodynamic moments and the moment generated by the propulsion system are given as follows (Ambroziak and Gosiewski, 2015;Kownacki and Ambroziak, 2017): where Mp -is the moment generated by  can be simply obtained from velocity vector field as given by equations (Kownacki C. and Ambroziak L., 2019; Kownacki C. and Ambroziak L., 2019): To verify the effectiveness of the proposed changes in the novel definitions of gradient and related velocity vector field , numerical simulations considering two scenarios were prepared. In each of them, the fixed-wing UAV follows a virtual point which is its desired position. Therefore, if the position tracking algorithm is effective in minimising tracking errors, both flight paths, i.e. the flight path of the UAV and the reference trajectory of the virtual point, should overlap. During simulated flights, a step change of wind velocity is generated to observe the response of lateral and longitudinal controls based on the proposed self-adaptive approach. In each scenario, the direction of the wind is different, which makes separate verification of lateral and longitudinal guidance possible (Fig. 6). In the next section, flight paths and time plots of tracking errors present the results achieved.  According to the first scenario (Fig. 6), different values of x1, x2 were used to observe minimisation of the tracking error on the xPi axis as the result of a step change of wind velocity at t  200 s. on this axis with an amplitude equal to 1 m/s. Simulation results are given in Fig. 8.
In Fig. 6, it can be seen that time plots of Ex are independent from the values of x1 (Fig. 8.1-8.4). This is because this coefficient regulates the gain of integral IX for xPi  0, when the UAV is flying behind the virtual point, and thus xPi  0 and IX  0. This is in accordance with the assumptions of guidance rules defined by Eqs (3), (4), (6), (7) and (8). On the other hand, in Figs. 8.5-8.8, a decrement of tracking error Ex can be observed for higher values of x2. A side effect of the action of integral IX is transient and quickly fading oscillations whose frequency grows with the value of x2. Amplitudes of these oscillations are less than 1 m, and their durations are less than 25 s. Therefore, they should not have a significant impact on the effectiveness of flight guidance based on the proposed approach.
In the second scenario, where the wind direction is perpendicular to the simulated flight path of the virtual point, only coefficient y matters, because it is related to integral IY. The rest of the parameters are as follows: ,  and  remain the same, x1  1 and x2  1. In Figs. 9.1-9.4, time plots of tracking errors are presented for a value of y equal to, respectively, 0, 0.1, 1 and 5. (2) x1  0.5, x2  0.1, y  0 and z  0, (3) x1  1, x2  0.1, y  0 and z  0, (4) x1  1.5, x2  0.1, y  0 and z  0, (5) x1  1, x2  0, y  0 and z  0, (6) x1  1, x2  0.1, y  0 and z  0, (7) x1  1, x2  1, y  0 and z  0, (8) x1  1, x2  10, y  0 and z  0 8) Based on Fig. 7, it is possible to conclude that  and  improve guidance dynamics on the xPi axis by increasing the slope of potential function on both sides of the yPi -zPi plane. Oscillations of tracking error on axis xPi are caused by inertia in position tracking at instant t  0 and UAV guidance switching between acceleration and deceleration zones separated by the yPi -zPi plane. The frequency of this oscillation increases with the increment of the potential function's slope caused by higher values of  and . As would be expected, values of  and  have no effect on tracking error Ey on the yPi axis. This tracking error can be decreased by increasing the value of , which can be observed by comparing Figs 7 (2 and 3). However, Ey still does not decrease over time; thus, it should be considered as steady-state tracking error caused by wind drift.
Next, non-zero values of x1, x2, y, and z are applied in the novel definitions of gradient ∇ and velocity vector field to include integrals IX, IY, and IZ. Values of ,  and  are constant and are, respectively, 0.9, 0.9 and 0.1.
Also, in this case, a value of y higher than 0 guarantees that tracking error Ey decreases over time. The magnitude of decrement increases with the value of y, but simultaneously, the amplitude and frequency of oscillations of tracking error Ey also grow. However, these oscillations are still transient and fast-fading, and they have no bearing on the effectiveness of the approach to minimisation of tracking error in the steady state.

CONCLUSION
Both methods based on AAPFs have significance to the problem of position tracking by nonholonomic vehicles such as fixedwing UAVs. They improve the stability and the precision of position tracking during manoeuvres. However, they do not prevent against position tracking errors in the steady state, caused by wind drift in windy environments. Therefore, definitions of the gradient of the asymmetrical potential function and the VVF should be dependent on integrals of tracking errors, as in the definition of a proportional-integral-derivative controller, where the integral is used to minimise steady-state errors. As presented, numerical simulation results confirm that such modification will allow for reduction of tracking errors asymptotically in the steady state. This is because of the fact that integrals of tracking errors are variable gain coefficients which modify the gradient according to the growth of the steady-state error, in a manner identical to the increment of the potential function's slope. This effect is presented in Figs 8 and 9, where time plots of tracking errors for different values of integrals' coefficients, x1, x2, and y, compare the effectiveness of tracking error minimisation. Increasing values of these integrals' coefficients amplify the magnitude of decrement but simultaneously increase the frequency of oscillation. Fortunately, oscillations are quickly suppressed by inertia in the unmanned aerial vehicle's dynamics. Therefore, integrals' coefficients, x1, x2, y, and z, as well as coefficients of the potential function, ,  and , should be precisely adjusted to the dynamics specific to each considered fixed-wing UAVs' construction.
In summary, the novel self-adaptive approach to the asymmetrical potential function makes the position tracking problem more resistant to external disturbances in windy environments, which is crucial for fixed-wing UAVs. This is not possible through the usage of other methods of path planning, which are based on symmetrical APFs.