You are on page 1of 19

agriculture

Article
Research on an Intelligent Agricultural Machinery Unmanned
Driving System
Haoling Ren 1,2, *, Jiangdong Wu 1,2 , Tianliang Lin 1,2, , Yu Yao 3 and Chang Liu 1,2

1 College of Mechanical Engineering and Automation, Huaqiao University, Xiamen 361021, China;
1711121029@stu.hqu.edu.cn (J.W.); ltl@hqu.edu.cn (T.L.); 22014080052@stu.hqu.edu.cn (C.L.)
2 Fujian Key Laboratory of Green Intelligent Drive and Transmission for Mobile Machinery,
Xiamen 361021, China
3 Mechatronic Engineering with the School of Beihang University, Beijing 102206, China;
19013080044@stu.hqu.edu.cn
* Correspondence: rhl@hqu.edu.cn

Abstract: Intelligent agricultural machinery refers to machinery that can independently complete
tasks in the field, which has great significance for the transformation of agricultural modernization.
However, most of the existing research on intelligent agricultural machinery is limited to unilateral
research on positioning, planning, and control, and has not organically combined the three to form a
fully functional intelligent agricultural machinery system. Based on this, this article has developed
an intelligent agricultural machinery system that integrates positioning, planning, and control. In
response to the problem of large positioning errors in the large range of plane anchoring longitude
and latitude, this article integrates geographic factors such as ellipsoid ratio, long and short axis
radius, and altitude into coordinate transformation, and combines RTK/INS integrated inertial
navigation to achieve precise positioning of the entire vehicle over a large range. In response to
the problem that existing full-coverage path planning algorithms only focus on job coverage as the
optimization objective and cannot achieve path optimization, this paper proposes a multi-objective
function-coupled full-coverage path planning algorithm that integrates three optimization objectives:
job coverage, job path length, and job path quantity. This algorithm achieves optimal path planning
while ensuring job coverage. As the existing pure pursuit algorithm is not suitable for the motion
control of tracked mobile machinery, this paper reconstructs the existing pure pursuit algorithm
Citation: Ren, H.; Wu, J.; Lin, T.; Yao, based on the Kinematics characteristics of tracked mobile machinery, and adds a linear interpolation
Y.; Liu, C. Research on an Intelligent module, so that the actual tracking path points of motion control are always ideal tracking path
Agricultural Machinery Unmanned points, effectively improving the motion control accuracy and control stability. Finally, the feasibility
Driving System. Agriculture 2023, 13, of the intelligent agricultural machinery system was demonstrated through corresponding simulation
1907. https://doi.org/10.3390/ and actual vehicle experiments. This intelligent agricultural machinery system can cooperate with
agriculture13101907
various operating tools and independently complete the vast majority of agricultural production
Academic Editor: José Lima activities.

Received: 1 September 2023


Keywords: intelligent agricultural machinery; unmanned driving; vehicle positioning; full-coverage
Revised: 19 September 2023
path planning; motion control
Accepted: 27 September 2023
Published: 28 September 2023

1. Introduction
Copyright: © 2023 by the authors. With the continuous development of technology and the intensification of population
Licensee MDPI, Basel, Switzerland. aging, countries around the world are beginning to undergo agricultural modernization
This article is an open access article transformation. Agriculture 4.0 utilizes a series of emerging technologies to upgrade
distributed under the terms and traditional production methods and world agricultural strategies into optimized value
conditions of the Creative Commons chains, enhancing disruptive solutions at all stages of the agricultural production chain [1].
Attribution (CC BY) license (https://
Agricultural machinery, as a powerful driving force for agricultural modernization, has
creativecommons.org/licenses/by/
great significance in achieving intelligent agricultural machinery. Compared to traditional
4.0/).

Agriculture 2023, 13, 1907. https://doi.org/10.3390/agriculture13101907 https://www.mdpi.com/journal/agriculture


Agriculture 2023, 13, 1907 2 of 19

agricultural machinery, intelligent agricultural machinery has the advantage of effectively


improving work quality and efficiency, and reducing labor costs [2–7].
The agricultural production process generally includes four stages: cultivation, plant-
ing, management, and harvesting. The key to achieving intelligent mechanized operations
in these four stages is to achieve autonomous full-coverage path planning and walking
of corresponding agricultural machinery. Based on this, this article takes tracked mobile
machinery as the research object, committed to achieving its autonomous full-coverage path
planning and walking in real fields. On the basis of achieving autonomous full-coverage
path planning and walking of tracked mobile machinery, different agricultural production
automation functions can be achieved with the assistance of different operation tools.
It is generally believed that unmanned agricultural machinery mainly includes three
modules: vehicle positioning, full-coverage path planning, and motion control [8]. For the
positioning module of unmanned agricultural machinery, European and American coun-
tries began relevant research as early as the mid-20th century [9–11]. At that time, there
were mainly two vehicle positioning methods: cable electromagnetic induction [12–14] and
setting markings on farmland boundaries [15,16]. Both methods required renovation of
farmland, which was costly and difficult to deploy and apply on a large scale. After the
1980s, with the continuous development of technology, satellite positioning began to be
applied to agricultural machinery navigation. O’Conner et al. [17,18] implemented auto-
matic navigation of agricultural machinery based on a four-antenna GPS system, but the
system did not use carrier phase difference technology, resulting in low positioning ac-
curacy and low positioning frequency that could not meet the needs of motion control.
Gerrish et al. [19] achieved the positioning of agricultural machinery vehicles based on
machine vision, but machine vision positioning is susceptible to environmental factors
such as lighting and weather, resulting in low positioning robustness. Pilarski et al. [20]
fused the camera with RTK-GPS, which interpolated through machine vision positioning
information to compensate for the limited transmission frequency of RTK-GPS. They also
fused the positioning information of the two, effectively improving positioning accuracy.
However, high positioning accuracy can only be achieved when environmental factors
such as lighting and weather meet the requirements of machine vision positioning.
Full-coverage path planning is a crucial part of achieving intelligent agricultural
machinery, and the generated path directly affects the accuracy and efficiency of agricultural
machinery vehicle motion control. Jin et al. [21] divided complex farmland into several sub-
regions and generated a complex farmland full-coverage path by solving the full-coverage
paths of the sub-regions. However, the generated path was not the optimal path, which
seriously affected the efficiency of agricultural machinery work. Fabre et al. [22] used the
greedy algorithm as the objective function for farmland full-coverage path planning, which
to some extent solved the problem of high repetition rate in full-coverage path planning,
but did not take into account factors such as farmland coverage rate and generated path
length. Yang et al. [23] also used the task repetition rate as the objective function and
convolutional neural networks for full-coverage path planning of farmland. However, this
method did not take into account factors such as farmland coverage rate and generated path
length, and the convolutional neural network is a black box model, resulting in uncertainty
in the generated target path.
At present, commonly used motion control algorithms include motion control al-
gorithms based on kinematic models of mobile machinery, motion control algorithms
based on dynamic models of mobile machinery, and motion control algorithms indepen-
dent of kinematic and dynamic models [24]. Agricultural machinery generally travels
at a relatively slow speed, and the lateral force and tire slip to which it is subjected can
be almost ignored. Therefore, motion control algorithms based on the kinematic model
of mobile machinery are commonly used to control the entire vehicle motion of agricul-
tural machinery [25]. O’Connor et al. [26] simplified the kinematic model of agricultural
machinery to a two-wheeled vehicle model, constructed corresponding state equations,
and designed a corresponding linear optimal controller. However, the control effect of this
Agriculture 2023, 13, 1907 3 of 19

