Fruit picking mechanical system controller optimization method

Through the improved growth optimization algorithm, the PID control algorithm of the fruit picking machinery system controller is optimized, which solves the problem that traditional PID controllers are difficult to achieve high precision and high speed control in complex farmland environments, and realizes the precise control of the fruit picking machinery arm and the robustness of the system.

CN120010232AActive Publication Date: 2025-05-16GUANGDONG OCEAN UNIVERSITY
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202510487101.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
2045-04-18

AI Technical Summary

Technical Problem

Traditional PID controllers are difficult to achieve high-precision and high-speed control of robotic arm movement in complex nonlinear farmland environments, and parameter adjustment is time-consuming and it is difficult to obtain the optimal solution.

Method used

The improved growth optimization algorithm is used to optimize the control parameters of the PID control algorithm of the fruit picking machinery system controller, and the precise motion control of the robot arm is achieved through the enhanced incremental PID algorithm module.

Benefits of technology

It significantly improves the control accuracy and sensitivity of the controller, realizes accurate picking of fruits, reduces positioning deviations and errors during picking, and enhances the adaptability and robustness of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010232A_ABST
    Figure CN120010232A_ABST
Patent Text Reader

Abstract

The invention discloses a fruit picking mechanical system controller optimization method, and belongs to the technical field of automatic control, and the method comprises the steps: S1, building the positions of a fruit and a mechanical claw in the same three-dimensional space, positioning the three-dimensional position of the fruit through a visual sensor, and calculating the three-dimensional position of a real-time mechanical arm claw; s2, calculating an error between the position of the fruit and the position of the mechanical claw according to the three-dimensional positions of the fruit and the real-time mechanical claw; s3, the error is output to an enhanced incremental PID algorithm module to be processed, and the mechanical arm regulation and control signal increment at the current moment is output; and S4, the mechanical arm regulation and control signal increment at the current moment is superposed to the mechanical arm regulation and control signal at the previous moment to obtain the mechanical arm regulation and control signal at the current moment to regulate and control the mechanical arm to move, meanwhile, the real-time three-dimensional position of the mechanical arm claw is fed back to S2, and S2 to S4 are executed circularly till the regulation and control signal increment is zero. Experiments prove that the method enhances the control precision and sensitivity of the fruit picking mechanical system controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automatic control, and in particular to a method for optimizing a controller of a fruit picking mechanical system. Background Art

[0002] Apple picking robots are intelligent devices widely used in the agricultural field, designed to replace manual labor to complete the task of precise apple picking; such robots usually need to have fast and accurate positioning capabilities, as well as the ability to adapt to complex farmland environments. During the fruit picking process, the robot must coordinate the movement of the mechanical arm and the visual recognition function to achieve efficient picking; however, in actual applications, due to the complex and changeable farmland environment, the picking process often faces many technical challenges.

[0003] As a classic control algorithm, PID controller (proportional-integral-differential controller) is widely used in apple picking robots for motion control of robotic arms due to its simple and efficient structure. However, it is difficult for traditional PID controllers to achieve optimal control effects in complex nonlinear environments. The motion control accuracy of the robotic arms is low and the motion speed is slow, which is mainly reflected in the following aspects: 1. The performance of PID controllers is heavily dependent on the settings of proportional, integral and differential parameters (Kp, Ki, Kd). In complex and changeable farmland environments, these parameters often need to be adjusted frequently to adapt to different fruit types and picking conditions. Manual parameter adjustment is time-consuming and difficult to obtain the optimal solution; 2. Apple picking tasks have high requirements for the response speed and stability of the control system. However, it is difficult for traditional PID controllers to achieve an ideal balance between fast response and oscillation suppression, which can easily lead to overshoot, lag or system oscillation, affecting picking efficiency and accuracy; 3. There are various dynamic interference factors in the farmland environment, such as wind, swaying branches and leaves, and changes in light. These factors may cause positioning deviations of the robotic arms, and it is difficult for traditional PID controllers to adapt to such dynamic changes in real time.

[0004] Growth Optimizer (GO) is a new meta-heuristic algorithm designed to solve continuous global optimization problems. The design inspiration of the GO algorithm comes from the learning and reflection mechanism of individuals in the process of social growth. By simulating the growth behavior of individuals, the GO algorithm aims to find the global optimal solution. The GO algorithm is divided into a learning stage and a reflection stage to establish an individual position update mathematical model. Using the GO algorithm to optimize the control parameters of the PID algorithm of the fruit picking machinery system controller can improve the sensitivity and accuracy of the controller. However, the GO algorithm needs to be improved to solve the problem of its easy falling into the local optimal solution in order to ensure the absolute superiority of the growth optimization algorithm in the process of optimizing the control parameters of the PID algorithm of the fruit picking machinery system controller. Summary of the invention

[0005] The purpose of the present invention is to provide a method for optimizing a fruit picking machinery system controller, which uses an improved growth optimization algorithm to adjust the control parameters of the control algorithm of the fruit picking machinery system controller to enhance the control accuracy and sensitivity of the fruit picking machinery system controller, solve the problems of low motion control accuracy and slow motion speed of the mechanical arm of the apple picking robot in the above-mentioned background technology, and realize optimal robust control of the picking accuracy of the fruit picking robot.

[0006] In order to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a method for optimizing a fruit picking machinery system controller, which is improved by a growth optimization algorithm, and the control parameters of a PID control algorithm of a fruit picking machinery system controller are optimized by using the improved growth optimization algorithm, specifically including the following steps.

