Mechanical arm visual servo control method and system based on adaptive gain observer

By combining an adaptive gain observer with DDPG, EKF, and ESO, the Kalman gain is dynamically corrected, which solves the problems of state estimation lag and inaccurate disturbance estimation in visual servoing technology in dynamic target tracking scenarios, and improves the control accuracy and stability of the robotic arm visual servoing system.

CN123129208APending Publication Date: 2026-11-20QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611638061.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-22
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing visual servoing technology, in dynamic target tracking scenarios, is affected by factors such as visual measurement noise, partial occlusion, illumination changes, hand-eye calibration errors, robotic arm parameter drift, and external disturbances, resulting in lagging state estimation and inaccurate disturbance estimation, which affects tracking accuracy and stability.

Method used

An adaptive gain observer is constructed by combining the Deep Deterministic Policy Gradient Algorithm (DDPG), Extended Kalman Filter (EKF), and Extended State Observer (ESO) to dynamically adjust the Kalman gain, thereby improving the accuracy of state estimation and disturbance estimation. Furthermore, robust predictive control is used to compensate for the impact of disturbances.

Benefits of technology

It improves the control precision, robustness, and stability of the robotic arm's vision servo system, enhances its real-time performance and safety in complex environments, and ensures the accuracy and stability of dynamic target tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129208A_ABST
    Figure CN123129208A_ABST
Patent Text Reader

Abstract

The application relates to the field of robot vision servo and intelligent control, and discloses a mechanical arm vision servo control method and system based on an adaptive gain observer. The method comprises the following steps: acquiring target vision information and determining a pose error; establishing a vision servo discrete state model; performing extended Kalman filter prior prediction based on a last-period posterior estimation and control input to obtain a prior estimation, a new increment, a predicted covariance and a benchmark gain; constructing a reinforcement learning state based on the new increment, the predicted covariance, a vision servo error and the last-period control input, outputting a Kalman gain correction amount through a deep deterministic policy gradient algorithm, fusing the benchmark gain to obtain an actual gain; updating the pose state posterior estimation according to the actual gain; constructing an observer expansion state according to the posterior estimation and a lumped disturbance, and recursively obtaining a lumped disturbance estimation; and generating a joint control instruction to drive the mechanical arm. The application can dynamically correct the Kalman gain, improve the state and disturbance estimation accuracy and the system robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot visual servoing and intelligent control technology, specifically to a visual servoing control method and system for a robotic arm based on an adaptive gain observer. Background Technology

[0002] Visual servoing technology acquires target images, features, or pose information through a camera and generates control commands based on the deviation between the current visual state and the desired visual state, enabling the robotic arm's end effector to track the target's movement. In dynamic target tracking scenarios, factors such as visual measurement noise, partial occlusion, lighting variations, hand-eye calibration errors, robotic arm parameter drift, joint friction, end-effector load changes, and external disturbances can cause deviations between the system model and the actual operating state. This leads to lag in state estimation, inaccurate disturbance estimation, and insufficient control compensation, affecting the tracking accuracy and closed-loop stability of visual servoing.

[0003] Existing technologies typically employ extended Kalman filters, extended state observers, sliding mode observers, or adaptive filtering methods to estimate the visual servo state or external disturbances of robotic arms. The gain of the extended Kalman filter is usually determined based on preset noise parameters, making it difficult to adjust in a timely manner when noise characteristics, model errors, or external disturbances change. Existing adaptive methods often focus on adjusting noise covariance, observer parameters, or outer-loop control parameters, making it difficult to directly correct the measurement update weights of the extended Kalman filter based on changes in information and control effects within the visual servo closed loop. Other estimation methods often rely on manually tuned parameters, making it difficult to balance state estimation response speed, noise suppression capability, and disturbance estimation accuracy. This results in visual servo systems struggling to consistently obtain accurate state and disturbance estimates under complex operating conditions, limiting the control accuracy and stability of dynamic target tracking. Summary of the Invention

[0004] To address the shortcomings of existing technologies, the present invention aims to provide a visual servo control method and system for robotic arms based on an adaptive gain observer. This invention can integrate visual measurement information, filtering information, and system operating status to dynamically correct the Kalman gain of the extended Kalman filter. When noise changes, model mismatches, or external disturbances occur, it improves the accuracy of state estimation and disturbance estimation, and utilizes the disturbance estimation results to implement control compensation, thereby enhancing the control accuracy, robustness, and stability of the robotic arm visual servo system.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a visual servo control method for a robotic arm based on an adaptive gain observer is provided, including: Acquire visual information about the target and determine the pose error; A visual servo discrete state model is established based on the pose error, control input, and lumped disturbance. Based on the posterior estimate of the pose state and the control input of the previous control cycle, extended Kalman filtering prior prediction is performed to obtain the prior estimate of the pose state, innovation, prediction covariance and baseline Kalman gain of the current control cycle. The reinforcement learning state is constructed based on the innovation, prediction covariance, visual servoing error, and control input of the previous control cycle. The Kalman gain correction is output through the deep deterministic policy gradient algorithm. The Kalman gain correction is fused with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. The pose state prior estimate of the current control cycle is updated by extended Kalman filtering based on the actual Kalman gain to obtain the pose state posterior estimate of the current control cycle. The observer extended state is constructed based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated. The extended state is then recursively updated to obtain the lumped disturbance estimate for the current control cycle. Based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle, corresponding joint control commands are generated to drive the robotic arm to move.

