An Attitude Control Method for Injection Molding Manipulator Based on Improved Fruit Fly Optimization Algorithm

By dynamically adjusting the single flight distance of the fruit fly optimization algorithm, combining the differences between the local optimal solution and the global optimal solution, the problem of unreasonable parameter settings of the injection molding machine equipment is solved, and the working stability and molding cycle of the injection molding robot are improved.

CN119704207BActive Publication Date: 2025-07-22DONGGUAN ALFA AUTOMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510235123.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-07-22
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The fixed value of the single flight distance parameter in the fruit fly optimization algorithm results in unreasonable settings of the injection molding machine equipment, affecting the working quality and molding cycle of the robot.

Method used

By collecting historical working data of injection molding robots, adjusting the parameters of the fruit fly optimization algorithm, combining the differences between local optimal solutions and global optimal solutions, vibration difference coefficients, etc., the single flight distance is dynamically adjusted to achieve attitude control of injection molding robots.

Benefits of technology

The working stability and forming cycle of the injection molding robot are improved, the vibration of the robot is reduced, and the rationality of equipment parameters and working quality are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119704207B_ABST
    Figure CN119704207B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of manipulator attitude control, and proposes a method for controlling the attitude of an injection molding manipulator based on an improved fruit fly optimization algorithm, including: collecting historical working data of the injection molding manipulator; marking the target iteration, and obtaining the optimal difference curve and the optimal solution distance of the target iteration; determining the movement time of the joints of the injection molding manipulator in each iteration, and obtaining the vibration difference coefficient of the target iteration; obtaining the local optimization degree of the target iteration, determining the single flight distance of the target iteration, and using the fruit fly optimization algorithm to obtain the real-time working data of the injection molding manipulator to achieve the attitude control of the injection molding manipulator. The purpose of the present invention is to solve the problem that the unreasonable setting of the equipment parameters of the injection molding machine is caused by the fixed value of the parameter single flight distance in the fruit fly optimization algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of manipulator attitude control, and particularly relates to an injection molding manipulator attitude control method based on an improved fruit fly optimization algorithm. Background Art

[0002] An injection molding machine is a device for manufacturing plastic products of various shapes from thermoplastic plastics. Generally, a manipulator is used for injection molding operations to ensure the safety of the injection molding process. In order to shorten the molding cycle of injection molded products, the equipment parameters of the injection molding machine are generally continuously adjusted to increase the running speed of the manipulator of the injection molding machine. It can be understood that the running speed of the manipulator of the injection molding machine cannot be increased indefinitely. When the running speed of the manipulator increases, due to the influence of inertia, the vibration amplitude of the manipulator also increases, resulting in an increase in the time for the manipulator to return to the steady state, which affects the working quality of the manipulator. Therefore, an optimization algorithm is generally used to determine the equipment parameters of the injection molding machine, so that the injection molding machine achieves a balance between the quality of operation and the molding cycle, and reduces the molding cycle of injection molded products while ensuring the quality of injection molding operations.

[0003] The fruit fly optimization algorithm focuses on the overall cooperation and information sharing among groups and has good global optimization ability. Therefore, the fruit fly optimization algorithm can be used to determine the equipment parameters of the injection molding machine. However, the parameter single flight distance in the fruit fly optimization algorithm is fixed. When the value of the parameter single flight distance is too small, the distribution of different fruit flies is too dense, which easily leads to the occurrence of local optimal problems, so that the determined equipment parameters of the injection molding machine are not the optimal equipment parameters; when the value of the parameter single flight distance is too large, the positions corresponding to different iterative processes may frequently iterate and wander near the optimal solution, resulting in the optimized positions obtained by iteration not being able to accurately fall at the optimal solution, so that the equipment parameters of the injection molding machine change repeatedly, affecting the determination efficiency of the equipment parameters of the injection molding machine. Therefore, during the process of determining the equipment parameters of the injection molding machine, it is necessary to appropriately adjust the value of the parameter single flight distance in the fruit fly optimization algorithm. Summary of the Invention

