An automatic driving system for agricultural machinery

By constructing a static farmland map and using a genetic algorithm to plan farmland boundaries and driving paths, the boundary positioning problem in agricultural machinery path planning and tracking control was solved, thus achieving the safety and efficiency of automatic agricultural machinery driving.

CN122085998APending Publication Date: 2026-05-26聊城市农业科学院
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
聊城市农业科学院
Filing Date
2026-01-28
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing agricultural machinery path planning and path tracking control technologies cannot accurately locate farmland boundaries, causing planned paths to exceed actual boundaries, posing safety hazards, and resulting in low efficiency for manual driving.

Method used

A static farmland map is constructed using a data acquisition module. Through farmland boundary extraction, coordinate transformation unit, target point extraction and fitting unit, combined with a genetic algorithm, the optimal turning area width is calculated, farmland boundaries and driving paths are planned, and automatic control module is used to realize automatic driving of agricultural machinery.

Benefits of technology

This effectively reduces the number of data points, maintains the accuracy of boundary shapes, ensures that the agricultural machinery trajectory does not cross the boundary, and improves the safety and efficiency of automatic agricultural machinery driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122085998A_ABST
    Figure CN122085998A_ABST
Patent Text Reader

Abstract

This application belongs to the field of autonomous driving technology, specifically relating to an agricultural machinery autonomous driving system, including: a data acquisition module for collecting farmland data and constructing a static farmland map based on the collected data; a path planning module for pre-planning the agricultural machinery's driving path based on the constructed static farmland map; and an automatic control module for automatically controlling the agricultural machinery to work according to the pre-planned driving path. The path planning module includes a farmland boundary planning module and a driving path planning module. The farmland boundary planning module determines multiple target points based on the curve shape of the farmland boundary and performs farmland boundary fitting on the coordinates of the target points to obtain a planned path boundary that maintains good boundary shape accuracy. The fitted boundary can better represent the real plot boundary, and through inward shrinking operations, all boundary lines are located inside the original sampling points, ensuring that the trajectory does not cross the boundary, thus providing reliability and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of autonomous driving technology, specifically relating to an autonomous driving system for agricultural machinery. Background Technology

[0002] Agricultural machinery driving technology generally consists of two main aspects. One aspect is agricultural machinery driving path planning, which requires planning based on different operating areas and different operating requirements, using satellite data. Currently, commonly used path planning methods include reciprocating, spiral, and alternating methods, etc. However, these methods often fail to accurately plan the boundary shape when planning farmland boundaries, causing the planned path to exceed the actual boundary and posing safety hazards to the agricultural machinery.

[0003] On the other hand, the path tracking control of agricultural machinery is traditionally carried out by human drivers through navigation broadcasts based on a pre-planned path, or by agricultural machinery operators relying on experience. This requires a large amount of labor, and manual driving often results in skewed operation paths.

[0004] Therefore, using satellite data and intelligent sensing technology to achieve automatic agricultural machinery operation is an important means to promote agricultural automation and intelligence, which can also significantly improve operational efficiency and reduce the workload of farmers. Summary of the Invention

[0005] To address the technical problems existing in the background art, the present invention provides an agricultural machinery automatic driving system, comprising: a data acquisition module for acquiring farmland data and constructing a static farmland map based on the acquired farmland data; The path planning module is used to pre-plan the driving path of agricultural machinery based on the constructed static farmland map; The automatic control module is used to automatically control agricultural machinery to work according to a pre-planned agricultural machinery travel path; The route planning module includes: a farmland boundary planning module and a driving route planning module; The path boundary planning module is used to plan the boundaries of agricultural machinery operations; The farmland boundary planning module includes: a farmland boundary extraction unit, a coordinate transformation unit, a target point coordinate extraction unit, and a farmland boundary fitting unit; The farmland boundary extraction unit is used to extract farmland boundaries from the constructed static farmland map. The coordinate transformation unit is used to convert latitude and longitude coordinates in a static farmland map into XY coordinates in a Cartesian plane coordinate system using coordinate transformation and projection functions and Gauss-Kruger projection. The target point coordinate extraction unit is used to determine n (n≥4) target points K1, K2, ..., Kn on the farmland boundary based on the extracted curve shape of the farmland boundary, and obtain the coordinates of the N target points in the Cartesian plane coordinate system; The farmland boundary fitting unit is used to fit the farmland boundary based on the coordinates of the acquired N target points in order to obtain the planned path boundary.

