An intelligent agricultural machine control method based on a pure tracking algorithm and with remote preemption

CN122837430APending Publication Date: 2026-09-29GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610805040.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0009]本发明提供一种基于纯跟踪算法的智能农机遥控抢占与路径跟踪控制方法,以解决现有技术路径无法现场遥控采集、自动/手动模式切换不顺畅、遥控无抢占、跟踪精度低等技术问题,实现安全、稳定、易用的智能农机自动驾驶控制

Benefits of technology

[0068]1)现场采集便捷:遥控器一键启/结束路径采集,无需预规划,适配不规则地块。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122837430A_ABST
    Figure CN122837430A_ABST
Patent Text Reader

Abstract

The application relates to an intelligent agricultural machine control method based on a pure tracking algorithm and with remote control preemption, which comprises the following steps: step 1, system initialization and remote control signal judgment; step 2, path acquisition of an upper computer; step 3, intelligent driving mode selection; step 4, pure tracking algorithm path automatic tracking; and step 5, remote control preemption control. The application has the beneficial effects that: 1) field acquisition is convenient: one-key starting / ending path acquisition of a remote controller is suitable for irregular land plots; 2) safe preemption is reliable: remote control is prior at any moment, and operation safety is obviously improved; 3) tracking precision is higher: the pure tracking algorithm has strong adaptability to straight lines, curves and low-speed field working conditions, and has small deviation and high stability; 4) switching is smooth and free of impact: automatic / manual mode switching is seamless, and continuity is good; 5) strong ease of use: the remote controller is mainly used for interaction in the whole process, and ordinary farmers can quickly master the method; and 6) strong universality: the method can be suitable for multiple types of intelligent agricultural machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of agricultural machinery automation and intelligent driving control technology, specifically involving an intelligent agricultural machinery control method that can remotely collect paths on-site, achieve automatic tracking based on a pure tracking algorithm, and support real-time remote control takeover of control. Background Technology

[0002] With the rapid promotion of smart agriculture and unmanned agricultural machinery, autonomous driving has been widely applied in operations such as tilling, sowing, plant protection, and harvesting. Existing intelligent agricultural machinery autonomous driving systems mostly rely on pre-planned paths by a host computer, GNSS positioning, and onboard controllers to achieve automatic driving, but they have significant technical shortcomings in actual field operations:

[0003] 1) Path-dependent pre-planning cannot be completed in the field with one-click data collection and one-click termination via remote control. It has poor adaptability to irregular and scattered plots and the modification of paths is cumbersome.

[0004] 2) Both autonomous driving and manual remote control lack a highly reliable preemption mechanism. Most systems only support start-stop switching and cannot safely intervene at any time during autonomous driving. When encountering obstacles, people, or ditches, the response is delayed, posing a safety risk.

[0005] 3) The mode switching logic is simple, but there is no complete closed-loop process of "remote control - path acquisition - automatic tracking - remote control takeover", which makes the operation complicated and the threshold for farmers to get started is high.

[0006] 4) The path tracking algorithm has insufficient adaptability, resulting in large tracking deviations under conditions of low speed, large turns, and soft road surfaces in the field, and poor stability when driving on straight lines and curves.

[0007] 5) Unclear control permissions, lack of a safety logic that prioritizes remote control over program control, weak anti-interference capability of the system, and easy risk of loss of control.

[0008] Therefore, there is an urgent need for an intelligent agricultural machinery control method that is easy to operate, can collect data on-site, provides accurate tracking, and supports remote control priority control, in order to improve the safety, flexibility, and practicality of agricultural machinery operations. Summary of the Invention

[0009] This invention provides a method for remote control and path tracking control of intelligent agricultural machinery based on a pure tracking algorithm, which solves the technical problems of existing technologies such as the inability to remotely collect paths on-site, unsmooth switching between automatic and manual modes, lack of remote control preemption, and low tracking accuracy, thereby achieving safe, stable, and easy-to-use intelligent automatic driving control of agricultural machinery.

[0010] The technical solution of this invention to solve the above-mentioned technical problems is as follows: A smart agricultural machinery control method based on a pure tracking algorithm with remote control preemption, comprising the following steps:

[0011] Step 1: Through system power-on, layered hardware self-test, inertial navigation satellite search calibration, and master control and remote control link initialization, the normal hardware status, high-precision positioning data, and remote control validity flag are obtained, and the initial working state of master control and remote control can be preempted at any time is determined.

[0012] Step 2: Based on the remote control link and inertial navigation positioning established in Step 1, the system obtains a continuous and filtered sequence of centimeter-level trajectory points through one-button start / stop of the remote control and high-frequency recording and preprocessing by the host computer, thus completing the on-site acquisition and persistent storage of the path.

[0013] Step 3: Based on the path data stored in Step 2, the system uses remote control mode commands and CAN bus interaction between the lower and upper computers to verify and determine the automatic tracking / manual remote control mode, and then enters the corresponding control branch.

[0014] Step 4: Based on the automatic mode determined in Step 3 and the path points in Step 2, the real-time front wheel angle and left and right wheel speeds are obtained through path interpolation smoothing, pre-aiming point search, geometric derivation and differential speed distribution, driving the agricultural machinery to automatically track and drive along the target path with high precision.