[0006] Secondly, a vision servo control system for a robotic arm based on an adaptive gain observer is provided, including: The visual information acquisition module is configured to: acquire target visual information and determine pose error; The state model construction module is configured to: establish a visual servo discrete state model based on the pose error, control input, and lumped disturbance; The prior prediction module is configured to perform extended Kalman filter prior prediction based on the posterior estimate of the pose state and the control input of the previous control cycle, and obtain the prior estimate of the pose state, innovation, prediction covariance and reference Kalman gain of the current control cycle. The adaptive gain correction module is configured to: construct a reinforcement learning state based on innovation, prediction covariance, visual servo error and control input of the previous control cycle; output Kalman gain correction amount through deep deterministic policy gradient algorithm; and fuse Kalman gain correction amount with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. The posterior update module is configured to: update the prior estimate of the pose state of the current control cycle by extended Kalman filtering based on the actual Kalman gain, so as to obtain the posterior estimate of the pose state of the current control cycle. The disturbance estimation module is configured to: construct the observer extended state based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated, recursively update the extended state, and obtain the lumped disturbance estimate for the current control cycle. The control command generation module is configured to generate corresponding joint control commands based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle, thereby driving the robotic arm to move.

[0007] Thirdly, an electronic device is also provided, comprising: Memory is used to store computer-readable instructions in a non-transitory manner. Processor, for executing the computer-readable instructions, When the computer-readable instructions are executed by the processor, they perform the method described in the first aspect above.

[0008] Fourthly, a computer-readable storage medium is provided having a program stored thereon that, when executed by a processor, implements the method described in the first aspect above.

[0009] Fifthly, a computer program product is provided, employing the following technical solution: A computer program product includes software code, wherein a program in the software code performs the steps of the method described in the first aspect of the present invention.

[0010] The above technical solution has the following advantages or beneficial effects: This invention combines the Deep Deterministic Policy Gradient (DDPG), the Extended Kalman Filter (EKF), and the Extended State Observer (ESO) to construct an adaptive gain observer for position-based visual servoing (PBVS) robotic arm systems. The EKF is responsible for prior prediction, innovation calculation, covariance prediction, and posterior update of the visual servo state, ensuring that the state estimation process has a clear model basis and interpretability. The DDPG, on the other hand, outputs a Kalman gain correction online based on the current innovation, historical innovation, prior covariance, visual servo error, and the previous control input. This correction is used to adjust the baseline Kalman gain of the EKF, enabling the EKF to adaptively adjust the measurement update weights according to visual measurement quality, model prediction error, and closed-loop operation status. This improves the accuracy and responsiveness of the visual servo system under scenarios of noise variation, model mismatch, and dynamic target tracking, and provides an accurate and smooth posterior estimate of the visual servo state for the ESO to perform lumped disturbance estimation.

[0011] This invention employs a hierarchical estimation method for state and disturbances, cascading EKF and ESO. The posterior estimate of the visual servo state output by the EKF is input into the ESO, and the visual servo state and lumped disturbance are recursively updated together as an extended state within the ESO. This allows for the simultaneous tracking of the EKF's posterior state estimate and the acquisition of the lumped disturbance estimate. The lumped disturbance can characterize factors such as unmodeled dynamics, robot arm parameter uncertainties, joint friction, end-effector load variations, external contact disturbances, hand-eye calibration errors, and local linearization errors. DDPG does not directly output disturbance compensation or generate robot arm control commands. Instead, it improves the EKF's estimation of the visual servo state by modifying the Kalman gain and further enhances the accuracy of the ESO disturbance estimate. The final disturbance estimate used for compensation explicitly derives from the disturbance state estimate in the ESO's extended state. This approach avoids the uncertainties introduced by reinforcement learning directly intervening in the underlying control, while simultaneously improving the smoothness, robustness, and engineering controllability of the state and disturbance estimates.

[0012] This invention combines the posterior estimate of pose state output by the EKF, the lumped disturbance estimate output by the ESO, and Tube Model Predictive Control (Tube-MPC) to form a composite control structure of "nominal predictive control, Tube error feedback, and disturbance feedforward compensation." The robust predictive control module solves for the nominal control quantity based on the unperturbed nominal model, the desired pose, and the prediction time domain. The Tube error feedback generates a correction quantity based on the deviation between the posterior estimate of pose state from the EKF and the nominal state. The disturbance feedforward compensation utilizes the lumped disturbance estimate output by the ESO to compensate for disturbance effects during the control command generation stage. These three parts work together to enable the robotic arm to operate near the nominal trajectory even when visual measurement noise, target motion changes, external disturbances, or model uncertainties exist, improving the stability, constraint satisfaction, and disturbance rejection performance of the PBVS tracking process.

[0013] This invention constitutes a complete closed-loop control process for a robotic arm's visual servoing, encompassing visual measurement, state construction, EKF estimation, DDPG gain correction, disturbance compensation, robust predictive control, motion mapping, and joint actuation. Motion mapping relationships between the image space, camera coordinate system, end effector coordinate system, and robot base coordinate system are established through camera calibration and hand-eye calibration. The velocity commands generated by PBVS are converted into joint motion commands using the robotic arm's Jacobian matrix. This invention not only improves pose estimation and control accuracy in dynamic target tracking but also enhances the real-time performance, safety, and overall robustness of the robotic arm's visual servoing system in complex industrial environments. Attached Figure Description

[0014] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0015] Figure 1 This is a flowchart of a robotic arm visual servo control method based on an adaptive gain observer in a specific embodiment of the present invention; Figure 2 This is a flowchart of the visual servo control algorithm in a specific embodiment of the present invention; Figure 3 This is a diagram of the adaptive gain structure based on kernel features in a specific embodiment of the present invention; Figure 4 This is a flowchart of the reinforcement learning DDPG algorithm in a specific implementation of the present invention; Figure 5 This is a block diagram of the Tube-MPC controller structure in a specific embodiment of the present invention; Figure 6 This is a closed-loop information interaction diagram of the visual servoing system in a specific embodiment of the present invention. Detailed Implementation

