1 Introduction

The variable rate application, as the core of precision agriculture, requires real-time acquisition of agricultural machinery speed as the input of the variable rate application system. Commonly used agricultural machinery speed measurement methods are mainly wheel-based speed and ground-based speed [1,2,3,4,5,6]. The measurement method of wheel-based speed is greatly influenced by the radius of the wheel [7], and the measured output frequency is related to the measured vehicle speed. Therefore, the measurement method based on ground speed is mostly used [8]. Commonly used ground-based measurement sensors include Doppler radar, Global Navigation Satellite System (GNSS), and so on. Doppler radar is a speed measurement system that uses the Doppler principle to continuously measure the speed of moving objects. The measurement accuracy, but the cumulative error of this measurement method is greater in the case of crop growth or crop stalks [9]. GNSS speed can rely on the receiver on the mobile carrier to obtain the corresponding speed information, that is, GNSS receiver according to the two points of positioning data and the time difference between the two points can be calculated speed data. According to the mode of operation and cost GNSS speed is divided into differential speed and single point speed two typical ways [10, 11]. The measurement accuracy of the differential velocity measurement method can reach the order of mm/s. Although the RTK-GNSS speed accuracy and data update rate is high, but the cost is high, does not meet the requirements of the low-cost requirements of the variable rate application. GNSS single point speed is low cost, but the data update rate is low, cannot meet the variable rate application speed measurement update rate requirements.

The ISO standard 11783, ISOBus, describes CAN-based communication on open networks for mobile use in the agricultural sector. In the seventh part of iso11783 provisions of the CAN bus in agricultural machinery on the application of high-level agreement. The Parameter group number and 8 bytes of data field of the message for the Ground-based speed and distance is specified in ISO 11783-7 [8].

Therefore, a method of GNSS/IMU (Inertial Measurement Unit) combined speed measurement is proposed for the precision measurement of variable rate application. A speed measurement device of agricultural machinery speed conforming to ISOBus interface is developed to realize the speed of agricultural machinery, agricultural direction and agricultural distance measurement. And the speed and distance data in accordance with ISO11783 standard sent to agricultural machinery ISOBus network.

2 GNSS/IMU Combined Speed Method

ISOBus specifies a speed data update rate of the ground-based speed measurement device output is 10 Hz, but a single point GNSS speed update rate is generally 1 Hz. So a single-point GNSS output data needs to be internal difference to meet the ISOBus standard requirements. IMU measurement data update rate are generally not less than 10 Hz, so by GNSS speed data and IMU acceleration data fusion can be obtained to meet ISOBus required speed data. So the current speed \( v_{am} \) of agricultural machinery can be got