[0006] Furthermore, the process of fitting farmland boundaries based on the acquired coordinates of the N target points to obtain the planned path boundaries includes: Connect two adjacent target points Ki and Ki+1 on the farmland boundary with a straight line segment; Iterate through all the turning points on the farmland boundary line between target point Ki and target point Ki+1, and calculate the distance d between each turning point and the straight line segment connecting target point Ki and target point Ki+1. Select the point M that is farthest from the line segment as the current maximum distance point, and record the distance between the point M and the line segment from the target point Ki to the target point Ki+1 as dmax; Compare dmax with a pre-set threshold distance εd. If dmax < εd, ignore all turning points between target point Ki and target point Ki+1, and use the start and end points of the straight line segment as the simplified boundary. If dmax ≥ εd, retain the turning point M that is farthest from the straight line, and divide the curve into two sub-curves to obtain two straight line segments: the line segment from target point Ki to turning point M and the line segment from turning point M to target point Ki+1. Repeat the above steps for each pair of adjacent target points, and recursively process them until all line segments satisfy the threshold condition dmax < εd, so as to obtain the initial planned path boundary. The obtained planned path boundary is equidistantly shrunk to obtain the planned path boundary.

[0007] Furthermore, the driving path planning module includes a turning area width planning unit and a work path planning unit; The turning area width planning unit is used to calculate the optimal turning area width based on the turning radius of the agricultural machinery, the row spacing, and the obtained planned path boundary, using a genetic method. The operation path planning unit is used to plan the global planning path for farmland.

[0008] Furthermore, the calculation of the optimal turning area width using a genetic method based on the turning radius of the agricultural machinery, the row spacing, and the obtained planned path boundary includes: Determine the coordinates of each turning point in the planned path boundary in the Cartesian plane coordinate system, as well as the turning radius of the agricultural machinery; Initialize the decision variable parameters, population size, encoding method, and maximum number of generations for the genetic algorithm; A turning width model is constructed, and the working path direction is obtained by iterating the turning width model through an initialized genetic algorithm; Calculate the angle between the operation path direction and each boundary line; Calculate the optimal turning area width for each boundary line based on the included angle and turning radius.

[0009] Furthermore, the global planning path for the planned farmland includes: Horizontal scan lines are drawn on the obtained planned path boundary, and the intersection points of each horizontal scan line and the planned path boundary are calculated; Based on the obtained boundary intersections, determine the coordinates of the intersections and check if there are any working boundaries in the edge table corresponding to the current scan line. If so, transfer all these working boundaries to the active edge table and sort them by X coordinate of the scan line. In the active edge table, if the sequentially paired job boundaries are completely inside the planned path boundaries, they are considered valid fill segments for constructing job paths. After processing the current scan line, update the X coordinate of the scan line and increase the value of the working width d, that is, execute X=X+d to move to the next scan line; Based on the maximum value of the boundary on the Y-axis, remove the working boundaries from the active edge table that no longer intersect with the next scan line; For each remaining scan line in the active edge table, update its X coordinate value to reflect the new position of the intersection of the work boundary and the scan line after a horizontal movement through the work width d; Repeat the above steps until all job boundaries in the active edge table are processed and deleted, and the straight job paths within the entire planned path boundary area are filled.

