A control optimization method for a core inserter used for pearl oyster core insertion

By improving the aphid optimization algorithm to tune the PID controller parameters, the problem of insufficient control accuracy and stability of the pearl oyster core inserter was solved, and high-precision and high-stability core insertion operation was achieved.

CN118707838BActive Publication Date: 2024-11-15GUANGDONG OCEAN UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411188610.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-15
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

Existing pearl oyster core inserters lack sufficient control precision and stability, resulting in difficult core insertion operations, challenging PID controller parameter tuning, and a tendency to cause integral saturation and unstable system response.

Method used

The parameters of the PID controller are tuned using an improved aphid optimization algorithm (EAOA). By designing a nonlinear adaptive flight energy factor E and an optimal boundary treatment strategy, the control accuracy and stability of the core inserter are optimized, thus constructing an enhanced PID controller.

Benefits of technology

It significantly improves the control accuracy and stability of the core inserter, enabling the robotic arm to accurately reach the core insertion target position, reduce core insertion error, and increase the core insertion success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118707838B_ABST
    Figure CN118707838B_ABST
Patent Text Reader

Abstract

The present invention discloses a control optimization method for a core inserter for core insertion in pearl oysters, which relates to the field of PID control and comprises: S1, acquiring internal image data of pearl oysters, establishing a two-dimensional image, dividing the two-dimensional image into position coordinates, and marking the target position coordinates of the core insertion as (x1, y1); S2, calculating the attitude deviation angle between the target position and the current position according to the target position of the core insertion and the current position coordinates of the pin of the core inserter; S3, inputting the attitude deviation angle into a mechanical arm control system of the core inserter, the mechanical arm control system adjusts the attitude value of the mechanical arm through a PID controller so that the pin reaches the target position for core insertion operation, wherein the PID is an enhanced position PID, and the present invention can accurately adjust the parameters Kp, Ki and Kd of the PID controller, thereby significantly improving the control accuracy of the core inserter, the mechanical arm can accurately reach the target position of core insertion, reduce the error between the target position of core insertion and the real-time position of the pin, and improve the success rate of core insertion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of PID control, and in particular relates to a control optimization method of a core inserter for inserting a core of a pearl oyster. Background Art

[0002] The technical principle of pearl oyster nucleation is relatively simple, but the operation is very difficult; different mother-of-pearls react differently to the nucleation procedure, and the nucleation process requires extremely high precision and stability to ensure that the nucleus can be accurately placed and promote the formation of pearls. Traditional pearl oyster nucleation operations are mainly done manually, which is not only labor-intensive, but also difficult to ensure the accuracy and consistency of nucleation; with the development of science and technology, more and more automated and intelligent equipment are being used in the field of pearl cultivation. Among them, the nucleation device, as an important automated tool, can significantly improve the efficiency and accuracy of nucleation. However, the existing nucleation devices still have some shortcomings in terms of control, including insufficient control accuracy and insufficient stability.

[0003] In view of the control requirements of the pearl oyster core inserter, a variety of control methods can be used. Among them, PID control is currently a classic and widely used control algorithm with the advantages of simple structure, easy implementation, and strong robustness. In the core inserter control, PID control can achieve precise control of the core insertion process by real-time feedback and adjustment of the position of the core inserter; but it still faces challenges in practical application. The performance of the PID controller is highly dependent on the tuning of three parameters: proportional parameter (Kp), integral parameter (Ki) and differential parameter (Kd); due to the complex dynamic characteristics of the pearl oyster core insertion process and the difficulty in accurate modeling, parameter tuning becomes particularly difficult. Inappropriate parameter settings may cause the system to respond too slowly or overshoot, thereby affecting the accuracy of the core insertion position. Secondly, during the core insertion process, if the error persists, the integral term will continue to accumulate, which may cause the controller output to reach the saturation limit, that is, the integral saturation phenomenon. Integral saturation will slow down the system response and even cause the three-axis robot arm to be unable to accurately reach the specified position, thereby affecting the accuracy of the core insertion position.

[0004] The Aphid Optimization Algorithm (AOA) is a newly proposed meta-heuristic algorithm based on bioinspiration. It solves the optimization problem by simulating the behavior of aphids in the foraging process. In the process of looking for food, aphids will go through three stages: generating winged aphids, flight mode and attack mode. The Aphid Optimization Algorithm simulates these stages and establishes a mathematical model to guide the optimization search process. The performance of AOA is very sensitive to its parameters. Inappropriate parameter settings will lead to slow convergence of the algorithm, easy to fall into local optimality or low search efficiency. Secondly, in the optimization process, AOA needs to find a balance between exploration (global search) and utilization (local development). If the algorithm focuses too much on exploration, it may lead to slow convergence; if it focuses too much on utilization, it is easy to fall into local optimality. Summary of the invention

[0005] In order to solve the problem that the control accuracy and stability of the core inserter in the above-mentioned background technology are not high enough, which makes the pearl oyster core insertion operation difficult, the present invention improves the aphid optimization algorithm by designing a nonlinear adaptive flight energy factor E and an optimal boundary processing strategy, and optimizes the PID controller of the core inserter using the improved aphid optimization algorithm (EAOA), thereby obtaining an enhanced PID controller for adjusting the control accuracy and stability of the core inserter.

