1. Introduction
The world’s population is exploding and, in order to keep up with the increasing levels of demand, we will have to produce 50% more food by 2050 [
1]. In order to meet these demands, with the finite arable land we have available, it needs to be farmed far more efficiently. This can be achieved, in part, through the use of precision agriculture.
Technology has advanced significantly in precision agriculture over the years, giving farmers access to advanced farming tools, vehicles and data. Examples of the type of datas; weed distribution, soil pH, yield and crop health. This data, with the increasing availability of analytic technologies, mean that farmers can now use this data to provide actionable information, for example where and at what rate to apply water or fertilizer to a field. This data is normally gathered by hand by agronomists, dividing a field into sections and sampling. However, farms can be vast (Average US farm 175 ha [
2]) so gathering any data by this meahod can be prohibitively time-consuming and expensive. Remote sensing has a possibility to change all of this. Remote sensing is where measurements are taken at a distance from the object.
Remote sensing on farms is primarily done using aerial images, using a number of spectral frequency ranges. In 1972, the Landsat-1 satellite was launched with an imaging package, capable of taking images in red, green, and two infra-red frequencies. This was to be the first of many satellites with the intention of performing remote sensing from space. Aerial imagery has a large number of uses—for example, soil moisture content [
3], weed mapping [
4] and yield calculation [
5]. Unfortunately, the resolution of satellite images is low, using Landsat-1 as an example each pixel of an image was 79 m on the earth, while newer satellites (e.g., WorldView-2) boast a resolution of 0.5 m/pixel [
6]. The lower resolutions of satellites are acceptable for some applications, however there are many that require sub centimetre Ground Sample Distances (GSD), which is impossible for a satellite. Satellite availability leaves much to be desired; depending on what orbit they are in, they can take a long time to be able to re-image a target, and images are easily blocked by haze or cloud.
One alternative is to collect images from manned aircraft that can fly underneath cloud cover. This is able to produce a finer GSD because photos are taken at lower altitude. However, these sorts of surveys are very expensive and are still constrained by weather, and their own operational safety concerns.
The final alternative is to take aerial photos and perform the remote sensing from a small unmanned aircraft equipped with an imaging system. Using an unmanned vehicle confers a number of advantages, discussed in the next section. Drone based remote sensing is becoming increasingly popular, and has been shown to be effective across a huge range of applications—for example, forestry and agriculture [
7], coastal and environmental remote sensing [
8]. In the area of precision agriculture, remote sensing has been shown to be a very successful tool in many areas like, disease mapping [
9], or yield prediction in barley [
10].
1.1. Advantages of UAV Surveying
With advances in sensor and embedded hardware technology, we are seeing a huge proliferation in the use of UAVs across many applications. This includes the essential sector of agriculture. It has been shown that performing remote sensing from a UAV is a cheap and effective way of gathering GIS, and spectral image data of arable land. This data can then in turn be turned into actionable information, e.g., variable rate fertilizer of pesticide application. This could in turn lead to the efficiency gains needed to keep feeding the ever increasing population of the Earth.
Low cost remote sensing can be performed by small fixed or rotary wing UAVs, taking multiple low altitude aerial images with a fixed or gimbaled imaging systems [
11]. These have big advantages over using manned aircraft, as they are much cheaper, less restricted by weather and can be flown more regularly. To get a single high resolution image that covers an entire Region of Interest (ROI), a number of aerial images need to be stitched together to make what is known as an orthophoto. A Digital Elevation Model (DEM) of the ROI can also be produced. These post processing tasks can be performed using a large number of commercially available photogrammetry software packages, which use structure from motion algorithms to generate these outputs [
12].
The task of generating a path that a vehicle’s coverage area will pass over all points of the ROI is called Coverage Path Planning (CPP). This can be mathematically formulated as a trajectory through the workspace
W that will result in a set of
N sensor readings:
such that the union of their area covers the whole of workspace
W:
1.2. Literature Review
There are a large number of applications that use overage path planning, and so have been studied in detail in previous literature. A few example applications are lawn mowing, path planning for milling [
13], indoor robotics [
14], farm vehicle field coverage [
15], fixed-wing surveys [
16] and surveying using multi rotor aircraft [
17]. The optimum path for a standard vehicle to cover a convex polygon is a simple back and forth sweep patten, presented in [
18,
19], and extended to 3D [
20]. This is known as a Boustrophedon path. These paths also have the advantage of being very easy to generate with: knowledge of the ROI polygon, the heading of the sweeps, spacing between each sweep, which is calculated using the UAV’s sensor footprint, and required image overlap. An example Boustrophedon path in displayed in
Figure 1, additionally showing each image footprint that needs to be taken to ensure complete coverage.
Most literature assumes that the path following for the vehicle is perfect, which for ground robots is a reasonable assumption. However, as fixed-wing aircraft are more susceptible to external disturbances, such as wind, and are limited in their manoeuvrability due to the fact that they need to maintain forward motion during flight, accurate path following is made much more difficult.
This sweep method is not used in [
16]; they aim to generate a path in real time, which attempts to maximise the information gain image coverage. While this ensured total coverage, the flight time is increased and requires the camera to be gimbaled to compensate for the attitude of the aircraft. In addition to this, UAVs are not constrained to manoeuvring within the ROI like the ground vehicles described in most previous literature. They can, in fact, cut corners and overfly obstacles; therefore, this can be utilised in order to find faster paths.
A small study was conducted in Finland to attempt to quantify this. Some rough statistics on the general shape of Finish farm fields were generated in [
15]. It reported that only 13% of fields are convex, and of those roughly 25% are simple shapes like circles, rectangles or triangles. Meaning that potentially 75% are complex shapes requiring smart path planning to find a fast path through the NP-hard solution space. Therefore, there is a real requirement for the development of efficient techniques for CPP of farm fields with complex shapes, as Boustrophedon paths are inadequate for these complex concave fields.
A number of papers solve this problem by using Boustrophedon Cell Decomposition (BCD) to separate the concave polygon into a number of convex polygons and then the Boustrophedon path is used to define paths for each individual cell. The problem of decomposing a polygon with holes into the minimum number of convex pieces is known to be NP-hard [
21]. There are a number of decomposition techniques, such as triangular [
22], visibility [
23] and approximate decomposition [
24]. A review of all these techniques are detailed in [
18]. The BCD method is detailed in [
25] where the exact decomposition is performed using trapezoidal decomposition [
26]. Despite producing fewer cells than other decomposition methods [
13,
27], trapezoidal decomposition still tends to over-segment the ROI, resulting in wasted flight time transitioning between the cells, and, therefore, a recombination step is very important. BCD also doesn’t account for any survey or environmental factors and thus creates non-optimal cells. One method proposed is to use Dynamic Programming (DP) to recombine the cells [
28]. Using DP ensures that the entire solution space is searched, meaning that the optimal solution for that search space is found.
In order to produce an optimal solution, an appropriate cost function needs to be defined, which is generally based around the aircraft’s flight time. Under ideal conditions, the path with the lowest Number of Turns (NT) will be the shortest [
19,
25].
The most common method to minimise turns is to simply align the sweep angles with the long axis of one of the decomposed cells, as this will increase the length of each leg of the path thus decreasing NT. An alternative method is to Minimise the Sum of the Altitudes (MSA) [
28]. However, a fixed-wing aircraft’s ground speed, and time in a turn, depend heavily on its airspeed and the wind direction and speed. This could mean that NT is an inadequate optimisation parameter for fixed-wing UAV CPP under real-world conditions.
Small UAVs tend to be light and fly slow, and this makes them more vulnerable to the effects of wind. This is described in [
19] in a simulated survey of an 1 × 0.6 km area, and wind extended their nominal 21 min flight by 6 min. This means that accounting for the wind in any kind of path optimisation is imperative; otherwise, the aircraft may not have the flight time to achieve a full survey. A flight time survey model for fixed wing aircraft in a steady uniform wind field was presented in [
29]. It was also shown that wind will have a huge impact on flight time and taking it into account for planning a survey is essential.
1.3. Contributions
The aim of this paper is to generate survey flight paths for a survey UAVs in complex shaped ROIs, which takes into account environmental and operational factors not previously considered. In order to generate these paths, the complex ROI polygon needs to be decomposed into convex regions that can be covered by Boustrophedon paths. While the idea of this kind of decomposition is not completely novel, the significant additions and modifications in this proposed technique make it specifically tailored for fixed wing remote sensing, which have led to reduced survey times. One could extend this approach to other areas such as water-borne search and rescue in water currents.
One of the main contributions of this work also exploits the potential for the aircraft to fly outside the ROI in order to reduce the flight time. This is achieved by the inclusion of “optional” external cells which allows many decomposed cells to be recombined, which would otherwise create a concave polygon. As a result, a novel “bottom up” dynamic programming approach has been developed which improves computational efficiency dramatically compared to previous work. The work from [
29] has been extended to prove that the minimum flight time exists when the survey direction is perpendicular to the wind.
A summary of the specific contributions from this paper is as follows:
“Bottom up” DP approach speeds up optimal polygon decomposition.
Optional cells external to ROI considered as part of decomposition to find alternate decompositions with lower flight times.
Novel cost function for calculating flight time in the presence of wind.
Mathematical proof of minimum flight time with the survey direction perpendicular to the wind.
A summary of the stages of the proposed technique is shown in
Figure 2. First, the polygon will be decomposed using trapezoidal decomposition for multiple rotations of the polygon. This produces a large number of small cells that will be merged to make convex polygons, enabling the fastest coverage path plan in wind for each initial polygon rotation. The rotation with the lowest overall cost is chosen and the cell merge from this rotation will be used as the final polygon decomposition. Then, minimum time traversal path is planned around this decomposition to give the final path and waypoints to be used by the fixed-wing survey vehicle itself.
1.4. Report Structure
The rest of paper is organised as such;
Section 2 presents the Boustrophedon path definition to guarantee coverage of a convex polygon ROI in wind.
Section 3 describes how to decompose a concave polygon into a number of segmented convex polygons using trapezoidal polygon decomposition. This section also explains how the optional external cells are generated from the concave ROI’s convex hull.
Section 4 details how many of the over-segmented cells can be recombined to give an optimal convex decomposition of the ROI for aerial surveying in wind.
Section 5 explains how the actual flight path is generated by finding a minimum time traversal of all convex cells. In
Section 6, a few example fields have a mission planned using the proposed method for illustrative purposes. Then, this method is compared to previous methods from literature on a number of real arable fields.
Section 7 summarises the findings and concludes the work.
2. CPP in Convex Survey Regions
The CPP Boustrophedon paths consist of two different states of flight: the straight sweep paths when the photos are taken, and the turns used to transition to the next sweep.
The start and the end of each sweep can be represented by waypoints, defined where the locations where the sweep lines intersect with the ROI polygon, as shown in
Figure 3. Two waypoints represent a single survey sweep line with the coordinates
, as there will be multiple sweeps, and
i is the index:
where
indicates the start waypoint of the sweep, and
is the end waypoint of the sweep.
The waypoint, where the aircraft initially intercepts the sweep path is defined as [] with the heading in the direction of the sweep angle , and the waypoint that defines the end of the sweep is [], at a heading of (). There are four corners () the aircraft can chose to start from; once selected, this will dictate the correct order of the waypoints to achieve the appropriate back and forth motions.
In
Figure 3, a Boustrophedon path is generated at a sweep angle of 45
. This is clearly not optimal as some of the straight paths are extremely short and will include many more turns than required. A simple but highly effective way to select a sweep angle that minimises the number of turns is to align the sweep with the long axis of the polygon [
25]. This is achieved by finding the minimum area bounding box that encloses the polygon. Then, the bounding boxes known long axis angle (
) is used as the sweep angle.
The spacing between the sweeps is calculated to give a user defined sidelap between the images for a survey flight at a fixed altitude. The sidelap is set based on the requirements of the mission. For example, if high accuracy digital elevation models are needed, a high sidelap of >70% is required; however, if only the orthophotos is needed, the sidelap flown can be reduced to approximately 50%. The altitude to fly at is set by the required GSD, which is also based on the needed resolution of the application. This is calculated below:
where
h is the height of the aircraft above ground level, the units for
are
, and
is the number of horizontal sensor pixels.
is the horizontal angular field of view of the sensor. Then, the track spacing
(also shown in
Figure 3) can be calculated as:
where
are the desired image overlap and sidelap between tracks, respectively. This makes the assumption that the images are taken orthogonal to the surface.
In addition to sidelap, there is also longitudinal overlap, and this is the same as sidelap, but it is the overlap of the images along the sweep path. The requirements for these are the same as sidelap. The distance between successive photos along each sweep path (
) is dictated by an equation analogous to
, also shown in Equation (
4). Therefore, the frequency of photos can be calculated using the aircraft’s forward velocity. Most cameras and imaging systems have a cycle time between taking images due to limitations of processing time and memory write speeds. As an example, the Sony Nex 7 has a minimum time between photos of 0.7 s; a survey of a fixed wing flying at 15 m/s will lead to a minimum
of 10.5 m. This parameter tends not to be a consideration as most cameras will take photos fast enough; however, if flying low or fast, this needs to be checked.
For the aircraft to transition from one sweep path to the next, it needs to perform a turn manoeuvre. These turns alternate between the left and right hand, and involves a turn of
to its reciprocal heading. To complete the flight time model, this manoeuvre needs to be defined. This can be realised with the use of Dubins paths. A Dubins path is the shortest curve that connects two points in a 2D plane with a constraint on the curvature (in this case, aircraft maximum turn rate) [
30]. A Dubins path is shown in
Figure 4, and it completes the path between the adjacent tracks to give a continuous flight path.
Figure 4 shows how these paths are constructed from two turn circles (whose radius is calculated from airspeed and maximum turn rate) positioned relative to the start and end points of the manoeuvre. All internal and external common tangents are found between the two circles, and only some of will form feasible flight paths. In the case of
Figure 4, only a single external tangent exists that is feasible. All parts of the manoeuvre are simple geometric shapes, which lend themselves to easy length and flight time calculations.
2.1. Survey Flight Time Model in Wind
Wind can have a significant effect on small aircraft; the wind-speed experienced by a small UAV can easily be 50% of the airspeed. As a result, it is vital to account for wind for small survey UAVs. Wind will have a number of effects on a UAV survey. Firstly, the ground speed between opposing sweeps will be different. In addition to this, wind will have an effect on the alignment of the images; this is discussed in more detail later in this section. Finally, in the turns, Dubin’s curves assume zero wind; when performing the same manoeuvre in wind, the turn shape will be a geometric shape called a trochoid in the ground frame, while still being circular in the wind frame [
30]. To achieve the same minimum distance path and hence minimum time path, the trochoidal turns are incorporated into Dubins framework; this then gives a path length and time that accounts for the wind in a turn manoeuvre at maximum turn rate.
This section details how to calculate the flight time of a fixed-wing aircraft surveying a convex polygonal area. This will be used in a later section to define the cost function used in the optimisation stage of this algorithm. The cost function developed will be henceforth referred to as Flight Time in Wind (FTIW). The wind field is assumed to be steady and uniform, as the survey is conducted over a relatively small area over a short time, making spacial and temporal variability minimal.
The wind will push the aircraft slowly off its course while flying along the straight sweep paths. To stop this, the aircraft must fly at a corrected heading, which will be slightly into the wind. This is in order to cancel out the velocity component of the wind to keep the ground velocity vector parallel to the sweep path. This heading correction is know as the Wind Correction Angle (
) (
). The WCA is derived from using the sine rule, with the wind triangle, shown below:
where
V and
are airspeed and wind-speed, respectively,
is the wind to track angle, which is the aircraft’s heading relative to the wind, calculated by
, where
is the wind direction, and
is the sweep direction angle. Now, the
is known, the ground speed (
) and sweep flight time can be calculated.
is the sum of the
x-components velocity through the air mass and the
x-component of the wind velocity, shown below:
Note the assumption that the small angles of WCA will mean that the rotation of the images coursed will not have any effect on the % sidelap. However, this can happen with WCA angles over 40
, which will only happen with perpendicular winds at
of 0.65%, as calculated using Equation (
5).
Theorem 1. A fixed wing UAV will have a lower flight time in the straight and level sweep portions of a Bousdophodon survey path, whose sweep angle is perpendicular to the wind, than a sweep angle directly into wind.
Proof of Theorem 1. To prove that this is true, the most simple survey scenario will be assumed. This is a survey aircraft flying just two parallel tracks of the same length, one after the other, in the presence of a steady uniform wind field, shown in
Figure 5. This represents a single back and forth survey path for coverage of a small rectangular ROI, the simplest example of a survey possible. If these two paths are rotated to a different relative angle to the wind
, the distance travelled will not change. However, as the ground speed along each track changes in a nonlinear fashion with
the time optimal angle is not obvious. To prove the theorem, an equation for flight time along the two tracks need to be generated. By deriving the first and second derivative of the equation, we can show that
of 90
will always be the maximum and 0
will be the minimum. ☐
Equations to calculate the total time of these parallel tracks are generated using Equation (
5) and Equation (
6). The constant ground speed for each track is generated below:
where
and
are the ground speed along the first and second track, which have ground track headings of
, and the reciprocal
, respectively.
is the wind to airspeed ratio
.
will in the interval
. This is because the aircraft will turn around after the first track and head back in the opposite direction.
The time taken to fly the straight and level tracks (not the turns) is shown below:
where
d is the equal distance of both tracks, and
t is the time taken.
By substituting Equation (
7) in to Equation (
8), a full equation for
t will be given below:
The
angles which minimise survey time can be found by ascertaining where the first derivative of Equation (
9) is zero (
). Its derivative can be seen below:
By equating this equation to zero and simplifying
, all solutions can be calculated using:
This gives critical points at
in the given interval which are for the following values of
n. These are both the maximum and minimum points. By taking the second derivative of Equation (
9) and substituting the critical
angles given above into
, we can find if each point is a minimum or a maximum. The result will be
for maximum and
for minimum.
is not included here due to its complexity.
The results of these substitutions:
,
,
,
. This means that the minimum points are
and
, and the maximum to be 0,
. This proves that flying with perpendicular to the wind i.e.,
angles of
and
minimise the survey time along the sweep tracks, whereas flying parallel to the wind increases flight time, by how much depends on
. This can clearly be seen in
Figure 6 which contains plots generated from Equation (
9) that show the total flight time to fly both 500 m parallel tracks in a range of wind-speeds.
2.2. Trochoidal Turn Paths
The time taken in the turns between sweep paths needs to be calculated. To achieve this, the path taken needs to be defined. However, wind needs to be taken into account. Dubin’s style path planning is used to define these turns; however, in wind, the previous circular turns will be not be circular due to the wind. When a circle is drawn in a steady moving frame of reference, it becomes a shape called a trochoid. It was shown in previous literature that this Dubins style path planning can be applied in wind by finding the feasible tangents between the two trochoids at the start and the end of the turn manoeuvre [
29,
31].
There are a number of feasible paths that can be generated, and the two turns in the manoeuvre are either right r or left l, joined with a straight s tangent between them with four combinations . Due to the nature of the Boustrophedon path, all turns will be the same side turns, leaving two possibilities , . If it turned in different directions, it would imply that the aircraft would need to turn more than 180. It makes the problem simpler, as there is an analytical solution to the angle of tangency for the same side turns, as opposed to different side turns, which requires a root finding technique to solve.
Figure 7 shows the same turn from the Boustrophedon path as
Figure 4; however, the circular turns have been replaced with trochoids to give a similarly smooth trajectory while in wind. Equation (
12) shows the parametric equation for a trochoid. It has been rotated in order to put the equation into the trochoidal frame with subscript,
t, and this means that everything is rotated to make the
y-axis in line with the direction of wind, which is why the wind term
only appears in the
y-axis in Equation (
12):
where
R is the turn radius, calculated from
, and
is the angle subtended in the turn.
The construction of these trochoidal turn paths can be performed by knowing the start [] and end point [], the initial () and final headings () of the manoeuvre, the airspeed (V), turn rate () and wind-speeds.
The calculations to achieve this are laid out in [
29,
31].
2.3. Full Survey Model
In order to find the total flight time over the full convex survey, the calculations for time in the turns and on the straight level sweep paths need to be combined in to
, which is the time for a complete convex polygon at the
k starting corner. Firstly, the time along each sweep path needs to be summed. As all the tracks are parallel, the aircraft’s heading will be either
or its reciprocal when it is flying in the opposite direction. All the times for each sweep is summed to give the total time in the sweeps
below, where
is the total number of sweep paths:
The time for the full turn manoeuvre is found by summing the time in each turn:
where
and
are the times in the turns and the third term is the time in the straight portion of the turn manoeuvre. These are generated using equations laid out in [
29,
31]. This can be achieved using the inputs [
] [
], and angles
and
. [
] [
] are equivalent to [
] [
], respectively. The trochoid calculations are performed in the wind frame, thus the points need to be rotated by
, shown in Equation (
15). The angles
and
are aligned with
or the reciprocal angle, and this relationship depends on the sweep index being odd or even, shown in Equations (
16) and (
17):
The final full flight time taken to fully cover a convex polygon from the starting corner,
k, is simply the addition of the time summations in the turns and along the sweeps:
4. Cell Recombination Using Dynamic Programming
Dynamic Programming (DP) is a technique that can be used to solve complex problems by breaking them down into simpler sub-problems. The full solution can then be built by optimally combining the solutions to the smaller problems. Like “brute-force” methods, DP examines every single possible solution and therefore guarantees the optimality of the solution. However, DP offers the advantage that solutions to the simpler problems can be stored or “memo-ized”, meaning that the solutions to identical sub-problems can be re-used, resulting in considerable computational time savings if there is significant overlap of sub-problems. The cell recombination problem is highly suited to DP optimisation, due to the fact that it exhibits “optimal substructure”. This means that it can be solved optimally by breaking it down into smaller sub-problems and then using a recursive algorithm to compare the optimal solution to each of the sub-problems with the solution to the area as a whole (see Equation (
20))
represents the optimal cost of searching region,
G, as the minimum of either the simple cost,
, of searching the entire region or the sum of the optimal costs of searching any two sub-regions,
and
, which combine to cover the entire search area. This algorithm can then be applied recursively by solving the two sub-problems,
and
, using the same equation. The cost,
, of searching region
G is defined as the flight time Equation (
18) if the polygon is convex, otherwise it is given a very high penalty cost (e.g., infinite) (see Equation (
21))
Dynamic programming calculates the optimal recombination by searching every possible partition of the set and as a result is still very computationally intensive. Huang et al. [
28] have applied this algorithm directly in a “top-down” approach; this results in an exponential algorithm which requires slightly less than
time, where
n represents the number of cells in the decomposed search area.
However, in this work, the dynamic programming formulation used is a “bottom-up” approach beginning with a single starting cell and building the complete search area one cell at a time. This approach has been found to be more efficient due to the ability to immediately discount certain recombination patterns, such as those which would form a concave cell. In this case, the sub-region is assigned an infinite cost and all subsequent recursions from this branch are not calculated. From extensive testing of real and randomly generated fields, the optimisation time has been reduced to approximately .
4.1. Bottom-Up DP Formulation
Mathematically, the bottom-up formulation is the same Equation (
20); however, algorithmically, the order of calculations is performed slightly differently, resulting in a lower memory usage and significantly fewer unneeded computations of the cost function. Instead of starting with the simple cost,
, of searching the entire region and then gradually breaking the area up into smaller sub-regions,
and
, the bottom-up approach begins with a single cell and gradually builds the search graph by either recombining neighbouring cells or remaining unmerged (see
Figure 13).
From any initial point, a number of potential actions can be performed. Either the cell may merge with any
adjacent cell (
Figure 13a, b or c), or the current merge may be declared complete and a new merge sequence may begin with any other
adjacent cell in the search area (
Figure 13d, e or f). Each of these actions will result in a new starting point and the algorithm works recursively until every
internal cell in the search area is accounted for.
At each step, the cost of the current merge is calculated and memo-ized for potential re-use in future steps. For example, the subsequent steps from
Figure 13e,f will both result in recombining G{4,5} resulting in C(G{4,5}) being required. The first time this calculation is encountered, it will be calculated and stored, and any subsequent times it will simply be recalled from memory.
The bottom-up approach allows for external cells to be optionally included much more efficiently. With a top-down approach, it would be necessary to initialise the problem multiple times for every combination of potential external cells, some of which may result in no additional viable solutions. With a bottom-up approach, the algorithm is allowed to continue until it finds every possible solution that accounts for every required (internal) cell, whether or not external cells are included in the solution. The recursive function described is laid out in pseudocode in Algorithm 1.
Algorithm 1 My algorithm |
- 1:
procedureDP Recombination - 2:
initialise ( - 3:
- 4:
- 5:
function recursiveFunction(data, CurrentMerge, CurrentSuperCell) - 6:
end function - 7:
%Step 1. Merge with Any Neighbour - 8:
List All Neighbours to CurrentSuperCell - 9:
for do - 10:
- 11:
if NewMerge doesn’t already exist in data then - 12:
- 13:
- 14:
- 15:
recursiveFunction(data, NewMerge, NewSuperCell) - 16:
end if - 17:
end for - 18:
%Step 2. Calculate Cost of Current Merge (inc. memo-ization) - 19:
if Costs of CurrentSuperCell already been calculated then - 20:
- 21:
else - 22:
- 23:
- 24:
end if - 25:
%Step 3. Start New Merge with Any Required Cell - 26:
List all new internal cells not already included in CurrentMerge - 27:
for Each NewInternalCell do - 28:
- 29:
if NewMerge doesn’t already exist in data then - 30:
- 31:
- 32:
- 33:
recursiveFunction(data, NewMerge, NewSuperCell) - 34:
end if - 35:
end for - 36:
%Step 4. Create Edge to Exit - 37:
if all internal cells are already included in CurrentMerge then - 38:
- 39:
end if - 40:
return - 41:
end procedure
|
4.2. Example Recombination
Figure 14 shows an example recombination of a decomposed ROI with three internal cells and two external cells (
Figure 14a). In addition to the co-ordinates of the decomposed cells, the optimiser is also provided with an adjacency graph which shows how the cells can be merged (
Figure 14b) and the list of external cells (cells 4 and 5, highlighted in red).
The first step of the optimiser is to build up the search network shown in
Figure 14c. For decomposed ROIs with a large number of cells, this search graph can become very large, so, for legibility, this example has been deliberately kept very small using just five cells. Using a recursive algorithm, the optimiser builds this graph starting with the lowest (displayed) branch from the start node on the left-hand, side moving towards the exit node on the right-hand side. Once the optimiser reaches a node from which no more forward branches are possible (such as the exit node), the optimiser takes one step back and tests for alternative solutions. This recursion continues until all possible branches have been exhausted. Any node which includes all internal cells is allowed to branch directly to the exit node and therefore represents a possible final solution.
Detailed examination of
Figure 14c highlights the effect of some of the optimisations applied to the recombination process. Firstly, it can be seen that, in the first stage, the optimiser examines recombination with both adjacent cells, 2 and 4 (Rule 2), but only examines starting a new polygon with cell 2. This is because cell 4 is an
optional external cell (Rule 3). The net result of this rule is that “1|4|...” is never examined; however, cell 4 may still be included subsequently if it merges with a required cell later on, for example “1|2&4&5”.
Secondly, it can be seen that node “1|2|3”, at the top of the diagram has a branch going straight to the exit. This is because this solution already contains all of the required internal cells and therefore represents a solution in and of itself (Rule 5).
In addition, although node “1&2&3” also contains all of the required cells, this node does not have a branch to the exit node. In fact, this node only has branches which perform further merging with other cells. This is because the recombination of G{1,2,3} would result in a concave cell, for which the cost has been defined as infinite. Therefore, the optimiser does not attempt to calculate the cost of these further branches (Rule 4).
Finally, there are no branches from “1&2&3&5”. As for “1&2&3”, this sub-region is concave and therefore must be merged with additional cells to create a viable sub-region. In this case, the only viable additional cell is cell 4; however, the resulting sub-region “1&2&3&4&5” has already been found (branched from “1&2&3&4”) and therefore it is unnecessary to calculate it again (Rule 1). Similarly, there are no branches from “1&2&4&5” and “1&2&5”.
The efficiency of the DP algorithm can be compared to brute force methods by looking at the number of solutions calculated, compared to the total number of partitions of a set [
36]. The net effect of these optimisations is that the number of nodes at each stage is minimised as soon as possible, resulting in significantly fewer calculations. As a result, there are only five (out of a maximum 87) possible partitions of the set examined. For comparison, the top-down approach inherently examines only neighbouring cells (Rule 2) but has no other optimisations. For this problem, it would have identified 39/87 partitions (see
Table 1). The optimised “bottom-up” formulation removes 32 of these partitions due to concavity and an additional two due to external cells not required.
Figure 14d shows the optimised recombination of the decomposed cells. Note that
external cell 5 has been included in order to allow cells 2 and 3 to be merged and generate a convex sub-region, but cell 4 has been rejected, resulting in two final sub-regions, G{1} and G{2,3,5}.
4.3. Polygon Convexity
The convexity of a polygon needs to be determined in order to test if each new cell merge during the DP optimisation from the above section is suitable for a convex survey.
Convex polygons have a number of unique properties distinguishing them from concave polygons. In a convex polygon, the sum of all interior angles of a polygon will be less than 180
. In addition, if each edge along the polygon is evaluated in sequence, the direction of rotation of the next edge will always be in the same direction if the polygon is convex. This final property was used in [
37] to create an effective algorithm for finding polygon convexity called the gift wrapping algorithm.
If all the vertices are evaluated in a clockwise direction, they can be individually assessed for convexity. This can be seen in
Figure 15. If all vertices are convex, then the whole polygon is convex. The direction of rotation of each is assessed by taking the cross product as shown below. If the result is
the vertex is convex,
indicates a concave vertex, and 0 means that the vertices
form a straight line:
5. Multi-Cell Routing and Flight Time Calculation
Thus far, all flight time calculations have been performed individually on each convex polygon, enabling the problem to be split into independent sub problems. While this gives us a good approximation for how long the flight will be, the transition between each merged cells has not been taken into account. The full survey path to be flown, including transitions, now needs to be defined. In addition, the full survey flight time in wind for a given decomposition is needed. This is needed in order to give a realistic assessment between the different cost functions available to the DP algorithm. This full flight path will include a launch point (start and end point of the survey), the individual decomposed convex polygon survey paths, and feasible transitions paths between them. Currently, the outputs from the FTIW, NT and MSA cost functions are seconds, number of turns, and meters, respectively, therefore, a direct comparison between them is impossible.
The fastest route can be found from the minimum weight path of a weighted directed graph, where the weight of each edge is the time taken to perform the manoeuvre the edge represents. This will be either be the time to fly the transfer path between cells, or the time taken to perform a convex survey.
The initial join point for a convex survey can be in one of the four corners (
C) of convex polygon (
P), where
j is the index of the cell and the order of the corner numbering is clockwise:
Once a join point (
) is chosen, this also determines the exit point (
) as one of the other corners. The corner designated as the exit point depends on if the number of sweeps is odd or even (Equation (
24)). On an even number of turns, the end corner will be on the same side as the start corner; on an odd number of turns, the end is on the opposite side:
In order to find the fastest traversal path, time costs associated with each edge need to be calculated. The fastest route between
node and the finishing node
needs to be found. These both represent the launch location where the aircraft will start and finish its path from. The edge between the
and the first cell,
, and the edge between the last cell and the
,
, are weighted according to the straight line flight time from one to the other in wind presented in Equation (
25). All the intermediary edge weights will be the time taken to transfer between cells as well as the survey time for the cell in question for a particular
. These are all shown in Equation (
26):
where [
] are the coordinates for
and [
] are for
.
where
p is the index for the column of nodes.
Using the simple three cell decomposition seen in
Figure 16, the directed graph generation can be outlined. An initial cell connectivity graph is used to generate the initial cell traversal order, seen at the top of
Figure 17.
The aircraft is forced to start the survey at the closest cell from its take off location, and the aircraft can only fly between adjacent cells. These simplifications greatly reduce the search space; while this is not optimal due to the rules used, it would be close. As this is an NP-hard problem, for a more complex ROI with more decomposed cells, finding an optimal path would take a prohibitively long to calculate.
The cell connectivity graph is expanded to include all the corner combinations seen at the bottom of
Figure 17. By assigning weights to each edge according to Equation (
26), the shortest route can be found from “
” to “
”. The shortest path can be found with one of the many standard algorithms. In this case, Dijkstra’s algorithm is used.
7. Conclusions
This paper proposes a novel CPP method, designed specifically for low-speed fixed-wing aircraft, such as precision agriculture survey UAVs. The method is developed to optimise a path for covering a polygonal ROI, and as part of this, a calculation for the time taken to transverse a convex polygon in wind is developed. It is shown that wind has a huge effect on survey time and it has been proved mathematically that, in uniform wind, flying perpendicular to the wind confers a flight time advantage over surveying parallel to the wind.
With known aircraft/survey parameters, a complex concave ROI polygon can be optimally decomposed into smaller convex polygons. This is achieved using a “bottom up” dynamic programming approach, which finds the time-optimal convex decomposition within its search space. Taking advantage of the features of a fixed wing UAV, the novel addition of external cells that can be optionally induced during the DP recombination phase gives the CPP the option of overflying corners, which, in turn, may lead to decreased overall flight time. Finally, a full flight path is generated that traverses all the decomposed cells.
To demonstrate clear improvement over previous CPP methods, a Monte Carlo simulation was run where coverage paths were generated for a large number of randomised polygons. A significant improvement was shown over previous methods for typical survey conditions of between 8% and 9%, demonstrating consistent robust performance.
It was also shown that the advantages offered by this method varies greatly due to the type of polygon, wind strength and direction. In particular, wind is shown to have such a large influence that, in one example in
Section 6.1, an improvement of 40% was shown in flight time in high wind. This is a huge improvement, yet, at first glance, might seem unrealistic. However, these small aircraft fly at low airspeeds which sometimes can be close to the wind-speed. In these high wind-speed situations, this work has shown that the wind can have a significant effect on the CPP. It is therefore essential that this technique is used, otherwise considerable time could be wasted flying directly into wind. In particular, polygons with notches (or other small features that increase the complexity of the polygon) and polygons with their long axis being close to perpendicular to the wind direction will see the most benefits for using this method.
In this body of work, only simulation studies have been preformed. As the presented algorithm finds the optimal solution, this results in it being computationally incentive, meaning that it not ideal for use for mission planning in the field. However, work is being conducted to extend the algorithm to a recursive greedy solver, which will give a near optimal solution but in an acceptable time. As this is to be used in the field, extensive flight testing will be conducted during this work. There is a big desire to conduct real world testing, in order to prove the survey model in wind is accurate. As we assume that the wind is steady and uniform, the path following and airspeed tracking of the vehicle control is perfect, and errors as a result of these may accumulate. While these assumptions have been discussed in previous work by this author [
29], they need to be tested in future work.