[0016] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0017] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments of the invention. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0018] In this embodiment of the invention, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of this invention, "multiple" refers to two or more.

[0019] Furthermore, to facilitate a clear description of the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0020] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0021] All data acquisition in this embodiment is carried out in compliance with laws and regulations and with user consent, and the data is used legally.

[0022] Example 1 like Figure 1 and Figure 2 As shown, this embodiment provides a visual servo control method for a robotic arm based on an adaptive gain observer, including: S101: Acquire target visual information and determine pose error; S102: Establish a visual servo discrete state model based on the pose error, control input, and lumped disturbance; S103: Based on the posterior estimate of the pose state and the control input of the previous control cycle, perform extended Kalman filter prior prediction to obtain the pose state prior estimate, innovation, prediction covariance and baseline Kalman gain of the current control cycle. S104: Construct a reinforcement learning state based on the innovation, prediction covariance, visual servo error and control input of the previous control cycle, output the Kalman gain correction amount through the deep deterministic policy gradient algorithm, and fuse the Kalman gain correction amount with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. S105: Based on the actual Kalman gain, the prior estimate of the pose state in the current control cycle is updated by extended Kalman filtering to obtain the posterior estimate of the pose state in the current control cycle. S106: Construct the observer extended state based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated, and recursively update the extended state to obtain the lumped disturbance estimate for the current control cycle. S107: Generate corresponding joint control commands based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle to drive the robotic arm to move.

[0023] Step S101 is as follows: S101.1: Before acquiring target visual information, visual calibration and hand-eye calibration must be performed first. The camera is mounted at the end of the robotic arm in a hand-eye configuration.

[0024] Multiple sets of calibration board images were acquired, and the camera intrinsic parameter matrix was obtained using a camera calibration algorithm. With extrinsic matrix :

