Vision-based navigation control system for carts in orchard
Through deep learning and least squares method combined with the YOLO v5s model to identify the tree trunk features, build a navigation line data set, and combine it with the Beidou Gaoyan system to locate the car, and design a fuzzy controller for navigation movement control, solving the problem of traditional visual navigation technology in the orchard environment, and achieving fast and accurate navigation of trunks in orchards.
Patent Information
- Application Number
- CN202510139240.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-06
AI Technical Summary
Traditional visual navigation technology is difficult to generate navigation routes accurately and quickly in an orchard environment, and cannot effectively achieve matching control between robots and navigation routes, affecting operation efficiency and accuracy.
Deep learning and least squares method are used to collect inter-row images of orchards through the camera, and the YOLO v5s model is used to identify the tree trunk features, and a navigation line data set is constructed to realize navigation line extraction. Combined with the Beidou Gaohang system, a fuzzy controller is designed for navigation and movement control.
It realizes fast and accurate navigation of trolleys in orchards, improves operating efficiency and accuracy, and avoids reduced navigation accuracy and control difficulties caused by environmental complexity and light interference.
Smart Images

Figure CN119937425A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of visual navigation, and in particular to a vision-based navigation control system for an orchard vehicle. Background Art
[0002] At present, most of the orchard operations in China are still mainly done by manual labor. However, the traditional manual operation method has disadvantages such as low efficiency, high labor cost, and long harvesting cycle. In addition, the manual operation method has strong human subjective initiative and is not easy to manage.
[0003] With the development of intelligent machinery, more and more agricultural robots are gradually replacing manual labor to perform a series of tasks in orchards, such as fertilizing, spraying, mowing, picking, and transporting. This effectively reduces manual labor intensity, improves planting efficiency, saves time, and improves orchard production efficiency. In the process of orchard management by agricultural robots, how to achieve robot navigation control is the key to completing the robot's various operations. It directly determines whether the robot can accurately reach the designated area to perform corresponding operations, thereby affecting the robot's subsequent operating efficiency and accuracy. At present, agricultural robot navigation technology, mainly based on satellite positioning navigation, lidar navigation and visual navigation, is developing rapidly, and some technologies have been gradually applied to agricultural production. However, satellite positioning navigation technology (such as GPS or Beidou satellite) is easily blocked by the branches and leaves of fruit trees, which seriously affects the navigation accuracy. Lidar navigation is to use a laser scanner to continuously emit lasers to the surrounding environment. After the laser contacts an object, it is reflected. The laser's back-and-forth distance is used to determine the robot's position and direction in the orchard, thereby achieving autonomous navigation. However, single-line lidar is easily affected by light, which in turn affects navigation accuracy. Multi-line lidar is less affected by light, but the cost is too high, and its compatibility with agricultural orchard navigation is low. Visual navigation has the advantages of rich feature information, low cost, and little interference from light factors. Compared with satellite positioning navigation and lidar navigation, visual navigation and orchard navigation are more compatible. However, the image processing method of traditional visual navigation is easily affected by the fruit trees themselves and the surrounding environment (such as weeds), which is not conducive to the generation of navigation lines. At the same time, the existing technology cannot accurately and quickly achieve the matching control of the navigation line and the robot, which in turn affects the robot's operating efficiency and accuracy. Summary of the invention
[0004] In view of the problems existing in the above-mentioned prior art, the purpose of the present invention is to provide a vision-based navigation and control system for an orchard orchard cart. The system uses fruit trees as the natural coordinates for inter-row navigation, and through deep learning and least squares method, realizes the extraction of navigation lines between rows, which is faster and more accurate. At the same time, the system can perform corresponding navigation control of the robot (i.e., the cart) based on the navigation parameters, thereby completing the autonomous movement and positioning of the robot (i.e., the cart).
[0005] The purpose of the present invention is achieved through the following technical solutions: A vision-based navigation control system for an orchard vehicle, comprising: Step S1, using a camera to shoot and collect images at different angles between rows in an orchard, and processing the images; using an annotation tool to annotate the processed images to construct a data set; Step S2: using the data set in step S1 to pre-train the model, and using the pre-trained model to recognize the image to obtain the navigation feature target; Step S3, obtaining the orchard navigation line based on the least squares method; Step S4, determine the position of the trolley in the orchard in combination with the Beidou high-altitude navigation system, and complete the automatic line break when the trolley moves to the end of the row; Step S5: design a fuzzy controller for the car based on the navigation parameters to control the navigation movement of the car in the forest.
[0006] Based on further optimization of the above solution, the image processing in step S1 includes rotation, increasing noise, translation, adding blocking, etc., which are used to expand the image data set.
[0007] Based on further optimization of the above solution, the labeling tool in step S1 adopts Labelimg labeling software.
[0008] Based on further optimization of the above scheme, the data set in step S1 is divided into a training set, a test set and a validation set in a ratio of 7:2:1.
[0009] Based on the further optimization of the above scheme, the model in step S2 uses YOLO v5s to construct a tree trunk detection model for identifying tree trunk features in the image; the YOLO v5s network structure consists of four parts: Input, Backbone, Neck, and Prediction; The YOLO v5s model is trained using the dataset. To verify the model performance, the precision (P), recall (R), and mean average precision (mAP) indicators are evaluated. The accuracy rate is the ratio of correctly identified target categories to all correct target categories, specifically:
[0010] Where: TP Indicates the number of correctly detected tree trunks; FP represents the number of tree trunks misidentified; The recall rate indicates the proportion of the part that the model classifier considers to be positive and is actually positive to all the parts that are actually positive, specifically:
[0011] Where: FN represents the number of tree trunks that were not correctly identified; The mean average detection accuracy is a way to evaluate the correctness of the model. It is obtained by averaging the average detection accuracy, specifically:
[0012] Where: N Represents the number of species in the sample.
[0013] Based on the further optimization of the above solution, step S3 is specifically as follows: First, the pre-trained model is used to extract the recognition frames of the tree trunks, and the coordinates of the upper left corner of the trunk recognition frame are used P 1( x 1 ,y 1) With the lower right corner coordinates P 2( x 2 ,y 2) Get the coordinates of the bottom midpoint of the recognition box P o ( x,y ):
[0014] Taking the coordinates of the lower midpoint of the tree trunk identification frame as the positioning base point, the coordinate sets of the fruit tree rows on the left side of the road are obtained respectively ( x i ,y i ), i=1,2,…,n 1 and the coordinate set of the fruit tree row on the right side of the road ( x r ,y r ), r=1,2,…,n 2, among which, n 1. n 2 represents the number of fruit trees on the left side of the road and the number of fruit trees on the right side of the road respectively; Assume that the coordinate set of the left fruit tree row ( x i ,y i ) is the equation of the fitted straight line: y=ax+b , according to Calculate the sum of squared errors:
[0015] For parameters a and parameters b Find the partial derivative so that the error sum of squares Minimum:
[0016] Get parameters a With parameters b :
[0017] Get the straight line of the fruit tree row on the left side of the road:
[0018] Similarly, we can get the straight line of fruit trees on the right side of the road:
[0019] Then, 8 reference points were selected at equal distances on the straight line of the fruit tree row on the left side of the road as the central fitting reference points, recorded as: P xl ( x i ,y i ), i=1,2,…,8 ; Substitute the ordinates of the eight central fitting reference points into the straight line of the fruit trees on the right side of the road to obtain the corresponding coordinates P xr ( x r ,y r ), r=1,2,…,8 ; Calculate 8 reference points of the navigation line located in the center of the tree row based on the reference points on the left and right sides P mk ( x k ,y k ):
[0020] Finally, the eight reference points of the navigation line are fitted using the least squares method to obtain the navigation line in the center of the orchard tree row:
[0021] Based on the further optimization of the above solution, step S4 is specifically as follows: First, the position of the car is determined based on the identification of tree trunks: if there are tree trunks on both sides in front, the car is still walking between rows, and it moves along the navigation line; if there are no tree trunks on both sides in front, the car is determined to have reached the end of the tree row, and it automatically changes rows; Trolley turning radius R z for:
[0022] Where: l ave Indicates the spacing between rows in an orchard; Angular velocity of the car W z for:
[0023] Where: V z Indicates the linear speed of the car; Turning time of the car T for:
[0024] The odd or even number of times the line feed instruction is executed is used to control whether the car makes a clockwise or counterclockwise U-turn: that is, when the car executes the line feed instruction for the first time, it makes a clockwise U-turn; when the car executes the line feed instruction for the second time, it makes a counterclockwise U-turn.
[0025] Based on the further optimization of the above scheme, in the step S4, when the vehicle moving platform is a four-wheel differential moving vehicle, a kinematic model of the four-wheel differential moving vehicle is established; First, get the arc lengths at the center of the car and the left and right wheels:
[0026] Where: Indicates the turning angle of the car; Indicates the heading angle of the car; r Indicates the turning radius of the car; A indicates the left and right wheel tracks of the car; B indicates the width of a single wheel; v l , v r Represent the linear speed of the left and right wheels respectively; v Indicates the linear speed of the trolley; Since the angular velocities of the left wheel, right wheel and center position of the car are the same, then:
[0027] The relationship between the angular velocity of the car and the linear velocity of the left and right wheels is:
[0028] Where: w represents the angular velocity of the car.
[0029] The navigation parameters determine the direction of the vehicle and are the key to the vehicle's advancement in the orchard. Based on the further optimization of the above scheme, the lateral deviation and the deflection angle are used as the vehicle's navigation parameters in step S5. The method for obtaining the navigation parameters is as follows: According to the car forward model, the car walking path is obtained l ac :
[0030] angle for:
[0031] Where: y g , y h They represent the ordinates of points g and h in the pixel coordinate system respectively; dy represents the physical size of a single pixel; l oh =f , represents the focal length of the camera; , indicating the downward deflection angle of the camera; but:
[0032]
[0033] Due to the deflection angle for:
[0034] and: l ac =l ac -l ad ,but:
[0035] Where: l ao =L , indicating the installation height of the camera; According to similar triangles, there exists:
[0036] and:
[0037] but:
[0038] Where: u k ,u h Represents the midpoint of the pixel coordinate system k With point h The horizontal axis value of dx Represents the actual coordinates of a pixel; The deflection angle for:
[0039] Lateral deviation l am for:
[0040] Based on the further optimization of the above scheme, the fuzzy controller in step S5 includes four parts: fuzzification, rule base, fuzzy reasoning and defuzzification; Among them, the fuzzification of the fuzzy controller: the lateral deviation l am With deflection angle As the input of the fuzzy controller, the fuzzy processing is performed to obtain the speed difference of the four-wheel differential car. As output variable; at the same time, set the lateral deviation l am , deflection angle And the speed difference The threshold range is set to avoid large offset and poor image recognition when the car moves autonomously between rows in the orchard. The following principles are designed in the rule base of the fuzzy controller: when the deviation is large, the priority is to reduce the deviation; when the deviation is small, the priority is to stabilize the car; Fuzzy controller defuzzification: The center of gravity method is used to defuzzify the output of the fuzzy controller, that is, the speed difference Defuzzification is performed, specifically:
[0041] Where: express In the i The membership degree on the fuzzy subsets.
[0042] The following are the technical effects of the solution of the present invention: The present invention is based on the YOLO v5s visual algorithm framework, and realizes providing an efficient, reliable and accurate navigation line for a walking trolley in a complex environment of an orchard, effectively improving the working efficiency and operation smoothness of the trolley between orchards; at the same time, by designing a trolley fuzzy controller based on navigation parameters, it can effectively realize the operation control of the trolley on the navigation line, and provide a high-quality navigation control solution for the trolley between orchards, effectively avoiding the problems of reduced navigation accuracy, control difficulty or control failure caused by many uncertain factors such as complex terrain or interference from environmental factors during the navigation control process of the trolley, thereby ensuring the optimization of the trolley's travel, avoiding damage to fruits and fruit trees caused by the trolley due to control problems and the resulting time loss, having strong robustness and rapid responsiveness, and can effectively solve the problems of low operating efficiency, high work intensity, and increasing labor costs in my country's forestry and fruit industry, and provide support for modern intelligent and mechanized operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 This is a structural block diagram of obtaining an orchard navigation line in an embodiment of the present invention.
[0044] Figure 2 Schematic diagram of image processing in an embodiment of the present invention; wherein, Figure 2 (a) is the original image before processing. Figure 2 (b) is the effect picture after increasing the noise. Figure 2 (c) is the effect after translation and adding blocking. Figure 2 (d) is the effect diagram after rotation.
[0045] Figure 3 This is a schematic diagram of obtaining a tree trunk positioning base point in an embodiment of the present invention.
[0046] Figure 4 It is a schematic diagram of controlling the vehicle to turn around in an embodiment of the present invention.
[0047] Figure 5 Schematic diagram of the motion analysis of the trolley in an embodiment of the present invention.
[0048] Figure 6 Schematic diagram of the change of the trolley's position in an embodiment of the present invention.
[0049] Figure 7 It is a structural schematic diagram of obtaining navigation parameters according to the vehicle forward model in an embodiment of the present invention.
[0050] Figure 8 Schematic diagram of the structure of the fuzzy controller in the embodiment of the present invention.
[0051] Fig. 9 Schematic diagram of the membership function in an embodiment of the present invention; wherein, Fig. 9 (a) is the membership function of the lateral deviation, Fig. 9 (b) is the membership function of the deflection angle, Fig. 9 (c) is the membership function of the output variable.
[0052] Fig.10 Schematic diagram of the structure of the vehicle in different postures in an embodiment of the present invention.
[0053] Fig.11 is a rendering of the fuzzy controller in an embodiment of the present invention; wherein, Fig.11 (a) is the interface diagram of the fuzzy control observer. Fig.11 (b) is the fuzzy control surface diagram. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0055] Embodiment 1: A vision-based navigation control system for an orchard vehicle, comprising: Step S1, use a camera to shoot and collect images at different angles between rows in the orchard, and process the images. The image processing includes rotation, increasing noise, translation, adding blocking, etc., which are used to expand the image data set (wherein, rotation, increasing noise, translation, adding blocking, etc. are all processed by common processing methods in the art, and are not specifically limited in this embodiment. The processing effect is as follows Figure 2 Labelimg annotation software was used to annotate the processed images and a dataset with inter-row tree trunks as detection targets was constructed; the dataset was divided into training set, test set, and validation set in a ratio of 7:2:1.
[0056] Step S2: using the data set in step S1 to pre-train the model, and using the pre-trained model to recognize the image to obtain the navigation feature target; The model uses YOLO v5s to construct a trunk detection model for identifying trunk features in images; the YOLOv5s network structure consists of four parts: Input, Backbone, Neck, and Prediction; in terms of training environment and parameter settings, the training in this embodiment is performed on a computer consisting of an Intel i5-12400F (64-bit) and an NVIDIA GeForce GTX3060 GPU. Python and PyTorch are used as deep learning frameworks. In the training model of this embodiment, the iteration cycle is set to 300, the initial learning rate is set to 0.001, and the batchsize is set to 8.
[0057] The YOLO v5s model is trained using the dataset. To verify the model performance, the precision (P), recall (R), and mean average precision (mAP) indicators are evaluated. The accuracy rate is the ratio of correctly identified target categories to all correct target categories, specifically:
[0058] Where: TP Indicates the number of correctly detected tree trunks; FP represents the number of tree trunks misidentified; The recall rate indicates the proportion of the part that the model classifier considers to be positive and is actually positive to all the parts that are actually positive, specifically:
[0059] Where: FN represents the number of tree trunks that were not correctly identified; The mean average detection accuracy is a way to evaluate the correctness of the model. It is obtained by averaging the average detection accuracy, specifically:
[0060] Where: N Represents the number of species in the sample.
[0061] The model is trained. During the training process, the average accuracy value changes with the number of iterations as follows: In the first 50 iterations, mAP The value rises rapidly to around 0.8; between the 50th and 200th times, mAP The value rises slowly and gradually approaches 0.87; after the 200th iteration, mAP The value tends to be stable and remains at around 0.87, indicating that the model has reached stable convergence. After training, the model can accurately identify the position of tree trunks in the image, and it has strong resistance to light and interference, and is not easily affected by other obstacles such as weeds.
[0062] Step S3, obtaining the orchard navigation line based on the least squares method, specifically: First, the pre-trained model is used to extract the recognition frames of the tree trunks, and the coordinates of the upper left corner of the trunk recognition frame are used P 1( x 1 ,y 1) With the lower right corner coordinates P 2( x 2 ,y 2) Get the coordinates of the bottom midpoint of the recognition box P o ( x,y ), refer to Figure 3 As shown:
[0063] Taking the coordinates of the lower midpoint of the tree trunk identification frame as the positioning base point, the coordinate sets of the fruit tree rows on the left side of the road are obtained respectively ( x i ,y i ), i=1,2,…,n 1 and the coordinate set of the fruit tree row on the right side of the road ( x r ,y r ), r=1,2,…,n 2, among which, n 1. n 2 represents the number of fruit trees on the left side of the road and the number of fruit trees on the right side of the road respectively; Assume that the coordinate set of the left fruit tree row ( x i ,y i ) is the equation of the fitted straight line: y=ax+b , according to Calculate the sum of squared errors:
[0064] For parameters a and parameters b Find the partial derivative so that the error sum of squares Minimum:
[0065] Get parameters a With parameters b :
[0066] Get the straight line of the fruit tree row on the left side of the road:
[0067] Similarly, we can get the straight line of fruit trees on the right side of the road:
[0068] Then, 8 reference points were selected at equal distances on the straight line of the fruit tree row on the left side of the road as the central fitting reference points, recorded as: P xl ( x i ,y i ), i=1,2,…,8 ; Substitute the ordinates of the eight central fitting reference points into the straight line of the fruit trees on the right side of the road to obtain the corresponding coordinatesP xr ( x r ,y r ), r=1,2,…,8 ; Calculate 8 reference points of the navigation line located in the center of the tree row based on the reference points on the left and right sides P mk ( x k ,y k ):
[0069] Finally, the eight reference points of the navigation line are fitted using the least squares method to obtain the navigation line in the center of the orchard tree row:
[0070] Step S4: Determine the position of the trolley in the orchard in combination with the Beidou high-altitude navigation system, and complete the automatic line break when the trolley moves to the end of the line; specifically: First, the position of the car is determined based on the identification of tree trunks: if there are tree trunks on both sides in front, the car is still walking between rows, and it moves along the navigation line; if there are no tree trunks on both sides in front, the car is determined to have reached the end of the tree row, and it automatically changes rows; Trolley turning radius R z for:
[0071] Where: l ave Indicates the spacing between rows in an orchard; Angular velocity of the car W z for:
[0072] Where: V z Indicates the linear speed of the car; Turning time of the car T for:
[0073] like Figure 4 As shown: the parity of the number of times the line feed instruction is executed is used to control whether the car makes a clockwise turn or a counterclockwise turn: that is, when the car executes the line feed instruction for the first time, it makes a clockwise turn; when the car executes the line feed instruction for the second time, it makes a counterclockwise turn.
[0074] In this embodiment, when the vehicle mobile platform is a four-wheel differential mobile vehicle, a kinematic model of the four-wheel differential mobile vehicle is established (eg Figure 5 shown); First, obtain the arc lengths at the center of the car and the left and right wheels (such as Figure 6 shown):
[0075] Where: Indicates the turning angle of the car; Indicates the heading angle of the car; r Indicates the turning radius of the car; A indicates the left and right wheel tracks of the car; B indicates the width of a single wheel; v l , v r Represent the linear speed of the left and right wheels respectively; v Indicates the linear speed of the trolley; Since the angular velocities of the left wheel, right wheel and center position of the car are the same, then:
[0076] The relationship between the angular velocity of the car and the linear velocity of the left and right wheels is:
[0077] Where: w represents the angular velocity of the car.
[0078] Step S5: design a fuzzy controller for the car based on the navigation parameters to control the navigation movement of the car in the forest.
[0079] Embodiment 2: As a preferred embodiment of the present invention, based on the scheme of embodiment 1, the navigation parameters determine the direction of the car's advance and are the key to the car's advance in the orchard; in this embodiment, the lateral deviation and the deflection angle are used as the car's navigation parameters, referring to Figure 7 As shown, the method for obtaining navigation parameters is: According to the car forward model, the car walking path is obtained l ac :
[0080] angle for:
[0081] Where: y g , y hThey represent the ordinates of points g and h in the pixel coordinate system respectively; dy represents the physical size of a single pixel; l oh =f , represents the focal length of the camera; , indicating the downward deflection angle of the camera; but:
[0082]
[0083] Due to the deflection angle for:
[0084] and: l ac =l ac -l ad ,but:
[0085] Where: l ao =L , indicating the installation height of the camera; According to similar triangles, there exists:
[0086] and:
[0087] but:
[0088] Where: u k , u h Represents the midpoint of the pixel coordinate system k With point h The horizontal axis value of dx Represents the actual coordinates of a pixel; The deflection angle for:
[0089] Lateral deviation l am for:
[0090] The fuzzy controller consists of four parts: fuzzification, rule base, fuzzy reasoning and defuzzification (such as Figure 8 shown); Among them, the fuzzification of the fuzzy controller: the lateral deviation l am With deflection angle As the input of the fuzzy controller, the fuzzy processing is performed to obtain the speed difference of the four-wheel differential car. As output variables (specifically Fig. 9 At the same time, set the lateral deviation l am , deflection angle And the speed difference The threshold range (in this embodiment, the lateral deviation l am The threshold range is [-60cm, 60cm], and the deflection angle The threshold range is [-30°, 30°], and the speed difference The threshold range is [-0.2m / s, 0.2m / s]) to avoid large offset and poor image recognition when the car moves autonomously between rows in the orchard; in addition, the fuzzy levels of the car's input and output are set to seven different levels: negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive large (PB).
[0091] The following principles are designed in the rule base of the fuzzy controller: when the deviation is large, the deviation is reduced; when the deviation is small, the stability of the car is the main focus; when the car navigates between rows in the orchard, nine postures will be generated, referring to Fig.10 As shown: exist Fig.10 In (a), the symmetry line of the car is parallel to the orchard road navigation line, and the road navigation line is on the right side of the symmetry line of the car; l am <0, , the car turns right (that is, the speed on the left is greater than the speed on the right), ; exist Fig.10 In (b), the symmetry line of the car is parallel to the orchard road navigation line, and the road navigation line is collinear with the symmetry line of the car; l am =0, , the car continues to move in a straight line (that is, the speed on the left is equal to the speed on the right), ; exist Fig.10 In (c), the symmetry line of the car is parallel to the orchard road navigation line, and the road navigation line is on the left side of the symmetry line of the car; l am >0, , the car turns left (that is, the speed on the left is less than the speed on the right), ; exist Fig.10 In (d), the symmetry line of the car forms a positive angle with the road navigation line of the orchard, and the symmetry line of the car is on the road navigation line; at this time l am =0, , the car turns left (that is, the speed on the left is less than the speed on the right), ; exist Fig.10 In (e), the symmetry line of the car and the navigation line of the orchard road are at an opposite angle, and the symmetry line of the car is on the navigation line of the road; at this time l am =0, , the car turns right (that is, the speed on the left is greater than the speed on the right), ; exist Fig.10 In (f), the symmetry line of the car forms a positive angle with the road navigation line of the orchard, and the symmetry line of the car is on the right side of the road navigation line; at this time l am >0, , the car turns left (that is, the speed on the left is less than the speed on the right), ; exist Fig.10 In (g), the symmetry line of the car forms a positive angle with the road navigation line of the orchard, and the symmetry line of the car is on the left side of the road navigation line; l am <0, , the car turns left (that is, the speed on the left is less than the speed on the right), ; exist Fig.10 In (h), the symmetry line of the car and the navigation line of the orchard road are at an opposite angle, and the symmetry line of the car is on the right side of the navigation line. l am >0, , the car turns right (that is, the speed on the left is greater than the speed on the right), ; exist Fig.10 In (i), the symmetry line of the car and the navigation line of the orchard road are at an opposite angle, and the symmetry line of the car is on the left side of the navigation line. l am >0, , the car turns right (that is, the speed on the left is greater than the speed on the right), ; According to the nine different postures of the car, set the corresponding fuzzy control rules. The control rules are shown in the following table:
[0092] In order to more intuitively observe the lateral deviation of the input in the fuzzy controller l am , deflection angle The difference between the output speed and , input the input, output and fuzzy control rules into the fuzzy control module in Matlab to obtain the fuzzy control surface, such as Fig.11 As shown, it can be clearly seen that the fuzzy control surface corresponding to the fuzzy controller in this embodiment is relatively smooth and has a good control effect.
[0093] Fuzzy controller defuzzification: The center of gravity method is used to defuzzify the output of the fuzzy controller, that is, the speed difference Defuzzification is performed, specifically:
[0094] Where: express In the i The membership degree on the fuzzy subsets.
Claims
1. A vision-based navigation control system for an orchard vehicle, characterized in that: include: Step S1, using a camera to shoot and collect images at different angles between rows in an orchard, and processing the images; Use annotation tools to annotate the processed images and construct a data set; Step S2: using the data set in step S1 to pre-train the model, and using the pre-trained model to recognize the image to obtain the navigation feature target; Step S3, obtaining the orchard navigation line based on the least squares method; Step S4, determine the position of the trolley in the orchard in combination with the Beidou high-altitude navigation system, and complete the automatic line break when the trolley moves to the end of the row; Step S5: design a fuzzy controller for the car based on the navigation parameters to control the navigation movement of the car in the forest.
2. According to claim 1, a vision-based navigation control system for orchard vehicles, characterized in that: The image processing in step S1 includes rotation, increasing noise, translation, adding blocking, etc.
3. A vision-based navigation control system for orchard vehicles according to claim 1 or 2, characterized in that: The labeling tool in step S1 adopts Labelimg labeling software.
4. A vision-based navigation control system for orchard vehicles according to claim 1 or 3, characterized in that: The data set in step S1 is divided into a training set, a test set and a validation set in a ratio of 7:2:
1.
5. The vision-based navigation control system for orchard vehicles according to claim 1 is characterized in that: The model in step S2 uses YOLO v5s to construct a tree trunk detection model for identifying tree trunk features in an image; the YOLO v5s network structure consists of four parts: Input, Backbone, Neck, and Prediction; The YOLO v5s model is trained with the dataset. To verify the model performance, the accuracy, recall rate, and average precision are evaluated. The accuracy rate is the ratio of correctly identified target categories to all correct target categories, specifically: Where: TP Indicates the number of correctly detected tree trunks; FP represents the number of tree trunks misidentified; The recall rate indicates the proportion of the part that the model classifier considers to be positive and is actually positive to all the parts that are actually positive, specifically: Where: FN represents the number of incorrectly identified tree trunks; The mean average detection accuracy is a way to evaluate the correctness of the model. It is obtained by averaging the average detection accuracy, specifically: Where: N Represents the number of species in the sample.
6. The vision-based navigation control system for orchard vehicles according to claim 1 is characterized in that: The step S3 is specifically as follows: First, the pre-trained model is used to extract the recognition frames of the tree trunks, and the coordinates of the upper left corner of the trunk recognition frame are used. P 1( x 1 ,y 1) With the lower right corner coordinates P 2( x 2 ,y 2) Get the coordinates of the bottom midpoint of the recognition box P o ( x,y ): Taking the coordinates of the lower midpoint of the tree trunk identification frame as the positioning base point, the coordinate sets of the fruit tree rows on the left side of the road are obtained respectively ( x i , y i ), i=1,2,…,n 1 and the coordinate set of the fruit tree row on the right side of the road ( x r ,y r ), r=1,2,…,n 2, among which, n 1. n 2 represents the number of fruit trees on the left side of the road and the number of fruit trees on the right side of the road respectively; Assume that the coordinate set of the left fruit tree row ( x i ,y i ) is the equation of the fitted straight line: y=ax+b , according to Calculate the sum of squared errors: For parameters a and parameters b Find the partial derivative so that the error sum of squares Minimum: Get parameters a With parameters b : Get the straight line of the fruit tree row on the left side of the road: Similarly, we can get the straight line of fruit trees on the right side of the road: Then, 8 reference points were selected at equal distances on the straight line of the fruit tree row on the left side of the road as the central fitting reference points, recorded as: P xl ( x i , y i ), i=1,2,…,8 ; Substitute the ordinates of the eight central fitting reference points into the straight line of the fruit trees on the right side of the road to obtain the corresponding coordinates P xr ( x r ,y r ), r=1,2,…,8 ; Calculate 8 reference points of the navigation line located in the center of the tree row based on the reference points on the left and right sides P mk ( x k ,y k ): Finally, the eight reference points of the navigation line are fitted using the least squares method to obtain the navigation line in the center of the orchard tree row: 。 7. The vision-based navigation control system for orchard vehicles according to claim 1 is characterized in that: The step S4 is specifically as follows: First, the position of the car is determined based on the identification of tree trunks: if there are tree trunks on both sides in front, the car is still walking between rows, and it moves along the navigation line; if there are no tree trunks on both sides in front, the car is determined to have reached the end of the tree row, and it automatically changes rows; Trolley turning radius R z for: Where: l ave Indicates the spacing between rows in an orchard; Angular velocity of the car W z for: Where: V z Indicates the linear speed of the car; Turning time of the car T for: The odd or even number of times the line feed instruction is executed is used to control whether the car makes a clockwise or counterclockwise U-turn: that is, when the car executes the line feed instruction for the first time, it makes a clockwise U-turn; when the car executes the line feed instruction for the second time, it makes a counterclockwise U-turn.
8. The vision-based navigation control system for orchard vehicles according to claim 7 is characterized in that: In the step S4, when the vehicle moving platform is a four-wheel differential moving vehicle, a kinematic model of the four-wheel differential moving vehicle is established; First, get the arc lengths at the center of the car and the left and right wheels: Where: Indicates the turning angle of the car; Indicates the heading angle of the car; r Indicates the turning radius of the car; A indicates the left and right wheel tracks of the car; B indicates the width of a single wheel; v l , v r Represent the linear speed of the left and right wheels respectively; v Indicates the linear speed of the trolley; Since the angular velocities of the left wheel, right wheel and center position of the car are the same, then: The relationship between the angular velocity of the car and the linear velocity of the left and right wheels is: Where: w is the angular velocity of the car.
9. The vision-based navigation control system for orchard vehicles according to claim 8, characterized in that: In step S5, the lateral deviation and the deflection angle are used as navigation parameters of the vehicle, and the method for obtaining the navigation parameters is as follows: According to the car forward model, the car walking path is obtained l ac : angle for: Where: y g , y h They represent the ordinates of points g and h in the pixel coordinate system respectively; dy represents the physical size of a single pixel; l oh =f , represents the focal length of the camera; , indicating the downward deflection angle of the camera; but: Due to the deflection angle for: and: l ac =l ac -l ad ,but: Where: l ao =L , indicating the installation height of the camera; According to similar triangles, there exists: and: but: Where: u k , u h Represents the midpoint of the pixel coordinate system k With point h The horizontal axis value of dx Represents the actual coordinates of a pixel; The deflection angle for: Lateral deviation l am for: 。
Citation Information
Cited By
Mulberry field autonomous navigation method and system based on laser radar point cloud
CN120651246A