# Automatic Navigation Based on Navigation Map of Agricultural Machine

Jianjun Zhou, Xiu Wang, Rui Zhang, Qingchun Feng, Wei Ma

► To cite this version:

Jianjun Zhou, Xiu Wang, Rui Zhang, Qingchun Feng, Wei Ma. Automatic Navigation Based on Navigation Map of Agricultural Machine. 6th Computer and Computing Technologies in Agriculture (CCTA), Oct 2012, Zhangjiajie, China. pp.304-311, 10.1007/978-3-642-36124-1_37. hal-01348112

HAL Id: hal-01348112

https://inria.hal.science/hal-01348112

Submitted on 22 Jul 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Automatic Navigation based on navigation map of
Agricultural machine¹

Jianjun Zhou, XiuWang, Rui Zhang, Qingchun Feng, Wei Ma

(National Engineering Research Center for Information Technology in
Agriculture, Beijing 100097, China)

**Abstract.** This article mainly studies automatic navigation control methods for agricultural machinery. The navigation system takes RTK-DGPS and inertial measurement unit as positioning sensors. The preview control mode was researched for curve path tracking. The preview control model is to determine the aiming point and calculate the lateral deviation. Automatic turning was realized by fuzzy control method based on genetic algorithm. This control method can online adjust the parameters of fuzzy control using the genetic algorithm, in order to realize adaptive control. Thus the navigation control precision can be improved by the methods studied. The navigation control methods can meet the demand of agricultural machinery operating.

**Keywords:** automatic navigation, path tracking, genetic algorithm; self-adaptive fuzzy control.

# 1 Introduction

Automatic navigation of farm machinery is an essential technique to realize variable rate applications and collecting field information [1]. The potential benefits of automated agricultural tractors include increased productivity, increased application accuracy, and enhanced operation safety [2, 3].

Automatic guidance of agricultural tractors has been studied over the past several decades. Various guidance technologies, including mechanical guidance, machine-vision guidance, radio navigation, and ultrasonic guidance, have been investigated [4]. In recent years, high-accuracy Global Positioning System (GPS) receivers are widely used as guidance sensors [5]. Using an absolute positioning system, GPS-based guidance technology has the potential to achieve completely autonomous navigation [6,7]. Numerous fuzzy control applications on vehicles have been reported. Todo et al. developed a fuzzy controller that utilized the offset and the orientation errors to

¹ Supported by national natural science funds (31101088)
JianJun Zhou, doctor, assistant researcher, mainly research direction is agricultural intelligent equipment.

Corresponding author: Xiu Wang, doctor, researcher
control the steering of a mobile robot and resulted in satisfactory trajectory tracking performance [8, 9].

The basic idea of this article conveyed was researching fuzzy control method for automatic steering and methods for curve path tracking. In order to validate these methods, an agricultural robot for precision farming was developed, which are refitted from a tractor. Navigation control system was developed based on the robot using RTK-DGPS, digital compass and other sensors.

## 2. Materials and Methods

Field operation maps for autonomous navigation tractor are often created off-line using a GIS, and then be loaded into the navigation computer before the operation starting. Navigation map is a shape format point map. An autonomous field operation of a tractor was a sequence of instructions that both guide the tractor movement in the field and control synchronously the concurrent tractor operations. Each instruction contains a location in the field (xᵢ, yᵢ) and desirable control values, (z1ᵢ, z2ᵢ, ..., zkᵢ), at that location. Control values include steering wheel angle, action of machine, and so on.

### 2.1 Preview Point Searching Arithmetic

An important content in the path tracking is searching dynamically the preview point in field navigation map. Fig. 1 shows the work flow of the preview point searching. Firstly the preview points are searched within the circle of radius equal to 1.8 meters, with the current navigation position as center on the navigation map. If the point's amount of searching result is zero, then the searching extent is extended. The preview points are searched one time again. If the search result is still zero, then the preview point is the one which id is equal to ID1 plus two. If the searching results points are equal to or greater than three, the preview point is the biggest of ID number within the searching range (ID number of point is increased in navigation map).

### 2.2 Computing Cross-tracking Error Sign

In curve tracking the relationship of the current position of vehicle and path is complicated, computing the current vehicle lateral deviation error is difficult. This paper provides a vector multiplication method to determine the lateral error. As shown in Fig.2, the relationship between point p' and line P₀P can be denoted by the location vector P₀P' and vector P₀P. The relationship between vector P₀P' and vector P₀P can be described by these two vector cross multiplication. Vector cross product accords with the right hand regulation. Formula (1) and (2) showed the two vector cross multiplication process, the position relationship between points P' and line P₀P can be easily obtained from the result of formula (2).
<figure><img src="image_2.png" /><figcaption>Fig. 1. Work flow of the preview point searching</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>Fig.2. XTE flag computing methods</figcaption></figure>