[0025] in,( ( ) is the camera focal length, ( () represents the coordinates of the origin of the image coordinate system in the pixel coordinate system, and the extrinsic parameter matrix includes the rotation matrix. With translation matrix This represents the spatial attitude mapping relationship between the camera coordinate system and the world coordinate system.

[0026] Control the robotic arm to drive the end-effector camera along a preset trajectory and record the pose matrix of the robotic arm's end effector. (Joint angles are obtained through joint encoders and calculated using a kinematic model) and the pose matrix of the calibration plate in the camera coordinate system. (Obtained by acquiring images of the calibration board using a camera, and calculated using the camera intrinsic parameter matrix and pose solving algorithm), and based on the hand-eye calibration equation. Finally, the camera coordinate system is determined. coordinate system of the robotic arm end effector Transformation matrix between The transformation matrix can be represented as:

[0027] in, This represents the homogeneous transformation matrix from the camera coordinate system obtained through hand-eye calibration to the coordinate system at the end of the robotic arm; Indicates the camera coordinate system Transform the point, velocity, or pose error to the coordinate system of the robotic arm's end effector. Coordinate transformation relationship; Camera coordinate system To the end-effector coordinate system The rotation matrix is ​​used to describe the attitude relationship between the two coordinate systems; The origin of the camera coordinate system is located in the coordinate system at the end of the robotic arm. The translation vector is used to describe the positional relationship between the origins of two coordinate systems.

[0028] S101.2: During the operation of the robotic arm, the vision sensor continuously acquires images or depth data containing the target object. A visual detection algorithm is used to extract the target's corner points, contours, key points, or feature descriptors. Combined with depth information or the perspective n-point (PnP) algorithm, the current 3D pose of the target relative to the camera coordinate system is estimated. In this embodiment, the visual detection algorithm can employ Shi-Tomasi corner detection, Canny edge detection, HSV color thresholding, or the SuperPoint algorithm.

[0029] S101.3: Obtain the corresponding pixel coordinates in the image coordinate system by extracting the key corner points or feature points of the target object. By combining the depth camera's ranging function or depth estimation algorithm, the depth of the pixel in the camera coordinate system can be obtained. And based on the camera intrinsic parameter matrix The calculation relationship for backprojecting two-dimensional pixels into three-dimensional point coordinates in the camera coordinate system is as follows:

[0030] in, This indicates that the feature point is located at the lower edge of the camera coordinate system. The three-dimensional coordinate components of the direction, This indicates that the feature point is located at the lower edge of the camera coordinate system. The three-dimensional coordinate components of the direction, This indicates that the feature point is located at the lower edge of the camera coordinate system. The three-dimensional coordinate components of the direction, This represents the depth value of the feature point in the camera coordinate system. For the camera intrinsic parameter matrix, This represents the horizontal pixel coordinates of the feature point in the image pixel coordinate system. This represents the vertical pixel coordinates of the feature point in the image pixel coordinate system.

[0031] By combining the camera extrinsic matrix or hand-eye calibration matrix, the following coordinate transformation is performed to unify the 3D point to the robot base coordinate system or world coordinate system:

[0032] in, This indicates that the feature point lies along the lower edge of the robot base coordinate system. The three-dimensional coordinate components of the direction, This indicates that the feature point lies along the lower edge of the robot base coordinate system. The three-dimensional coordinate components of the direction, This indicates that the feature point lies along the lower edge of the robot base coordinate system. The three-dimensional coordinate components of the direction, Indicates from the camera coordinate system To the robot base coordinate system The homogeneous transformation matrix.

[0033] S101.4: Based on the 3D coordinates of multiple key feature points, the current pose matrix of the target object relative to the camera coordinate system can be obtained through PnP pose solving, point cloud registration, or rigid body pose estimation methods. The pose matrix includes the target's position vector and rotational attitude parameters. In PBVS, the current pose state is defined. for:

[0034] in, Let be the three-dimensional translation vector of the target in the camera frame. The axis-angle vector describing the relative rotation, Unit axis of rotation It represents the rotation angle.

[0035] After obtaining the three-dimensional coordinates of the target object, the end-effector grasping posture can be set according to the actual task requirements to form the desired pose matrix. .

[0036] The current pose matrix With the desired pose matrix By comparison, the pose error in position-based visual servoing can be obtained. :

[0037] Step S102 is as follows: Due to the desired pose matrix It is static, that is... We can obtain:

[0038] The mapping relationship between the pose state change rate and the camera velocity in its own coordinate system is established using the position Jacobian matrix:

[0039] in, Let be the rate of change of pose. Let the velocity of the camera be in its own coordinate system. The PBVS interaction matrix is ​​given by the following formula:

[0040] in, It is a third-order identity matrix. and They represent vectors respectively and The constructed skew-symmetric matrix It is a 3×3 zero matrix.

[0041] The sum of unmodeled dynamics and external disturbances is defined as the lumped disturbance. Control input Select the generalized velocity command in the camera coordinate system Therefore, the PBVS system can be written as a first-order affine nonlinear system:

[0042]

[0043] in, Let be the pose state matrix of the target. For the PBVS interaction matrix, The perturbation input distribution matrix, For process noise, Given the observed function, The pose information measured by the vision sensor. The noise is measured and follows a Gaussian distribution with a mean of 0 and a covariance of R.

[0044] Considering the discrete characteristics of the control system (sampling period is...) Using the Euler method to discretize the above equation, we obtain the PBVS discrete state model with lumped disturbances as follows:

[0045] in, and These represent the target pose state matrices in discrete states. The sampling period is Let PBVS interaction matrix be in discrete state. For control input in discrete states, This represents the lumped disturbance in a discrete state. This refers to noise in discrete processes. This represents the pose information measured by the visual sensor in a discrete state. Let be the observation function in discrete state. This is for discrete measurement noise.

[0046] Step S103 is as follows: Based on the posterior estimate of the pose state from the previous control cycle and the control input from the previous control cycle, an extended Kalman filter prior prediction is performed. The specific steps are as follows: (1) Prior prediction: Calculate the prior estimate of the pose state in the current control cycle:

[0047] Calculate the predicted covariance:

[0048] in, Indicates the first Prior estimates of pose state for each control cycle; Indicates the first Positive estimate of pose state for each control cycle; This indicates the control input from the previous control cycle; This represents the pose state transition function; This represents the prediction covariance matrix for the current control cycle; Represents the posterior covariance matrix of the previous control cycle; pose state transition function The first-order Jacobian matrix relating to the pose state; To expand the process noise covariance matrix.

[0049] Calculate the new information for the current control cycle:

[0050] The theoretical information covariance is:

[0051] The reference Kalman gain for the current control cycle is:

[0052] in, This is the current visual measurement value. For the observation function, Let be the first-order Jacobian matrix of the observation function with respect to the state.

[0053] (2) Posterior estimation:

[0054]

[0055]

[0056] in, For gain projection or limiting operators, This is the correction amount for the Kalman gain. It is the identity matrix. To measure the noise covariance.

[0057] The posterior estimation serves as an update and correction step, connecting with the prior prediction and executing cyclically.

[0058] Step S104 is as follows: like Figure 3 As shown, a reinforcement learning state is constructed based on the innovation generated by the extended Kalman filter in the current control cycle, the prediction covariance, the visual servo error, and the control input from the previous control cycle. The deep deterministic policy gradient algorithm learns the correction amount of the Kalman gain online based on the deviation between the current prediction of the extended Kalman filter and the visual observation, thereby improving the estimation performance of the extended Kalman filter for the state. The specific steps are as follows: S104.1: Construct the DDPG state input. The innovation calculated by the extended Kalman filter in the current control cycle is... The previous control cycle of new information The prediction covariance matrix for the current control cycle is: Pose error The control input for the previous control cycle was Then the state input of DDPG can be represented as:

[0059] in, Indicates will Vectors formed by expanding by column or in a preset order express The traces.

[0060] To obtain nonlinear features with fixed dimensions, during the offline pre-training phase, features are selected from historical reinforcement learning states. Using representative states as kernel centers, construct a kernel center dictionary. . No. In each control cycle, the similarity between the current reinforcement learning state and the Gaussian kernel of each kernel center is calculated and arranged in a preset order to obtain the kernel feature vector:

[0061]

[0062] in, For the first Each core center, and Having the same dimensions; The width of the kernel function; For inclusion Feature vectors with kernel similarity. and The common input DDPG network is denoted as The semicolon indicates concatenation along the column vector direction.

[0063] During online execution, kernel features are first calculated using the current kernel center dictionary to generate actions. If the maximum similarity between the current state and all kernel centers is lower than a preset threshold, the earliest added kernel center is replaced with the current state for use in the next control cycle; otherwise, the dictionary remains unchanged. The dictionary is always retained. Each core center fixes the input dimension of the network.

[0064] S104.2: The Actor network outputs continuous actions. DDPG's Actor network uses the first... Reinforcement learning state in each cycle and its kernel eigenvectors For common input, output continuous action By superimposing exploration noise onto the policy output of the Actor network, the gain adjustment action actually used in the current control cycle is obtained:

[0065] in, The deterministic policy function representing the behavior of the Actor network; For the behavior Actor network parameters; This represents the exploration noise during the k-th control cycle.

[0066] During the target value calculation phase, the target Actor network calculates the target value based on the reinforcement learning state of the next control cycle. Generate target action:

[0067] in, Denotes the policy function of the target Actor network. For the target Actor network parameters, The kernel features are obtained for the corresponding state under the kernel center dictionary used in this calculation. The next cycle target action is used to calculate the temporal difference target value for the target Critic network.

[0068] Under ideal filtering conditions, the innovation sequence should be approximately zero-mean, approximately autocorrelated, and its covariance should match the theoretical innovation covariance as white noise. When the model contains unmodeled perturbations, noise statistical mismatch, or inappropriate gain, the innovation typically exhibits mean shift, increased energy, or enhanced temporal correlation. Therefore, this embodiment uses innovation whitening as the optimization method for DDPG. The main feedback signal. The reward function can be designed as follows:

[0069] Among them, the first item Suppressing new energy, the second item Suppressing the mean deviation of new information, the third term Suppressing autocorrelation of new information, the fourth term Suppressing excessive gain correction actions, item 5 Constraining visual servo error; , , , and All weights are non-negative.

[0070] The aforementioned reward function unifies the filtering effect of the extended Kalman filter, the visual servo tracking error, and the gain correction magnitude into a reinforcement learning feedback signal, ensuring that the learning objective of DDPG remains consistent with the state estimation, disturbance estimation, and closed-loop control objectives of this embodiment. Specifically, when the Kalman gain is set improperly, the innovation sequence typically exhibits increased energy, mean shift, or enhanced temporal correlation, leading to a corresponding increase in the visual servo error. DDPG adjusts the continuous actions output by the Actor network based on this reward feedback. This, in turn, changes the Kalman gain correction. This makes the actual Kalman gain after fusion... It is better adapted to changes in current measurement noise, model error, and perturbation. Based on this feedback mechanism, DDPG can achieve [the following network training process] to [adapt to changes in measurement noise, model error, and perturbation]. Continuous optimization: like Figure 4 As shown, the adaptive gain learning network includes an Actor network, a Critic network, a target Actor network, a target Critic network, and an experience replay memory. The Actor network is used to adjust the learning state based on the reinforcement learning state. and its kernel feature output continuous action The Kalman gain correction of the extended Kalman filter is obtained by mapping the continuous actions. The Critic network is used to evaluate the long-term reward corresponding to the current reinforcement learning state and gain correction actions, so as to guide the Actor network update.

[0071] DDPG employs a training method that combines offline pre-training with online fine-tuning. In the offline pre-training phase, training samples are first collected from a robotic arm vision servo simulation environment, historical experimental data, or a safety-constrained experimental platform. Each sample is generated based on the current reinforcement learning state. Actions output by the Actor network Reward Value and the reinforcement learning state in the next control cycle Composition, that is, expressed as The data is stored in the experience playback memory. Through offline pre-training, the Actor network learns in advance to output reasonable Kalman gain correction actions under different visual measurement noise, prediction covariance, pose tracking error, and control input history conditions, thereby avoiding drastic changes in EKF gain caused by random exploration during the initial operation phase of the system.

[0072] During the online operation phase, in each control cycle First, based on the current control cycle information The previous control cycle's new information is The prior covariance matrix of the current control cycle Position error and the control input of the previous control cycle Constructing reinforcement learning states Calculate the corresponding kernel features Both are input into the Actor network, and the Actor network outputs the action. The Kalman gain correction is obtained through mapping. .

[0073] Correction amount via gain projection or limiting operator After processing, the Kalman gain is compared with the baseline. The Kalman gain is fused to obtain the actual Kalman gain used for posterior updates in the current period. After completing the EKF a posteriori update and visual servo control, the reward value is calculated based on the innovation whitening degree, visual servo error, and gain correction magnitude of the current control cycle. and the sample Added to the experience playback memory.

[0074] To balance real-time performance and learning stability, online fine-tuning does not require updating network parameters in every control cycle. Instead, it updates parameters every M control cycles by randomly sampling a batch of training samples from the experience replay memory. The Critic network updates its parameters by minimizing the temporal difference error, and the objective value can be expressed as:

[0075] The loss function of the Critic network is:

[0076] in, For the first The reinforcement learning states in each training sample For the corresponding gain correction action, For the corresponding reward value, To reinforce learning in the next cycle, For the action value function of the Critic network, Let the action value function be the target Critic network. Let the policy function of the target Actor network be... For Critic network parameters, For the target Critic network parameters, This is the discount factor.

[0077] Furthermore, mini-batch data containing N samples is randomly sampled from the experience replay memory to update the parameters of the Critic network, Actor network, and the corresponding target network.

[0078] For the Critic network, it reduces the target value Compared with the current action value estimate The parameters are updated using the temporal difference error between the parameters. The Critic network loss function is based on the parameters. The gradient can be expressed as:

[0079] Therefore, the Critic network parameters are updated using gradient descent as follows:

[0080] in, Let N be the learning rate of the Critic network, and N be the number of mini-batch samples. Through this update process, the Critic network can improve its understanding of reinforcement learning states. With gain correction action The accuracy of the corresponding long-term return assessment.

[0081] After the Critic network completes its update, the Actor network updates itself based on the gradient of the action-value function with respect to the action from the Critic network, making its output actions more conducive to increasing cumulative rewards. The policy gradient of the Actor network can be expressed as:

[0082] in, For Actor network parameters, This is the policy function for the Actor network.

[0083] To improve training stability, the target Actor network and the target Critic network employ a soft update mechanism, allowing the target network parameters to slowly follow changes in the online network parameters.

[0084]

[0085] in, For the target Actor network parameters, For the target Critic network parameters, This is the soft update coefficient.

[0086] S104.3: Map continuous actions to Kalman gain corrections. To ensure the DDPG output has the same dimensions as the Kalman gain matrix of the extended Kalman filter, the actions output by the Actor network are... Mapped to Kalman gain correction :

[0087] in, This indicates the current reinforcement learning state of the Actor network. and its nuclear characteristics A continuous action vector output under a common input; Indicated by The elements in the matrix form a diagonal matrix, which is used to adjust the correction amplitude of different gain channels respectively. and This is a preset or learnable gain mapping matrix.

[0088] S104.4: The reference Kalman gain is fused with the Kalman gain correction. The extended Kalman filter calculates the reference Kalman gain based on the prediction covariance and the measurement noise covariance. DDPG output This is used to correct the baseline gain, resulting in the actual Kalman gain used for posterior updates:

[0089] in, This represents the actual Kalman gain.

[0090] Step S105 is as follows: In the In each control cycle, EKF calculates the prior estimate of the current pose state based on the posterior estimate of the pose state at the previous moment and the current control input:

[0091] Current information on visual measurement is as follows:

[0092] The extended Kalman filter update is performed using the actual Kalman gain. Substituting into the extended Kalman filter posterior update process, we obtain the posterior estimate of the pose state for the current control cycle:

[0093] To enhance numerical stability, the covariance matrix is ​​updated using the Joseph form:

[0094] in, This is the posterior estimate of the pose state for the current control cycle. It is the identity matrix. Let be the first-order Jacobian matrix of the observation function with respect to the state. To measure the noise covariance.

[0095] Step S106 is as follows: The pose state posterior estimate of the current control cycle is obtained from the output of the extended Kalman filter. Afterwards, Together with the lumped disturbance to be estimated, they serve as the extended state of the extended state observer ESO.

[0096] Let the ESO expansion state be:

[0097] in, For the first The tracking amount of ESO on the pose error filtering state of PBVS during each control cycle. For the first The ESO's observations of the lumped disturbance during each control cycle.

[0098] ESO first estimates the expansion state and control input based on the previous control cycle, and then performs the current... Predicting the expansion state for each control cycle:

[0099]

[0100] in, This is the pose state transition function; This is the input for the previous control cycle. The sampling period is This is the disturbance input distribution matrix in the system model. The disturbance state is maintained at order zero within adjacent control cycles.

[0101] ESO first constructs the observation error based on the deviation between the posterior estimate of the pose state in the current control cycle output by the extended Kalman filter and the ESO state tracking quantity:

[0102] Based on the observation error, the pose state tracking value and disturbance tracking value of the ESO in the current control cycle are updated respectively:

[0103]

[0104] in, and These are the pose state update gain matrix and the perturbation state update gain matrix of the ESO, respectively.

[0105] Therefore, the ESO can obtain the lumped disturbance estimate for the current control cycle as follows:

[0106] Step S107 is as follows: S107.1: As Figure 5 As shown, control decisions are made based on the posterior estimate of the pose state and the lumped disturbance estimate to obtain the control input.

[0107] Based on an unperturbed nominal model, desired pose, and prediction time domain Construct the objective function Solve for the nominal control sequence and perform feedforward compensation by combining the lumped disturbance estimate from the ESO output.

[0108] Define an unperturbed nominal model and optimize the visual state tracking error and control input amplitude as the objective function. for:

[0109] in, In the first The first control cycle prediction obtained from the first control cycle Step visual state, This refers to the state quantity corresponding to the desired visual state or desired pose. This is the state weight matrix, used to adjust the ability to suppress visual servo tracking errors; The weighting matrix is ​​used to constrain and control the input amplitude. This is the terminal weight matrix, used to improve the convergence performance of predicting the terminal state in the time domain.

[0110] Under constraints such as end effector speed, joint angular velocity, joint angle, camera field of view, target visibility, and safe distance, the optimization problem is to minimize the objective function. And satisfy:

[0111]

[0112] The nominal control sequence is obtained after solving:

[0113] And the corresponding nominal state trajectory:

[0114] in, To control the time domain, This represents the nominal predictive control quantity actually used in the current control cycle. This represents the current nominal state under the unperturbed nominal model.

[0115] By analyzing the deviation between the actual and nominal states, a lower-level error feedback controller is designed. The final control input is obtained by fusing the nominal control input and the compensation control input. Calculate the posterior estimate of the actual pose state of PBVS With nominal state The deviation is used to obtain the error feedback compensation amount. :

[0116] in, By combining the discrete state equations of the actual system and the nominal system model, the dynamic equations of the error trajectory can be derived:

[0117] There exists an error set If the current actual state And the input obtained by Tube MPC optimization was applied. The actual state at the next moment It must fall within the next tube set. Therefore, the linear feedback gain is designed. To compensate for the control input Designed as follows:

[0118] in, The nominal control quantity generated for the Tube-MPC controller. This is the disturbance feedforward compensation amount. This is the Tube error feedback gain.

[0119] S107.2: For PBVS, the control input obtained in step S107.1 is the camera velocity command in the camera coordinate system, and its linear velocity and angular velocity are composed as follows:

[0120] in, For the control input of the kth control cycle The generalized velocity command corresponding to the camera coordinate system, i.e. ; The linear velocity in the camera coordinate system; ω is the angular velocity in the camera coordinate system.

[0121] Camera velocity in camera coordinate system End velocity converted to end effector coordinate system Because of the fixed hand-eye mounting relationship between the camera and the end effector, the velocity transformation between the camera coordinate system and the end effector coordinate system includes not only rotational transformation but also linear velocity coupling terms caused by the offset of the coordinate origin. Therefore:

[0122] in, Let be the rotation matrix from the camera coordinate system to the end effector coordinate system. Let be the translation vector of the camera coordinate system origin relative to the end effector coordinate system. It is a skew-symmetric matrix operator. Let... ,but:

[0123] Therefore, the overall mapping from camera velocity to end velocity can be written as:

[0124] in, Represents the translation vector In the end effector coordinate system Components along the axial direction; Represents the translation vector In the end effector coordinate system Components along the axial direction; Represents the translation vector In the end effector coordinate system The component along the axial direction.

[0125] End velocity in the end effector coordinate system End-effector velocity converted to robot base coordinate system .set up Let be the rotation matrix from the end effector coordinate system to the robot base coordinate system. Let be the translation vector of the origin of the end effector coordinate system relative to the robot's base coordinate system, then:

[0126] This formula is used to unify the end effector motion commands generated by PBVS into the robot's base coordinate system, which facilitates the subsequent solution of joint velocities using the Jacobian matrix of the robotic arm.

[0127] Based on the robot's velocity Jacobian matrix, the end effector velocity in the base coordinate system is... Mapped to robotic arm joint velocities:

[0128] in, For the robotic arm at the current joint position The velocity Jacobian matrix below, Let it be its generalized inverse matrix. To avoid abrupt changes in joint velocities near singular configurations, a damped least squares form can be used:

[0129] in, The damping factor, Is with Identity matrices of the same dimension.

[0130] The obtained joint velocities The joint position increments or torque control quantities are converted into drive commands that the robot controller can recognize and sent to the robotic arm execution unit. For example... Figure 6 As shown, after the robotic arm completes the movement of the current control cycle, it feeds back the updated joint state, end pose, and visual measurement results to the next control cycle, thus forming a PBVS closed-loop control process.

[0131] Example 2 This embodiment provides a robotic arm vision servo control system based on an adaptive gain observer, including: The visual information acquisition module is configured to acquire target visual information and determine pose error. The state model construction module is configured to: establish a visual servo discrete state model based on the pose error, control input, and lumped disturbance; The prior prediction module is configured to perform extended Kalman filter prior prediction based on the posterior estimate of the pose state and the control input of the previous control cycle, and obtain the prior estimate of the pose state, innovation, prediction covariance and reference Kalman gain of the current control cycle. The adaptive gain correction module is configured to: construct a reinforcement learning state based on innovation, prediction covariance, visual servo error and control input of the previous control cycle; output Kalman gain correction amount through deep deterministic policy gradient algorithm; and fuse Kalman gain correction amount with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. The posterior update module is configured to: update the prior estimate of the pose state of the current control cycle by extended Kalman filtering based on the actual Kalman gain, so as to obtain the posterior estimate of the pose state of the current control cycle. The disturbance estimation module is configured to: construct the observer extended state based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated, recursively update the extended state, and obtain the lumped disturbance estimate for the current control cycle. The control command generation module is configured to generate corresponding joint control commands based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle, thereby driving the robotic arm to move.

[0132] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0133] The proposed system can be implemented in other ways. For example, the system embodiments described above are merely illustrative, and the division of modules described above is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0134] Example 3 This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein, the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the method described in Embodiment 1.

