Design of Dual Motor Driven Agricultural Chassis and Ridge Following Control System

: Currently, in the field of transplanting and sowing, the chassis is required to have basic characteristics such as compact structure, small overall weight, good field passing ability, and adaptability. However, there is still no universal chassis available in the market for walking with ridges. Therefore, designing a universal chassis with electric drive, remote operation/automatic ridge following automatic switching can meet the actual working needs of the above-mentioned machines. The electric drive chassis control system includes: Zed2 camera, PLC main control unit, brushless DC motor, brushless DC motor driver, wireless remote control system, optocoupler isolation module, voltage conversion module, etc. During manual control, the eight way remote control controller receives control signals from the remote control and manipulates the PLC for forward, backward, turning, and speed adjustment; During automatic control, the deviation distance between the ridge navigation line and the chassis obtained by the Zed2 camera is used to control the PLC for forward and reverse movement to follow the ridge.


Introduction
Ridge operation is a key application field of intelligent agricultural machinery equipment in China. It is not only used for millet cultivation of grain crops, beans, potatoes and other food crops, but also used for production of cash crop such as rape, cotton, tobacco and vegetable crops such as cucumber, onion, ginger. Some agricultural machinery and equipment used for planting crops, such as seeders and transplanters, need to follow the ridges, but currently there are no agricultural machinery that can recognize the ridges and track navigation for operation, and rely on tractors for guidance. This article proposes a design and control system for a dual motor driven ridge walking chassis based on machine vision recognition of field ridges. The chassis can be further expanded and developed for different application scenarios of power chassis, achieving corresponding functions such as sowing, transplanting, and spraying. The system adopts electric drive control, combining manual control and automatic walking. Machine vision is used to detect the line of the ridge, calculate the heading angle deviation angle and lateral deviation distance of the chassis, and control the chassis to walk accurately with the ridge through the control system.

Literature Review and Theoretical Basis
In recent years, researchers have developed some new agricultural mobile chassis structures for dry land use. Thomas Bak, Hans Jakobsen, and others from the Danish Institute of Science have designed a field unmanned driving test platform. The spray robot designed by Yang Shi sheng and others is equipped with a four-wheel independent drive electromagnetic guided mobile platform. The tomato picking robot developed by Wang Xiao nan and others is equipped with a mobile platform that navigates along railway tracks, with a fixed motion trajectory, but lacks flexibility and versatility.
Although there has been relevant research on the development of agricultural machinery chassis technology and system components both domestically and internationally, there is still no universal agricultural chassis that can walk on ridges. Some agricultural machinery chassis still use fuel powered system components that are relatively complex, and the integration, installation, planting, and sowing functions on the chassis are not strong. Therefore, there is an urgent need to develop a simple and versatile agricultural universal chassis.