[0010] Furthermore, the automatic control module includes an agricultural machinery attitude data acquisition module, a central control unit, an intelligent detection module, and an execution module; The agricultural machinery attitude data acquisition module is used to acquire agricultural machinery attitude data; The intelligent sensing module is used to sense the real-time working status of agricultural machinery; The central control unit is used to make control decisions based on the read agricultural machinery attitude data and the pre-planned agricultural machinery travel path, so as to control the execution module to control the agricultural machinery. At the same time, based on the perceived real-time working status of the agricultural machinery, it calculates the lateral error and heading error between the actual movement of the agricultural machinery and the pre-planned agricultural machinery travel path, so as to send corresponding control commands to the execution module to ensure that the agricultural machinery moves forward according to the pre-planned agricultural machinery travel path.

[0011] The beneficial effects of this invention are as follows: This invention's farmland boundary planning module determines multiple target points based on the curve shape of the farmland boundary and fits the coordinates of N target points to the farmland boundary to obtain the planned path boundary. This effectively reduces the number of original data points while maintaining good boundary shape accuracy. Furthermore, the fitted boundary better represents the actual plot boundary, and through a shrinking operation, all boundary lines are located inside the original sampling points, ensuring that the planned trajectory does not exceed the boundary, thus providing reliability and safety for subsequent automated agricultural machinery operation. Attached Figure Description

[0012] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0013] Figure 1 This is a system framework diagram of the agricultural machinery automatic driving system of the present invention; Figure 2 This is a schematic diagram of boundary curve fitting according to an embodiment of the present invention; Figure 3 This is a schematic diagram of boundary indentation according to an embodiment of the present invention; Figure 4 This is a schematic diagram of farmland according to an embodiment of the present invention; Figure 5 This is a convergence curve of a genetic algorithm according to an embodiment of the present invention. Detailed Implementation

[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0015] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, each technical and scientific term used in these embodiments has the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0016] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0017] In this invention, terms such as "upper," "lower," "left," "right," "front," "back," "vertical," "horizontal," "side," and "bottom" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used only to facilitate the description of the structural relationships of the various components or elements of this invention and do not specifically refer to any component or element in this invention. They should not be construed as limiting the invention.

[0018] In this invention, terms such as "fixed connection," "connected," and "linked" should be interpreted broadly, indicating a fixed connection, an integral connection, or a detachable connection; a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can determine the specific meaning of these terms in this invention based on the specific circumstances, and they should not be construed as limitations on the invention.

[0019] Example 1: like Figure 1 As shown, this embodiment provides an agricultural machinery automatic driving system, including: a human-machine interaction module, used to set system parameters, display the planned path, and display the real-time operating parameters of the system; (1) Data acquisition module, used to collect farmland data and construct a static farmland map based on the collected farmland data, wherein the farmland data includes farmland geographic data; (2) Path planning module, used to pre-plan the driving path of agricultural machinery based on the constructed static farmland map; The route planning module includes: a farmland boundary planning module and a driving route planning module. The farmland boundary planning module includes: a farmland boundary extraction unit, a coordinate transformation unit, a target point coordinate extraction unit, and a farmland boundary fitting unit; The farmland boundary extraction unit is used to extract farmland boundaries based on the constructed static farmland map. Since the farmland boundaries in the map are drawn according to the actual terrain, the farmland boundaries often present some curves. Due to the different curvature angles of the curves, it is necessary to process the different curvatures to obtain a boundary area suitable for the operation of agricultural machinery in order to ensure the safety of agricultural machinery and facilitate its smooth operation.

[0020] The coordinate transformation unit is used to convert latitude and longitude coordinates in a static farmland map into XY coordinates in a Cartesian plane coordinate system using coordinate transformation and projection functions and Gauss-Kruger projection. The target point coordinate extraction unit is used to determine n (n≥4) target points K1, K2, ..., Kn on the farmland boundary based on the extracted curve shape and actual needs, and to obtain the coordinates of these N target points in the Cartesian plane coordinate system. The number of target points is determined by the shape of the farmland boundary; if the farmland boundary is irregular, more target points may be determined, while if the farmland boundary is regular, fewer target points will be determined.

[0021] The data acquisition module can acquire high-resolution maps using methods such as satellite and drone aerial photography; It should be noted that all coordinates mentioned below are in the Cartesian plane coordinate system.