[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme: a control optimization method of a core inserter for pearl oyster core insertion, the core inserter includes a mechanical arm and an insertion pin, and the core insertion of pearl oyster is realized by controlling the insertion pin through the mechanical arm, and the specific steps are as follows:

[0007] S1, obtaining the internal image data of the pearl oyster, establishing a two-dimensional image, dividing the two-dimensional image into position coordinates, and marking the target position coordinates of the core insertion as (x1, y1);

[0008] S2. Calculate the attitude deviation angle e(t) between the target position and the current position according to the target position coordinates of the core insertion and the current position coordinates of the pin of the core insertion device;

[0009] S3. Input the attitude angle into the manipulator control system of the core inserter. The manipulator control system adjusts the attitude value of the manipulator through the PID controller so that the pin reaches the target position for the core insertion operation. The PID is an enhanced PID. Specifically, the Kp, Ki, and Kd parameters of the PID controller are adjusted using the improved aphid optimization algorithm to obtain the optimal parameter value at the current moment. , , , the parameter value is used for PID to obtain the enhanced PID, where is the optimal ratio parameter value, is the optimal integral parameter value, is the optimal differential parameter value.

[0010] Preferably, in order to make the internal image of the pearl oyster clearer and ensure that the division coordinates of the two-dimensional image of the inside of the pearl oyster are more accurate, an adaptive equalization algorithm is used to enhance the internal image of the pearl oyster.

[0011] Preferably, the internal image of the pearl oyster is enhanced, specifically comprising: graying the internal color image of the pearl oyster, further dividing the internal image of the pearl oyster to be processed into n non-overlapping sub-regions, calculating the corresponding grayscale histogram for each sub-region, and equalizing the grayscale histogram of each sub-region so that the histogram is more uniform in grayscale, the darker areas in the image are brightened, and the brighter areas are adaptively dimmed to achieve the purpose of enhancing the image contrast; finally, the results of all sub-region equalization are spliced ​​according to the corresponding positions of the original image to form a final output image, that is, a two-dimensional image of the interior of the pearl oyster.

[0012] Preferably, the posture deviation angle between the target position and the current position is the angle that the core inserter robot arm needs to adjust to ensure that the pin can accurately reach the target position.

[0013] Preferably, the improved aphid optimization algorithm (EAOA) includes: first, introducing a random offset Design the optimal boundary processing strategy and improve the boundary processing optimization strategy of the aphid optimization algorithm; secondly, introduce a nonlinear function to adjust the attenuation rate , design a nonlinear adaptive flight energy factor E.

[0014] Preferably, the optimal boundary processing strategy introduces a random offset r j Increase the diversity of the aphid optimization algorithm population, specifically: set the upper and lower boundaries of the search space to ub and lb respectively, the problem dimension to d, and the current position of the i-th aphid individual to {X}_{i}=\left [ {{X}_{i,1},{X}_{i,2},{X}_{i,d}} \right ] , further for each dimension j, where j=1,2,3,...,d; check Whether it exceeds the boundary, specifically: , then the current position is mapped to the lower boundary of the jth dimension A random offset is introduced at the same time. , the mathematical model of the new position of aphid individuals is established as ;like , then the current position is mapped to the upper boundary of the jth dimension The effective position within the range is used to establish the mathematical model of the new position of the aphid individual: .

[0015] Preferably, the optimal boundary processing strategy is used to improve the optimization strategy of the aphid optimization algorithm. When the aphid individuals of the aphid optimization algorithm exceed the set boundary during the search process, the individuals are not simply placed on the boundary, but the aphid individuals are mapped to a valid position in the search space. The valid position is the aphid position corresponding to the current fitness minimization value. The global exploration information of the aphid optimization algorithm is retained, the diversity of the aphid optimization algorithm population is improved, and premature convergence is avoided. At the same time, the explored information is used to guide subsequent searches, thereby improving the global optimization speed and optimization accuracy of the aphid optimization algorithm.

[0016] Preferably, designing a nonlinear adaptive flight energy factor E comprises: first, dynamically improving an initial value of the flight energy factor E based on the current iteration number iter, and improving the initial value of the flight energy factor The mathematical model is:

[0017] (1);

[0018] In formula (1), is the initial value of the flight energy factor, the value is 2, iter is the current iteration number, Max_iter is the maximum iteration number, and α is the parameter that controls the decay speed of the initial value of the flight energy factor;

[0019] Second, design a nonlinear function to adjust the decay rate , including: the fitness variance and optimal fitness changes of aphid population locations. The specific model is:

[0020] (2);

[0021] In formula (2), and is the nonlinear adjustment parameter, is the fitness variance of the aphid population at the iterth iteration, indicating the population diversity of the aphid optimization algorithm. is the difference between the optimal fitness of the aphid population at the iter-th iteration and the iter-1-th iteration, indicating the convergence of the aphid optimization algorithm;

[0022] Finally, the improved initial value of the flight energy factor and the decay rate Combining the two parts, we get the improved flight energy factor E, and the mathematical model is:

[0023] (3);

[0024] In formula (3), E(iter) is the improved flight energy factor value of the iter-th iteration.

[0025] Preferably, the improved initial value of the flight energy factor As the number of iterations iter increases, Gradually decreases to simulate the natural energy consumption of aphids during the global optimization process of the algorithm. The α parameter is used to control The decay rate is improved by adjusting the search strategy according to the specific situation of the optimization. The specific situation is caused by the situation encountered by the core inserter during the core insertion process, including unclear core insertion position and fine posture changes of the robot arm control; nonlinear function is used to adjust the decay rate The introduction of the improved flight energy factor makes the higher energy factor E promote global search in the initial stage of algorithm optimization, increasing the possibility of finding the global optimal solution. As the number of iterations increases, the gradually decreasing energy factor E promotes local search and improves the convergence speed of the algorithm. The comprehensive improvement dynamically adjusts the energy factor E so that the algorithm maintains a suitable search step size at different stages, avoids blind search and premature convergence, and improves the tuning accuracy of the control parameters of the PID controller by the improved aphid optimization algorithm.

[0026] Preferably, an enhanced PID controller is constructed using the most suitable parameter values ​​of PID obtained by tuning using an improved aphid optimization algorithm (EAOA), and the enhanced PID is applied to the mechanical arm control system of the core inserter. By adjusting the PID control parameters online, the control accuracy and sensitivity of the mechanical arm of the core inserter are improved. The specific steps are: the attitude deviation angle e(t) between the target position and the current position is input into the enhanced PID, and the enhanced PID controller calculates the control output u(t)=u(t-1)+△u(t) of the mechanical arm at the current moment according to the attitude deviation angle e(t), wherein u(t-1) is the control output at the t-1th moment, and the movement angle of the mechanical arm is adjusted by u(t), thereby adjusting the pin position of the core inserter, and using the angle sensor to feedback the current movement angle of the mechanical arm in real time, and monitoring the pin changes of the core inserter in real time, thereby adjusting the output of the PID controller in real time, and finally enabling the pin of the core inserter to accurately reach the target position, wherein △u(t) is the control output variable of the mechanical arm, and the mathematical model is:

[0027] (4);

[0028] In formula (4), e(t-1) is the attitude angle at the t-1th moment, and e(t-2) is the attitude angle at the t-2th moment.

[0029] Preferably, the Kp, Ki, and Kd parameters of the PID controller are adjusted using an improved aphid optimization algorithm, the improved aphid optimization algorithm mathematical model is mapped to the control parameters of the PID controller, and the Kp, Ki, and Kd parameters of the PID controller are updated by changing the individual positions of the aphid population; the PID controller is a posture control algorithm of the mechanical arm of the core inserter, and the specific steps are:

[0030] Step 1: Set the upper bound ub and lower bound lb of the search space of the improved aphid optimization algorithm, the problem dimension d and the population size N; randomly initialize the position of each aphid individual in the improved aphid optimization algorithm to construct the position matrix of the aphid particles, and the position matrix is ​​of N×d type;

[0031] Step 2: According to formula (5), establish a real number mapping between the Kp, Ki, and Kd parameter values ​​of the PID controller and the position of the i-th aphid individual. The mathematical model is:

[0032] {X}_{i}=\left [ {{Kp}_{i},{Ki}_{i},{Kd}_{i}} \right ] (5);

[0033] In formula (5), is the current position of the i-th aphid individual, , , are the Kp, Ki, and Kd values ​​corresponding to the position of the i-th aphid individual;

[0034] Step 3: Determine whether the current number of iterations iter is equal to the maximum number of iterations Max_iter. If so, resolve the individual position of aphids corresponding to the current minimum fitness value into the optimal parameter value of the PID controller. , , ; Otherwise, execute step 4;

[0035] Step 4, constructing a mathematical model for updating the position of individual aphids in a population of an improved aphid optimization algorithm, and using the mathematical model for updating the position to update the position of each individual aphid in the population;

[0036] step5. Corresponding position of the i-th aphid individual Kp i 、Ki i , Kd i The value is input into the mechanical arm control system of the core inserter, and the fitness value of the i-th aphid individual position is calculated using the objective function; the minimum fitness value of the iter-th iteration is retained , The minimum fitness value of the iter-1th iteration Compare the fitness values ​​of the two and retain the smaller fitness value;

[0037] Step 6: For the positions of individual aphids that are beyond the search boundary, use the optimal boundary processing strategy to map the individual aphids to the position within the search space;

[0038] step7. The current iteration iter executes iter=iter+1 and returns to execute step 3.

[0039] Preferably, the objective function is an important component of the robot control system of the core inserter, which mainly guides the improved aphid optimization algorithm to adjust the control parameters of the PID controller of the robot control system, and is more in line with the principle of minimizing the objective function, that is, the smaller the objective function value, the more accurate the PID controller control parameters, and finds the current global optimal PID control parameters. The mathematical model of the objective function is:

[0040] (6);

[0041] In formula (6), t is the current time t, T is the total system operation time, γ and β are weight coefficients used to adjust the relative importance of deviation and control output change, △u(t) is the control output variable of the robot arm, and e(t) is the posture deflection angle at the time t.

[0042] Preferably, the mathematical model of the position update of individual aphids in a population of the improved aphid optimization algorithm is constructed, including a generation phase, a flight phase and an attack phase, and the specific steps are as follows:

[0043] step 41, in the flight stage, which is the global search stage of the improved aphid optimization algorithm, an improved flight energy factor E mathematical model is established according to formula (3) to simulate the process in which the energy stored by individual aphids gradually decreases as the flight time increases;

[0044] Step 42: Calculate the relative energy value of aphid individuals using the improved flight energy factor E and wind influence factor w ,like If it is less than 1, execute step 43, otherwise execute step 44. The mathematical model of relative energy value is:

[0045] (7);

[0046] In formula (7), E(iter) is the improved flight energy factor value of the iter-th iteration, w is the wind influence factor, and its value is a random number between 0 and 1;

[0047] step43, simulate the passive flight of aphids in a straight line in the direction of the wind, and establish a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm;

[0048] (8);

[0049] In formula (8), is the position of the i-th aphid individual in the iter+1-th iteration, is the position of the i-th aphid individual in the iter-th iteration, is the position of aphid individuals randomly selected from the iter-th iteration population;

[0050] step44, simulate aphids to perform spiral flight under their own control, around the current best aphid individual position Flight, establish a mathematical model for updating the individual position of aphids during the flight phase using the improved aphid optimization algorithm;

[0051] (9);

[0052] In formula (9), R is the spiral radius, which is a uniformly distributed random variable in (-1,1);

[0053] step45, in the attack phase, which is the local development phase of the improved aphid optimization algorithm, the individual positions of aphids are updated by olfactory sensing of the odor of the host plant, and a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm is established;

[0054] (10);

[0055] In formula (10), is the global optimal aphid individual position, and rand is a random number between 0 and 1 that satisfies the normal distribution.

[0056] Preferably, the robot control system of the core inserter includes a posture deflection angle calculation unit, an enhanced PID control unit and a robot kinematics model unit; wherein the robot kinematics model unit determines how the angles of the two joints of the robot control the position of the end pin; the two joint angles of the robot are set to be and The lengths of the two arms of the robot are and , the actual position of the pin is (x2, y2) which can be calculated by the forward kinematics model of formula (11);

[0057] (11).

[0058] The beneficial effects of the present invention are as follows: the improved aphid optimization algorithm optimizes the PID controller parameters by designing a nonlinear adaptive flight energy factor and an optimal boundary processing strategy, so that the robot arm control system maintains high stability under dynamic conditions and avoids over-adjustment and oscillation problems. By introducing the improved aphid optimization algorithm (EAOA), the present invention can accurately adjust the parameters Kp, Ki, and Kd of the PID controller, thereby significantly improving the control accuracy of the core inserter. The robot arm can accurately reach the target position for core insertion, reduce the error between the target position for core insertion and the real-time position of the pin, and improve the success rate of core insertion. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A step diagram of a control method for inserting a core into a pearl oyster using a core inserter;

[0060] Figure 2 A step diagram of a method for determining optimal control parameters of a PID attitude controller of a robotic arm;

[0061] Figure 3 The result diagram of PID control parameter tuning before and after the improvement of aphid optimization algorithm;

[0062] Figure 4 This is the fitness change diagram of PID control parameter adjustment before and after the improvement of aphid optimization algorithm;

[0063] Figure 5 This is the effect diagram of the robotic arm posture control of the core inserter. DETAILED DESCRIPTION

[0064] The technical solutions 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, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0065] The present invention provides a technical method for optimizing the control of a core inserter for inserting a core into a pearl oyster. The core inserter comprises a mechanical arm and an insertion pin. The mechanical arm controls the insertion pin to insert the core into the pearl oyster. The specific implementation steps include S1 to S3.