[0015] Step 5: Based on the automatic driving process in Step 4, the master / remote control is switched in real time through high-frequency dual-channel remote control signal detection, hardware-level and logic judgment, and flag bit switching, so that the automatic full-process can be safely taken over at any time and automatically returns to automatic mode when the hands are released.

[0016] In some possible implementations, step 1 specifically includes:

[0017] Step 1.1: Power on the entire machine. The wired chassis, harvesting device, sensing sensors, signal processing layer, chassis main control, signal switching, and remote control transceiver are each powered independently. The power indicator lights of each module are normally lit, and flashing / not lit indicates an abnormality, which can quickly locate the fault. Hardware initialization only requires powering on and does not require manual configuration.

[0018] Step 1.2: The inertial navigation system / IMU autonomously searches for satellites and completes signal synchronization and calculation; the satellite search completion indicator flashes; the sensing signal processing layer reads the position, three-axis acceleration, angular velocity, and attitude angle, and outputs high-precision sensing data after filtering, calibration, and fusion.

[0019] Step 1.3, Chassis main control initialization: Set speed to 0, the whole machine is in standby mode; self-check the drive, steering, and harvesting devices, and if there are no faults, the main control is ready;

[0020] Step 1.4: The signal switching device is initially in a no-input state to prevent malfunctions upon power-on; the remote control transceiver completes frequency pairing, handshake, and synchronization with the remote control to establish a two-way communication link;

[0021] Step 1.5: After all modules are ready, the display screen / voice prompts that initialization is successful; the main controller and remote control collect commands in real time, and forward the main controller signal by default; the validity of the remote control signal is judged in real time: if valid, the remote control is switched in milliseconds; if it disappears, it is automatically switched back to the main controller, entering the initial mode of main controller as master and remote control as priority.

[0022] Step 1 enables rapid self-testing and fault location of the entire machine, ensures accurate and stable sensing data, safe zero-start upon power-on, and seamless remote control preemption within milliseconds, providing a safe, stable, and high-precision initial operating foundation for subsequent data acquisition and tracking.

[0023] In some possible implementations, step 2 specifically includes:

[0024] Step 2.1: After Step 1 is completed, the remote control sends a data acquisition start command, and the system exits the initial remote control mode and enters the path acquisition mode.

[0025] Step 2.2: The host computer and the combined inertial navigation system are synchronously calibrated to ensure consistent timestamps and no transmission delay, so as to directly obtain centimeter-level positioning.

[0026] Step 2.3: The host computer samples at 10Hz and collects in real time: GNSS latitude and longitude, heading angle, and vehicle speed; the entire process is manually controlled by the remote control to drive the agricultural machinery, conforming to the boundaries of irregular plots, terrain, and crop distribution;

[0027] Step 2.4, Online preprocessing by the host computer: filtering and noise reduction, outlier removal, timestamp alignment, and outputting a continuous and clean sequence of trajectory points;

[0028] Step 2.5: The controller sends a data acquisition end command. After the lower-level machine recognizes the validity, it sends the command back to the upper-level machine. The upper-level machine stops recording, stores the trajectory points, timestamps, and parameters into the memory, completes path persistence, exits data acquisition, and returns to standby mode.

[0029] Step 2 supports one-click on-site data collection via remote control, adapting to irregular plots, providing centimeter-level positioning, clean and smooth data, and trajectories that closely match actual operations, significantly reducing the difficulty of path planning and improving the practicality of subsequent autonomous driving.

[0030] In some possible implementations, step 3 specifically includes:

[0031] After the data acquisition is completed and the system is ready, the remote controller sends out the intelligent driving mode command, which is received and decoded by the lower-level device in real time.

[0032] Step 3.2: The lower-level device sends a mode request to the upper-level device via the CAN bus; the upper-level device replies with a path ready / system normal status, and performs a two-way handshake and status synchronization.

[0033] Step 3.3, if the path is ready, select automatic: the host computer loads the path saved in step 2, and the system enters the pure tracking automatic mode;

[0034] Step 3.4, if manual mode is selected: the CAN bus maintains the forwarding of remote control signals, and the system remains in manual remote control mode.

[0035] Step 3: CAN bus communication is reliable and interference-resistant, with clear mode switching logic and secure verification. One-click selection of automatic or manual mode makes it easy for farmers to use, the system is stable, and the operation process is complete.

[0036] In some possible implementations, step 4 specifically includes:

[0037] Step 4.1, define parameters: wheel track W, aiming distance L d The vehicle speed v and step length dt are set, and the initial position (X0, Y0), initial heading angle θ=0 and angular velocity ω of the vehicle are set.

[0038] Step 4.2: Read the discrete points (X,Y) of the path from Step 2, calculate the cumulative distance, and interpolate to generate a dense, smooth, continuous path;

[0039] Step 4.3: Initialize the vehicle's current position (X,Y) to the initial position (X0,Y0), the vehicle's current heading angle θ, and the projection point index;

[0040] Step 4.4, main loop;

[0041] Step 4.5: Output the speed of the left and right wheels to drive the chassis; repeat until the end of the path is reached to complete automatic tracking.