[0022] The farmland boundary fitting unit is used to fit the farmland boundary based on the coordinates of the acquired N target points in order to obtain the planned path boundary. like Figure 2 As shown, the specific steps include: A1: Connect two adjacent target points Ki and Ki+1 (where i≥1) on the farmland boundary with a straight line segment; A2: Traverse all turning points on the farmland boundary line between target point Ki and target point Ki+1, and calculate the distance from each turning point to the straight line segment connecting target point Ki and target point Ki+1. A3: Select the point M that is farthest from the line segment as the current maximum distance point, and record the distance between the line segment from it to the target point Ki and the target point Ki+1 as dmax; A4: Compare dmax with a pre-set threshold distance εd. If dmax < εd, all inflection points between target point Ki and target point Ki+1 can be ignored, and the straight line segment between target point Ki and target point Ki+1 is used as the boundary. If dmax ≥ εd, the inflection point M furthest from the straight line needs to be retained, and the curve is divided into two sub-curves: the straight line segment between target point Ki and inflection point M, and the straight line segment between inflection point M and target point Ki+1, which serve as the boundary. (e.g.) Figure 2 (As shown) A5: Repeat steps A1 to A4 for each pair of adjacent target points, and recursively process them until all line segments meet the threshold condition dmax < εd, so as to obtain the initial planned path boundary. A6: Perform an equal-distance shrinkage operation on the obtained planned path boundary to obtain the final planned path boundary. The shrinkage distance can be determined based on the actual situation (e.g., ...). Figure 3 (As shown).

[0023] This embodiment effectively reduces the number of original data points while maintaining good boundary shape accuracy. This allows the fitted boundary to better represent the actual plot boundary, and the shrinking operation ensures that all boundary lines are located inside the original sampling points, guaranteeing that the planned trajectory will not cross the boundary, thus providing reliability and safety for subsequent agricultural machinery autopilot operation.

[0024] The driving path planning module includes a turning area width planning unit and a work path planning unit; The turning area width planning unit is used to calculate the optimal turning area width using a genetic method, based on the turning radius of the agricultural machinery (a known fixed parameter), the row spacing (a parameter pre-set according to actual needs), and the obtained planned path boundary.

[0025] Specifically, it includes the following steps: B1: Determine the coordinates of each turning point in the planned path boundary in the Cartesian plane coordinate system and the turning radius of the agricultural machinery; B2: Initialize the decision variable parameters of the genetic algorithm, population size, encoding method, and maximum number of generations; For example, the population size is set to 100, the maximum evolution is 50 generations, and binary encoding is used.

[0026] B3: Construct a turning width model; Specifically, the following steps are included: B3-1: Connect the turning points of the planned path boundary to obtain i-1 boundary lines, and represent the boundary lines as vectors: { , ... } B3-2: The turning radius of the agricultural machinery is r, the row spacing is ls, and the angle between the working path and the direction of each boundary line is represented by the set. ; B3-3: Calculate the sum of the turning boundary widths of all boundary lines; Calculate the turning boundary width of each boundary line using the following formula: ; Since most of them are polygons, the sum of the widths of the turning boundaries is denoted as S: ; B3-4: Based on the known conditions and the optimization objective, the optimal turning width model is established as follows: ; B4: The turning width model is iterated through the initialized genetic algorithm to obtain the direction of the operation path; Specifically, the initialized genetic algorithm searches for the minimum sum of the transformation boundary widths of all boundary lines and outputs the operation path direction when the sum of the transformation boundary widths of all boundary lines is minimized. The genetic algorithm is well-known to data professionals in this field, so it will not be elaborated upon here.

[0027] B5: Through vectors = (O, p) represents the direction of the operation path, where the coordinates of point O are the coordinates of the origin (0, 0); B6: Based on the operation path direction, calculate the angle between vector OP and each boundary line. ; B7: Based on the included angle Calculate the optimal turning area width for each boundary line using the turning radius r. .