[0007] S1. Establish the position of the fruit and the mechanical claw in the same three-dimensional space, and locate the three-dimensional position of the fruit through the visual sensor , while calculating the real-time 3D position of the robot gripper .

[0008] S2. Calculate the error coordinates (Δx, Δy, Δz) between the fruit position and the mechanical claw position through the three-dimensional position of the fruit and the real-time mechanical claw, and establish the three-dimensional position data error value of the fruit and the mechanical claw.

[0009] S3. Input the error value to the enhanced incremental PID algorithm module for processing, and output the output Δu(t) of the enhanced incremental PID algorithm at the current moment; the enhanced incremental PID algorithm module is a fusion of the improved growth optimization algorithm module and the incremental PID algorithm module. The specific method is: use the improved growth optimization algorithm to adjust the control parameters of the incremental PID algorithm to obtain the enhanced incremental PID algorithm, and the enhanced incremental PID algorithm is used for the fruit picking machinery system controller.

[0010] S4, the fruit picking mechanical system controller superimposes the Δu(t) to the robot arm control signal u(t-1) at the previous moment to output the robot arm control signal u(t) at the current moment; the robot arm control signal at the current moment controls the movement of the robot arm; and at the same time, the real-time three-dimensional position of the robot arm claw is Feedback is given to S2, and S2 to S4 are executed cyclically to achieve Δu(t) being zero, thereby completing the optimization of the controller of the fruit picking mechanical system.

[0011] Preferably, the fruit picking mechanical system includes two parts: a mechanical arm and a mechanical claw of a fruit picking robot. The mechanical claw is connected to the end of the mechanical arm, and the angle and distance of the mechanical claw are adjusted by the fruit picking mechanical arm; the fruit picking mechanical system controller includes a fruit and mechanical claw position data input module, an incremental PID algorithm module, a fruit and mechanical claw three-dimensional position data difference calculation module, a mechanical claw real-time position data feedback module, and a mechanical arm control output module, wherein the mechanical arm control output module outputs a mechanical arm control signal u(t) at the current moment, and the control signal u(t) is input into a three-degree-of-freedom electric adjustment module of the mechanical arm, wherein the electric adjustment module processes the control signal u(t) and controls the movement of the three-degree-of-freedom motors of the mechanical arm respectively.

[0012] Preferably, the angle and distance that the mechanical claw needs to be adjusted are determined by calculating the error (Δx, Δy, Δz) between the fruit position and the real-time position of the mechanical claw, wherein the mathematical model of the straight-line distance between the mechanical claw and the target fruit is: (1); In formula (1), is the horizontal axis position error, is the longitudinal axis position error, is the Z-axis position error; is the straight-line distance between the mechanical claw and the target fruit, which is the distance that the mechanical claw needs to adjust to move along the straight-line trajectory; More specifically, the angle and distance that the robot claw needs to adjust during the experiment is the angle that the fruit picking robot arm needs to adjust. The robot arm is a three-degree-of-freedom robot arm, and the angle of the robot arm is adjusted by driving three servo motors through the robot arm electrical adjustment. Among them, the angle required for the robot claw to adjust is converted from the Cartesian coordinate system to the polar coordinate system to define the direction angle of the target fruit point, including the pitch angle and the yaw angle; among them, the pitch angle is the vertical adjustment angle The mathematical model for the distribution in the four quadrants is: (2); The yaw angle is the angle between the fruit and the mechanical claw on the horizontal plane. , the mathematical model is: (3).

[0013] Preferably, the control algorithm of the fruit picking mechanical system controller adopts an incremental PID algorithm to adjust the increment of the mechanical arm control signal. Compared with the position PID, it only calculates the control signal increment at the current moment and adjusts it based on the change in the current error. It has a small cumulative impact on the calculation error and has good robustness. The mathematical model is: (4); In formula (4), is the proportional coefficient of the incremental PID algorithm, is the integral coefficient of the incremental PID algorithm, is the differential coefficient of the incremental PID algorithm, , , are the three-dimensional position data errors between the fruit and the mechanical claw at time t, t-1, and t-2 respectively; More specifically, the error coordinates (Δx, Δy, Δz) between the fruit position and the mechanical claw position are used to establish the three-dimensional position data error value of the fruit and the mechanical claw. The mathematical model is: (5); More specifically, the output of the fruit picking mechanical system controller is changed by the output of the enhanced incremental PID algorithm Δu(t) until the error value of the three-dimensional position data of the fruit and the mechanical claw approaches zero, that is, the output of the enhanced incremental PID algorithm Δu(t) approaches zero, and the feedback of the fruit picking mechanical system controller ends. The mathematical model is: (6); Where u(t-1) is the robot control signal at the previous moment, and u(t) is the robot control signal at the current moment.

[0014] Preferably, the three-degree-of-freedom electric adjustment module of the robotic arm is an existing control module, which can convert a single control signal into multiple groups of control signals, and convert the robotic arm control signal into a three-dimensional array, wherein the first dimension data of the array is the control signal increment of the first degree of freedom of the robotic arm, which controls the yaw angle, the second dimension data is the control signal increment of the second degree of freedom of the robotic arm, which controls the telescopic length, and the third dimension data is the control signal increment of the third degree of freedom of the robotic arm, which controls the pitch angle.