Chassis structure design
The electric drive chassis adopts a side beam layout, as shown in Figure 1. The chassis frame is fixedly installed with a control cabinet, battery, brushless DC motor, reducer, and binocular camera from back to front in the forward direction. The walking motor drives the wheels on both sides through a reducer and a chain transmission mechanism. The chassis is not only structurally simple, but also has four wheels that can provide driving force, making it suitable for machine operation on ridges. In the future, precise control can be achieved through modeling and algorithms. The chassis model adopts a dual differential drive steering structure, where the left two wheels are driven by the same chain, and the right two wheels are also driven at the same speed. The driving wheel adopts a brushless DC motor to provide power, and the steering of the car is controlled by differential speed. This structure can achieve in-situ steering.
In the equation, e P is the motor power ,kw; m is the total mass of the vehicle, kg; f is the rolling resistance coefficient of the road surface, and the soil road surface; i is the slope angle ; A is the windward area in the direction of travel;m 2 C d is the air resistance coefficient;  is the conversion coefficient for the rotational mass of the entire vehicle ;dv/ dt is the acceleration of the entire vehicle ,m/s 2 ;  is transmission efficiency; a u is the driving speed of the entire vehicle, km/h. In order to simplify the calculation process, the secondary factor affecting power, namely air resistance, is ignored d C = 0.The chassis has good flatness on the ground during transportation, i.e. i=0. According to relevant literature, the rolling resistance coefficient of the chassis on rural land f is 0.03-0.05, conversion coefficient of rotational mass  =1.2, transmission efficiency  =0.9.After adding functional components, take m=300kg, f=0.05, dv/dt=2m/s 2 , ua1=2m/s, Simplifying equation (1), it can be seen that the rated power of the motor in transportation state is: Under the working condition of the chassis in the field, the chassis should have a certain climbing ability, taking i=10. Refer to relevant literature and determine the rolling resistance coefficient of the chassis in the field f is 0.08-0.18， conversion coefficient of rotational mass  =1.2, transmission efficiency  =0.9.Remove after adding functional components m=300kg, f=0.1, dt/dv=2m/s2, ua2=0.6m/s, Simplifying equation (1), it can be seen that the rated power of the motor under working condition is: Calculate: Therefore, a brushless DC motor with a rated power of 1kW, a rated voltage of 48V, a rated speed of 1500 revolutions per minute, a rated current of 28A, and a rated torque of 6.4Nm is adopted, as shown in Figure 2. In combination with a reducer with a reduction ratio of 20, as shown in Figure 3, the output speed range is theoretically reduced to 0-75 revolutions per minute through the deceleration effect of the reducer, which translates into a chassis forward speed of 0-1.97m/s, and the rated torque (maximum) output by the reducer is about 480Nm, Basically meets the requirements of actual working conditions.

Drive Power Selection
The three key parameters for lithium battery selection are voltage, discharge current, and capacity. To meet the power supply requirements of the chassis control system, the voltage of the lithium battery should be able to adapt to the highest voltage consumer in the system. The highest voltage consumer in this system is a brushless DC motor, so the voltage of the lithium battery is chosen as 48V; The rated discharge current is set by the staff before leaving the factory. The rated current of the two motors is a total of 52A, while the maximum rated discharge current of the 48V 60Ah Li-ion battery model of Fanri Energy can be set to 80A, which fully meets the needs of this system. Use formula (3) to estimate the power consumption of this system at the chassis in working mode: T n 3.41 800 P /n ( )/0.8 0.357kW 9550 9550 In the formula, T is the maximum torque output by the motor, in Nm, and 3.41Nm is the estimated value at a speed of 800 rpm, assuming that the torque decreases linearly with the speed; N is the theoretical speed of the motor in chassis working mode, in revolutions per minute;  is the motor efficiency at a speed of 800 rpm is taken as 80%. The 48V 60Ah model lithium battery can provide 2.88kW ꞏ h, and if the chassis is constantly in working mode, it can work continuously for about 4 hours.

Overall Design of Control System
The performance of agricultural chassis following ridge walking is influenced by the aspects of binocular cameras, upper computer control systems, and lower computer control systems. Firstly, the system will obtain images of the target ridge through the binocular camera and generate its reference path, and compare it with the vehicle body to calculate the lateral deviation and heading angle deviation. Then, the path tracking algorithm is used to obtain the speed of the left and right wheels to control the direction of travel, Finally, complete the entire chassis walking along the ridge.
1. Pose acquisition system: Images of ridges are collected using a binocular camera, and real-time navigation paths are obtained through image processing algorithms. Position information is obtained by comparing the navigation paths with the tools, which can meet the needs of planting, transplanting, and other operations on the ridges.
2. Upper computer control system: The upper computer control system is built by Labview on a laptop computer. Labview can obtain the deviation angle and deviation distance obtained by the binocular camera through a serial communication module and communicate in real-time. It can operate the interactive interface and display feedback data to the user. It can also calculate and process the steering control instructions of the implement through the path tracking algorithm generated by vs2019, The lower computer control system completes the steering and ridge following operation.
3. Lower computer control system: By obtaining control instructions sent by the upper computer, the lower computer control system is controlled by PLC to control relevant equipment components and driving devices. Steering control needs to be carried out through brushless motor drivers and brushless motors to ultimately complete the rotation of the wheels.