[0135] It should be understood that in this embodiment, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0136] Memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, memory may also store information about the device type.

[0137] In the implementation process, each step of the above method can be completed by the integrated logic circuits in the processor hardware or by software instructions.

[0138] The method in Embodiment 1 can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor. The software modules can reside in readily available storage media in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, a detailed description is not provided here.

[0139] Those skilled in the art will recognize that the units and algorithm steps described in connection with the various examples of this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0140] Example 4 Embodiment 4 of the present invention provides a computer-readable storage medium.

[0141] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the method as described in Embodiment 1 of the present invention.

[0142] The detailed steps are the same as those provided in Example 1, and will not be repeated here.

[0143] Example 5 Embodiment 5 of the present invention provides a computer program product.

[0144] A computer program product includes software code, wherein the program in the software code performs the steps described in Embodiment 1 of the present invention.

[0145] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A visual servo control method for a robotic arm based on an adaptive gain observer, characterized in that, include: Acquire visual information about the target and determine the pose error; A visual servo discrete state model is established based on the pose error, control input, and lumped disturbance. Based on the posterior estimate of the pose state and the control input of the previous control cycle, extended Kalman filtering prior prediction is performed to obtain the prior estimate of the pose state, innovation, prediction covariance and baseline Kalman gain of the current control cycle. The reinforcement learning state is constructed based on the new information, prediction covariance, visual servo error and control input of the previous control cycle. The Kalman gain correction is output through the deep deterministic policy gradient algorithm. The Kalman gain correction is fused with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. Based on the actual Kalman gain, the prior estimate of the pose state in the current control cycle is updated by extended Kalman filtering to obtain the posterior estimate of the pose state in the current control cycle. The observer extended state is constructed based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated. The extended state is then recursively updated to obtain the lumped disturbance estimate for the current control cycle. Based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle, corresponding joint control commands are generated to drive the robotic arm to move.