[0015] Preferably, the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm are adjusted using an improved growth optimization algorithm, and the obtained optimal control parameters are input into formula (4) to obtain an enhanced incremental PID algorithm, including: proportional coefficient, integral coefficient and differential coefficient; the enhanced incremental PID algorithm is used in the incremental PID algorithm module of the fruit picking mechanical system controller to improve the control accuracy and sensitivity of the fruit picking mechanical system controller to the mechanical arm.

[0016] Preferably, the growth optimization algorithm includes a mathematical model of two stages, a learning stage and a reflection stage, wherein the learning stage simulates the learning process of an individual in society, and improves one's own knowledge level by learning from the gaps between other individuals, which is the global search stage of the growth optimization algorithm; the reflection stage simulates the behavior of an individual in the self-reflection process, and improves one's own knowledge level by checking and making up for one's own shortcomings, which is the local development stage of the growth optimization algorithm; the growth optimization algorithm iteratively updates the individual position to find the optimal individual position, and its iterative process is the optimization process of the optimal control parameters of the incremental PID algorithm, and the optimal individual position is the value of the optimal control parameter.

[0017] Preferably, the position vector of the i-th individual of the growth optimization algorithm includes D dimensions, where D is the algorithm problem dimension. During the optimization process of the incremental PID algorithm by the growth optimization algorithm, the control parameters of the incremental PID algorithm are adjusted to obtain the optimal control parameters under the current environment, where the number of control parameters is recorded as the algorithm problem dimension D, where the control parameters of the incremental PID algorithm include proportional parameters, differential parameters and integral parameters; the position vector of the i-th individual for The first dimension value of the position vector of the i-th individual maps the proportional parameter value of the incremental PID algorithm, the second dimension value of the position vector of the i-th individual maps the integral parameter value of the incremental PID algorithm, and the third dimension value of the position vector of the i-th individual maps the differential parameter value of the incremental PID algorithm.

[0018] Preferably, the learning phase of the growth optimization algorithm simulates collaborative learning between individuals by constructing differences between four different standard individuals, wherein the four different standard individuals include: the best individual in the current population, the elite individual in the current population, the poor individual in the current population, and the random individual in the current population, wherein the mathematical model of the differences between the four different standard individuals is: (7); In formula (7), is the j-th dimension value of the optimal individual position vector of the global population, The top fitness value The individual is recorded as the j-th dimension value of the position vector of the elite individual in the current population, is the maximum population size, After ranking the fitness values The individual is recorded as the j-th dimension value of the position vector of the worse individual in the current population, and is the j-th dimension value of the position vector of two random individuals in the population, is the distance between the optimal individual and the elite individual of the current population, is the distance between the elite individuals and the poor individuals in the current population, is the distance between the best individual and the worst individual in the current population, is the distance between two random individuals in the population.

[0019] Preferably, in the learning phase of the growth optimization algorithm, the position of the i-th individual is updated according to the amount of knowledge acquired. The mathematical model is: (8); In formula (8), is the position vector of the i-th individual in the t+1th iteration, is the position vector of the i-th individual in the t-th iteration, is the kth knowledge acquisition, obtained by the Euclidean distance between four different standard individuals.

[0020] Preferably, the current standard growth optimization algorithm mainly relies on the Euclidean distance, and the target direction is single, which affects the accuracy of the control of the fruit picking mechanical system; the individual position update strategy in the learning phase of the standard growth optimization algorithm is improved. In the learning phase, a multi-directional exploration strategy that imitates individuals with high fitness values ​​is introduced to obtain an improved individual position update strategy in the learning phase. The specific steps are: Step 1: Calculate the Euclidean distance between the current individual and the other N-1 individuals. The individuals with a distance less than R are regarded as the neighboring individuals of the current individual. Update the position of the current individual according to the position of the neighboring individuals. The mathematical model is: (9); In formula (9), is the number of individuals in the neighborhood R of the current individual; is the position vector generated by the ith individual based on the yth neighboring individual, where y=1,2,...,n; is the neighborhood solution set of the tth iteration The position vector of the y-th neighborhood individual in ; is the position vector of the i-th individual in the t-th iteration; Step 2: Imitate individuals with small fitness values ​​in the population. The mathematical model is: (10); In formula (10), is the position vector of the i-th individual in the t+1th iteration, is the position vector generated by the ith individual based on the yth neighboring individual, where y=1,2,...,n, and is a dynamic weight factor to ensure that information from different sources is reasonably integrated. is the optimal individual position vector of the global population, From the fitness value closest The individual position vector of Step 3: Take the best result based on the multi-directional search results and improve the single-directional guidance method. The specific method is as follows: The n candidate solutions generated by the i-th individual The fitness values ​​are , select the optimal candidate solution to update the position vector of the i-th individual, and the mathematical model is: ;in, is the first candidate solution of the ith individual in the t+1th iteration, is the second candidate solution of the ith individual in the t+1th iteration, is the nth candidate solution of the ith individual in the t+1th iteration, is the fitness value of the individual position, is the minimum value function.

