Computers and Electronics in Agriculture: Sciencedirect

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Computers and Electronics in Agriculture 166 (2019) 105008

Contents lists available at ScienceDirect

Computers and Electronics in Agriculture


journal homepage: www.elsevier.com/locate/compag

Cropinfra research data collection platform for ISO 11783 compatible and T
retrofit farm equipment
Juha Backmana, , Raimo Linkolehtoa, Markku Koistinena, Jussi Nikanderb, Ari Ronkainena,

Jere Kaivosojaa, Pasi Suomia, Liisa Pesonena


a
Natural Resources Institute Finland (Luke), Production Systems, Tietotie 2, 02150 Espoo, Finland
b
Aalto University, School of Engineering, Department of Built Environment, Otakaari 4, Espoo, Finland

ARTICLE INFO ABSTRACT

Keywords: The agricultural machinery produces an increasing number of measurements during operations. The primary use
ISOBUS of these measurements is to control agricultural operations on the farm. Data that describes the in-field variation
Document database in plant growth potential and growing conditions is the basis for precision farming. The secondary use for the
Development platform gathered information is documentation of work and work performance for business purposes. Researcher also
Data capture
benefits from the increasing measurement capabilities. Biologists and agronomists can model the crops and
Data transfer
agronomic phenomena. Work scientists can analyse the agricultural work processes. And finally, machines with
additional accurate sensors can be used for agricultural machine product development and technological re-
search purposes.
This paper concentrates on an independent research data collection platform (Cropinfra) which can be used to
collect data for all above mentioned purposes. Data can be collected both from ISOBUS (ISO 11783) compliant
machines as well as older and proprietary systems and stored to database for further analysis. The farm machines
in Cropinfra are supplemented with extra sensors that are more accurate than existing in commercial machines.
Therefore, the Cropinfra can be used as a reference measurement system to verify the correct operation of the
machines as well as to produce data for biological research purposes. This paper will also present how the cloud
connection of the data collection system can be realized. The solution was designed to be compatible with the
existing ISO 11783-10 standard. The examples presented in this paper verify that the solution works in real
farming environment. The data has been used in numerous research projects already, and in the future the data
will be an important asset when machine learning and other artificial intelligence methods will be studied and
utilized.

1. Introduction plant protection decisions and prescription maps for precision farming
operations (Söderström et al., 2016). Another use for the information is
Agricultural machinery has gone through significant changes during documentation of work and work performance for business purposes.
last decades. The introduction of electronic control units (ECU) has For example, an agricultural contractor can verify the work they have
opened up new ways for carrying out agricultural operations (Stone carried out by showing the measurement data to the customer
et al., 2008). Especially the GNSS (Global Navigation Satellite System) (Suonentieto, 2019; Dataväxt, 2019). In addition to the land owners
based solutions enable position based precision farming (Thomasson and farmers, researchers can also benefit from the increasing mea-
et al., 2019). At the same time the sensors and other measurement surement capabilities. Biologists and agronomists can model crops and
devices have also developed tremendously and their unit price has agronomic phenomena, verify hypotheses and produce new knowledge
come down (SACHS, 2014). Agricultural machinery produces an in- (Kaivosoja et al., 2013). Machinery data is an important source of so
creasing number of measurements during operations. This information called big data in agriculture (Wolfert et al., 2017). Also work scientists
can be used for many purposes. One primary purpose is to use data can analyse the agricultural work processes in more detail. And finally,
gathered to control agricultural operations. Soil conditions, crop machines with additional and accurate sensors can be used for Product
growth and health can be monitored and used to make fertilization and development of agricultural machinery and technological research


Corresponding author.
E-mail address: [email protected] (J. Backman).

