Design and implementation of an electronic architecture for an agricultural mobile robot

A current trend in the agricultural area is the development of mobile robots and autonomous vehicles for remote sensing. One of the major challenges in the design of these robots is the development of the electronic architecture for the integration and control of the devices. Recent applications of mobile robots have used distributed architectures based on communication networks. A technology that has been widely used as an embedded network is the CAN protocol. The implementation of the ISO11783 standard represents the standardization of the CAN for application in agricultural machinery. This work describes the design and implementation of an electronic architecture for a mobile agricultural robot. The discussions are focused on the developed architecture, the wireless communication system for teleoperation and the distributed control based on CAN protocol and ISO11783. The evaluation of the developed system was based on the analysis of performance parameters such as motor response and architectural time delay obtained with the robot operation. The results show that the developed architecture can be applied for teleoperation and distributed control of agricultural robots meeting the requirements for accurate robot movement and an acceptable response time for robot control commands and supervision.


INTRODUCTION
An increase in the application of automation (Grift et al., 2008) and informatics (Mello & Caimi, 2008) in the agricultural area can be observed in recent times.New agricultural practices, related to Precision Agriculture, have enhanced the importance in the research of embedded sensors and communication networks (Auernhammer & Speckman, 2006) for the study of spatial variability and remote sensing applications.A certain degree of automation is necessary for the use of these new practices that depends on some recent technologies only recently adapted for the agricultural area, such as the case of global positioning systems, geographic information systems and the interconnection of devices and controllers used in agricultural machinery (Srivastava et al., 2006).New technologies and devices for real-time data acquisition and actuation have been released to equip agricultural machinery to support and automate these practices (Stone et al., 2008).A strong tendency is the development of mobile robots and autonomous vehicles for application in specific tasks, improving the efficiency and giving better results (soil compactation reduction and machine operator absence) when compared with the use of traditional large tractors and machinery (Blackmore & Griepentrog, 2006).
Autonomous vehicles and mobile robots have been widely used in industrial production and warehouses, where a controlled environment can be guaranteed.In agricultural areas, research into driverless vehicles has always been a dream but serious research started in the early 1960's (Blackmore et al., 2005).In recent years, the development of these vehicles has experienced increased interest.This development has led many researchers to start developing more rational and adaptable vehicles.These vehicles should be capable of working 24 hours a day, all year round, in most weather conditions and have the intelligence embedded within them to behave sensibly in a semi-natural environment over long periods of time, unattended, while carrying out a useful task (Pedersen et al., 2005).
In the scientific literature studies can be found that seek to adapt agricultural machinery to make agricultural platforms (autonomous vehicles or mobile robots) as in Reid et al. (2000) and Keicher & Seufert (2000).Murakami et al. (2008) developed a teleoperation system to allow autonomous navigation of an agricultural machine with higher safety.A more recent trend is the development of platforms built specifically for agricultural autonomous vehicles or robots, as in Åstrand &Baerveldt (2002), andBak &Jakobsen (2004).However, the development of these platforms presents two challenges (Blackmore et al., 2004): to develop a physical structure suitable for the agricultural environment, and to develop an electronic architecture to integrate the various electronic devices.An electronic architecture must be robust and reliable, provide quick and ease maintenance and have modularity and flexibility to allow future expansions and connection of new equipments.Recent applications of mobile robots have used distributed architectures based on Fieldbus networks to meet these requirements (Blackmore & Griepentrog, 2006;Cariou et al., 2009).
Fieldbus based control systems have replaced the traditional centralized control systems because of several benefits, such as reduced cost and amount of wiring, increased reliability and interoperability, improved capacity for system reconfiguration and ease of maintenance (Moyne & Tilbury, 2007).Although the fieldbus distributed control systems offers several advantages over traditional centralized control systems, the existence of communication networks make the design and implementation of these solutions more complex.Networked control systems impose additional problems in control applications with fieldbus: delays, jitter, bandwidth limitations and packet losses (Baillieul & Antsaklis, 2007).
Between the several fieldbuses, a technology that is widespread to be applied on these devices interconnection is the distributed communication based on the Controller Area Network (CAN) protocol.The selection of CAN protocol (Bosch, 2010) as a communication network in agriculture is due to its low cost of development and large acceptance and success for embedded electronics in the automotive area.Its use in agricultural applications is presented in Suvinen & Saarilahti (2006) and in application to autonomous vehicles and mobile robots is presented by Nagasaka et al. (2009) and Darr et al. (2005) among others.The implementation of the ISO11783 standard, also called ISOBUS, represents the standardization of the CAN protocol to the agricultural area and constitutes the main target of development as described in Benneweiss (2005).
This paper describes the design and implementation of an electronic architecture for a mobile agricultural robot.The wireless communication system for teleoperation is presented and the distributed control based on CAN protocol and ISO11783 is designed and discussed.Performance parameters, such as motor response and architectural time delay obtained with the robot operation, verify that the developed architecture can be applied for teleoperation and distributed control of agricultural mobile robots using the CAN protocol with the ISO11783 standard.