[0028] This embodiment uses a pentagonal plot of land as an example to solve for the optimal working direction. For example, farmland... Figure 4 As shown in the diagram, there are three plots of land: Farm1 and Farm2 are irregular convex pentagonal plots, and Farm3 is a regular pentagonal plot. The purpose of this design is to compare it with the method of using the longest boundary as the optimal working direction, and to verify the superiority of the optimal direction selection. The turning radius of the agricultural machinery in this experiment is r = 2m. The optimal solution for the three farmlands is as follows: Figure 5 As shown in the three figures, it can be seen that after 50 generations of search, the optimal solutions were found for all three farmlands. Table 3-1 shows that Farm1 reached its optimal solution in the 18th generation of search, with the optimal working direction having an angle of 116.565 degrees with the coordinate system, and the boundary length of the turning area being 7.694 meters. Farm2 reached its optimal solution in the 27th generation of search, with the optimal working direction having an angle of 27.04 degrees with the coordinate system, and the boundary length of the turning area being 8.818 meters. The turning areas of the five boundaries met the turning requirements. Farm3, being a regular shape, reached its optimal solution in the 22nd generation, with its working direction consistent with the direction of the longest boundary, indicating that working along the longest side is the optimal working direction in a regular shape.

[0029] The operation path planning unit is used to plan the global planning path for farmland; Specifically, the following steps are included: C1: Perform a horizontal scan line on the obtained planned path boundary, and calculate the intersection point of each horizontal scan line with the planned path boundary. The boundary intersection points appear in pairs. C2: Based on the obtained boundary intersections, determine the coordinates of the intersections and check if there are any job boundaries in the edge table (ET) corresponding to the current scan line. If so, transfer all these job boundaries to the active edge table (AET) and sort them according to the X coordinate of the scan line.

[0030] C3: In AET, if sequentially paired job boundaries are completely inside the planned path boundaries, they are considered valid fill segments for constructing job paths; C4: After completing the processing of the current scan line, update the X coordinate of the scan line and increase the value of the working width d, that is, execute X=X+d to move to the next scan line.

[0031] C5: Based on the Ymax value, remove job boundaries from AET that no longer intersect with the next scan line; C6: For each remaining scan line in AET, update its X-coordinate value to reflect the new position of the intersection of the job boundary and the scan line after a horizontal shift through the job width d: C7: Repeat steps C2 to C6 until all job boundaries in the Active Edge Table (AET) have been processed and deleted, and the straight job paths within the entire planned path boundary area have been filled (e.g., ...). Figure 3 (As shown).

[0032] Among them, the edge table (ET) is a static data structure used to store the boundary information encountered for the first time for a given scan line

[65] . Taking a horizontal scan line as an example (i.e., the optimal working angle is 0°), each edge table node contains the following information: Ymax (the maximum value of the boundary on the Y-axis), dX (the difference between two adjacent scan lines in the X direction on the boundary; when the scan line interval is 1, this difference is equivalent to the reciprocal of the boundary slope), YminX (the Y coordinate at the endpoint with the smaller X coordinate), and next (a pointer to the next boundary). The process of constructing the edge table first sorts all boundaries according to the X coordinate of the right endpoint, and then sorts the boundaries with the same X coordinate in descending ascending order according to the Y coordinate of their lower endpoint; if the X coordinates are also the same, they are sorted in ascending order according to dX.

[0033] The Active Edge Table (AET) is a dynamic data structure used to track the interaction between the current scanline and the polygon boundary. Each node in the AET also contains four key pieces of information: (Ymax, dX, X, next). Here, the meanings of Ymax and X are the same as in the Edge Table (ET), the difference being the definition of X: in the AET, X is no longer the X-coordinate of the breakpoint at the boundary, but rather the X-coordinate of the point where the current scanline intersects the boundary. The Active Edge Table (AET) is built upon the Edge Table (ET) and is used to update and manage the boundaries intersected by the current scanline in real time. By extracting intersection point information from the AET, pairs of intersection points can be generated, and these pairs define the endpoints of the line segments used for filling.