[0066] S1. Obtain the internal image data of the pearl oyster, create a two-dimensional image, divide the two-dimensional image into position coordinates, and mark the target position coordinates of the core insertion as (x1, y1).

[0067] Furthermore, an adaptive equalization algorithm is used to enhance the internal image of the pearl oyster, the internal color image of the pearl oyster is grayed, and the internal image of the pearl oyster to be processed is further divided into n non-overlapping sub-regions, and the corresponding grayscale histogram is calculated for each sub-region, and the grayscale histogram of each sub-region is equalized to make the histogram more uniform in grayscale, the darker areas in the image are brightened, and the brighter areas are adaptively dimmed to achieve the purpose of enhancing the image contrast; finally, the results of all sub-region equalization are spliced ​​according to the corresponding positions of the original image to form a final output image, that is, a two-dimensional image of the interior of the pearl oyster, and the enhancement of the internal image of the pearl oyster is completed.

[0068] S2. Calculate the attitude deviation angle e(t) between the target position and the current position based on the target position coordinates of the core insertion and the current position coordinates of the pin of the core insertion device; wherein the attitude deviation angle between the target position and the current position is the angle that the core insertion device robot arm needs to adjust to ensure that the pin can accurately reach the target position.

[0069] Furthermore, the actual position of the pin is (x2, y2), according to Calculate the attitude deviation angle e(t) between the target position and the current position.