[0042] In some possible implementations, step 4.4, the main loop, specifically includes:

[0043] Step 4.4.1: Search for the nearest path point at the current location, and update the projected point and cumulative distance;

[0044] Step 4.4.2, take L along the path forward. d Determine the aiming point (g) x ,g y );

[0045] Step 4.4.3, based on the Law of Sines, derive the following formula:

[0046] ;

[0047] in, This represents the angle between the current vehicle body posture and the target point, and yields... ;

[0048] Step 4.4.4, define the lateral error of the distance from the target point as... ,get:

[0049] ;

[0050] ∴ ;

[0051] Step 4.4.5: Transform the aiming point to the vehicle coordinate system, calculate the curvature K, and calculate the angular velocity ω. The coordinate transformation formula is as follows:

[0052]

[0053]

[0054] By combining the coordinate transformation formulas, we can obtain: ;

[0055] Step 4.4.6: According to the following formula for differential drive speed distribution, obtain the speed difference that needs to be output. :

[0056]

[0057] ;

[0058] Then determine whether the vehicle has reached the end of the route.

[0059] Step 4 shows that the pure tracking algorithm is highly adaptable, has good real-time performance, smooth path, small tracking deviation, and significantly reduced lateral error, achieving high-precision, stable, and universal automatic path tracking.

[0060] In some possible implementations, step 5 specifically includes:

[0061] Step 5.1, Step 4: Throughout the entire automatic driving process, the controller periodically detects the two remote control relay signals at high frequency.

[0062] Step 5.2, Preemption Detection: The remote control is determined to be in a preemptible state only when both signals are within the preset effective PWM pulse width range. At this time, the flag is set to 1, and the system enters the remote control preemption mode. If either signal is not within the preset effective PWM pulse width range, the flag remains at 0, the system continues to be controlled by the master control signal, and the remote control cannot preempt control.

[0063] Step 5.3: When the system is in remote control preemption mode, the signal switching device prioritizes forwarding remote control signals, including the two relay channel signals JQ1 and JQ2 of the remote control, and the PWM control signals LPWM and RPWM of the left and right walking motors; the main control output is shielded, and the agricultural machinery is completely controlled by the remote control; LPWM / RPWM share one remote control input, and the left and right walking motors are driven separately by software;

[0064] Step 5.4, Release: When the remote control stops outputting signals, the flag bit automatically switches back to 0, and the signal switching device resumes forwarding the control signal of the master controller, thereby realizing seamless preemption and release between the remote control and the master controller;

[0065] Step 5.5, Channel Adaptation: The wiring of the main controller JQ1 / JQ2 is reversed compared to that of the remote control. The software switches the output of channel 0 / 1 to ensure that the logic of the actuator is consistent and the operating habits remain unchanged.

[0066] Step 5: Dual-channel signal verification prevents false triggering. Remote control has the highest priority and extremely fast response. Seamless switching and automatic rollback are available. Hardware compatibility and consistent operating habits ensure safety and controllability throughout the process, continuous operation, and ease of use and reliability.

[0067] The beneficial effects of this invention are:

[0068] 1) Convenient on-site data collection: One-click start / stop of path data collection via remote control, no pre-planning required, adaptable to irregular plots.

[0069] 2) Safe and reliable takeover: Remote control is prioritized at all times, and the system can take over instantly in case of emergencies, significantly improving operational safety.

[0070] 3) Higher tracking accuracy: The pure tracking algorithm is highly adaptable to straight lines, curves, and low-speed field conditions, with small deviations and high stability.

[0071] 4) Smooth and shock-free switching: Seamless switching between automatic and manual modes without interrupting the operation and ensuring good continuity.

[0072] 5) Highly user-friendly: The entire process is mainly interactive via remote control, with clear logic, allowing ordinary farmers to quickly master it.

[0073] 6) High versatility: It can be adapted to various types of intelligent agricultural machinery such as wheeled / tracked tractors, plant protection machines, rice transplanters, and harvesters. Attached Figure Description

[0074] Figure 1 This is a flowchart of the present invention;

[0075] Figure 2 Flowchart for vehicle initialization;

[0076] Figure 3 The flowchart after the vehicle initialization is completed;

[0077] Figure 4 A flowchart showing the process after the remote control issues a data acquisition start command;

[0078] Figure 5 This is a flowchart showing the process after the acquisition ends via remote control.

[0079] Figure 6 To determine the target aiming point (g) corresponding to the vehicle x ,g y A schematic diagram of ( );

[0080] Figure 7 A flowchart for determining whether a vehicle has reached the end of the route;

[0081] Figure 8 The simulation results are shown in the figure, where a is the straight path and b is the actual data acquisition path.

[0082] Figure 9 This is a flowchart for step 5;

[0083] Figure 10 The images shown are renderings of the actual vehicle of the present invention, where a, b, and c illustrate the process of the actual vehicle finding the aiming point. Detailed Implementation

[0084] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.