optimal controller depends on the measurement accuracy of position deviation, heading


deviation, and front-wheel angle. Li et al. [27] used lateral and longitudinal errors as state
variables and designed a linear quadratic regulator to control it. The control system is not
affected by the speed of the agricultural machinery vehicle, but it is prone to oscillations
when the steering system time constant is too large. Model predictive control is a motion
control algorithm based on the kinematic or dynamic model of the entire vehicle, which
determines the current optimal control quantity by predicting the future state in a certain
time domain. Its control accuracy is closely related to the accuracy of the established
model, and the calculation of model predictive control is relatively complex, which cannot
meet the real-time requirements of the entire vehicle motion control. The University of
Magdeburg in Germany designed a model predictive controller for dynamic modeling of
specific agricultural machinery. However, due to the complexity of the calculation of the
model predictive controller, it was unable to meet the real-time requirements of motion
control. Therefore, only simulation experiments were conducted [28].
In summary, there are two main methods for positioning agricultural machinery vehi-
cles: machine vision positioning and satellite positioning. Machine vision positioning is
susceptible to environmental factors such as light and weather, and is unstable. However,
satellite positioning frequency is too low and single GPS antenna positioning can only
achieve sub-meter-level positioning. Based on this, this article adopts RTK/INS integrated
inertial navigation fusion positioning, supplemented by a high-precision coordinate trans-
formation algorithm, to achieve high-frequency centimeter-level positioning of the entire
vehicle in the local Cartesian coordinates coordinate system. In response to the problem
of existing full-coverage path algorithms only considering job coverage or job repetition
rate, this paper proposes a multi-objective function-coupled full-coverage path planning
algorithm that integrates three optimization objectives: job coverage, job path length,
and job path quantity. This algorithm achieves the optimal path planning while ensuring
job coverage. In response to the difficulties in tuning existing PID control parameters and
poor real-time performance of model predictive control, this paper reconstructs the existing
pure pursuit algorithm based on the kinematic model of tracked agricultural machinery,
supplemented by a linear interpolation module, so that the path points tracked by the
entire vehicle are all ideal path points, effectively improving the accuracy and stability of
vehicle motion control. Based on the three major technologies proposed above, namely
fusion positioning, full-coverage path planning, and motion control, an intelligent un-
manned driving system for agricultural machinery is constructed. The simulation and real
vehicle test platforms are built using tracked agricultural machinery as a prototype for
relevant experiments. The simulation and actual vehicle experiment results prove that the
intelligent agricultural machinery unmanned driving system constructed in this paper has
precise positioning, high control accuracy, and can effectively complete field full-coverage
path tracking, laying a certain foundation for the development of intelligent agricultural
machinery unmanned driving-related technologies in the future.

2. RTK/INS Fusion Positioning Coordinate Transformation


Due to the susceptibility of machine vision positioning to environmental factors such
as lighting and weather, this article adopts satellite positioning. Due to the fact that sin-
gle line GPS can only achieve sub-meter-level positioning accuracy and low positioning
frequency, this article adopts carrier phase differential GPS technology (RTK), supple-
mented by inertial navigation system (INS) interpolation, to achieve high-frequency and
high-precision positioning.
The longitude and latitude altitude coordinates obtained from the RTK/INS integrated
inertial navigation system are in the WGS-84 coordinate system and cannot be directly
applied to subsequent path planning and motion control. Therefore, coordinate transforma-
tion is necessary to convert the longitude and latitude altitude coordinates into Cartesian
coordinates. The commonly used coordinate transformation method is the plane vector
anchoring method, which constructs two sets of vectors in the WGS-84 coordinate system
Agriculture 2023, 13, 1907 4 of 19

and the local coordinate system defined by the vehicle for plane coordinate transformation
based on the principle of the same length ratio and angle between two sets of vectors in
different linear transformation coordinate systems. This method is simple and efficient,
and only needs to complete anchoring through three sets of longitude and latitude altitude
coordinates and their corresponding plane coordinates in the local coordinate system of the
vehicle. However, this method treats the Earth’s surface as a plane and does not consider
parameters such as the altitude of the vehicle and the eccentricity of the Earth’s ellipsoid,
which can result in significant errors during large-scale positioning.
Based on this, this article adopts a new coordinate transformation method, as shown
in Figure 1. This transformation method takes into account parameters such as the current
altitude of the entire vehicle, the eccentricity of the Earth’s ellipsoid, and the radius of the
Earth’s major and minor axes. The longitude and latitude coordinates of the WGS-84 coor-
dinate system are converted into Cartesian coordinates in the Earth-Centered Earth-Fixed
coordinate system (ECEF), and then the Cartesian coordinates in the ECEF coordinate sys-
tem are converted into Cartesian coordinates in the local Cartesian coordinates coordinate
system (ENU) to achieve vehicle positioning. The derivation of this method is as follows.