[0021] Preferably, the attenuation factor (AF) design in the growth optimization algorithm (GO) is based on the current number of iterations and the maximum number of iterations, gradually reducing the exploration intensity and focusing on local development; the method proposed in the present invention is based on the attenuation factor (AF) design in the standard growth optimization algorithm (GO), and dynamically adjusts the attenuation factor by using the average amplitude of the position change between the current iteration individual and the previous generation individual of the population. In the local development stage, by reducing the exploration intensity and focusing on local search, the optimal solution can be found more finely, and the strategy can be adaptively adjusted at different stages to avoid falling into the local optimum or premature convergence problem, thereby improving the optimization efficiency and accuracy of the control parameters of the incremental PID algorithm of the growth optimization algorithm in the local development stage; the improved mathematical model of the attenuation factor is: (11); In the formula, is the improved attenuation factor value of the tth iteration, is the maximum number of iterations, is the population activity of the tth iteration, and the mathematical model is: (12); In the formula, is the maximum activity of the population when it is initialized, The largest population size, is the position value of the j-th dimension of the ith individual in the t-th iteration, is the position value of the j-th dimension of the i-th individual in the t-1-th iteration.

[0022] Preferably, the improved attenuation factor is used, and the optimal individual position of the current population is introduced to guide the individual position update to improve the mathematical model of the individual position update strategy in the reflection stage of the growth optimization algorithm. The mathematical model is: (13); In the formula, is the position vector of the i-th individual in the t+1th iteration, is the position vector of the i-th individual in the t-th iteration, UB and LB are the upper and lower limits of the individual position vector, r is a random number between 0 and 1, is the optimal individual position vector of the population at the tth iteration, and p is the control parameter.

[0023] Preferably, the improved learning phase and reflection phase individual position update strategy is used to improve the standard growth optimization algorithm; the improved growth optimization algorithm is used to optimize the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm, and the specific steps are as follows: S31, encode the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller into a space vector U with a dimension of 3, and compare the space vector with the position vector of the i-th individual of the improved growth optimization algorithm Create a mapping; S32, setting the maximum number of iterations T of the improved growth optimization algorithm, the problem dimension D, the maximum size of the population N, the upper limit UB and lower limit LB of the individual position vector, and randomly initializing the position vector value of each individual; S33, use the objective function to calculate the fitness value of each individual's current position, and retain the current minimum fitness value The corresponding individual position is used as the optimal individual position vector of the population in the tth iteration ; Update the optimal individual position vector of the global population according to formula (14); (14); In the formula, is the optimal individual position vector of the global population, is the fitness value of the optimal individual position vector of the global population; S34, if the current number of iterations t satisfies t>T, the optimal individual position vector output of the current global population is analytically assigned to the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller; otherwise, the individual position update mathematical model of the improved growth optimization algorithm is executed; S35, using the improved individual position update strategy in the learning phase to update the positions of the N individuals, calculating the improved attenuation factor value of the t-th iteration, and establishing the individual position update strategy in the reflection phase according to the attenuation factor value to update the positions of the N individuals; S36, limiting the updated individual position vector within the range of the individual position vector upper limit UB and lower limit LB; the number of iterations is incremented by one, and the process returns to execute S33.

[0024] Preferably, the role of the fitness value is to evaluate the superiority of the solution. The size of the fitness value reflects the control accuracy of the current fruit picking mechanical system controller, that is, the proportional coefficient, integral coefficient and differential coefficient accuracy of the incremental PID algorithm of the fruit picking mechanical system controller. The individual positions of the improved growth optimization algorithm are resolved into the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm for the fruit picking mechanical system controller. The fitness value is obtained by calculating the control error size of the fruit picking mechanical system controller under the current proportional coefficient, integral coefficient and differential coefficient through the objective function. The smaller the fitness value, the smaller the current control error of the fruit picking mechanical system controller, and vice versa. The larger the control error; the mathematical model of the objective function is: (15); In the formula, is the objective function, and e(t) is the error value of the three-dimensional position data of the fruit and the mechanical claw at the tth moment.

[0025] Compared with the prior art, the technical solution of the present invention has the following advantages and beneficial effects: the present invention optimizes the control parameters of the PID control algorithm of the fruit picking mechanical system controller by using an improved growth optimization algorithm, which significantly improves the control accuracy and sensitivity of the controller; by precisely adjusting the movement of the robotic arm, accurate fruit picking is achieved, and positioning deviation and errors in the picking process are reduced; the improved growth optimization algorithm can more finely find the optimal solution through two stages of global search and local development, avoiding the problem of falling into local optimum or premature convergence; therefore, the method of the present invention can maintain good control performance under different fruit types and picking conditions, and enhances the adaptability and robustness of the system; traditional PID controllers need to frequently adjust proportional, integral and differential parameters to adapt to different picking conditions, which is not only time-consuming but also difficult to obtain the optimal solution, while the method of the present invention reduces the cost and difficulty of manual parameter adjustment by automatically optimizing control parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 The overall technical framework diagram for optimizing the controller of the fruit picking machinery system; Figure 2 Flow chart for optimizing the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm for the improved growth optimization algorithm; Figure 3 A comparison chart of the minimum fitness value of each iteration in the optimization process of the improved growth optimization algorithm and the standard growth optimization algorithm; Figure 4This is a graph showing the optimization process of the control parameters of the incremental PID control algorithm for the fruit picking mechanical system controller; Figure 5 This is a comparison chart of the effects of the method of the present invention and the existing method on optimizing the controller of the fruit picking machinery system. DETAILED DESCRIPTION

[0027] The following examples further illustrate the content of the present invention, but should not be construed as limiting the present invention. Without departing from the spirit and substance of the present invention, modifications or substitutions made to the methods, steps or conditions of the present invention all fall within the scope of the present invention.

