Robot constant-force grinding optimization method and apparatus, and electronic device
By optimizing the active compliant control model using the whale algorithm, the problem of grinding force control during robot grinding was solved, achieving constant force grinding of robot workpieces and improving grinding accuracy and efficiency.
Patent Information
- Application Number
- PCT/CN2024/126626
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-29
- Filing Date
- 2024-10-23
- Publication Date
- 2025-11-06
AI Technical Summary
In existing technologies, it is difficult to achieve the required compliance and precision in the grinding force control during robot grinding, resulting in poor grinding results.
The active compliant control model is optimized using the whale algorithm. By determining the active compliant control model for constant force grinding of the robot, the optimization target is constructed, the impedance parameters are optimized and solved, and the robot is controlled to perform constant force grinding.
It achieves constant force grinding of workpieces by robots, achieving the best grinding effect and improving grinding accuracy and efficiency.
Smart Images

Figure CN2024126626_06112025_PF_FP_ABST
Abstract
Description
Constant force polishing optimization method, device and electronic equipment of robot
[0001] The present application claims priority to Chinese patent application 2024105282258 with a filing date of 2024 / 4 / 29. The present application incorporates the entirety of the aforementioned Chinese patent application. TECHNICAL FIELD
[0002] The present application relates to the technical field of robot control, and in particular to a constant force polishing optimization method, device and electronic equipment of robot. BACKGROUND
[0003] With the development of high-end manufacturing industry, the precision and smoothness requirements of large precision parts are also increasing. Robots are widely used in the polishing industry due to their high repeatability and efficiency. Polishing is a processing method to improve the surface precision of tools, and the most important influencing factor is the grinding force. Therefore, how to plan and control the robot grinding force is the key research direction of compliant polishing.
[0004] SUMMARY
[0005] The present application aims to solve the technical problem of overcoming the above-mentioned defects of the prior art, and provides a constant force polishing optimization method, device and electronic equipment of robot.
[0006] The present application solves the above-mentioned technical problem by the following technical solution:
[0007] In a first aspect, a constant force polishing optimization method of robot is provided, comprising:
[0008] determining an active compliant control model of constant force polishing of the robot;
[0009] constructing an optimization target of the active compliant control model, optimizing and solving the active compliant control model by whale algorithm to obtain an optimal parameter value of impedance parameters of the active compliant control model;
[0010] controlling the robot to perform constant force polishing on a workpiece according to the optimal parameter value and the active compliant control model.
[0011] Optionally, the step of optimizing and solving the active compliant control model by whale algorithm to obtain an optimal parameter value of impedance parameters of the active compliant control model comprises:
[0012] generating an initial whale population based on Bernoulli chaotic mapping; or generating an initial whale population based on Tent mapping and through twice mapping, wherein the first mapping adopts a piecewise function, and the second mapping takes the output of the first mapping as input and adopts a recursive function;
[0013] The initial whale population is iteratively optimized to obtain the optimal individual whale and its location;
[0014] The optimal value of the impedance parameter is determined based on the location of the optimal individual whale.
[0015] Optionally, the initial whale population is iteratively optimized to obtain the optimal individual whale, including:
[0016] For each iteration, the probability factor and coefficient vector of the whale population are calculated;
[0017] Select a position update model that matches the probability factor and the coefficient vector, and update the position of the individual whale.
[0018] Calculate the fitness of individual whales after the location update, and determine the optimal whales as those whose fitness meets the preset conditions.
[0019] Optionally, selecting a position update model that matches the probability factor and the coefficient vector to update the position of the individual whale includes:
[0020] When the probability factor is greater than or equal to the probability threshold, the position of the individual whale is updated using the bubble net hunting model.
[0021] When the probability factor is less than the probability threshold and the magnitude of the coefficient vector is less than the magnitude threshold, the position of the individual whale is updated using a bounding model;
[0022] When the probability factor is less than the probability threshold and the magnitude of the coefficient vector is greater than or equal to the magnitude threshold, the position of the individual whale is updated using a random exploration model.
[0023] Optionally, the convergence factor of the position update model is calculated using a nonlinear function;
[0024] And / or, the convergence factor of the location update model is calculated using the following formula:
[0025] Where ω(t) represents the convergence factor of the t-th iteration; ω s ω represents the initial convergence factor; e T represents the convergence factor at the maximum number of iterations. max Indicates the maximum number of iterations;
[0026] And / or, the convergence factor of the location update model is calculated using the following formula:
[0027] Where w(iter) represents the convergence factor of the iter-th iteration; w max and wmin are the maximum and minimum values of the convergence factor respectively; iter max is the maximum number of iterations.
[0028] Optionally, the robot is controlled to polish a workpiece with constant force according to the optimal parameter value of the impedance parameter and the active compliance control model, including:
[0029] The running data of the robot is collected, and the parameters contained in the running data match the input control parameters of the active compliance control model;
[0030] The running data and the optimal parameter value are substituted into the active compliance control model to obtain the parameter value of the output control parameter of the active compliance control model;
[0031] The robot is controlled to polish the workpiece with constant force according to the parameter value of the output control parameter.
[0032] Optionally, the active compliance control model adopts an impedance model, and the optimization target is the minimum output force error;
[0033] Alternatively, the active compliance control model adopts an admittance model, and the optimization target is the minimum displacement error;
[0034] Alternatively, the active compliance control model adopts a force-position hybrid control model, and the optimization target is the minimum comprehensive error of displacement and output force.
[0035] In a second aspect, a constant force polishing optimization device for a robot is provided, including:
[0036] A determination module is configured to determine an active compliance control model for constant force polishing of the robot;
[0037] An optimization module is configured to minimize the comprehensive error of displacement and output force as an optimization target of the active compliance control model, to optimize and solve the active compliance control model by a whale optimization algorithm, and to obtain an optimal parameter value of an impedance parameter of the active compliance control model;
[0038] A control module is configured to control the robot to polish a workpiece with constant force according to the optimal parameter value and the active compliance control model.
[0039] Optionally, the initial whale population of the whale optimization algorithm is generated based on Bernoulli chaotic mapping; or the initial whale population is generated based on Tent mapping and through twice mapping, wherein the first mapping adopts a piecewise function, and the second mapping takes the output of the first mapping as input and adopts a recursive function;
[0040] And / or, for each round of iteration, a position update model matching the probability factor and coefficient vector of the whale population is selected to update the position of the whale individual in the whale population;
[0041] And / or, the convergence factor of the position update model is calculated by a nonlinear function;
[0042] And / or, the calculation formula of the convergence factor of the position update model is as follows:
[0043] Wherein, ω(t) represents the convergence factor of the tth round of iteration; ω s represents the initial convergence factor; ω e represents the convergence factor when the maximum iteration number is reached; T max represents the maximum iteration number;
[0044] And / or, the calculation formula of the convergence factor of the position update model is as follows:
[0045] Wherein, w(iter) represents the convergence factor of the iterth round of iteration; w max And w min are the maximum and minimum values of the convergence factor respectively; iter max is the maximum iteration number.
[0046] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, and the processor implements the constant force polishing optimization method of the robot according to any one of the above aspects when executing the computer program.
[0047] On the basis of conforming to the common sense of the art, the above-mentioned preferred conditions can be combined arbitrarily, i.e. to obtain each preferred example of the present application.
[0048] The positive progress effect of the present application is that the present application combines the whale algorithm to perform adaptive optimization and solution on the active compliant control model, obtains the optimal parameter value of the impedance parameter of the active compliant control model, realizes the constant force polishing of the robot on the workpiece, and achieves the best polishing effect. BRIEF DESCRIPTION OF DRAWINGS
[0049] Fig. 1 is a flowchart of a constant force polishing optimization method of a robot provided by an exemplary embodiment of the present application;
[0050] Fig. 2 is a control system block diagram of a force-position hybrid control model used in a constant force polishing optimization method of a robot provided by an exemplary embodiment of the present application;
[0051] Fig. 3 is a control system block diagram of an impedance model used in a constant force polishing optimization method of a robot provided by an exemplary embodiment of the present application;
[0052] Fig. 4 is a flow chart of another constant force polishing optimization method of a robot according to an example embodiment of the present application;
[0053] Fig. 5 is a convergence speed effect diagram of a constant force polishing optimization method according to an example embodiment of the present application compared with a traditional method;
[0054] Fig. 6 is a convergence speed effect diagram of a constant force polishing optimization method according to an example embodiment of the present application compared with a traditional method;
[0055] Fig. 7 is a tracking effect diagram of a constant force polishing optimization method according to an example embodiment of the present application compared with a traditional method;
[0056] Fig. 8 is a module diagram of a constant force polishing optimization device of a robot according to an example embodiment of the present application;
[0057] Fig. 9 is a structural diagram of an electronic device according to an example embodiment of the present application. DETAILED DESCRIPTION
[0058] The present application will be further described below by way of examples, but the present application is not limited in scope to the examples described.
[0059] Fig. 1 is a flow chart of a constant force polishing optimization method of a robot according to an example embodiment of the present application, which includes the following steps:
[0060] Step 101, determining an active compliance control model of constant force polishing of the robot.
[0061] In an implementation manner, a user constructs the active compliance control model according to an actual polishing scene.
[0062] In an implementation manner, an appropriate active compliance control model is automatically matched according to an actual polishing scene provided by a user.
[0063] Step 102, constructing an optimization target of the active compliance control model, and optimizing and solving the active compliance control model by a WOA whale optimization algorithm to obtain an optimal parameter value of an impedance parameter of the active compliance control model.
[0064] The impedance parameter includes at least one of an MBK parameter, which is also the optimization object of the present application.
[0065] The optimization target of the active compliance control model can be constructed according to an actual polishing scene.
[0066] In step 102, the whale optimization algorithm is used to iteratively solve the active compliance control model to obtain the optimal parameter value of the impedance parameter of the active compliance control model.
[0067] Step 103, controlling the robot to polish the workpiece according to the impedance parameter and the active compliance control model.
[0068] In the embodiment of the present application, the active compliance control model is adaptively optimized and solved by combining the whale algorithm, so as to obtain the optimal parameter value of the impedance parameter of the active compliance control model, realize the constant force polishing of the robot on the workpiece, and achieve the best polishing effect.
[0069] In one embodiment, the active compliance control model adopts a force-position hybrid control model, and minimizing the comprehensive error of displacement and output force is taken as the optimization target of the active compliance control model. The objective function of the active compliance control model is expressed as follows:
[0070] Wherein, X D represents the desired position of the robot end; X e represents the actual position of the robot end, that is, the actual position of the polishing tool; F D represents the desired radial force of the robot end; F e represents the actual radial force of the robot end, that is, the Cartesian space interaction force between the polishing tool and the workpiece; and λ is an adjustment coefficient.
[0071] Minimizing the comprehensive error of displacement and output force means minimizing J.
[0072] In one embodiment, the constant force polishing with normal planning adopts a force-position hybrid control model, the position constraint is determined by a normal contour estimation model, the force constraint is specified by a user, and a closed loop is formed by using the six-dimensional force sensor feedback data of the robot end. The control system block diagram of the force-position hybrid control model is shown in FIG. 2.
[0073] In the figure, X D represents the desired position; F D is the desired radial force; X e is the actual position; F e is the Cartesian space interaction force between the polishing tool and the workpiece; and S represents a diagonal selection matrix, the elements on the diagonal are 1 or 0, and are determined by the constraint relationship. When the constraint is a natural force constraint and position control is required, the corresponding element is 1, and vice versa. I-S represents a diagonal selection matrix, and is orthogonal to each other.
[0074] In the embodiment of the present application, for the position control mode, the algorithm converts the control quantity into joint displacement form. The force control converts the Cartesian space desired force F D into Cartesian space displacement X f , and the output quantity X pAfter superposition, it is converted into joint space quantity Q by inverse kinematics C The robot is controlled to achieve constant force polishing of the workpiece.
[0075] The system control law of the force-position hybrid control model is as follows:
[0076] Wherein, k pp , k pd are the coefficients of position PD control; k fp , k fi are the coefficients of force PI control; X c is the joint displacement of the robot. k pp , k pd , k fp , k fi are impedance parameters.
[0077] In one embodiment, the active compliance control model adopts an impedance model, and minimizing the output force error is taken as the optimization target of the active compliance control model.
[0078] The robot impedance model in Cartesian space is represented as follows:
[0079] Wherein, X p , is the position error in Cartesian space; M I , B I , K I are the mass matrix, damping matrix, and stiffness matrix in the impedance model, i.e. impedance parameters.
[0080] Active compliance control is to regard the robot and the workpiece as rigid bodies, and simplify the entire system into a spring-mass-damper system, so as to make the system present compliance by adjusting the impedance parameters, as shown in FIG. 3.
[0081] In the figure, X r represents the displacement of the robot end; V r is the robot end velocity; k s is the elastic coefficient of the force sensor; b s is the damping coefficient of the force sensor; X t is the displacement of the polishing tool; m t is the mass of the polishing tool; k t is the stiffness coefficient of the polishing tool, and the transfer function is:
[0082] For the force sensor feedback force F m , there is: F m =k s (X r -Xt )
[0083] F(s) = k m (s) = k s (X r (s) = k t (s))
[0084] The system transfer function is:
[0085] Thus, the transfer function of input displacement and output force is obtained.
[0086] In an embodiment, the active compliance control model adopts a mobility model, and minimizes the displacement error as the optimization target of the active compliance control model. Mobility control is the reverse process of impedance control, and the specific construction process of the mobility model is described in the related art, which will not be described here.
[0087] After the active compliance control model is constructed, the impedance parameters of the active compliance control model are optimized based on the adaptive whale optimization algorithm to obtain the optimal parameter value of the impedance parameters.
[0088] The optimization process of the whale optimization algorithm is as follows: N whale individuals are randomly generated in the search space to form an initial whale population. In the optimization process, the whale population updates its position according to the current optimal whale individual or a randomly selected whale individual, and then the whale individual performs spiral or surrounding motion. The cycle is iterated until the maximum iteration number is reached.
[0089] In an embodiment, the initial whale population is generated based on Bernoulli chaos mapping, the initial whale population is iteratively optimized to obtain the optimal whale individual and the position of the optimal whale individual, and the optimal parameter value of the impedance parameters is determined according to the position of the optimal whale individual.
[0090] In the prior art, the initial whale population is generally randomly generated, and the diversity of the initial whale population is insufficient. The quality of the initial population affects the search efficiency and solution quality of the algorithm, resulting in poor optimization effect.
[0091] In the embodiment of the present application, the initial whale population is generated based on Bernoulli chaotic mapping, and the chaotic particles are mapped to the entire search range to obtain the initial position of the population. This method can greatly increase the spatial coverage of the initial whale population, enhance the global exploration ability of the algorithm, help the algorithm jump out of the local optimum, have better diversity, enable the initial population to approach the optimal solution more quickly, and obtain a solution that is better than the random method in uniformity, which is very helpful to improve the global convergence speed of the algorithm and the quality of the solution. The Bernoulli chaotic mapping also has the advantages of simplicity, high efficiency, strong stability, good ergodicity, and suitability for sparse search space. In the embodiment of the present application, the initial whale population is generated based on Bernoulli mapping, which can effectively improve the optimization efficiency and precision of the whale algorithm.
[0092] In one embodiment, the initial whale population is generated based on Tent mapping. Specifically, the Tent mapping is used to generate a sequence with chaotic characteristics through twice mapping, so as to ensure the diversity of the initial population and improve the subsequent optimization speed in the optimization algorithm.
[0093] The first mapping is based on Tent mapping to map the initial value x n The mapping is performed according to the piecewise function:
[0094] wherein x n+1 represents the result of the first mapping of x n The chaotic sequence after the first mapping;
[0095] The second mapping takes the output of the first mapping as the input and iterates multiple times, which can be represented by a recursive function as follows:
[0096] wherein x n+k represents the result of the kth iteration mapping by the recursive function. k can be set according to actual conditions.
[0097] After multiple iterations in the second mapping, the generated sequence exhibits chaotic characteristics, avoiding the concentration of population individuals in a certain part, thereby improving the diversity of the population.
[0098] In the embodiment, the initial whale population is generated based on the twice mapping of Tent mapping, and the chaotic performance is stable and has good ergodicity.
[0099] In other implementations, other initialization mapping methods such as Logistic mapping, Gauss mapping, etc. can also be used. Logistic mapping is suitable for simple scenarios, and has fast calculation speed, but its convergence is highly dependent on the selection of parameters. The sequence generated by Gauss mapping has strong chaos, and is suitable for optimization problems requiring complex search strategies, but its calculation involves exponential operation, and has large calculation amount and low efficiency.
[0100] In one embodiment, for each iteration, a probability factor and a coefficient vector of the whale population are calculated, a position update model matching the probability factor and the coefficient vector is selected, a position of a whale individual is updated, a fitness of the whale individual after the position update is calculated, and a whale individual whose fitness meets a preset condition is determined as an optimal whale individual.
[0101] In one embodiment, the calculation formula of the fitness is as follows:
[0102] The above preset condition is that the fitness is a minimum value, and the whale individual whose fitness is the minimum value is determined as the optimal whale individual.
[0103] The specific implementation of determining the optimal whale individual is further described below. Referring to FIG. 4, step 102 includes:
[0104] Step 102-1, determining the whale population size N and the maximum iteration number T of the whale algorithm max and generating an initial whale population based on Bernoulli chaotic mapping.
[0105] The formula for generating the initial whale population based on Bernoulli mapping is as follows:
[0106] wherein η t represents a current value of the t th generation chaotic sequence; η t+1 represents a current value of the t+1 th generation chaotic sequence; μ represents an adjustment parameter, which is a set value; and t represents an iteration number.
[0107] The initial position of the whale individual in the search region is updated as:
[0108] wherein, represents an initial position sequence of the whale individual in the search region; represents a value of the t th generation chaotic sequence in the search range; represents a minimum value of the sequence; represents a maximum value of the sequence.
[0109] Step 102-2, calculate the fitness of the whale individuals in the initial whale population, and record the whale individual with the minimum fitness as the optimal whale individual of the initial whale population.
[0110] Step 102-3, calculate the probability factor P and the coefficient vector A of the whale population.
[0111] Step 102-4, select a position update model matched with the probability factor P and the coefficient vector A to update the position of the whale individual.
[0112] wherein the probability factor P is a random number, P ∈ [0, 1]; the coefficient vector A = 2a r1-a, r1 is a random number, r1 ∈ [0, 1], and a is a convergence factor. According to the formula of the coefficient vector A, it can be seen that A is a function linearly converging from 2 to 0, which represents that the convergence process of the algorithm presents a linear convergence state.
[0113] Suppose the size of the whale population is N, and the position of the i-th whale individual in the d-dimensional space can be represented as The position of the prey corresponds to the position of the optimal whale individual, and corresponds to the global optimal solution.
[0114] Whales can recognize the position of the prey and surround them. Since there is no prior knowledge of the global optimal position in the search space before optimization, in the whale algorithm, the optimal position in the current whale population is assumed to be the prey, and all whale individuals in the whale population surround the optimal individual. The position of the whale individual needs to be updated multiple times to obtain the global optimal position.
[0115] In one embodiment, when the probability factor P is greater than or equal to the probability threshold, the bubble net hunting model is used to update the position of the whale individual. The probability threshold can be but is not limited to 0.5.
[0116] When humpback whales surround fish, they move upstream in a spiral upward manner. The bubble net hunting model can simulate this state, assuming that there is a 50% chance of using ring contraction and a 50% chance of using the spiral upward mechanism when updating the position of the whale.
[0117] Referring to the way humpback whales hunt prey by blowing bubbles, the whale moves towards the optimal individual in a spiral motion, and the formula of the bubble net hunting model is as follows: X(t+1) = D p e bl cos(2πl) + ω(t)X*(t); D p = |X * (t) - X(t) |;
[0118] wherein X(t+1) represents the position vector of the whale individual in the t+1th iteration; b represents a constant used to define the logarithmic spiral shape; l ∈ [-1, 1] is a random number; X *(t) denotes the position vector of the recorded optimal whale individual; X(t) denotes the position vector of the whale individual in the tth iteration; D p denotes the distance between the ith whale individual and the optimal whale individual in the current iteration; ω(t) denotes the convergence factor.
[0119] In one embodiment, b and l are both 0.5.
[0120] In one embodiment, the convergence factor ω(t) of the bubble-net hunting model is adaptively adjusted in the optimization solving process, and the convergence factor ω(t) changes nonlinearly. The convergence factor (inertia weight) is an important parameter of the bionic swarm intelligence algorithm, which will affect the solving process of the algorithm. In this embodiment, the adaptive adjustment of the convergence factor can improve the convergence speed and stability of the optimization solving, and the correction effect is significant.
[0121] In one embodiment, the calculation formula of the convergence factor is as follows:
[0122] wherein ω(t) denotes the convergence factor in the tth iteration; ω s is the initial convergence factor; ω e is the convergence factor when the maximum number of iterations is reached; T max denotes the maximum number of iterations.
[0123] The optimization reaching rate is higher when the convergence factor is 0.5-0.9. In one embodiment, ω s = 0.9 and ω e = 0.5 are selected. Such adjustment makes the algorithm maintain strong global search ability in the early stage of iteration due to the larger convergence factor, and the local search ability of the algorithm is improved in the later stage of iteration due to the smaller convergence factor.
[0124] In this embodiment, the adaptive change of the convergence factor makes the iteration speed of the algorithm evolution process change nonlinearly, so that the search strategy of the algorithm changes with the number of iterations, further improving the convergence speed and stability of the algorithm, and the correction effect is significant. Moreover, the adaptive adjustment method of the convergence factor in this embodiment has relatively low dependence on parameters, and does not require a large number of parameter adjustments, so it has good effect when dealing with high-dimensional and complex problems. In addition, this adaptive adjustment method of the convergence factor has strong adaptability, and can solve continuous, discrete, single-objective and multi-objective optimization problems, and is superior to other adaptive algorithms in parameter optimization.
[0125] In one embodiment, the convergence factor is adaptively adjusted according to the linear decreasing strategy, and the formula is as follows:
[0126] wherein w(iter) denotes the convergence factor in the iterth iteration; w max and wmin are the maximum and minimum values of the convergence factor respectively; iter is the iteration number; iter max is the maximum iteration number.
[0127] The adjustment method of the convergence factor adopted in this embodiment gradually reduces the convergence factor from large to small, mainly global search at the initial stage, and enhances local search at the later stage, which is simple and effective.
[0128] The core of the adaptive weight adjustment algorithm of this embodiment is to dynamically adjust the weight according to the characteristics of the problem and the quality of the solution, so as to improve the efficiency and accuracy of the search, which is suitable for solving various optimization problems.
[0129] In one embodiment, the convergence factor is the weighted result of ω(t) and w(iter).
[0130] In one embodiment, the surrounding mechanism of the bubble net hunting model is determined by the probability factor p and the coefficient vector A, the probability threshold is 0.5, and the modulus threshold is 1.
[0131] When p>0.5, the whale individual updates the position in a spiral, and when p>0.5 and |A|<1, the whale reduces the surrounding circle, and the mechanism model is as follows:
[0132] In one embodiment, when the probability factor p is less than the probability threshold and the modulus |A| of the coefficient vector is less than the modulus threshold, the position of the whale individual is updated by using the prey surrounding model. The probability threshold can be but is not limited to 0.5, and the modulus threshold can be but is not limited to 1.
[0133] In order to simulate the whale hunting process, and at the same time there is a 50% probability of the phenomenon of two behaviors, the prey surrounding model is added in the algorithm. A probability factor is set, and the user can choose a state to trigger under the condition of a certain 50% probability.
[0134] The formula of the prey surrounding model is as follows: X(t+1)=ω(t)X * (t)-A·D; D=|C·X * (t)-X(t)|; A=2a·r1-a; C=2a·r2; a=2-2t / T max ;
[0135] Wherein, D represents the distance between the whale individual and the prey; A and C are coefficient vectors; T max represents the maximum iteration number; a is the convergence factor; r1 and r2 are random numbers in [0, 1].
[0136] In one embodiment, the convergence factor of the position updating model is adaptively adjusted during the process of optimizing the position updating model, and the convergence factor is calculated by using a nonlinear function ω(t) so that the convergence factor ω(t) is nonlinearly changed. In this embodiment, the convergence speed and stability of the optimization are improved by using the adaptive adjustment of the convergence factor, and the correction effect is remarkable.
[0137] In one embodiment, the function for calculating the convergence factor of the position updating model is represented as follows:
[0138] wherein ω s is the initial convergence factor; ω e is the convergence factor when the maximum iteration number is reached.
[0139] In one embodiment, ω s = 0.9 and ω e = 0.5 are selected. Such adjustment makes the algorithm maintain strong global search ability in the early iteration due to the larger convergence factor, and the local search ability of the algorithm is improved in the later iteration due to the smaller convergence factor.
[0140] In this embodiment, the adaptive change of the convergence factor makes the iteration speed of the algorithm evolution process change nonlinearly, and the search strategy of the algorithm changes with the iteration number, further improving the convergence speed and stability of the algorithm, and the correction effect is remarkable.
[0141] In one embodiment, the position of the whale individual is updated by using the random exploration model when the probability factor p is less than the probability threshold and the modulus |A| of the coefficient vector is greater than or equal to the modulus threshold. The probability threshold can be but is not limited to 0.5, and the modulus threshold can be but is not limited to 1.
[0142] The random exploration model can simulate the phenomenon that the whale sometimes leaves the group and searches for food alone in nature. The addition of the random exploration model makes the randomness of the algorithm stronger and provides the search ability of the algorithm.
[0143] The formula of the random exploration model is as follows: D' = |C·X rand -X(t)|; X(t+1) = X rand -A·D';
[0144] wherein D' represents the position vector of the current search whale individual and a random individual; X rand represents the position vector of the whale individual randomly selected from the current whale group;
[0145] Step 102-5, the fitness of the whale individual after the position updating is calculated, and it is judged whether the minimum fitness of the whale individuals is less than the fitness of the recorded optimal whale individual.
[0146] If the result of the judgment in step 102-5 is yes, step 102-6 is performed.
[0147] If the result of the judgment in step 102-5 is no, step 102-7 is performed.
[0148] The optimal whale individual is recorded in each iteration, and in the current iteration, it is determined whether the minimum fitness of each whale individual in the current iteration is less than the fitness of the optimal whale individual recorded in the last iteration.
[0149] In each iteration, the fitness of the whale individual after the position update in the current iteration is compared with the fitness of the optimal whale individual recorded in the last iteration. If the minimum fitness of the whale population after the position update in the current iteration is greater than or equal to the fitness of the optimal whale individual recorded before, the whale individual with the minimum fitness in the current iteration is determined as the optimal whale individual, and its position is determined as the optimal solution of the current iteration. If the minimum fitness of the whale population after the position update in the current iteration is less than the fitness of the optimal whale individual recorded before, the optimal whale individual recorded before is determined as the optimal whale individual of the current iteration, and its position is determined as the optimal solution of the current iteration.
[0150] For the first iteration, the optimal whale individual is the whale individual with the minimum fitness in the initialized whale population.
[0151] For the second and subsequent iterations, the optimal whale individual is the optimal whale individual recorded in the last iteration and the whale individual with the minimum fitness in the current iteration.
[0152] Step 102-6, the whale individual with the minimum fitness is updated as the optimal whale individual of the current iteration.
[0153] Step 102-7, the optimal whale individual recorded in the last iteration is determined as the optimal whale individual of the current iteration.
[0154] Step 102-8, it is determined whether the number of iterations in the current iteration reaches the maximum number of iterations T. max .
[0155] If the result of the judgment in step 102-8 is yes, step 102-9 is performed.
[0156] If the result of the judgment in step 102-8 is no, return to step 102-3.
[0157] Step 102-9, the optimal parameter value of the impedance parameter is determined according to the position of the optimal whale individual in the current iteration.
[0158] In the embodiment of the present application, firstly, Bernoulli chaotic mapping is adopted to generate initial whale population, instead of random generation, so that the whale population has good diversity, and the strategy of adjusting the adaptive convergence factor makes the convergence speed of the algorithm more in line with expectations, which is a simple and extremely fast optimization algorithm, lays a foundation for global search of the algorithm, and has strong optimization performance.
[0159] As can be seen from Figure 5, the convergence speed of the improved WOA algorithm adopted in the embodiment of the present application is obviously faster than that of the traditional WOA algorithm; as can be seen from Figure 6, the iteration convergence efficiency of the improved WOA algorithm adopted in the embodiment of the present application is more in line with expectations than that of the traditional WOA algorithm; and as can be seen from Figure 7, the tracking effect of the improved WOA algorithm adopted in the embodiment of the present application is better than that of the traditional WOA algorithm.
[0160] In one embodiment, during the process of controlling the robot to polish with constant force, the running data of the robot is collected, the running data and the optimal parameter value are substituted into the active compliance control model to obtain the parameter value of the output control parameter of the active compliance control model, and the robot is controlled to polish the workpiece according to the parameter value of the output control parameter
[0161] The parameters contained in the running data match the input control parameters of the active compliance control model.
[0162] If the active compliance control model adopts a force-position hybrid control model, force control and position control are required, the input control parameters include the radial force at the end of the robot and the actual position at the end of the robot, and correspondingly, the parameters contained in the running data include the radial force at the end of the robot and the actual position at the end of the robot.
[0163] If the active compliance control model adopts an impedance module, the input position outputs force, the input control parameters include the actual position at the end of the robot, and correspondingly, the parameters contained in the running data include the actual position at the end of the robot.
[0164] If the active compliance control model adopts an admittance module, the input force outputs position, the input control parameters include the radial force at the end of the robot, and correspondingly, the parameters contained in the running data include the radial force at the end of the robot.
[0165] Taking the impedance model as an example, the process of robot constant force polishing is further described below.
[0166] For robot grinding force calculation, F = F a +F p +F c
[0167] Wherein, F represents the total grinding force, F a represents the axial grinding force, and Fc F represents the tangential grinding force. p This indicates the normal grinding force.
[0168] F a With F p The following empirical formula exists:
[0169] Wherein, λ is the grinding force ratio, which reflects the sharpness of the abrasive grains of the grinding tool (such as a grinding wheel), and is generally taken as 1.6 to 3.2 for materials.
[0170] Let the offset of the grinding wheel in the force sensor coordinate system be ΔX, ΔY, ΔZ, the radius of the grinding wheel be r, and the normal grinding force be F. p Coordinate system Y of the force sensor s The included angle of the axes is θ f The feed direction is f t Then we have:
[0171] because S M τmz With the magnitude unchanged, the torque information measured by the force sensor is as follows:
[0172] in, S M τmx The force sensor measures the X-ray. s Torque on the shaft; S M τmy The force sensor measures the Y-axis s Torque on the shaft; S M τmz The Z-axis measured by the force sensor s Torque on the shaft.
[0173] When the feed rate and grinding conditions are constant, the tangential grinding force is F. c With radial grinding force F p Proportional, i.e., F p =λF c ;
[0174] Therefore, when the included angle θ f When constant, the change in the measured torque value depends only on F. p related.
[0175] To maintain a constant grinding force, the key lies in maintaining the measured torque value and F. p With force sensor coordinate system Y s The included angle θ of the axis f For constant normal profile planning, θ needs to be calculated in real time. f The value of .
[0176] According to the following formula:
[0177] We have:
[0178] where φ = atanλ.
[0179] Similarly, we have: S M τmy = F p ΔZcscφcos(θ f +φ)
[0180] Combining the two equations, we have:
[0181] Therefore, as long as the measurements of S M τmx , S M τmy and λ are obtained, the included angle θ f can be calculated. That is, the normal vector of the workpiece profile can be estimated in real time through the measured moment information.
[0182] Let the angle difference be Δθ , then the transformation matrix is Rot(z, Δθ). Taking the Z-axis of the end effector as an example, the pose transformation matrix is:
[0183] Calculate the angle difference Δθ
[0184] Get the transformation matrix, as follows:
[0185] Therefore, the pose matrix containing the normal profile planning is:
[0186] where ΔT represents the transformation matrix, i.e., the normal pose compensation amount; represents the desired pose of the workpiece Tool in the base coordinate system B; represents the updated value; z represents the Z-axis of the polishing workpiece coordinate system.
[0187] The radial grinding pressure F P and the included angle between the force sensor coordinate system Y s axis are θ f , according to the formula update , that is, the desired pose based on the surface normal information compensation is realized.
[0188] The transformation matrix is used to compensate the robot pose in real time.
[0189] In one embodiment, the data measured by the force sensor at the end of the robot is also error-compensated.
[0190] The force sensor is used to collect the actual radial force of the robot end, and the information collected by the force sensor is affected by the zero drift error, installation stress, gravity and gravity moment of the sensor itself, etc. In an embodiment, at least one of the above influences is compensated for error to improve control accuracy.
[0191] A. Elimination of sensor zero drift and installation stress
[0192] Let the installation stress be F install , the installation stress in the force sensor coordinate system is: A F install = [ A F lx , A F ly , A F lz , A M lx , A M ly , A M lz ] T ;
[0193] Wherein, A F lx , A F ly and A F lz respectively represent the force components generated by the installation force in the X, Y, Z three directions; A M lx , A M ly and A M lz respectively represent the moment components generated by the installation force in the X, Y, Z three directions.
[0194] Let the zero point drift value of the force sensor be F Draft , the zero point drift value in the force sensor coordinate system is: A F Draft = [ A F Dx , A F Dy , A F Dz , A M Dx , A M Dy , A M Dz ] T
[0195] Wherein, A FDx 、 A F Dy and A F Dz represent the force components in X, Y, Z directions due to zero drift respectively; A M Dx 、 A M Dy and A M Dz represent the moment components in X, Y, Z directions due to zero drift respectively.
[0196] Since the installation stress of the sensor and the zero drift value will not be abrupt, let F Hardware represent the sum of the installation stress and the zero drift, then: A F Hardware = A F Draft + A F install = A F Hx , A F Hy , A F Hz , A M Hx , A M Hy , A M Hz T
[0197] where, A F Hx , A F Hy and A F Hz represent the force components in X, Y, Z directions due to installation stress and zero drift respectively; A M Hx , A M Hy and A M Hz represent the moment components in X, Y, Z directions due to installation stress and zero drift respectively.
[0198] B. End effector gravity compensation
[0199] where, x0 , y0 , z0 T is the gravity of the end effector in the base coordinate system B, is the inverse of the 3 3 attitude matrix of the force sensor coordinate system Tool relative to the base coordinate system B at any time, and satisfies [F xt ,F yt ,F zt ] T is the force component of the end effector gravity in the force sensor coordinate system at any time.
[0200] C. End effector gravity torque compensation
[0201] wherein, [M xt ,M yt ,M zt ] T is the torque generated by the end effector gravity at any time; [l x ,l y ,l z ] T is obtained by reading out [M x0 ,M y0 ,M z0 ] T end effector gravity torque generated in the force sensor coordinate system and the force [F x0 ,F y0 ,F z0 ] T measured by the force sensor at the initial time.
[0202] After the results measured by the force sensor are processed by at least one of A, B and C, the error compensation of the force sensor is completed. The results measured by the force sensor described below can be the results processed by at least one of A, B and C.
[0203] Corresponding to the foregoing robot constant force polishing optimization method embodiment, the application also provides an embodiment of a robot constant force polishing optimization device.
[0204] Fig. 8 is a module schematic diagram of a robot constant force polishing optimization device provided by an exemplary embodiment of the application, which device comprises:
[0205] A determination module 81 is configured to determine an active compliance control model of constant force polishing of the robot.
[0206] An optimization module 82 is configured to minimize the comprehensive error of displacement and output force as an optimization target of the active compliance control model, and to optimize and solve the active compliance control model by a whale optimization algorithm to obtain optimal parameter values of impedance parameters of the active compliance control model.
[0207] A control module 83 is configured to control the robot to polish the workpiece with constant force according to the optimal parameter value and the active compliant control model.
[0208] In one embodiment, the optimization module 82 is configured to:
[0209] An initialization unit is configured to generate an initial whale population based on a Bernoulli chaotic mapping;
[0210] An optimization unit is configured to iteratively optimize the initial whale population to obtain an optimal whale individual and a position of the optimal whale individual.
[0211] A determination unit is configured to determine an optimal parameter value of the impedance parameter according to the position of the optimal whale individual.
[0212] In one embodiment, the optimization unit is specifically configured to:
[0213] For each round of iteration, calculate a probability factor and a coefficient vector of the whale population;
[0214] Select a position update model matching the probability factor and the coefficient vector to update the position of the whale individual;
[0215] Calculate the fitness of the whale individual after position update, and determine the whale individual satisfying a preset condition in fitness as the optimal whale individual.
[0216] In one embodiment, when the probability factor is greater than or equal to a probability threshold, a bubble-net hunting model is adopted to update the position of the whale individual;
[0217] When the probability factor is less than the probability threshold and a modulus of the coefficient vector is less than a modulus threshold, an encircling model is adopted to update the position of the whale individual;
[0218] When the probability factor is less than the probability threshold and the modulus of the coefficient vector is greater than or equal to the modulus threshold, a random exploration model is adopted to update the position of the whale individual.
[0219] In one embodiment, the control module 83 is specifically configured to:
[0220] Collect running data of the robot, the parameters contained in the running data matching the input control parameters of the active compliant control model;
[0221] Substitute the running data and the optimal parameter value into the active compliant control model to obtain a parameter value of an output control parameter of the active compliant control model;
[0222] Control the robot to polish the workpiece with constant force according to the parameter value of the output control parameter.
[0223] In one embodiment, the initial whale population of the whale algorithm is generated based on Bernoulli chaotic mapping; or the initial whale population is generated based on Tent mapping and through twice mapping, wherein the first mapping adopts a piecewise function, and the second mapping takes the output of the first mapping as input and adopts a recursive function;
[0224] In one embodiment, for each round of iteration, a position update model matching the probability factor and the coefficient vector of the whale population is selected to update the position of the whale individual in the whale population;
[0225] In one embodiment, the convergence factor of the position update model is calculated by using a nonlinear function;
[0226] In one embodiment, the calculation formula of the convergence factor of the position update model is as follows:
[0227] wherein ω(t) represents the convergence factor of the tth round of iteration; ω s represents the initial convergence factor; ω e represents the convergence factor at the maximum number of iterations; T max represents the maximum number of iterations.
[0228] In one embodiment, the calculation formula of the convergence factor of the position update model is as follows:
[0229] wherein w(iter) represents the convergence factor of the iterth round of iteration; w max and w min are the maximum and minimum values of the convergence factor respectively; iter max is the maximum number of iterations.
[0230] In one embodiment, the convergence factor is the weighted result of ω(t) and w(iter).
[0231] For the device embodiment, since it basically corresponds to the method embodiment, the relevant part can be referred to the part of the method embodiment. The device embodiment described above is only illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. can be located in one place, or can be distributed to multiple network units. According to the actual needs, part or all of the modules can be selected to achieve the purpose of the present application.
[0232] FIG. 9 is a schematic diagram illustrating the structure of an electronic device according to an example embodiment of the present application, showing a block diagram of an example electronic device 90 suitable for implementing embodiments of the present application. The electronic device 90 shown in FIG. 9 is merely one example and should not be construed as limiting the scope of the functionality or use of embodiments of the present application.
[0233] As shown in FIG. 9, the electronic device 90 can be in the form of a general computing device, such as a server device. Components of the electronic device 90 can include, but are not limited to, the at least one processor 91, the at least one memory 92, and a bus 93 that connects the various system components, including the memory 92 and the processor 91.
[0234] The bus 93 can include a data bus, an address bus, and a control bus.
[0235] The memory 92 can include volatile memory, such as random access memory (RAM) 921 and / or cache memory 922, and can further include non-volatile memory, such as read-only memory (ROM) 923.
[0236] The memory 92 can also include program tools 925 (or utilities) having a set of (at least one) program modules 924, including but not limited to: an operating system, one or more application programs, other program modules, and program data, and each of these examples, or some combination thereof, can include implementation of a network environment.
[0237] The processor 91 can execute various functions and data processing by running computer programs stored in the memory 92, such as the methods provided by any of the embodiments described above.
[0238] The electronic device 90 can also communicate with one or more external devices 94 (such as a keyboard or a pointing device) via an input / output (I / O) interface 95. Also, the electronic device 90 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with the other modules of the electronic device 90 via the bus 93. It should be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device 90, such as but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Array of Independent Disks) systems, tape drives, and data backup storage systems, etc.
[0239] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, according to an embodiment of the application, the features and functionalities of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functionalities of one unit / module described above can be further divided into units / modules embodied by several units / modules.
[0240] The embodiments of the present application also provide a computer readable storage medium, which stores a computer program. The program is executed by a processor to implement the method provided by any of the above embodiments.
[0241] More specifically, the readable storage medium can include, but is not limited to, a portable disc, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0242] In possible embodiments, the embodiments of the present application can also be implemented in the form of a program product, which includes program codes for causing the terminal device to execute the method according to any of the above embodiments when the program product is run on the terminal device.
[0243] The program codes for executing the present application can be written in any combination of one or more programming languages, and can be executed completely on the user device, partially on the user device and partially on a remote device, or completely on a remote device. Although the above describes specific embodiments of the present application, those skilled in the art should understand that these are merely illustrative, and various changes or modifications can be made to these embodiments without departing from the principles and essence of the present application. Therefore, the scope of protection of the present application is defined by the appended claims.
Claims
1. A constant force polishing optimization method for a robot, characterized by, The method comprises the steps of: determining an active compliance control model of constant force polishing of the robot; constructing an optimization target of the active compliance control model, and optimizing and solving the active compliance control model by using a whale optimization algorithm to obtain optimal parameter values of impedance parameters of the active compliance control model; controlling the robot to perform constant force polishing on a workpiece according to the optimal parameter values and the active compliance control model.
2. The constant force sanding optimization method of claim 1, wherein, The optimization and solving of the active compliance control model by using the whale optimization algorithm to obtain the optimal parameter values of the impedance parameters of the active compliance control model comprises the steps of: generating an initial whale population based on a Bernoulli chaotic mapping, or generating an initial whale population based on a Tent mapping and through twice mapping, wherein the first mapping adopts a piecewise function, and the second mapping takes the output of the first mapping as input and adopts a recursive function; iteratively optimizing the initial whale population to obtain an optimal whale individual and a position of the optimal whale individual; determining the optimal parameter values of the impedance parameters according to the position of the optimal whale individual.
3. The constant force sanding optimization method of claim 2, wherein, The iteratively optimizing of the initial whale population to obtain an optimal whale individual comprises the steps of: for each round of iteration, calculating a probability factor and a coefficient vector of the whale population; selecting a position updating model matched with the probability factor and the coefficient vector to update the position of the whale individual; calculating the fitness of the whale individual after the position is updated, and determining a whale individual whose fitness meets a preset condition as the optimal whale individual.
4. The constant force sanding optimization method of claim 3, wherein, The selecting of the position updating model matched with the probability factor and the coefficient vector to update the position of the whale individual comprises the steps of: when the probability factor is greater than or equal to a probability threshold, adopting a bubble net hunting model to update the position of the whale individual; when the probability factor is less than the probability threshold and a modulus of the coefficient vector is less than a modulus threshold, adopting an encircling model to update the position of the whale individual; when the probability factor is less than the probability threshold and the modulus of the coefficient vector is greater than or equal to the modulus threshold, adopting a random exploration model to update the position of the whale individual.
5. The constant force sanding optimization method of claim 3, wherein, A convergence factor of the position updating model is calculated by using a nonlinear function; And / or, the calculation formula of the convergence factor of the position update model is as follows: where ω(t) represents the convergence factor of the tth iteration; ω s represents the initial convergence factor; ω e represents the convergence factor at the maximum number of iterations; T max represents the maximum number of iterations; And / or, the calculation formula of the convergence factor of the position update model is as follows: where w(iter) represents the convergence factor of the iter-th iteration; w max and w min are the maximum and minimum values of the convergence factor, respectively; iter max is the maximum number of iterations.
6. The constant force sanding optimization method of a robot according to any one of claims 1-5, wherein, The controlling of the robot to perform constant force polishing on a workpiece according to the optimal parameter values of the impedance parameters and the active compliance control model comprises the steps of: collecting running data of the robot, wherein parameters contained in the running data match input control parameters of the active compliance control model; substituting the running data and the optimal parameter values into the active compliance control model to obtain parameter values of output control parameters of the active compliance control model; controlling the robot to perform constant force polishing on the workpiece according to the parameter values of the output control parameters.
7. The constant force sanding optimization method of claim 6, wherein, The active compliance control model adopts an impedance model, and the optimization target is to minimize an output force error. Alternatively, the active compliance control model adopts an admittance model, and the optimization target is to minimize a displacement error. Alternatively, the active compliance control model adopts a force-position hybrid control model, and the optimization target is to minimize a comprehensive error of displacement and output force.
8. A constant force polishing optimization device for a robot, comprising: The method comprises the steps of: determining an active compliance control model of constant force polishing of the robot; An optimization module is configured to minimize the comprehensive error of displacement and output force as the optimization target of the active compliance control model, and to optimize and solve the active compliance control model by using a whale optimization algorithm to obtain optimal parameter values of impedance parameters of the active compliance control model. A control module is configured to control the robot to perform constant force polishing on a workpiece according to the optimal parameter values and the active compliance control model.
9. The constant force sanding optimization device of the robot according to claim 8, wherein, The initial whale population of the whale optimization algorithm is generated based on a Bernoulli chaotic mapping, or the initial whale population is generated based on a Tent mapping and through twice mapping, wherein the first mapping adopts a piecewise function, and the second mapping takes the output of the first mapping as input and adopts a recursive function. For each round of iteration, a position update model that matches a probability factor and a coefficient vector of the whale population is selected to update the position of each whale in the whale population. The convergence factor of the position update model is calculated by using a nonlinear function. And / or, the calculation formula of the convergence factor of the position update model is as follows: where ω(t) represents the convergence factor of the tth iteration; ω s represents the initial convergence factor; ω e represents the convergence factor at the maximum number of iterations; T max represents the maximum number of iterations; And / or, the calculation formula of the convergence factor of the position update model is as follows: where w(iter) represents the convergence factor of the iter-th iteration; w max and w min are the maximum and minimum values of the convergence factor, respectively; iter max is the maximum number of iterations.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory for running on the processor, characterized in that, The processor executes the computer program to implement the constant force polishing optimization method of the robot according to any one of claims 1 to 7.
Citation Information
Patent Citations
Compliant task control method based on plane constant force
CN115723137A
Permanent magnet synchronous motor speed control method based on chaos adaptive optimization whale algorithm
CN117013896A
Constant-force flexible grinding equipment and constant-force control system
CN117067045A
Constant-force grinding optimization method and device of robot and electronic equipment
CN118466194A
Compliant force control method and system for collaborative robot
WO2023116129A1
Cited By
Engineering optimization method and system based on whale optimization algorithm and medium
CN121351871A
Engineering optimization methods, systems, and media based on the whale optimization algorithm
CN121351871B