Figure 1. Schematic diagram of coordinate transformation.

Calculate the eccentricity of the Earth ellipsoid and the curvature radius of the reference
ellipsoid corresponding to the current vehicle position, as shown in Equations (1) and (2):

a2 − b2
e2 = (1)
a2

a
N= q (2)
1 − e2 sin2 (lat)
among them, e is the eccentricity of the Earth, a is the long radius of the reference Earth,
b is the short radius of the reference Earth, N is the curvature radius of the reference
Earth corresponding to the current position of the entire vehicle, and lat is the latitude
information in the longitude and latitude altitude coordinates of the current vehicle located
in the WGS-84 coordinate system.
By using the eccentricity of the Earth ellipsoid and the curvature radius of the reference
ellipsoid corresponding to the current vehicle position, the longitude and latitude coordi-
nates of the WGS-84 coordinate system where the current vehicle is located are converted
into Cartesian coordinates in the ECEF coordinate system, as shown in Equation (3).

 X = ( N + alt) cos(lat) cos(lon)
Y = ( N + alt) cos(lat) sin(lon) (3)
Z = ( N (1 − e2 ) + alt) sin(lat)

Agriculture 2023, 13, 1907 5 of 19

among them, ( X, Y, Z ) is the Cartesian coordinates of the current vehicle located in the
ECEF coordinate system, (lon, lat, alt) is the longitude and latitude altitude coordinates of
the current vehicle located in the WGS-84 coordinate system, N is the reference Earth cur-
vature radius corresponding to the current vehicle position, and e is the Earth eccentricity.
Select the origin of the ENU coordinate system, measure the corresponding longitude
and latitude altitude coordinates using RTK/INS integrated inertial navigation, and use
Equations (1)–(3) to convert the longitude and latitude altitude coordinates corresponding
to the origin of the ENU coordinate system to Cartesian coordinates under the ECEF
coordinate system, as shown in Equations (4) and (5).
a
N0 = q (4)
1 − e2 sin2 (lat0 )

 X0 = ( N0 + alt0 ) cos(lat0 ) cos(lon0 )
Y = ( N0 + alt0 ) cos(lat0 ) sin(lon0 ) (5)
 0
Z0 = ( N0 (1 − e2 ) + alt0 ) sin(lat0 )
among them, N0 is the reference Earth curvature radius corresponding to the ENU co-
ordinate system origin, ( X0 , Y0 , Z0 ) is the Cartesian coordinates of the ECEF coordinate
system where the ENU coordinate system origin is located, and (lon0 , lat0 , alt0 ) is the
longitude and latitude altitude coordinates of the WGS-84 coordinate system where the
ENU coordinate system origin is located.
Subtract the Cartesian coordinates of the current vehicle in the ECEF coordinate system
from the Cartesian coordinates of the ENU coordinate system origin in the ECEF coordinate
system, and use the coordinate difference to solve the coordinates of the current vehicle in
the ENU coordinate system, as shown in Equations (6) and (8).

∆X
     
X X0
 ∆Y  =  Y  −  Y0  (6)
∆Z Z Z0

∆X
   
XENU
 YENU  = S ·  ∆Y  (7)
ZENU ∆Z
 
− sin(lon0 ) cos(lon0 ) 0
S = − sin(lat0 ) cos(lon0 ) − sin(lat0 ) sin(lon0 ) cos(lat0 ) (8)
cos(lat0 ) cos(lon0 ) cos(lat0 ) sin(lon0 ) sin(lat0 )
among them, (∆X, ∆Y, ∆Z ) is the difference between the coordinates of the current vehicle
located in the ECEF coordinate system and the coordinates of the ENU coordinate system
origin located in the ECEF coordinate system, ( X, Y, Z ) is the Cartesian coordinates of
the current vehicle located in the ECEF coordinate system, ( X0 , Y0 , Z0 ) is the Cartesian
coordinates of the ENU coordinate system origin located in the ECEF coordinate system,
( XENU , YENU , ZENU ) are the coordinates of the current vehicle located in the ENU coor-
dinate system, and S is the coordinate transformation matrix from the ECEF coordinate
system to the ENU coordinate system, (lon0 , lat0 , alt0 ) is the longitude and latitude altitude
coordinates of the ENU coordinate system origin located in the WGS-84 coordinate system.

3. A Fully Covered Path Planning Algorithm with Multi-Objective Function Coupling


In response to the problems of existing full-coverage path planning algorithms that
only consider job coverage or job repetition rate as optimization objectives, single opti-
mization objective, and non optimal path generation, this paper proposes a multi-objective
function coupled full-coverage path planning algorithm, which takes parameters such as
job coverage, global path length, and number of paths as coupling optimization objectives
Agriculture 2023, 13, 1907 6 of 19

to generate the global optimal path while meeting job coverage, effectively improving
operational efficiency and saving energy costs for agricultural machinery.

3.1. Agricultural Machinery Operation Area and Parallel Path Generation


The technical route of the multi-objective function-coupled full-coverage path plan-
ning algorithm proposed in this article is as follows. Firstly, the RTK/INS integrated
inertial navigation is used to dot the actual farmland boundary, obtain the longitude and
latitude altitude coordinates corresponding to each vertex of the actual farmland bound-
ary, and generate the corresponding farmland boundary in the ENU coordinate system,
as shown in Figure 2. On the basis of the corresponding farmland boundary, shrink a certain
width inward to generate the agricultural machinery operation area, as shown in Figure 3.
The contraction width is generally set as the turning radius of the agricultural machinery.

Figure 2. Schematic diagram of farmland boundary.

Figure 3. Schematic diagram of agricultural machinery operation area.