[0004] The present invention provides an injection molding manipulator attitude control method based on an improved fruit fly optimization algorithm to solve the problem of unreasonable setting of the equipment parameters of the injection molding machine caused by the fixed value of the parameter single flight distance in the fruit fly optimization algorithm. The specific technical solution adopted is as follows:

[0005] An embodiment of the present invention provides an injection molding manipulator attitude control method based on an improved fruit fly optimization algorithm. The method includes the following steps:

[0006] Collect multiple historical working data of the injection molding manipulator, and set the initial value of the parameter single flight distance of the fruit fly optimization algorithm. The historical working data includes the starting position, ending position, and angular velocity of each joint of the manipulator.

[0007] Any iteration of the fruit fly optimization algorithm except the first iteration is denoted as the target iteration. Based on the position difference between the local optimal solution and the global optimal solution obtained in the target iteration, the optimal difference curve of the target iteration is obtained. Based on the position difference between the global optimal solution obtained in 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.

[0008] Based on the distance between the starting position and the ending position of each joint of the injection molding manipulator at each moment, and the angular velocity, the movement time of each joint of the injection molding manipulator in each iteration is determined. Based on the difference between the global optimal solutions of the target iteration and all previous iterations, the difference between the movement times of all joints of the injection molding manipulator in the target iteration and all previous iterations, and the difference between the angular displacements of all joints of the injection molding manipulator in the target iteration and all previous iterations, the vibration difference coefficient of the target iteration is obtained.

[0009] Based on the optimal solution distance and the vibration difference coefficient of the target iteration, the local optimal degree of the target iteration is obtained. Based on 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 manipulator, and the attitude control of the injection molding manipulator is realized.

[0010] Furthermore, the specific method for obtaining the optimal difference curve of the target iteration is as follows:

[0011] The Euclidean distance between the local optimal solution and the global optimal solution obtained in the target iteration is denoted as the optimal difference of the target iteration.

[0012] Taking the optimal differences of the target iteration and each previous iteration as the dependent variables, and the corresponding iteration numbers as the independent variables, curve fitting is performed on the dependent variables and the independent variables to obtain the optimal difference curve of the target iteration.

[0013] Furthermore, the specific method for obtaining the optimal solution distance of the target iteration is as follows:

[0014] The ratio of the goodness of fit of the optimal difference curve of the target iteration to the previous iteration of the target iteration is denoted as the first ratio of the target iteration.

[0015] Based on the first ratio of the target iteration and the distance between the fruit fly of the target iteration, the optimal solution distance of the target iteration is obtained.

[0016] Furthermore, the specific method for obtaining the optimal solution distance of the target iteration based on the first ratio of the target iteration and the distance between the fruit fly of the target iteration includes:

[0017] Select the second preset threshold number of fruit flies with the closest Euclidean distance to the globally optimal solution obtained by the target iteration, and denote the mean of the Euclidean distances between the positions of the selected second preset threshold number of fruit flies and the globally optimal solution as the fruit fly distribution difference of the target iteration;

[0018] Denote 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 denote the product of the first absolute difference of the target iteration and the second preset threshold as the first product of the target iteration;

[0019] Denote the ratio of the fruit fly distribution difference of the target iteration to the first product of the target iteration as the optimal solution distance of the target iteration.

[0020] Furthermore, the specific method for determining the movement time of each joint of the injection molding manipulator in each iteration according to the distance, angular displacement, and angular velocity between the starting position and the ending position of the joint of the injection molding manipulator at each moment includes:

[0021] Determine the angular displacement of the joint of the injection molding manipulator according to the distance and angular velocity between the starting position and the ending position of the joint of the injection molding manipulator at each moment;

[0022] Take the first derivative of the angular displacement of the joint of the injection molding manipulator, and denote the maximum value among the values at all moments when the value of the first derivative is equal to 0 as the movement time of the joint of the injection molding manipulator.

[0023] Furthermore, the specific method for obtaining the angular displacement of the joint of the injection molding manipulator is:

[0024] Use the number 0 as the constant term of the cubic polynomial, use the angular velocity of the joint of the injection molding manipulator at the initial moment, the first derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment, and the second derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment as the coefficients of the first term, second term, and third term of the cubic polynomial respectively, use the analyzed moment as the independent variable, and use the calculated value of the cubic polynomial as the angular displacement of the joint of the injection molding manipulator at the analyzed moment.