[0034] (3) Automatic control module, used to automatically control the agricultural machinery to work according to the pre-planned agricultural machinery travel path; The automatic control module includes an agricultural machinery attitude data acquisition module, a central control unit, an intelligent detection module, and an execution module; the agricultural machinery attitude data acquisition module, the intelligent detection module, and the execution module are all connected to the central control unit via serial communication.

[0035] The agricultural machinery attitude data acquisition module is used to acquire agricultural machinery attitude data, which includes position coordinates, heading, and speed.

[0036] Specifically, the agricultural machinery attitude data acquisition module includes: a fixed reference station, a cloud platform, and a vehicle-mounted mobile station; The vehicle-mounted mobile station includes a high-precision positioning module and a vehicle-mounted Beidou antenna installed on the agricultural machinery. The mobile station receives the location information of the agricultural machinery obtained through satellite, and performs differential positioning with the location information obtained by the fixed reference station to obtain the attitude data of the agricultural machinery.

[0037] The intelligent sensing module is used to sense the real-time working status of agricultural machinery.

[0038] The intelligent sensing module includes: front wheel steering sensor and navigation.

[0039] The central control unit also communicates with the path planning module, which is used to plan the path based on the agricultural machinery's attitude data and pre-defined parameters. The central control unit communicates with the agricultural machinery attitude data acquisition module via a serial port to read the agricultural machinery attitude data; The central control unit is used to make control decisions based on the read agricultural machinery attitude data and the pre-planned agricultural machinery travel path, so as to control the execution module to control the agricultural machinery. At the same time, based on the perceived real-time working status of the agricultural machinery, it calculates the lateral error and heading error between the actual movement of the agricultural machinery and the pre-planned agricultural machinery travel path, so as to send corresponding control commands to the execution module to ensure that the agricultural machinery moves forward according to the pre-planned agricultural machinery travel path.

[0040] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0041] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or units may be electrical, mechanical, or other forms.

[0042] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0043] Additionally, it should be noted that the flowcharts in the accompanying drawings illustrate methods according to embodiments of this disclosure. In the descriptions corresponding to the flowcharts or block diagrams in the drawings, the operations or steps corresponding to different blocks may occur in a different order than disclosed in the description; sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps may actually be executed substantially in parallel, or sometimes in reverse order, depending on the function involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.

[0044] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An automatic driving system for agricultural machinery, characterized in that, include: The data acquisition module is used to collect farmland data and build a static farmland map based on the collected farmland data. The path planning module is used to pre-plan the driving path of agricultural machinery based on the constructed static farmland map; The automatic control module is used to automatically control agricultural machinery to work according to a pre-planned agricultural machinery travel path; The route planning module includes: a farmland boundary planning module and a driving route planning module; The path boundary planning module is used to plan the boundaries of agricultural machinery operations; The farmland boundary planning module includes: a farmland boundary extraction unit, a coordinate transformation unit, a target point coordinate extraction unit, and a farmland boundary fitting unit; The farmland boundary extraction unit is used to extract farmland boundaries from the constructed static farmland map. The coordinate transformation unit is used to convert latitude and longitude coordinates in a static farmland map into XY coordinates in a Cartesian plane coordinate system using coordinate transformation and projection functions and Gauss-Kruger projection. The target point coordinate extraction unit is used to determine n (n≥4) target points K1, K2, ..., Kn on the farmland boundary based on the extracted curve shape of the farmland boundary, and obtain the coordinates of the N target points in the Cartesian plane coordinate system; The farmland boundary fitting unit is used to fit the farmland boundary based on the coordinates of the acquired N target points in order to obtain the planned path boundary.