2. The robotic arm vision servo control method based on an adaptive gain observer as described in claim 1, characterized in that, A visual servo discrete state model is established based on the pose error, control input, and lumped disturbance. Specifically, the mapping relationship between the pose state change rate and the camera velocity in the camera coordinate system is established based on the position Jacobian matrix. The sum of the unmodeled dynamics and external disturbances is taken as the lumped disturbance, and the generalized velocity command in the camera coordinate system is taken as the control input. The visual servo state equation is established by combining visual measurement information, process noise, and measurement noise. The state equation is discretized according to the preset sampling period to obtain the visual servo discrete state model.

3. The robotic arm vision servo control method based on an adaptive gain observer as described in claim 1, characterized in that, The reinforcement learning state is constructed based on the innovation, prediction covariance, visual servo error and control input of the previous control cycle. Specifically, the innovation of the current control cycle, the innovation of the previous control cycle, the expanded vector of the prediction covariance matrix of the current control cycle, the trace of the prediction covariance matrix, the visual servo error and the control input of the previous control cycle are concatenated in a preset order to obtain the reinforcement learning state vector. The reinforcement learning state vector is subjected to nonlinear feature mapping to obtain the reinforcement learning state input for the deep deterministic policy gradient algorithm; wherein, the nonlinear feature mapping includes using Gaussian kernel functions to calculate the similarity between the reinforcement learning state vector and a fixed number of kernel centers respectively, and arranging them in a preset order to obtain kernel feature vectors; the reinforcement learning state vector and the kernel feature vector are used together as the network input for the deep deterministic policy gradient algorithm.