[0025] Furthermore, the specific method for obtaining the vibration difference coefficient of the target iteration is:

[0026]

[0027] In the formula, represents the vibration difference coefficient of the target iteration ; represents the mean of the Euclidean distances between every two globally optimal solutions among the globally optimal solutions of the target iteration and all previous iterations; represents the number of joints of the injection molding manipulator; Denote the motion time of the th joint of the injection molding manipulator at the target iteration ; Denote the mean value of the motion times of the th joint of the injection molding manipulator at all iterations before the target iteration ; Denote the angular displacement of the th joint of the injection molding manipulator at the target iteration ; Denote the mean value of the angular displacements of the th joint of the injection molding manipulator at all iterations before the target iteration ;

[0028] Furthermore, obtaining the local optimality degree of the target iteration according to the optimal solution distance and vibration difference coefficient of the target iteration includes the following specific method:

[0029] Denote the ratio of the optimal solution distance of the target iteration to the vibration difference coefficient as the local optimality degree of the target iteration.

[0030] Furthermore, determining the single - flight distance of the target iteration includes the following specific method:

[0031]

[0032] In the formula, Denote the single - flight distance of the target iteration ; Denote the third preset threshold; Denote the fourth preset threshold, where the value of the fourth preset threshold is less than the third preset threshold; Denote the maximum value function; Denote the minimum value function; Denote the natural constant; Denote the single - flight distance of the previous iteration of the target iteration ; Denote the mean value of the local optimality degrees of all iterations before the target iteration ; Denote the local optimality degree of the target iteration ;

[0033] Furthermore, the real - time working data of the injection molding manipulator includes:

[0034] The starting position, ending position and angular velocity of each joint of the injection molding manipulator.

[0035] The beneficial effects of the present invention are:

[0036] During the iteration process of this application according to the fruit fly optimization algorithm, the difference between the local optimal solution and the global optimal solution gradually decreases. When the difference is extremely small, it corresponds to the characteristic that the search is close to the final global optimal solution. Analyze the search results during the iteration process, and obtain the optimal solution distance of the target iteration according to the differences among the local optimal solution, the global optimal solution, and the fruit fly position. The optimal solution distance of the target iteration is an evaluation of the possibility that the target iteration falls into the local optimal solution. Further, according to the characteristics that when the parameter of the single flight distance changes greatly, the vibration of the injection molding manipulator intensifies and the stability decreases, obtain the vibration difference coefficient of the target iteration according to the differences between the global optimal solutions obtained in different iteration processes, the differences in motion time, and the change degree of the equipment parameters of the injection molding machine. Further, combine the optimal solution distance of the target iteration and the single flight distance of the previous iteration of the target iteration to determine the single flight distance of the target iteration, and use the fruit fly optimization algorithm to obtain the real-time working data of the injection molding manipulator, so as to realize the attitude control of the injection molding manipulator, and solve the problem that the unreasonable setting of the equipment parameters of the injection molding machine is caused by the fixed value of the parameter of the single flight distance in the fruit fly optimization algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0038] Figure 1 It is a schematic flowchart of a method for controlling the attitude of an injection molding manipulator based on an improved fruit fly optimization algorithm provided by an embodiment of the present invention;

[0039] Figure 2 It is a flowchart for obtaining the optimal solution distance provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0041] Please refer to Figure 1 , which shows a flowchart of a method for controlling the attitude of an injection molding manipulator based on an improved fruit fly optimization algorithm provided by an embodiment of the present invention. The method includes the following steps:

[0042] Step S001: Collect multiple historical working data of the injection molding manipulator, and set the initial value of the parameter single flight distance of the fruit fly optimization algorithm. The historical working data includes the starting position, ending position, and angular velocity of each joint of the manipulator.

[0043] Collect the most recent working data of the manipulator of the injection molding machine from the historical data of the injection molding machine.

