Precise identification and self-adaptive tracking control method and system for operation row of rice transplanter
By improving the YOLOv8n model and the feedback linearized fuzzy prediction function control algorithm, the accuracy and robustness issues of small target detection and path tracking in complex paddy field environments of rice transplanters were solved, achieving high-precision autonomous navigation and operational stability, and improving the uniformity of operation and land utilization of rice transplanters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU UNIV
- Filing Date
- 2025-12-02
- Publication Date
- 2026-04-24
AI Technical Summary
Existing rice transplanters suffer from insufficient performance in detecting small and dense targets, inadequate feature extraction, and poor accuracy and robustness in path tracking control in complex paddy field environments. In particular, they struggle to achieve high-precision autonomous navigation and operational stability in complex road conditions such as muddy and slippery conditions.
An improved YOLOv8n target detection model is adopted. By adding a P2 small target detection layer, an RFAConv module, and a Focal Modulation module, the accuracy of seedling detection is improved. Combined with feedback linearization and fuzzy prediction function control algorithms, the weighting coefficients are dynamically adjusted to achieve high-precision path tracking in complex paddy field environments.
It significantly improves the accuracy and robustness of seedling detection, reduces false detection and false negative rates, enhances the continuity and accuracy of path planning, improves the operational accuracy and stability of rice transplanters in complex paddy field environments, and reduces seedling and resource losses.
Smart Images