Mechanical structure of the robot
The agricultural mobile robot was designed in a partnership between the Engineering School of São Carlos -University of São Paulo (EESC-USP) and the Brazilian Agricultural Instrumentation Research Corporation (Embrapa Instrumentação Agropecuária) to be used as an experimental platform for development of control, navigation and data acquisition technologies for the agricultural area.The major application of the robot is to do the remote sensing of agronomic parameters of the most important Brazilian crops, requiring power only for moving efficiently in the field.
The mechanical structure (Figure 1) was designed for the work conditions required in field and the desired characteristics of the project.It was established that the structure should be in portico with a height of 2 m and a length of 2.5, capable of operating in crops up to 1.5 m high, with adjustable E. P. Godoy et al.
gauge (width of 1.5 to 2.5 m) to operate in various crop row spacing.The system was designed in independent modules (side frame -number 1 and top frame -number 8), held together by telescopic bars (number 10), to meet the maximum possible situations.
The steering module (number 6), the propulsion module (number 5) and central box (number 9) complete the system.The structure also should be light and flexible compared with commercial agricultural vehicles, with the possibility to insert new sensors and actuators.The side boxes (number 7) contain the electronic systems to communicate with the CAN Fieldbus and the motor controllers and also protect these devices from weather, dust and vibrations.It is important to observe that heavier items in the robot, such as batteries (number 4), propulsion and steering systems and side boxes are at most 1m from the ground, contributing to lower structure center of gravity, thus increasing its stability on sloping land.
The robot architecture with distributed CAN Fieldbus was designed symmetrically between right and left sides of the structure, which allows the homogenous distribution of weight, simplifies the development, reduces design time and costs and the amount of cables, and simplifies the maintenance of equipments installed in the system.