[0044] Among them, the manipulator of the injection molding machine is the injection molding manipulator. Each working data includes the starting position, ending position, and angular velocity of each joint of the manipulator. is the first preset threshold. In this embodiment, the value of the first preset threshold is 100. In actual application processes, as other implementation manners, implementers can determine the types of data included in the working data and the value of the first preset threshold according to actual situations by themselves. This application does not make special restrictions.

[0045] Set the parameters of the fruit fly optimization algorithm. Specifically, set the number of fruit flies participating in the optimization to the first preset threshold , set the maximum number of system iteration rounds to 100, and set the initial single flight distance to 0.5. Take the shortest movement time for the injection molding manipulator to reach the specified position from the starting position as the planning goal. That is to say, during each iteration, adjust the position of the fruit fly. At the same time, according to the position of the fruit fly, adjust the value of the parameter single flight distance to achieve the shortest movement time for the fruit fly to reach the specified position from the starting position.

[0046] The definition of the parameters of the fruit fly optimization algorithm and the planning goal is a well-known technology and will not be elaborated here.

[0047] So far, obtain multiple historical working data of the injection molding manipulator, and set the parameters of the fruit fly optimization algorithm.

[0048] Step S002: Denote any iteration except the first iteration of the fruit fly optimization algorithm as the target iteration. According to the position difference between the local optimal solution and the global optimal solution obtained in the target iteration, obtain the optimal difference curve of the target iteration. According to the position difference between the global optimal solution obtained in the target iteration and the fruit fly, and the fitting effect difference between the target iteration and the optimal difference curve of the previous iteration of the target iteration, obtain the optimal solution distance of the target iteration.

[0049] During the iteration process using the fruit fly optimization algorithm, a local optimal solution and a global optimal solution can be obtained in each iteration. 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 possibility that the current search converges to the final global optimal solution is small. This situation generally occurs in the initial stage of 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 possibility that the current search has approached the final global optimal solution is large. However, when the iteration process gets trapped in a local optimal solution, characteristics similar to those of having approached the final global optimal solution will also appear, leading to misjudgment of the search results. Therefore, the possibility of getting trapped in a local optimal solution in each iteration process should be evaluated to prevent the interference of the local optimal solution.

[0050] Among them, the local optimal solution and the global optimal solution obtained in each iteration both include the starting position, the ending position, and the angular velocity of each joint of the injection molding manipulator.

[0051] Any iteration except the first iteration of the fruit fly optimization algorithm is denoted as the target iteration. In this embodiment, any iteration except the first iteration is taken as an example for illustration.

[0052] The Euclidean distance between the local optimal solution and the global optimal solution obtained in the target iteration is denoted as the optimal difference of the target iteration, and the optimal differences of the target iteration and each iteration before the target iteration are obtained. Taking the optimal differences of the target iteration and each iteration before the target iteration as the dependent variable, and taking the corresponding number of iterations as the independent variable, curve fitting is performed on the dependent variable and the independent variable 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.

[0053] Among them, 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 global optimal solutions. It can be understood that the fruit fly optimization algorithm is used to iterate the working data of the injection molding manipulator to screen the optimal working data setting method.

[0054] 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 larger the goodness of fit. In this embodiment, polynomial fitting technology is used for curve fitting. Using polynomial fitting technology for curve fitting and calculating the goodness of fit of the fitting curve are both well-known technologies and will not be elaborated. As other implementation manners, on the basis of achieving the purpose of curve fitting, the implementer can use other existing technologies such as the least squares method to fit the curve. This application does not make special restrictions.

[0055] Select the fruit fly with the closest Euclidean distance to the globally optimal solution obtained by the target iteration ones, and take the mean of the Euclidean distances between the positions of these fruit flies and the globally optimal solution, which is denoted as the fruit fly distribution difference of the target iteration. Among them, is the second preset threshold, and in this embodiment, the value of the second preset threshold is 30.

[0056] When the fruit fly distribution difference of the target iteration is larger, the distance between the fruit fly and the globally optimal solution is larger, the possibility that the current search converges to the final globally optimal solution is smaller, and the possibility that the target iteration is still in the initial stage of iteration is larger.

[0057] According to the fruit fly distribution difference of the target iteration and the fitting effect difference between the optimal difference curves of the target iteration and the previous iteration of the target iteration, obtain the optimal solution distance of the target iteration.