[0070] Furthermore, the robot control system of the core inserter includes a posture angle calculation unit, an enhanced PID control unit and a robot kinematics model unit; wherein the robot kinematics model unit determines how the angles of the two joints of the robot control the position of the end pin; the two joint angles of the robot are set to be and The lengths of the two arms of the robot are and , the actual position of the pin is (x2, y2) which can be calculated by the forward kinematics model of formula (11);

[0071] (11).

[0072] Furthermore, a simulation model of the core-insertion device's manipulator control system is established in Simulink, including: a target attitude signal input model, an optimal PID control model, an objective function model, and a manipulator drive model of the core-insertion device; the target attitude signal input model uses a 20-fold unit step signal to simulate the manipulator angle control effect of the core-insertion device under small angle adjustment; the objective function model design includes the control output variable △u(t) of the manipulator and the attitude deflection angle e(t) at the tth moment, specifically: ;

[0073] Among them, the robot drive model of the core inserter receives the control signal output by the optimal PID control model, and the transfer function mathematical model is: , where s is the Laplace transform threshold parameter.

[0074] S3. Input the attitude angle into the manipulator control system of the core inserter. The manipulator control system adjusts the attitude value of the manipulator through the PID controller so that the pin reaches the target position for the core insertion operation. The PID is an enhanced PID. Specifically, the Kp, Ki, and Kd parameters of the PID controller are adjusted using the improved aphid optimization algorithm to obtain the optimal parameter value at the current moment. , , , and use the parameter value for PID to obtain an enhanced PID.