Chassis structure design
The hardware part of the chassis mainly includes the controller, various driving and executing components to achieve functions, etc. In addition, the chassis requires remote control driving in non ridge walking situations, so components such as motors, remote control components, drivers, solenoid valves, etc. are selected separately, The hardware selection is shown in Table 2, and the PLC controller requires input and output points to be defined for walking control. The specific definition is shown in Table 3.

Software design
The software design platform for the chassis following ridge walking control system in this project mainly uses Mitsubishi GX works3 PLC programming tool and VS2019. The development environment is ladder diagram and C++language. The field ridge navigation line recognition program and control tracking algorithm are written using C++language combined with OpenCV, completing the autonomous following ridge walking function of the chassis. After the control system is powered on, the PLC controls the output relay to send PWM with different duty ratios to match different speeds based on the set chassis speed. The chassis moves at a constant speed at the given speed, and the camera installed directly in front of the chassis begins to obtain navigation information, Visual Studio 2019 processes navigation information and uses control algorithms to obtain the wheel speeds of two wheels, which are converted into corresponding PWM values and sent to the PLC. The PLC controls the left and right wheel speeds based on the received values, thereby controlling the chassis to turn and move. If the chassis reaches the expected line speed and expected angular speed, the steering will stop, otherwise the steering control will continue. By continuously repeating this process, the chassis achieves autonomous operation along the ridge.
After writing software and communicating with the control system of the chassis, the chassis can be tested for field walking on ridges.

Upper computer design
The electric chassis along the ridge walking system includes upper computer interaction software and lower computer execution software. The identification and navigation program of the Tianlong navigation line are written in Visual Studio 2019 and transmitted to the upper computer. The upper computer interaction software is developed using LabVIEW2019, and the lower computer execution software is programmed using ladder diagram language in the Gxworks3 environment. The controller selected for the lower computer is Mitsubishi FX5u PLC, which mainly communicates with the human-machine interaction software of the upper computer, obtains control commands from the upper computer through communication protocols, and controls the speed of two wheels to walk along the ridge.
After writing the navigation program and PLC program, it is necessary to implement the overall process through an upper computer software. LabVIEW is a programming language based on control icons, supporting functions such as visual modules and serial communication modules. It can achieve image processing and display, as well as receive serial data, and has good cross platform performance on common operating systems and embedded devices. In addition, LabVIEW based projects can also be rapidly developed, tested, and deployed, thereby improving the efficiency of project development and maintenance. Therefore, this project uses LabVIEW2019 as the upper computer development environment for the ridge walking system. This study is based on the development of software VS2019 to achieve the collection and processing of ridge images, acquisition of navigation information, control algorithm acquisition of motor PWM values, and other software. The code written can generate a dynamic link library DLL file and run in LabVIEW2019.

Research Findings and Discussions
Through the universal chassis and control system mentioned above, after obtaining the posture and navigation line of the chassis recognized by the camera and parsing them into the upper computer, the heading angle deviation angle and lateral deviation distance of the chassis can be calculated, and the lower computer can output control commands to control the chassis to walk along the ridge.
The test site of this study is a field in Dantu District, Zhenjiang City. The weather during the test is sunny. The chassis uses Sliding mode control to track straight ridges and curved ridges when the forward speed is 0.4 m/s and 0.6 m/s. The operation results of the chassis walking along the ridge in a straight line are shown in Figure 4:  The statistics of straight-line tracking error is shown in Table 4. The above are all absolute deviation data .In the field environment, when the chassis is running at a speed of 0.4m/s, the absolute value of position deviation is 3.5cm, the average absolute error is 1.02cm, and the standard deviation of absolute error is 0.65cm; When the chassis runs at a speed of 0.6m/s, the extreme absolute value of the position deviation is 3.2 cm, the average absolute error is 1.13 cm, and the standard deviation of the absolute error is 0.68 cm, which meets the index requirements.