• No se han encontrado resultados

Análisis de posibles implementaciones, componentes o módulos ya

Capítulo 2. Elementos de la Arquitectura

2.3. Análisis de posibles implementaciones, componentes o módulos ya

The potential function algorithm presented in this project was based primarily on the functions used by Tsuruta in [86] and Wallace in [88] in order to maintain continuity between similar studies as well as limit the scope of the project.

3.18.4 Attractive Potential Functions

A slightly different approach towards the attractive potential function was taken in this study compared to the work done by Tsuruta. First, the calculation of the local goal location is more involved when the lead UAV is flying in a circular loiter pattern instead of in a straight direction. Relative position information is calculated in the NED frame, but the formation offset must be applied with respect to the local leader. Therefore, a transformation of the relative position vector from NED to the local leader’s LNAV frame is required to incorporate the offset. Once the local goal location is adjusted for both offset distance and commanded side, the updated relative position vector must be transformed back into the NED frame to be used in the PFG algorithm. Second, instead of a single quadratic potential function serving as the goal function for the entire domain of

relative distances between a leader-follower pair, two different forms of potential functions were included.

In the far-field regime, a linear attractive potential function serves well be-cause the gradient magnitude is constant. This provides saturation of the attrac-tive potential function and ensures that there are no large gradient magnitudes that will eclipse the repulsive potential functions’ gradient values, something that is necessary to provide collision avoidance capability even when the goal is far away. The linear attractive potential function is described by

Φatt(¯x, ¯xgoal) = |λ(¯x − ¯xgoal)| . (3.18.2) where λ is a diagonal matrix of weighting parameters which will be discussed later.

In the near-field regime, a quadratic attractive potential function is used.

A quadratic potential function has a gradient magnitude that approaches zero smoothly, which is a desirable quality when considering the output of the function as controller input command. This type of potential function is described by

Φatt(¯x, ¯xgoal) = (¯x − ¯xgoal)Tλ(¯x − ¯xgoal) (3.18.3) In order to match the two functions at the regime threshold, the linear potential function must be adjusted by multiplying it by a constant equal to the quadratic function gradient magnitude evaluated at the regime threshold, χ, and then offset by the quadratic function magnitude at χ. Therefore the attractive potential function in the far-field regime can be described by

Φatt(¯x, ¯xgoal) = 2χ

λTλ(¯x − ¯xgoal)

. − 2λχ2 (3.18.4) Figure 3.9 shows an example of a two-dimensional attractive potential field that combines both the linear and the quadratic functions, transitioning from one to the other at χ.

Figure 3.9: A 2D representation of an attracitve potential field which combines a linear and quadratic potential function

3.18.5 Repulsive Potential Functions

The Gaussian repulsive potential functions used in this study were also mod-eled after those used by Tsurutu in [86] and can be expressed by

τj = τ0,jexp[

−1

σjx−¯xj)TI(¯x−¯xj)]

(3.18.5) where τ0,j is a repulsive strength parameter and σ is a sizing parameter, both of which will be described in section 3.20.

The total potential field in either regime can be described by the superposition of the attractive and repulsive potential fields, such that

Φtotal = Φatt+

N

X

j=1

τj (3.18.6)

3.18.6 PFG commands

The potential functions themselves are actually quite useless from a command generation perspective. They provide a bridge for real-world analogies and can generate a visual representation of the total potential field, but the do not serve a purpose when it comes to issuing meaningful commands to a control system. To generate such commands, the gradient equations are used instead of the scalar

function equations. The gradient vector,

∇Φtotal = hΦx, Φy, Φzi (3.18.7)

is generated directly using the set of equations

Where equation 3.18.8 is used while the formation member is considered in the far-field regime and equation 3.18.9 is used once the formation member enters the near-field regime.

An additional correction to the total potential function is applied to the near-field attractive potential function gradient vector in order to reconcile the virtual waypoint implementation, detailed in section 3.19, with abrupt sign changes in the attractive potential function gradient values as the UAV oscillates around the goal location. Inspired by the simple rules presented in reference [75], heading matching between the leader and follower pair is fused with goal location tracking and the attractive potential function gradient magnitude to ensure a directional command that encourages convergence towards the goal, is sympathetic to the

direction of travel of the leader, and still allows for the repulsive potential function gradient to overtake the attractive, steering the follower away from a collision with other formation members. As depicted in figure 3.10, this is accomplished, first,