[0085] like Figure 1 As shown, this invention provides a method for remote control and path tracking of intelligent agricultural machinery based on a pure tracking algorithm. At the vehicle hardware level, it includes a drive-by-wire chassis, a crop harvesting device, and sensors in a sensing system. At the control system level, it includes a sensing signal processing layer, a chassis main control unit, a signal switching unit, and a remote control signal transceiver unit. The vehicle hardware and control system adopt a layered decoupled design, with each module interacting with data through standardized signal interfaces to ensure stable operation and rapid response under different operating modes. This invention includes the following steps:

[0086] Step 1: System initialization and remote control signal judgment

[0087] After the agricultural machinery system is powered on, each component uses its own power indicator light to clearly indicate whether it is receiving power, allowing operators to quickly confirm the hardware's power supply status. Specifically, the wire-controlled chassis, crop harvesting device, sensing system sensors, sensing signal processing layer, chassis main control unit, signal switching unit, and remote control signal transceiver are all equipped with independent power indicator lights. When a component is receiving power normally, the corresponding indicator light is constantly lit; if a component is receiving power abnormally, the indicator light is off or flashing, facilitating quick location of power supply faults during system startup. Hardware initialization can be completed simply by turning on the power, without additional manual intervention or software configuration, thus reducing the complexity of system startup.

[0088] At the software control level, during sensor initialization, the inertial navigation system (INS) autonomously performs a satellite search operation to acquire the necessary signals for satellite positioning. This search includes searching for available GPS, BeiDou, or other navigation satellite signals, and performing signal synchronization and data processing. Once the satellite search is complete, an indicator light will flash, signifying the completion of this initialization phase. At this point, the sensing signal processing layer successfully acquires the position coordinates and IMU data provided by the INS, including three-axis acceleration, three-axis angular velocity, and attitude angles, providing a precise sensing foundation for subsequent path planning and control. After acquiring the INS data, the sensing signal processing layer further filters, calibrates, and fuses the data to eliminate noise and drift errors, further improving the reliability of the sensing information.

[0089] During initialization, the main control unit sets an initial speed value, which defaults to zero. This ensures the agricultural machinery is in a standby state, preventing accidental movement due to abnormal default control signals after power-on. Simultaneously, the main control unit performs self-checks on the drive motor, steering actuator, and crop harvesting device of the drive-by-wire chassis, confirming that all actuators are fault-free before entering standby mode. Once main control initialization is complete, a buzzer sounds to clearly indicate to the operator that the main control system has finished initializing and is ready for further operation. The buzzer tone uses a specific frequency and duration encoding, such as two consecutive short beeps, to distinguish it from other warning sounds.

[0090] The signal switching device is in a no-signal-input state during initialization, awaiting remote control or master control signals to ensure it does not erroneously respond to any signal before receiving a clear control command. This initial state design avoids malfunctions caused by signal jitter or interference that may occur at the moment of system power-on, improving system safety and anti-interference capabilities. The remote control signal transceiver connects to the remote control during initialization, ensuring the remote control can intervene at any time. This connection process includes frequency pairing, handshake verification, and signal synchronization steps, ensuring a reliable two-way communication link is established between the remote control and the receiver.

[0091] like Figure 2 As shown, the vehicle is considered initialized only after all the aforementioned components—including the sensing signal processing layer, the chassis main control unit, the signal switching unit, and the remote control signal transceiver—have been initialized. At this point, the system can enter normal operation. After the vehicle initialization is complete, the system will provide feedback to the operator via a display screen or voice prompts, allowing the operator to confirm the system status.

[0092] like Figure 3As shown, after the vehicle initialization is complete, the chassis main control unit and the remote control system collect remote control commands in real time through the remote control receiver, and simultaneously determine whether a path acquisition request is triggered, so as to decide whether to enter the path acquisition mode or the normal driving mode according to the operation intention. In the path acquisition mode, the agricultural machinery performs autonomous navigation and harvesting operations according to the preset path planning algorithm; in the normal driving mode, the agricultural machinery drives according to the real-time control commands of the main control system. By default, the signal switching device directly forwards the control signals of the main control to control the driving of the entire vehicle system. At this time, the agricultural machinery follows the decisions of the main control system to perform autonomous or semi-autonomous operations, which is suitable for large-area, highly regular farmland harvesting scenarios.

[0093] When special circumstances arise (such as emergency obstacle avoidance, system malfunctions, or the need for manual intervention) requiring remote control intervention, the signal switching device prioritizes forwarding control signals from the remote control. In this situation, the agricultural machinery is fully controlled by the remote control, allowing operators to directly control the machinery for precise or emergency operations. Remote control intervention has higher priority than the master control signal, ensuring the timeliness and effectiveness of manual intervention in emergencies. When the remote control stops outputting signals, the signal switching device automatically resumes forwarding the master control signal, returning the agricultural machinery to the master control system's control. This ensures a seamless switchback to the preset automatic control mode after the remote control is deactivated, guaranteeing operational continuity and safety. The entire switching process requires no manual intervention, with switching times in milliseconds, making it virtually imperceptible to the operator, thus ensuring safety without affecting operational efficiency.

[0094] Step 2: Host computer path acquisition