[0058] Preferably, as an embodiment of the present application, the ratio of the goodness of fit of the optimal difference curve of the target iteration to the goodness of fit of the optimal difference curve of the previous iteration of the target iteration is denoted 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 denoted 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 denoted 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 denoted as the optimal solution distance of the target iteration.

[0059] Specifically, the expression of the optimal solution distance of the target iteration is:

[0060]

[0061] In the formula, represents the optimal solution distance of the target iteration ; represents the fruit fly distribution difference of the target iteration ; represents the goodness of fit of the optimal difference curve of the target iteration ; represents the goodness of fit of the optimal difference curve of the previous iteration of the target iteration ; represents the second preset threshold.

[0062] When the distribution difference of fruit flies in the target iteration is greater, the distance of the optimal solution in the target iteration is greater. At this time, the distance between the fruit flies and the global optimal solution is greater, and the possibility that the target iteration is still in the initial stage of iteration is greater, while the possibility that the target iteration falls into the local optimal solution is smaller. At the same time, when the difference in the fitting effect of the optimal difference curve between 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 of the optimal solution in the target iteration is greater.

[0063] So far, the distance of the optimal solution in the target iteration is obtained. The flow chart for obtaining the distance of the optimal solution is as Figure 2 shown.

[0064] Step S003: Determine the motion time of each joint of the injection molding manipulator in each iteration according to the distance and angular velocity between the starting position and the ending position of each joint of the injection molding manipulator at each moment. Obtain the vibration difference coefficient of the target iteration according to the difference between the target iteration and the global optimal solutions of all previous iterations, the difference between the motion times of all joints of the injection molding manipulator in the target iteration and all previous iterations, and the difference between the angular displacements of all joints of the injection molding manipulator in the target iteration and all previous iterations.

[0065] 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 change in the equipment parameters of the injection molding machine is also large. When determining the single flight distance of the parameters only according to the iteration results, the equipment parameters of the injection molding machine corresponding to the final result of the iteration obtained may cause the injection molding manipulator to work under high angular velocity and high vibration conditions. However, such a working state will affect the working stability of the manipulator. Therefore, the motion state of the injection molding manipulator needs to be considered during the process of determining the single flight distance of the parameters.

[0066] For each iteration of the fruit fly optimization algorithm, use a cubic polynomial to determine the angular displacement of the joints of the injection molding manipulator according to the angular displacement and angular velocity of the joints of the injection molding manipulator at each moment.

[0067] Specifically, as an embodiment of the present application, use the angular displacement of the joint of the injection molding manipulator at the initial moment as the constant term of the cubic polynomial, and use the angular velocity of the joint of the injection molding manipulator at the initial moment, the first derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment, and the second derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment as the coefficients of the first term, the second term, and the third term of the cubic polynomial respectively. Use the analyzed moment as the independent variable, and use the calculated value of the cubic polynomial as the angular displacement of the joint of the injection molding manipulator at the analyzed moment.

[0068] Specifically, the calculation formula for the angular displacement of the joint of the injection molding manipulator is:

[0069]

[0070] Among them, represents the angular displacement of the th joint of the injection molding manipulator at moment; represents the angular displacement of the th joint of the injection molding manipulator at the initial moment; represents the angular velocity of the th joint of the injection molding manipulator at the initial moment; represents the first derivative of the angular velocity of the th joint of the injection molding manipulator at moment; represents the second derivative of the angular velocity of the th joint of the injection molding manipulator at moment.

[0071] Since all joints of the injection molding manipulator are stationary at the initial moment, the value of the angular displacement of all joints of the injection molding manipulator at the initial moment is 0. The angular displacement of the injection molding manipulator joint at moment is the Euclidean distance between the position of the injection molding manipulator joint at moment and the starting position of the injection molding manipulator joint in this iteration.

[0072] Take the first derivative of the angular displacement of the joints of the injection molding manipulator, and record the maximum value among the values at all moments when the first derivative is equal to 0 as the movement time of the joints of the injection molding manipulator.