https://doi.org/10.1016/j.compag.2019.105008
Received 21 November 2018; Received in revised form 30 July 2019; Accepted 12 September 2019
Available online 18 September 2019
0168-1699/ © 2019 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY license
(http://creativecommons.org/licenses/BY/4.0/).
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

purposes (Öhman et al., 2004; Suomi and Oksanen, 2015) and all necessary implements to operate the farm. The results of Cro-
Data can be collected from the machinery using a number of dif- pinfra based research projects have recently been reported in Nikander
ferent ways. The existing electronic control units (ECUs) can create et al. (2017), Nikander et al. (2015) and Pesonen et al. (2014).
their own proprietary logs, which can be downloaded to USB stick or, in In this paper we report the methods and means used to develop
some cases, to cloud servers. Another way is to use an independent Cropinfra into a framework that can be used as a general agricultural
logging unit which does the same, but is not directly bundled with any data collection and exploitation system for research purposes. The
manufacturer’s control units. In both cases, the data collection includes primary objective of this paper is to depict how the existing technology on
four phases: measurement devices or sensors, data capture, data agricultural data collection can be integrated into an open research system.
transfer, and data storage. However, the last two phases of the process A secondary objective is to present the experiences and results of different
can be fundamentally different depending on the technology used. ways to realize the cloud connection of data collection system that is at the
Farms can be very heterogeneous, as the history of the farm, the moment crucial improvement to be included in the ISOBUS standard.
geography of the land used by the farm, the crops and livestock grown The rest of this paper is organized as follows. In Section 2, methods,
on the farm, as well as technological capability and business strategy of we describe how the information management and software environ-
the farm all affect how the farm works. The type of production and the ment in a modern farm can be organized, focusing on the parts that are
size of the farm define the type and size of machinery required. vital to this paper. In Section 3 we describe how the CropInfra platform
Furthermore, farm’s machinery is often a mixture of older and newer implements farm information management infrastructure, and how the
machines from a number of manufacturers. Rarely any manufacturer system has been used for data capturing and management using ex-
can provide all machines, devices and software that the farmer needs. amples. Section 4 contains the discussion and conclusions of our work.
Therefore there is a strong need for compatibility between different
brands. In agriculture the communication between different compo- 2. Methods
nents in tractor-implement system is defined by the commonly agreed
standard ISO 11783 (ISO, 2017) – marketed under the name ISOBUS This work is based on data collection from agricultural machinery,
(AEF, 2019a). The Agricultural Electronic Industry Foundation (AEF) as well as the analysis, and exploitation of that data both in cloud
develops and markets the ISOBUS system. systems and in the machinery. In this work, we concentrate on the four
In the previous research projects the information management of phases of data collection: measurement, capture, transfer, and storage. In
farm machinery and the data transfer from the machinery to farm the measurement phase, the various sensors take readings and provide
management information systems (FMIS) and various on– and off-site values that can be stored. In the capturing phase, the sensor values are
services has been studied. Fountas et al. (2015) have proposed a Farm combined and given semantics by assigning each value to a specific
Machinery Management Information System based on interviews of variable. In the transfer phase the data created in the capturing phase is
tractor operators and farm managers. The solution was presented as a transferred from the field machine to a cloud service. Finally, in the
rich picture from which a conceptual model for conventional farm storage phase the data is stored in a cloud service for further analysis
machinery and agricultural robots was developed. Steinberger et al. and exploitation.
(2009) have presented a prototype implementation of ISO 11783 task Data collection from tractors, implements, and other agricultural
controller without user interface for data logging. The data was stored machinery is primarily based on previous development carried out for
in ISO XML format in a PDA and transferred to a local storage using digital systems in heavy machinery and vehicles in general. These
WLAN. For telemetry purposes feasibility of OPC Unified Architecture systems have then been adapted to use in agriculture, and extended in
(OPC UA) technology to transfer ISO 11783 related process data be- order to best serve the specific needs of the agricultural sector. The
tween farm machinery and the internet was studied by Oksanen et al. cloud systems and other software used outside the machinery mostly
(2015). Oksanen et al. presented also an approach to convert ISO 11783 use standard data exchange methods. The data formats and analysis
DDOP (Device Description Object Pool) to OPC UA information model. methods used are, of course, agriculture-specific in order to both cap-
In the experiments the latency and bandwidth usage of communication ture the nature of the data being used as well as providing useful in-
were measured and found feasible. formation to act as basis for managing farm, i.e. planning and executing
Commercial solutions for data collection exist from all major farm specific agricultural operations.
machinery manufacturers. For example AGCO has AgCommand, John
Deere has JDLink, CLAAS has TONI, etc. There exist also retrofittable 2.1. Farm information management
fleet management and telemetry solutions from different manu-
facturers, for example Suonentieto AgriSmart, Wapice IoT-Ticket, etc. The digital environment of a modern farm can already be extremely
Currently the ISOBUS working group at AEF is working on a standard complex and is becoming increasingly so. Fig. 2 shows an example of a
for data transfer between ISOBUS-compatible machinery and farm farm digital environment, in which the parts that are relevant to this
management systems (AEF, 2019b). The standard is expected to be study are emphasized. The Figure has been adapted from one originally
ready for use during the year 2019. published in Nikander et al. (2015). The elements of the Figure that are
This paper concentrates on an independent research data collection out of scope for this work are shown in order to provide context for the
platform (Cropinfra) which can be used to collect data both form reader how the data transfer in this work would fit into the overall
ISOBUS compliant machines as well as old and proprietary systems and software environment of a future farm. In the bottom of the Fig. 2 are
store the data to database for further analysis. The farm machines in depicted the measurement and capturing phases of data collection that
Cropinfra are supplemented with extra sensors that are more accurate are carried out in the tractor-implement. The transfer phase is re-
than those existing in commercial machines. Therefore the Cropinfra presented by the arrow between the tractor-implement and the cloud,
can be used as a reference measurement system to verify the correct and the storage phase is in the cloud environment at the top of the
operation of the machine. The Cropinfra has developed in many na- Figure. As can be seen in Fig. 2, the data transfer infrastructure de-
tional and international research projects starting from 2003 (Fig. 1). scribed above is only small part of the overall digital environment of a
The Cropinfra platform is a concept for future farm’s data collection and modern farm. The rest of the farm digital environment is described in
management structure that is capable to serve also research purposes, the original publication in Nikander et al. (2015).
and which has been verified by implementing it in a real scale experi-
mental farm for technology development. The research farm was lo- 2.2. Tractor and implement data
cated in Southern Finland, in Vihti. It included 151 ha of field, all ne-
cessary buildings for farm activities, four tractors, a combine harvester Currently, data management and transfer in tractors and

2
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 1. The Cropinfra concept and research platform has developed in many research projects during 15 years.

implements are, in practice, based on one of three methods. The first is components of the tractor-implement system. Data transfer is in spe-
the ISO 11783 (ISOBUS) standard (ISO, 2017a,b), the second are pro- cified form, and therefore the data created by an ISOBUS system can
prietary systems, typically used in older machinery that do not conform easily be read and understood by any interface conforming to the
to ISOBUS, and the third are analog systems, where the data first needs standard. The majority of machine-related data (such as implement
to be converted to a digital signal in order to be transferred for per- status, engine performance, or speed) are covered by the standard.
manent storage. There is also a part where manufacturers can add data not currently
ISOBUS defines the communication protocol used between different included in ISOBUS. Oksanen et al. (2005) has published an informative

Fig. 2. The software environment of a modern farm, adapted from Nikander et al. (2015).

3
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

article about the standard in its use. messages are assured to arrive and only once.
In addition, ISOBUS defines a set of functionalities and devices re- The underlying publish/subscribe messaging paradigm means that
quired from the machinery. The simplest ISOBUS system consists of a the system requires a message broker. The broker operates between
tractor ECU (T-ECU), an implement ECU (I-ECU) and a universal user publishers and subscribers taking incoming messages from data pro-
interface called universal terminal (UT) or virtual terminal (VT) (AEF, vider and routing them to relevant destinations. The information
2019b). These devices form the basic structure used to control the (published data) is organized in a hierarchy of topics and the broker
tractor and implement combination. There can be additional devices distributes the information to subscribers according to the subscribed
attached to the system, such as a positioning device (GNSS), or a task topics. Public/subscribe model implements decoupling: on the general
controller (TC). The task controller can be used to control the imple- level publishers and subscribers have no need to know anything about
ment, as well as to store the data logged in an executed field operation each other’s systems (ISO/IEC 20922, 2016).
(ISO, 2015). A TC that is capable of location-specific control and log-
ging is called TC-GEO and a TC that is capable only of data logging is 2.3.3. JSON
called TC-LOG. JSON (JavaScript Object Notation) is a programming language in-
Not all the machines in the agriculture are compatible with the dependent, open-standard data-interchange file format for structuring
ISOBUS standard. There are also numerous proprietary solutions for and sharing data. It is based on subset of the JavaScript programming
implement control. There is no single solution for capturing data from language and it can represent any serializable data. The format can be
these systems. Instead, each system needs an interface to adapt the data generated and parsed programmatically, and is human-readable at the
provided by the proprietary system to the farm software infrastructure. same time. JSON is used as a data exchange format in asynchronous
Should the data be used to control the device, the conversion needs to web applications and as a natural data exchange format in interfaces
be done the other way around. However, it can be difficult to use farm that are bound to document oriented database management system
data as input into a proprietary system unless the control software of (Bray, 2015, 2017).
the system has an open input method.
In the systems where digital controllers are not used, signals be- 2.3.4. PROTOBUF
tween controls, sensors and actuators use only voltage or current sig- Protocol buffers offer a programming langue neutral and platform-
nals. In this case, the system needs a setup similar to proprietary sys- neutral mechanism for serializing structured data as well as an interface
tems, where the signal is first converted to a digital form, and then description language in the inter-machine communication domain
adapted to the needs of the larger farm infrastructure. As analog sys- (Google, 2018). A data structure in Protobuf is defined using three types
tems seldom are able to take input except through the analog con- of variables: required fields, repeated fields, and optional fields. Data is
trollers, it can be difficult to use data to control such a system. compiled into data access classes for automated reading and writing for
a variety of data streams. For data transfer the Protobuf text format
2.3. Back-end technologies in cloud interfaces messages are encoded into a binary format, which reduces the message
size up to 40% and speeds up the parsing time up to 50 times when
Although the ISO 11783 standard will eventually cover the data compared to the size and processing time of a text based format like
transfer from the tractor to cloud services (AEF, 2019b), these tech- XML. Protocol buffers are well suited to the environments with time
nologies have already been used elsewhere. In essence, there are two critical computing requirements. (Google, 2018)
different technologies needed: a data transfer method and a data
format. Possible data transfer technologies are, for example, REST and 3. Results
MQTT. JSON and Protobuf are potential candidates for data format.
Fig. 3 depicts the overall structure and the different devices and
2.3.1. REST services of the Cropinfra research data collection system on a con-
REST (Representational State Transfer) is an architectural style, not ceptual level. At the bottom of the picture there is the measurement
a standard, that describes a set of constrains over the HTTP (Leach, level, which contains the physical sensors that are either commercial
1999a) application protocol for designing distributed client/server re- ones, or reference sensors added for research purposes. Sensors are
lated information systems that provide interoperability between com- connected to ECUs on the data capturing level that transform the analog
puter systems on the Internet. Web services following the REST archi- signals and transmit those to ISOBUS communication (CAN) bus. Above
tectural style are called as RESTful web services. The objects provided the ISOBUS CAN in Fig. 3, there are control and logging devices that
by the RESTful web services (sometimes referred as RESTful API) are capture, utilize and store the measurements locally. Finally, at the top
called resources. The resources are typically identified by using URIs. of the Figure are the data transfer and storage means. The data itself is
The role of the application server is to provide access to resources and stored either directly in the file system, or in a database. The different
the client accesses, and in some cases it modifies the resources phases of the data collection process are explained in further detail in
(Fielding, 2000). A client uses HTTP methods for reading a resource the following sections. In the following, we will first discuss how legacy
(GET), for creating a new resource (POST), to update an existing re- machines that provide only analog readings need to be modified in
source or create a new resource (PUT) and for removing a resource order to fit into the Cropinfra framework. Then we will discuss data
(DELETE) (IETF Trust, 2007). capturing, data transfer in both bulk and real-time modes, and data
storage. After that, we will discuss the data capturing and transfer re-
2.3.2. MQTT sults using examples where the Cropinfra framework has been suc-
MQTT (Message Queuing Telemetry Transport) is a simple and cessfully used.
lightweight publish/subscribe-based messaging protocol running over
TCP/IP, or other similar protocols like Bluetooth (ISO/IEC 20922, 3.1. Measuring legacy machines and using reference measurements
2016). MQTT is designed for devices in Machine-to-Machine commu-
nication and IoT context with limited capabilities and networks with To support all different implements in Cropinfra, analog sensors and
low-bandwidth, high-latency and possibly unreliable connectivity. In I/O device (Axiomatic, 2008) are used to provide measurements from
attempt to assure some degree of delivery in constrained environments non-ISOBUS implements to the CAN-bus. The I/O device sends the
the standard describes three qualities of service: at most once, where machine identifier that is the same as the globally unique NAME-
occasional message loss is allowed, at least once, where message de- identifier used in ISOBUS (ISO, 2019). The identification and the
livery is guaranteed but duplicates can occur and exactly once, where measurements messages from I/O device can be read similarly as from

4
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 3. The structure of the data collection system.

Fig. 5. The fuel consumption has to be measured with external sensors in old
tractors.

Fig. 4. I/O module and additional electronic wirings are mounted inside the
side panel of the cabin.

the ISOBUS machines. In another words, the old and proprietary trac-
tors and implements are modified to provide limited ISOBUS-like
functionality (see Fig. 4).
For example Valtra 8950 tractor measurements were transmitted to
ISOBUS using the I/O device which measured the signals from ISO
11786 signal connector. The ISO 11786 defines a signal connector
where the ground speed, linkage position and PTO speed are provided
using pulses and analog signals. The fuel consumption was measured
using two FLOWMATE OVAL M-III (Oval, 2016) flowmeters (Fig. 5).
The implements without proprietary ECU were also equipped with
Axiomatic I/O device. For example the Potila Magnum 540 harrow does
not have any electric control (see Fig. 6). All the functions are directly
Fig. 6. In figure I/O module fitted to Potila Magnum 540 harrow.
hydraulically controlled. The I/O device was used to measure whether
the implement is in working position or not. In other implements the I/
O device was also used to provide reference measurements to validate ISOBUS CAN-bus using standard ISOBUS TC-GEO or TC-LOG device.
correct operation of the commercial controllers. However, if such device is used for research purposes, it restricts the use
of a parallel device with the same functionality. By the TC protocol
3.2. Data capturing definition in the standard, the implement can communicate with only
one TC at a time. These kinds of conflicting situations may occur when
As explained in Section 2.2, the data can be captured from the technological research projects are conducted and ISOBUS prototype

5
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

devices are tested. Thus, a data capturing device that only listen the English] and “Työkone” [implement]). The user can also manually se-
other ECUs and doesn’t send anything to the can-bus was developed. lect the machinery. In addition, the user has to select the correct worker
Furthermore, the requirements for data capturing in different re- (“Suorittaja”), operation (“Työtehtävä”), parcel (“Lohko”), plant type
search projects and in different machines can vary. To meet the re- (“Viljelykasvi”) and variety (“Siemenlajike”) and also the targeted seed
quirements, the data capturing software had to modify in different re- (“Siemenmäärä”) and fertilization rate (“Lannoitemäärä”) as well as
search project. The National Instruments LabVIEW system engineering corresponding calibration values (“Kiertokoe”). In the bottom of the
software (National Instruments, 2018) was selected to be used to pro- page, there are also place for free comment (“kommentti”) that will be
gram the data capturing software. LabVIEW based software are fast to added in the log file. The comment can be added any time during the
program, flexible and self-documenting. operation. The user interface is slightly different when different types of
The data capturing software was designed to be user friendly and implements are used. For example when capturing data from a
reliable. First, the program identifies all the devices in the ISOBUS ploughing task, there is no need to select the plant or rate values and in
network using the address claim functionality (ISO, 2019). All the de- plant protection tasks there is a selection menu for pesticides instead of
vices have to claim their own address in the bus using globally unique seeds and fertilizers.
ISOBUS NAME. The data capturing program is able to identify the Fig. 8 shows the tab used during a field operation when data cap-
machines that are connected based on this NAME. Next, the user is turing from the sensors has been started. During the work, the user
asked to complete the rest of the information before the data capturing interface is used to monitor that all ECUs in the ISOBUS network are
is started. The user interface is described more detailed in the next working and sensors produce the correct data. For example, the GPS-
subsection. When all the initial information is completed and user has box and TC-box are green if those produce data to the bus, otherwise
started the data capturing, the program stores all essential data from the they are red. The current field parcel based on the GPS-location is also
ISOBUS network. The data capturing system does not send any request show in the text box to verify that the worker is in a correct parcel. The
message to the can bus or use the task controller protocol to commu- tractor and implement measurements are show as meters for visual
nicate with the implement. However, the software stores the process verification of correct measurement values.
data messages between the TC and the Implement as well as all other
messages that are in the bus. 3.2.2. Hardware for data capturing
The data capturing software was made using the National
3.2.1. User interface Instruments LabVIEW system engineering software, so the executable-
The user interface of the data capturing software is shown in Fig. 7 version of the software could be run in any device that has a LabVIEW
and in Fig. 8. The first picture is from the initial data input tab, which is runtime. In Cropinfra, Panasonic Toughbook CF-19 rugged laptop
used at the beginning of the work. The second picture is from the computer was used. The system was used in tractors and in a combine
driving tab, which is used during the work. harvester. A docking station was mounted in each machine to which
As described above, the data capturing software automatically de- power supply, CAN adapter and 3G/4G router (ASUS 4G-N12) was
tects the machines that are connected in the bus. Those are set to be connected. The basic setup of the hardware is shown in Figs. 9 and 10.
default values in the dropdown boxes in Fig. 7 (“Traktori” [tractor in The initial device setup was selected at the beginning of the Cropinfra-

Fig. 7. Data capturing user interface at the beginning of the work.

6
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 8. Data capturing user interface during the work.

Fig. 9. Rugged computer for data capturing is mounted in the tractor.

related projects in 2003. However, additional devices were used in


different research projects.

3.3. Bulk data transfer

The Cropinfra data capturing software stores all the collected in-
formation internally in a csv-type text file. Another option would have Fig. 10. Wireless 4G router is used to cloud connection and national instru-
been to use the ISO 11783-10 XML format. The example of the structure ments CAN-adapter for ISOBUS connection.
of the data file is in the attachments (Table 3). The data file consists of
two parts: header and data. The header stores the information that de- logging frequency. The file is created when the user starts the data
scribes the agricultural operation and is constant during the process capturing and the data is flushed to the disk in every iteration cycle to
(initial data input tab in user interface). In the data section, the process ensure that there will not be any loss of data even if the system crashes
data produced by the machinery and sensors are stored using 5 Hz

7
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 11. Authentication process.

Fig. 12. Getting a task identifier.

during a field operation. transfer is tried again after the computer is started and connection re-
The final log file is transferred to the database either manually using sumed.
an USB-stick or automatically using FTP. When using FTP, a file transfer
daemon monitors the local folder that is used to store the log files. If the
3.4. Real-time data transfer
daemon notices that a new log file is created or data capturing software
has been closed, it is concluded that previous log file is completed and
The Real-time data transfer is integrated to the data capturing
the transfer of the previous log file can be started. The file transfer
software. Unlike the bulk data transfer, the real-time data transfer at-
daemon keeps track of all the log files that are created and transferred.
tempts to follow the ISO 11783-10/11 standard. The ISO 11783-10
If the network is disconnected or the computer shutdown, the data
XML schema for the data is used in the system (ISO, 2015).

8
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 13. Posting data.

Table 1
Examples of TSK and TLG documents in a collection.

The REST (W3C, 2011)/JSON (ECMA International, 2017) API root elements to own JSON objects. These objects are requested and
(Application Programming Interface) was selected to be used, because sent to and from the cloud database, in order to get all the needed
the JSON is human readable and XML is easy to convert to JSON ob- ids. New task is started by sending a new TSK element (element
jects. There are at least two different ways to implement the online data structure is explained later) with correct references.
transfer using REST/JSON communication protocol adapting the ISO 2. Simplify the ISO 11783-10 XML structure by removing the refer-
11783-10 standard: ences inside the XML and moving all the elements inside the TSK
element. All information is sent once inside the TSK JSON, which
1. Using ISO 11783-10 XML structure as it is and converting all the starts the new task.

9
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Fig. 14. Requesting data.

(Oracle, 2018) reference implementation, and published using re-


Table 2 presentational state transfer architectural style that provides a set of
The sizes of the transmission buffers in different tests. operations that a remote client can invoke over a network using the
Name of the parcel Area (ha) number of Buffer size (number of TLG HTTP protocol (Leach, 1999a). The backend data storage solution is
TLG messages messages) built on MongoDB, a document oriented non-relational database man-
agement system. MongoDB implements a flexible data model that
Min Max AVG supports storing the JSON data as it is, enabling agile prototyping and
Pumppulohko A 2.99 23,939 0 303 4.07 efficient client-to-backend data processing.
Heikkilä A 2.86 45,614 0 26 2.139
Uutela A 11.29 112,268 0 139 2.226
Kaupanpelto A 1.84 25,614 0 14 2.126 3.4.2. Data operations
Tientaus A 4.09 44,537 0 44 2.205
The prototype REST/JSON API provides simple resources for online
Uutela A 11.29 27,443 0 14 2.150
Kirjava Pohj. A 3.09 37,734 0 35 2.194 data transfer from mobile unit to data storage and for requesting data
Kirjava Etel. A 7.56 81,124 0 94 2.198 from that storage. The API implements HTTP Basic Authentication
Pelto A (part 1) 12.30 134,545 0 512 4.261 (Leach, 1999b) for authentication and authorization.
Pelto A (part 2) 12.30 185,123 0 451 2.846
The data transfer sequence starts with authentication handshake
Pelto A (part 3) 12.30 166,510 0 503 2.927
Pelto A (part 4) 12.30 52,942 0 11,767 1938
between mobile unit and back-end (Fig. 11). The client accesses the
Hovin Luhta A (part 4.66 70,303 0 24 2.213 authenticate resource using POST HTTP method and sends BASE64
1) (Josefsson, 2006) encoded credentials (username and password) as
Hovin Luhta A (part 4.66 32,846 0 24 2.140 Authorization header. Also a valid client id is required. In case of suc-
2)
cessful authentication sequence the authorization is granted by as-
Luhta A 8.02 69,209 0 20 2.150
Riihipelto A 5.26 37,251 0 24 2.176 signing an access token to be used in further requests.
Kirjava Länt. A 5.85 55,441 0 556 6.238 After successful authentication and authorization process the client
Kirjava Länt. A 5.85 55,441 0 556 6.238 requests a task identifier using GET/taskid resource (Fig. 12). The task
identifier is used by the back-end system as a data set join key to
identify the task specific documents in the database. The task identifier
Both approaches have advantages and disadvantages, but the first is required as a path parameter whenever the data is posted to the re-
option was chosen because it follows the existing standard more closely. source.
Data is sent to POST/data/[tasked] resource using the HTTP POST
3.4.1. Backend method (see Fig. 13). The resource accepts application/json mime type
The backend application stack is built on REST/JSON API with and the payload JSON array can contain TSK or TLG type documents, or
MongoDB document oriented Data Base Management System both. The back-end stores each document in received array as an in-
(MongoDB, 2008). The interface is implemented using Java and de- dividual object into database (Table 1).
ployed on GlassFish application server, the open source Java EE

10
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

3.4.3. Beginning of the work


The work is started by creating a new task, including the header
information of the work that is meant to be done. The database returns
the task id that is used as a reference in communication with the da-
tabase after the beginning of the work.

3.4.4. Definition of captured data 3.4.6. Process data


It is supposed that each machine has a device description according Process data is sent similarly to calibration data. However, there can
to ISO 11783 standard. The device description defines the structure of be multiple TLG-elements in the same data frame to allow burst sending
the TLG elements. In this example two different device descriptions are of measurements from different time stamps. In addition to that, the
used: one for the tractor and one for the implement. In the attachments, TLG-element also includes the PTN-element which defines the geo-
device description of the ISOBUS compatible Valtra T-163 tractor and graphical location of the machine when the measurement has taken
also ISOBUS compatible Junkkari Maestro 4000 seed drill are pre- place.
sented. Both produce measurement messages to the ISOBUS which can Template for the process data:
be logged by the data capturing software. The tractor T-ECU sends the
wheel and ground speed, engine RPM, PTO RPM, Rear hitch position
and diesel consumption. For the urea consumption, a separate ECU is
used to transfer the message from the tractor bus to the ISOBUS. The
seed drill sends fertilizer and seed rates as a response to the TC message.
An external I/O device was used to send the reference measurements
from the fertilizer and seed rates. Position, speed, direction and GNSS
quality information is received from the GPS.

3.4.5. Calibration data


The calibration data is send only when the task is started or when
the calibration is changed. This kind of data is for example seed and
fertilizer rates when prescription control is not used.
Template for the calibration data is:

Note! In the standard, there is not G-attribute to specify the device;


instead it is supposed that device element numbers (DET) are unique.
For example, the seed rate and fertilizer rate are sent using:

11
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

In this example the process data consist of TIME_PC, Seed_r, together.


Fertilizer_r, Position, PTO, Hitch, Diesel, Urea, Tr_rpm, Tr_dir, The data transfer was tested during sowing operations in Luke’s
Tr_W_Speed, Tr_R_Speed, LAT, LON, GPS_Speed, Dir, Alt, Qality, experiment farm in Vihti that is located in Southern Finland. There are
Sat_num. Those values are originally used in the proprietary data no big cities near the farm, so the mobile network is typical to coun-
format and mapped to corresponding device description elements. The tryside. The sizes of the transmission buffers (TLG message queue
JSON frame is hence: length) in different tests are listed in Table 2 together with the field area
and total number of TLG messages.

3.4.7. Requesting data Totally, 1,202,443 TLG messages were sent during the data transfer
Prototype provides simple resources for requesting data from pro- tests, which means 653 Mbytes payload or 18,036,645 individual
cess data collection. Client can request all the TSK documents in col- sensor readings. The total area of the parcels were 81.1 ha, which
lection or alternatively a TSK document or a TLG document matching a means that the average raw data production density is 8 Mbytes/ha.
given task identifier. The resources are: The buffer size was typically less than five TLG messages in queue and
in average about two, which means that the TLS messages were usually
– GET/data/tsk sent successfully once per second. However, the network connection
– GET/data/tsk/[taskid] was lost occasionally and in every parcel the maximum size of the
– GET/data/tlg/[taskid] buffer is at least 14. The biggest buffer size is in last part of “Pelto A”,
when the buffer size was 11,767. The connection was lost twice in that
If successful, the response mime type is application/json and the test. In the first time, the buffer size grew up to 8125 before the TLG
body is formatted as JSON array with 1 − n JSON documents messages were successfully sent. In the second time, the connection did
([ { } ( , … )]). not recover before the computer was shut down. That was the only
All the POST and GET methods require client id and access token occasion when data was lost during the tests.
fields in HTTP request header (Fig. 14).
4. Discussion and conclusions
3.5. Results of data capturing and real-time data transfer
This paper has presented how data collection from field operations
In the presented examples in Section 3.4.6 Process data, the payload can be implemented to support research. The system supports both
size for the process data (TLG message) is 570 bytes if only measure- state-of-the-art ISOBUS (ISO 11783) compatible tractors and imple-
ments from one time instance are sent. The measurements are updated ments as well as old proprietary machinery. The provided examples
5 times per second, which means that the bandwidth requirement is verify that the solution can be used in real scale farm.
2850 bps plus 10% overhead from HTTP-frames producing totally 3.1 The data captured using the system has been used for example in
kbps bandwidth requirement. The upload data rate in 2G EGDE is following research; yield maps and in the combined seed drilling ap-
60 kbps, in 3G 2 Mbps and in 4G LTE 75 Mbps. Even though the upload plied fertilizer rates were used as source data for generating new fer-
data rate varies according to the load of the network, the required tilizer application task (Kaivosoja et al. 2013, 2017); data from different
bandwidth is only fraction of the available capacity. However, the la- field operations to determine the spatial overlapping of working widths
tency of the mobile network and HTTP server makes it impossible to (Kaivosoja and Linkolehto, 2016), where 140 different complete field
post messages with 5 Hz data rate. The solution was to pack several TLG operations were analysed to found out that in driving lines are over-
messages together and send those in one http message. In the Cropinfra, lapping 10% in average; the positioning data was also used to analyse
the default was to pack 5 TLG messages together, and if the network is GNSS positioning error (Kaivosoja and Linkolehto, 2015). In the work
disconnected, all messages after the last successful sent are packed of Kaivosoja et al. (2014), application of real time web services were

12
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

adapted to the platform. In the future the collected data is even more implement the cloud connection manufacturer independently. After the
valuable when machine learning and other artificial intelligence AEF has published the guideline, the work is started in the ISO to
methods will be utilized (Kamilaris and Prenafeta-Boldú, 2018; Liakos standardise the solution. Based on the prototypes implemented so far
et al., 2018). among the AEF community, it seems that the solution will be based on
This paper has also presented how cloud connection can be im- the MQTT publish-subscribe-based messaging protocol and protobuf
plemented in the data collection system. The solution was designed to data serializing solution developed by the Google. The solutions pre-
be compatible with the existing ISO 11783-10 standard. The connection sented in this paper are alternative but still not conflicting solutions.
was tested and found to be working in the sowing operations of a real The POST message used in this paper could be changed to send mes-
scale farm. There was one case of significant data loss, which happened sages in MQTT with the topic being the same as the URL in POST. The
when the computer used for data capturing was shut down before all JSON format used in this paper is conducted from the ISO 11783
data was transferred to the cloud service. The loss could have been standard and it is possible to convert the JSON to the protocol buffer.
prevented by saving the buffer to non-volatile memory. It was also
found out that the payload size does not matter. The latency of the
mobile network and the response time of the HTTP server as well as the Appendix A: CSV-file format
reliability of the connection are the primary restrictions in the data
transfer. See Table 3.
The FMIS working group in AEF is preparing the guideline to

Table 3
Example from the beginning of the datafile.

13
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Appendix B: DDOP

See Tables 4 and 5.

Table 4
Device description of the tractor.

14
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

Table 5
Device description of the implement.

References google.com/protocol-buffers/.
IETF Trust, 2007. Hypertext Transfer Protocol – HTTP/1.1. Retrieved October 9, 2018,
from https://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/draft-lafon-rfc2616bis-
AEF, 2019a. ISOBUS. Retrieved July 29, 2019, from https://www.aef-online.org/the-aef/ 03.html.
isobus.html. ISO/IEC 20922, 2016. Information technology – Message Queuing Telemetry Transport
AEF, 2019b. Think ISOBUS, AEF Presskit. Retrived July 29, 2019, from https://www.aef- (MQTT) v3.1.1. Retrieved October 9, 2018, from https://www.iso.org/standard/
online.org/fileadmin/user_upload/Content/pdfs/AEF-com-pack.zip https://www. 69466.html.
aef-online.org/fileadmin/user_upload/Content/pdfs/AEF-com-pack.zip. ISO, 2019. ISO 11783-5:2019. Tractors and machinery for agriculture and forestry –
Axiomatic, 2008. Press Release. Retrieved May 5, 2018, from http://www.axiomatic. Serial control and communications data network – Part 5: Network management.
com/pr-AX030100-may08.pdf. Retrieved July 29, 2019, from https://www.iso.org/standard/74366.html.
Bray, T., 2015. RFC 7493 – The I-JSON Message Format. Retrieved October 9, 2018, from ISO, 2017. ISO 11783-1:2017 – Tractors and machinery for agriculture and forestry –
https://tools.ietf.org/html/rfc7493. Serial control and communications data network – Part 1: General standard for
Bray, T., 2017. RFC 8259 – The JavaScript Object Notation (JSON) Data Interchange mobile data communication. Retrieved November 21, 2018, from https://www.iso.
Format. Retrieved October 9, 2018, from https://tools.ietf.org/html/rfc8259. org/standard/57556.html.
Dataväxt, 2019. LOGMASTER. Retrieved July 24, 2019, from https://www.datavaxt.se/ ISO, 2017. ISO 11783-7:2015 - Tractors and machinery for agriculture and forestry –
logmaster/. Serial control and communications data network – Part 7: Implement messages ap-
ECMA International, 2017. Standard ECMA-404, The JSON Data Interchange Syntax. plication layer. Retrieved April 29, 2019, from https://www.iso.org/standard/
Retrieved June 11, 2018, from http://www.ecma-international.org/publications/ 59380.html.
files/ECMA-ST/ECMA-404.pdf. ISO, 2015. ISO 11783-10:2015 – Tractors and machinery for agriculture and forestry –
Fielding, R.T., 2000. Architectural Styles and the Design of Network-based Software Serial control and communications data network – Part 10: Task controller and
Architectures. Doctoral dissertation. University of California. management information system data interchange. Retrieved November 21, 2018,
Fountas, S., Sorensen, C.G., Tsiropoulos, Z., Cavalaris, C., Liakos, V., Gemtos, T., 2015. from https://www.iso.org/standard/61581.html.
Farm machinery management information system. Comput. Electron. Agric. 110, Josefsson, S., 2006. RFC 4648 – The Internet Society, 2006. The Base16, Base32, and
131–138. Base64 Data Encodings. Retrieved June 11, 2018, from https://tools.ietf.org/html/
Google, 2018. Protocol Buffers, Retrieved October 9, 2018, from https://developers.

15
J. Backman, et al. Computers and Electronics in Agriculture 166 (2019) 105008

rfc4648. Nikander, J., Koistinen, M., Laajalahti, M., Pesonen, L., Ronkainen, A., Suomi, P., 2015.
Kaivosoja, J., Pesonen, L., Kleemola, J., Pölönen, I., Salo, H., Honkavaara, E., Saari, H., Farm information management infrastructures in the future. In: 26th International
Mäkynen, J., Rajala, A., 2013a. A case study of a precision fertilizer application task Workshop on Database and Expert Systems Applications (DEXA) Valencia 2015, pp.
generation for wheat based on classified hyperspectral data from UAV combined with 104–107.
farm history data. In: Remote Sensing for Agriculture, Ecosystems, and Hydrology Oval, 2016. Super Micro Flowmate General Specification. Retrieved May 5, 2018, from
XV. SPIE Remote Sensing, Proceedings, pp. 8887. http://www.oval.co.jp/english/gs_home/gbb340e-14c.pdf.
Kaivosoja, J., Näsi, R., Hakala, T., Viljanen, N., Honkavaara, E., 2017. Applying different Oksanen, T., Piirainen, P., Seilonen, I., 2015. Remote access of ISO 11783 process data by
remote sensing data to determine relative biomass estimations of cereals for precision using OPC Unified Architecture technology. Comput. Electron. Agric. 117, 141–148.
fertilization task generation. In: Salampasis, Michail, Theodoridis, Alexandros, Oksanen, T., Öhman, M., Miettinen, M., Visala, A., 2005. ISO 11783 –Standard and its
Bournaris, Thomas (Eds.), Proceedings of the 8th International Conference on Implementation. IFAC Proc. Vol. 38 (1), 69–74.
Information and Communication Technologies in Agriculture, Food and Environment Oracle, 2018. Java EE – Documentation. Retrieved June 11, 2018, from http://www.
(HAICTA 2017), Chania, Crete Island, Greece, September 21–24, 2017. oracle.com/technetwork/java/javaee/documentation/index.html.
Kaivosoja, J., Linkolehto, R., 2016. Spatial overlapping in crop farming works. Agron. Pesonen, L., Teye, F., Ronkainen, A., Koistinen, M., Kaivosoja, J., Suomi, P., Linkolehto,
Res. 14, 41–53. R., 2014. Cropinfra – an internet-based service infrastructure to support crop pro-
Kaivosoja, J., Linkolehto, R., 2015. GNSS error simulator for farm machinery navigation duction in future farms. Biosyst. Eng. 120, 92–101.
development. Comput. Electron. Agric. 119, 166–177. Sachs, Goldman, 2014. The Internet of Things: Making sense of the next mega-trend.
Kaivosoja, J., Jackenkroll, M., Linkolehto, R., Weis, M., Gerhards, R., 2014. Automatic Technical report. Goldman Sachs.
control of farming operations based on spatial web services. Comput. Electron. Agric. Steinberger, G., Rothmund, M., Auernhammer, H., 2009. Mobile farm equipment as a
100, 110–115. data source in an agricultural service architecture. Comput. Electron. Agric. 65,
Kaivosoja, J., Pesonen, L., Kleemola, J., Pölönen, I., Salo, H., Honkavaara, E., Saari, H., 238–246.
Mäkynen, J., Rajala, A., 2013b. A case study of a precision fertilizer application task Stone, M.L., Benneweis, R.K., Van Bergeijk, J., 2008. Evolution of electronics for mobile
generation for wheat based on classified hyperspectral data from UAV combined with agricultural equipment. Trans. ASABE 51 (2), 385–390.
farm history data. In: Neale, Christopher M.U., Maltese, Antonino (Eds.), Proceedings Suonentieto, 2019. Lohkokirjanpito ja täsmäviljely – AgriSmart. Retrived July 24, 2019,
of SPIE 8887, Remote Sensing for Agriculture, Ecosystems, and Hydrology XV, from https://www.suonentieto.fi/tuotteet/agrismart/.
88870H, October 16, 2013. Suomi, P., Oksanen, T., 2015. Automatic working depth control for seed drill using ISO
Kamilaris, A., Prenafeta-Boldú, F.X., 2018. Deep learning in agriculture: a survey. 11783 remote control messages. Comput. Electron. Agric. 116, 30–35.
Comput. Electron. Agric. 147, 70–90. Söderström, M., Sohlenius, G., Rodhe, L., Piikki, K., 2016. Adaptation of regional digital
Leach, P. J., 1999. RFC 2616 – Hypertext Transfer Protocol – HTTP/1.1. Retrieved June soil mapping for precision agriculture. Precis. Agric. 17, 588–607.
11, 2018, from https://tools.ietf.org/html/rfc2616. Thomasson, J., Baillie, C., Antille, D., Lobsey, C., McCarthy, C., 2019. Autonomous
Leach, P. J., 1999b. RFC 2617 – HTTP Authentication: Basic and Digest Access technologies in agricultural equipment: a review of the state of the art. ASABE
Authentication. Retrieved June 11, 2018, from https://tools.ietf.org/html/rfc2617. Distinguished Lecture No. 40 In: Agricultural Equipment Technology Conference,
Liakos, K.G., Busato, P., Moshou, D., Pearson, S., Bochtis, D., 2018. Machine learning in 11–13 February 2019, Louisville, Kentucky, USA, pp. 1–17.
agriculture: a review. Sensors 18 (8), 2674. W3C, 2011. REST – Semantic Web Standards. Retrieved June 11, 2018, from https://
MongoDB, 2008. Introduction to MongoDB. Retrieved June 11, 2018, from https://docs. www.w3.org/2001/sw/wiki/REST.
mongodb.com/manual/introduction/. Wolfert, S., Ge, L., Verdouw, C., Bogaardt, M., 2017. Big data in smart farming – a review.
National Instruments, 2018. What Is LabVIEW. Retrieved May 5, 2018, from http://www. Agric. Syst. 153 (2017), 69–80.
ni.com/fi-fi/shop/labview.html. Öhman, M., Oksanen, T., Miettinen, M., Visala, A., 2004. Remote maintenance of agri-
Nikander, J., Linkolehto, R., Jäger, M., Pesonen, L., Ronkainen, A., Suokannas, A., 2017. cultural machines. Proceedings of the 1st IFAC Symposium on Telematics
Prototype environment for integrating and sharing farm things and associated data. Applications in Automation and Robotics 2004, Helsinki, Finland.
Adv. Anim. Biosci. 8 (2), 645–649.

16

You might also like