Electronic systems and CAN-based electronic control units
The propulsion system of the robot needs to have directional accuracy, low power consumption and low cost.Because the low traction need and distributed load in this project, the propulsion system with wheels is a cheap and suitable solution.In this project, we adopted a four wheel system (number 3 in Figure 1) and to increase the ability of vehicle pull in adverse conditions, we adopted independent traction in each wheel.Each propulsion system is composed of a Roboteq AX2850 controller, a Bosch GPA 750 W 24V DC motor, a 75:1 reduction system (25:1 of a planetary gearhead plus a 3:1 of a chain transmission) and a Hohner Serie 75 incremental encoder with 100 pulses per revolution.
Among the steering systems found, there are differential steering, articulated steering and wheel steering.The wheel steering (or Ackerman system) is the most used by road vehicles for steering.This solution describes the relation between the outside and inside angles of the wheel in a turn.Differential steering works by the difference between the speed of rotation of right and left wheels.Because the robot structure configuration (in portico format with adjustable gauge) and to provide accuracy of steering, an Ackerman system in front wheels was adopted.Each steering system is composed by a Maxon Motor kit (EPOS 70\10 positioning controller with CAN interface, a RE40 150 W 48V DC motor with a 230:1 reduction planetary gearhead GP22C and MR incremental encoder with 500 pulses per revolution).
A CAN network based on ISO11783 protocol was deployed in the agricultural mobile robot for integration (communication over the network, information exchange and control) between electronic devices.An electronic control unit (ECU), or CAN interface (Sousa, 2002), was used for these devices integration.Figure 2 presents the schematic diagram of a standard ECU with CAN communication capabilities.
Figure 2 shows that the ECU has three main components: the microcontroller, the CAN transceiver and the RS232 transceiver.The microcontroller used was the PIC18F258.This chip provides the logic operations for the CAN protocol communication and implements the programs for data acquisition of the devices connected to the I/O ports, such as sensors and actuators.A MCP2551 transceiver was incorporated into the ECU to provide switching between the digital TTL logic of the microcontroller and the differential output required on the CAN bus.A MAX232 transceiver provides switching betwe- Design and implementation of an electronic architecture for an agricultural mobile robot en the TTL logic and the output required by the serial RS232 port.To communicate in agreement to the ISO11783 standard, a microcontroller library was developed and inserted in the ECU.This microcontroller library was developed according to the specifications of parts 1 to 11 of ISOBUS documents.The implementation of the high-level ISOBUS functions (initialization, management and communication) was in the C language and used a J1939 library for the Microchip microcontroller as a basis.
The CAN network developed not only enables the integration of sensors, actuators and computer systems related with tasks of navigation (motor controllers, DGPS Trimble AG-114 and digital compass Vector 2X), but also enables device integration related to data acquisition of agronomical variables, which will eventually compose the architecture of the robot.Ultrasonic sensors (Polaroid 6500) and an active reflectance sensor (Crop Circle ACS-210) are used for information correlation with agronomical variables.The ultrasonic sensors provide information about the height of the crops.The active reflectance sensor provides classic vegetative index data as well as basic reflectance information from plant canopies.This information acquired can be used to quantify the impact of nutrients, water or disease on crop growth.The agronomical information acquired with the mobile robot georeference (latitude and longitude coordinates of the DGPS) allows building spatial variability maps.
The mobile robot is teleoperated.A teleoperation station, showed in Figure 1, has the function of managing the operations performed by the robot, permitting planning, controlling and monitoring tasks in real-time via a Wireless Ethernet network based on IEEE 802.11 performed through a VNC connection.A directional antenna in both systems (teleoperation station and robot) allows the data communication and teleoperation up to 5 km of distance.

Teleoperation system and distributed control
Figure 3 presents the flowchart of the distributed control in the mobile robot.According to the flowchart, the user can teleoperate the robot by selecting between two control methods: sending manual commands or setting predefined commands to control the mobile robot.The predefined commands do not allow for autonomous navigation but only defined trajectories (for example walk in straight-line, do curves of user defined degrees) that simplify the necessary user commands to be sent to the robot.All commands defined by the user are transmitted to the mobile robot via a wireless digital link based on IEEE 802.11 standard performed by a VNC connection.The industrial computer in the mobile robot functions like a gateway.All information received via wireless link is transmitted into messages in the CAN network and vice-versa.The industrial computer is also responsible for the vision acquisition of the camera in the mobile robot.
The defined commands received via wireless are translated into control inputs for the motor controllers of the mobile robot.These control inputs are transmitted through messages in the CAN network.The ECUs in the robot receive the CAN messages with the control inputs and act on the motor controllers.The motor controllers use discrete-time PID controllers to control the robot motion.The motor feedback (encoder information about traction speed and steering position) and the data from other devices and sensors connected in the robot are also transmitted via the CAN bus to the industrial computer.This information is sent back via wireless to the computer in the teleoperation station and is presented in the supervision and control software.Using the information about the robot, the user can decide how to actuate and control the robot movement, finishing the flowchart of the robot teleoperation and distributed control.
Experiments were done to design and define the PID controller gains for the motor control (speed control for propulsion motors and position control for guidance motors) of the mobile robot.The PID controllers for speed control use a sampling time of 16 ms and were defined with the same gains (P = 2, I = 1.5 and D = 1) because the four propulsion systems have the same equipment.The PID controllers for position control use a sampling time of 1 ms.The values defined for the controller gains were P = 275, I = 20 and D = 200.The gains of the PID controllers are defined to achieve a suitable operation of the robot movement.The PID controllers for the traction motors need a soft start (speed increases like a ramp) because of the high current demanded for the motor startup (the DC motors used in the robot propulsion are 750 W and can demand up to 100 A in startup if no soft startup is used).The PID controllers for the guidance motors need to present no overshoot and low movement speed.The required maximum value for the robot guidance position change is equal to 15 rpm to not influence the robot guidance control.