[0073] It can be understood that the maximum value among the values at all moments when the first derivative of the angular displacement is equal to 0 must be greater than zero. Therefore, the movement time of the joints of the injection molding manipulator is greater than zero.

[0074] During the iteration of the fruit fly optimization algorithm, when the global search range is larger, the average vibration situation of the injection molding manipulator corresponding to the global optimal solution of each iteration can more accurately represent the vibration state of the injection molding manipulator. At the same time, when the vibration situation of the injection molding manipulator corresponding to the global optimal solution of each iteration is more different from the average vibration situation of the injection molding manipulator, the vibration of the injection molding manipulator is more severe.

[0075] Obtain the vibration difference coefficient of the target iteration according to the difference between the target iteration and the global optimal solutions of all previous iterations, the difference between the movement times of all joints of the injection molding manipulator in the target iteration and all previous iterations, and the difference between the angular displacements of all joints of the injection molding manipulator in the target iteration and all previous iterations.

[0076] Preferably, as an embodiment of the present application, the calculation formula of the vibration difference coefficient of the target iteration is:

[0077]

[0078] In the formula, represents the vibration difference coefficient of the target iteration; of the vibration difference coefficient; represents the target iteration and the mean of the Euclidean distances between every two global optimal solutions among all the global optimal solutions of all previous iterations; represents the number of joints of the injection molding manipulator; represents the th joint of the injection molding manipulator at the target iteration of the motion time; represents the th joint of the injection molding manipulator at the target iteration the mean of the motion times of all previous iterations; represents the th joint of the injection molding manipulator at the target iteration of the angular displacement; represents the th joint of the injection molding manipulator at the target iteration the mean of the angular displacements of all previous iterations.

[0079] The vibration difference coefficient of the target iteration is used to measure the vibration of the injection molding manipulator at the target iteration. When the difference between the global optimal solutions of the target iteration and all previous iterations is larger, the global search area in the iterative process of the fruit fly optimization algorithm is larger, and the vibration of the injection molding manipulator is more intense. At this time, the vibration difference coefficient of the target iteration is larger. When the difference between the motion times of all joints of the injection molding manipulator at the target iteration and all previous iterations is larger than the difference between the angular displacements, the vibration of the injection molding manipulator is more intense. At this time, the vibration difference coefficient of the target iteration is larger.

[0080] Thus, the vibration difference coefficient of the target iteration is obtained.

[0081] Step S004: According to the optimal solution distance and vibration difference coefficient of the target iteration, obtain the local optimality degree of the target iteration. According to the numerical relationship between the local optimality degree of the target iteration and the local optimality degree of the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration, determine the single flight distance of the target iteration, and use the fruit fly optimization algorithm to obtain the real-time working data of the injection molding manipulator to realize the attitude control of the injection molding manipulator.

[0082] When the probability of the target iteration falling into a local optimal solution is higher, a larger value should be selected as the single flight distance for the next iteration to jump out of the local optimal problem. When the vibration of the injection molding manipulator is more intense during the target iteration, a smaller value should be selected as the single flight distance to reduce the vibration amplitude of the injection molding manipulator.

[0083] Based on the optimal solution distance and vibration difference coefficient of the target iteration, obtain the degree of local optimality of the target iteration. The degree of local optimality of the target iteration is positively correlated with the optimal solution distance of the target iteration and negatively correlated with the vibration difference coefficient of the target iteration.

[0084] Preferably, as an embodiment of the present application, the ratio of the optimal solution distance of the target iteration to the vibration difference coefficient is denoted as the degree of local optimality of the target iteration.

[0085] Specifically, the expression for the degree of local optimality of the target iteration is:

[0086]

[0087] In the formula, represents the degree of local optimality of the target iteration ; represents the optimal solution distance of the target iteration ; represents the vibration difference coefficient of the target iteration .

[0088] When the optimal solution distance of the target iteration is larger and the vibration difference coefficient of the target iteration is smaller, the degree of local optimality of the target iteration is larger. At this time, the probability of the target iteration falling into a local optimal solution is smaller, and a larger value should be selected as the single flight distance to enhance the local search ability of the next iteration, making it more likely for the next iteration to jump out of the local optimal problem and reducing the probability of the target iteration falling into a local optimal solution. When the optimal solution distance of the target iteration is smaller and the vibration difference coefficient of the target iteration is larger, the degree of local optimality of the target iteration is larger. At this time, a smaller value should be selected as the single flight distance to improve the iteration quality.