[0095] like Figure 4As shown, after the remote controller issues the data acquisition start command, the system immediately exits the initial remote control mode and formally enters the path acquisition mode. This step uses the host computer as the core data recording and processing carrier, relying entirely on the integrated inertial navigation system (hereinafter referred to as "integrated inertial navigation") for efficient operation. The RTK real-time differential positioning technology is an integrated GNSS auxiliary technology within the integrated inertial navigation system. It does not require separate connection and deployment; high-precision positioning and inertial navigation can be simultaneously achieved through the integrated inertial navigation unit. No additional RTK-related hardware is needed throughout the process, simplifying system connections while ensuring positioning accuracy. After path acquisition is started, the host computer first completes communication synchronization calibration with the integrated inertial navigation unit to ensure the real-time performance and consistency of data transmission between the two, avoiding deviations in trajectory point recording due to communication delays. During the data acquisition process, the host computer collects and records all the core parameters output by the combined inertial navigation unit in real time according to the preset sampling frequency (usually set to 10Hz, which can be flexibly adjusted according to the accuracy requirements of agricultural machinery operation). These parameters include GNSS position (high-precision latitude and longitude coordinates, which achieve centimeter-level positioning by relying on internal RTK-assisted technology, effectively eliminating positioning errors caused by satellite signal interference), heading angle (accurately reflects the direction of agricultural machinery travel, providing a directional reference for subsequent autonomous driving path tracking), and vehicle speed (real-time capture of the speed of agricultural machinery travel, ensuring the continuity and uniformity of the trajectory point sequence).

[0096] It is important to note that during the data collection process, the agricultural machinery remains under full remote control. Operators can flexibly adjust the machinery's direction and speed based on the actual terrain features, work boundaries, crop distribution, and other site conditions. This ensures the collected path perfectly matches the actual site requirements, preventing a disconnect between the fixed trajectory and the actual work scenario, and guaranteeing the practicality of subsequent automated driving operations. During data collection, the data processing program built into the host computer simultaneously preprocesses the real-time collected parameters, including filtering and noise reduction, abnormal data removal, and timestamp calibration. This eliminates invalid data caused by signal interference and minor hardware errors, ensuring the accuracy of each trajectory point. The processed valid parameters are then integrated into a continuous sequence of trajectory points in chronological order, comprehensively capturing the details of the entire agricultural machinery's travel trajectory.

[0097] like Figure 5 As shown, when the operator issues a data acquisition termination command via remote control, the command is first received and identified by the lower-level computer in real time. After confirming the command's validity, the lower-level computer sends a data acquisition termination signal back to the system. Upon receiving this signal, the upper-level computer immediately stops recording the trajectory point sequence and performing data preprocessing. Subsequently, the upper-level computer synchronously saves the completed path data (including all trajectory point sequences, acquisition time, core parameters, etc.) to the memory, completing the persistent storage of the path data for easy retrieval in subsequent autonomous driving mode. After the data is saved, the system officially exits the path acquisition mode and returns to the initial standby state.

[0098] Step 3: Select Intelligent Driving Mode

[0099] After path acquisition is complete, the system enters an initial standby state. At this time, the operator issues a smart driving mode selection command via remote control. This command is first received and identified by the lower-level machine in real time. The upper-level and lower-level machines communicate bidirectionally via a CAN bus interface. This CAN interface, as the core channel for data interaction and command transmission, boasts advantages such as high communication speed, strong anti-interference capability, and stable and reliable transmission. It is adaptable to the complex electromagnetic environment and vibration scenarios of agricultural machinery operation sites, effectively avoiding command loss or data transmission delays. Specific steps: After receiving the smart driving mode selection command from the remote control, the lower-level machine transmits the mode selection signal (activate automatic driving / maintain manual control) to the upper-level machine in real time via the CAN interface. Simultaneously, the upper-level machine uses the CAN interface to feedback its own operating status (such as whether the path data is ready and whether the system is normal) to the lower-level machine, ensuring synchronization between the two. If the operator chooses to activate automatic driving, the lower-level device sends an automatic driving start command to the system via the CAN interface. After receiving the command, the upper-level device calls the saved path data, and the system officially enters the pure tracking path tracking mode. If the operator chooses not to activate automatic driving, the lower-level device maintains the normal transmission of remote control signals via the CAN interface, and the system maintains the remote manual control mode, ensuring that the agricultural machinery can continue to be flexibly operated by the operator. The entire mode switching process achieves efficient interaction between commands and status through the CAN interface, ensuring a smooth switching.

[0100] Step 4: Pure Tracking Algorithm for Automatic Path Tracking

[0101] In autonomous driving mode, the system uses the collected path as the target trajectory and employs the Pure Pursuit algorithm to calculate the desired front wheel angle and target vehicle speed in real time. The controller outputs automatic steering and speed commands to the chassis actuators to achieve high-precision autonomous driving.