Design of the embedded CAN-based network
As described by Craessaerts et al. (2005), in CAN-based networks data are transmitted and received using message frames that carry data from a transmitting node to one or more receiving nodes.An identifier, unique throughout the network, labels each message of the node and its value defines the priority of the message to access the network.The CAN protocol is optimized for short messages and uses a CSMA/ CD with NDBA (Carrier Sense Multiple Access / Collision Detection with Non-Destructive Bitwise Arbitration) arbitration access method.A node that needs to transmit a message waits until the bus is free and then starts to send the identifier of its message bit by bit.Bus access conflicts are solved during transmission by an arbitration process at the bit level of the arbitration field, which is the initial part of each frame.The bit stream of a transmission is synchronized on the start bit, and the arbitration is performed on the following message identifier, in which a logic zero is dominant over a logic one.The CAN protocol supports two message frame formats: standard CAN (version 2.0A, 11-bit identifier) and extended CAN (version 2.0B, 29-bit identifier).
The ISO11783 standard is based on CAN protocol, which has been used for a long time in the agricultural industry (Benneweiss, 2005).ISO11783 is composed by 14 different parts that are based on the OSI (Open System Interconnect model).The physical and data link layers are based on CAN 2.0B protocol.CAN 2.0B specifies the length of message identifier as 29 bits and the length of message data as 64 bits.The data bus speed is 250 kbit/s.Information is encoded in the CAN identifier (source address, destination address and data contents), whereby two Protocol Data Units (PDU) are differentiated: PDU1 and PDU2, as shown in Figure 4. PDU1 format allows for peer-to-peer communication, and the PDU2 format for broadcast communication.
With the information about the CAN message fields, the message set for the ISOBUS network of the mobile robot was defined as shown in Table 1.All messages in the robot have the Priority field equal to 7 (decimal) and the Reserved and Data Page fields equal to O.The PDU Format was configured to 255 (value for proprietary use and open to users).The decimal (or hexadecimal) value of the field is equivalent to its correspondent binary value (for example a value of 255 is equivalent to 11111111).The use of the fields in the identifier of the CAN message provide a lot of information that ease the distributed control of the robot.Each device in the robot has its own source address and each message has its own group extension.The value of the group extension defines the kind of information that the message carries (for example, all messages with group extension equal to 11 contains information for control of the four propulsion motors or the robot speed).

