A high-dimensional parameter optimization method and its application in robotic arms
By introducing the NEI-BO algorithm of the neuroendocrine immune system into the swarm intelligence optimization algorithm, neural guidance, immune orientation and endocrine regulation are used to optimize the antibody evolution state, solving the problems of slow convergence speed and low accuracy in high-dimensional parameter optimization, and improving The optimization accuracy and stability of the robot arm joint angle are achieved.
Patent Information
- Application Number
- CN201911218347.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-03
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-12-03
AI Technical Summary
Existing swarm intelligence optimization algorithms have problems such as slow convergence speed, low accuracy, low local search ability, and easy falling into local minima in high-dimensional parameter optimization. Especially in robotic arm applications, joint angle optimization accuracy and stability are insufficient. .
An intelligent high-dimensional parameter optimization algorithm NEI-BO is proposed, which is based on the neuroendocrine immune system and includes a neural guidance optimization unit, an immune-directed optimization unit and an endocrine regulation optimization unit. Through guidance and directional optimization of the antibody evolution state, the learning factor is adaptively adjusted. Improve global convergence capability and convergence speed.
It significantly improves the global search capability and convergence speed of the algorithm, improves the accuracy and stability of the robot arm joint angle, and optimizes the optimization accuracy and control effect.
Smart Images