[0102] First, define the vehicle track width W and the aiming distance L. d The system executes motion control parameters such as vehicle speed v and control time step dt, and sets the vehicle's initial position (X0, Y0), initial heading angle θ = 0, and angular velocity ω. It reads the discrete coordinates (X, Y) of the preset path, calculates the cumulative path distance based on these discrete points, and generates a dense and smooth continuous path through interpolation. Then, it initializes the vehicle's current position (X, Y) as the initial position (X0, Y0), initializes the vehicle's current heading angle θ, and the index of the projection point of the previous cycle on the path. After entering the main path tracking loop, it searches for the path point closest to the vehicle's current position on the smooth path, updates the nearest projection point and the cumulative path distance, and extends the target distance L forward along the path based on this nearest projection point. d Determine the target aiming point (g) corresponding to the vehicle. x ,gy ).

[0103] like Figure 6 As shown in the figure (g) x ,g y ) is the next path point to be tracked. It is located on the acquired path, and now we need to control the vehicle's rear axle to pass through this point. L d This represents the distance from the current position (i.e., the rear axle position) to the target point, and α represents the angle between the current vehicle posture and the target point. Then, based on the law of sine, the following formula can be derived:

[0104]

[0105] We can obtain:

[0106]

[0107] Define the lateral error of the distance from the target point as ,get:

[0108]

[0109] ∴

[0110] Transform the aiming point to the vehicle coordinate system, calculate the curvature K, and calculate the angular velocity ω. The coordinate transformation is as follows:

[0111]

[0112]

[0113] Combining the above equations, we get:

[0114]

[0115] Differential drive speed distribution, i.e., obtaining the speed difference required for the current output. :

[0116]

[0117]

[0118] Next, it is determined whether the vehicle has reached the destination of the route. The flowchart of the above procedure is as follows: Figure 7 As shown. The process simulation results are as follows. Figure 8 exhibit, Figure 8 a represents the actual data collection path: the initial heading angle and the path slope are inconsistent, so the path initially deviates significantly; Figure 8 b represents the actual data collection path: the error is worse at bends, and the effect is better at smooth areas.

[0119] Step 5: Remote control preemption

[0120] like Figure 9 As shown, throughout the entire autonomous driving process, the controller detects the remote control signal in real time at a high frequency:

[0121] After the remote control signal is determined to be valid, the system further executes remote control signal preemption control to achieve precise, rapid, and safe switching of control between the master controller and the remote controller. Specifically, the system uses a flag to indicate the source of the currently valid control signal: when the flag is 0, it indicates that the system is currently controlled by the master controller signal and is in automatic or semi-automatic operation mode; when the flag is 1, it indicates that the system is currently controlled by the remote control signal and is in remote manual intervention mode. The value of this flag is determined by the validity of the signals from the two relay channels of the remote controller (corresponding to PWM input capture channel indices 4 and 5), rather than relying on a single signal, thus improving the reliability of preemption judgment and preventing false preemption due to interference or failure of a single signal.

[0122] The system continuously monitors two relay signals output from the remote control receiver. These signals correspond to two switches or buttons on the remote control, typically used to control critical safety functions or mode switching on agricultural machinery. Only when both signals are within the pre-set effective PWM pulse width range (1300 microseconds to 1700 microseconds) is the remote control considered preemptible. At this point, the flag is set to 1, and the system enters remote control preemption mode. This requirement for simultaneous validity of both signals is essentially a hardware-level AND logic judgment, effectively preventing false preemption caused by poor contact in a single signal line, external electromagnetic interference, or accidental touches by the remote control. If either signal is invalid (i.e., PWM pulse width less than or equal to 1300 microseconds or greater than or equal to 1700 microseconds), the flag remains 0, the system continues to be controlled by the master control signal, and the remote control cannot preempt control.

[0123] When the system is in remote control preemption mode, the signal switching device prioritizes forwarding control signals from the remote controller, including the remote controller's two relay channel signals (JQ1, JQ2) and the left and right travel motor PWM control signals (LPWM, RPWM). LPWM and RPWM share the same remote control input signal (corresponding to PWM input capture channel index 6). This design reduces the number of channels required by the remote controller, lowering the hardware cost of the remote control system. Simultaneously, through independent output of the left and right channels at the software level, independent control of the left and right travel motors can still be achieved. At this time, the agricultural machinery is entirely controlled by the remote controller. The main control signal is temporarily shielded. Although the main control system is still running and calculating control commands, its output is not forwarded to the actuators, thus ensuring absolute priority of remote control operation.

[0124] When the remote control stops outputting signals (i.e., either or both of the two relay signals are out of range), the flag bit automatically switches back to 0, and the signal switching device resumes forwarding the master controller's control signals, thus achieving seamless preemption and release between the remote control and the master controller. This process requires no additional operation of any switching switches by the operator, nor does it require restarting the system or re-initializing; it is entirely completed automatically by the signal switching device based on the real-time signal status. The preemption and release response time depends on the sampling period of the PWM signal and the processing speed of the capture interrupt, typically in the range of microseconds to milliseconds, which meets the real-time requirements of agricultural machinery in high-speed driving or emergency obstacle avoidance scenarios.