[0075] Furthermore, the improved aphid optimization algorithm (EAOA) includes: first, introducing a random offset Design the optimal boundary processing strategy and improve the boundary processing optimization strategy of the aphid optimization algorithm; secondly, introduce a nonlinear function to adjust the attenuation rate , design a nonlinear adaptive flight energy factor E.

[0076] Furthermore, the optimal boundary processing strategy is designed, the upper and lower boundaries of the search space are set to ub and lb respectively, the problem dimension is d, and the current position of the i-th aphid individual is {X}_{i}=\left [ {{X}_{i,1},{X}_{i,2},{X}_{i,d}} \right ] , further for each dimension j, where j=1,2,3,...,d; check Whether it exceeds the boundary, specifically: , then the current position is mapped to the lower boundary of the jth dimension A random offset is introduced at the same time. , the mathematical model of the new position of aphid individuals is established as ;like , then the current position is mapped to the upper boundary of the jth dimension The effective position within the range is used to establish the mathematical model of the new position of the aphid individual: .

[0077] Furthermore, the design of the nonlinear adaptive flight energy factor E includes: first, dynamically improving the initial value of the flight energy factor E based on the current iteration number iter, and the improved initial value of the flight energy factor The mathematical model is:

[0078] (1);

[0079] In formula (1), is the initial value of the flight energy factor, which is 2, iter is the current number of iterations, Max_iter is the maximum number of iterations, and α is the parameter that controls the decay speed of the initial value of the flight energy factor.

[0080] Furthermore, a nonlinear function is designed to adjust the decay rate , including: the fitness variance and optimal fitness changes of aphid population locations. The specific model is:

[0081] (2);

[0082] In formula (2), and is the nonlinear adjustment parameter, is the fitness variance of the aphid population at the iterth iteration, indicating the population diversity of the aphid optimization algorithm. It is the difference between the optimal fitness of the aphid population at the iter-th iteration and the iter-1-th iteration, indicating the convergence of the aphid optimization algorithm.

[0083] Furthermore, the initial value of the improved flight energy factor and the decay rate Combining the two parts, we get the improved flight energy factor E, and the mathematical model is:

[0084] (3);

[0085] In formula (3), E(iter) is the improved flight energy factor value of the iter-th iteration.

[0086] Furthermore, the enhanced PID controller is constructed by using the most suitable parameter value of PID tuned by the improved aphid optimization algorithm (EAOA). The enhanced PID is applied to the robot arm control system of the core inserter. The control accuracy and sensitivity of the robot arm of the core inserter are improved by adjusting the PID control parameters online. The specific steps are as follows: the attitude deviation angle e(t) between the target position and the current position is input into the enhanced PID. The enhanced PID controller calculates the control output u(t)=u(t-1)+△u(t) of the robot arm at the current moment according to the attitude deviation angle e(t), where u(t-1) is the control output at the t-1th moment. The movement angle of the robot arm is adjusted by u(t), thereby adjusting the pin position of the core inserter. The angle sensor is used to feed back the current movement angle of the robot arm in real time, and the pin changes of the core inserter are monitored in real time, thereby adjusting the output of the PID controller in real time. Finally, the pin of the core inserter can accurately reach the target position. △u(t) is the control output variable of the robot arm. The mathematical model is:

[0087] (4);

[0088] In formula (4), e(t-1) is the attitude angle at the t-1th moment, and e(t-2) is the attitude angle at the t-2th moment.