Plan several parallel paths within the generated agricultural machinery operation area
to achieve full-coverage path planning and operation of agricultural machinery within
the operation area. To ensure the optimal coverage and operation path of agricultural
machinery in the operation area, this article sets three optimization objective functions.
Firstly, the objective function for generating the number of parallel paths within
the work area is to minimize the number of parallel paths generated while ensuring
job coverage, in order to improve the walking and working efficiency of agricultural
machinery. The number of parallel paths generated is related to the area and shape of the
agricultural machinery operation area, as well as the width of the agricultural machinery
itself. Moreover, since the minimum number of parallel paths corresponding to square
farmland is the largest when the area of the agricultural machinery operation area is fixed,
the objective function satisfies the following relationship:

Sw
0 ≤ Nθ ≤ (9)
Wr
Agriculture 2023, 13, 1907 7 of 19

among them, Nθ is the number of parallel paths generated at the angle of θ, Sw is the area of
square farmland operation area, and Wr is the width of agricultural machinery operation.
The second optimization objective function set in this article is the job coverage
objective function, which aims to maximize the job coverage of agricultural machinery
traveling along the planned path, as shown in Equation (10).
TS i
Sw S i
Scov = (10)
Sw

among them, Scov is the coverage rate of agricultural machinery operation, Sw is the area
of agricultural machinery operation area, and Si is the area of agricultural machinery
operation along the i-th parallel path. The third optimization objective function set in
this article is the total length objective function of the operation path. The function is to
minimize the total length of the generated fully covered path while ensuring the coverage
rate of agricultural machinery operations, as shown in Equation (11).
i
M M L p −1
∑L i
=∑ ∑ Lip= j+1 − Lip= j (11)
i i j

M
among them, ∑ Li is the total length of all parallel paths, M is the number of parallel paths,
i
Lip is the number of path points for the i-th parallel path, Lip= j is the j-th path point on the
i-th parallel path, and k x k is the Euclidean norm.
When planning parallel paths, the above three objective functions work together to
ensure that the planned global coverage path maximizes job coverage and path optimality.

3.2. Parallel Path Sorting and Curve Generation


In order to adapt agricultural machinery to different scenarios, this article sets up
four parallel path-sorting methods, namely boustrophedon sorting, snake sorting, spiral
sorting, and custom sorting, as shown in Figure 4. The boustrophedon sorting method
is widely used in full-coverage path planning. It adopts a reciprocating and circuitous
covering method. After driving along the first parallel path, it immediately follows the
second parallel path, and so on, until the entire vehicle runs along all parallel paths.
The disadvantage of this method is that the distance between adjacent driving paths is too
short, resulting in sharp curves that affect the control effect of the entire vehicle. Unlike
the sequential traversal of boustrophedon sorting, snake sorting skips one parallel path
each time, travels to the last parallel path, and then returns to driving along other parallel
paths that have not been driven. The advantage of this method is that the distance between
adjacent driving paths is large, and the generated curves are relatively smooth.

Figure 4. Parallel Path Sorting Method.

During the crop harvesting process, due to the limited capacity of the harvester, it is
necessary to unload the crops into the truck after harvesting a portion of the area. In this
case, spiral sorting can be used to avoid the truck from driving to the uncut area and
Agriculture 2023, 13, 1907 8 of 19

damaging the crops. The key point of spiral sorting is that the operation area can be
divided into several sub-areas, and spiral driving can be carried out in the sub-areas.
After the current sub-area is covered, it can be moved to the next sub-area. Custom sorting
is mainly to meet the personalized needs of different users, and users can independently
define parallel path sorting according to their actual needs.
After arranging the parallel paths in order, corresponding curves can be generated
between adjacent parallel paths with sequence numbers. In this article, there are three
methods for generating curves: straight line method, Dubins curve [29], and Reeds Shepp
curve [30]. The straight line method directly connects the endpoint of the current parallel
path with the starting point of the adjacent parallel path with a straight line. The Dubins
curve method and the Reeds Shepp curve method use the Dubins curve and the Reeds
Shepp curve to connect the endpoint of the current parallel path with the starting point
of the adjacent parallel path with the next ordinal, respectively. It is worth noting that the
curves generated by the Dubins curve method only require the vehicle to have forward
function to complete tracking, while the curves generated by the Reeds Shepp curve
method require the vehicle to have both forward and backward functions to complete
corresponding curve tracking.

4. Improved Pure Pursuit Algorithm Based on Linear Interpolation


In response to the difficulties in parameter tuning of existing PID algorithms and the
poor real-time performance of model predictive control, this paper reconstructs the existing
pure pursuit algorithm based on the kinematic model of tracked agricultural machinery
chassis, and designs a linear interpolation algorithm on this basis. This algorithm can make
the target points of each tracking of the entire vehicle ideal, effectively improving control
accuracy and smoothness. The technical details are as follows.
Figure 5 is the schematic diagram of an improved pure pursuit algorithm proposed in
this article for the kinematic model characteristics of tracked agricultural machinery chassis.
Among them, R is the arc radius of the tracked agricultural machinery chassis tracking
path, α is the angle between the agricultural machinery vehicle body and the tracking
target point, e is the lateral deviation between the agricultural machinery vehicle and the
tracking target point, ld is the preview distance, b is the half-value of the left and right track
spacing of the tracked agricultural machinery chassis, and ( x p , y p ) are the coordinates of
the tracking target point.

Figure 5. Schematic diagram of improved pure pursuit algorithm.

The basic principle of the improved pure pursuit algorithm proposed in this article is
as follows: Firstly, the current pose of the entire vehicle is obtained through the RTK/INS
integrated inertial navigation system combined with the coordinate conversion algorithm
proposed in this article. The tracking target point of the entire vehicle is determined based
on the given preview distance and the given global tracking path. After determining the
tracking target point of the entire vehicle, a circular arc is constructed between the vehicle
and the tracking target point as the local path for the vehicle to travel to the tracking target
Agriculture 2023, 13, 1907 9 of 19