$$ v_{am(n)} = \left\{ {\begin{array}{*{20}c} {v_{GNSS} \quad \quad \quad \quad } & {(GNSS\;data\;updated)} \\ {v_{am(n - 1)} + a_{inm} \Delta t} & {(GNSS\;data\;not\;updated)} \\ \end{array} } \right. $$
(1)

Where, \( v_{GNSS} \) – Current measured ground speed by GNSS (m/s)

  • \( v_{am(n - 1)} \)– Last measured ground speed by GNSS/IMU-based device (m/s)

  • \( a_{inm} \)– Current measured acceleration by IMU (m/s2)

  • \( \Delta t \)– IMU date update cycle (s)

ISOBus stipulates that the distance of agricultural machinery travel is the free distance. When calculating the distance of agricultural machinery travel, the spherical coordinate data \( (B,L) \) obtained by GNSS is projected into the earth coordinates data \( (x,y) \) by Gaussian projection, and then data \( (x,y) \) and IMU acceleration data \( a_{inm} \) fusion calculation of the distance of agricultural machinery travel. The equation of distance \( s_{am(n)} \) is

$$ s_{am(n)} = \left\{ {\begin{array}{*{20}c} {s_{GNSS(Prev)} + \sqrt {\left( {x_{Cur} - x_{Prev)} } \right)^{2} + \left( {y_{Cur} - y_{Prev} } \right)^{2} } } & {(GNSS{\kern 1pt} {\kern 1pt} {\kern 1pt} data{\kern 1pt} {\kern 1pt} {\kern 1pt} updated)} \\ {s_{am(n - 1)} + v_{am(n - 1)} \Delta t\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } & {(GNSS{\kern 1pt} {\kern 1pt} {\kern 1pt} data{\kern 1pt} {\kern 1pt} {\kern 1pt} updated)} \\ \end{array} } \right. $$
(2)

Where, \( s_{GNSS(Prev)} \) – Previous distance measured by GNSS (m)

  • \( x_{Prev} \), \( y_{Prev} \)– Previous measured position coordinates by GNSS (m)

  • \( x_{Cur} \), \( y_{Cur} \)– Current measured position coordinates by GNSS (m)

  • \( s_{{am(n{ - }1)}} \)– Last measured distance by GNSS/IMU-based device (m)

The direction of agricultural machinery travel can be judged by the combined value of IMU and the current speed of GNSS output. When agricultural machinery is stationary, current speed is zero. When agricultural machinery moves, if the average acceleration \( a_{inm} \) of IMU measured is greater than the acceleration threshold \( a_{th} \) and the speed increment of GNSS measured \( \Delta v_{GNSS} \) is greater than the speed increment threshold \( v_{th} \), agricultural machinery moves forward. If the acceleration \( a_{inm} \) is less than the acceleration threshold \( a_{th} \) and the speed increment \( \Delta v_{GNSS} \) of GNSS measured is greater than the speed increment threshold \( v_{th} \), agricultural machinery moves reverse. In other cases, the direction of agricultural machinery travel is unknown, i.e. “Not available”.

3 System Design

The speed measurement device includes MCU (Microcontroller Unit), GNSS module, IMU, and so on. The MCU chip communicates with the GNSS module and IMU via USART interface. The MCU receives the data from GNSS and IMU to calculate the current speed and distance of agricultural machinery travel, and determine the direction of agricultural machinery travel. Then the results will be converted to ISOBus standard format and sent to the agricultural ISOBus network. The agricultural machinery speed measurement device block diagram is shown in Fig. 1. In addition, the measurement device structure is shown in Fig. 2.

Fig. 1.
figure 1

Block diagram of speed measurement device of agricultural machinery

Fig. 2.
figure 2

CAN bus interface hardware circuit

3.1 Hardware Design

The STM32F103 VET6 ARM chip of STMicroelectronics is used as the core processor to develop the speed measure device with CAN bus interface. The MCU incorporates the high-performance ARM® Cortex™-M3 32-bit RISC core operating at a 72 MHz frequency, Flash memory up to 512 Kbytes and SRAM up to 64 Kbytes, and advanced communication interfaces: five USARTs, an USB and a CAN.

The MCU chip integrates the CAN bus controller, and only needs to extend the CAN bus transceiver to realize the CAN bus communication. In order to adapt to the working voltage of 3.3 V system, CAN bus transceiver using Texas Instruments’ SN65HVD230 CAN transceiver. The CAN transceiver is suitable for the high communication rate, good anti-interference ability and high reliability CAN bus communication. In order to suppress the high frequency interference on CAN bus and to improve the anti-electromagnetic radiation capability, the pin CANH and pin CANL are connected in parallel with two 30pF small capacitors. The CAN bus interface hardware circuit is shown below.

GNSS module adopts Beijing Unicore Communications’ UM220-III NV GNSS module. The module can simultaneously support BD2 B1 and GPS L1 two frequency points, especially for low-cost, low power consumption. The main performance parameters shows in Table 1. The GNSS module communicates with the MCU chip through the USART3 interface.

Table 1. Main performance parameters for UM220-III NV [13]

IMU module adopts Shenzhen Robotcontrol’s JY-61 module. The main performance parameters shows in Table 2. IMUJY-61 through the RS232 interface circuit with the MCU chip USART2 communication.

Table 2. Main performance parameters for JY-61 [14]

3.2 Software Design

The MCU chip acquires the GNSS data by reading the USART2 data, obtains the IMU data by reading the USART3 data, analyzes and filters the GNSS and IMU separately, performs the data fusion to calculate the current speed and distance of agricultural machinery, and judges the direction of agricultural machinery travel. The calculation results are converted to ISOBus format and sent to the agricultural ISOBus network. The main program flow shown below (Fig. 3).

Fig. 3.
figure 3

Main program flow chart

4 System Design

4.1 Test Equipment

In order to test the performance of GNSS/IMU-based agricultural speed measurement device, the Shanghai AllyNav Technology’s RTC-GNSS receiver modeled R60 is selected. RTK-GNSS receiver R60 main performance parameters in Table 3.

Table 3. Main performance parameters for R60

Data records are used in Guangzhou Lecheng Electronics’s RS232 data logger modeled LCA3213 and the Swedish Kvaser Eagle CAN bus data logger. Test tractor using Lovol’s Europard M800.

4.2 Test Methods

The tests are conducted on the farm of National Experiment Station for Precision Agriculture of the National Engineering Research Center for Information Technology in Agriculture located in Beijing, China. The test site is open to ensure that GNSS equipment can receive more than 12 satellite signals during the test.

Before the start of the test, the RTK-GNSS receiver antenna is fixed on the top of the tractor’s cab, and the RTK-GNSS receiver output data via the communication cable send to the data logger for real-time data recording. Set the RTK-GNSS receiver data update rate to 10 Hz.

The GNSS/IMU-based speed measure device’s GNSS antenna is fixed on the top of the tractor cab, the IMU is fixed on the top of the tractor cab according to the requirements of the user manual. The device output data via communication cable send to the Kvaser Eagle CAN bus data logger for real-time data recording.

4.3 Data Analysis

Low speed (3–4 km/h), medium speed (5–7 km/h), high speed (11–12 km/h) and variable speed (4–11 km/h) are tested four times. Data for 16 test are recorded. Table 4 shows the mean, relative error, standard deviation (Std.) and coefficient of variation (CV) for the actual speed values at three speeds. Where the average speed calculated using RTK-GNSS to measure the start and end points coordinates and time.

Table 4. IMU/GNSS and RTK-GNSS speed data at three kinds of speeds

As can be seen from Table 4, the absolute error and relative error of the GNSS/IMU-based speed measurement device is not greater than 0.076 km/h and 0.39% at three speeds, and the one of RTK-GNSS receiver is not greater than 0.040 km/h and 0.43%. So the difference between the absolute error and relative error GNSS/IMU-based speed measurement devices and the one of RTK-GNSS receivers are not greater than 0.036 km/h and 0.96%.

The standard deviation of the GNSS/IMU-based speed measurement device is not greater than 0.298 km/h, and the standard deviation of the RTK-GNSS receiver is not greater 0.333 km/h. So the difference between the standard deviation of the GNSS/IMU-based speed measurement device and the one of the RTK-GNSS receiver is less than 0.035 km/h. The maximum CV of GNSS/IMU speed measurement device is 5.15%, the maximum CV of RTK-GNSS receiver is 5.43%. So the difference between the CV of GNSS/IMU-based speed measure device and RTK-GNSS receiver is not greater than 0.28%.

In order to research the dynamic performance of the speed measure device, a variable speed test is carried out. The following figure shows the variable speed measurement curve of the GNSS/IMU-based speed measurement device and RTK-GNSS receiver. It is clear from the figure that the maximum difference between the GNSS/IMU-based speed measurement device and the RTK-GNSS receiver measured at acceleration is 0.813 km/h (Figs. 4 and 5).

Fig. 4.
figure 4

GNSS/IMU and RTK-GNSS variable speed measurement test curves

Fig. 5.
figure 5

GNSS/IMU and RTK-GNSS variable speed measurement error curve

In terms of distance measurement, it can be seen from Table 5 that the maximum absolute error and relative error of the distance measurement and the GNSS/IMU-based speed measurement device is 3.233 m and 1.14% respectively at four speeds, and RTK-GNSS receiver distance measurement maximum absolute error and relative error is 1.478 m and 0.53 respectively. So the difference between the absolute error and relative error of the GNSS/IMU-based speed measurement device and the RTK-GNSS receiver is not greater than 1.755 m and 0.61% respectively.

Table 5. IMU/GNSS and RTK-GNSS distance measurement data at four speeds

In the speed direction measurement, the direction acceleration threshold is set as 0.04 m/s2, and the speed increment threshold is 1.5 km/h, and the 12 moving direction determination tests are carried out. The test data are shown in Table 6. As can be seen from Table 6, the results of the 12 direction-determination tests are correct, and the accuracy of the direction determination is 100%.

Table 6. Test data of agricultural machinery moving direction determination

5 Conclusions

Aiming at the problem of RTK-GNSS receiver’s high-cost and single-point GNSS receiver’s low data update rang, a GNSS/IMU-based method of measurement agricultural machinery speed is proposed, and a speed measurement device with ISOBus interface is developed to measure the speed, direction and distance of agricultural machinery travel. By comparing with the RTK-GNSS receiver R60, the following conclusions are drawn:

  1. (1)

    The speed measured by the GNSS/IMU-based speed measurement device and the RTK-GNSS receiver is consistent with the mean, absolute error, relative error and CV when agricultural machinery is running at the uniform motion. When agricultural machinery is moving at the variable speed, the maximum speed difference between the GNSS/IMU-based speed measurement device and the RTK-GNSS receiver is 0.813 km/h.

  2. (2)

    In terms of distance measurement, the maximum absolute error and relative error of the GNSS/IMU-based speed measurement device is 3.233 m and 1.14% respectively at four speeds. And the maximum absolute error and relative error of the RTK-GNSS receive is 1.478 m and 0.53% respectively. The difference between the absolute error and relative error of the GNSS/IMU-based speed measurement device and the RTK-GNSS receiver is not greater than 1.755 m and 0.61% respectively.

  3. (3)

    In the speed direction measurement, the acceleration threshold and the speed increment threshold are determined by 0.04 m/s2 and 1.5 km/h respectively, and the accuracy of the direction determination is 100%.

In summary, the GNSS/IMU-based speed measurement device can meet the requirement of precision measurement, distance measurement and direction of travel of the variable rate application under a normal operation condition of agricultural machinery.