Figure 3.10: The process used for the near-field correction of the at-tractive potential function gradient values

by defining an extrapolated goal location, offset by a constant value in a direction parallel to the heading of the leader. Adding the vectors pointing to the original goal and this extrapolated goal produces a vector which points in the desired heading command defined by

Ψc= tan−1(x¯cN

¯

xcE) (3.18.10)

To ensure that the repulsive potential function is not eclipsed by this correction, the original magnitude of the attractive potential function gradient is used in conjunction with the extrapolated heading command direction to calculate a new corrected attractive potential function gradient vector

∇Φattc = h|∇Φatt|sin(Ψc), |∇Φatt|cos(Ψc), 0i (3.18.11) Because this corrected attractive potential function gradient vector is used only for the generation of the North and East offsets of the next virtual waypoint, and not the altitude command, the “Down” component of this vector is simply set to

zero. Both the corrected and uncorrected attractive potential function gradient vectors are retained and added independently to the summation of repulsive po-tential function gradient vectors, producing two distinct total popo-tential function gradient vectors

∇Φ = ∇Φatt+P ∇τj

∇Φc = ∇Φattc+P ∇τj

(3.18.12)

In order to transform these into useful command vectors, the total potential function gradient is normalized, producing a unit vector pointing towards the potential field minima,

U =ˆ |∇Φ|∇Φ

c= |∇Φ∇Φc

c|

(3.18.13)

guiding the UAV into formation, while preventing collision with other members.

3.18.7 PFG Algorithm Parameters

In order to fine-tune the potential function guidance algorithm, several pa-rameters are included in the various equations:

λ is a diagonal matrix,¯

comprised of weighting parameters for the attractive potential function. This weighting is used to control the relative strength of the attractive potential func-tion in each axis of the NED coordinate frame. The best example of when

weight-ing could prove beneficial is found when takweight-ing into account a fixed-wweight-ing aircraft’s ability to maneuver. Tracking the velocity and altitude of a leader is much more difficult to accomplish than tracking the heading of a leader, due to a constant battle between the controller and the low-frequency modes of the UAV dynamics.

Therefore, it may make sense to weight the altitude attractive potential function relatively higher, to compensate for the limitations in maneuverability. It is worth noting that reference [86] states that ¯λ must be positive definite for the attrac-tive algorithm to function properly, meaning that each weighting parameter, λ should be positive. This makes sense, considering the physical interpretation of this parameter.

For the repulsive function, there are two explicit parameters and one derived parameter that must be determined. σ is the repulsive function shaping param-eter, directly relating the region for which the repulsive function influences the total artificial potential field. A larger σ will cause the repulsive function to be

“seen” from a larger relative distance between two formation members, which would increase the amount of time the UAVs have to avoid a collision, but could negatively affect the UAV’s ability to settle in the desired formation structure.

τ0 is the repulsive potential strength constant, determining the maximum value of the repulsive potential, when ¯x − ¯xj = 0. This value plays an important role in the superposition of the attractive and potential functions, but is mostly tuned based on the derived parameter, τσ0. While τ0 is the parameter which sizes the repulsive potential function, τσ0 is what ultimately sizes the gradient of the re-pulsive potential function. Because, it is the gradient of the total potential field that translates into the controller command, this ratio becomes crucial for the ability of the UAV to avoid other formation members when the attractive po-tential function component of the gradient is large (when the UAV is far from

the goal). While attractive potential gradient saturation is applied in the far-field case, which was discussed in more detail earlier in this section, the derived param-eter τσ0 must be sized so that the repulsive component of the potential function gradient exceeds the maximum attractive potential function gradient value at a reasonable relative distance between two formation members. To better visualize

(a) Attractive potential field with λx= λy

(b) Attractive potential field with λx6= λy

(c) Repulsive potential field with small σ

(d) Repulsive potential field with large σ

(e) Combined attractive and repul-sive potential fields with a small τ0

for the repulsive field

(f) Combined attractive and repul-sive potential fields with a large τ0

for the repulsive field

Figure 3.11: Examples of the effect of various potential function pa-rameters

these trade-offs, Figure 3.11 shows two dimensional representations of several pa-rameter configurations and their effect on the individual potential function, the potential field, and the gradient of that field.