Robot operation evaluation
With the teleoperated architecture implemented in the mobile robot and the controllers designed to the CAN network, the mobile robot operation could be evaluated.We performed field tests using the mobile robot to evaluate the architecture (response time of user commands and quality of motor control).In experiments, the user controls (teleoperates) the mobile robot navigation and the feedback information is analyzed to check the operability and accuracy of the robot movement.The architectural time delay (response time Design and implementation of an electronic architecture for an agricultural mobile robot of user command transmission and feedback information for supervision) is also evaluated to verify its possible influence on the robot operation and supervision.Figure 5 presents the graph of step responses of the tractions motors of the robot for speed control.According to the propulsion design for the mobile robot, 1 rpm is equal to 0.035 m s -1 and its maximum velocity achieved is equal to 1.5 m s -1 .
Figure 5 shows the accuracy of the traction motor response related to the setpoint required (negative values represent a robot velocity in a contrary direction).According to Figure 5A, no steady state error can be found and the motor veloci-ty increased like a ramp, indicating the correct design of the PID controllers for mobile robot traction.All the four traction motors present the same response, because the CAN network allow the transmission of messages in a diffusion mode.The industrial computer of the robot needs to transmit just one message in the CAN network and all ECU can receive this message and control the motors at the same time.This strategy allows that the distributed control system does not present time a delay or lack of synchronism in control commands reception.
According to the feedback information obtained with the mobile robot traction test, the highest current used by the traction motors was 30 A at maximum speed.In normal operation, between 0.5 to 1 m s -1 , the measured current was up to 18 A. With theses values we can estimate operation autonomy for the agricultural robot of 4 hours with the batteries (70 Ah traction batteries) currently used.The temperature of the propulsion controllers was also measured to verify possible problems.In the tests done, the temperature does not exceeded 50 °C, which is less than the maximum value (80 °C) acceptable for the propulsion controllers.
Figure 6 presents the graph of step responses of the guidance motors of the robot for position control.
Figure 6 shows the accuracy of the guidance motors response related to the setpoint required.No steady state error and overshoot can be found and an appropriate low speed was achieved for the guidance movement.According to the Figure 6A, a guidance position change of 90 ° takes approximately 1 s to occur resulting in a movement speed less than the 15 rpm defined in the guidance design for suitable robot navigation.These results indicate the correct design of the PID controllers for mobile robot guidance.
The CAN bus load was measured in the robot operation and was less than 10%.This value is low and shows that the CAN-based distributed control of the mobile robot has capabilities for future expansions or new device connections and increase in the data load and message traffic.The architectural time delay was evaluated by measuring the response time of user commands from the beginning of the command trans-  Finally the results of the tests showed that the agricultural mobile robot could be teleoperated.Even though it is desirable to improve the mobile robot control, the present level of accuracy and the architectural time delay is sufficient for teleoperation and remote sensing, and the results indicate that the developed architecture and the distributed control are useful for agricultural mobile robot operations.
Future work will be done to improve the mobile robot control to simplify the teleoperation (allow more predefined commands and trajectories) and to develop autonomous navigation capabilities to the agricultural mobile robot, following the current tendency in the research area of agricultural robots and vehicles (Blackmore & Griepentrog, 2006).CONCLUSIONS 1.The application of the ISO11783 standard based on CAN protocol provided an efficient platform to develop the distri-buted control system of the robot.The use of electronic control units (ECUs) reduced the computational load of the industrial computer and simplified the data communication between the devices of the robot.
2. The development of the ISO11783 library of high-level functions (ECU initialization, network management and message communication) for microcontrollers is also an important contribution of this paper.
3. The PID controllers have proved very effective and versatile to control the propulsion and guidance motors providing a suitable and precise operation for the mobile robot navigation.
4. The developed electronic architecture can be applied for teleoperation and distributed control of agricultural mobile robots meeting the requirements for an accurate robot movement and an acceptable response time for control commands and supervision.

Figure 1 .
Figure 1.Architecture of the agriculture mobile robot

Figure 4 .
Figure 4. Identifier structure and PDU formation on ISO11783

Figure 5 .
Figure 5. Test for mobile robot speed control: (A) Detail of the step response showed in the rectangle a in graphic (B) (red is the setpoint required and blue is the robot velocity), (B) Step responses of the traction motors in the test

Figure 6 .
Figure 6.Test for mobile robot guidance control: (A) Detail of the step response showed in the rectangle a in graphic (B) (red is the setpoint required and blue is the robot guidance position), (B) Step responses of the guidance motors in the test

Table 1 .
Description of the Controller Area Network (CAN) message set defined for the ISOBUS network of the mobile robot (PGN -Parameter Group Number, PF -PDU Format, GE -Group Extension, SA -Source Address and DL -Data length of the message)