[0089] Furthermore, if Figure 2 As shown in the figure, the Kp, Ki, and Kd parameters of the PID controller are adjusted using the improved aphid optimization algorithm, the mathematical model of the improved aphid optimization algorithm is mapped to the control parameters of the PID controller, and the Kp, Ki, and Kd parameters of the PID controller are updated by changing the individual positions of the aphid population; the PID controller is the posture control algorithm of the robot arm of the core inserter, and the specific steps are:

[0090] Step 1: Set the upper bound ub and lower bound lb of the search space of the improved aphid optimization algorithm, the problem dimension d and the population size N; randomly initialize the position of each aphid individual in the improved aphid optimization algorithm to construct the position matrix of the aphid particles, and the position matrix is ​​of N×d type;

[0091] Step 2: According to formula (5), establish a real number mapping between the Kp, Ki, and Kd parameter values ​​of the PID controller and the position of the i-th aphid individual. The mathematical model is:

[0092] {X}_{i}=\left [ {{Kp}_{i},{Ki}_{i},{Kd}_{i}} \right ] (5);

[0093] In formula (5), is the current position of the i-th aphid individual, , , are the Kp, Ki, and Kd values ​​corresponding to the position of the i-th aphid individual;

[0094] Step 3: Determine whether the current number of iterations iter is equal to the maximum number of iterations Max_iter. If so, resolve the individual position of aphids corresponding to the current minimum fitness value into the optimal parameter value of the PID controller. , , ; Otherwise, execute step 4;

[0095] Step 4, constructing a mathematical model for updating the position of individual aphids in a population of an improved aphid optimization algorithm, and using the mathematical model for updating the position to update the position of each individual aphid in the population;

[0096] step5. Corresponding position of the i-th aphid individual Kp i 、Ki i , Kd iThe value is input into the mechanical arm control system of the core inserter, and the fitness value of the i-th aphid individual position is calculated using the objective function; the minimum fitness value of the iter-th iteration is retained , The minimum fitness value of the iter-1th iteration Compare the fitness values ​​of the two and retain the smaller fitness value;

[0097] Step 6: For the positions of individual aphids that are beyond the search boundary, use the optimal boundary processing strategy to map the individual aphids to the position within the search space;

[0098] step7. The current iteration iter executes iter=iter+1 and returns to execute step 3.

[0099] Furthermore, a mathematical model for updating the position of individual aphids in a population of an improved aphid optimization algorithm is constructed, including a generation phase, a flight phase, and an attack phase. The specific steps are as follows:

[0100] step 41, in the flight stage, which is the global search stage of the improved aphid optimization algorithm, an improved flight energy factor E mathematical model is established according to formula (3) to simulate the process in which the energy stored by individual aphids gradually decreases as the flight time increases;

[0101] Step 42: Calculate the relative energy value of aphid individuals using the improved flight energy factor E and wind influence factor w ,like If it is less than 1, execute step 43, otherwise execute step 44. The mathematical model of relative energy value is:

[0102] (7);

[0103] In formula (7), E(iter) is the improved flight energy factor value of the iter-th iteration, w is the wind influence factor, and its value is a random number between 0 and 1;

[0104] step43, simulate the passive flight of aphids in a straight line in the direction of the wind, and establish a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm;

[0105] (8);

[0106] In formula (8), is the position of the i-th aphid individual in the iter+1-th iteration, is the position of the i-th aphid individual in the iter-th iteration, is the position of aphid individuals randomly selected from the iter-th iteration population;

[0107] step44, simulate aphids to perform spiral flight under their own control, around the current best aphid individual position Flight, establish a mathematical model for updating the individual position of aphids during the flight phase using the improved aphid optimization algorithm;

[0108] (9);

[0109] In formula (9), R is the spiral radius, which is a uniformly distributed random variable in (-1,1);

[0110] step45, in the attack phase, which is the local development phase of the improved aphid optimization algorithm, the individual positions of aphids are updated by olfactory sensing of the odor of the host plant, and a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm is established;

[0111] (10);

[0112] In formula (10), is the global optimal aphid individual position, and rand is a random number between 0 and 1 that satisfies the normal distribution.

[0113] Furthermore, the program design of the Kp, Ki, and Kd parameters of the PID controller set by the improved aphid optimization algorithm is completed in Matlab, including the improved aphid optimization algorithm and the PID controller algorithm code. In order to further verify the control effect of the method proposed in the present invention on the core inserter, the standard aphid optimization algorithm is introduced, and the improved aphid optimization algorithm, the standard aphid optimization algorithm, and the PID controller algorithm code are completed at the same time; the search space upper bound ub=[300,250,100] and the lower bound lb=0 are set, the problem dimension d=3 and the population size N=58, the maximum number of iterations Max_iter=60, the program is run, and the optimal control parameters are input into the simulation model of the mechanical arm control system of the core inserter. The effects of the improved aphid optimization algorithm (EAOA) and the standard aphid optimization algorithm (AOA) on the Kp, Ki, and Kd parameters of the PID controller are shown as follows. Figure 3 shown.