[0028] like Figure 1 As shown, the present invention provides a method for optimizing a fruit picking machinery system controller. The method improves the growth optimization algorithm, uses the improved growth optimization algorithm to optimize the control parameters of the incremental PID control algorithm of the fruit picking machinery system controller, and uses the improved incremental PID control algorithm for the fruit picking machinery system controller. The implementation process includes Matlab code and Simulink system simulation model, including steps S1 to S4.

[0029] S1. Establish the position of the fruit and the mechanical claw in the same three-dimensional space, and locate the three-dimensional position of the fruit through the visual sensor , while calculating the real-time 3D position of the robot gripper .

[0030] Specifically, in this implementation step, the coordinate system of the entire three-dimensional space is used as the global coordinate system, and the local coordinate system is determined according to the initial position of the mechanical claw and the position of the fruit. The position of the fruit is located in real time by the visual sensor, and the image data is converted into a point in the three-dimensional coordinate system. , the real-time three-dimensional position of the robot arm claw is calculated through the encoder of the three-degree-of-freedom motor of the robot arm .

[0031] S2. Calculate the error coordinates (Δx, Δy, Δz) between the fruit position and the mechanical claw position through the three-dimensional position of the fruit and the real-time mechanical claw, and establish the three-dimensional position data error value of the fruit and the mechanical claw.

[0032] Specifically, in this implementation step, the error (Δx, Δy, Δz) between the fruit position and the real-time position of the mechanical claw is calculated to determine the angle and distance that the mechanical claw needs to be adjusted, wherein the mathematical model of the straight-line distance between the mechanical claw and the target fruit is: (1); In formula (1), is the horizontal axis position error, is the longitudinal axis position error, is the Z-axis position error; is the straight-line distance between the mechanical claw and the target fruit, which is the distance that the mechanical claw needs to adjust when moving along a straight-line trajectory.

[0033] Furthermore, the angle and distance that the robot claw needs to adjust during the experiment is the angle that the fruit picking robot arm needs to adjust. The robot arm is a three-degree-of-freedom robot arm, and the angle of the robot arm is adjusted by driving three servo motors through the robot arm electrical adjustment; wherein, the angle required for the robot claw to adjust is converted into a polar coordinate system in the Cartesian coordinate system, and the direction angle of the target fruit point is defined, including the pitch angle and the yaw angle; wherein, the pitch angle is the vertical adjustment angle The mathematical model for the distribution in the four quadrants is: (2); The yaw angle is the angle between the fruit and the mechanical claw on the horizontal plane. , the mathematical model is: (3).

[0034] S3. Input the error value to the enhanced incremental PID algorithm module for processing, and output the output Δu(t) of the enhanced incremental PID algorithm at the current moment; the enhanced incremental PID algorithm module is a fusion of the improved growth optimization algorithm module and the incremental PID algorithm module. The specific method is: use the improved growth optimization algorithm to adjust the control parameters of the incremental PID algorithm to obtain the enhanced incremental PID algorithm, and the enhanced incremental PID algorithm is used for the fruit picking machinery system controller.

[0035] Specifically, in this implementation step, the control algorithm of the fruit picking mechanical system controller is defined, and the incremental PID algorithm is used for the incremental PID algorithm module of the fruit picking mechanical system controller simulation model in Simulink. The mathematical model is: (4); In formula (4), is the proportional coefficient of the incremental PID algorithm, is the integral coefficient of the incremental PID algorithm, is the differential coefficient of the incremental PID algorithm, , , are the three-dimensional position data error values ​​of the fruit and the mechanical claw at time t, t-1 and t-2 respectively; among them, the error coordinates (Δx, Δy, Δz) of the fruit position and the mechanical claw position are used to establish the three-dimensional position data error value of the fruit and the mechanical claw, and input it into the three-dimensional position data difference calculation module of the Simulink fruit picking mechanical system controller simulation model. The mathematical model is: (5).

[0036] Specifically, in this implementation step, the individual position update strategy in the learning phase of the standard growth optimization algorithm is improved. In the learning phase, a multi-directional exploration strategy that imitates individuals with high fitness values ​​is introduced to obtain an improved individual position update strategy in the learning phase. The specific steps are: Step 1: Calculate the Euclidean distance between the current individual and the other N-1 individuals. The individuals with a distance less than R are regarded as the neighboring individuals of the current individual. Update the position of the current individual according to the position of the neighboring individuals. The mathematical model is: (9); In formula (9), is the number of individuals in the neighborhood R of the current individual; is the position vector generated by the ith individual based on the yth neighboring individual, where y=1,2,...,n; is the neighborhood solution set of the tth iteration The position vector of the y-th neighborhood individual in ; is the position vector of the i-th individual in the t-th iteration; Step 2: Imitate individuals with small fitness values ​​in the population. The mathematical model is: (10); In formula (10), is the position vector of the i-th individual in the t+1th iteration, is the position vector generated by the ith individual based on the yth neighboring individual, where y=1,2,...,n, and is a dynamic weight factor to ensure that information from different sources is reasonably integrated. is the optimal individual position vector of the global population, From the fitness value closest The individual position vector of Step 3: Take the best result based on the multi-directional search results and improve the single-directional guidance method. The specific method is as follows: The n candidate solutions generated by the i-th individual The fitness values ​​are , select the optimal candidate solution to update the position vector of the i-th individual, and the mathematical model is: ;in, is the first candidate solution of the ith individual in the t+1th iteration, is the second candidate solution of the ith individual in the t+1th iteration, is the nth candidate solution of the ith individual in the t+1th iteration, is the fitness value of the individual position, is the minimum value function.

