Design of a Wildlife Avoidance Planning System for Autonomous Harvesting Operations

Harvesting and mowing operations are among the main potential stressors affecting wildlife within agricultural landscapes, leading to large animal losses. A number of studies have been conducted on harvesting practices to address the problem of wildlife mortality, providing a number of management actions or field area coverage strategies. Nevertheless, these are general rules limited to simple-shaped fields, and which are not applicable to more complex operational situations. The objectives of the present study were to design a system capable of deriving a wildlife avoidance driving pattern for any field shape complexity and field boundary conditions (in terms of escape and non-escape areas) and applicable to different animal behaviours. The assumed animal escape reactions are the result of the parameterization of a series of developed behavioural functions. This parameterization will be able to adapt any knowledge that is or might become available as a result of dedicated future experiments on animal behaviour for different species or different animal ages.


Introduction
The intensification of arable farming and associated machinery operations is having an increasing impact on the agro-ecosystem, including wildlife (Stoate et al., 2009). Harvesting and mowing operations are among the main potential stressors affecting wildlife within agricultural landscapes and the spatial distribution of the animal population across areas of a few hundred metres to several hundred kilometres, depending on the specifics of the agricultural areas (Freeman, 1995). The CIC (International Council for Game and Wildlife Conservation) and the Deutsche Wildtier Stiftung (2011) have published a guide to highlight the large animal losses occurring during mowing operations in grasslands and other arable forages. The main species considered to be particularly affected are the roe deer (Capreolus capreolus), the hare (Lepus europaeus), and nesting birds such as the partridge (Perdix perdix). According to the guide, it is estimated that the yearly animal losses from grassland management in Germany reach 500,000, of which 90,000 are roe deer fawns. Jarnemo (2002) analysed roe deer fawn mortality in Sweden and estimated that 25-44% were lost because of mowing operations, probably the second biggest factor of fawn mortality, after red fox (Vulpes vulpes) predations. Hares are also subjected to significant losses caused by mowing. Hare leverets have a particularly high mortality rate due to their use of forage crops for cover. Edwards et al. (2000) estimated 44% of leveret losses to have taken place in lucerne (Medicago sativa) fields, 18% in grass meadow and 17% in clover (Trifolium spp.) fields. Milanov (1996) considered speed to be a key determining factor on the leveret losses caused during mowing.
The United States Department of Agriculture (USDA et al., 2008) proposes a number of management actions to address the problem of wildlife mortality, including selectively cutting grass to leave at least 1/3 of the area uncut, preferably in blocks of at least 10 m wide, and the adoption of a time schedule for cutting according to which at least 1/3 of the grass area should be cut before and/or after the primary seasons of the protected species. Measures such as the adjustment of a flush bar on the mower and mowing exclusively during daylight hours are also proposed. When mowing cannot be delayed until after the nesting season, other recommendations are provided. For example, in the case of species such as rabbits, quail and pheasants, the first approximately 15-20 m of hay around the field perimeter should be left uncut in order to provide adequate space for nesting. Furthermore, as a general rule, it is advised to cut at a higher height than is operationally feasible and using the lowest speed possible (USDA et al., 2008;CIC, 2011;Milanov, 1996;Green et al., 1997;Tyler et al., 1998).
Alternative driving patterns have also been suggested (Green et al., 1997;Tyler et al., 1998). These suggestions are based on the general rule not to entrap the animals in an area that is surrounded by a harvested area, thus leaving no way for animals to escape. For example, a field-work pattern that commences in the centre of the field and works outward (Figure 1b) will allow the animals to move out of the field, instead of being trapped in the centre, since most animals avoid crossing large open areas. Another option is to commence harvesting on one side, working towards a forest or other escape options. The field can also be divided into sub-areas, and harvesting commenced within each sub-area from the centre moving outwards (Figure 1a).
Nevertheless, these are general rules that are limited to simple-shaped fields (i.e., rectangular). Most field shapes are complex, with more than one defined driving direction; field configurations also tend to have more than one recognised escape area, etc. Furthermore, by adopting the proposed wildlife avoidance strategies the non-working travelled distance is increased (as a result of the shortening of the length of the field-work tracks and the increase in the number of turns), significantly reducing operational efficiency. In addition, even if a human-operator were able to plan a complex driving pattern that reduces wildlife impact in such a complex operational environment, the execution of this plan may not be feasible without some sort of navigation-aiding system. The development of a system is therefore required to automatically create the driving strategy plan; this plan must be either visualised for the human operator or directly transferable to the on-board navigation-aiding system of the machine.
In terms of the problem of covering an agricultural field area, a significant amount of research has been recently carried out in a number of related areas, such as path planning (Jin and Tang   The objectives of this work are to develop a method that: can derive a wildlife avoidance driving pattern for any field shape complexity and boundary conditions of the field (in terms of escape and non-escape areas); -is applicable to different animal behaviours, and thus to different species or different ages/attributes of the same species.
The method that is presented here is limited to the case of agricultural field area coverage following the practice of parallel straight lines, either for the whole field area or for sub-areas of the field. The practice of following contour lines is not examined here. It also has to be noted that the present work does not consider a dedicated path planning method but a driving strategy that can be used as a guideline basis for a complete path planner generator, which would include planning modules for a point-to-point path generation taking into account the machine kinematics, etc.

Methodology
The different modules comprising the system are described in Figure 2. Initially, in a pre-processing stage, the grid representation of the field is generated. The inputs here include the field boundary, the segments in the boundary, which are characterised as "goal" (i.e., potential escape areas for the animal) or "obstacle" (i.e., areas that prohibit animal movement or stemming from animal behavioural preferences), the operating width of the machine and the in-field driving direction. The outputs of the pre-processing stage are (a) the 2D Euclidean representation of the field (used in the plan generation module as an interface where the user defines the plan), and (b) the grid space where each cell has an identity which is specified by its position coordinates in the grid space and by a number of Boolean features that determine whether the cells belong to the field area, the field boundary or one of the two types of boundary regions (i.e., "goal" and "obstacle" regions). The preprocessing stage is executed once and its results are used as the basic outline for testing different plans.
The second module of the system involves the simulation of the animal behaviour. The module includes a series of developed behavioural functions containing parameters depicting the various animal escape reactions imposed by the threat of an agricultural machine operating close to the animal.
A plan is defined by the user in terms of the entry point of the machine and the potential division of the field area into sub-field areas. Based on this definition the "plan generator" module generates a complete area coverage plan. This plan is tested against the potential animal avoidance behaviours. If the plan is not feasible in terms of the animal avoiding the machine then a new plan definition is required by the user. In the case of a feasible plan, this plan is transformed to a point-to-point path plan that can be either inputted into a navigation-aiding system or visualised to the human-operator.

Geometrical field representation in 2D Euclidian space
In a first stage, the field in question is represented using 2D Euclidian space geometry. This representation involves the generation of two kinds of geometric entities: the fieldwork tracks, and the headland passes (the peripheral passes that provide the required space for the machine turnings) that are required for complete field-area coverage. The coordinates of the points which define each individual track and each individual headland pass are generated. The starting and ending points of the field-work tracks are located on the internal field boundary, which is the offset of the field boundary equalling a working width, comprising a number of sequential passes. An illustrative example is presented in Figure 3. For the generation of this geometrical representation, the method described by Hameed et al. (2010) was implemented.
Next, the 2D Euclidian planning space is transformed into a Manhattan metric space by generating a reference orthogonal grid. The grid is generated such that its y-axis is parallel to the main driving direction (i.e., the direction of the parallel field-work tracks that cover the whole field area). Each cell of the grid is a square with vertex equal to the operating width. Figure 4 presents two different grids corresponding different driving directions and different operating widths.
A geometric transformation is always applied to the field polygon coordinates such that the y-axis of the reference grid coincides with the driving direction of the field-work tracks. Let denote the vector by which elements are ordered as East and North coordinates of the vertices of the field boundary ( ). The driving angle, , of the field tracks is defined as the directed angle between the driving direction and the South-North axis of the UTM coordinates system. First a rotation is applied on the field boundary by (anticlockwise) by using the transformation: , The dimensions of the grid are : Each point that belongs to any segment that is a part of a geometrical entity of the field (field-work track or headland pass) is mapped to a cell of the reference grid assigned to the field by the transformation (Note the transformation from the grid cells to the field returns the centre of a cell in the relUTM coordinates system.)

Different regions in the grid space
According to the transformation , the route of the machine in the 2D Euclidean space is interpreted in the Manhattan space as a discrete plan composed of a number of steps. Let denote the number of actions (steps) that, according to the plan, the machine has to execute in order to complete the coverage of the area. In order to simplify the approach, it is assumed that there are two distinct types of surrounding areas adjacent to the field. The first type includes any potential escape area for the animal (e.g., an adjacent un-harvested field, a tree area, etc.), while the second type includes areas that prohibit animal movement, or is based on animal behavioural preferences (e.g., a harvested open-space adjacent field, a physically un-passable area, etc.). The following regions are defined in the grid space : a. The boundary region: . This region corresponds to the boundary of the field. b. The field region: . This region corresponds to the main field area and represents the potential states of the machine (all the cells of this area have to be visited by the machine). c. The free region: . This region corresponds to the un-harvested area and is time-dependent. It is calculated thus: , where is the number of steps required to execute the machine route plan (as mentioned earlier). d. The goal region: . This region includes the potential escape area for the animal. e. The obstacle region: . This region includes areas that prohibit animal movement, or is based on animal behavioural preferences.
The free region, the goal region, and the obstacle region represent surrounding areas adjacent to the field and at the same time express a measure of the preference of the animal to move/escape into or through this area (for example, it is preferable for the animal to escape into a neighbouring un-harvested field rather into an area which only provides semi-cover, such as a tree area). An example is illustrated in Figure 5.

Modelling of the discrete actions
There are two decision-makers inherent in the current problem domain: the executing machine and the animal. The animal as decision-maker has a set of actions which interfere with the (execution of the) decisions made by the machine. In each tested plan, the machine decisions are pre-determined and are tested against the corresponding animal actions. Let denote the set of actions of the machine (the machine action space) and denote a machine action. The animal action is "triggered" by the machine action, and consequently a different animal action space should be defined for every . This way, for each , a non-empty set is defined, denoting the animal action space, where each is referred to as an animal action. This means that if the machine chooses an action, , then the animal chooses an action from the set . In the present approach, the action spaces for both machine and animal are assumed to be finite.   . Assuming that the in-field travelling speed of the machine is the same for both productive and non-productive travelled distances, the discrete time unit is the time that the machine needs to cover a physical area corresponding to the area of a cell; consequently, since cells are assumed to be square, the discrete time unit is equal to a distance equal to its operating width. A complete coverage of the field involves a path in the grid space that consists of a sequence of actions that moves the machine in the corresponding transition steps , where .
The examined case involves animal species that are able to move faster or at the same speed as the machine (e.g., red deer). In the grid space, this means that while the machine moves a step (i.e., goes to the next stage of the planning problem) the animal probably moves more than one cell (step . The specific values of in an animal action are determined by the animal's behaviour.

Modelling of the animal behaviour
It is assumed that the machine first executes an action and then the animal executes a triggered action. The machine's state is therefore an input for the action that the animal decides to execute at its state . Let denote the initial state of the machine and let denote the initial state of the animal. The problem is formulated in the Manhattan metric, and consequently the distance between two cells (or equivalently between the two states that correspond to these cells) is given by: , while the distance in the x and y directions is given by: and , respectively.
The action of the animal is determined by a series of behavioural functions defined in the following.
The first function connects the running speed of the animal in relation to the distance between the machine and itself, adopting the rationale that the animal increases speed when the machine is near to the animal as opposed to when it is at a distance to the animal. For modelling this behaviour the function is introduced, where: The second function represents the reaction of the animal with awareness of the fact that the machine is moving towards or away from it. In order to model this behaviour, the function is introduced, where . For the x-direction the function is defined as: Analogously, the function is defined for the y-direction. The third function introduced represents the stochastic factor of the non-predicted behaviour of the animal . Given the probability of a random reaction of the animal (future developments will include the actual probability distribution), this function works as an on-off function which rejects (1)   By implementing all of the above-defined functions, the number of steps that the animal executes in the Manhattan-Metric space in each direction, as a result of a machine's action, is given by:

Implementation
The approach was developed and implemented in the Matlab ® programming environment. The whole process is described in Figure 6. Where the process of testing a plan ends in such a way that the animal reaches a defined goal state, the module terminates and the plan is transformed into a 2D Euclidean space plan by the corresponding module. Otherwise, a new plan has to be generated and tested. Plan generation is initiated by clicking on the 2D Euclidean map that is generated in the pre-processing module where the user can indicate the plan by simply defining the sub-areas of the field. Then the plan generation module covers each sub-area based on the principle of always generating a turning area in each sub-area.
In brief, the plan generation includes the following steps: 1. A main driving direction is defined for the field, which is the parallel to the longest edge of the field boundary. 2. In each of the goal regions (which are polyline subsets of the filed boundary polygon) a driving direction is allocated which could be either the main driving direction (defined in step 1) or that perpendicular to the main one. The criterion for the selection between the two directions is the smallest average angle between the driving direction and each of the linesegments making up the goal region. 3. A sub-area of the total field area is created for each of the goal regions by enveloping the polyline of the goal region perpendicular to its assigned driving direction. Figure 6. The general plan generation structure 4. Any overlapping area of the sub-areas created in step 3 is allocated to the larger sub-area and removed from the non-assigned area. 5. Any remaining field area after step 3 is allocated to the adjacent sub-area (as it has been defined after step 4) with which it has the longest common boundary. 6. The area covered starts from the sub-area (as defined after step 5) where the entry point of the machine belongs. The covering of a sub-area includes the following steps: a. The machine performs a boundary pass (excluding the polyline corresponding to the goal region) by distancing the nearest ending point of the goal region until it reaches the opposite ending point of the goal region. b. The machine starts to cover the interior of the subarea by parallel field-work tracks (in the direction of the assigned driving direction to the sub-area) by moving closer and closer to the goal region. c. The machine moves to the next sub-area executing the steps from 6a. The total process is terminated when all sub-areas have been covered.
Two test fields were employed in order to demonstrate the feasibility of the generated paths. The first field (field A, Figure 8) has an area of 7.54 ha and is located at: [9.571624, 56.491121], while the second field (field B, Figure 9) has an area of 14.45 ha and is located at: [9.580164, 56.493514].

Simulated animal behaviours
As a first step for testing the system, different model parameterizations determining the escape reactions of the animal are illustrated. In Figure 7, different simulated escape reactions are shown for the same part of the machine driving pattern (Figure 7a) and the same initial position of the animal (in the grid space, 26-4). For the presented simulations, the behavioural function has been assumed as a linear function that incorporates a threshold value for the reaction of the animal, meaning that there is no animal reaction when the distance from the machine is above this defined threshold value. Figure 7b illustrates the escape reaction of an animal capable of a maximum running speed of 30 km/h. The distance threshold for the reaction of the animal has been set to infinity and its speed has been assumed to be independent of the distance from the machine. No uncertainty has been introduced into its behaviour. In Figure 7c the distance threshold for the animal reaction has been set to 200 m. In Figure 7d the threshold has been set to 100 m. In Figure 7e the maximum speed of the animal has been set 10 km/h, which equals the machine's operating speed. Figure 7f and Figure 7g present random selected outcomes for the case of 30 km/h speed where a probability has been introduced. Figure 7k illustrates a random outcome for the same probability but for an animal capable of 10 km/h maximum running speed. Figure 7l and Figure 7m illustrate outcomes for probability for random behaviour. It is clearly depicted that even for a low random behaviour probability an animal's escape actions are highly diversified. Figure 7n and Figure 7o illustrate outcomes for the same probability but for a faster animal (maximum running speed: 45 km/h).

Visualization of generated paths in the test fields
In the following the feasible paths for the selected fields mentioned in the implementation section are presented. The operating width was assumed to be 10 m and the machine operational speed was assumed to be 10 km/h. The distance threshold for the animal's reaction was set to 100 m, while the probability for random behaviour of the animal was set to 0.2. In both cases, the field area was divided into two sub-areas according to the preferences of the user. Based on the information provided by the user (e.g., starting point and sub-areas) the system generated a plan taking into account all the operational constraints (e.g., operating in parallel field-work tracks, having a free area for headland turnings, avoiding overlaps and missed areas, and machine manoeuvrability). The incorporation of the operational constraints ensures that the execution of the plan is feasible from an operational point of view. This plan was subjected to be tested against the animal escape reactions. For the specific plan, the whole chain of the transition actions of the animal was simulated by the system for each one of potential initial positions of the animal within the field area (corresponding to grid cells). The plan is considered as feasible if for any initial position of the animal the simulation of the transition actions leads to a state that belongs to the goal region of the planning problem, indicating that the animal has escaped the threat of the machine. Figures 8c and 9c illustrate the feasible plans for the cases of field A and field B, respectively.

Conclusions
In the presented work, a planning approach that integrates the operation of machines and the modelling of animal behaviour was developed. The system provides algorithmic generation of an operationally feasible plan for the machine, which was tested against assumed animal escape reactions. The assumed animal escape reactions result from the parameterization of a series of developed behavioural functions. This parameterization will be able to adapt any knowledge that is or might become available as a result of dedicated future experiments on animal behaviour for different species or different animal ages.
The operational efficiency of the generated plans, in terms of total operational time, total travelled distance, total nonworking distance, energy consumption, etc., has not been considered in the current paper. It is true that the efficiency of a specific generated plan could be expected to be reduced compared to a plan generated under a global efficiency criterion (e.g., minimization of the field operational time), and this indicates that the problem has to be approached as a multiple-criteria optimization problem. This should be considered an issue for further research.