[0125] It should be noted that, since the main control signal and the remote control signal have an opposite relationship in the physical wiring order of the relay channel, that is, the JQ1 and JQ2 output signals of the main control system are reversed in the hardware level from the JQ1 and JQ2 terminal order of the remote control, this system swaps the output order of channel 0 and channel 1 when the main control outputs. Specifically, the main control signal that should have been output to JQ1 (corresponding to PWM_Input_CCR[1]) is forwarded to the JQ2 output channel, and the main control signal that should have been output to JQ2 (corresponding to PWM_Input_CCR[0]) is forwarded to the JQ1 output channel. Through this software-level channel remapping, it is ensured that the control signal logic received by the actuator (such as hydraulic valve, relay, motor driver, etc.) remains consistent regardless of whether the system is in main control mode or remote control mode. The operator's operating habits when using the remote control are completely consistent with the expected actions in the main control mode, without the need for additional adaptation or adjustment. This design reflects the good balance between hardware compatibility and user experience of this system.

[0126] The actual vehicle effect of the present invention is as follows Figure 10 As shown in Table 1, the comparison results between the traditional method and the traditional method are presented.

[0127] Table 1 Comparison of the present invention with conventional methods

[0128]

[0129] Example

[0130] This embodiment applies to a tracked, autonomous pineapple harvester.

[0131] Hardware includes: Remote control: used for standard route acquisition and interruption control;

[0132] Receiver: Receives remote control signals and transmits them to the controller;

[0133] Controller: Receives control signals from the host computer, processes the signals received from the receiver, and forwards them to the host computer;

[0134] Host computer: Stores GNSS-acquired path points, performs decision analysis to derive current vehicle control commands, and sends them to slave computer;

[0135] GNSS / IMU positioning module: After starting data acquisition, output path points and transmit them to the host computer;

[0136] Chassis actuators: move according to the control signals output by the controller. The control cycle is 1 second.

[0137] Step 1: The system is powered on and initialized, the remote control is paired with the frequency, the agricultural machinery enters the default remote control state, and the driver drives the agricultural machinery to the work starting point.

[0138] Step 2: Press the path acquisition button on the remote control, and the host computer will start trajectory recording, storing the position, heading, and speed in real time.

[0139] Step 3: The driver remotely controls the agricultural machinery to travel along the target plot, completing the target path traversal, while the host computer continuously collects trajectory points.

[0140] Step 4: Press the end acquisition button on the remote control. The path is saved and you can exit the acquisition mode.

[0141] Step 5: Select "Activate Smart Driving" on the remote control. The system loads the path and starts the pure tracking algorithm. The agricultural machinery enters automatic driving mode and drives automatically along the collected path.

[0142] Step 6: During automatic driving, if any channel of the remote control is operated, the system will immediately switch to manual control; after stopping the operation, automatic driving can be resumed via remote control.

[0143] Step 7: The task is completed. Remotely turn off the intelligent driving function. The system will return to manual remote control mode and can proceed to the next round of data collection or task.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A smart agricultural machinery control method based on a pure tracking algorithm with remote control preemption, characterized in that, Includes the following steps: Step 1: Through system power-on, layered hardware self-test, inertial navigation satellite search calibration, and master control and remote control link initialization, the normal hardware status, high-precision positioning data, and remote control validity flag are obtained, and the initial working state of master control and remote control can be preempted at any time is determined. Step 2: Based on the remote control link and inertial navigation positioning established in Step 1, the system obtains a continuous and filtered sequence of centimeter-level trajectory points through one-button start / stop of the remote control and high-frequency recording and preprocessing by the host computer, thus completing the on-site acquisition and persistent storage of the path. Step 3: Based on the path data stored in Step 2, the system obtains the automatic tracking / manual remote control mode through remote control mode commands and CAN bus interaction verification between the lower and upper computers, and enters the corresponding control branch. Step 4: Based on the automatic mode determined in Step 3 and the path points in Step 2, the real-time front wheel angle and left and right wheel speeds are obtained through path interpolation smoothing, pre-aiming point search, geometric derivation and differential speed distribution, driving the agricultural machinery to automatically track and drive along the target path with high precision. Step 5: Based on the automatic driving process in Step 4, the master / remote control is switched in real time through high-frequency dual-channel remote control signal detection, hardware-level and logic judgment, and flag bit switching, so that the automatic full-process can be safely taken over at any time and automatically returns to automatic mode when the hands are released.

2. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 1, characterized in that, Step 1 specifically involves: Step 1.1: Power on the entire machine. The wired chassis, harvesting device, sensing sensors, signal processing layer, chassis main control, signal switching, and remote control transceiver are each powered independently. The power indicator lights of each module are normally lit, and flashing / not lit indicates an abnormality, which can quickly locate the fault. Hardware initialization only requires powering on and does not require manual configuration. Step 1.2: The inertial navigation system / IMU autonomously searches for satellites and completes signal synchronization and calculation; the satellite search completion indicator flashes; the sensing signal processing layer reads the position, three-axis acceleration, angular velocity, and attitude angle, and outputs high-precision sensing data after filtering, calibration, and fusion. Step 1.3, Chassis main control initialization: Set speed to 0, the whole machine is in standby mode; self-check the drive, steering, and harvesting devices, and if there are no faults, the main control is ready; Step 1.4: The signal switching device is initially in a no-input state to prevent malfunctions upon power-on; the remote control transceiver completes frequency pairing, handshake, and synchronization with the remote control to establish a two-way communication link; Step 1.5: Once all modules are ready, the display screen / voice prompt will indicate successful initialization. The master controller and remote controller collect commands in real time, and forward the master controller signal by default. The validity of the remote controller signal is judged in real time: if the signal is valid, the remote controller is switched in milliseconds; if the signal disappears, the remote controller is automatically switched back to the master controller and enters the initial mode of master controller as the master and remote controller as the priority.

3. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 2, characterized in that, Step 2 specifically involves: Step 2.1: After Step 1 is completed, the remote control sends a data acquisition start command, and the system exits the initial remote control mode and enters the path acquisition mode. Step 2.2: The host computer and the combined inertial navigation system are synchronized and calibrated to ensure consistent timestamps and no transmission delay, so as to directly obtain centimeter-level positioning. Step 2.3: The host computer samples at 10Hz and collects in real time: GNSS latitude and longitude, heading angle, and vehicle speed; the entire process is manually controlled by the remote control to drive the agricultural machinery, conforming to the boundaries of irregular plots, terrain, and crop distribution; Step 2.4, Online preprocessing by the host computer: filtering and noise reduction, outlier removal, timestamp alignment, and outputting a continuous and clean sequence of trajectory points; Step 2.5: The controller sends a data acquisition end command. After the lower-level machine recognizes the validity, it sends the command back to the upper-level machine. The upper-level machine stops recording, stores the trajectory points, timestamps, and parameters into the memory, completes path persistence, exits data acquisition, and returns to standby mode.

4. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 3, characterized in that, Step 3 specifically involves: After the data acquisition is completed and the system is ready, the remote controller sends out the intelligent driving mode command, which is received and decoded by the lower-level device in real time. Step 3.2: The lower-level device sends a mode request to the upper-level device via the CAN bus; the upper-level device replies with a path ready / system normal status, and performs a two-way handshake and status synchronization. Step 3.3, if the path is ready, select automatic: the host computer loads the path saved in step 2, and the system enters the pure tracking automatic mode; Step 3.4, if manual mode is selected: the CAN bus maintains the forwarding of remote control signals, and the system remains in remote control manual mode.

5. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 4, characterized in that, Step 4 specifically involves: Step 4.1, define parameters: wheel track W, aiming distance L d The vehicle speed v and step length dt are set, and the initial position (X0, Y0), initial heading angle θ=0 and angular velocity ω are set. Step 4.2: Read the discrete points (X,Y) of the path from Step 2, calculate the cumulative distance, and interpolate to generate a dense, smooth, continuous path; Step 4.3: Initialize the vehicle's current position (X,Y) to the initial position (X0,Y0), the vehicle's current heading angle θ, and the projection point index; Step 4.4, main loop; Step 4.5: Output the speed of the left and right wheels to drive the chassis; repeat until the end of the path is reached to complete automatic tracking.

6. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 5, characterized in that, The main loop in step 4.4 specifically consists of: Step 4.4.1: Search for the nearest path point at the current location, and update the projected point and cumulative distance; Step 4.4.2, take L along the path forward. d Determine the aiming point (g) x ,g y ); Step 4.4.3, based on the Law of Sines, derive the following formula: ; in, This represents the angle between the current vehicle body posture and the target point, and yields... ; Step 4.4.4, define the lateral error of the distance from the target point as... ,get: ; ∴ ; Step 4.4.5: Transform the aiming point to the vehicle coordinate system, calculate the curvature K, and calculate the angular velocity ω. The coordinate transformation formula is as follows: By combining the coordinate transformation formulas, we can obtain: ; Step 4.4.6: According to the differential drive speed distribution formula below, obtain the speed difference that needs to be output. : ; Then determine whether the vehicle has reached the end of the route.

7. The intelligent agricultural machinery control method based on a pure tracking algorithm with remote control preemption as described in claim 6, characterized in that, Step 5 specifically involves: Step 5.1, Step 4: Throughout the entire automatic driving process, the controller periodically detects the two remote control relay signals at high frequency. Step 5.2, Preemption Detection: The remote control is determined to be in a preemptible state only when both signals are within the preset effective PWM pulse width range. At this time, the flag is set to 1, and the system enters the remote control preemption mode. If either signal is not within the preset effective PWM pulse width range, the flag remains at 0, the system continues to be controlled by the master control signal, and the remote control cannot preempt control. Step 5.3: When the system is in remote control preemption mode, the signal switching device prioritizes forwarding remote control signals, including the two relay channel signals JQ1 and JQ2 of the remote control, and the PWM control signals LPWM and RPWM of the left and right walking motors; the main control output is shielded, and the agricultural machinery is completely controlled by the remote control; LPWM / RPWM share one remote control input, and the left and right walking motors are driven separately by software; Step 5.4, Release: When the remote control stops outputting signals, the flag bit automatically switches back to 0, and the signal switching device resumes forwarding the control signal of the master controller, thereby realizing seamless preemption and release between the remote control and the master controller; Step 5.5, Channel Adaptation: The wiring of the main controller JQ1 / JQ2 is reversed compared to that of the remote control. The software switches the outputs of channel 0 / 1 to ensure that the logic of the actuator is consistent and the operating habits remain unchanged.