point. Through geometric relationships, the local path arc radius R of the entire vehicle
traveling to the tracking target point can be solved. Given the tracking speed vc of the
entire vehicle, the angular velocity w of the entire vehicle around the center of the tracked
local path can be calculated. Based on the angular velocity, the velocities v L and v R of the
left and right tracks of the tracked agricultural machinery chassis can be further calculated.
By strictly calculating and controlling the speed of the left and right tracks, the entire
vehicle can track the local path until it reaches the tracking target point, and then search for
the next tracking target point. Repeat the above steps until the entire vehicle reaches the
given global tracking path endpoint.
The relevant derivation is shown in Equations (12)–(16). It is worth noting that the
chassis of tracked agricultural machinery belongs to differential mobile machinery, which
is different from the Ackermann steering model that achieves turning by changing the
front wheel angle. It controls the differential speed of the left and right tracks to achieve
the steering of the entire vehicle. When the speed of the left and right tracks is the same,
the entire vehicle goes straight; when the speed of the left track is greater than that of the
right track, the entire vehicle turns right; Otherwise, turn left.

ld R
= (12)
sin(2α) sin( 2 − α)
π

1 2 sin α 2e
k= = = 2 (13)
R ld ld
vc 2evc
w= = kvc = 2 (14)
R ld

2evc ( R − b)
v L = w( R − b) = (15)
ld2

2evc ( R + b)
v R = w( R + b) = (16)
ld2
Due to the fact that the pure pursuit algorithm tracks a path consisting of several
discrete path points, given the preview distance, when the path points are too sparse,
the distance between the path points tracked by the entire vehicle and the entire vehicle
cannot be strictly limited to the given preview distance, which will seriously affect the
accuracy of vehicle motion control. By increasing the number of path points in the tracking
path, this problem can be effectively solved. However, having too many path points can
lead to unnecessary computational waste on the onboard computing platform. At the
same time, having too many path points can also lead to the vehicle’s trajectory being
repeatedly planned, resulting in the vehicle’s motion control oscillating repeatedly and
greatly reducing the smoothness of motion control. Based on this, this article proposes a
linear interpolation method, as shown in Figure 6.

Figure 6. Schematic diagram of linear interpolation algorithm.


Agriculture 2023, 13, 1907 10 of 19

After obtaining the current tracking path point of the entire vehicle, a straight line
equation is constructed using the current tracking path point of the entire vehicle and the
previous tracking path point of the entire vehicle, as shown in Equation (17).


 Ax + By + C = 0
A = y2 − y1

(17)

 B = − x2 − x1
C = (−1) ∗ (y2 − y1 ) x1 + ( x2 − x1 )y1

among them, A, B, C are the coefficients of the linear equation, ( x1 , y1 ) are the coordinates
of the last tracking path point on the entire vehicle, and ( x2 , y2 ) are the coordinates of the
current tracking path point on the entire vehicle.
After solving the linear equation, calculate the distance between the current vehicle
and the linear equation, as shown in Equation (18).

Ax p + By p + C
d= √ (18)
A2 + B2

