Injection molding manipulator attitude control method based on improved fruit fly optimization algorithm
By dynamically adjusting the single flight distance of parameters in the fruit fly optimization algorithm, combining historical working data and vibration difference coefficients, the attitude control of the injection molding manipulator is realized, solving the problem of unreasonable equipment parameter settings and improving work quality and efficiency.
Patent Information
- Application Number
- CN202510235123.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-02-28
AI Technical Summary
The fixed single flight distance of the parameters in the fruit fly optimization algorithm leads to unreasonable settings of the injection molding machine equipment, resulting in increased vibration of the robot and decreased working quality.
By collecting historical working data of injection molding robots, adjusting the parameter single flight distance in the fruit fly optimization algorithm, using the differences between the local optimal solution and the global optimal solution, obtaining the optimal difference curve and optimal solution distance, and combining the vibration difference coefficient, dynamically adjusting the single flight distance to achieve robot attitude control.
It effectively solves the problem of unreasonable equipment parameter setting caused by fixed parameters in the single flight distance in the fruit fly optimization algorithm, reduces the vibration of the robot, and improves the working quality and the efficiency of determining equipment parameters.
Smart Images

Figure CN119704207A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of robot posture control, and in particular to an injection molding robot posture control method based on an improved fruit fly optimization algorithm. Background Art
[0002] An injection molding machine is a device that makes thermoplastics into plastic products of various shapes. Generally, a robot is used for injection molding to ensure the safety of the injection molding process. In order to shorten the molding cycle of injection molding products, the equipment parameters of the injection molding machine are generally adjusted continuously to increase the operating speed of the robot of the injection molding machine. It is understandable that the operating speed of the robot of the injection molding machine cannot be increased indefinitely. When the operating speed of the robot is increased, due to the influence of inertia, the vibration amplitude of the robot is also increasing, resulting in an increase in the time it takes for the robot to return to a steady state, affecting the working quality of the robot. Therefore, an optimization algorithm is generally used to determine the equipment parameters of the injection molding machine so that the injection molding machine can achieve a balance between the quality of operation and the molding cycle, while ensuring the quality of the injection molding operation and reducing the molding cycle of the injection molding product.
[0003] The fruit fly optimization algorithm focuses on the overall collaboration and information sharing among groups, and has good global optimization capabilities, so the fruit fly optimization algorithm can be used to determine the equipment parameters of the injection molding machine. However, the single flight distance of the parameter in the fruit fly optimization algorithm is fixed. When the value of the single flight distance of the parameter is too small, the distribution of different fruit flies is too dense, which easily leads to the emergence of local optimal problems, making the determined equipment parameters of the injection molding machine not the optimal equipment parameters; when the value of the single flight distance of the parameter is too large, the positions corresponding to different iterative processes may frequently iterate and hover near the optimal solution, resulting in the optimized position obtained by the iteration cannot accurately fall at the optimal solution, causing the equipment parameters of the injection molding machine to change repeatedly, affecting the efficiency of determining the equipment parameters of the injection molding machine. Therefore, it is necessary to appropriately adjust the value of the single flight distance of the parameter in the fruit fly optimization algorithm in the process of determining the equipment parameters of the injection molding machine. Summary of the invention
[0004] The present invention provides an injection molding manipulator posture control method based on an improved fruit fly optimization algorithm to solve the problem of unreasonable equipment parameter setting of an injection molding machine caused by a fixed value of a single flight distance parameter in the fruit fly optimization algorithm. The technical solution adopted is as follows: An embodiment of the present invention provides an injection molding robot posture control method based on an improved fruit fly optimization algorithm, the method comprising the following steps: Collect multiple historical working data of the injection molding robot, and set the initial value of the single flight distance of the parameter of the fruit fly optimization algorithm, wherein the historical working data includes the starting position, end position and angular velocity of each joint of the robot; Any iteration of the fruit fly optimization algorithm except the first iteration is recorded as the target iteration. According to the position difference between the local optimal solution obtained by the target iteration and the global optimal solution, the optimal difference curve of the target iteration is obtained. According to the position difference between the global optimal solution obtained by the target iteration and the fruit fly, and the fitting effect difference between the optimal difference curves of the target iteration and the previous iteration of the target iteration, the optimal solution distance of the target iteration is obtained. According to the distance between the starting position and the end position of the joint of the injection molding robot at each moment, and the angular velocity, the movement time of each joint of the injection molding robot in each iteration is determined, and according to the difference between the global optimal solution of the target iteration and all previous iterations, the difference between the movement time of all joints of the injection molding robot in the target iteration and all previous iterations, and the difference between the angular displacement of all joints of the injection molding robot in the target iteration and all previous iterations, the vibration difference coefficient of the target iteration is obtained; According to the distance and vibration difference coefficient between the fruit flies of the target iteration, the local optimal degree of the target iteration is obtained. According to the numerical relationship between the local optimal degree of the target iteration and the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration, the single flight distance of the target iteration is determined. The fruit fly optimization algorithm is used to obtain the real-time working data of the injection molding robot and realize the posture control of the injection molding robot.
[0005] Furthermore, the specific method for obtaining the optimal difference curve of the target iteration is: The Euclidean distance between the local optimal solution obtained by the target iteration and the global optimal solution is recorded as the optimal difference of the target iteration; The optimal difference between the target iteration and each iteration before the target iteration is taken as the dependent variable, the number of iterations corresponding to the dependent variable is taken as the dependent variable, and curve fitting is performed on the dependent variable and the dependent variable to obtain the optimal difference curve of the target iteration.
[0006] Furthermore, the optimal solution distance of the target iteration is obtained by: The ratio of the goodness of fit of the optimal difference curve of the target iteration to the iteration before the target iteration is recorded as the first ratio of the target iteration; The optimal solution distance of the target iteration is obtained according to the first ratio of the target iteration and the distance between the fruit flies of the target iteration.
[0007] Further, the method of obtaining the optimal solution distance of the target iteration according to the first ratio of the target iteration and the distance between the fruit flies of the target iteration includes the following specific methods: Select a second preset threshold number of fruit flies that are closest to the Euclidean distance of the global optimal solution obtained by the target iteration, and record the average of the Euclidean distances between the positions of the second preset threshold number of fruit flies selected and the global optimal solution as the fruit fly distribution difference of the target iteration; Record the absolute value of the difference between the number 1 and the first ratio of the target iteration as the first absolute difference of the target iteration, and record the product of the first absolute difference of the target iteration and the second preset threshold as the first product of the target iteration; The ratio of the fruit fly distribution difference of the target iteration to the first product of the target iteration is recorded as the optimal solution distance of the target iteration.
[0008] Further, the movement time of each joint of the injection molding manipulator in each iteration is determined according to the distance between the starting position and the end position of the joint of the injection molding manipulator at each moment, as well as the angular displacement and angular velocity, including the specific method of: Determine the angular displacement of the joint of the injection molding robot according to the distance between the starting position and the end position of the joint of the injection molding robot at each moment, and the angular velocity; The first-order derivative of the angular displacement of the joint of the injection molding robot is calculated, and the maximum value of all the values at the time when the value of the first-order derivative is equal to 0 is recorded as the movement time of the joint of the injection molding robot.
[0009] Furthermore, the specific method for obtaining the angular displacement of the joint of the injection molding robot is as follows: The number 0 is used as the constant term of the cubic polynomial, the angular velocity of the joints of the injection molding robot at the initial moment, the first-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment, and the second-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment are used as the coefficients of the first-order term, the second-order term, and the third-order term of the cubic polynomial respectively, the analyzed moment is used as the independent variable, and the calculated value of the cubic polynomial is used as the angular displacement of the joints of the injection molding robot at the analyzed moment.
[0010] Furthermore, the vibration difference coefficient of the target iteration is obtained by: In the formula, Represents the target iteration The vibration difference coefficient; Represents the target iteration And the mean of the Euclidean distances between every two global optimal solutions in all previous iterations; Indicates the number of joints of the injection molding robot; Indicates the injection molding robot joints at target iteration exercise time; Indicates the injection molding robot joints at target iteration The mean of the motion time of all previous iterations; Indicates the injection molding robot joints at target iteration Angular displacement; Indicates the injection molding robot joints at target iteration The mean of the angular displacements of all previous iterations.
[0011] Furthermore, the local optimal degree of target iteration is obtained according to the distance and vibration difference coefficient between the fruit flies of the target iteration, including the specific method of: The ratio of the fruit fly distribution difference of the target iteration to the vibration difference coefficient is recorded as the local optimality of the target iteration.
[0012] Further, the specific method of determining the single flight distance of the target iteration includes: In the formula, Represents the target iteration Single flight distance; represents a third preset threshold; represents a fourth preset threshold, wherein the value of the fourth preset threshold is less than the third preset threshold; represents the maximum value function; represents the minimum function; represents a natural constant; Represents the target iteration The single flight distance of the previous iteration; Represents the target iteration The average of the local optimality of all previous iterations; Represents the target iteration The local optimum level.
[0013] Furthermore, the real-time working data of the injection molding robot includes: The starting position, end position and angular velocity of each joint of the injection molding robot.
[0014] The beneficial effects of the present invention are: In the process of iteration according to the fruit fly optimization algorithm, the difference between the local optimal solution and the global optimal solution gradually decreases, and the extremely small difference corresponds to the feature that the search has been close to the final global optimal solution. The search results in the iteration process are analyzed, and the optimal solution distance of the target iteration is obtained according to the difference between the local optimal solution, the overall optimal solution and the fruit fly position. The optimal solution distance of the target iteration is an evaluation of the possibility of the target iteration falling into the local optimal solution; further, according to the characteristics that the vibration of the injection molding manipulator intensifies and the stability decreases when the single flight distance of the parameter changes greatly, according to the difference between the global optimal solutions obtained in different iteration processes, the difference between the movement times, and the degree of change of the equipment parameters of the injection molding machine, the vibration difference coefficient of the target iteration is obtained, and further combined with the optimal solution distance of the target iteration and the single flight distance of the previous iteration of the target iteration, the single flight distance of the target iteration is determined, and the fruit fly optimization algorithm is used to obtain real-time working data of the injection molding manipulator, to realize the posture control of the injection molding manipulator, and solve the problem of unreasonable equipment parameter setting of the injection molding machine caused by the fixed value of the single flight distance of the parameter in the fruit fly optimization algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 A schematic flow chart of a method for controlling the posture of an injection molding robot based on an improved fruit fly optimization algorithm provided by an embodiment of the present invention; Figure 2 A flowchart for obtaining the optimal solution distance provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] See also Figure 1 , which shows a flow chart of an injection molding robot posture control method based on an improved fruit fly optimization algorithm provided by an embodiment of the present invention, the method comprising the following steps: Step S001, collecting multiple historical working data of the injection molding robot, and setting the initial value of the single flight distance parameter of the fruit fly optimization algorithm, wherein the historical working data includes the starting position, end position and angular velocity of each joint of the robot.
[0019] Collect the latest data of the robot of the injection molding machine from the historical data of the injection molding machine The work data.
[0020] Among them, the robot of the injection molding machine is the injection molding robot, and each working data includes the starting position, end position and angular velocity of each joint of the robot; It is the first preset threshold. In this embodiment, the value of the first preset threshold is 100. In actual application, as other implementation methods, the implementer can decide the data type contained in the working data and the value of the first preset threshold according to the actual situation. This application does not impose any special restrictions.
[0021] The parameters of the fruit fly optimization algorithm are set. Specifically, the number of fruit flies participating in the optimization is set to the first preset threshold. , the maximum iteration number of the system is set to 100, and the initial single flight distance is set to 0.5. The shortest movement time of the injection molding robot from the starting position to the specified position is taken as the planning goal, that is, the position of the fruit fly is adjusted in each iteration process, and at the same time, the value of the single flight distance parameter is adjusted according to the position of the fruit fly to achieve the shortest movement time of the fruit fly from the starting position to the specified position.
[0022] The definitions of parameters and planning objectives of the fruit fly optimization algorithm are well-known techniques and will not be described in detail.
[0023] At this point, multiple historical working data of the injection molding robot are obtained, and the parameters of the fruit fly optimization algorithm are set.
[0024] Step S002: record any iteration of the fruit fly optimization algorithm except the first iteration as the target iteration, obtain the optimal difference curve of the target iteration according to the position difference between the local optimal solution and the global optimal solution obtained by the target iteration, and obtain the optimal solution distance of the target iteration according to the position difference between the global optimal solution obtained by the target iteration and the fruit fly, and the difference in fitting effects between the optimal difference curves of the target iteration and the iteration before the target iteration.
[0025] In the process of iterating using the fruit fly optimization algorithm, each iteration can obtain a local optimal solution and a global optimal solution. When the difference between the local optimal solution and the global optimal solution obtained in the same iteration is large, the difference between the global optimal solution obtained in this iteration and the final global optimal solution is large, and the current search is less likely to converge to the final global optimal solution. This situation generally occurs in the initial stage of the iteration; when the difference between the local optimal solution and the global optimal solution obtained in the same iteration is small, the difference between the global optimal solution obtained in this iteration and the final global optimal solution is small, and the current search is more likely to be close to the final global optimal solution. However, when the iteration process falls into the local optimal solution, features similar to those that are close to the final global optimal solution will also appear, leading to misjudgment of the search results. Therefore, the possibility of falling into the local optimal solution in each iteration should be evaluated to prevent interference from the local optimal solution.
[0026] Among them, the local optimal solution and global optimal solution obtained in each iteration include the starting position, end position and angular velocity of each joint of the injection molding robot.
[0027] Any iteration of the fruit fly optimization algorithm except the first iteration is recorded as the target iteration. This embodiment is described by taking any iteration except the first iteration as an example.
[0028] The Euclidean distance between the local optimal solution and the global optimal solution obtained by the target iteration is recorded as the optimal difference of the target iteration, and the optimal difference of the target iteration and each iteration before the target iteration is obtained. The optimal difference of the target iteration and each iteration before the target iteration is used as the dependent variable, and the number of iterations is used as the dependent variable. The dependent variable and the dependent variable are curve-fitted to obtain the optimal difference curve of the target iteration. The goodness of fit of the optimal difference curve of the target iteration is obtained.
[0029] The Euclidean distance between the local optimal solution and the global optimal solution is the sum of the Euclidean distances between the same type of data corresponding to all local optimal solutions and the global optimal solution. It can be understood that the fruit fly optimization algorithm is used to iterate the working data of the injection molding robot to select the setting method of the optimal working data.
[0030] The goodness of fit of the optimal difference curve is an evaluation of the fitting effect of the optimal difference curve. The better the fitting effect, the greater the goodness of fit. This embodiment uses polynomial fitting technology to perform curve fitting. Using polynomial fitting technology to perform curve fitting and calculating the goodness of fit of the fitting curve are both well-known technologies and will not be described in detail. As other implementation methods, on the basis of achieving the purpose of performing curve fitting, the implementer can use other existing methods such as the least squares method to fit the curve, and this application does not make any special restrictions.
[0031] Select the solution with the closest Euclidean distance to the global optimal solution obtained by the target iteration. A fruit fly, this The average of the Euclidean distances between the positions of the fruit flies and the global optimal solution is recorded as the fruit fly distribution difference of the target iteration. is the second preset threshold. In this embodiment, the value of the second preset threshold is 30.
[0032] When the difference in the fruit fly distribution of the target iteration is greater, the distance between the fruit fly and the global optimal solution is greater, the current search is less likely to converge to the final global optimal solution, and the target iteration is more likely to be still in the initial stage of the iteration.
[0033] The optimal solution distance of the target iteration is obtained according to the difference in fruit fly distribution of the target iteration and the difference in fitting effect between the optimal difference curves of the target iteration and the previous iteration of the target iteration.
[0034] Preferably, as an embodiment of the present application, the ratio of the goodness of fit of the optimal difference curve of the target iteration and the previous iteration of the target iteration is recorded as the first ratio of the target iteration, the absolute value of the difference between the number 1 and the first ratio of the target iteration is recorded as the first absolute difference of the target iteration, and the product of the first absolute difference of the target iteration and the second preset threshold is recorded as the first product of the target iteration; the ratio of the fruit fly distribution difference of the target iteration and the first product of the target iteration is recorded as the optimal solution distance of the target iteration.
[0035] Specifically, the expression of the optimal solution distance of the target iteration is: In the formula, Represents the target iteration The optimal solution distance; Represents the target iteration differences in the distribution of fruit flies; Represents the target iteration The goodness of fit of the optimal difference curve; Represents the target iteration The goodness of fit of the optimal difference curve of the previous iteration; Indicates the second preset threshold.
[0036] When the difference in the distribution of fruit flies of the target iteration is greater, the distance to the optimal solution of the target iteration is greater. At this time, the greater the distance between the fruit flies and the global optimal solution, the greater the possibility that the target iteration is still in the initial stage of the iteration, and the smaller the possibility that the target iteration falls into the local optimal solution. At the same time, when the difference in the fitting effect of the optimal difference curve of the target iteration and the previous iteration of the target iteration is smaller, the possibility that the target iteration falls into the local optimal solution is smaller. At this time, the distance to the optimal solution of the target iteration is greater.
[0037] At this point, the optimal solution distance of the target iteration is obtained. The optimal solution distance acquisition flow chart is as follows: Figure 2 shown.
[0038] Step S003, determine the movement time of each joint of the injection molding robot in each iteration according to the distance between the starting position and the end position of the joints of the injection molding robot at each moment, and the angular velocity, and obtain the vibration difference coefficient of the target iteration according to the difference between the global optimal solution of the target iteration and all previous iterations, the difference between the movement time of all joints of the injection molding robot in the target iteration and all previous iterations, and the difference between the angular displacement of all joints of the injection molding robot in the target iteration and all previous iterations.
[0039] During the iteration of the fruit fly optimization algorithm, the equipment parameters of the injection molding machine will change with the iteration results. When the difference between the results of two adjacent iterations is large, the equipment parameters of the injection molding machine will also change greatly. When the single flight distance of the parameter is determined only based on the iteration results, the equipment parameters of the injection molding machine corresponding to the final result of the iteration may cause the injection molding robot to work under high angular velocity and high vibration conditions. However, such a working state will affect the working stability of the robot. Therefore, it is necessary to consider the motion state of the injection molding robot in the process of determining the single flight distance of the parameter.
[0040] For each iteration of the fruit fly optimization algorithm, a cubic polynomial is used to determine the angular displacement of the joints of the injection molding robot according to the angular displacement and angular velocity of the joints of the injection molding robot at each moment.
[0041] Specifically, as an embodiment of the present application, the angular displacement of the joints of the injection molding robot at the initial moment is used as the constant term of the cubic polynomial, the angular velocity of the joints of the injection molding robot at the initial moment, the first-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment, and the second-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment are used as the coefficients of the linear term, the quadratic term, and the cubic term of the cubic polynomial respectively, the analyzed moment is used as the independent variable, and the calculated value of the cubic polynomial is used as the angular displacement of the joints of the injection molding robot at the analyzed moment.
[0042] Specifically, the calculation formula for the angular displacement of the joints of the injection molding robot is: in, Injection molding robot The joints in Angular displacement at time Injection molding robot Angular displacement of each joint at the initial moment; Injection molding robot The angular velocity of each joint at the initial moment; Injection molding robot The joints in The first derivative of the angular velocity at time; Injection molding robot The joints in The second derivative of the angular velocity at time .
[0043] Since all joints of the injection molding robot are stationary at the initial moment, the angular displacement of all joints of the injection molding robot at the initial moment is 0. The angular displacement at the moment is the injection molding robot joint at The Euclidean distance between the position at the moment and the starting position of the injection molding robot joint in this iteration.
[0044] The first-order derivative of the angular displacement of the joint of the injection molding robot is calculated, and the maximum value of all the values at the time when the value of the first-order derivative is equal to 0 is recorded as the movement time of the joint of the injection molding robot.
[0045] It can be understood that the maximum value of all the values at the time when the first-order derivative of the angular displacement is equal to 0 must be greater than zero, so the movement time of the joint of the injection molding robot is greater than zero.
[0046] In the iterative process of the fruit fly optimization algorithm, when the global search range is larger, the average vibration of the injection molding robot corresponding to the global optimal solution of each iteration can more accurately represent the vibration state of the injection molding robot. At the same time, when the vibration of the injection molding robot corresponding to the global optimal solution of each iteration is more different from the average vibration of the injection molding robot, the vibration of the injection molding robot is more serious.
[0047] The vibration difference coefficient of the target iteration is obtained according to the difference between the global optimal solution of the target iteration and all previous iterations, the difference between the motion time of all joints of the injection molding robot in the target iteration and all previous iterations, and the difference between the angular displacement of all joints of the injection molding robot in the target iteration and all previous iterations.
[0048] Preferably, as an embodiment of the present application, the calculation formula of the vibration difference coefficient of the target iteration is: In the formula, Represents the target iteration The vibration difference coefficient; Represents the target iteration And the mean of the Euclidean distances between every two global optimal solutions in all previous iterations; Indicates the number of joints of the injection molding robot; Indicates the injection molding robot joints at target iteration exercise time; Indicates the injection molding robot joints at target iteration The mean of the motion time of all previous iterations; Indicates the injection molding robot joints at target iteration Angular displacement; Indicates the injection molding robot joints at target iteration The mean of the angular displacements of all previous iterations.
[0049] The vibration difference coefficient of the target iteration is used to measure the vibration of the injection molding robot during the target iteration. When the difference between the global optimal solution of the target iteration and all previous iterations is greater, the global search area in the iteration of the fruit fly optimization algorithm is larger, and the vibration of the injection molding robot is more intense. At this time, the vibration difference coefficient of the target iteration is larger. When the difference between the movement time of all joints of the injection molding robot in the target iteration and all previous iterations is greater relative to the difference between the angular displacements, the vibration of the injection molding robot is more intense. At this time, the vibration difference coefficient of the target iteration is larger.
[0050] At this point, the vibration difference coefficient of the target iteration is obtained.
[0051] Step S004, according to the distance between the fruit flies of the target iteration and the vibration difference coefficient, the local optimal degree of the target iteration is obtained, and the single flight distance of the target iteration is determined according to the numerical relationship between the local optimal degree of the target iteration and the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration. The fruit fly optimization algorithm is used to obtain the real-time working data of the injection molding robot to realize the posture control of the injection molding robot.
[0052] When the possibility of the target iteration falling into the local optimal solution is greater, a larger value should be selected as the single flight distance so that the next iteration can jump out of the local optimal problem; when the vibration of the injection molding robot is more severe during the target iteration, a smaller value should be selected as the single flight distance to reduce the vibration amplitude of the injection molding robot.
[0053] According to the fruit fly distribution difference and vibration difference coefficient of the target iteration, the local optimal degree of the target iteration is obtained. The local optimal degree of the target iteration is positively correlated with the fruit fly distribution difference of the target iteration, and negatively correlated with the vibration difference coefficient of the target iteration.
[0054] Preferably, as an embodiment of the present application, the ratio of the fruit fly distribution difference of the target iteration to the vibration difference coefficient is recorded as the local optimal degree of the target iteration.
[0055] Specifically, the expression of the local optimal degree of the target iteration is: In the formula, Represents the target iteration The local optimal degree of ; Represents the target iteration differences in the distribution of fruit flies; Represents the target iteration The vibration difference coefficient.
[0056] When the difference in fruit fly distribution of target iteration is greater and the vibration difference coefficient of target iteration is smaller, the local optimal degree of target iteration is greater. At this time, the possibility of target iteration falling into the local optimal solution is smaller. A larger value should be selected as the single flight distance to enhance the local search capability of the next iteration, so that the next iteration can jump out of the local optimal problem and reduce the possibility of target iteration falling into the local optimal solution. When the difference in fruit fly distribution of target iteration is smaller and the vibration difference coefficient of target iteration is larger, the local optimal degree of target iteration is greater. At this time, a smaller value should be selected as the single flight distance to improve the iteration quality.
[0057] The single flight distance of the target iteration is determined according to the numerical relationship between the local optimal degree of the target iteration and the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration.
[0058] In the formula, Represents the target iteration Single flight distance; represents a third preset threshold value. In this embodiment, the value of the third preset threshold value is 10; represents a fourth preset threshold value. In this embodiment, the value of the fourth preset threshold value is 0.1; It represents the maximum value function, which takes the maximum value of the values separated by commas in brackets; Represents the minimum function, which is used to find the minimum value of the values separated by commas in brackets; represents a natural constant; Represents the target iteration The single flight distance of the previous iteration; Represents the target iteration The average of the local optimality of all previous iterations; Represents the target iteration The local optimum level.
[0059] It should be noted that the value of the fourth preset threshold should be smaller than the third preset threshold.
[0060] It can be understood that when the target iteration is the second iteration of the fruit fly optimization algorithm, the single flight distance corresponding to the previous iteration of the target iteration is the initial value of the single flight distance parameter of the fruit fly optimization algorithm. In this embodiment, the initial value of the single flight distance is set to 0.5.
[0061] When the local optimality of the target iteration is less than or equal to the average of the local optimality of all iterations before the target iteration, the local optimality of the target iteration is smaller than the average level of the previous iterations, and a larger value should be selected as the single flight distance to enhance the local search capability of the next iteration and improve the iteration quality. At this time, the larger the single flight distance of the target iteration. When the local optimality of the target iteration is greater than the average of the local optimality of all iterations before the target iteration, the local optimality of the target iteration is larger than the average level of the previous iterations. At this time, the global search area in the iteration process increases significantly, and the more severe the vibration of the injection molding robot, the smaller the value should be selected as the single flight distance to reduce the vibration of the injection molding robot. At the same time, a smaller value of the single flight distance can enhance the local search capability and improve the convergence quality.
[0062] The single flight distance of the target iteration is taken as the value of the single flight distance of the parameter during the target iteration, and the fruit fly optimization algorithm is used to obtain the real-time working data of the injection molding robot. The parameters of the injection molding robot include the starting position, end position and angular velocity of each joint of the injection molding robot.
[0063] At this point, the posture control of the injection molding robot is realized, which ensures the working efficiency of the injection molding robot while ensuring the working quality of the injection molding robot and reducing the vibration of the injection molding robot.
[0064] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm, characterized in that: The method comprises the following steps: Collect multiple historical working data of the injection molding robot, and set the initial value of the single flight distance of the parameter of the fruit fly optimization algorithm, wherein the historical working data includes the starting position, end position and angular velocity of each joint of the robot; Any iteration of the fruit fly optimization algorithm except the first iteration is recorded as the target iteration. According to the position difference between the local optimal solution obtained by the target iteration and the global optimal solution, the optimal difference curve of the target iteration is obtained. According to the position difference between the global optimal solution obtained by the target iteration and the fruit fly, and the fitting effect difference between the optimal difference curves of the target iteration and the previous iteration of the target iteration, the optimal solution distance of the target iteration is obtained. According to the distance between the starting position and the end position of the joint of the injection molding robot at each moment, and the angular velocity, the movement time of each joint of the injection molding robot in each iteration is determined, and according to the difference between the global optimal solution of the target iteration and all previous iterations, the difference between the movement time of all joints of the injection molding robot in the target iteration and all previous iterations, and the difference between the angular displacement of all joints of the injection molding robot in the target iteration and all previous iterations, the vibration difference coefficient of the target iteration is obtained; According to the distance and vibration difference coefficient between the fruit flies of the target iteration, the local optimal degree of the target iteration is obtained. According to the numerical relationship between the local optimal degree of the target iteration and the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration, the single flight distance of the target iteration is determined. The fruit fly optimization algorithm is used to obtain the real-time working data of the injection molding robot and realize the posture control of the injection molding robot.
2. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The specific method for obtaining the optimal difference curve of the target iteration is: The Euclidean distance between the local optimal solution obtained by the target iteration and the global optimal solution is recorded as the optimal difference of the target iteration; The optimal difference between the target iteration and each iteration before the target iteration is taken as the dependent variable, the number of iterations corresponding to the dependent variable is taken as the dependent variable, and curve fitting is performed on the dependent variable and the dependent variable to obtain the optimal difference curve of the target iteration.
3. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The specific method for obtaining the optimal solution distance of the target iteration is: The ratio of the goodness of fit of the optimal difference curve of the target iteration to the iteration before the target iteration is recorded as the first ratio of the target iteration; The optimal solution distance of the target iteration is obtained according to the first ratio of the target iteration and the distance between the fruit flies of the target iteration.
4. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 3 is characterized in that: The method of obtaining the optimal solution distance of the target iteration according to the first ratio of the target iteration and the distance between the fruit flies of the target iteration includes: Select a second preset threshold number of fruit flies that are closest to the Euclidean distance of the global optimal solution obtained by the target iteration, and record the average of the Euclidean distances between the positions of the second preset threshold number of fruit flies selected and the global optimal solution as the fruit fly distribution difference of the target iteration; Record the absolute value of the difference between the number 1 and the first ratio of the target iteration as the first absolute difference of the target iteration, and record the product of the first absolute difference of the target iteration and the second preset threshold as the first product of the target iteration; The ratio of the fruit fly distribution difference of the target iteration to the first product of the target iteration is recorded as the optimal solution distance of the target iteration.
5. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The method of determining the movement time of each joint of the injection molding manipulator in each iteration according to the distance between the starting position and the end position of the joint of the injection molding manipulator at each moment, as well as the angular displacement and angular velocity, includes the following specific methods: Determine the angular displacement of the joint of the injection molding robot according to the distance between the starting position and the end position of the joint of the injection molding robot at each moment, and the angular velocity; The first-order derivative of the angular displacement of the joint of the injection molding robot is calculated, and the maximum value of all the values at the time when the value of the first-order derivative is equal to 0 is recorded as the movement time of the joint of the injection molding robot.
6. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 5, characterized in that: The specific method for obtaining the angular displacement of the joint of the injection molding robot is as follows: The number 0 is used as the constant term of the cubic polynomial, the angular velocity of the joints of the injection molding robot at the initial moment, the first-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment, and the second-order derivative of the angular velocity of the joints of the injection molding robot at the analyzed moment are used as the coefficients of the first-order term, the second-order term, and the third-order term of the cubic polynomial respectively, the analyzed moment is used as the independent variable, and the calculated value of the cubic polynomial is used as the angular displacement of the joints of the injection molding robot at the analyzed moment.
7. The method for controlling the posture of an injection molding robot based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The specific method for obtaining the vibration difference coefficient of the target iteration is: In the formula, Represents the target iteration The vibration difference coefficient; Represents the target iteration And the mean of the Euclidean distances between every two global optimal solutions in all previous iterations; Indicates the number of joints of the injection molding robot; Indicates the injection molding robot joints at target iteration exercise time; Indicates the injection molding robot joints at target iteration The mean of the motion time of all previous iterations; Indicates the injection molding robot joints at target iteration Angular displacement; Indicates the injection molding robot joints at target iteration The mean of the angular displacements of all previous iterations.
8. The method for controlling the posture of an injection molding robot based on an improved fruit fly optimization algorithm according to claim 4, characterized in that: The specific method of obtaining the local optimal degree of target iteration according to the distance between the fruit flies of the target iteration and the vibration difference coefficient is as follows: The ratio of the fruit fly distribution difference of the target iteration to the vibration difference coefficient is recorded as the local optimality of the target iteration.
9. The method for controlling the posture of an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The specific method of determining the single flight distance of the target iteration includes: In the formula, Represents the target iteration Single flight distance; represents a third preset threshold; represents a fourth preset threshold, wherein the value of the fourth preset threshold is less than the third preset threshold; represents the maximum value function; represents the minimum function; represents a natural constant; Represents the target iteration The single flight distance of the previous iteration; Represents the target iteration The average of the local optimality of all previous iterations; Represents the target iteration The local optimum level.
10. The method for controlling the posture of an injection molding robot based on an improved fruit fly optimization algorithm according to claim 1, characterized in that: The real-time working data of the injection molding robot includes: The starting position, end position and angular velocity of each joint of the injection molding robot.
Citation Information
Patent Citations
Method for combined inhibition of vibration based on iterative learning control and input shaping technology
CN108267959A
Design method of active disturbance rejection controller of omnidirectional mobile robot
CN115562279A
Robot motion trail optimization method and device, computer equipment and storage medium
CN116061180A
Manipulator control method
US20030018412A1
Robot control system, control program, and control method
WO2021261025A1