[0089] Based on the numerical relationship between the degree of local optimality of the target iteration and that of the previous iteration of the target iteration, and the single flight distance of the previous iteration of the target iteration, determine the single flight distance of the target iteration.

[0090]

[0091] In the formula, represents the single flight distance of the target iteration ; represents the third preset threshold value, and in this embodiment, the value of the third preset threshold is 10; represents the fourth preset threshold value, and in this embodiment, the value of the fourth preset threshold is 0.1; represents the maximum value function, and its function is to take the maximum value of the numerical values separated by commas within the parentheses; represents the minimum value function, and its function is to take the minimum value of the numerical values separated by commas within the parentheses; represents the natural constant; represents the target iteration of the single flight distance of the previous iteration; represents the target iteration of the average value of the local optimality degrees of all previous iterations; represents the target iteration of the local optimality degree.

[0092] It should be noted that the value of the fourth preset threshold should be less than the third preset threshold.

[0093] 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 of the parameters of the fruit fly optimization algorithm. In this embodiment, the initial value of the single flight distance is set to 0.5.

[0094] When the local optimality degree of the target iteration is less than or equal to the average value of the local optimality degrees of all previous iterations of the target iteration, the local optimality degree of the target iteration is relatively small compared to the average level of the previous iterations. A larger value should be selected as the single flight distance to enhance the local search ability of the next iteration and improve the iteration quality. At this time, the single flight distance of the target iteration is larger. When the local optimality degree of the target iteration is greater than the average value of the local optimality degrees of all previous iterations of the target iteration, the local optimality degree of the target iteration is relatively large compared to the average level of the previous iterations. At this time, the global search area in the iteration process increases significantly, and the vibration of the injection molding manipulator becomes more intense. A smaller value should be selected as the single flight distance to weaken the vibration degree of the injection molding manipulator. At the same time, the single flight distance with a smaller value can enhance the local search ability and improve the convergence quality.

[0095] Take the single flight distance of the target iteration as the value of the single flight distance of the parameters at the target iteration, and use the fruit fly optimization algorithm to obtain the real-time working data of the injection molding manipulator. The parameters of the injection molding manipulator include the starting position, ending position, and angular velocity of each joint of the injection molding manipulator.

[0096] Thus far, the attitude control of the injection molding manipulator is realized. While ensuring the working efficiency of the injection molding manipulator, the working quality of the injection molding manipulator is guaranteed, and the vibration of the injection molding manipulator is reduced.

[0097] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An attitude control method for an injection molding manipulator based on an improved fruit fly optimization algorithm, characterized in that, The method includes the following steps: Collect multiple historical working data of the injection molding manipulator, and set the initial value of the single flight distance of the parameters of the fruit fly optimization algorithm. The historical working data includes the starting position, ending position, and angular velocity of each joint of the manipulator. Denote any iteration except the first iteration of the fruit fly optimization algorithm as the target iteration. According to the position difference between the local optimal solution and the global optimal solution obtained in the target iteration, obtain the optimal difference curve of the target iteration. According to the position difference between the global optimal solution obtained in 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, obtain the optimal solution distance of the target iteration. According to the distance between the starting position and the ending position of each joint of the injection molding manipulator at each moment, and the angular velocity, determine the motion time of each joint of the injection molding manipulator in each iteration. According to the difference between the global optimal solutions of the target iteration and all previous iterations, the difference between the motion times of all joints of the injection molding manipulator in the target iteration and all previous iterations, and the difference between the angular displacements of all joints of the injection molding manipulator in the target iteration and all previous iterations, obtain the vibration difference coefficient of the target iteration. According to the optimal solution distance and the vibration difference coefficient of the target iteration, obtain the local optimal degree of the target iteration. 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, determine the single flight distance of the target iteration. Use the fruit fly optimization algorithm to obtain the real-time working data of the injection molding manipulator and realize the attitude control of the injection molding manipulator.