[0114] Furthermore, the fitness change analysis of PID control parameter setting before and after the improvement of the aphid optimization algorithm is carried out, such as Figure 4As shown, it can be seen that the fitness value of the improved aphid optimization algorithm (EAOA) decreases faster and reaches a lower fitness value in fewer iterations; the fitness value of the standard aphid optimization algorithm (AOA) decreases relatively slowly during the entire optimization process, and the final fitness value is also higher than the improved aphid optimization algorithm. According to the objective function design requirements, the smaller the fitness value, the better the robustness of the core inserter's robotic arm control system. This shows that the improved aphid optimization algorithm has better performance and faster convergence speed than the standard aphid optimization algorithm when optimizing the parameters (Kp, Ki, Kd) of the PID controller of the core inserter's robotic arm.

[0115] Furthermore, if Figure 5 As shown in the figure, three different PID controllers respond to the manipulator control system of the core inserter, namely PSO-PID (particle swarm optimization PID), AOA-PID (standard aphid optimization algorithm PID) and EAOA-PID (improved aphid optimization algorithm PID). From the control overshoot, PSO-PID has the largest overshoot, which is about 2.46; AOA-PID has the second largest overshoot, which is about 2.42; EAOA-PID has the smallest overshoot, which is about 2.09, indicating that the improved aphid optimization algorithm is the best in reducing overshoot and ensuring stable regulation of the manipulator control system of the core inserter; from the analysis of the system response stabilization time, the EAOA-PID controller has the shortest system response stabilization time, indicating that the improved aphid optimization algorithm has excellent performance in stability and can achieve the most accurate control in the shortest time; comprehensive analysis shows that the improved aphid optimization algorithm shows better performance in adjusting the PID controller parameters of the manipulator control system of the core inserter. By reducing overshoot, accelerating response speed and shortening stabilization time, the improved algorithm significantly improves the control effect of the system.

Claims