Figure CN111199076B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of swarm intelligence optimization, and in particular to a high-dimensional parameter optimization method and its application in a robotic arm. Background Art
[0002] Optimization problems are common in industrial production, image processing and other fields, especially some complex problems involving high-dimensional parameter optimization. To solve such problems, people have proposed a variety of solutions, among which swarm intelligence optimization algorithm, as an efficient computing method, has a significant effect on solving high-dimensional optimization problems. At present, swarm intelligence algorithms inspired by biological group behavior mainly include ant colony algorithm (ACO), particle swarm algorithm (PSO), artificial fish swarm algorithm (AFSA), artificial bee colony algorithm (ABC), firefly algorithm (GSO), etc.; those inspired by biological evolution mainly include genetic algorithm (GA) and differential evolution algorithm. However, the existing optimization methods either have good robustness, but large amount of calculation and low efficiency, or have fast optimization speed but low solution accuracy, and the blindness of the algorithm in the later stage of search is relatively large. Some of them have technical problems such as low local search ability and slow convergence speed in the later stage. Although the genetic algorithm has strong global search ability and inherent parallelism, it has a relatively slow convergence speed and is easy to fall into the local optimal value. In addition, the differential evolution algorithm is a population-based adaptive global optimization algorithm, which is easy to implement and has high robustness, but the convergence speed is slow in the later stage. To solve the above problems, the existing improvements to the particle swarm algorithm mainly include the improvement of inertia weight and learning factor, among which the time-varying weight and fixed weight method are mainly used in the improvement of inertia weight. The improvement of learning factor mainly includes the nonlinear asynchronous change method and the synchronous learning factor method. The above improvements to the particle swarm algorithm have solved the global convergence problem of the algorithm to a certain extent, but the convergence speed and convergence accuracy are still not ideal. In many high-dimensional parameter optimization processes, many improved algorithms are prone to fall into local minima at the beginning. Summary of the invention
[0003] In order to solve the above technical problems, the present invention specifically combines the application characteristics of the field of robotic arms, and proposes an intelligent high-dimensional parameter optimization algorithm (Intelligent high-dimensional biological optimization algorithm based on NEI system, NEI-BO) based on the neuroendocrine-Immune (NEI) system and its application in the robotic arm. The algorithm has a strong global convergence ability and convergence speed, and plays an important role in solving high-dimensional parameter optimization problems. The optimization convergence speed and optimization accuracy of the NEI-BO algorithm are further verified through experiments, and the optimization algorithm is used to solve the inverse solution angle of the robotic arm joint, which improves the accuracy and stability of the optimal value of the joint angle of the robotic arm.
[0004] A high-dimensional parameter optimization method, the main structure of the biological optimization algorithm mainly includes a neural guidance optimization unit, an immune-directed optimization unit and an endocrine regulation optimization unit. The main function of the neural guidance optimization unit is to guide and mutate the evolutionary state of the antibody according to certain rules, so that each antibody can search a larger search space; the main function of the immune-directed optimization unit is to select a suboptimal solution according to certain rules and regard it as the optimal solution in the next iteration process for calculation, thereby improving the global search ability of the antibody; the main function of the endocrine regulation optimization unit is to adaptively change its learning factor based on the value of the antibody evolution generation distance vector optimized by direction and guidance, and refer to the rules of insulin secretion, thereby accelerating the overall convergence of the antibody population.
[0005] The high-dimensional parameter optimization method first defines the high-dimensional parameter as the antibody to be optimized, and simultaneously defines a guiding effect coefficient Fn(β) and an immune directional effect coefficient Fs; specifically includes the following steps:
[0006] Step 1: Initialize the evolution state parameters and selection length of each antibody and calculate the fitness function value of each antibody;
[0007] Step 2: Send the current evolutionary state to the endocrine regulation system to generate a learning factor; start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor, and input the set values of the guidance coefficient Fn(β) and the immune directional coefficient Fs to calculate the evolutionary generation vector of the antibody and its antibody evolutionary state, including:
[0008] When the guiding effect coefficient is judged to be Fn(β)>r and Fs>r, the update formula of the evolutionary generation vector vi(t+1) of the antibody is v i (t+1)=wv i (t)+c1r1(pib (t)-x i (t))+c2r2(p gb (t)-x i (t)), and the calculation formula of the antibody evolution state xi(t+1) is: i (t+1)=x i (t)+v i (t+1);
[0009] When the guiding effect coefficient is judged to be Fn(β)≤r and Fs>r, the evolutionary generation distance vector v′ of the antibody i The update formula for (t+1) is v′ i (t+1)=v i (t+1)+c3r3(p n (t)-x i (t)); and the antibody evolution state formed is x i The calculation formula for (t+1) is
[0010] Among them, c3r3(p n (t)-x i (t)) is the guiding term, c1, c2, c3 are learning factors, r1, r2 and r3 are random numbers in [0,1], p n (t) is the state of the guidance point generated in each iteration; w is the inertia weight; v i (t) and x i (t) represent the speed and state of the ith antibody respectively; P ib (t), P gb (t) represent the individual optimal state and the global optimal state respectively;
[0011] When the guiding effect coefficient is judged to be Fn(β)>r and Fs≤r, the update formula of the evolutionary generation distance vector si(t+1) of the antibody is s i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c2r2(p s (t)-x i (t)); and the calculation formula of the antibody evolution state xi(t+1) is x i (t+1)=x i (t)+s i (t+1);
[0012] When the guiding effect coefficient is judged to be Fn(β)≤r and Fs≤r, the update formula of the evolutionary generation distance vector si'(t+1) of the antibody is:
[0013] s′ i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c3r3(p n (t)-x i (t))+c2r2(p s (t)-x i (t)),
[0014] The calculation formula of the antibody evolution state xi(t+1) is x i (t+1)=x i (t)+s′ i (t+1), where ps(t) is the immune-oriented state, corresponding to the global optimal state in the next iteration;
[0015] Step three, calculate the fitness of each antibody after update according to the evolutionary generation distance vector of the antibody, and judge whether the stopping condition is met or the number of iterations reaches a specific threshold. If not, return to step two, otherwise end the optimization process and output the final evolutionary state x(t) of the antibody.
[0016] Among them, sending the current evolutionary state to the endocrine regulation system and generating the learning factor further includes:
[0017] Get the current state and substitute it into the learning factor adaptive change formula for update. The learning factors are c2 and c3. The formula for generating the learning factor is:
[0018]
[0019] Where a and b are scaling coefficients, and a<0, b>0; λ and Q are positive real numbers; when i is 2, p(t) is p gb (t) or p s (t), when i is 3, p(t) is p n (t); is the proportional weight of the learning factor, and D is the dimension of the antibody.
[0020] Furthermore, the p n (t) is the state of the guidance point generated in each iteration, and its calculation formula is:
[0021] in, Represents the guiding point p n The value range of .
[0022] Among them, the The calculation formula is: ,
[0023] In the formula, x gb , x max , x min are the upper and lower limits of the global optimal point, respectively. f -1 (rand) The number of solutions.
[0024] Further, calculating the fitness of each antibody after update according to the evolutionary generation distance vector of the antibody, and judging whether the stopping condition is met also includes:
[0025] Get the improved neural guidance optimization unit in F n (β)>r state and F n The next generation evolution distance vector V of antibodies generated under the state (β)≤r i+1 and V′ i+1 , calculate the V′ after the neural guided optimization unit is improved i+1 With V i+1 The angle change is as follows:
[0026]
[0027] Among them, V i+1 and V′ i+1 F n (β)>r state and F n The next generation evolutionary generation distance vector of antibodies generated under the state of (β)≤r, each V is a 1×D matrix, where D represents the dimension of V, θ and θ′ are the angles between the contemporary antibody evolutionary generation distance vector and the next generation evolutionary generation distance vector under the unguided state and the guided state, respectively; the change value of the angle is generated and saved in the database as a reference value for later optimization.
[0028] Wherein, the immune directional state ps(t) further comprises the following generation steps:
[0029] S1: For each antibody in the immune-directed unit, an immune selection length L is added to measure the number of times the antibody is not selected to become p s The number of times, initialize L = 0;
[0030] S2: Sort the immune selection length L of antibodies and mark them from 1 to m, where m is the number of antibodies;
[0031] S3: Set the jump value of L to n, where n is a positive integer and q=1;
[0032] S4: Determine whether the L of the qth antibody is n. If so, use the qth antibody as Ps in the next iteration, reset the L of the qth antibody to zero, increase the L of the remaining antibodies by 1, and end the immune-directed optimization process;
[0033] S5: Otherwise, set q=q+1 and return to S4.
[0034] Preferably, the stopping condition is satisfied, specifically including:
[0035] Calculate the preset rotation matrix R and the posture matrix T obtained by algorithm optimization, and calculate the error value of the two through the accuracy model f: The stopping condition is to determine whether the error value is less than a set threshold.
[0036] Wherein, the rotation vector N0=[x, y, z, θ k ] T , the calculation formula is: Wherein: Δm is 0.02, k is an integer ranging from 0 to 50.
[0037] The posture matrix T includes:
[0038] Substitute the optimized joint angle values into the forward kinematics model, where the forward kinematics model is:
[0039]
[0040] Where: T′ is the forward kinematics model. n, a, o, p are four column vectors, which are the normal vector, direction vector, approach vector and origin vector respectively.
[0041] As another preferred embodiment, the present invention also provides an application of the above-mentioned high-dimensional parameter optimization method in a robotic arm, comprising the following process:
[0042] Given multiple sets of continuous rotation vectors N0, substitute them into the rotation formula to calculate the corresponding initial rotation matrix R;
[0043] Initialize the evolution state parameters (θ1, θ2...θ k ), send the current evolutionary state parameters to the endocrine regulation system to generate a learning factor; at the same time, start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor, and calculate the evolutionary generation vector of the antibody and its antibody evolutionary state according to the set values of the input guidance coefficient Fn(β) and the immune directional coefficient Fs. After completing the optimization calculation, send the output updated evolutionary state parameters to the robot control center, and the robot control center adjusts the angles of each joint of the robot according to the new evolutionary state parameters.
[0044] The optimized robotic arm is a robotic arm that does not satisfy the Pieper criterion.
[0045] The intelligent high-dimensional parameter optimization algorithm and its application in a robotic arm provided by the present invention are mainly based on the biological regulation mechanism of the NEI system, and a neural guidance optimization unit, an immune directional optimization unit and an endocrine regulation optimization unit are set. Specifically, the neural guidance optimization unit guides the immune directional optimization unit; the immune directional optimization unit selects an antibody in a directional manner and acts on the neural guidance optimization unit; at the same time, the neural guidance optimization unit and the immune directional optimization unit transmit the antibody evolution generation vectors generated by each of them to the endocrine regulation optimization unit; the endocrine regulation optimization unit adaptively changes the learning factor according to the antibody evolution generation vector, and finally forms a mechanism for updating the state of the next generation evolution generation vector of the antibody to achieve high-dimensional parameter optimization. At the same time, combined with the application in the robotic arm, the superiority and stability of the optimization method are further verified, and the high-precision and high-stability optimization and control of the joint angles of the robotic arm are further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 Schematic diagram of the NEI-BO algorithm optimization structure in one embodiment.
[0047] Figure 2 Schematic diagram of the interactions within the NEI system in one embodiment.
[0048] Figure 3 4 is a vector diagram of the evolutionary generation distance of the neural guidance optimization unit in one embodiment.
[0049] Figure 4 Schematic diagram of the algorithm flow of the immune-directed optimization unit in one embodiment.
[0050] Figure 5 4 is a flow chart of the NEI-BO algorithm in one embodiment.
[0051] Figure 6 This is a flowchart of the inverse optimization experiment of the robot arm joint in one embodiment.
[0052] Figure 7 This is a diagram showing the optimization effect of the single-mode functions Tablet and Quadric in another embodiment.
[0053] Figure 8 This is a diagram showing the optimization effect of the single-mode function Rosenbrock in another embodiment.
[0054] Fig. 9 This is a diagram showing the optimization effect of a multi-modal Ackley function in another embodiment.
[0055] Fig.10 This is a diagram showing the optimization effect of a multi-modal Schaffer function in another embodiment.
[0056] Fig.11 It is a schematic diagram of 51-point accuracy curves obtained by four algorithms in another embodiment. DETAILED DESCRIPTION
[0057] The core of the present invention is to provide an intelligent high-dimensional parameter optimization algorithm and its application in a robotic arm. Specifically, through a neural-guided optimization unit, an immune-directed optimization unit and an endocrine-regulated optimization unit, the convergence speed and search accuracy of the optimization system and the global search capability of the algorithm are improved, further solving the stability and convergence of the joint angle optimization accuracy in the robotic arm application.
[0058] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] Embodiment 1:
[0060] Figure 1 and Figure 2 Schematic diagram of the structure of an optimization algorithm (NEI-BO) of an intelligent high-dimensional optimization system based on the NEI system provided by the present invention, and a schematic diagram of the interaction within the NEI system
[0061] The present invention is proposed on the basis of the neuroendocrine immune (NEI) system, wherein the neuroendocrine immune (NEI) system mainly includes three physiological regulation systems: the nervous system, the endocrine system and the immune system (such as Figure 2 As shown in Figure 1), the nervous system can affect the activity of other systems through neurotransmitters; the endocrine system can stimulate or inhibit the functions of other systems through a variety of hormones; and the immune system can regulate other systems through substances such as cytokines. These three systems conduct information feedback and mutual regulation through substances such as hormones, cytokines, and neurotransmitters. In addition to the mutual regulation mechanism, there are also the guiding mechanism of the nervous system, the directional mechanism of the immune system, and the fine-tuning mechanism of the endocrine system in the NEI system.
[0062] Among them, the nervous system is the main functional regulation system in the body, and its main function is to conduct, store and process information. Neurons are the most basic functional units of the nervous system, and are divided into sensory neurons, motor neurons and communication neurons according to different functions. Sensory neurons establish connections with a large number of other neurons through the branches of axon terminals, causing them to be excited or inhibited; motor neurons make nerve impulses from many different sources act on one neuron simultaneously or sequentially, making the reaction more accurate and coordinated; communication neurons receive nerve impulses from other neurons and transmit them to another neuron. Information is transmitted through neurons to guide the body to complete various physiological activities or reactions.
[0063] The immune system is a human defense mechanism that can defend against pathogens, harmful foreign bodies, etc. Its main functions are immune defense, immune stability and immune surveillance. Take antibodies in the human body as an example. They are proteins with protective effects. Since antigens and antibodies are complementary in chemical structure and spatial configuration, each antibody can accurately target specific antigens and produce specific reactions, thereby quickly eliminating various viral antigens that invade the immune system.
[0064] The endocrine system can respond to and regulate the nervous system and immune system based on the specificity of hormone receptors, diversified effects, and the synergy and antagonism of hormones. Taking insulin as an example, it has two sources in the human body. One is stimulated by endogenous or exogenous substances; the other is produced under the regulation of the central nervous system. In the process of endocrine system regulating blood sugar, the insulin secretion law of each islet in the pancreas can be shown as formula (1):
[0065]
[0066] In formula (1), u is the insulin secretion concentration; G B is the blood glucose concentration in the body; N, δ, θ, λ are all positive real numbers. The endocrine system can quickly stabilize the blood glucose concentration through the regulatory characteristics shown in formula (1).
[0067] like Figure 1As shown in the figure, the main structure of the intelligent high-dimensional optimization system mainly includes a neural-guided optimization unit, an immune-directed optimization unit and an endocrine-regulated optimization unit. The main function of the neural-guided optimization unit is to guide and mutate the evolutionary state of the antibody according to certain rules, so that each antibody can search a larger search space; the main function of the immune-directed optimization unit is to select a suboptimal solution according to certain rules and regard it as the optimal solution in the next iteration process for calculation, thereby improving the global search ability of the antibody; the main function of the endocrine-regulated optimization unit is to adaptively change its learning factor according to the numerical value of the antibody evolution generation distance vector optimized by directed and guided optimization, and refer to the rules of insulin secretion, thereby accelerating the overall convergence of the antibody population. The neural-guided optimization unit, the immune-directed optimization unit and the endocrine-regulated optimization unit interact with each other.
[0068] Among them, the neural guidance optimization unit will guide the immune-directed optimization unit. The immune-directed optimization unit will select an antibody in a targeted manner and apply it to the neural guidance optimization unit. At the same time, the neural guidance optimization unit and the immune-directed optimization unit will pass the antibody evolution generation vectors they generate to the endocrine regulation optimization unit; the endocrine regulation optimization unit will adaptively change the learning factor according to the antibody evolution generation vector, and finally form the next generation of antibody evolution generation vector update state. Figure 1 In, p ib (t), p gb (t), p n (t), p s (t) represent the individual optimal state, global optimal state, navigation state, and immune directional state in the antibody evolution generation vector respectively; v′ i (t+1), s′ i (t+1) represents the position of the generation distance vector of the next generation antibody evolution under the action of the neural guidance optimization unit and the immune directional optimization unit respectively.
[0069] As a preferred solution of the present invention: the present invention defines the high-dimensional parameter as the antibody to be optimized, and defines a guiding effect coefficient Fn(β) and an immune directional effect coefficient Fs at the same time; according to the information conduction mechanism of the nervous system, the evolutionary state of the antibody is guided by the interaction of the respective action factors between the neural guidance optimization unit and the immune directional optimization unit. At the same time, the unit also transmits the evolutionary generation distance vector state to the endocrine regulation optimization unit.
[0070] The specific steps include:
[0071] Step 1: Initialize the evolutionary state parameters and selection length of each antibody and calculate the fitness function value of each antibody.
[0072] Step 2: Send the current evolutionary state to the endocrine regulation system to generate a learning factor; start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor, and input the set values of the guidance coefficient Fn(β) and the immune directional coefficient Fs to calculate the evolutionary generation vector of the antibody and its antibody evolutionary state.
[0073] Step three, calculate the fitness of each antibody after update according to the evolutionary generation distance vector of the antibody, and judge whether the stopping condition is met or the number of iterations reaches a specific threshold. If not, return to step two, otherwise end the optimization process and output the final evolutionary state x(t) of the antibody.
[0074] Among them, the guiding effect coefficient is designed according to the insulin secretion law principle of formula (1),
[0075]
[0076] Among them, F n (β) is the guidance coefficient, β is a real number, which is the ratio of the current iteration number to the maximum iteration number; a and b are scaling coefficients, and a<0, b>0; λ and Q are positive real numbers. According to the properties of this function, in the early stage of algorithm iteration (when β is relatively small), the guidance coefficient of the neural guidance optimization unit is close to 0; and as the number of iterations increases (when β is relatively large), the guidance coefficient gradually increases and finally approaches 1.
[0077] When F n When (β)>r (r is a random number between 0 and 1, the same below), there is no need to perform guided optimization regulation. Based on the speed update principle of standard PSO, the antibody evolution generation distance vector update formula is designed as shown in formula (3):
[0078] v i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c2r2(p gb (t)-x i (t)) (3)
[0079] In the formula, v i (t+1) is the evolutionary generation distance vector after antibody update, w is the inertia weight; v i and x i They represent the speed and state of the i-th antibody respectively; r1 and r2 are random numbers in [0,1], and c1 and c2 are learning factors.
[0080] When F nWhen (β)≤r, it is necessary to regulate the guided optimization effect. Based on the neural guidance mechanism design and combined with the speed update principle of standard PSO, the antibody evolution generation distance vector update is designed as shown in formula (4).
[0081] v′ i (t+1)=v i (t+1)+c3r3(p n (t)-x i (t)) (4)
[0082] In the formula, v′ i (t+1) is the evolutionary generation distance vector of the antibody under the guidance term; c3r3(p n (t)-x i (t)) is the guiding term, where c3 is the learning factor, r3 is a random number in [0,1], and p n is the state of the guidance point generated at each iteration and is generated according to (5).
[0083]
[0084] In the formula Represents the guiding point p n The value range of . The generation principle of is shown in equations (6) and (7).
[0085]
[0086]
[0087] In the formula, x gb , x max , x min are the upper and lower limits of the global optimal point, respectively. f -1 (rand) The number of solutions.
[0088] Under the guidance of the neural guidance optimization unit, the geometric relationship between the evolutionary generation distance vectors of the previous and next generations of antibodies is as follows: Figure 3 As shown. Figure 3 Medium V i+1 and V′ i+1 F n (β)>r state and F n The next generation evolution distance vector of antibodies generated in the state (β)≤r, each V is a 1×D matrix, where D represents the dimension of V. ib , P gb , P n They represent the inertia term, the global optimal term and the individual optimal term respectively, as shown in formula (8).
[0089]
[0090] V′ after improvement by neural guidance optimization unit i+1 With V i+1 The angle changes are shown in equations (9) and (10):
[0091]
[0092] Δθ=θ′-θ (10)
[0093] Where θ and θ′ are the angles between the generational distance vector of the current antibody evolution and the generational distance vector of the next generation in the unguided state and the guided state, respectively (e.g. Figure 3 shown).
[0094] Under the action of the neural guidance optimization unit, the final antibody evolution state is shown in formula (11):
[0095] x i (t+1)=x i (t)+v i (t+1) (11)
[0096] Due to the existence of the neural-guided optimization unit, the retrieval area will be enlarged during the update and evolution of the antibody, making it easier to jump out of the local minimum and ensuring that the antibody's evolutionary generation vector is no longer only affected by the inertial speed, the optimal state of the antibody and the optimal state of the population, thereby improving the global search capability.
[0097] As a preferred embodiment of the present invention: In the immune system, the binding of antigen and antibody is essentially that the antigen epitope and the antigen binding point in the hypervariable region of the antibody can be specifically complementary in chemical structure and spatial configuration, and this specific complementary binding is called a targeting mechanism. According to this targeting mechanism, the present invention designs an immune-directed optimization unit algorithm.
[0098] Among them, an immune directional effect coefficient F is added to the antibody evolution generation update based on the principle of whether the immune system is activated. s If F s If the value is too large, it will affect the convergence speed and accuracy of the algorithm to a certain extent. s Generally, a constant is taken, and the best value is between 0 and 0.5.
[0099] If F s >r, there is no need for immune directional regulation, and the antibody evolutionary generation update vector is still as shown in formula (3) or (4).
[0100] If F s ≤r requires immune-directed regulation, which can be divided into two situations:
[0101] 1) If the antibody does not execute the neural guidance optimization unit, the evolutionary generation vector of the antibody is as shown in formula (12):
[0102] s i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c2r2(p s (t)-x i (t)) (12)
[0103] 2) If the antibody executes the neural guidance optimization unit, the evolutionary generation vector of the antibody is as shown in formula (13):
[0104] s′ i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c3r3(p n (t)-x i (t))+c2r2(p s (t)-x i (t)) (13)
[0105] In formula (12) and (13), p s The antibody state selected for the immune-directed optimization unit corresponds to the global optimal value in the next iteration process.
[0106] In p s During the generation process, an immune selection length L is added to each antibody in the immune directional unit, which is mainly used to measure the antibody that is not selected to become p s The number of times. s The production process of Figure 4 shown.
[0107] Furthermore, when the immune-directed optimization unit is executed for the first time, the value of the immune selection length L of each antibody is 0, and when the unit is executed for the second time and thereafter, the value of L of the antibody is the state after the last execution.
[0108] Under the action of the immune-directed optimization unit, the final evolutionary state of the antibody is shown in formula (14):
[0109] x i (t+1)=x i (t)+s i (t+1) (14)
[0111] The immune directed optimization unit randomly searches for suboptimal states as global optimal states. Because the probability of their occurrence is low, the global search capability is improved while ensuring the optimization speed.
[0112] It has multiple functions in the human endocrine system, mainly responding to hormones or cytokines of the nervous system and immune system, such as feedback regulation and diversification effects.
[0113] In the endocrine system, insulin is a protein hormone secreted by pancreatic β cells in the pancreas in response to endogenous or exogenous substances such as various blood sugars. According to the insulin secretion law of formula (1), if the blood sugar concentration is too high, the insulin secretion will increase, and if the blood sugar concentration decreases, the corresponding insulin secretion will also decrease.
[0114] As a preferred embodiment of the present invention: the secretion regulation optimization unit algorithm designed by the present invention designs the change law of the learning factor in the evolutionary generation vector of the antibody according to the antibody state transmitted by the neural guidance optimization unit and the immune directional optimization unit, as shown in formula (15).
[0115]
[0116] Where a and b are scaling coefficients; λ and Q are positive real numbers.
[0117] Furthermore, the NEI-BO algorithm proposed in the present invention adopts the strategy of variable learning factor only for c2 and c3 because the influence of the optimal state of a single antibody is weak, that is, the value of i is 2 or 3. And k in formula (15) c The generation form of (i) is shown in formula (16).
[0118]
[0119] According to the different parameters of the evolutionary generation vector transmitted to the endocrine regulation optimization unit, in formula (16), when i is 2, p(t) is p gb (t) or p s (t). When i is 3, p(t) is p n (t). is the proportional weight of the learning factor, and D is the dimension of the antibody.
[0120] Under the action of the endocrine regulation optimization unit, the learning factor in the antibody evolution generation vector update formula will be adaptively changed. And according to different proportional weights, the ability of the antibody to tend to the global optimal state and the guiding state can be dynamically adjusted. Therefore, under the action of the endocrine regulation optimization unit, the NEI-BO algorithm further improves the overall convergence speed on the basis of improving the global search ability.
[0121] As a preferred solution of the present invention: In combination with the above-mentioned optimization units, the specific execution steps of the intelligent high-dimensional optimization system based on the NEI system designed by the present invention are as follows ( Figure 5 ):
[0122] Step 1: Initialize the evolutionary state and selection length of each antibody and calculate the fitness function value of each antibody.
[0123] Step 2: Determine F s ≤r is true, if so, go to step 3, if not, go to step 4.
[0124] Step 3: Determine F n (β)≤r is true, if true, continue to determine whether the antibody executes the neural guidance optimization unit, if yes, go to step 5. Otherwise, go to step 6;
[0125] Step 4: Determine F n (n)≤r is true, if so, go to step 7. If not, go to step 8.
[0126] Step 5: Update the antibody evolution generation distance vector and state according to formula (13) and then execute step 9.
[0127] Step 6: Update the antibody evolution generation distance vector and state according to formula (12) and then execute step 9.
[0128] Step 7: Update the antibody evolution generation distance vector and state according to formula (4) and then execute step 9.
[0129] Step 8: Update the antibody evolution generation distance vector and state according to formula (3) and then execute step 9.
[0130] Step 9: Calculate the fitness of each antibody after the update and determine whether it meets the stopping condition. If not, re-execute step 2. If it meets the condition, end.
[0131] Among them, when flag1 and flag2 are 0, the corresponding units are not executed, and when they are 1, the corresponding units are executed; there are four combinations in total, and in each iteration process, only one situation is satisfied.
[0132] As a preferred solution of the present invention: the present invention also proposes an application of an intelligent high-dimensional optimization system based on the NEI system in a robotic arm (such as Figure 6 shown).
[0133] As a preferred solution of the present invention: the initial set posture rotation matrix R selects 51 posture points as the target posture. First, according to the given 51 continuous rotation vectors n = [x, y, z, θ] T , the selection rule of the rotation vector is shown in formula (17):
[0134]
[0135] Wherein: Δm is 0.02, k is an integer ranging from 0 to 50.
[0136] After obtaining the rotation vector, it is substituted into the general rotation formula to obtain the rotation matrix R. The general rotation formula R′ is shown in formula (18):
[0137]
[0138] Where: vθ represents 1-cosθ, sθ and cθ represent sinθ and cosθ respectively, and f x 、f y 、f z The specific form of is shown in formula (19):
[0139]
[0140] By substituting 51 rotation vectors into equation (18), we obtain a rotation matrix R with 51 continuous poses.
[0141] Furthermore, when the above optimization process is completed, the rotation matrix is initially set, and then an algorithm is needed to optimize the joint angle value x(t) = [θ1, θ2, θ3, θ4, θ5, θ6], so as to bring it into the forward kinematics model to obtain the posture matrix.
[0142] As a preferred solution of the present invention: the DH parameters of the preferred special configuration of the robot arm are shown in Table 1:
[0143]
[0144] Table 1 DH parameters of special configuration manipulator
[0145] Under the DH model parameters, the transformation matrix between individual links can be obtained by substituting each of the rotation axes into the link transformation formula shown in equation (20).
[0146]
[0147] Where: i-1 T i is the rotation transformation matrix, sθ i 、cθ i Respectively represent sinθ i 、cosθ i .
[0148] The preferred special configuration robot arm has six joints, so combined with equation (20), its forward kinematics model is shown in equation (21):
[0149]
[0150] Where: T′ is the forward kinematics model. n, a, o, p are four column vectors, which are the normal vector, direction vector, approach vector and origin vector respectively.
[0151] After obtaining the posture matrix T corresponding to each rotation matrix R, the accuracy model function f shown in formula (22) is designed to calculate the error between the two:
[0152]
[0153] Formula (22) describes the accuracy function between the rotation matrix R and the attitude matrix T. The minimum value of this accuracy model function is 0. The closer it is to 0, the more accurate the attitude matrix T obtained by the algorithm can accurately reproduce the preset rotation matrix R. Therefore, the six angle values at this time are It is the inverse solution value of the joint angle of the preset rotation R.
[0154] Embodiment 2:
[0155] As another preferred solution of the present invention: an application of an intelligent high-dimensional optimization method based on the NEI system in a robotic arm specifically includes the following process:
[0156] Given multiple sets of continuous rotation vectors N0, substitute them into the rotation formula to calculate the corresponding initial rotation matrix R;
[0157] Initialize the evolution state parameters (θ1, θ2...θ k ), send the current evolutionary state parameters to the endocrine regulation system to generate a learning factor; at the same time, start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor, and calculate the evolutionary generation vector of the antibody and its antibody evolutionary state according to the set values of the input guidance coefficient Fn(β) and the immune directional coefficient Fs. After completing the optimization calculation, send the output updated evolutionary state parameters to the robot control center, and the robot control center adjusts the angles of each joint of the robot according to the new evolutionary state parameters.
[0158] The optimized robotic arm is a robotic arm that does not satisfy the Pieper criterion.
[0159] According to the application of the above-mentioned high-dimensional parameter optimization method in the robotic arm, it specifically also includes: preferably selecting 5 100-dimensional Benchmark functions as optimization verification objects, and then applying the algorithm to the robotic arm of special configuration to optimize the inverse kinematic solution.
[0160] Preferably, the values of the NEI-BO algorithm parameters are shown in Table 2. In the intelligent high-dimensional optimization system, the common parameter c1 preferably takes a value of 0.5, F s The preferred value is 0.1.
[0161]
[0162] Table 2 Parameters of each formula
[0163] Preferably, the experimental environment conditions are Inter Core i5-4210M 2.6GHz, 8GB, Windows 10, MATLABR2017b, but not limited thereto.
[0164] Preferably, PSO, linear decreasing inertia weight particle swarm algorithm (LDW-PSO), particle swarm algorithm based on contraction factor (PSO-CF) and the algorithm NEI-BO in this paper are selected for comparative experiments.
[0165] Preferably, in the experiment, the four algorithms all use a population size of 100, the dimension D of each antibody is 100, the number of iterations is 1000, the number of function evaluations is 100000, and the selection length of each antibody is given as 50. In order to eliminate randomness, 50 independent repeated experiments are performed on each algorithm, and the average data is taken as reference data for analysis.
[0166] Preferably, the Benchmark function formula and the parameters of the four algorithms are set as follows:
[0167]
[0168] Table 3 Benchmark function parameter settings
[0169]
[0170] Table 4 Algorithm function parameter settings
[0171] Among them, Figure 7 As shown in Figure 2, (a) and (b) are the optimization effect diagrams of the single-mode function Tablet and Quadric, respectively. Furthermore, the fitness function value of NEI-BO is significantly better than the other three algorithms after the evolution reaches 300 and 100 generations. In addition, the convergence rate of the NEI-BO algorithm in this paper is 2-16 times higher than that of the other three algorithms. For details, see Figure 7 The data differences between different algorithms when the horizontal axis data in (a) and (b) reaches 1000.
[0172] Further, Figure 8The optimization effect diagram of the single-mode function Rosenbrock. Among them, its optimal point is located in a narrow parabolic valley, and the function provides less information, making it difficult to optimize. The fitness function value of the NEI-BO proposed in the present invention is significantly better than that of the other three algorithms after the evolution reaches about 200 generations; in addition, the convergence rate of the final NEI-BO algorithm of the present invention is 2-10 times higher than that of the other three algorithms on average. For details, see Figure 8 The data difference between different algorithms when the horizontal axis data reaches 1000.
[0173] Further, Fig. 9 This is a diagram of the optimization effect of the multi-modal Ackley function. As can be seen from the figure, the first three algorithms all fall into the local minimum, only NEI-BO successfully jumps out of the minimum, and the NEI-BO algorithm is significantly better than the other algorithms after about 100 iterations, and its final convergence accuracy is much higher than the other three algorithms. For details, see Fig. 9 The data difference between different algorithms when the horizontal axis data reaches 1000.
[0174] Fig.10 This is a diagram of the optimization effect of the multi-modal Schaffer function. Among them, NEI-BO is significantly better than other algorithms in about 200 generations, and the final convergence rate is more than 2 times higher than the other three algorithms. For details, see Fig.10 The data difference between different algorithms when the horizontal axis data reaches 1000.
[0175] As another preferred embodiment of the present invention, the five Benchmark functions were simulated and tested 30 times and the average results were taken, as shown in Table 5. The search accuracy is the average search accuracy of a single biological antibody in the 30 simulation results.
[0176] Among them, in the single-mode function, for the Tablet function, the average values of PSO, LDWPSO and PSOCF reached 2.79×10 2 , 37.8, 0.035, and the optimal values were 1.91×10 2 , 26.1, 3.89×10 -3 .
[0177] The average search accuracy of the system for optimizing the tablet function for a single antibody reached 9.46×10 -10 , the variance reached 2.33×10 -18 , which is much better than the other three algorithms.
[0178] As another preferred embodiment of the present invention, for Quadric and Rosenbrock functions, PSO, LDWPSO and PSOCF have similar overall performances, and the average values of the two functions after optimization are both within 10 4 The variance is about 10 7 about.
[0179] The intelligent high-dimensional optimization system based on the NEI system proposed in the present invention has an average search accuracy of 2.31 and a variance of 0.858 for a single antibody when optimizing Quadric; and an average search accuracy of 76.2 and a variance of 274 for a single antibody when optimizing Rosenbrock. It can be seen that NEI-BO is much higher than the other three in terms of optimization accuracy and stability for single-modal functions.
[0180] As another preferred solution of the present invention, in the multimodal function, for the Ackley function, the PSO and LDWPSO algorithms fell into the local minimum at the beginning of the iteration, and the PSO-CF algorithm jumped out of the local minimum only once, and the accuracy was still not very high. However, for the NEI-BO algorithm described in the present invention, the optimization accuracy and variance of a single antibody still reached 8.52×10 -6 , 5.91×10 -11 .
[0181] For the Schaffer function, the optimization accuracy and variance of a single antibody of the NEI-BO algorithm reached 0.01 and 5.99 respectively, which is also much better than the other three algorithms. It can be seen that NEI-BO is also higher than the other three in terms of optimization accuracy and stability for multimodal functions.
[0182] Furthermore, the inertia weight value of PSO is 0.65, and the initial inertia weight of LDWPSO is 0.9, which decreases to 0.4 with the increase of the number of iterations. Therefore, the convergence speed and accuracy of PSO in the early stage are higher than those of LDWPSO, and in the later stage of function iteration, the accuracy and convergence of LDWPSO are obviously better than those of PSO. The optimization speed and convergence accuracy of PSO-CF are slightly better than those of PSO and LDWPSO. The NEI-BO algorithm proposed in the present invention is significantly higher than the first three algorithms in terms of optimization accuracy, optimization accuracy speed and stability.
[0183]
[0184] Table 5 Function experimental data comparison table
[0185] As another preferred solution of the present invention, NEI-BO, PSO, LDWPSO, and PSO-CF algorithms are used to perform inverse optimization of the joint angles of the robot arm. Since the robot arm has 6 joint angles, the dimension of each biological antibody in this experiment is 6 dimensions, the biological population is 100, and the number of iterations is 700. The above process is repeated 51 times to solve the 51 rotation matrices R that are initially preset. The specific formula parameter configuration for optimization is the same as the parameter configuration in the high-dimensional optimization experiment. Finally, the 51-point accuracy curves obtained by the four algorithms are as follows: Fig.11 shown.
[0186] Among them, Fig.11 The four curves in the figure represent the pose optimization accuracy curves of PSO, LDWPSO, PSOCF and NEI-BO. The first three algorithms are not stable in optimizing 51 pose points, and many jumps occur. The optimal accuracy of PSO algorithm is within 10 -11 The LDWPSO algorithm can achieve an optimization accuracy of 10 only in very rare cases. -15 , most of the others have an optimal accuracy of 10 -12 The optimal accuracy of the PSO-CF algorithm is only 10 -5 The optimization accuracy of the proposed NEI-BO algorithm for 51 pose points is very stable, and the average convergence accuracy can reach 10 -15 It can be seen that the algorithm proposed in the present invention has significant advantages in the inverse solution planning of the joint angle of the special configuration manipulator. The specific posture accuracy analysis table is shown in Table 6:
[0187]
[0188] Table 6. Table of spatial position accuracy of the robotic arm
[0189] Among them, the maximum values of PSO, LDWPSO, and PSOCF obtained in Table 6 all reach about 1, which does not meet the actual situation. Fig.11 It can be seen that about half of the individuals are trapped in the local minimum, which does not meet the stability and accuracy requirements of the spatial posture of the robotic arm.
[0190] It can be seen that the NEI-BO algorithm proposed in the present invention far exceeds the actual requirements in terms of stability and optimization accuracy, and conforms to the actual situation in practical applications.
[0191] In summary, the high-dimensional parameter optimization method proposed in the present invention and its application in the robotic arm improves the global search capability of the algorithm through the biological antibodies under the action of the neural guidance optimization unit and the immune directional optimization unit. At the same time, in the iterative process, the learning factor is adaptively adjusted by the endocrine regulation optimization unit, which greatly improves the convergence speed and search accuracy of the algorithm. And the present invention further compares the four algorithms of NEI-BO, LDWPSO, PSO and PSOCF through the Benchmark function, and combines the application of the high-dimensional parameter optimization method in the inverse solution of the joint angle of the special configuration robotic arm, which proves the superior performance of the NEI-BO algorithm in global search capability, convergence speed and stability.
[0192] Although the present invention is described in conjunction with the above specific embodiments, it is obvious that those skilled in the art can make many substitutions, modifications and changes according to the above content. Therefore, all such substitutions, improvements and changes are included in the spirit and scope of the appended claims.
Claims
1. A high-dimensional parameter optimization method, defining the high-dimensional parameter as the antibody to be optimized, and defining a guiding effect coefficient F n (β), an immune directional effect coefficient F s ; It is characterized in that, Given multiple sets of continuous rotation vectors N0, substitute them into the rotation formula to calculate the corresponding initial rotation matrix R; Initialize the evolution state parameters (θ1, θ2...θ k ), send the current evolution state parameters to the endocrine regulation system to generate a learning factor; simultaneously start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor, and according to the input guidance effect coefficient F n (β) and immune targeting coefficient F s The set value of is calculated, the evolutionary generation distance vector of the antibody and its antibody evolutionary state are calculated, and after the optimization calculation is completed, the updated evolutionary state parameters are output and sent to the robot control center, and the robot control center adjusts the angles of each joint of the robot according to the new evolutionary state parameters; Wherein, the high-dimensional parameter optimization method comprises the steps of: Step 1: Initialize the evolution state parameters and selection length of each antibody and calculate the fitness function value of each antibody; Step 2: Send the current evolution state to the endocrine regulation system to generate a learning factor; start the neural guidance optimization unit and the immune directional optimization unit to obtain the learning factor and input the guidance effect coefficient F n (β) and immune targeting coefficient F s The set value of , calculating the evolutionary generation distance vector of the antibody and its antibody evolutionary state, including: The guiding effect coefficient is F n (β)>r and F s >r, the update formula of the antibody evolutionary generation vector vi(t+1) is v i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c2r2(p gb (t)-x i (t)), and the calculation formula of the antibody evolution state xi(t+1) is: i (t+1)=x i (t)+v i (t+1); The guiding effect coefficient is F n (β)≤r and F s >r, the evolutionary generation vector v′ of the antibody i The update formula for (t+1) is v′ i (t+1)=v i (t+1)+c3r3(p n (t)-x i (t)); and the antibody evolution state formed is x i The calculation formula for (t+1) is x i (t+1)=x i (t)+v′ i (t+1); Among them, c3r3(p n (t)-x i (t)) is the guiding term, c1, c2, c3 are learning factors, r1, r2 and r3 are random numbers in [0,1], p n (t) is the state of the guidance point generated in each iteration; w is the inertia weight; v i (t) and x i (t) represent the speed and state of the ith antibody respectively; P ib (t), P gb (t) represent the individual optimal state and the global optimal state respectively; The guiding effect coefficient is F n (β)>r and F s ≤r, the evolutionary generation distance vector s of the antibody i The update formula for (t+1) is s i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c2r2(p s (t)-x i (t)); and the antibody evolution state formed is x i The calculation formula for (t+1) is x i (t+1)=x i (t)+s i (t+1); The guiding effect coefficient is F n (β)≤r and F s ≤r, the evolutionary generation vector s of the antibody i The update formula for '(t+1) is s′ i (t+1)=wv i (t)+c1r1(p ib (t)-x i (t))+c3r3(p n (t)-x i (t))+c2r2(p s (t)-x i (t)), And the antibody evolution state formed is x i The calculation formula for (t+1) is x i (t+1)=x i (t)+s′ i (t+1), where p s (t) is the immune-oriented state, corresponding to the global optimal state in the next iteration process; Step three, calculate the fitness of each antibody after update according to the evolutionary generation distance vector of the antibody, and judge whether the stopping condition is met or the number of iterations reaches a specific threshold. If not, return to step two, otherwise end the optimization process and output the final evolutionary state x(t) of the antibody.
2. The high-dimensional parameter optimization method according to claim 1, characterized in that: Send the current evolutionary state to the endocrine regulatory system to generate learning factors including: Get the current state and substitute it into the learning factor adaptive change formula for update. The learning factors are c2 and c3. The formula for generating the learning factor is: Where a and b are scaling coefficients, and a<0, b>0; λ and Q are positive real numbers; when i is 2, p(t) is p gb (t) or p s (t), when i is 3, p(t) is p n (t); is the proportional weight of the learning factor, and D is the dimension of the antibody.
3. The high-dimensional parameter optimization method according to claim 1, characterized in that: The p n (t) is the state of the guidance point generated in each iteration, and its calculation formula is: in, Represents the guiding point p n The value range of . Among them, the The calculation formula is: , In the formula, x gb , x max , x min are the upper and lower limits of the global optimal point, respectively. f -1 (rand) The number of solutions.
4. The high-dimensional parameter optimization method according to claim 1, characterized in that: Calculating the fitness of each antibody after update according to the evolutionary generation distance vector of the antibody, and judging whether the stopping condition is met also includes: Get the improved neural guidance optimization unit in F n (β)>r state and F n The next generation evolution distance vector V of antibodies generated under the state (β)≤r i+1 and V′ i+1 , calculate the V′ after the neural guided optimization unit is improved i+1 With V i+1 The angle change is as follows: Among them, V i+1 and V′ i+1 F n (β)>r state and F n The next generation evolutionary generation distance vector of antibodies generated under the state of (β)≤r, each V is a 1×D matrix, where D represents the dimension of V, θ and θ′ are the angles between the contemporary antibody evolutionary generation distance vector and the next generation evolutionary generation distance vector under the unguided state and the guided state, respectively; the change value of the angle is generated and saved in the database as a reference value for later optimization.
5. The high-dimensional parameter optimization method according to claim 1, characterized in that: The immune orientation state p s (t) further comprises the following generating steps: S1: For each antibody in the immune-directed unit, an immune selection length L is added to measure the number of times the antibody is not selected to become p s The number of times, initialize L = 0; S2: Sort the immune selection length L of antibodies and mark them from 1 to m, where m is the number of antibodies; S3: Set the jump value of L to n, where n is a positive integer and q=1; S4: Determine whether the L of the qth antibody is n. If so, use the qth antibody as Ps in the next iteration, reset the L of the qth antibody to zero, increase the L of the remaining antibodies by 1, and end the immune-directed optimization process; S5: Otherwise, set q=q+1 and return to S4; 6. The high-dimensional parameter optimization method according to claim 1, characterized in that: The stopping condition is met, including: Calculate the preset rotation matrix R and the posture matrix T obtained by algorithm optimization, and calculate the error value of the two through the accuracy model f: The stopping condition is to determine whether the error value is less than a set threshold.
7. The high-dimensional parameter optimization method according to claim 6, characterized in that: The rotation vector N0=[x, y, z, θ k ] T , the calculation formula is: Wherein: Δm is 0.02, k is an integer ranging from 0 to 50.
8. The high-dimensional parameter optimization method according to claim 6, characterized in that: The posture matrix T includes: substituting the optimized joint angle values into the forward kinematics model, wherein the forward kinematics model is: Where: T′ is the forward kinematics model. n, a, o, p are four column vectors, which are the normal vector, direction vector, approach vector and origin vector respectively.
9. Application of the high-dimensional parameter optimization method according to any one of claims 1 to 8 in a robotic arm, characterized in that: A high-dimensional parameter optimization method is used to adjust the angles of each joint of the robotic arm, and the optimized robotic arm is a robotic arm that does not meet the Pieper criterion.