Figure CN121921643A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural machinery technology, specifically relating to a precise identification and adaptive tracking control technology for rice transplanter rows. In particular, it relates to a machine vision-based seedling row identification algorithm and a path tracking method based on feedback linearization fuzzy prediction function control (PFC), which is used to improve the autonomous navigation accuracy and operational stability of rice transplanters in complex paddy field environments. Background Technology
[0002] With the development of precision agriculture, achieving autonomous navigation and precise operation of rice transplanters has become crucial for the intelligent upgrading of agricultural equipment. Currently, achieving this goal mainly relies on two technical approaches: one is combined navigation based on global satellite navigation systems (such as RTK-GPS and BeiDou) and inertial measurement units (IMU); the other is environmental perception and path tracking technology based on machine vision.
[0003] 1. Current Status and Limitations of Vision-Based Job Row Recognition Technology Visual navigation has become a research hotspot due to its rich information content and low cost. Its core lies in real-time detection of seedling rows and extraction of navigation baselines using image processing algorithms. Currently, deep learning object detection algorithms, represented by the YOLO series, have been applied in agricultural scenarios. For example, some studies use the YOLOv5s model for crop detection, or utilize improved YOLOv8s networks to develop extraction algorithms for corn spraying robots.
[0004] However, when these methods are directly applied to rice transplanting, significant technical shortcomings are exposed: Insufficient performance in detecting small and dense targets: Rice seedlings are small in size and densely distributed in the field during the early stages of growth, resulting in a large amount of occlusion and overlap. Existing lightweight models such as YOLOv8n, in pursuit of speed, have network structures (such as only having P3, P4, and P5 detection layers) that are weak in extracting features from small targets. This leads to high false negative and false positive rates for seedlings in complex paddy field environments, resulting in poor robustness.
[0005] Insufficient feature extraction and utilization: Standard convolutional modules have limited feature discrimination capabilities when faced with complex backgrounds in paddy fields (such as muddy water, reflections, and weeds). At the same time, modules such as SPPF in the network do not make high utilization of key features when fusing multi-scale features, resulting in uneven detection performance of the model for targets of different scales and densities, making it difficult to generate stable and continuous seedling row positioning points.
[0006] 2. Current Status and Shortcomings of Path Tracking Control Technology In terms of control, traditional path tracking methods such as pure tracking models and model predictive control (MPC) based on Taylor series expansion linearization have been extensively studied. For example, some techniques improve tracking performance by adjusting the forward look distance in real time, or use a hybrid DDPG+MPC framework for compensatory control.
[0007] However, these methods have inherent limitations when dealing with the special working environment of paddy fields: Model linearization error: The kinematic model of a rice transplanter is inherently nonlinear. Traditional linearization methods based on Taylor expansion and small-angle assumptions introduce model errors. When uneven terrain, muddy conditions, or slippery conditions cause drastic changes in the vehicle's dynamic characteristics, these errors are amplified, severely reducing control accuracy.
[0008] Poor environmental adaptability: Traditional predictive function control (PFC) often uses global basis functions such as step and ramp functions, which have fixed approximation capabilities and make it difficult to balance accuracy and efficiency across the entire time domain of control. At the same time, the controller parameters (such as the weight matrix) are usually fixed and cannot be adaptively adjusted according to changes in operating speed, path curvature, and ground adhesion conditions, resulting in insufficient tracking robustness in complex paddy field environments and a tendency to produce large lateral and heading deviations. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention proposes a method and system for precise identification and adaptive tracking control of rice transplanter work rows. In the machine vision algorithm for identifying rice work rows, machine vision is used to accurately identify the crop, and the path of the rice transplanter during operation is planned by detecting the seedling row positioning points. In the vehicle control section, a fuzzy prediction function control algorithm based on feedback linearization is adopted. According to the model prediction function control, the navigation points extracted after visual recognition processing and the navigation path after world coordinate system transformation are linearized using a state feedback nonlinear model. The control quantity is designed using Morlet wavelet basis functions, and the weighting coefficients are dynamically adjusted by the fuzzy controller. Combined with constraints, high-precision path tracking is achieved in complex paddy field environments.
[0010] The technical solution of this invention is: a method for precise identification and adaptive tracking control of rice transplanter rows, comprising the following steps: Visual recognition steps: Acquire images of the paddy field environment, and use the improved YOLOv8n target detection model to identify rice seedlings in the images. This includes adding a P2 small target detection layer on the basis of the P3, P4, and P5 detection layers of the original YOLOv8n network, replacing the standard convolution in the Bottleneck of the C2f module with RFAConv to form the C2f-RFAConv module, and replacing the SPPF module with the Focal Modulation module. Navigation line extraction steps: Calculate the center point of each identified seedling bounding box as a candidate positioning point, perform clustering and merging processing on the candidate positioning points to generate representative positioning points for each row of seedlings, perform positioning point interpolation on the missed areas, and connect all positioning points to extract the seedling row navigation line. Coordinate transformation step: Using a camera calibration model based on a BP neural network, the seedling row navigation line is transformed from the image coordinate system to the world coordinate system; Path tracking control steps: Based on the navigation line in the world coordinate system, a control algorithm combining feedback linearization and fuzzy predictive function control is used to calculate and output control quantities to drive the rice transplanter to perform path tracking. The control algorithm precisely linearizes the nonlinear kinematic model of the rice transplanter into a linear system through state feedback, and uses predictive function control to optimize the solution of the virtual control quantity. Simultaneously, a fuzzy controller dynamically adjusts the weighting coefficients in the predictive function control performance index function based on the lateral error, the rate of change of the lateral error, and the curvature of the reference path.
[0011] Furthermore, the Focal Modulation module implements feature modulation through the following process: Perform linear projection on the input feature map; Use multi-layer depthwise convolution to extract contextual information layer by layer; Global average pooling is applied to the last layer of feature maps to capture the global context; By using gated aggregation, contextual features at different granularities are condensed into a single feature vector to obtain a modulator; The modulator is element-wise multiplied with the query vector output by the query mapping function to output the modulated feature.
[0012] Furthermore, the clustering and merging process for candidate location points specifically includes: Grouping of row-aligned positioning points: Arrange the positioning points in ascending order of their horizontal coordinates, calculate the average distance between adjacent points, and group the points into a set of row-aligned seedling positioning points based on the average distance. Calculate row positioning points: Calculate the average coordinates of each point set, and use them as the positioning points of the seedlings in that row; Detecting missed points: Calculate the average distance between adjacent row positioning points; if the distance is too large, insert a missed point. Stitch together a larger image: Based on the sub-image index, stitch together the positioning points of the sub-images into a larger image; Adjust heading: Connect the positioning points on the large map, calculate the slope of adjacent line segments and convert it into angles. If the difference between adjacent angles exceeds the set value, adjust the heading.
[0013] Furthermore, the coordinate transformation steps are as follows: The overall design of the neural network is a 5-layer network structure. The input is the world coordinate system of the feature points, and the output is the pixel coordinates of the feature points. The activation functions of the first two layers of the three hidden layers are linear activation functions, and the activation function of the third layer is an S-type activation function. By using the camera calibration method under the BP neural network, the parameters are imported into the camera, which can complete the transformation between the world coordinate system and the camera image coordinate system. Thus, the planned navigation line path is sent to the control mechanism for path tracking through the protocol.
[0014] Furthermore, the control algorithm combining feedback linearization and fuzzy predictive function control specifically involves: the feedback linearization controller, based on the nonlinear kinematic model of the rice transplanter, employing a state feedback method, and adjusting the control algorithm according to the lateral error... Heading error and virtual control quantity Design control quantity This allows for the linearization of the nonlinear kinematic model of the rice transplanter, enabling the feedback linearization controller and the rice transplanter to form a linear system. The fuzzy predictive function controller uses fuzzy logic to dynamically adjust the weighting coefficients in the performance index function, and adjusts the weighting coefficients based on the lateral error. and heading error The virtual control quantity is obtained by optimizing the performance index function using the predictive function control method. By controlling the newly formed linear system, the path tracking control of the rice transplanter can be indirectly achieved.
[0015] Furthermore, the design of the fuzzy predictive function controller consists of two parts: a predictive function controller and a fuzzy controller. The predictive function controller uses predictive function control with Morlet wavelet function as the basis function to optimize the solution of virtual control quantity. The fuzzy controller uses lateral error, lateral error rate of change and relative curvature of the reference path as input variables, and uses the lateral error weighting coefficient and lateral error rate of change weighting coefficient in the predictive function control performance index function as output variables.
[0016] A system for implementing the above method according to the present invention includes: The image acquisition module is used to acquire images of the paddy field environment; Data processing and control unit, configured for: The improved YOLOv8n target detection model is executed to identify rice seedlings; Perform the navigation line extraction step and coordinate transformation step to generate a navigation path in the world coordinate system; Perform the path tracking control steps and calculate the control quantity; An actuator is used to receive the control quantity and drive the steering system of the rice transplanter to achieve path tracking.
[0017] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method.
[0018] This invention achieves significant beneficial effects through the following technological innovations: By improving the YOLOv8n network, adding a P2 small target detection layer, reconstructing the C2f module using RFAConv, and replacing the SPPF module with a Focal Modulation module, the detection accuracy and robustness of seedlings in dense and small-sized scenarios were significantly improved, while reducing false positives and false negatives. Furthermore, by using seedling row location point clustering and navigation line extraction methods, missed detection points were effectively compensated for, enhancing the continuity and accuracy of path planning.
[0019] Feedback linearization was employed to process the nonlinear kinematic model of the rice transplanter, avoiding Taylor expansion linearization errors and improving model accuracy. By combining fuzzy predictive function control (PFC) with Morlet wavelet basis functions, multi-scale path approximation and dynamic parameter adjustment were achieved, enhancing the system's adaptability to changes in operating speed and path curvature. Real-time adjustment of weighting coefficients by the fuzzy controller enhanced the system's anti-interference capability and robustness, stabilizing lateral and heading errors within the centimeter range.
[0020] This invention enables high-precision row identification and path tracking for rice transplanters in complex paddy field environments, improving transplanting uniformity, straight-line accuracy, and land utilization. It also reduces seedling and resource losses, providing key technical support for promoting the construction of a fully automated and precision agriculture technology system for rice cultivation. Attached Figure Description
[0021] The following figures are schematic diagrams illustrating embodiments of the present invention, used to further explain the technical solutions: Figure 1 : Schematic diagram of precision planting operation of rice transplanter; Figure 2 YOLOv8 network structure diagram; Figure 3 The comparison diagrams of the YOLOv8n network structure before and after the improvement show the structural changes after adding the P2 detection layer, the C2f-RFAConv module, and the Focal Modulation module; (a) YOLOv8n network structure; (b) Improved YOLOv8n network structure; Figure 4 The improved YOLOv8n algorithm's detection layer structure diagram illustrates multi-scale feature fusion and detection head design. Figure 5 : RFAConv structure; Figure 6RFA_Bottleneck; Figure 7 : Optimize and reconstruct the C2f network structure; Figure 8 : Positioning points for rice seedling rows; Figure 9 Sub-position index; Figure 10 Image showing the results of seedling row positioning points and flight path extraction, including the positioning point clustering and navigation line generation process. (a) Seedling row positioning points; (b) Seedling row flight path; Figure 11 : BP neural network structure model; Figure 12 A schematic diagram of the navigation line coordinate transformation process, illustrating the transformation method from the image coordinate system to the world coordinate system based on a BP neural network; Figure 13 The diagram illustrates the path tracking control principle of a rice transplanter, describing the kinematic model and control framework in the Frenet coordinate system. Figure 14 Control algorithm implementation steps; Figure 15 The diagram shows the kinematic model of a rice transplanter, illustrating a simplified two-wheeled vehicle model and the definition of state variables.
[0022] Figure 16 The diagram illustrates the design framework of the model predictive controller, showcasing the integrated structure of PFC and fuzzy controller. Detailed Implementation
[0023] This invention addresses the precise identification and adaptive tracking control of rice transplanter work rows. In the machine vision algorithm for identifying rice work rows, machine vision is used to accurately identify the crop, and the path of the rice transplanter during operation is planned by detecting the positioning points of the seedling rows. In the vehicle control section, a fuzzy prediction function control algorithm based on feedback linearization is employed. According to the model prediction function control, the navigation points extracted after visual recognition processing and the navigation path after world coordinate system transformation are linearized using a state feedback nonlinear model. The control quantity is designed with Morlet wavelet basis functions, and the weighting coefficients are dynamically adjusted by the fuzzy controller. Combined with constraints, high-precision path tracking is achieved in complex paddy field environments.
[0024] 1. Visual recognition steps: Collect images of the paddy field environment, and use the improved YOLOv8n target detection model to identify rice seedlings in the images. This includes adding a P2 small target detection layer on the basis of the original YOLOv8n network's P3, P4, and P5 detection layers, replacing the standard convolution in the Bottleneck of the C2f module with RFAConv to form the C2f-RFAConv module, and replacing the SPPF module with the Focal Modulation module.
[0025] Figure 1 This diagram illustrates the precise planting operation of a rice transplanter, showcasing the overall application scenario of row recognition and path tracking.
[0026] (1) A vision-based improved YOLOv8n seedling row recognition and navigation line extraction method Improved YOLOv8n algorithm for target detection of rice seedlings The YOLOv8 series models include 5 specifications: n / s / m / l / x (e.g., ... Figure 2 As shown in the diagram, with the expansion of model size, structural complexity increases exponentially. While this significantly improves target detection accuracy, it also leads to increasingly prominent problems such as longer training cycles, decreased storage efficiency, and reduced detection speed. Especially in mobile applications, the number of model parameters must be strictly controlled within deployment thresholds, while simultaneously meeting the frame rate requirements for real-time detection. YOLOv8n, as the smallest model in this series, possesses extremely fast inference speed and high detection accuracy. However, in complex paddy field scenarios, facing interference conditions such as densely distributed and overlapping seedling rows, it exhibits high false positive and false negative rates for seedling target identification, demonstrating poor robustness and detection accuracy, posing a significant challenge. Therefore, this invention selects YOLOv8n as the basic architecture and deeply optimizes the YOLOv8n algorithm for the characteristics of complex paddy field scenarios.
[0027] The original YOLOv8n network contains three detection layers, P3, P4, and P5, corresponding to the detection of small, medium, and large targets, respectively. To address the problem of densely packed, small-sized targets in complex scenes being difficult to identify, this invention adds a P2 small target detection head to improve the detection performance of small targets within the field of view, as well as targets of different scales and densities. The C2f module is reconstructed by combining the advantages of receptive field attention convolution to improve the model's detection performance. Finally, the SPPF module is replaced with a Focal Modulation module, effectively improving the utilization of target features and making the model's performance prediction more balanced when detecting targets of different sizes and densities. Figure 3 (b) shows the YOLOv8n network structure before and after the improvement.
[0028] To comprehensively utilize the advantages of both shallow and deep features, feature maps of different scales are obtained by fusing shallow and deep features. A small target detection layer (P2 detection layer) can be added to the YOLOv8n network to improve the detection capability for extremely small targets and the network's sensitivity to small targets, effectively enhancing the overall performance in detecting targets of different scales and densities. The improved YOLOv8 algorithm's detection layer structure is as follows: Figure 4 As shown.
[0029] This invention replaces the standard convolution in Bottleneck in C2f with RFAConv, and its structure is as follows: Figure 5 As shown. The standard convolution in the Bottleneck of C2f is replaced with RFAConv and named RFA-Bottleneck. Compared to the original Bottleneck, RFA-Bottleneck enhances the ability to perceive features at different scales. The structure of RFA-Bottleneck is as follows. Figure 6 As shown. Finally, Bottleneck in C2f is replaced with RFA-Bottleneck, resulting in C2f-RFAConv, which enhances the model's feature discrimination and descriptive ability, thus better handling complex and ever-changing scenarios. The optimized and reconstructed C2f network structure is as follows. Figure 7 As shown.
[0030] To address the problem of detecting small targets like rice seedlings in complex paddy field environments, this invention proposes replacing the SPPF module with a FocalModulation module to improve detection performance in such scenarios. The FocalModulation module, given an input feature map X, first projects it into a new feature space with a linear layer. , represented as: (1); in, It is the linear layer function expression given the input feature map X. This represents the image size and number of channels, where H is the image height, W is the image width, and C is the number of image channels. (Using...) Layer-by-layer depthwise convolution extracts contextual information and outputs... Represented as: (2); in, For the first The contextualization function for the layer: GeLU is the activation function; The DWConv deep convolution is used. Global average pooling is applied to the last feature map layer to capture global contextual information of the entire input, enhancing the completeness of the feature representation. Then, gated aggregation condenses the contextual features at different granularities into a single feature vector, i.e., the modulator. Specifically, linear layers are used to obtain spatially and level-aware weights G, and then element-wise multiplication is used to perform a weighted sum to obtain a single feature map of the same size as the input X. .
[0031] (3); (4); in, The functional expression for space- and level-aware weights. It is the first One channel of the layer. To model the relationship between different channels, another linear layer h(-) is used to obtain the modulator M, represented as: (5); The overall focus modulation, combining interactive and aggregation formulas, integrates local and global contextual information, enhancing the expressive power of features, and is expressed as: (6); in, For query mapping functions; This is an element-wise multiplication operator. The Focal Modulation module achieves efficient feature extraction and fusion through the above process, enhancing the model's context awareness and effectively improving its performance during detection.
[0032] 2. Navigation line extraction steps: Calculate the center point of each identified seedling boundary box as a candidate positioning point, perform clustering and merging processing on the candidate positioning points to generate representative positioning points for each row of seedlings, perform positioning point interpolation for missed areas, and connect all positioning points to extract the seedling row navigation line.
[0033] Seedling flight path positioning point detection and navigation line extraction: The seedling row alignment detection uses the following formula to calculate the coordinates of the center point of each seedling frame, which serves as the candidate seedling row positioning point. , like Figure 8 As shown, the red dots are the location points of the candidate seedling rows.
[0034] (7); In the formula Represents the coordinates of the positioning point This represents the coordinates of the top left vertex of the seedling frame. The width and height of the seedling frame.
[0035] However, because multiple seedling frames were detected in a single row of seedlings, there were multiple location points on the seedling row, which needed to be clustered and merged. In addition, the complex field environment may lead to missed detection of seedling rows in the seedling detection results, resulting in missing location points in the missed areas, which would require supplementing the missing location point information.
[0036] Therefore, this step can be summarized as follows: Grouping of row-aligned positioning points: Arrange the positioning points in ascending order of their horizontal coordinates, calculate the average distance between adjacent points, and group the points into a set of row-aligned seedling positioning points based on the average distance. Calculate row positioning points: Calculate the average coordinates of each point set, and use them as the positioning points of the seedlings in that row; Detecting missed points: Calculate the average distance between adjacent row positioning points. If the distance is too large, insert a missed point (take the coordinates of the midpoint between adjacent points). Stitch together a larger image: Based on the sub-image index, stitch together the positioning points of the sub-images into a larger image; Adjust heading: Connect the positioning points on the large map, calculate the slope of adjacent line segments and convert it into angles. If the difference between adjacent angles exceeds the set value, adjust the heading.
[0037] The specific steps are as follows: ① Set the coordinates of the positioning point Sort the coordinates in ascending order of their x-coordinates and calculate the distance difference between adjacent coordinates. mean ,like ,but and Location points for seedlings in the same row are stored in the location point set. .
[0038] ② Determine each point individually and use equation (7) to calculate the set of each location point. Average coordinates of all points As the first Coordinates of the seedling row positioning points in the seedling area.
[0039] (8); In the formula, for The Middle coordinates of each positioning point for Total number of positioning points in the center.
[0040] ③ Calculate the distance difference between adjacent positioning points obtained in step ② and mean ,if If there is a missed detection between adjacent positioning feature points, the midpoint of the coordinates of the adjacent positioning feature points is taken as the coordinate value of the missed detection point.
[0041] ④According to Figure 9 The subgraph index shown is used to stitch the subgraph location points into a larger image. The location point detection results after stitching are shown in Figure (a).
[0042] ⑤ Connection Figure 10 (a) Locate the points and calculate the slope of the line segments between adjacent points. Use inverse trigonometric functions to convert the slopes into angles and calculate the angle difference between adjacent line segments. If the angle difference between adjacent segments is greater than the set standard value, it indicates that the heading has changed and the direction needs to be adjusted in time.
[0043] 3. Navigation line coordinate transformation method: Using a camera calibration model based on BP neural network, the seedling row navigation line is transformed from the image coordinate system to the world coordinate system.
[0044] Since each image uses a different coordinate system, multiple images cannot be fused. Therefore, to place the navigation feature points of multiple images under the same coordinate system, coordinate system transformation is required. Traditional methods, such as calculating camera intrinsic and extrinsic parameters after camera calibration to transform between camera coordinates and world coordinates, suffer from low accuracy due to significant system measurement errors. This invention proposes a BP neural network algorithm to improve upon traditional camera calibration, thereby establishing a coordinate system transformation model from image coordinates to world coordinates. The overall network structure is as follows: Figure 11 As shown.
[0045] The overall design of the neural network is a 5-layer network structure, with the input being the world coordinate system of the feature points. The output is the pixel coordinates of the feature points. The first two hidden layers use linear activation functions, while the third uses an sigmoid activation function. Because the connection between the first and second hidden layers differs from that of a typical backpropagation (BP) neural network, its iterative formula needs to be derived. The neural network can then be trained using the iterative formula for the weights.
[0046] Camera calibration using a backpropagation (BP) neural network method imports parameters into the camera, enabling the transformation between the world coordinate system and the camera image coordinate system. This allows the planned navigation path to be sent to the control mechanism via a protocol for path tracking. A schematic diagram illustrating the coordinate transformation process after extracting the navigation line is shown below. Figure 12 As shown.
[0047] 4. Path tracking control steps: Based on the navigation line in the world coordinate system, a control algorithm combining feedback linearization and fuzzy predictive function control is used to calculate and output the control quantity to drive the rice transplanter to perform path tracking. The control algorithm precisely linearizes the nonlinear kinematic model of the rice transplanter into a linear system through state feedback, and uses predictive function control with Morlet wavelet function as the basis function to optimize the solution of the virtual control quantity. Simultaneously, a fuzzy controller dynamically adjusts the weighting coefficients in the predictive function control performance index function based on the lateral error, the rate of change of the lateral error, and the curvature of the reference path.
[0048] Existing methods all employ real-time online adjustment of the forward sight distance to improve the control performance of rice transplanter path tracking systems. Essentially, these methods utilize pure tracking control based on geometric models to obtain the control quantity, which has limitations in improving operational accuracy. Therefore, this invention addresses the problem of insufficient path tracking control accuracy and robustness caused by complex road conditions such as unevenness, mud, and slippery surfaces, as well as unknown interference factors faced by rice transplanters in paddy fields. It proposes a new framework of "feedback linearization + fuzzy predictive function control."
[0049] First, feedback linearization is used instead of Taylor series expansion to process the kinematic model of the rice transplanter, and PFC is used to design a path tracking control law to effectively improve the control accuracy and real-time performance of the system. Then, fuzzy logic is used to tune the weighting coefficients in the performance index function online to improve the robustness of the system. The path tracking controller is designed as a fuzzy predictive function controller, and the feedback linearization controller is cascaded. The kinematic model of the rice transplanter is constructed in the Frenet coordinate system as follows: Figure 13 As shown.
[0050] Design of feedback linearization controller The feedback linearization controller, based on the nonlinear kinematic model of a rice transplanter, employs a state feedback method, taking into account the lateral error. Heading error and virtual control quantity Design control quantity This leads to the linearization of the nonlinear kinematic model of the rice transplanter, meaning that the feedback linearization controller and the rice transplanter constitute a linear system. The fuzzy predictive function controller, under the premise of selecting appropriate basis functions, uses fuzzy logic to dynamically adjust the weighting coefficients in the performance index function, and based on the lateral error... and heading error The virtual control quantity is obtained by optimizing the performance index function using the PFC method. By controlling the newly formed linear system, the path tracking control task of the rice transplanter can be indirectly completed, such as... Figure 14 As shown.
[0051] Considering the relatively low actual operating speed of the rice transplanter, and to simplify the model and facilitate controller design, the lateral slippage between the tires and the ground can be ignored, and the rice transplanter can be simplified as a two-wheeled vehicle for kinematic modeling.
[0052] according to Figure 15 Based on geometric relationships and kinematic laws, the lateral error of the rice transplanter in the Frenet coordinate system is derived. and heading error The state-space model for state variables is as follows: (9); In the formula, The lateral error increment of the rice transplanter, in meters; For a unit of time, ; The rotation angle of the front wheel of the rice transplanter, in rad; The speed of the rice transplanter ;l represents the wheelbase of the rice transplanter, in meters; Let the curvature of the reference path be at point A. θ is the heading angle of the rice transplanter in the Frenet coordinate system, i.e., the heading error, in rad.
[0053] The approximate linearization of the rice transplanter's kinematic model using Taylor series expansion and the small-angle assumption leads to linearization errors. State feedback can be used to precisely linearize the above equation, thus avoiding these errors and transforming the system into one controlled by virtual variables. For a linear system with input, its state-space model is: (10); In the formula .
[0054] Thus, by using the feedback linearization method, the path tracking problem of the rice transplanter has been transformed from a nonlinear system (9) control problem into a linear system (10) control problem.
[0055] Design of fuzzy prediction function controller like Figure 16 The design of the fuzzy prediction function controller consists of two parts: the prediction function controller and the fuzzy controller.
[0056] PFC (Programmable Controller) is a computer-based optimization control algorithm that uses control laws to obtain virtual control variables. The prediction model (3) needs to be transformed into a discrete form, i.e.: (11) In the formula , It is the identity matrix. The sampling period .
[0057] make To predict the time domain, To control the time domain, and ≤ At any given time Both can be used to predict future moments using equation (11). System status And calculate the virtual control quantity of the system within the control time domain. Thus, the predicted system state can be represented in matrix form as follows: (12) , , , .
[0058] To ensure the rice transplanter can quickly and smoothly track the reference path and minimize the virtual control input, the performance index function is selected as follows: (1); In the formula To output the weighted matrix, The weighting coefficient for the lateral error. The weighting coefficient for the rate of change of the lateral error; To control the weighting coefficients.
[0059] In path tracking control, the accuracy of approximating the reference path typically decreases over time. Traditional predictive function control (PFC) often employs global basis functions such as step and ramp functions, making it difficult to dynamically adjust the approximation accuracy according to the control time. In contrast, wavelet functions, with their compact support properties and multi-scale analysis capabilities, can achieve high-accuracy approximation using fine-scale wavelets in the early stages of control, while reducing computational complexity in the later stages using coarse-scale wavelets. This invention selects the Morlet wavelet as the basis function because of its prominent localization characteristics in the time-frequency domain and its ability to effectively support multi-scale analysis, thus overcoming the limitations of global basis functions. The analytical expression of the Morlet wavelet function is: (13) Based on equation (13), different Morlet wavelet basis functions can be obtained through translation and scaling transformations, namely: (14); In the formula For the first basis functions, For the first The scaling factor of each basis function For the first The translation factors of the basis functions For the first The normalization constants of the basis functions.
[0060] Based on the basic principles of PFC, the virtual control quantity Represented as several Morlet wavelet functions A linear combination of, i.e.: (15); In the formula, N is the number of basis functions. Let be the linear combination coefficients at the current time k. The virtual control quantity sequence is obtained from equation (15). for: (16); In the formula, (17); (18); Substituting (18) into (14), we get: (19); Further optimization of equation (19) yields the following result: (20); In the formula Substituting equation (10) into equation (8), and considering that at any given time only the sequence of virtual control quantities exists... The first element Applying this to the system, we obtain: (twenty one); In the formula Substituting equation (10) into equation (5) yields the control quantity under unconstrained conditions. In practical applications, considering the rice transplanter's steering capability and driving safety, the actual control parameters need to be adjusted. and control increment Setting constraints. PFC typically uses a heuristic approach for constraint processing, that is, calculating according to the above formula to finally obtain the control variable. .
[0061] (twenty two); In the formula This represents the control increment under unconstrained conditions.
[0062] (twenty three); In the formula , Control Quantity Minimum and maximum values: , Control increments respectively The minimum and maximum values.
[0063] (twenty four); Within each control cycle, repeat the above process to calculate the control quantity. , and according to By changing the size of the front wheel angle, the rice transplanter can be controlled to achieve path tracking.
[0064] Meanwhile, considering that a fixed output weighting matrix is difficult to adapt to changes in the rice transplanter's operating speed and the curvature of the reference path, and that the rate of change of lateral error is an indirect reflection of the rice transplanter's operating speed, this invention uses lateral error... Horizontal error change rate The relative curvature of the reference path; (25); In the formula This represents the maximum curvature corresponding to the minimum turning radius of the rice transplanter. .
[0065] As input variables, the horizontal error weighting coefficient Weighted coefficient with the rate of change of lateral error As an output variable, a fuzzy controller is designed to improve the robustness of the rice transplanter path tracking system control performance to changes in operating speed and reference path curvature, thereby enabling path tracking control of the rice seedling transplanter.
[0066] This invention enables high-precision row identification and path tracking for rice transplanters in complex paddy field environments, improving transplanting uniformity, straight-line accuracy, and land utilization. It also reduces seedling and resource losses, providing key technical support for promoting the construction of a fully automated and precision agriculture technology system for rice cultivation.
Claims
1. A method for precise identification and adaptive tracking control of rice transplanter rows, characterized in that, Includes the following steps: Visual recognition steps: Acquire images of the paddy field environment, and use the improved YOLOv8n target detection model to identify rice seedlings in the images. This includes adding a P2 small target detection layer on the basis of the P3, P4, and P5 detection layers of the original YOLOv8n network, replacing the standard convolution in the Bottleneck of the C2f module with RFAConv to form the C2f-RFAConv module, and replacing the SPPF module with the Focal Modulation module. Navigation line extraction steps: Calculate the center point of each identified seedling bounding box as a candidate positioning point, perform clustering and merging processing on the candidate positioning points to generate representative positioning points for each row of seedlings, perform positioning point interpolation on the missed areas, and connect all positioning points to extract the seedling row navigation line. Coordinate transformation step: Using a camera calibration model based on a BP neural network, the seedling row navigation line is transformed from the image coordinate system to the world coordinate system; Path tracking control steps: Based on the navigation line in the world coordinate system, a control algorithm combining feedback linearization and fuzzy predictive function control is used to calculate and output control quantities to drive the rice transplanter to perform path tracking. The control algorithm precisely linearizes the nonlinear kinematic model of the rice transplanter into a linear system through state feedback, and uses predictive function control to optimize the solution of the virtual control quantity. Simultaneously, a fuzzy controller dynamically adjusts the weighting coefficients in the predictive function control performance index function based on the lateral error, the rate of change of the lateral error, and the curvature of the reference path.
2. The method according to claim 1, characterized in that, The Focal Modulation module achieves feature modulation through the following process: Perform a linear projection on the input feature map; Use multi-layer depthwise convolution to extract contextual information layer by layer; Global average pooling is applied to the last layer of feature maps to capture the global context; By using gated aggregation, contextual features at different granularities are condensed into a single feature vector to obtain a modulator; The modulator is element-wise multiplied with the query vector output by the query mapping function to output the modulated feature.
3. The method according to claim 1, characterized in that, The clustering and merging process for candidate location points specifically includes: Grouping of row-aligned positioning points: Arrange the positioning points in ascending order of their horizontal coordinates, calculate the average distance between adjacent points, and group the points into a set of row-aligned seedling positioning points based on the average distance. Calculate row positioning points: Calculate the average coordinates of each point set, and use them as the positioning points of the seedlings in that row; Detecting missed points: Calculate the average distance between adjacent row positioning points; if the distance is too large, insert a missed point. Stitch together a larger image: Based on the sub-image index, stitch together the positioning points of the sub-images into a larger image; Adjust heading: Connect the positioning points on the large map, calculate the slope of adjacent line segments and convert it into angles. If the difference between adjacent angles exceeds the set value, adjust the heading.
4. The method according to claim 1, characterized in that, The coordinate transformation steps are as follows: The overall design of the neural network is a 5-layer network structure. The input is the world coordinate system of the feature points, and the output is the pixel coordinates of the feature points. The activation functions of the first two layers of the three hidden layers are linear activation functions, and the activation function of the third layer is an S-type activation function. By using the camera calibration method under the BP neural network, the parameters are imported into the camera, which can complete the transformation between the world coordinate system and the camera image coordinate system. Thus, the planned navigation line path is sent to the control mechanism for path tracking through the protocol.
5. The method according to claim 1, characterized in that, The control algorithm combining feedback linearization and fuzzy prediction function control is as follows: Based on the nonlinear kinematic model of the rice transplanter, the feedback linearization controller employs a state feedback method, taking into account the lateral error... Heading error and virtual control quantity Design control quantity This allows for the linearization of the nonlinear kinematic model of the rice transplanter, enabling the feedback linearization controller and the rice transplanter to form a linear system. The fuzzy predictive function controller uses fuzzy logic to dynamically adjust the weighting coefficients in the performance index function, and adjusts the weighting coefficients based on the lateral error. and heading error The virtual control quantity is obtained by optimizing the performance index function using the predictive function control method. By controlling the newly formed linear system, the path tracking control of the rice transplanter can be indirectly achieved.
6. The method according to claim 5, characterized in that, The design of the fuzzy predictive function controller consists of two parts: a predictive function controller and a fuzzy controller. The predictive function controller uses predictive function control with Morlet wavelet function as the basis function to optimize and solve the virtual control quantity. The fuzzy controller uses lateral error, lateral error rate of change and relative curvature of the reference path as input variables, and uses the lateral error weighting coefficient and lateral error rate of change weighting coefficient in the predictive function control performance index function as output variables.
7. A precise identification and adaptive tracking system for rice transplanter rows, used to implement the method described in any one of claims 1 to 6, characterized in that, include: The image acquisition module is used to acquire images of the paddy field environment; Data processing and control unit, configured for: The improved YOLOv8n target detection model is executed to identify rice seedlings; Perform the navigation line extraction step and coordinate transformation step to generate a navigation path in the world coordinate system; Perform the path tracking control steps and calculate the control quantity; An actuator is used to receive the control quantity and drive the steering system of the rice transplanter to achieve path tracking.
8. A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any one of claims 1 to 6.