[0037] Furthermore, based on the design of the attenuation factor (AF) in the standard growth optimization algorithm (GO), the attenuation factor is dynamically adjusted using the average amplitude of the position change between the current iteration individual and the previous generation individual in the population. The improved mathematical model of the attenuation factor is: (11); In the formula, is the improved attenuation factor value of the tth iteration, is the maximum number of iterations, is the population activity of the tth iteration, and the mathematical model is: (12); In the formula, is the maximum activity of the population when it is initialized, The largest population size, is the position value of the j-th dimension of the ith individual in the t-th iteration, is the position value of the j-th dimension of the i-th individual in the t-1-th iteration.

[0038] Furthermore, the mathematical model of the individual position update strategy in the reflection phase of the growth optimization algorithm is improved by using the improved attenuation factor and introducing the optimal individual position of the current population to guide the individual position update. The mathematical model is: (13); In the formula, is the position vector of the i-th individual in the t+1th iteration, is the position vector of the i-th individual in the t-th iteration, UB and LB are the upper and lower limits of the individual position vector, r is a random number between 0 and 1, is the optimal individual position vector of the population at the tth iteration, and p is the control parameter.

[0039] Furthermore, if Figure 2 As shown in the figure, the improved individual position update strategy in the learning phase is used to improve the standard growth optimization algorithm; the improved growth optimization algorithm is used to optimize the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm. The specific steps are as follows: S31, encode the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller into a space vector U with a dimension of 3, and compare the space vector with the position vector of the i-th individual of the improved growth optimization algorithm Create a mapping; S32, setting the maximum number of iterations T of the improved growth optimization algorithm, the problem dimension D, the maximum size of the population N, the upper limit UB and lower limit LB of the individual position vector, and randomly initializing the position vector value of each individual; S33, use the objective function to calculate the fitness value of each individual's current position, and retain the current minimum fitness value The corresponding individual position is used as the optimal individual position vector of the population in the tth iteration ; Update the optimal individual position vector of the global population according to formula (14); (14); In the formula, is the optimal individual position vector of the global population, is the fitness value of the optimal individual position vector of the global population; Among them, the mathematical model of the objective function is: (15); In the formula, is the objective function, e(t) is the error value of the three-dimensional position data between the fruit and the mechanical claw at the tth moment; S34, if the current number of iterations t satisfies t>T, the optimal individual position vector output of the current global population is analytically assigned to the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller; otherwise, the individual position update mathematical model of the improved growth optimization algorithm is executed; S35, using the improved individual position update strategy in the learning phase to update the positions of the N individuals, calculating the improved attenuation factor value of the t-th iteration, and establishing the individual position update strategy in the reflection phase according to the attenuation factor value to update the positions of the N individuals; S36, limiting the updated individual position vector within the range of the individual position vector upper limit UB and lower limit LB; the number of iterations is incremented by one, and the process returns to execute S33.

[0040] S4, the fruit picking mechanical system controller superimposes the Δu(t) to the robot arm control signal u(t-1) at the previous moment to output the robot arm control signal u(t) at the current moment; the robot arm control signal at the current moment controls the movement of the robot arm; and at the same time, the real-time three-dimensional position of the robot arm claw is Feedback is given to S2, and S2 to S4 are executed cyclically to achieve Δu(t) being zero, thereby completing the optimization of the controller of the fruit picking mechanical system.

[0041] Specifically, in this implementation step, the output of the fruit picking mechanical system controller is changed by the output of the enhanced incremental PID algorithm Δu(t) until the error value of the three-dimensional position data of the fruit and the mechanical claw tends to zero, that is, the output of the enhanced incremental PID algorithm Δu(t) tends to zero, and the feedback of the fruit picking mechanical system controller ends. The mathematical model is: (6); Where u(t-1) is the robot control signal at the previous moment, and u(t) is the robot control signal at the current moment.

[0042] Furthermore, a three-degree-of-freedom electrical adjustment model of the robotic arm is established in Matlab to convert a single control signal into multiple groups of control signals, and the robotic arm control signal is converted into a three-dimensional array. The first dimension data of the array is the control signal increment of the first degree of freedom of the robotic arm, which controls the yaw angle, the second dimension data is the control signal increment of the second degree of freedom of the robotic arm, which controls the telescopic length, and the third dimension data is the control signal increment of the third degree of freedom of the robotic arm, which controls the pitch angle.

[0043] Furthermore, the mathematical model of the method of the present invention is designed in Matlab, the maximum number of iterations T=100 is initialized, the problem dimension D=3, the maximum population size N=20, the upper limit UB=110 and the lower limit LB=0.001 of the individual position vector, and the fitness value calls the objective function. The code is as follows: Dim = 3; Pop =20; f = @(x) AGO_PID(x); Max_iter = 100; ub = 110; lb = 0.001; Then, the improved growth optimization algorithm is mapped to the incremental PID control algorithm of the fruit picking mechanical system controller. The code is as follows: [Best_f,Best_X,val,curve_f]=AGO(Max_iter,lb,ub,Dim,f); where Best_f represents the minimum fitness value, curve_f represents the fitness value, val represents the control parameter of the three-dimensional incremental PID control algorithm, and Best_X represents the individual optimal position.