among them, ( x p , y p ) is the current position of the entire vehicle, and A, B, C are the
coefficients of the linear equation.
As shown in Figure 6, after solving the distance between the current vehicle and the
above linear equation, a vehicle tracking target search circle is constructed with the current
position of the vehicle as the center of the circle and the preview distance as the radius,
as shown in Equation (19).
( 2 2
x − x p + y − y p = r2
(19)
Ax + By + C = 0

among them, ( x p , y p ) is the current position of the entire vehicle, r is the preview distance,
and, A, B, C are the coefficients of the linear equation mentioned above.
When d > r, the entire vehicle tracking target search circle did not intersect with the
above linear equation, and at this time, the tracking target point interpolation could not be
performed; when d < r, the search circle for the vehicle tracking target intersected with
the above linear equation, and there were two solutions. The point closest to the current
tracking path point of the vehicle was selected as the vehicle tracking target point; when
d = r, the search circle for the vehicle tracking target was tangent to the linear equation
mentioned above, and there was a unique solution; that is, the vehicle tracking target point.
After solving the tracking target point of the entire vehicle, the speed of the left and right
tracks can be calculated to control the entire vehicle to move towards the tracking target
point. Repeat the above steps until the global path tracking is completed.

5. Building and Related Experiments Based on Gazebo Simulation Platform


To verify the performance of the positioning, planning, motion control and other
algorithms proposed in this article, a tracked intelligent agricultural machinery simulation
platform was built based on Gazebo, as shown in Figure 7.
This simulation test platform is equipped with various sensors such as binocular
cameras, LiDAR, and GPS, which can perform prior verification on various algorithms
of intelligent agricultural machinery systems. The advantage of using Gazebo to build
a simulation platform is that it can effectively reduce project research and development
costs, shorten research and development cycles, and maximize the safety of experimental
personnel.
To conduct prior verification of the performance of the positioning, planning, and mo-
tion control algorithms proposed in this article, corresponding simulation scenarios were
constructed for simulation experiments, as shown in Figure 8.
Agriculture 2023, 13, 1907 11 of 19

Figure 7. Intelligent Agricultural Machinery Simulation Test Platform.

Figure 8. Simulation testing scenario.

5.1. Simulation Performance Verification of RTK/INS Fusion Positioning Coordinate


Transformation Algorithm
Firstly, the vehicle GPS is used to dot the testing area to obtain the longitude and
latitude altitude coordinates of each vertex at the boundary of the testing area. The coordi-
nate transformation algorithm proposed in this article converts the longitude and latitude
altitude coordinates of each vertex into the corresponding Cartesian coordinates in the ENU
coordinate system. Then, the multi target function coupled full-coverage path planning
algorithm proposed in this article is used for the full-coverage path planning of the testing
area, as shown in Figure 9.

Figure 9. Simulation experiment full-coverage path generation rendering.

In the agricultural production process, the boustrophedon method is commonly used


for full-coverage path planning. At the same time, in order to more intuitively observe the
error of the RTK/INS fusion positioning coordinate transformation algorithm proposed
in this article and the trajectory tracking error of the improved pure pursuit algorithm,
the boustrophedon full-coverage path is selected as the global tracking path.
To avoid the impact of vehicle GPS observation noise on the simulation test results
of coordinate transformation algorithms, the position observation noise parameter of the
vehicle GPS is set to 0; that is, the longitude and latitude altitude coordinates observed by
the vehicle GPS are absolute true values. The coordinate transformation algorithm proposed
in this article is used to convert the real-time obtained vehicle longitude and latitude altitude
coordinates into the corresponding Cartesian coordinates under the ENU coordinate system,
Agriculture 2023, 13, 1907 12 of 19

forming the vehicle positioning trajectory. As it is a simulation experiment, the true position
of the entire vehicle in the simulated world coordinate system can be obtained in real-time
by subscribing to the odometer topic, generating a reference trajectory. Due to the absolute
truth of the longitude and latitude altitude coordinates observed by the vehicle GPS and the
true position of the vehicle subscribed through the topic in the simulated world coordinate
system, the error between the positioning trajectory and the reference trajectory calculated
by the vehicle through the coordinate transformation algorithm is the true transformation
error of the coordinate transformation algorithm proposed in this article.
Use the evo evaluation tool to convert the positioning trajectory into a reference
trajectory coordinate system, and perform absolute pose error (APE) and relative pose error
(RPE) evaluations. The results are shown in Figures 10 and 11.

Figure 10. Absolute pose error of positioning trajectory.

Figure 11. Relative pose error of positioning trajectory.

From the analysis of Figures 10 and 11, it can be concluded that the average APE value
of the positioning trajectory relative to the reference trajectory, i.e., the reference true value,
is 0.066 m, and the root mean square error is 0.07 m; the average RPE value is 0.02 m, with a
root mean square error of 0.026 m, which can effectively meet the positioning accuracy
requirements of agricultural machinery autonomous navigation systems.

5.2. Simulation Performance Verification of Improved Pure Pursuit Algorithm Based on


Linear Interpolation
On the basis of determining that the RTK/INS fusion positioning coordinate transfor-
mation algorithm proposed in this article can ensure the accuracy of vehicle positioning,
the error between the vehicle’s travel trajectory and the set boustrophedon full-coverage
Agriculture 2023, 13, 1907 13 of 19

path is analyzed to verify the performance of the improved pure pursuit algorithm pro-
posed in this article. The tracking speed of the vehicle is set to 1 m/s, and the preview
distance is 1 m. Figure 12 shows the comparison between the set path and the driving
trajectory during the simulation test process.

Figure 12. Comparison diagram of simulation test set path and driving trajectory.

From the analysis in Figure 12, it can be seen that the improved pure pursuit algorithm
proposed in this article has good tracking performance in the straight line section and poor
tracking performance in the curve section. Due to the fact that during the operation of
agricultural machinery, bends are usually completed in non operating areas, and the linear
tracking part generally affects the operation effect. Therefore, this article mainly discusses
the trajectory tracking error of each linear segment, as shown in Figure 13.

Figure 13. Simulation experiment linear trajectory tracking error curve.

From the analysis in Figure 13, it can be seen that the trajectory tracking error of the
entire vehicle in the straight section is relatively small. The maximum tracking error in the
X-axis direction is 0.048 m, with an average error of 0.029 m, and the maximum error in the
Y-axis direction is 0.049 m, with an average error of 0.031 m. The simulation test results
show that the improved pure pursuit algorithm proposed in this paper has high control
accuracy and can be applied to agricultural machinery motion control.
Agriculture 2023, 13, 1907 14 of 19

6. Construction and Testing of Intelligent Agricultural Machinery Real Vehicle


Test Platform
To further validate the performance of the positioning, planning, and motion control
algorithms proposed in this article, an intelligent agricultural machinery real vehicle test
platform was built based on an electric tracked chassis, as shown in Figure 14. This real
vehicle testing platform is equipped with sensors such as binocular cameras, LiDAR,
RTK/INS integrated navigation, etc. The perception information of each sensor is received
through the onboard computing platform, which can be used for real vehicle verification of
various algorithms in the field of intelligent agricultural machinery. The main equipment
parameters of the actual vehicle test platform are shown in Table 1.

Figure 14. Intelligent agricultural machinery real vehicle test platform.

Table 1. Main equipment parameters of the actual vehicle test platform.

Device Name Equipment Model Equipment Parameters

Output frequency: 400 Hz


Serial port baud rate: 921,600
IMU N100 Pitch/roll accuracy: 0.05°
number of axles: 9 axes

Attitude accuracy: 0.1°


Positioning accuracy: 1 cm
RTK/INS CHCNAV CGI-610
Output frequency: 100 Hz
Initialization time: 1 min

Measurement range: 100 m


Measurement accuracy: ±3 cm
Lidar Velodyne16 Vertical measurement angle: 30°
Horizontal measurement angle: 360°
Measurement frequency: 5–20 Hz

CPU: 8-core Arm architecture


On-board computer TW-T906 GPU: 1792 core Navidia Ampere architec-
ture
Computational power: 200 TOPS
Agriculture 2023, 13, 1907 15 of 19

As shown in Figure 15, an open field was selected to validate the full-coverage path
planning algorithm and improved pure pursuit algorithm proposed in this paper on a
real vehicle.

Figure 15. full-coverage path planning and pure pursuit algorithm real vehicle verification scenario.

Firstly, the RTK/INS integrated inertial navigation system is used to plot points at the
four corners of the test site edge, obtaining corresponding latitude and longitude altitude
coordinates. The coordinates are converted into corresponding ENU coordinates through
coordinate transformation algorithms. Finally, the full-coverage path planning algorithm
proposed in this article is used to generate the full-coverage path within the test area,
as shown in Figure 16.

Figure 16. Full-coverage path generation rendering for actual vehicle testing.

Similar to the simulation experiment, in order to observe the trajectory tracking


error of the improved pure pursuit algorithm proposed in this article more intuitively,
the boustrophedon full-coverage path is selected as the global tracking path. The improved
pure pursuit algorithm proposed in this article is used for trajectory tracking, with a vehicle
tracking speed of 1 m/s and a preview distance of 1 m. The tracking effect is shown in
Figures 17 and 18.
Agriculture 2023, 13, 1907 16 of 19

Figure 17. Real vehicle trajectory tracking flowchart (1–4).

Figure 18. Comparison diagram of the set path and driving trajectory in the actual vehicle test.

From the analysis in Figure 18, it can be seen that the improved pure pursuit algorithm
proposed in this paper has good tracking performance in the straight line section and poor
tracking performance in the curve section, which is consistent with the simulation results.
Similarly, in the process of agricultural machinery operation, curves are usually completed
in non operating areas, and the linear tracking part generally affects the operation effect.
Therefore, this article mainly discusses the trajectory tracking error of each linear segment,
as shown in Figure 19.

Figure 19. Curve chart of tracking error in straight line section of real vehicle test.

According to the analysis in Figure 19, consistent with the simulation test results,
the trajectory tracking error of the entire vehicle in the straight section is relatively small.
Agriculture 2023, 13, 1907 17 of 19

The maximum tracking error in the X-axis direction is 0.049 m, with an average error of
0.016 m, and the maximum error in the Y-axis direction is 0.129 m, with an average error
of 0.017 m. This can effectively meet the walking accuracy requirements of agricultural
machinery operations.

7. Conclusions
This article creates an intelligent agricultural machinery system that integrates posi-
tioning, planning, and motion control. Based on RTK/INS integrated inertial navigation
and self-designed coordinate transformation algorithm, high-precision vehicle positioning
is achieved. The vehicle positioning error is within 10 cm, which can effectively meet the
requirements of agricultural machinery intelligent systems for vehicle positioning accuracy.
By establishing multiple objective functions and coupling mechanisms, high coverage and
full-coverage path planning have been achieved, effectively improving the efficiency of
agricultural machinery operations.
Finally, this article improves the existing pure pursuit algorithm by adding a linear in-
terpolation module to effectively improve the accuracy of vehicle motion control, achieving
high fitting vehicle motion control in straight segments. In the simulation test, the maxi-
mum control error of the entire vehicle in the X-axis and Y-axis directions does not exceed
5 cm, and the average error is around 3 cm. In the actual vehicle test, the maximum control
error of the entire vehicle in the X-axis and Y-axis directions does not exceed 13 cm, and the
average error does not exceed 2 cm, indicating precise control and high reliability. This
has laid a certain foundation for the development of unmanned agricultural machinery
systems in the future.
The intelligent agricultural machinery system proposed in this article is suitable for
autonomous full-coverage path planning and walking of various tracked agricultural
machinery, and can independently complete various agricultural production activities in
conjunction with various operating equipment, effectively improving agricultural produc-
tion efficiency and reducing labor costs. At the same time, the improved pure pursuit
algorithm in this article can also be modified based on various agricultural machinery
kinematic models, making it suitable for autonomous full-coverage path planning and
walking of various agricultural machinery.
Based on the existing foundation of this article, subsequent research can focus on
the following aspects. Firstly, the full-coverage path planning proposed in this article is
only applicable to relatively regular land. In the future, we can consider combining the
cell segmentation method to achieve full-coverage path planning for irregular farmland;
secondly, the improved pure pursuit algorithm proposed in this article is only applicable
to the motion control of medium- and low-speed agricultural machinery. In the future,
we can consider introducing dynamic motion control methods to make them suitable for
high-speed agricultural machinery motion control; thirdly, this article only achieves single
machine intelligence, and can be combined with intelligent interconnected systems such as
drones and 5G communication to achieve multi-machine collaborative work in the future.

Author Contributions: Conceptualization, J.W.; methodology, J.W.; software, J.W. and C.L.; valida-
tion, J.W. and C.L.; formal analysis, J.W.; investigation, Y.Y.; resources, T.L. and H.R.; data curation,
J.W. and; writing—original draft preparation, J.W.; writing—review and editing, H.R.; visualiza-
tion, J.W. and H.R.; supervision, T.L. and H.R.; project administration, J.W., T.L. and H.R.; funding
acquisition, T.L. All authors have read and agreed to the published version of the manuscript.
Funding: This work was supported by the National Natural Science Foundation of China (Grant No.
52275055), Key projects of natural science foundation of Fujian Province (2021J02013), Xiamen Major
Science and Technology Plan Projects: 3502Z20231013, and the Fujian University industry university
research joint innovation project plan (2022H6007).
Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.
Agriculture 2023, 13, 1907 18 of 19

Data Availability Statement: Not applicable.


Conflicts of Interest: The authors declare no conflict of interest.

References
1. Da Silveira, F.; Lermen, F.H.; Amaral, F.G. An overview of agriculture 4.0 development: Systematic review of descriptions,
technologies, barriers, advantages, and disadvantages. Comput. Electron. Agric. 2021, 189, 106405. https://doi.org/10.1016/j.
compag.2021.106405.
2. Nof, S.Y. Springer Handbook of Automation; Springer: Berlin/Heidelberg, Germany, 2009.
3. Han, X.; Kim, H.; Moon, H.; woo, H.; Kim, J.; Kim, Y. Development of a path generation and tracking algorithm for a Korean
auto-guidance tillage tractor. J. Biosyst. Eng. 2013, 38, 1–8. https://doi.org/10.5307/JBE.2013.38.1.001.
4. Wang, T.; Xu, X.; wang, C.; Li, Z.; Li, D. From smart farming towards unmanned farms: A new mode of agricultural production.
Agriculture 2021, 11, 145. https://doi.org/10.3390/agriculture11020145.
5. Amiri-Zarandi, M.; Hazrati Fard, M.; Yousefinaghani, S.; Kaviani, M.; Dara, R. A platform approach to smart farm information
processing. Agriculture 2022, 12, 838. https://doi.org/10.3390/agriculture12060838.
6. Dhanaraju, M.; Chenniappan, P.; Ramalingam, K.; Pazhanivelan, S.; Kaliaperumal, R. Smart farming: Internet of Things
(IoT)-based sustainable agriculture. Agriculture 2022, 12, 1745. https://doi.org/10.3390/agriculture12101745.
7. Karunathilake, E.; Le, A.T.; Heo, S.; Chung, Y.S.; Mansoor, S. The Path to Smart Farming: Innovations and Opportunities in
Precision Agriculture. Agriculture 2023, 13, 1593. https://doi.org/10.3390/agriculture13081593.
8. Wu, C.; tang, X.; Xu, X. System Design, Analysis, and Control of an Intelligent Vehicle for Transportation in Greenhouse.
Agriculture 2023, 13, 1020. https://doi.org/10.3390/agriculture13051020.
9. Reid, J.F.; Zhang, Q.; Noguchi, N.; Dickson, M. Agricultural automatic guidance research in North America. Comput. Electron.
Agric. 2000, 25, 155–167. https://doi.org/10.1016/S0168-1699(99)00061-7.
10. Torii, T. Research in autonomous agriculture vehicles in Japan. Comput. Electron. Agric. 2000, 25, 133–153. https://doi.org/10.101
6/S0168-1699(99)00060-5.
11. Keicher, R.; seufert, H. Automatic guidance for agricultural vehicles in Europe. Comput. Electron. Agric. 2000, 25, 169–194.
https://doi.org/10.1016/S0168-1699(99)00062-9.
12. Tillett, N. Automatic guidance sensors for agricultural field machines: A review. J. Agric. Sci. 1991, 50, 167–187. https:
//doi.org/10.1016/S0021-8634(05)80012-5.
13. Li, M.; Imou, K.; wakabayashi, K.; Yokoyama, S. Review of research on agricultural vehicle autonomous guidance. Int. J. Agric.
Biol. Eng. 2009, 2, 1–16. https://doi.org/10.3965/j.issn.1934-6344.2009.03.001-016.
14. Widden, M.; Blair, J. A new automatic tractor guidance system. J. Agric. Sci. 1972, 17, 10–21. https://doi.org/10.1016/S0021-86
34(72)80012-X.
15. Parish, R.L.; Goering, C.E. Developing an automatic steering system for a hydrostatic vehicle. Trans. ASAE 1970, 13, 523–0527.
https://doi.org/10.13031/2013.38653.
16. Wilson, J.N. Guidance of agricultural vehicles—A historical perspective. Comput. Electron. Agric. 2000, 25, 3–9. https:
//doi.org/10.1016/S0168-1699(99)00052-6.
17. O’Connor, M.; Elkaim, G.; Parkinson, B. Kinematic GPS for closed-loop control of farm and construction vehicles. In Proceedings
of the ION GPS-95, Palm Springs, CA, USA, 12–15 September 1995; Volume 8, pp. 1261–1268.
18. O’Connor, M.; Bell, T.; Elkaim, G.; Parkinson, B. Automatic steering of farm vehicles using GPS. In Proceedings of the
Third International Conference on Precision Agriculture, Minneapolis, MN, USA, 23–26 June 1996; pp. 767–777. https:
//doi.org/10.2134/1996.precisionagproc3.c91.
19. Gerrish, J.B.; Fehr, B.W.; Van Ee, G.R.; welch, D.P. Self-steering tractor guided by computer-vision. Appl. Eng. Agric. 1997,
13, 559–563. https://doi.org/10.13031/2013.21641.
20. Pilarski, T.; Happold, M.; Pangels, H.; Ollis, M.; Fitzpatrick, K.; stentz, A. The demeter system for automated harvesting. Auton.
Robot. 2002, 13, 9–20. https://doi.org/10.1023/A:1015622020131.
21. Jin, J.; tang, L. Optimal coverage path planning for arable farming on 2D surfaces. Trans. ASABE 2010, 53, 283–295. https:
//api.semanticscholar.org/CorpusID:53060953.
22. Fabre, S.; soures, P.; taix, M.; Cordesses, L. Farmwork path planning for field coverage with minimum overlapping. In Proceedings
of the IEEE Symposium Emerging Technologies Factory Automation ETFA, Antibes-Juan les Pins, France, 15–18 October 2001;
Volume 2, pp. 691–694. https://doi.org/10.1109/ETFA.2001.997759.
23. Yang, S.X.; Luo, C. A neural network approach to complete coverage path planning. IEEE Trans. Syst. Man Cybern. Syst. Part B
(Cybern.) 2004, 34, 718–724. https://doi.org/10.1109/TSMCB.2003.811769.
24. Hu, J.; L., G.; X., B.; t., L.; X., L. Review of research on automatic guidance of agricultural vehicles. Trans. CSAE 2015, 31, 1–10.
https://doi.org/10.11975/j.issn.1002-6819.2015.10.001.
25. Huang, S.; Pan, K.; Wang, S.; Zhu, Y.; Zhang, Q.; Su, X.; Yu, H. Design and Test of an Automatic Navigation Fruit-Picking
Platform. Agriculture 2023, 13, 882. https://doi.org/10.3390/agriculture13040882.
26. O’Connor, M.L. Carrier-Phase Differential GPS for Automatic Control of Land Vehicles; Stanford University: Stanford, CA, USA, 1998.
Agriculture 2023, 13, 1907 19 of 19

27. Li, T.; Hu, J.; Gao, L.; Liu, X.; Bai, X. Agricultural Machine Path Tracking Method Irrelevant to Travel Speeds. Trans. Chin. Soc.
Agric. Mach. 2014, 45, 59–65. https://doi.org/10.6041/j.issn.1000-1298.2014.02.011.
28. Dong, F.; Petzold, O.; Heinemann, W.; Kasper, R. Time-optimal guidance control for an agricultural robot with orientation
constraints. Comput. Electron. Agric. 2013, 99, 124–131. https://doi.org/10.1016/j.compag.2013.09.009.
29. Dubins, L.E. On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal
positions and tangents. Am. J. Math. 1957, 79, 497–516. https://doi.org/10.2307/2372560.
30. Reeds, J.; Shepp, L. Optimal paths for a car that goes both forwards and backwards. Pac. J. Math. 1990, 145, 367–393.
https://doi.org/10.2140/pjm.1990.145.367.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.

You might also like