4. The robotic arm vision servo control method based on an adaptive gain observer as described in claim 1, characterized in that, The output of the Kalman gain correction through the deep deterministic policy gradient algorithm is specifically as follows: taking the reinforcement learning state and its corresponding kernel feature vector as input, the Actor network outputs continuous actions, and exploration noise is superimposed on the continuous actions to obtain the gain adjustment action of the current control cycle. The gain adjustment action is mapped to a Kalman gain correction amount; The Kalman gain correction is fused with the reference Kalman gain to obtain the actual Kalman gain for the current control cycle: The deep deterministic policy gradient algorithm employs an Actor network, a Critic network, a target Actor network, a target Critic network, and an experience replay memory, and constructs a reward function based on the degree of innovation whitening, visual servoing error, and gain correction magnitude.

5. The robotic arm vision servo control method based on an adaptive gain observer as described in claim 1, characterized in that, The process of constructing the observer extended state based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated, and recursively updating the extended state, specifically includes the pose state tracking quantity and the observation of the lumped disturbance. Predict the expansion state of the current control cycle: in, As of the date The control cycle, for the first The predicted value made by the pose state tracking quantity in each control cycle; This is the corresponding predicted value of the lumped disturbance; and These are the pose state tracking quantity and lumped disturbance estimate after observation error correction in the previous control cycle, respectively; This is the pose state transition function; This is the input for the previous control cycle; The sampling period is This is the disturbance input distribution matrix in the system model; The observation error is constructed based on the deviation between the posterior estimate of the pose state and the pose state tracking quantity; The expansion state is updated according to the following recursive relationship: in, and These are the pose state tracking quantity and lumped disturbance estimate after observation error correction for the current control cycle, respectively. and These are the pose state update gain matrix and the perturbation state update gain matrix of the ESO, respectively; The observation error is constructed from the deviation between the EKF pose state posterior estimate and the ESO state tracking quantity.