$$ \vec{u} = \begin{vmatrix} \vec{i} & \vec{j} & \vec{k} \\ x' - x_0 & y' - y_0 & 0 \\ x - x_0 & y - y_0 & 0 \end{vmatrix} = \vec{k} \begin{vmatrix} x' - x_0 & y' - y_0 \\ x - x_0 & y - y_0 \end{vmatrix} \quad (1) $$

$$ u = (x' - x_0)(y - y_0) - (y' - y_0)(x - x_0) \quad (2) $$
## 2.3 Dynamic Path Search Algorithm

In Fig.3, predefined route is {...p<sub>n-2</sub>,p<sub>n-1</sub>,p<sub>n</sub>,p<sub>n+1</sub>,p<sub>n+2</sub>,...}, and the current tractor position is point P<sub>c</sub>. The predefined circle route points are searched within the circle. The circle's center is P<sub>c</sub> as center, radius is R. P<sub>n-1</sub>,P<sub>n</sub>, P<sub>n+1</sub> are the points in the search circle. P<sub>n</sub> is the nearest point in predefined path from P<sub>c</sub> recent points. EF direction is the direction of the tractor body, which can be got through the electronic compass acquisition; NM is the front wheel turning direction that can be obtained by angle sensor.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Curve path tracking map</figcaption></figure>

The start point coordinates of P<sub>n</sub>P<sub>n+1</sub> line is (x<sub>1</sub>, y<sub>1</sub>). The end point coordinates of P<sub>n</sub>P<sub>n+1</sub> line is (x<sub>2</sub>, y<sub>2</sub>). The equation of AB line is:

$$Ax + By + C = 0$$

in the equation:

$$A = y_2 - y_1$$

$$B = x_1 - x_2$$

$$C = x_2 y_1 - x_1 y_2$$

The current position of tractor is P (x<sub>3</sub>, y<sub>3</sub>).

The distance between point p and the AB line is:

$$d = \frac{|Ax_3 + By_3 + C|}{\sqrt{A^2 + B^2}}, \text{d is the cross track error. } \angle EP_c P_{n+1} \text{ is the heading error.}$$

Thus XTE and heading error can be as input for expected steering angle decision algorithm, according to the fuzzy control output can control the tractor automatic tracking curve path.

## 2.4 Self-adaptive Fuzzy Controller Based on Genetic Algorithm

The steering control of a vehicle is realized by using a step motor. Steering control is based on the error between the desired and the actual wheel angles. In this system
turning control is realized by fuzzy control method. The design of the fuzzy steering controller was based on typical vehicle steering responses. Two inputs of fuzzy control are XTE and heading error. The output from the fuzzy controller was a real-valued steering rate command to drive the step motor.

System adopts fuzzy control arithmetic to control the turning of the front wheel. The cross track error E and heading error H was the input of fuzzy controller. The output was the expected angle U. The cross track error basic domain is [-24cm, 24cm]. Quantification factors are 0.5. The heading error basic domain was [-15, 15]. Quantification factor of this variable is also 0.5.

$$U = -\langle \alpha E + (1-\alpha)H \rangle, \alpha \in (0,1) \quad (3)$$

By adjusting the correction factor $\alpha$, the weighted degree of the lateral deviation error E and heading error can be changed, thus the fuzzy rule could be changed. The correct factor of the fuzzy control was online adjusted by the genetic algorithm, in order to reach the adaptive control. Control algorithms principle was as Fig. 4.

Genetic algorithm is robust, parallel search and group optimization. It is a kind of effective parameters optimization method. Its basic operation mainly includes encoding, decoding, selection, crossover and mutation, the design of genetic optimization algorithm is as follows.

**Encoding and Decoding.** Coding method using binary code which search ability is strong. Chromosome is length for 8 binary strings, $\alpha$ accounted for eight. The corresponding decoding way is as follows.

$$a=\text{binrep}(a) \quad (4)$$

binrep(a)--- integer expressed by a eight bit string of binary

**Structure of the Fitness Function.** The selection of fitness function directly influenced the convergence rate of the GA and where to find the optimal solution. Because of the system designed is small overshoot according to ITAE index department. In the agricultural vehicles to be automatic navigation, lateral deviations are the primary indicators to weight control effect. So the reciprocal of ITAE index of the lateral error are taken as the fitness function.

**Genetic Operator.** Genetic operator mainly includes two crossover and mutation genetic operator. Crossover operator adopts single point crossover modes. Mutation operator is logical opposition to every bit of chromosomes according to mutation probability. Float chart of genetic algorithms are as follows.
<figure><img src="image_5.png" /><figcaption>Fig. 4. Genetic algorithms flow chart</figcaption></figure>