[0044] Furthermore, a simulation model of a fruit picking mechanical system controller was established in Simulink, including a fruit and mechanical claw position data input module, an incremental PID algorithm module, a fruit and mechanical claw three-dimensional position data difference calculation module, a mechanical claw real-time position data feedback module, a robotic arm control output module and an objective function model; the control parameters of the incremental PID control algorithm at the minimum fitness value were input into the incremental PID algorithm module, and the code sim('AGO_Model') was run to complete the closed-loop control of the fruit picking mechanical system controller.

[0045] like Figure 3As shown, from the comparison diagram of the minimum fitness value of each iteration in the optimization process of the standard growth optimization algorithm (GO) and the improved growth optimization algorithm (AGO), it can be found that in the early stage of iteration, both algorithms show a rapid decline in fitness value, but the decline rate of GO-PID is slightly lower than that of AGO-PID, and in the early stage of iteration, the minimum fitness value of the improved growth optimization algorithm is lower than the fitness value of the standard growth optimization algorithm (GO), indicating that the improved growth optimization algorithm (AGO) shows a faster speed and higher accuracy in the early stage of optimization; at 48 iterations, the fitness value of the standard growth optimization algorithm (GO) remains stable and no longer continues to decrease, reaching its minimum fitness value for optimization; at 52 iterations, the improved growth optimization algorithm (AGO) reaches its minimum fitness value for optimization. By comparison, it can be found that the fitness value of the improved growth optimization algorithm (AGO) is smaller than that of the standard growth optimization algorithm (GO), indicating that the improved growth optimization algorithm (AGO) proposed in the present invention has a better control parameter optimization effect on the PID control algorithm of the fruit picking machinery system controller.

[0046] like Figure 4 As shown in the figure, from the control parameter optimization process change diagram of the incremental PID control algorithm of the fruit picking machinery system controller, it can be found that the changes in the Kp, Ki, and Kd parameters of the incremental PID control algorithm in the optimization process of the improved growth optimization algorithm (AGO) are stable after about 52 iterations, and the optimal Kp, Ki, and Kd parameters are 4.3058, 0.530887, and 1.23167, respectively; the optimal control parameters are input into the incremental PID algorithm module of the Simulink simulation model of the fruit picking machinery system controller, the target value is set to 5 times the unit step signal, and the control effect of the fruit picking machinery system controller is output after running for 20 seconds, as shown in the figure. Figure 5 As shown, a standard PID control algorithm was added during the experiment for comparison. From the control effects of the three control algorithms for the fruit picking machinery system controller, it can be found that when the improved growth optimization algorithm optimizing the incremental PID control algorithm (AGO-PID) method proposed in the present invention is used for the fruit picking machinery system controller, it has better control speed and control accuracy than the other two methods, which is reflected in the early control overshoot. The method of the present invention has no overshoot, while the overshoot of other methods reaches about 6 to 7; in terms of control speed, the control method of the present invention reaches the target value of 5 units in about 7 seconds, and there is almost no fluctuation, which shows that the fruit picking machinery system controller optimization method proposed in the present invention is better.

Claims

1. A method for optimizing a controller of a fruit picking machine system, characterized in that: Specifically include: S1. Establish the position of the fruit and the mechanical claw in the same three-dimensional space, and locate the three-dimensional position of the fruit through the visual sensor , while calculating the real-time 3D position of the robot gripper ; S2, calculating the error coordinates (Δx, Δy, Δz) between the fruit position and the mechanical claw position through the three-dimensional position of the fruit and the real-time mechanical claw, and establishing the three-dimensional position data error value of the fruit and the mechanical claw; S3, input the error value to the enhanced incremental PID algorithm module for processing, and output the output Δu(t) of the enhanced incremental PID algorithm at the current moment; the enhanced incremental PID algorithm module is a fusion of the improved growth optimization algorithm module and the incremental PID algorithm module, and the specific method is: using the improved growth optimization algorithm to adjust the control parameters of the incremental PID algorithm to obtain the enhanced incremental PID algorithm, and the enhanced incremental PID algorithm is used for the fruit picking machinery system controller; S4, the fruit picking mechanical system controller superimposes the Δu(t) to the mechanical arm control signal u(t-1) at the previous moment to output the mechanical arm control signal u(t) at the current moment; the mechanical arm control signal at the current moment controls the movement of the mechanical arm; At the same time, the real-time three-dimensional position of the robot arm claw Feedback is given to S2, and S2 to S4 are executed cyclically until Δu(t) is zero, thereby completing the optimization of the controller of the fruit picking machinery system.

2. A method for optimizing a fruit picking machine system controller according to claim 1, characterized in that: The fruit picking mechanical system includes two parts: a mechanical arm and a mechanical claw of a fruit picking robot. The mechanical claw is connected to the end of the mechanical arm, and the angle and distance of the mechanical claw are adjusted by the fruit picking mechanical arm; the fruit picking mechanical system controller includes a fruit and mechanical claw position data input module, an incremental PID algorithm module, a fruit and mechanical claw three-dimensional position data difference calculation module, a mechanical claw real-time position data feedback module, and a mechanical arm control output module, wherein the mechanical arm control output module outputs a current moment mechanical arm control signal u(t), and the control signal u(t) controls the movement of the mechanical arm, and the mathematical model is: (6); Where u(t-1) is the robot control signal at the previous moment, and u(t) is the robot control signal at the current moment.