6. The robotic arm vision servo control method based on an adaptive gain observer as described in claim 1, characterized in that, The generation of corresponding joint control commands based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle is specifically as follows: constructing an objective function based on the unperturbed nominal model, the desired pose, and the prediction time domain; solving the objective function under preset constraints to obtain the nominal control sequence and the corresponding nominal state trajectory. An error feedback compensation amount is generated based on the deviation between the actual pose state and the nominal state trajectory. The lumped disturbance estimate is used to generate the disturbance feedforward compensation. The nominal control quantity, the error feedback compensation quantity, and the disturbance feedforward compensation quantity are fused to obtain the control input for the current control cycle; The control input is a camera speed command in the camera coordinate system. The camera speed command is mapped to the end effector speed in the end effector coordinate system through hand-eye coordinate transformation. Then, the end effector speed is converted into the end effector speed in the robot base coordinate system. Finally, the joint speed command is obtained through the robot arm speed Jacobian matrix and converted into a drive command and sent to the robot arm execution unit.

7. A vision servo control system for a robotic arm based on an adaptive gain observer, characterized in that, include: The visual information acquisition module is configured to: acquire target visual information and determine pose error; The state model construction module is configured to: establish a visual servo discrete state model based on the pose error, control input, and lumped disturbance; The prior prediction module is configured to perform extended Kalman filter prior prediction based on the posterior estimate of the pose state and the control input of the previous control cycle, and obtain the prior estimate of the pose state, innovation, prediction covariance and reference Kalman gain of the current control cycle. The adaptive gain correction module is configured to: construct a reinforcement learning state based on innovation, prediction covariance, visual servo error and control input of the previous control cycle; output Kalman gain correction amount through deep deterministic policy gradient algorithm; and fuse Kalman gain correction amount with the benchmark Kalman gain to obtain the actual Kalman gain of the current control cycle. The posterior update module is configured to: update the prior estimate of the pose state of the current control cycle by extended Kalman filtering based on the actual Kalman gain, so as to obtain the posterior estimate of the pose state of the current control cycle. The disturbance estimation module is configured to: construct the observer extended state based on the posterior estimate of the pose state in the current control cycle and the lumped disturbance to be estimated, recursively update the extended state, and obtain the lumped disturbance estimate for the current control cycle. The control command generation module is configured to generate corresponding joint control commands based on the posterior estimate of the pose state and the lumped disturbance estimate of the current control cycle, thereby driving the robotic arm to move.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the robotic arm visual servo control method based on an adaptive gain observer as described in any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps in the robotic arm vision servo control method based on an adaptive gain observer as described in any one of claims 1-6.

10. A computer program product, comprising software code, characterized in that, The program in the software code executes the steps in the robotic arm vision servo control method based on an adaptive gain observer as described in any one of claims 1-6.