# 3 Experiments on the Refitted Tractor

The experimental vehicle is a refitted tractor. The tractor includes steering controller, posture information acquiring sensors and GPS receiver. The posture information acquiring sensors includes angle transducer and digital compass. The angle transducer transforms the angle mechanical rotation to the electrical signal. It can survey the change of the angle displacement. The angle transducer is equipped in the axis of front wheel of the tractor and used for measuring turning angle of the front wheel. The type of the angle transducer is WYT-AT-1.

The type of the digital compass is LP3300. There are three orthogonal magnetic field sensors and two axle inclination angle sensors in this digital compass. LP3300 outputs data through the RS-232 format and the configuration of RS232 port is "9600, n, 8, 1". Each frame outputs 20 bytes hexadecimal number.

## 3.1 Vehicle Navigation Control Methods System

In this research, RTK-GPS, digital compass and angle sensor are used for automatic navigation. GPS can provide the absolute position of the vehicle. At first, the path of tractor is preformed through GIS. Tractor can compare the appointed path with the current position to control the steering. Thus automatic navigation can be realized.

The type of RTK-GPS is Trimble 4700. The GPS data is received from serial port. The serial port can be easily set using MSComm active X control. After setting the parameter of serial port and opening the serial port, the GPS data can be received. According to the data format of NMEA 0183, useful GPS data can be extracted. The system uses GGA format.
## 3.2 Experiment

The experiment location is in the Xiaotangshan precision agricultural demonstration station, and the experiment was preceded in March 2012.

Firstly artificial driving tractors walked on a curve path. The tractor's path could be recorded through the data acquisition program, and was saved as a text file. File data included GPS data of tractor x, y, heading and id numbers. This text files could be input by Arcview software and generated a GIS format layer shape. This layer was the predefined curve path for tractor tracking.

It can be analyzed that is XTE is less than 12cm, the biggest error is 0.12cm, and the average error is 5cm. The lateral error is shown in Fig. 5.

<figure><img src="image_6.png" /><figcaption>Fig. 5. The lateral deviation of curve path tracking</figcaption></figure>

## 4 Conclusion

The main goal of this study was to develop a dynamic path search algorithm and fuzzy control method based on genetic algorithm capable of automatic navigation along the curved path on a field. The dynamic path search algorithm of this article is to determine the aiming point and calculate the lateral deviation. Self-adaptive fuzzy controller based on genetic algorithm could. The cross track error was less than 12cm at a travelling speed of 1m/s. The developed dynamic path search algorithm and Self-adaptive fuzzy controller based on genetic algorithm could achieve the design goal of guiding an autonomous agricultural tractor to track curve path.

## References

1. S. Han, Q. Zhang, H. Noh, B. Shin.: A dynamic performance evaluation method for DGPS receivers under linear parallel-tracking applications. Transactions of the ASAE, vol. 47(1), pp. 321-329 (2004)

2. Luo Xiwen, Ou Yinggang, Zhao Zuoxi, and Zhao Xin.: Research and development of intelligent flexible chassis for precision farming. Transaction of the CSAE, vol. 21, pp. 83-85 (2005)
3. Zhou Jian-jun; WANG Mao-hua; ZHANG Man.: Automatic navigation for agricultural vehicle based on fuzzy control, Transactions of the Chinese society for agricultural machinery, 40(4):151-155 (2009)

4. Reid, J.F., Q. Zhang, N. Noguchi, and M. Dickson.: Agricultural automatic guidance research in North America. Computers and Electronics in Agriculture 25: 155-167 (2000)

5. Yukumoto, O., Y. Matsuo, and N. Noguch.: Robotization of agricultural vehicles (part 2)- description of the tilling robot. Journal of Agricultural Engineering Research 34: 107-114 (2000)

6. He Qing.: Automatic guidance system for tractor inter-row operations based on multiple sensors. Beijing: China Agricultural University, 7. (2007)

7. Q Zhang, H.Qiu.: A Dynamic Path Search Algorithm for Tractor Automatic Navigation. Transactions of the ASAE, 47(2):639-646 (2003).

8. John F.Reid, Qin Zhang, Noboru Noguchi, and Monte Dickson.: Agricultural automatic guidance research in North America, Computers and Electronics in Agriculture, vol. 25, pp.155 - 167 (2000)

9. Toda, M., O. Kitani, T. Okamoto, and T. Torii.: Navigation method for a mobile robot via sonar-based crop row mapping and fuzzy logic control. J. Agri. Eng. Res. 72: 299-309. (1999.)