2. The attitude control method 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 as follows: Denote the Euclidean distance between the local optimal solution and the global optimal solution obtained in the target iteration as the optimal difference of the target iteration. Take the optimal differences of the target iteration and each previous iteration as the dependent variable, and the corresponding iteration number as the independent variable. Perform curve fitting on the dependent variable and the independent variable to obtain the optimal difference curve of the target iteration.

3. The attitude control method 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 as follows: Denote the ratio of the goodness of fit of the optimal difference curve of the target iteration to the previous iteration of the target iteration as the first ratio of the target iteration. According to the first ratio of the target iteration and the distance between the fruit fly of the target iteration, obtain the optimal solution distance of the target iteration.

4. A posture control method for an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 3, characterized in that, The specific method included in obtaining the optimal solution distance of the target iteration according to the first ratio of the target iteration and the distance between the fruit fly of the target iteration is as follows: Select the second preset threshold number of fruit flies with the closest Euclidean distance to the global optimal solution obtained in the target iteration. Denote the average value of the Euclidean distances between the positions of the selected second preset threshold number of fruit flies and the global optimal solution as the fruit fly distribution difference of the target iteration. Denote 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. Denote 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 difference in the Drosophila distribution of the target iteration to the first product of the target iteration is denoted as the optimal solution distance of the target iteration.

5. A posture control method for an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that The method for 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 ending position of each 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 manipulator according to the distance between the starting position and the ending position of the joint of the injection molding manipulator at each moment, as well as the angular velocity. Take the first derivative of the angular displacement of the joint of the injection molding manipulator, and denote the maximum value among the values at all moments when the value of the first derivative is equal to 0 as the movement time of the joint of the injection molding manipulator.

6. The attitude control method 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 manipulator is as follows: Take the number 0 as the constant term of the cubic polynomial, take the angular velocity of the joint of the injection molding manipulator at the initial moment, the first derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment, and the second derivative of the angular velocity of the joint of the injection molding manipulator at the analyzed moment as the coefficients of the first term, the second term, and the third term of the cubic polynomial respectively, take the analyzed moment as the independent variable, and take the calculated value of the cubic polynomial as the angular displacement of the joint of the injection molding manipulator at the analyzed moment.

7. A posture control method for 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 vibration difference coefficient of the target iteration is as follows: In the formula, represents the vibration difference coefficient of the target iteration ; represents the average of the Euclidean distances between every two global optimal solutions among the global optimal solutions of the target iteration and all previous iterations; represents the number of joints of the injection molding manipulator; represents the -th joint of the injection molding manipulator at the target iteration in terms of the motion time; represents the -th joint of the injection molding manipulator at the target iteration in terms of the average of the motion times of all previous iterations; represents the -th joint of the injection molding manipulator at the target iteration in terms of the angular displacement; represents the -th joint of the injection molding manipulator at the target iteration in terms of the average of the angular displacements of all previous iterations.

8. A posture control method for an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 4, characterized in that, The method for obtaining the local optimality degree of the target iteration according to the optimal solution distance and the vibration difference coefficient of the target iteration includes the following specific methods: Denote the ratio of the optimal solution distance of the target iteration to the vibration difference coefficient as the local optimality degree of the target iteration.

9. A posture control method for an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that, The specific method for determining the single flight distance of the target iteration includes: In the formula, represents the single flight distance of the target iteration ; represents the third preset threshold; represents the fourth preset threshold, where the value of the fourth preset threshold is less than the third preset threshold; represents the maximum value function; represents the minimum value function; represents the natural constant; represents the single flight distance of the previous iteration of the target iteration ; represents the mean value of the local optimality of all iterations before the target iteration ; represents the local optimality of the target iteration .

10. A posture control method for an injection molding manipulator based on an improved fruit fly optimization algorithm according to claim 1, characterized in that, The real-time working data of the injection molding manipulator includes: The starting position, ending position, and angular velocity of each joint of the injection molding manipulator.

Citation Information

Patent Citations

  • Method for combined inhibition of vibration based on iterative learning control and input shaping technology

    CN108267959A

  • Robot control system, control program, and control method

    WO2021261025A1