3. A method for optimizing a fruit picking machine system controller according to any one of claims 1 to 2, characterized in that: The incremental PID algorithm module is improved to obtain an enhanced incremental PID algorithm module, wherein the improved growth optimization algorithm in the enhanced incremental PID algorithm module is specifically implemented as follows: in the learning phase, a multi-directional exploration strategy that imitates individuals with high fitness values ​​is introduced to obtain an improved individual position update strategy in the learning phase, and the specific steps are as follows: Step 1: Calculate the Euclidean distance between the current individual and the other N-1 individuals. The individuals with a distance less than R are regarded as the neighboring individuals of the current individual. Update the position vector of the current individual according to the positions of the n neighboring individuals. There are n position vectors in total, corresponding to n neighboring individuals. The mathematical model is: (9); In formula (9), is the number of individuals in the neighborhood R of the current individual; is the position vector generated by the ith individual based on the yth neighboring individual, where y=1,2,...,n; is the neighborhood solution set of the tth iteration The position vector of the y-th neighborhood individual in ; is the position vector of the i-th individual in the t-th iteration; Step 2: imitate the individuals with small fitness values ​​in the population to update the n values ​​of the position vector of the i-th individual. The mathematical model is: (10); In formula (10), is the yth position vector of the ith individual at the t+1th iteration, where y=1,2,...,n, and is a dynamic weight factor to ensure that information from different sources is reasonably integrated. is the optimal individual position vector of the global population, From the fitness value closest The individual position vector of is the yth position vector of the ith individual in the tth iteration; Step 3: Take the best result based on the multi-directional search results, improve the single-directional guidance method, and update the position vector of the i-th individual. The specific method is: The n position vectors generated by the i-th individual The fitness values ​​are , select the optimal candidate solution to update the position vector of the i-th individual, and the mathematical model is: ;in, is the first candidate solution of the ith individual in the t+1th iteration, is the second candidate solution of the ith individual in the t+1th iteration, is the nth candidate solution of the ith individual in the t+1th iteration, is the fitness function, is the minimum value function.

4. A method for optimizing a fruit picking machine system controller according to claim 3, characterized in that: The improved growth optimization algorithm includes dynamically adjusting the attenuation factor by using the average amplitude of the position change between the current iteration individual and the previous generation individual of the population. The improved mathematical model of the attenuation factor is: (11); In the formula, is the improved attenuation factor value of the tth iteration, is the maximum number of iterations, is the population activity of the tth iteration, and the mathematical model is: (12); In the formula, is the maximum activity of the population when it is initialized, The largest population size, is the position value of the j-th dimension of the ith individual in the t-th iteration, is the position value of the j-th dimension of the i-th individual in the t-1-th iteration.

5. A method for optimizing a fruit picking machine system controller according to claim 4, characterized in that: By using the improved attenuation factor and introducing the optimal individual position of the current population to guide the individual position update, the mathematical model of the individual position update strategy in the reflection phase of the growth optimization algorithm is improved. The mathematical model is: (13); In the formula, is the position vector of the i-th individual in the t+1th iteration, is the position vector of the i-th individual in the t-th iteration, UB and LB are the upper and lower limits of the individual position vector, r is a random number between 0 and 1, is the optimal individual position vector of the population at the tth iteration, and p is the control parameter.

6. A method for optimizing a fruit picking machine system controller according to claim 5, characterized in that: The enhanced incremental PID algorithm includes: using the improved individual position update strategy in the learning phase and the individual position update strategy in the reflection phase to improve the standard growth optimization algorithm, and using the improved growth optimization algorithm to optimize the proportional coefficient, integral coefficient and differential coefficient of the incremental PID algorithm. The specific steps are: S31, encode the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller into a space vector U with a dimension of 3, and compare the space vector with the position vector of the i-th individual of the improved growth optimization algorithm Create a mapping; S32, setting the maximum number of iterations T of the improved growth optimization algorithm, the problem dimension D, the maximum size of the population N, the upper limit UB and lower limit LB of the individual position vector, and randomly initializing the position vector value of each individual; S33, use the objective function to calculate the fitness value of each individual's current position, and retain the current minimum fitness value The corresponding individual position is used as the optimal individual position vector of the population in the tth iteration ; Update the optimal individual position vector of the global population according to formula (14); (14); In the formula, is the optimal individual position vector of the global population, is the fitness value of the optimal individual position vector of the global population; Among them, the mathematical model of the objective function is: (15); In the formula, is the objective function, e(t) is the error value of the three-dimensional position data between the fruit and the mechanical claw at the tth moment; S34, if the current number of iterations t satisfies t>T, the optimal individual position vector output of the current global population is analytically assigned to the control parameters of the incremental PID algorithm of the fruit picking mechanical system controller; otherwise, the individual position update mathematical model of the improved growth optimization algorithm is executed; S35, using the improved individual position update strategy in the learning phase to update the positions of the N individuals, calculating the improved attenuation factor value of the t-th iteration, and establishing the individual position update strategy in the reflection phase according to the attenuation factor value to update the positions of the N individuals; S36, limiting the updated individual position vector within the range of the individual position vector upper limit UB and lower limit LB; the number of iterations is incremented by one, and the process returns to execute S33.

Citation Information

Patent Citations

  • Optimization design method of controller of multi-degree-of-freedom mechanical arm system

    CN110450155A

  • Grabbing path control method of sphere-like fruit picking mechanical arm

    CN114029945A

  • Hydraulic mechanical arm high-precision control method and system based on data driving

    CN115741692A

  • Multi-robot cooperative grabbing method and system based on meta-heuristic algorithm

    CN116460843A

  • THGS-PID-based vegetable hydroponic nutrition self-adaptive regulation and control method

    CN118011782A