1. A control optimization method for a core inserter for pearl oyster core insertion, characterized in that: The core inserter includes a mechanical arm and a pin. The mechanical arm controls the pin to insert the core of the pearl oyster. The specific steps are as follows: S1, obtaining the internal image data of the pearl oyster, establishing a two-dimensional image, dividing the two-dimensional image into position coordinates, and marking the target position coordinates of the core insertion as (x1, y1); S2, calculating the attitude deviation angle e(t) between the target position and the current position according to the target position coordinates of the core insertion and the current position coordinates of the pin of the core insertion device; S3, inputting the attitude deflection angle into the mechanical arm control system of the core inserter, and the mechanical arm control system adjusts the attitude value of the mechanical arm through the PID controller so that the insertion needle reaches the target position for the core insertion operation, wherein the PID is an enhanced PID, specifically: using the improved aphid optimization algorithm to adjust the Kp, Ki, Kd parameters of the PID controller to obtain the best parameter value at the current moment , , , using the optimal parameter value for PID to obtain an enhanced PID; the improved aphid optimization algorithm includes: introducing a random offset Design the optimal boundary processing strategy and improve the boundary processing optimization strategy of the aphid optimization algorithm; introduce nonlinear functions to adjust the attenuation rate , design a nonlinear adaptive flight energy factor E, and improve the optimization mechanism of the aphid optimization algorithm; Wherein, the random offset introduced r j Design the optimal boundary processing strategy, specifically: set the upper and lower boundaries of the search space to ub and lb respectively, the problem dimension of the aphid population to d, and the current position of the i-th aphid individual to , for each dimension j, where j=1,2,3,...,d; check the current position of the i-th aphid individual in the j-th dimension Whether it exceeds the boundary, specifically: , then the current position is mapped to the lower boundary of the jth dimension A random offset is introduced at the same time. , the mathematical model of the new position of aphid individuals is established as ;like , then the current position is mapped to the upper boundary of the jth dimension The effective position within the range is used to establish the mathematical model of the new position of the aphid individual: ; The design of the nonlinear adaptive flight energy factor E comprises: dynamically improving the initial value of the flight energy factor E based on the current iteration number iter, and improving the initial value of the flight energy factor The mathematical model is: (1); In formula (1), is the initial value of the flight energy factor, the value is 2, iter is the current iteration number, Max_iter is the maximum iteration number, and α is the parameter that controls the decay speed of the initial value of the flight energy factor; Design nonlinear functions to adjust the decay rate , including: the fitness variance and optimal fitness changes of aphid population locations. The specific model is: (2); In formula (2), and is the nonlinear adjustment parameter, is the fitness variance of the aphid population at the iterth iteration, indicating the population diversity of the aphid optimization algorithm. is the difference between the optimal fitness of the aphid population at the iter-th iteration and the iter-1-th iteration, indicating the convergence of the aphid optimization algorithm; The improved flight energy factor initial value and decay rate Combining the two parts, we get the improved flight energy factor E, and the mathematical model is: (3); In formula (3), E(iter) is the improved flight energy factor value of the iter-th iteration; The robot control system adjusts the posture value of the robot through the PID controller so that the pin reaches the target position. The specific method is: the posture deviation angle e(t) between the target position and the current position is input into the enhanced PID, and the enhanced PID controller calculates the control output u(t)=u(t-1)+△u(t) of the robot at the current moment according to the posture deviation angle e(t), wherein u(t-1) is the control output at the t-1th moment, and the movement angle of the robot is adjusted by u(t), thereby adjusting the pin position of the core inserter, and using the angle sensor to feedback the current movement angle of the robot in real time, and monitoring the pin change of the core inserter in real time, thereby adjusting the output of the PID controller in real time, and finally making the pin of the core inserter reach the target position accurately, wherein △u(t) is the control output variable of the robot, and the mathematical model is: (4); In formula (4), e(t-1) is the attitude angle at the t-1th moment, e(t-2) is the attitude angle at the t-2th moment, Kp is the proportional parameter, Ki is the integral parameter, and Kd is the differential parameter; The improved aphid optimization algorithm is used to adjust the Kp, Ki, and Kd parameters of the PID controller, and the improved aphid optimization algorithm mathematical model is mapped with the control parameters of the PID controller. The Kp, Ki, and Kd parameters of the PID controller are updated by changing the individual positions of the aphid population. The PID controller is a posture control algorithm of the mechanical arm of the core inserter, and the specific steps are as follows: Step 1, set the search space upper boundary ub and lower boundary lb of the improved aphid optimization algorithm, the problem dimension d and the population size N; randomly initialize the position of each aphid individual of the improved aphid optimization algorithm to construct a position matrix of aphid particles, and the position matrix is ​​of N×d type; Step 2: According to formula (5), establish a real number mapping between the Kp, Ki, and Kd parameter values ​​of the PID controller and the position of the i-th aphid individual. The mathematical model is: (5); In formula (5), is the current position of the i-th aphid individual, , , are the Kp, Ki, and Kd values ​​corresponding to the position of the i-th aphid individual; Step 3: Determine whether the current number of iterations iter is equal to the maximum number of iterations Max_iter. If so, resolve the individual position of aphids corresponding to the current minimum fitness value into the optimal parameter value of the PID controller. , , ; Otherwise, execute step 4; Step 4, constructing a mathematical model for updating the position of individual aphids in a population of an improved aphid optimization algorithm, and using the mathematical model for updating the position to update the position of each individual aphid in the population; step5. Set the Kp corresponding to the position of the i-th aphid individual i 、Ki i , Kd i The value is input into the mechanical arm control system of the core inserter, and the fitness value of the i-th aphid individual position is calculated using the objective function; the minimum fitness value of the iter-th iteration is retained , The minimum fitness value of the iter-1th iteration Compare the fitness values ​​of the two and retain the smaller fitness value; Step 6: For the positions of individual aphids that are beyond the search boundary, the optimal boundary processing strategy is used to map the individual aphids to positions within the search space; step7, the current iteration iter executes iter=iter+1, and returns to execute step 3; The specific steps of constructing a mathematical model for updating the position of individual aphids in a population of an improved aphid optimization algorithm are as follows: step 41, in the flight stage, which is the global search stage of the improved aphid optimization algorithm, an improved flight energy factor E mathematical model is established according to formula (3) to simulate the process in which the energy stored by the individual aphid gradually decreases as the flight time increases; Step 42: Calculate the relative energy value of aphid individuals using the improved flight energy factor E and wind influence factor w , if the If it is less than 1, execute step 43, otherwise execute step 44. The mathematical model of relative energy value is: (7); In formula (7), E(iter) is the improved flight energy factor value of the iter-th iteration, w is the wind influence factor, and its value is a random number between 0 and 1; step43, simulate the passive flight of aphids in a straight line in the direction of the wind, and establish a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm; (8); In formula (8), is the position of the i-th aphid individual in the iter+1-th iteration, is the position of the i-th aphid individual in the iter-th iteration, is the position of aphid individuals randomly selected from the iter-th iteration population; step44, simulate aphids to perform spiral flight under their own control, around the current best aphid individual position Flight, establish a mathematical model for updating the individual position of aphids during the flight phase using the improved aphid optimization algorithm; (9); In formula (9), R is the spiral radius, which is a uniformly distributed random variable in (-1,1); step45, in the attack phase, which is the local development phase of the improved aphid optimization algorithm, the individual positions of aphids are updated by olfactory sensing of the odor of the host plant, and a mathematical model for updating the individual positions of aphids in the flight phase of the improved aphid optimization algorithm is established; (10); In formula (10), is the global optimal aphid individual position, and rand is a random number between 0 and 1 that satisfies the normal distribution.

2. A control optimization method for a core inserter for pearl oyster core insertion according to claim 1, characterized in that: The robot control system of the core inserter includes a posture deflection angle calculation unit, an enhanced PID control unit and a robot kinematics model unit; wherein the robot kinematics model unit determines how the angles of the two joints of the robot control the position of the end pin; specifically, the two joint angles of the robot are set to be and The lengths of the two arms of the robot are and , the actual position of the pin is (x2, y2) calculated by the forward kinematics model of formula (11); (11)。

Citation Information

Patent Citations

  • Method for inserting nucleus in pear mussel

    CN103621445A

  • Full-automatic pearl mussel nucleus implantation applying device

    CN108094278A

  • Core inserting method for pearl culture in fresh water mussels

    CN109496935A

  • Dynamic parameter tuning using particle swarm optimization

    US20140172125A1