2. The agricultural machinery automatic driving system according to claim 1, characterized in that, The process of fitting farmland boundaries based on the coordinates of the acquired N target points to obtain the planned path boundaries includes: Connect two adjacent target points Ki and Ki+1 on the farmland boundary with a straight line segment; Iterate through all the turning points on the farmland boundary line between target point Ki and target point Ki+1, and calculate the distance d between each turning point and the straight line segment connecting target point Ki and target point Ki+1. Select the point M that is farthest from the line segment as the current maximum distance point, and record the distance between the point M and the line segment from the target point Ki to the target point Ki+1 as dmax; Compare dmax with a pre-set threshold distance εd. If dmax < εd, ignore all turning points between target point Ki and target point Ki+1, and use the start and end points of the straight line segment as the simplified boundary. If dmax ≥ εd, retain the turning point M that is farthest from the straight line, and divide the curve into two sub-curves to obtain two straight line segments: the line segment from target point Ki to turning point M and the line segment from turning point M to target point Ki+1. Repeat the above steps for each pair of adjacent target points, and recursively process them until all line segments satisfy the threshold condition dmax < εd, so as to obtain the initial planned path boundary. The obtained planned path boundary is equidistantly shrunk to obtain the planned path boundary.

3. The agricultural machinery automatic driving system according to claim 1, characterized in that, The driving path planning module includes a turning area width planning unit and a work path planning unit; The turning area width planning unit is used to calculate the optimal turning area width based on the turning radius of the agricultural machinery, the row spacing, and the obtained planned path boundary, using a genetic method. The operation path planning unit is used to plan the global planning path for farmland.

4. The agricultural machinery automatic driving system according to claim 3, characterized in that, The calculation of the optimal turning area width using a genetic method, based on the turning radius of the agricultural machinery, the row spacing, and the obtained planned path boundary, includes: Determine the coordinates of each turning point in the planned path boundary in the Cartesian plane coordinate system, as well as the turning radius of the agricultural machinery; Initialize the decision variable parameters, population size, encoding method, and maximum number of generations for the genetic algorithm; A turning width model is constructed, and the working path direction is obtained by iterating the turning width model through an initialized genetic algorithm; Calculate the angle between the operation path direction and each boundary line; Calculate the optimal turning area width for each boundary line based on the included angle and turning radius.

5. The agricultural machinery automatic driving system according to claim 3, characterized in that, The global planning path for the planned farmland includes: Horizontal scan lines are drawn on the obtained planned path boundary, and the intersection points of each horizontal scan line and the planned path boundary are calculated; Based on the obtained boundary intersections, determine the coordinates of the intersections and check if there are any working boundaries in the edge table corresponding to the current scan line. If so, transfer all these working boundaries to the active edge table and sort them by X coordinate of the scan line. In the active edge table, if the sequentially paired job boundaries are completely inside the planned path boundaries, they are considered valid fill segments for constructing job paths. After processing the current scan line, update the X coordinate of the scan line and increase the value of the working width d, that is, execute X=X+d to move to the next scan line; Based on the maximum value of the boundary on the Y-axis, remove the working boundaries from the active edge table that no longer intersect with the next scan line; For each remaining scan line in the active edge table, update its X coordinate value to reflect the new position of the intersection of the work boundary and the scan line after a horizontal movement through the work width d; Repeat the above steps until all job boundaries in the active edge table are processed and deleted, and the straight job paths within the entire planned path boundary area are filled.

6. The agricultural machinery automatic driving system according to claim 1, characterized in that, The automatic control module includes an agricultural machinery attitude data acquisition module, a central control unit, an intelligent detection module, and an execution module; The agricultural machinery attitude data acquisition module is used to acquire agricultural machinery attitude data; The intelligent sensing module is used to sense the real-time working status of agricultural machinery; The central control unit is used to make control decisions based on the read agricultural machinery attitude data and the pre-planned agricultural machinery travel path, so as to control the execution module to control the agricultural machinery. At the same time, based on the perceived real-time working status of the agricultural machinery, it calculates the lateral error and heading error between the actual movement of the agricultural machinery and the pre-planned agricultural machinery travel path, so as to send corresponding control commands to the execution module to ensure that the agricultural machinery moves forward according to the pre-planned agricultural machinery travel path.