A dynamic adaptive control method for a robotic arm gimbal
Through the improved enzyme action optimization algorithm, the PID controller parameters of the robotic arm gimbal control system are optimized, which solves the problem of insufficient adaptability of traditional PID control strategies in dynamic environments, and realizes rapid and accurate control of the robotic arm gimbal, enhancing the robustness and control accuracy of the system.
Patent Information
- Application Number
- CN202510685534.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-05-27
AI Technical Summary
Traditional PID control strategies are difficult to adapt to dynamic changes in the environment in robotic arm gimbal system, resulting in attitude deviation and jitter, lack of adaptability, and affect control accuracy and robustness.
The improved enzyme action optimization algorithm is used to optimize the PID controller parameters of the robotic arm gimbal control system, and the control parameters are dynamically adjusted to improve the system's adaptability and control accuracy.
In complex environments, the robotic arm gimbal can respond quickly and accurately adjust to the target angle, improving the robustness and control accuracy of the system and reducing the cumulative impact of dynamic errors.
Smart Images

Figure CN120190834B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of PID control optimization, and in particular relates to a dynamic adaptive control method for a manipulator pan-tilt platform. Background Art
[0002] With the rapid development of intelligent manufacturing, robotics and unmanned systems, robotic arms and gimbal systems have been widely used in many fields such as industrial automation, aerospace, inspection and detection, medical surgery, service robots, etc. As a multi-degree-of-freedom actuator, the robotic arm has flexible trajectory control capabilities; the gimbal system is widely used in visual perception and posture adjustment tasks, and is often used to carry cameras, sensors and other equipment for target tracking and environmental monitoring. Traditional gimbal control methods mostly rely on PID control strategies with fixed parameters, which are difficult to adapt to dynamic changes in the environment, such as load disturbances, vibrations of the robotic arm joints, changes in the running path, etc., which bring about posture deviation and jitter problems. In complex application scenarios, the gimbal needs to be adjusted in real time according to the end state of the robotic arm, its own load characteristics and target feedback information, which puts higher requirements on the response speed, robustness and adaptability of the control system.
[0003] The PID control strategy adjusts the system control output through a weighted combination of proportional, integral and differential parts, and is widely used in industrial process control. The PID controller has been widely used in the field of engineering control due to its simple structure, easy implementation and reliable performance. However, the traditional PID control strategy also has some shortcomings. First, its performance is highly dependent on the settings of proportional, integral and differential coefficients, and these parameters need to be manually adjusted under different working conditions and lack adaptive capabilities. Second, for complex nonlinear systems or in the presence of external disturbances, the PID controller with fixed parameters cannot respond to system changes in real time, which can easily lead to unstable control. By combining intelligent optimization algorithms with PID control technology, it is used to automatically optimize PID parameters. This method can effectively solve the problem of experience dependence in PID parameter selection and improve the accuracy and robustness of the controller.
[0004] The Enzyme Action Optimization (EAO) algorithm is a novel bio-inspired optimization algorithm that mimics the adaptive mechanism of enzymes in biological systems. Drawing on this mechanism, EAO considers candidate solutions as "substrates" that interact with the "enzyme," the current best solution. The algorithm dynamically adjusts exploration and development strategies based on observed performance, balancing exploration of different regions of the solution space with refined searches for promising areas. EAO incorporates random elements and adaptive factors, similar to biological processes, thereby avoiding premature convergence and enhancing solution diversity, making it particularly suitable for complex, high-dimensional, and multimodal optimization problems. Summary of the Invention
[0005] The purpose of the present invention is to improve the enzyme action optimization algorithm, and use the improved enzyme action optimization algorithm to optimize the control parameters of the PID controller in the robot arm pan-tilt control system. The improved enzyme action optimization algorithm has better performance and stronger adaptability in the optimization process, can better adapt to the pan-tilt control scenario, and can find the optimal solution with a shorter number of iterations. At the same time, the angle of the robot arm pan-tilt control system is controlled by the optimized PID controller, thereby improving the system's adaptability and enhancing the system's control accuracy. In complex control scenarios, the pan-tilt can also respond quickly and rotate to the target angle, which is convenient for the robot arm to perform grasping work, effectively solving the problem of poor adaptability of the PID controller due to fixed parameters, and thus improving the robustness of the robot arm pan-tilt control system.
[0006] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions.
[0007] A dynamic adaptive control method for a robotic arm pan / tilt platform, the specific steps are as follows.
[0008] Step 1: Construct a robotic arm gimbal control system, which includes: a position acquisition module, an angle calculation module, a PID controller module, an improved enzyme action optimization algorithm module, a gimbal posture adjustment module, and a gimbal real-time position detection module.
[0009] Step 2: Improve the enzyme action optimization algorithm. The specific improvements include:
[0010] S1. The adaptive factor (AF) of the enzyme optimization algorithm is updated through an adaptive adjustment mechanism based on local gradients. This strategy combines the local gradient information of individuals in the population and the changes in the diversity entropy of the search space to provide real-time feedback and adjust the size of the adaptive factor (AF) during the optimization process.
[0011] S2. An orbital perturbation-induced position update strategy is used to improve the mathematical model of the position update of the second substrate in the enzyme action optimization algorithm. Starting from the non-Euclidean orbital path evolution and the control perturbation field generation mechanism, this strategy simulates the dynamic path of the enzyme changing the substrate through the conformational channel and maps it into the transition trajectory of the individual position path in the algorithm. The individual position is updated by generating the non-dynamic enzyme potential field factor U(iter) and the perturbation factor T(iter).
[0012] Step 3: Obtain the error between the current position and the target position of the manipulator gimbal, calculate the angle error that needs to be adjusted, and optimize the control parameters of the PID controller module of the manipulator gimbal control system through the improved enzyme action optimization algorithm to obtain the optimal set of control parameters.
[0013] Step 4: Input a set of optimal control parameters obtained in step 3 into the PID controller, and adjust the robotic arm gimbal to reach the target angle through the control quantity output by the PID controller.
[0014] Preferably, in the manipulator gimbal control system constructed in the step 1, the position acquisition module acquires the current position information and target position information of the gimbal, the angle calculation module calculates the angle error e(t) that the gimbal needs to adjust by using the current position and target position acquired by the position acquisition module, and the PID controller module optimizes the control parameters using the improved enzyme action optimization algorithm module, and inputs the optimized control quantity U(t) into the gimbal attitude adjustment module, which adjusts the angle of the gimbal by driving the gimbal motor to reach the target position. During the control process, the gimbal real-time position detection module updates the gimbal position in real time and feeds back to the position acquisition module for real-time adjustment. The mathematical model of the control quantity U(t) is shown in formula (1), and the mathematical model of the gimbal attitude adjustment module is shown in formula (2);
[0015] (1);
[0016] In formula (1), U(t) represents the control amount, e(t) represents the angle error, 、 、 They represent the proportional gain parameter, integral gain parameter and differential gain parameter obtained by optimizing the PID controller through the improved enzyme action optimization algorithm;
[0017] (2);
[0018] In formula (2), J represents the moment of inertia of the gimbal, Km represents the torque constant of the motor, θ(t) represents the gimbal rotation angle, and U(t) represents the control quantity as shown in formula (1).
[0019] Preferably, in S1, the adaptive factor AF of the enzyme action optimization algorithm is updated by an adaptive adjustment mechanism based on local gradient. First, the local gradient XT is calculated. The local gradient is determined by the difference between the current individual's position and the optimal position in the population and the fitness value of the current individual's position and the fitness value of the optimal position. Then, the entropy change of the search space is introduced, that is, the diversity of the current solution is evaluated by calculating the distribution entropy H of the current individual. Finally, based on the feedback of the local gradient and entropy change, the value of the adaptive factor AF is dynamically adjusted. If the values of the local gradient and the distribution entropy H become larger, it means that the range of the current solution space is wide. At this time, the value of the adaptive factor AF is increased. If the values of the local gradient and the distribution entropy H become smaller, it means that the local convergence and the diversity are reduced, then the value of the adaptive factor AF is reduced. The specific update formula of AF is shown in formula (3):
[0020] (3);
[0021] In formula (3), AF represents the adaptive factor, r1 and r2 represent the adjustment factors, r1 is 0.4, r2 is 0.6, XT represents the local gradient, , f represents the fitness value of the current individual position, represents the fitness value of the best individual in the population, X(iter) represents the current individual position, Represents the optimal individual position, H represents the distribution entropy. The specific calculation formula is shown in formula (4);
[0022] (4);
[0023] In formula (4), N represents the number of individuals in the population, ω represents the distribution weight value, which is a random number between [0,1], exp() represents the exponential calculation function, and X(iter) represents the current individual position. represents the optimal individual position, h0 represents the initial bandwidth, which is 0.5, and r represents the adjustment coefficient, which is 1.2. represents the value of the distribution entropy of the previous iteration, It represents the maximum value of the distribution entropy. The algorithm is to optimize the three parameters of the PID controller and set the maximum value of the distribution entropy to the problem dimension value 3.
[0024] Preferably, the innovation of an adaptive adjustment mechanism based on local gradient is that it combines local gradient information and search space diversity, and can adjust the balance of algorithm exploration and development according to real-time feedback during the optimization process. This adaptive adjustment mechanism can respond more intelligently to local changes in complex control problems, avoid the algorithm from falling into premature convergence or falling into local optimal solutions, improve the robustness and global optimization capabilities of the algorithm, thereby improving the accuracy of gimbal control and reducing the adverse effects of the accumulation of dynamic errors during angle adjustment.
[0025] Preferably, in S2, a mathematical model for the position update of the second substrate in the enzyme action optimization algorithm is improved by a trajectory perturbation-induced position update strategy. The search space is regarded as a non-Euclidean orbit, and each individual follows the local energy orbit propagation in the space. The individual position is not directly updated, but a non-dynamic enzyme potential field factor U(iter) and a perturbation factor T(iter) are constructed. The individual moves along the perturbation dynamic transition path in the perturbation orbit. The non-dynamic enzyme potential field factor U(iter) and the perturbation factor T(iter) are shown in Formulas (5) and (6):
[0026] (5);
[0027] In formula (5), N represents the number of individuals in the population, rand represents a random number between [0, 1], f represents the fitness value of the current individual position, exp() represents the exponential calculation function, iter represents the current iteration number, X(iter) represents the current individual position, X(iter-1) represents the position of the individual at the previous iteration number, σ(iter) represents the expansion scale of the iteration stage, σ(iter) = iter / max_iter, and max_iter represents the maximum number of iterations;
[0028] (6);
[0029] In formula (6), K represents the number of disturbance terms, which is 5, exp() represents the exponential calculation function, iter represents the current number of iterations, fk represents the frequency of the disturbance term, which is in the range of [1, 3], Xk represents the inner product of the current individual position vector and the average position vector of the individuals in the population, and d represents the disturbance direction, which is a random number between [-1, 1].
[0030] Then, the step length control factor y for individual position update is set, y=ymax / 1+log(1+iter), ymax represents the maximum step length, and its value is (ub-lb) / 2, ub represents the upper limit of the search space, and lb represents the lower limit of the search space. As the number of iterations increases, the value of y decays. Combining all the mathematical models constructed by the above strategy, the individual position is updated. The specific update formula is shown in formula (7):
[0031] (7);
[0032] In formula (7), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, y represents the step size control factor, U(iter) represents the non-dynamic enzyme potential field factor, and T(iter) represents the perturbation factor.
[0033] Preferably, an orbital perturbation-induced position update strategy realizes the trajectory evolution control of individual positions during the optimization process. This strategy abandons the traditional direct position update method that relies on mutation or differentiation, and instead introduces an energy orbit transfer mechanism. By constructing a nonlinear perturbation trajectory, it guides the individual to achieve a smooth transition, thereby effectively enhancing the global optimization ability and convergence stability of the algorithm. The control parameters optimized based on this update mechanism can significantly improve the response hysteresis and adjustment overshoot problems of traditional PID controllers in highly nonlinear and multi-disturbance environments, and further improve the dynamic stability and environmental adaptability of the pan-tilt control system.
[0034] Preferably, in step three, the control parameters of the PID controller module of the robotic arm pan-tilt control system are optimized by an improved enzyme action optimization algorithm, and the specific steps are as follows:
[0035] Step 1: Initialize the parameters of the improved enzyme optimization algorithm, including the number of individuals in the population N, the problem dimension dim, the maximum number of iterations max_iter, the upper limit of the search space ub, and the lower limit of the search space lb;
[0036] Step 2: Map the improved enzyme action optimization algorithm with the PID controller module in the constructed robotic arm pan-tilt control system. Specifically, the optimization process of the improved enzyme action optimization algorithm is combined with the parameter tuning of the PID controller. The problem dimension dim=3 of the improved enzyme action optimization algorithm. The position of each individual contains three dimensions corresponding to the three parameters Kp, Ki, and Kd of the PID controller. , 、 、 Represents the components of the individual position vector in three dimensions, inputs the parameters obtained by each algorithm optimization into the PID controller and returns the real-time error value e(t) of the control, and calculates the fitness value of each group of parameters through the fitness value function as the optimization indicator;
[0037] Step 3: Set the fitness value function of the improved enzyme optimization algorithm, calculate the fitness value of individuals in the initial population through the fitness value function, sort them according to the fitness value, and select the position of the optimal individual. The specific fitness value function is:
[0038] (8);
[0039] In formula (8), J represents the fitness value, e(t) represents the real-time error, and T represents the system running time;
[0040] Step 4: Update the individual positions in the population through the mathematical model of the improved enzyme optimization algorithm, and sort the updated population according to the fitness value. The specific mathematical model is:
[0041] Step 41, first update the adaptive factor AF of the improved enzyme action optimization algorithm, the specific formula is shown in formula (3);
[0042] Step 42: Update the position of the first substrate of the individual. The specific update formula is shown in formula (9):
[0043] (9);
[0044] In formula (9), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, represents the optimal individual position, ρ represents a random number between [0, 1], and AF represents the adaptive factor. The specific formula is shown in formula (3);
[0045] Step 43, update the position of the second substrate of the individual. The specific update formula is shown in formula (7);
[0046] Step 44, select the individual with the better fitness value after the two substrates are updated as the final update position;
[0047] Step 5: Determine whether the current number of iterations has reached the maximum number of iterations. If not, return to step 4 for optimization. If so, complete the algorithm optimization and output the optimal solution.
[0048] By adopting the above technical solution, the advantages of the invention are as follows: the mathematical model of the enzyme action optimization algorithm is improved, and the improved enzyme action optimization algorithm is applied to the optimization process of the PID controller parameters in the manipulator gimbal control system. By introducing a new optimization mechanism, the improved algorithm performs better in search efficiency, solution quality and adaptability to different control requirements, and can more effectively adapt to the dynamic characteristics of the gimbal control system. During the optimization process, the improved algorithm can converge to a high-quality solution at a faster speed, significantly shortening the iteration time. With the help of the optimized PID controller, the gimbal attitude angle is accurately adjusted. The system exhibits stronger adaptability and angle control accuracy in a changing environment, ensuring that the gimbal can quickly respond to control instructions and complete alignment with the target direction in a short time, thereby improving the efficiency and accuracy of the manipulator in performing grasping tasks. Compared with the traditional fixed-parameter PID control method, this method effectively overcomes the problems of poor parameter adaptability and response lag, and significantly enhances the robustness and reliability of the gimbal control system in complex application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 The flowchart is a dynamic adaptive control method of a robotic arm pan-tilt platform.
[0050] Figure 2 To build a model diagram of the robotic arm pan-tilt control system.
[0051] Figure 3 This is a comparison chart of the fitness value changes during the optimization process of the improved enzyme action optimization algorithm and the original enzyme action optimization algorithm.
[0052] Figure 4 This is a response comparison chart of the PID controller in the robotic arm pan-tilt control system optimized by the improved enzyme action optimization algorithm and the original enzyme action optimization algorithm. DETAILED DESCRIPTION
[0053] 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 shall fall within the scope of protection of the present invention.
[0054] The present invention provides a technical solution: a dynamic adaptive control method for a robotic arm pan / tilt platform, which specifically includes the following steps, as shown in FIG1 .
[0055] Step 1: Construct a robotic arm gimbal control system, which includes: position acquisition module, angle calculation module, PID controller module, improved enzyme action optimization algorithm module, gimbal attitude adjustment module, gimbal real-time position detection module, such as Figure 2 shown.
[0056] Furthermore, in the manipulator gimbal control system constructed in the step 1, the position acquisition module obtains the current position information and target position information of the gimbal, the angle calculation module calculates the angle error e(t) that the gimbal needs to adjust through the current position and target position obtained by the position acquisition module, and the PID controller module uses the improved enzyme action optimization algorithm module to optimize the control parameters through the angle error e(t), and inputs the optimized control quantity U(t) into the gimbal attitude adjustment module. The gimbal attitude adjustment module adjusts the angle of the gimbal by driving the gimbal motor to make it reach the target position. During the control process, the gimbal real-time position detection module updates the gimbal position in real time and feeds back to the position acquisition module for real-time adjustment. The mathematical model of the control quantity U(t) is shown in formula (1), and the mathematical model of the gimbal attitude adjustment module is shown in formula (2);
[0057] (1);
[0058] In formula (1), U(t) represents the control amount, e(t) represents the angle error, 、 、 They represent the proportional gain parameter, integral gain parameter and differential gain parameter obtained by optimizing the PID controller through the improved enzyme action optimization algorithm;
[0059] (2);
[0060] In formula (2), J represents the moment of inertia of the gimbal, Km represents the torque constant of the motor, θ(t) represents the gimbal rotation angle, and U(t) represents the control quantity as shown in formula (1).
[0061] Step 2: Improve the enzyme action optimization algorithm. The specific improvements include:
[0062] S1. The adaptive factor (AF) of the enzyme optimization algorithm is updated through an adaptive adjustment mechanism based on local gradients. This strategy combines the local gradient information of individuals in the population and the changes in the diversity entropy of the search space to provide real-time feedback and adjust the size of the adaptive factor (AF) during the optimization process.
[0063] S2. An orbital perturbation-induced position update strategy is used to improve the mathematical model of the position update of the second substrate in the enzyme action optimization algorithm. Starting from the non-Euclidean orbital path evolution and the control perturbation field generation mechanism, this strategy simulates the dynamic path of the enzyme changing the substrate through the conformational channel and maps it into the transition trajectory of the individual position path in the algorithm. The individual position is updated by generating the non-dynamic enzyme potential field factor U(iter) and the perturbation factor T(iter).
[0064] Furthermore, in S1, the adaptive factor AF of the enzyme action optimization algorithm is updated by an adaptive adjustment mechanism based on local gradient. First, the local gradient XT is calculated. The local gradient is determined by the difference between the current individual's position and the optimal position in the population and the fitness value of the current individual's position and the fitness value of the optimal position. Then, the entropy change of the search space is introduced, that is, the diversity of the current solution is evaluated by calculating the distribution entropy H of the current individual. Finally, based on the feedback of the local gradient and entropy change, the value of the adaptive factor AF is dynamically adjusted. If the values of the local gradient and the distribution entropy H become larger, it means that the range of the current solution space is wide. At this time, the value of the adaptive factor AF is increased. If the values of the local gradient and the distribution entropy H become smaller, it means that the local convergence and the diversity are reduced. In this case, the value of the adaptive factor AF is reduced. The specific update formula of AF is shown in formula (3):
[0065] (3);
[0066] In formula (3), AF represents the adaptive factor, r1 and r2 represent the adjustment factors, r1 is 0.4, r2 is 0.6, XT represents the local gradient, , f represents the fitness value of the current individual position, represents the fitness value of the best individual in the population, X(iter) represents the current individual position, Represents the optimal individual position, H represents the distribution entropy. The specific calculation formula is shown in formula (4);
[0067] (4);
[0068] In formula (4), N represents the number of individuals in the population, ω represents the distribution weight value, which is a random number between [0,1], exp() represents the exponential calculation function, and X(iter) represents the current individual position. represents the optimal individual position, h0 represents the initial bandwidth, which is 0.5, and r represents the adjustment coefficient, which is 1.2. represents the value of the distribution entropy of the previous iteration, It represents the maximum value of the distribution entropy. The algorithm is to optimize the three parameters of the PID controller and set the maximum value of the distribution entropy to the problem dimension value 3.
[0069] Furthermore, in S2, a mathematical model for the position update of the second substrate in the enzyme action optimization algorithm is improved by a trajectory perturbation-induced position update strategy. The search space is regarded as a non-Euclidean orbit. Each individual follows the local energy orbit propagation in the space. Instead of directly updating the individual position, a non-dynamic enzyme potential field factor U(iter) and a perturbation factor T(iter) are constructed. The individual moves along the perturbation dynamic transition path in the perturbation orbit. The non-dynamic enzyme potential field factor U(iter) and the perturbation factor T(iter) are shown in Equations (5) and (6):
[0070] (5);
[0071] In formula (5), N represents the number of individuals in the population, rand represents a random number between [0, 1], f represents the fitness value of the current individual position, exp() represents the exponential calculation function, iter represents the current iteration number, X(iter) represents the current individual position, X(iter-1) represents the position of the individual at the previous iteration number, σ(iter) represents the expansion scale of the iteration stage, σ(iter) = iter / max_iter, and max_iter represents the maximum number of iterations;
[0072] (6);
[0073] In formula (6), K represents the number of disturbance terms, which is 5, exp() represents the exponential calculation function, iter represents the current number of iterations, fk represents the frequency of the disturbance term, which is in the range of [1, 3], Xk represents the inner product of the current individual position vector and the average position vector of the individuals in the population, and d represents the disturbance direction, which is a random number between [-1, 1].
[0074] Then, the step length control factor y for individual position update is set, y=ymax / 1+log(1+iter), ymax represents the maximum step length, and its value is (ub-lb) / 2, ub represents the upper limit of the search space, and lb represents the lower limit of the search space. As the number of iterations increases, the value of y decays. Combining all the mathematical models constructed by the above strategy, the individual position is updated. The specific update formula is shown in formula (7):
[0075] (7);
[0076] In formula (7), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, y represents the step size control factor, U(iter) represents the non-dynamic enzyme potential field factor, and T(iter) represents the perturbation factor.
[0077] Step 3: Obtain the error between the current position and the target position of the manipulator gimbal, calculate the angle error that needs to be adjusted, and optimize the control parameters of the PID controller module of the manipulator gimbal control system through the improved enzyme action optimization algorithm to obtain the optimal set of control parameters.
[0078] Furthermore, in step three, the control parameters of the PID controller module of the manipulator pan-tilt control system are optimized by an improved enzyme action optimization algorithm, and the specific steps are as follows:
[0079] Step 1: Initialize the parameters of the improved enzyme optimization algorithm, including the number of individuals in the population N, the problem dimension dim, the maximum number of iterations max_iter, the upper limit of the search space ub, and the lower limit of the search space lb;
[0080] Step 2: Map the improved enzyme action optimization algorithm with the PID controller module in the constructed robotic arm pan-tilt control system. Specifically, the optimization process of the improved enzyme action optimization algorithm is combined with the parameter tuning of the PID controller. The problem dimension dim=3 of the improved enzyme action optimization algorithm. The position of each individual contains three dimensions corresponding to the three parameters Kp, Ki, and Kd of the PID controller. , 、 、 Represents the components of the individual position vector in three dimensions, inputs the parameters obtained by each algorithm optimization into the PID controller and returns the real-time error value e(t) of the control, and calculates the fitness value of each group of parameters through the fitness value function as the optimization indicator;
[0081] Step 3: Set the fitness value function of the improved enzyme optimization algorithm, calculate the fitness value of individuals in the initial population through the fitness value function, sort them according to the fitness value, and select the position of the optimal individual. The specific fitness value function is:
[0082] (8);
[0083] In formula (8), J represents the fitness value, e(t) represents the real-time error, and T represents the system running time;
[0084] Step 4: Update the individual positions in the population through the mathematical model of the improved enzyme optimization algorithm, and sort the updated population according to the fitness value. The specific mathematical model is:
[0085] Step 41, first update the adaptive factor AF of the improved enzyme action optimization algorithm, the specific formula is shown in formula (3);
[0086] Step 42: Update the position of the first substrate of the individual. The specific update formula is shown in formula (9):
[0087] (9);
[0088] In formula (9), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, represents the optimal individual position, ρ represents a random number between [0, 1], and AF represents the adaptive factor. The specific formula is shown in formula (3);
[0089] Step 43, update the position of the second substrate of the individual. The specific update formula is shown in formula (7);
[0090] Step 44, select the individual with the better fitness value after the two substrates are updated as the final update position;
[0091] Step 5: Determine whether the current number of iterations has reached the maximum number of iterations. If not, return to step 4 for optimization. If so, complete the algorithm optimization and output the optimal solution.
[0092] Step 4: Input a set of optimal control parameters obtained in step 3 into the PID controller, and adjust the robotic arm gimbal to reach the target angle through the control quantity output by the PID controller.
[0093] Furthermore, in order to verify the advantages of the present invention, experiments were conducted using MATLAB and Simulink. The mathematical model of the original enzyme action optimization algorithm was improved using the above two improvement strategies in MATLAB, as well as the code implementation of the mathematical module of the gimbal attitude adjustment module. The specific code of the gimbal attitude adjustment module is:
[0094] function theta = simulate_gimbal_pid(Kp, Ki, Kd,t)
[0095] % Kp, Ki, Kd - PID controller parameters
[0096] % theta - gimbal angle response over time
[0097] % t simulation time
[0098] J = 0.01; % gimbal moment of inertia
[0099] Km = 1.2; % motor gain
[0100] ref = 1; % expected angle (unit: rad)
[0101] % Initialize variables
[0102] n = length(t);
[0103] e = zeros(1, n); % error
[0104] u = zeros(1, n); % Control quantity U(t)
[0105] theta = zeros(1, n); % angle theta(t)
[0106] dtheta = zeros(1, n); % angular velocity dθ / dt
[0107] integral = 0; % Initialize the integral term
[0108] for i = 2:n
[0109] % Current Error
[0110] e(i) = ref - theta(i-1);
[0111] % Integral Item
[0112] integral = integral + e(i) * (t(i) - t(i-1));
[0113] % differential term
[0114] derivative = (e(i) - e(i-1)) / (t(i) - t(i-1));
[0115] % PID controller output U(t)
[0116] u(i) = Kp * e(i) + Ki * integral + Kd * derivative;
[0117] % System dynamics formula: J * θ'' = Km * U(t)
[0118] ddtheta = (Km * u(i)) / J;
[0119] % Update angular velocity and angle (numerical integration)
[0120] dtheta(i) = dtheta(i-1) + ddtheta * (t(i) - t(i-1));
[0121] theta(i) = theta(i-1) + dtheta(i) * (t(i) - t(i-1));
[0122] end end.
[0123] Furthermore, simulink is used to construct a simulation model, including: position acquisition module, angle calculation module, PID controller module, improved enzyme action optimization algorithm module, gimbal attitude adjustment module, and gimbal real-time position detection module. The improved enzyme action optimization algorithm module calls the code of the improved enzyme action optimization algorithm in MATLAB, and the gimbal attitude adjustment module calls the simulate_gimbal_pid(Kp, Ki, Kd, t) function to simulate the operation of the system and set the controlled field of the system to a second-order Laplace transfer function, specifically , s represents the variable in the complex frequency domain. In the main function, the initial parameters of the original algorithm and the improved algorithm are set. The maximum number of iterations max_iter is set to 20 times, the problem dimension dim is set to 3, the population size is set to 100, the search space upper limit ub is set to 100, and the lower limit lb is set to 0.001. The codes of the original algorithm and the improved algorithm are called in sequence. The set of parameters obtained by optimization is input into the simulation model for control. The control error is returned to calculate the fitness value. The algorithm is sorted according to the size of the fitness value. A set of optimal control parameters is obtained under the specified number of iterations to control the robotic arm pan-tilt control system. Figure 3-Figure 4 They are respectively a comparison diagram of the fitness value changes during the optimization process of the improved enzyme action optimization algorithm and the original enzyme action optimization algorithm, and a comparison diagram of the responses of the PID controller in the robotic arm pan-tilt control system optimized by the improved enzyme action optimization algorithm and the original enzyme action optimization algorithm.
[0124] Furthermore, from Figure 3 It can be seen that the fitness value of the improved enzyme optimization algorithm changes more frequently during the optimization process, indicating that the algorithm has a stronger adjustment ability. When it falls into a local optimal solution, it can jump out and continue to optimize in a very short number of iterations. The fitness value of the solution finally found is smaller, and the optimization accuracy is better. The target value of the control is set to 1 unit. Figure 4 It can be seen that the response curve of the PID controller in the robotic arm gimbal control system optimized by the original enzyme action optimization algorithm has a large overshoot and many oscillations near the target value. The response curve of the PID controller in the robotic arm gimbal control system optimized by the improved enzyme action optimization algorithm has better stability, smaller overshoot, and can quickly stabilize near the target value. In actual control scenarios, the robotic arm gimbal optimized by the improved enzyme action optimization algorithm can quickly and stably adjust to the target position to grasp objects, and has stronger adaptability and robustness.
Claims
1. A dynamic adaptive control method for a robotic arm pan / tilt platform, characterized in that: The specific steps are as follows: Step 1: Construct a robotic arm pan-tilt control system, which includes: a position acquisition module, an angle calculation module, a PID controller module, an improved enzyme action optimization algorithm module, a pan-tilt attitude adjustment module, and a pan-tilt real-time position detection module; Step 2: Improve the enzyme action optimization algorithm. The specific improvements include: S1. The adaptive factor (AF) of the enzyme optimization algorithm is updated through an adaptive adjustment mechanism based on local gradients. This mechanism combines the local gradient information of individuals in the population and the changes in the diversity entropy of the search space to provide real-time feedback and adjust the size of the adaptive factor (AF) during the optimization process. S2. A trajectory perturbation-induced position update strategy is used to improve the mathematical model of the position update of the second substrate in the enzyme action optimization algorithm. This strategy starts from the non-Euclidean orbital path evolution and the control perturbation field generation mechanism, simulates the dynamic path of the enzyme changing the substrate through the conformational channel, and maps it into the transition trajectory of the individual position path in the algorithm. The individual position is updated by generating a non-dynamic enzyme potential field factor U(iter) and a perturbation factor T(iter). The search space is regarded as a non-Euclidean orbit. Each individual follows the local energy orbit propagation in the space. Instead of directly updating the individual position, a non-dynamic enzyme potential field factor U(iter) and a perturbation factor T(iter) are constructed. The individual moves along the perturbation dynamic transition path in the perturbation orbit. The non-dynamic enzyme potential field factor U(iter) and the perturbation factor T(iter) are shown in Equations (5) and (6): (5); In formula (5), N represents the number of individuals in the population, rand represents a random number between [0, 1], f represents the fitness value of the current individual position, exp() represents the exponential calculation function, iter represents the current iteration number, X(iter) represents the current individual position, X(iter-1) represents the position of the individual at the previous iteration number, σ(iter) represents the expansion scale of the iteration stage, σ(iter) = iter / max_iter, and max_iter represents the maximum number of iterations; (6); In formula (6), K represents the number of disturbance terms, which is 5, exp() represents the exponential calculation function, iter represents the current number of iterations, fk represents the frequency of the disturbance term, which is in the range of [1, 3], Xk represents the inner product of the current individual position vector and the average position vector of the individuals in the population, and d represents the disturbance direction, which is a random number between [-1, 1]. Then, the step length control factor y for individual position update is set, y=ymax / 1+log(1+iter), ymax represents the maximum step length, and its value is (ub-lb) / 2, ub represents the upper limit of the search space, and lb represents the lower limit of the search space. As the number of iterations increases, the value of y decays. Combining all the mathematical models constructed by the above strategy, the individual position is updated. The specific update formula is shown in formula (7): (7); In formula (7), X(iter+1) represents the updated individual position, X(iter) represents the current individual position, y represents the step size control factor, U(iter) represents the non-dynamic enzyme potential field factor, and T(iter) represents the perturbation factor; Step 3: Obtain the error between the current position and the target position of the manipulator gimbal, calculate the angle error that the gimbal needs to adjust, and optimize the control parameters of the PID controller module of the manipulator gimbal control system through the improved enzyme action optimization algorithm to obtain the optimal set of control parameters. The specific steps are as follows: Step 1: Initialize the parameters of the improved enzyme optimization algorithm, including the number of individuals in the population N, the problem dimension dim, the maximum number of iterations max_iter, the upper limit of the search space ub, and the lower limit of the search space lb; Step 2: Map the improved enzyme action optimization algorithm with the PID controller module in the constructed robotic arm pan-tilt control system. Specifically, the optimization process of the improved enzyme action optimization algorithm is combined with the parameter tuning of the PID controller. The problem dimension dim=3 of the improved enzyme action optimization algorithm. The position of each individual contains three dimensions corresponding to the three parameters Kp, Ki, and Kd of the PID controller. , 、 、 Represents the components of the individual position vector in three dimensions, inputs the parameters obtained by each algorithm optimization into the PID controller and returns the real-time error value e(t) of the control, and calculates the fitness value of each group of parameters through the fitness value function as the optimization indicator; Step 3: Set the fitness value function of the improved enzyme optimization algorithm, calculate the fitness value of individuals in the initial population through the fitness value function, sort them according to the fitness value, and select the position of the optimal individual. The specific fitness value function is: (8); In formula (8), J represents the fitness value, e(t) represents the real-time error, and T represents the system running time; Step 4: Update the individual positions in the population through the mathematical model of the improved enzyme action optimization algorithm, and sort the updated population according to the fitness value; Step 5: Determine whether the current number of iterations has reached the maximum number of iterations. If not, return to step 4 for optimization. If it has, complete the algorithm optimization and output the optimal solution. Step 4: Input a set of optimal control parameters obtained in step 3 into the PID controller, and adjust the robotic arm gimbal to reach the target angle through the control quantity output by the PID controller.
2. A method for dynamic adaptive control of a robotic arm pan / tilt platform according to claim 1, characterized in that: In the robotic arm gimbal control system constructed in the step 1, the position acquisition module obtains the current position information and target position information of the gimbal, the angle calculation module calculates the angle error e(t) that needs to be adjusted for the gimbal through the current position and target position obtained by the position acquisition module, and the PID controller module optimizes the control parameters using the improved enzyme action optimization algorithm module through the angle error e(t), and inputs the optimized control quantity U(t) into the gimbal attitude adjustment module. The gimbal attitude adjustment module adjusts the angle of the gimbal by driving the gimbal motor to make it reach the target position. During the control process, the gimbal real-time position detection module updates the gimbal position in real time and feeds back to the position acquisition module for real-time adjustment.
3. The method for dynamic adaptive control of a robotic arm pan / tilt platform according to claim 2, characterized in that: In the S1, an adaptive adjustment mechanism based on local gradient is used to update the adaptive factor AF of the enzyme action optimization algorithm. First, the local gradient XT is calculated. The local gradient is determined by the difference between the current individual's position and the optimal position in the population and the fitness value of the current individual's position and the fitness value of the optimal position. Then, the entropy change of the search space is introduced, that is, the diversity of the current solution is evaluated by calculating the distribution entropy H of the current individual. Finally, based on the feedback of the local gradient and entropy change, the value of the adaptive factor AF is dynamically adjusted. If the values of the local gradient and the distribution entropy H become larger, it means that the range of the current solution space is wide. At this time, the value of the adaptive factor AF is increased. If the values of the local gradient and the distribution entropy H become smaller, it means that the local convergence and the diversity are reduced. In this case, the value of the adaptive factor AF is reduced. The specific update formula of AF is shown in formula (3): (3); In formula (3), AF represents the adaptive factor, r1 and r2 represent the adjustment factors, r1 is 0.4, r2 is 0.6, XT represents the local gradient, , f represents the fitness value of the current individual position, represents the fitness value of the best individual in the population, X(iter) represents the current individual position, Represents the optimal individual position, H represents the distribution entropy. The specific calculation formula is shown in formula (4); (4); In formula (4), N represents the number of individuals in the population, ω represents the distribution weight value, which is a random number between [0,1], exp() represents the exponential calculation function, and X(iter) represents the current individual position. represents the optimal individual position, h0 represents the initial bandwidth, which is 0.5, and r represents the adjustment coefficient, which is 1.
2. represents the value of the distribution entropy of the previous iteration, It represents the maximum value of the distribution entropy. The algorithm is to optimize the three parameters of the PID controller and set the maximum value of the distribution entropy to the problem dimension value 3.
Citation Information
Patent Citations
Control method and device based on enzyme number value structure and readable storage medium
CN107807669A
Serum specimen typing identification system based on patient centralized detection
CN119480111A