Mechanism-bayesian joint modeling based robotic arm control method and system

By employing a joint mechanism-Bayesian modeling approach, a mechanism model of the robotic arm is constructed and its parameters are estimated. A Bayesian neural network is then used for probability learning, and an adaptive control law for uncertainty is designed. This approach resolves the contradiction between high precision and safety in the robotic arm, enabling high-precision trajectory tracking and compliant, safe interaction.

CN121468587BActive Publication Date: 2026-04-10HANGZHOU INNOVATION RES INST OF BEIJING UNIV OF AERONAUTICS & ASTRONAUTICS +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU INNOVATION RES INST OF BEIJING UNIV OF AERONAUTICS & ASTRONAUTICS
Filing Date
2026-01-06
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing robotic arm control methods struggle to simultaneously meet the demands for high precision and high safety, especially in environments with dense contact or unstructured environments, where traditional control strategies can easily lead to reduced trajectory tracking accuracy or insufficient interaction safety.

Method used

A mechanism-Bayes joint modeling approach is adopted. By constructing a mechanism model of the robotic arm, estimating parameters and generating dynamic predictions, using a Bayesian neural network for probability learning, establishing a stochastic mathematical model of the mechanism model residuals, designing a data-driven uncertainty adaptive control law, and generating joint motor drive torque commands to achieve trajectory tracking.

Benefits of technology

It effectively balances the control precision and safety of the robotic arm, improves its robustness and reliability in complex dynamic environments, and achieves high-precision trajectory tracking and compliant and safe interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121468587B_ABST
    Figure CN121468587B_ABST
Patent Text Reader

Abstract

The application provides a kind of mechanical arm control method and system based on mechanism-bayes joint modeling, it is related to the technical field of robot control, the method is first by constructing the mechanism model of mechanical arm and estimating its parameters, obtains preliminary dynamics prediction;Then combine motor driving torque observation data, establish the random mathematical model of mechanism model residual, it is decomposed into deterministic and random part;Residual is learned by probability using bayesian neural network, output the prediction mean and variance of residual;Combined with preliminary dynamics prediction and residual information, construct data-driven uncertainty adaptive control law without acceleration signal dependence, and carry out random stability analysis;Stable joint driving torque instruction is generated, high-precision trajectory tracking of mechanical arm is realized.The application combines the interpretability of mechanism model and the strong adaptability of data-driven model, effectively balances control accuracy and flexibility, improves the robustness and reliability of mechanical arm in complex dynamic environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot control technology, and more specifically, to a robotic arm control method and system based on mechanism-Bayesian joint modeling. Background Technology

[0002] With the rapid development of industrial automation and intelligent manufacturing, robotic arms, as core execution units, are widely used in high-precision operation scenarios such as assembly, welding, and material handling. Modern robotic arm manipulation tasks not only require higher trajectory tracking accuracy, but also need to have compliant characteristics for safe interaction with the environment or personnel.

[0003] Traditional control methods typically employ high-gain PID controllers based on precise dynamic models to achieve trajectory tracking. However, rigid control strategies are prone to generating dangerous interaction forces under sudden contact conditions. While low-gain or impedance control can improve safety, it significantly reduces trajectory tracking accuracy. Existing traditional control schemes struggle to simultaneously meet the dual requirements of high accuracy and high safety. Furthermore, the unmodeled dynamic characteristics of the robotic arm during actual operation, such as nonlinear friction and joint flexibility, as well as the model uncertainties caused by load variations, further exacerbate the design conflict between accuracy and safety. Summary of the Invention

[0004] The purpose of this invention is to provide a robotic arm control method and system based on mechanism-Bayesian joint modeling, so as to solve the technical problem in the prior art that it is difficult to simultaneously meet the requirements of high precision and high safety in robotic arm control.

[0005] In a first aspect, embodiments of the present invention provide a robotic arm control method based on mechanistic-Bayesian joint modeling. The method includes: estimating parameters of a pre-constructed robotic arm mechanistic model to generate preliminary dynamic predictions; establishing a stochastic mathematical model of the mechanistic model residuals through parameter identification and a stochastic process based on the deviation between the preliminary dynamic predictions and observed data of joint motor driving torques; the stochastic mathematical model representing the mechanistic model residuals, including deterministic and stochastic components; using a Bayesian neural network to perform probabilistic learning on the mechanistic model residuals based on the stochastic mathematical model, outputting the predicted mean and predicted variance of the mechanistic model residuals; designing a data-driven, acceleration-free, uncertainty-adaptive control law using the preliminary dynamic predictions, the predicted mean, and the predicted variance of the residuals; performing stochastic stability analysis on the uncertainty-adaptive control law, and generating joint motor driving torque commands using the uncertainty-adaptive control law obtained through stochastic stability analysis; and using the joint motor driving torque commands to control the movement of each joint of the robotic arm to achieve trajectory tracking.

[0006] In some optional implementations, the above method further includes: constructing a robotic arm mechanism model based on the Euler-Lagrange equations; the robotic arm is a rigid body open kinematic chain composed of n joints; the dynamic expression of the robotic arm is:

[0007] ;

[0008] Where q represents the joint position. Indicates joint velocity. M(q) represents joint acceleration; M(q) represents the inertia matrix. Let g(q) denote the Coriolis matrix, and g(q) denote the gravity vector. This represents complex physical factors that are not described by the mechanistic model; This indicates the driving torque of the joint motor.

[0009] In some optional implementations, the parameters of the above-mentioned robotic arm mechanism model are estimated, including: controlling the above-mentioned robotic arm to move along a multi-frequency combined sinusoidal excitation trajectory, and collecting measurement data of joint position, joint velocity, and joint torque, as well as joint acceleration generated based on the above-mentioned joint velocity, to form a first dataset; based on the above-mentioned first dataset, using a regression method to estimate the unknown parameters of the above-mentioned mechanism model, and generating estimated values ​​of the unknown parameters of the above-mentioned mechanism model.

[0010] In some optional implementations, based on the discrepancy between the preliminary dynamic predictions and the observed data of the joint motor driving torque, a stochastic mathematical model of the mechanistic model residuals is established through parameter identification and stochastic processes. This includes: determining the dynamic expression of the robotic arm based on the estimated values ​​of the joint motor driving torque, regression matrix, and unknown parameters; and transforming the dynamic expression of the robotic arm based on the mechanistic model residuals into a stochastic mathematical model based on the deterministic and stochastic components.

[0011] ;

[0012] in, The deterministic part includes parameter identification error, friction effect, and joint flexibility. The random component refers to random disturbances and acceleration measurement errors.

[0013] In one embodiment, a Bayesian neural network is used to perform probabilistic learning on the residuals of the aforementioned mechanism model to output the predicted mean and predicted variance of the residuals of the aforementioned mechanism model. This includes: using a second dataset consisting of collected measurement data of joint position, joint velocity, and joint torque as input to the Bayesian neural network; marginalizing the parameters of the aforementioned Bayesian neural network using a Bayesian model averaging method to obtain the predicted distribution of the residuals of the aforementioned mechanism model; and calculating and generating the predicted mean and predicted variance of the residuals of the aforementioned mechanism model based on the predicted distribution.

[0014] In some optional implementations, the aforementioned Bayesian neural network is trained using an improved regularized loss function; this loss function is constructed based on the prior distribution of the neural network parameters and the likelihood function of the second dataset, and is optimized using a stochastic gradient descent algorithm; the improved regularized loss function is as follows:

[0015] ;

[0016] Where W represents the neural network parameters. This represents the output vector of the neural network. For the observed data of the residuals of the above mechanism model, N D This indicates the number of points in the dataset.

[0017] In some optional implementations, using the aforementioned preliminary dynamic predictions, the predicted mean and variance of the residuals, a data-driven adaptive control law for uncertainties in acceleration-free signals is designed, including: defining auxiliary variables:

[0018] ;

[0019] in, To track the error, qd is the desired trajectory, and Λ is a positive definite matrix; the above-mentioned adaptive control law for uncertainty is determined by the following formula:

[0020]

[0021] in, Based on auxiliary variables A defined acceleration-free regression matrix, This represents the estimated value of the parameter. K(( represents the predicted mean of the residuals) The above feedback gain term is the feedback gain term. The adjustment method is as follows:

[0022] ;

[0023] in, The covariance of the residuals output by the Bayesian neural network. and These are the preset minimum feedback gain matrix and maximum feedback gain matrix, respectively. It is an adjustable diagonal positive definite matrix.

[0024] In one embodiment, the method for performing stochastic stability analysis on the aforementioned uncertain adaptive control law for a data-driven, acceleration-free signal includes: substituting the aforementioned deterministic adaptive control law into the aforementioned robotic arm mechanism model to obtain a closed-loop system equation containing stochastic terms, and expressing it in the form of a standard Ito stochastic differential equation; determining the final boundedness of the error manifold based on the stochastic Lyapunov function and the Ito lemma; and determining the final boundedness of the semi-global exponential mean square exponent of the tracking error based on the final boundedness of the error manifold, thereby determining the stochastic stability of the closed-loop system.

[0025] Secondly, embodiments of the present invention provide a robotic arm control system based on mechanistic-Bayesian joint modeling, the system including: dynamic prediction.

[0026] The system comprises the following modules: a generation module for estimating parameters of a pre-built robotic arm mechanism model and generating preliminary dynamic predictions; a stochastic mathematical model building module for establishing a stochastic mathematical model of the mechanism model residuals based on the deviation between the preliminary dynamic predictions and the observed data of the joint motor drive torques, through parameter identification and a stochastic process; the stochastic mathematical model represents the mechanism model residuals, including deterministic and stochastic components; a probability learning module for performing probability learning on the mechanism model residuals using a Bayesian neural network, based on the stochastic mathematical model of the mechanism model residuals, to output the predicted mean and predicted variance of the mechanism model residuals; a control law generation module for designing a data-driven, acceleration-free, uncertainty-adaptive control law using the preliminary dynamic predictions, the predicted mean and predicted variance of the residuals; and a stability analysis module for performing stochastic stability analysis on the uncertainty-adaptive control law and generating joint motor drive torque commands using the uncertainty-adaptive control law obtained through stochastic stability analysis; the joint motor drive torque commands are used to control the movement of each joint of the robotic arm to achieve trajectory tracking.

[0027] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the computer program to implement the steps of any of the methods described in the first aspect.

[0028] This invention provides a robotic arm control method and system based on mechanistic-Bayesian joint modeling. The method constructs a mechanistic model of the robotic arm and estimates its parameters to obtain preliminary dynamic predictions. Combining this with observed motor drive torque data, a stochastic mathematical model of the mechanistic model residuals is established, decomposing it into deterministic and stochastic components. A Bayesian neural network is used to perform probabilistic learning on the residuals, outputting the predicted mean and variance of the residuals. Combining the preliminary dynamic predictions and residual information, a data-driven, uncertainty-adaptive control law independent of acceleration signals is constructed, and stochastic stability analysis is performed. Finally, stable joint drive torque commands are generated to achieve high-precision trajectory tracking of the robotic arm. This invention combines the interpretability of the mechanistic model with the strong adaptability of the data-driven model, effectively balancing control accuracy and compliance, and improving the robustness and reliability of the robotic arm in complex dynamic environments. Attached Figure Description

[0029] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 A flowchart illustrating a robotic arm control method based on mechanism-Bayesian joint modeling provided in an embodiment of the present invention;

[0031] Figure 2 A schematic diagram of an uncertainty adaptive control principle based on joint modeling of mechanism and Bayesian learning is provided for an embodiment of the present invention.

[0032] Figure 3 This is a joint position tracking effect diagram (joint-by-joint) of a controller embodiment provided by the present invention.

[0033] Figure 4 The L2 norm (overall) of the tracking error of a controller embodiment provided in this invention;

[0034] Figure 5 A controller embodiment provided for a smoothing effect (soothing task) in accordance with the present invention;

[0035] Figure 6 A compliance effect (trajectory tracking task) of a controller embodiment provided in this invention;

[0036] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] With the rapid development of industrial automation, smart healthcare, and the service industry, the demand for automated robotic arm operations is increasing in modern society, and the complexity of these tasks is constantly rising. Specifically, these operations typically involve a high degree of contact, such as assembling tightly packed parts, handling soft objects, collaborating with humans, or interacting with the environment. In such contact-intensive or unstructured environments, control tasks require both high-precision trajectory tracking control methods to ensure task execution accuracy and compliant control to ensure safe interaction and avoid collision damage.

[0039] To achieve the aforementioned control objectives, accurate dynamic models and effective feedback gain design strategies are typically required. However, in practical applications, friction and joint elasticity are difficult to describe precisely using known physical laws, making it challenging to obtain robotic arm models. Data-driven modeling methods can avoid reliance on physical analysis, but modern robotic arms often employ high-degree-of-freedom configurations, making it difficult to obtain sufficient data to cover the entire high-dimensional input space. This results in insufficient generalization ability of the model in uncovered areas, thus compromising modeling accuracy. Furthermore, the design of feedback gain also presents challenges: low gain, while ensuring smooth operation, leads to insufficient tracking accuracy; high gain, while improving accuracy, may generate excessive contact forces, reducing interaction safety, damaging mechanical equipment, or even endangering operator safety. Therefore, in contact-intensive or unstructured environments, simultaneously achieving high-precision trajectory tracking and smooth, safe interaction is of significant practical importance for modern robotic arm manipulation tasks, but it still faces technical challenges.

[0040] Based on this, the present invention provides a robotic arm control method and system based on mechanism-Bayesian joint modeling. By combining the interpretability of the mechanism model with the strong adaptability of the data-driven model, it can effectively balance the control accuracy and safety of the robotic arm, thereby achieving the technical effect of improving the robustness and reliability of the robotic arm in complex dynamic environments.

[0041] To facilitate understanding of this embodiment, a robotic arm control method based on mechanistic-Bayesian joint modeling disclosed in this invention will first be described in detail. This method can be applied to a corresponding robotic arm control system based on mechanistic-Bayesian joint modeling. This control system may include multiple modules configured to execute the above control method, such as: dynamic prediction...

[0042] The system includes modules for generating data, establishing stochastic mathematical models, learning probabilistic models, generating control laws, and analyzing stability (the functions of each module will be described in detail in subsequent system implementations and will not be repeated here).

[0043] See Figure 1 The diagram shows a flowchart of a robotic arm control method based on mechanism-Bayesian joint modeling. This method can be executed by an electronic device and mainly includes the following steps S102 to S110:

[0044] Step S102: Estimate the parameters of the pre-built robotic arm mechanism model to generate preliminary dynamic predictions.

[0045] In this embodiment, a general mechanism model applicable to high-degree-of-freedom robotic arms can be established, and the model parameters can be estimated using the standard regression method to form a preliminary dynamic prediction of the mechanism model.

[0046] The robotic arm mechanism model can be pre-constructed based on the Euler-Lagrange equations. In one embodiment, the robotic arm can be a rigid body open kinematic chain consisting of n joints; the dynamic expression of the robotic arm is:

[0047] ;

[0048] Where q represents the joint position. Indicates joint velocity. M(q) represents joint acceleration; M(q) represents the inertia matrix. Let g(q) denote the Coriolis matrix, and g(q) denote the gravity vector. This represents complex physical factors that are not described by the mechanistic model; This indicates the driving torque of the joint motor.

[0049] In one embodiment, the above-mentioned method for estimating the parameters of the robotic arm mechanism model may include: controlling the robotic arm to move along a multi-frequency combined sinusoidal excitation trajectory, and collecting measurement data of joint position, joint velocity, joint torque, and joint acceleration generated based on joint velocity to form a first dataset; based on the first dataset, using a regression method to estimate the unknown parameters of the mechanism model, and generating estimated values ​​of the unknown parameters of the mechanism model.

[0050] Preferably, in the above embodiments, to construct a general mechanistic model for the robotic arm, the robotic arm can generally be regarded as a rigid body open kinematic chain composed of n joints; specifically, generalized coordinates can be used. Describing the position of the link, its dynamics in joint space can be described by an Euler-Lagrangian (EL) system of the following form:

[0051] ;

[0052] in, These are the joint's position, velocity, and acceleration, respectively. and These represent the inertia matrix, Coriolis matrix, and gravity vector of the robotic arm, respectively. This indicates complex physical factors that the mechanistic model fails to describe; The driving torque of the joint motor is indicated by the subscript 'm', the first letter of 'motor'.

[0053] The main difference between the dynamic model in this embodiment and the traditional EL model is that the motor driving force not only acts on standard dynamic terms such as compensating inertia, Coriolis / centrifugal force, and gravity, but can also induce complex effects such as friction and flexibility. Therefore, a unified term is introduced. Furthermore, unlike parameterized extended models that only address specific phenomena such as friction or flexibility, the robotic arm model in this embodiment of the invention does not... The specific form is restricted.

[0054] Due to the characteristics of a general regression matrix, the traditional EL model has the following linear parameterization form:

[0055] ;

[0056] in, The regression matrix is ​​composed of known functions of joint positions, velocities, and inputs, and its form is determined by the properties of the Eulerian-Lagrange system. This is a vector of unknown parameters, including system physical quantities such as inertia and link length.

[0057] To identify unknown parameters We can collect measurement data of joint position, velocity, and torque by moving the robotic arm along an excitation trajectory; and obtain joint acceleration data by performing non-causal filtering, numerical differentiation, and smooth interpolation on the joint velocity data offline. Considering that the trajectory contains M (M is much larger than N) data points, we form a dataset (i.e., the first dataset):

[0058] ;

[0059] The following regression equation can be established from this:

[0060] ;

[0061] in, And will bring complex physical phenomena The realized value in the excitation trajectory is regarded as the noise term of the regression equation. .

[0062] Then, using the least squares method, we can obtain the estimated values ​​of the unknown parameters:

[0063] ;

[0064] in, This is an estimate of the unknown parameter vector obtained through identification.

[0065] Furthermore, a systematic analysis can be conducted on the errors of the aforementioned mechanistic model to identify the main physical factors affecting the residuals and their mathematical manifestations, and to construct a stochastic mathematical model of the residuals of the mechanistic model.

[0066] Step S104: Based on the deviation between the preliminary dynamic prediction and the observed data of the joint motor driving torque, a stochastic mathematical model of the mechanism model residual is established through parameter identification and stochastic process; the stochastic mathematical model is used to represent the mechanism model residual, including deterministic and stochastic parts.

[0067] In this embodiment, the dynamic expression of the robotic arm based on the driving torque of the joint motor, the regression matrix, and the estimated values ​​of the unknown parameters is first determined; then, based on the deterministic and stochastic components, the dynamic expression of the robotic arm based on the mechanistic model residuals is transformed into a stochastic mathematical model of the mechanistic model residuals.

[0068] ;

[0069] in, This represents the deterministic part, which includes parameter identification error, friction effect, and joint flexibility; This represents the random component, which includes random disturbances and acceleration measurement errors.

[0070] Preferably, in the above embodiments, the mechanism model residual can be expressed as the difference between the mechanism model obtained in the aforementioned steps and the actual joint motor driving torque:

[0071] ;

[0072] To infer the residual N of the mechanistic model using a data-driven approach, this embodiment systematically analyzes its main influencing factors and identifies the following key sources:

[0073] (1) Parameter identification error: The complexity of real-world systems introduces approximation errors when using the EL equation as the model class; noise in experimental data also affects the accuracy of parameter identification. This leads to errors in the estimated values ​​of the identified parameters. Its true value There is a deviation between them, and the identification error is defined as follows: This deviation acts on joint dynamics through the regression matrix, forming an error: Therefore, this type of error is essentially a state variable. The function.

[0074] (2) Friction effect: Friction is a complex nonlinear physical phenomenon that is difficult to fully characterize through precise mechanism modeling. Existing studies have shown that common friction effects can be approximated by typical models such as Coulomb friction, viscous friction, and the Stribeck effect. Although these models cannot cover all friction mechanisms, they can effectively characterize the main friction characteristics and emphasize the relationship between frictional force and joint velocity. The nonlinear dependence of friction is considered in this invention as a factor of joint velocity. Nonlinear functions.

[0075] (3) Joint flexibility: Elastic deformation is common in the joint transmission components of multi-joint robotic arms (such as harmonic reducers, gear pairs, etc.). This type of flexibility is particularly significant under high load, rapid motion, or frequent reversal conditions, and is an important source of modeling errors. Its dynamics can be abstracted as the coupling effect of torsional elasticity and damping, and is often described using a spring-damper model. Therefore, in this invention, the joint flexibility effect is considered in relation to joint position and velocity. Nonlinear functions.

[0076] (4) Random perturbations: During the movement of the robotic arm, there are some forces or perturbations that do not have a deterministic trend. Their specific mechanisms are difficult to model clearly, and even their independent variable dependencies cannot be identified. However, these forces can be considered to exhibit stable regularity in a statistical sense. Based on the inventor's practice and using the law of large numbers as a theoretical basis, this type of random force can be modeled as a Gaussian white noise random process with zero mean, constant covariance, and time as the independent variable.

[0077] Based on the above analysis, It consists of two parts, one of which is joint position and velocity. The nonlinear function is defined as The other part is a white noise process, defined as Then there is The residual N of the mechanistic model then becomes:

[0078] ;

[0079] Furthermore, embodiments of the present invention incorporate joint acceleration. Impact on residual N. Through the above analysis, the mechanistic model has compensated for the inertia term. However, the acceleration information in the actual identification process is often obtained through numerical differentiation, which results in significant noise and is difficult to measure accurately. Extensive practical experience has shown that the error introduced by acceleration accounts for a very small proportion of the overall residual; therefore, its contribution to the mechanistic model residual can be approximated as random noise.

[0080] First, the errors of the EL model are expressed in the form of errors in the inertia matrix, Coriolis matrix, and gravity vector:

[0081] ;

[0082] Among them, the acceleration term depends only on the identification error of the inertia matrix. Then, by setting the acceleration in the regression matrix to 0, we can obtain:

[0083] ;

[0084] as well as:

[0085] ;

[0086] Among them, according to the acceleration Analysis of the impact on residual N It is considered a stochastic process.

[0087] Based on this, the following functions and stochastic processes are defined:

[0088] ,

[0089] ;

[0090] Therefore, through the above analysis and treatment of non-ideal factors, the mathematical expression of the residual N in the mechanism model becomes:

[0091]

[0092] ;

[0093] in, The deterministic part of N is the joint position and velocity. Unknown function, The random component of N (including random disturbances and acceleration errors) is modeled as a zero-mean, constant diagonal matrix with a covariance function. A white noise random process.

[0094] Thus, a stochastic mathematical representation of the residuals of the mechanistic model was established.

[0095] To address the residual model with random uncertainty characteristics constructed through the above steps, this invention further proposes a Bayesian neural network implementation method suitable for high-degree-of-freedom robotic arms, in order to achieve probabilistic prediction of the residuals of high-dimensional mechanistic models.

[0096] Step S106: Based on the stochastic mathematical model of the mechanism model residuals, a Bayesian neural network is used to perform probability learning on the mechanism model residuals to output the predicted mean and predicted variance of the mechanism model residuals.

[0097] In one embodiment, the method of using a Bayesian neural network to perform probabilistic learning on the residuals of the mechanism model in step S106 above may include: using a second dataset consisting of the collected measurement data of joint position, joint velocity, and joint torque as the input of the Bayesian neural network; marginalizing the parameters of the Bayesian neural network through the Bayesian model averaging method to obtain the predicted distribution of the residuals of the mechanism model; and then calculating and generating the predicted mean and predicted variance of the residuals of the mechanism model based on the predicted distribution.

[0098] Preferably, the aforementioned Bayesian neural network can be trained using an improved regularized loss function; wherein, the loss function can be constructed based on the prior distribution of the neural network parameters and the likelihood function of the second dataset, and optimized using a stochastic gradient descent algorithm; the improved regularized loss function is:

[0099] ;

[0100] Where W represents the neural network parameters. This represents the output vector of the neural network. N represents the observed data of the residuals of the aforementioned mechanism model. D This indicates the number of points in the dataset.

[0101] Preferably, in step S106 above, in order to infer the residual N of the mechanism model in step S104, the observed data of N are first defined as follows: Then there is, .

[0102] Further, based on the first dataset defined in step S102, a new dataset (i.e., the second dataset) is obtained after removing the acceleration metric measurements, denoted as: Therefore, the goal of Bayesian learning is to infer the conditional distribution of the residual N, denoted as . ,in .

[0103] Therefore, a Bayesian neural network can be used to construct a probabilistic model of the residuals. Specifically, the parameters W of the neural network (including weights and biases) and its predicted output are defined. By using the Bayesian model averaging method, the unknown parameter W is marginalized to obtain the complete prediction distribution of the residuals. The expected form of the distribution is as follows:

[0104] ;

[0105] Then we can utilize the principle of obeying the posterior. Using posterior samples to approximate inference .

[0106] Preferably, a detail that differs from the prior art is that the inference process described above in this embodiment relies only on a simplified dataset that does not include acceleration metrics. And without relying on the original dataset containing acceleration. This design reduces the dimensionality of the neural network input and the training complexity. Furthermore, considering the difficulty or significant noise interference often present when accurately acquiring acceleration measurements during the online deployment of practical robotic arm systems, it effectively improves the applicability and robustness of online deployment. Therefore, the solution described in this application can significantly enhance its practical value in engineering applications while maintaining inference accuracy.

[0107] Furthermore, to achieve posterior inference, a zero-mean Gaussian prior can be introduced for the parameter W. Combining datasets Likelihood function:

[0108] Based on Bayes' theorem, the posterior distribution of the parameters is obtained: .

[0109] In a specific implementation, the loss function corresponding to the posterior distribution can be defined as follows:

[0110] ;

[0111] Furthermore, the loss function can be minimized using an optimization method based on stochastic gradient descent. Preferably, an adaptive first-order optimization algorithm (such as the ADAM algorithm) with widely available open-source implementations can be used to iteratively solve the loss function.

[0112] To achieve the aforementioned probabilistic representation, the Bayesian neural network used in this embodiment of the invention forms an ensemble by performing multiple independent training iterations on a regularized loss function improved based on the posterior distribution. The local extrema solutions from each training iteration are considered as posterior samples, thereby approximating the inference of the Bayesian posterior distribution. The mean of the residuals is then determined by the samples. Approximation, where M is the number of individual neural networks in the network ensemble:

[0113] ;

[0114] ;

[0115] The variance of the residuals is a diagonal matrix, and its k-th diagonal element can be obtained from the sample. Approximately:

[0116] ;

[0117] Therefore, the results obtained through Bayesian neural network inference can be used to infer the distribution of the residual N in the mechanistic model: its deterministic part Mean from Bayesian neural network Approximation, its random part The variance is determined by the variance of the Bayesian neural network. approximate.

[0118] Preferably, the method proposed in this embodiment of the invention can probabilistically characterize the stochastic mathematical properties of the residuals of unknown mechanism models, that is, by using the prediction mean and variance of the Bayesian neural network, the inference results of the deterministic part and the stochastic part of the residuals are obtained respectively.

[0119] Unlike conventional predictions that only provide deterministic models or are based on approximation methods, this invention quantifies the uncertainty of the residuals, thereby providing a probabilistic measure of the likelihood that the predicted value will approximate the true value. This uncertainty quantification not only guides data-driven inference of mechanistic model residuals—for example, it can be used to actively select sampling points, evaluate the confidence level of learning results, and improve training strategies—but also provides information for the design of uncertainty adaptive controllers in subsequent steps, guiding the dynamic adjustment of feedback gain.

[0120] The method proposed in this invention essentially transforms the Bayesian method into a conventional regularized gradient descent optimization process. Therefore, the training process is simple and can be directly implemented using existing deep learning solvers. Furthermore, by integrating multiple trained networks to form the predicted mean and variance, the online deployment process involves only simple network forward propagation due to its low computational overhead. In summary, this method is easy to implement for offline training and is compatible with online deployment in high-degree-of-freedom robotic arm control systems. It requires no additional complex architecture or computational resources, achieving an efficient, easy-to-implement, and low-computational-cost probabilistic inference method.

[0121] Furthermore, based on the mechanism obtained from the above steps – the Bayesian model and its uncertainty quantification results – a data-driven uncertainty adaptive controller can be designed to achieve a balance between trajectory tracking accuracy and compliant interaction.

[0122] Step S108: Using the preliminary dynamic prediction, the predicted mean and predicted variance of the residuals, design a data-driven uncertainty adaptive control law for the acceleration-free signal.

[0123] In this embodiment, the mean predicted by the mechanistic model and the Bayesian neural network can be used to compensate for the dynamic residual (i.e., the mechanistic model residual), and the feedback gain can be dynamically adjusted according to the prediction variance, thereby designing a data-driven uncertainty adaptive control law that does not depend on the acceleration signal.

[0124] In one embodiment, auxiliary variables can first be defined using preliminary dynamic predictions, the predicted mean of the residuals, and the predicted variance, etc.

[0125] ;

[0126] in, To track the error, q d Let Λ be the desired trajectory, and Λ be a positive definite matrix.

[0127] Based on this, the aforementioned uncertainty adaptive control law can be determined by the following formula:

[0128]

[0129] in, Based on auxiliary variables A defined acceleration-free regression matrix, This represents the estimated value of the parameter. K( represents the predicted mean of the residuals) ) represents the feedback gain term; s represents the error manifold; the error manifold s is the Hurwitz polynomial of the tracking error.

[0130] As a concrete example, the above feedback gain term The adjustment methods can be:

[0131] ;

[0132] in, The covariance of the residuals output by the Bayesian neural network. and These are the preset minimum feedback gain matrix and maximum feedback gain matrix, respectively. It is an adjustable diagonal positive definite matrix.

[0133] Preferably, in step S108 above, the covariance matrix is ​​based on the prediction of the Bayesian neural network in step S106. Design a simple gain function that adapts to uncertainty:

[0134] ;

[0135] in, These are user-adjustable diagonal positive definite matrices, used to determine the gain. The lower bound, upper bound, and growth rate are defined. This gain function can dynamically adjust the feedback gain based on the uncertainty of the Bayesian neural network prediction: when the prediction uncertainty is large, the gain increases accordingly to accelerate error convergence; the lower bound ensures the minimum feedback level, and the upper bound maintains the compliance of the robotic arm, avoiding safety risks caused by excessively high gain.

[0136] Furthermore, the goal of tracking control is to design joint motor drive torque commands. This makes the robot's joint positions Tracking the desired trajectory The desired trajectory satisfies the requirement of second-order time differentiability and is generally generated by a higher-level trajectory planning algorithm.

[0137] To eliminate dependence on joint acceleration signals, the following auxiliary variables can be defined:

[0138] ;

[0139] Finally, the data-driven uncertainty adaptive control law proposed in step S108 can be expressed as:

[0140]

[0141] It is important to note that this is different from the regression matrix used in the mechanistic model in step S102. Unlike the control law proposed in this embodiment of the invention, its regression matrix... The third element becomes the defined auxiliary variable. Furthermore, due to the input of the Bayesian neural network proposed in step S106... While joint position and velocity signals can be directly and accurately acquired in robotic arm systems via encoders or speed sensors, joint acceleration typically requires second-order numerical differentiation, which suffers from high noise, low accuracy, and poor real-time performance. Therefore, the control law in this invention avoids dependence on acceleration signals and accurately compensates the dynamic model using a mechanism-Bayesian learning joint modeling approach, thus ensuring tracking performance. Simultaneously, by utilizing the quantification results of residual uncertainty from a Bayesian neural network, combined with the controller's uncertainty-adaptive gain design, low-gain control is employed for accurate compensation, increasing gain only when the model prediction has a high probability of error. This balances safe and compliant interaction, resulting in a practical, computationally simple, and online-deployable control scheme.

[0142] Furthermore, the data-driven uncertainty adaptive control law proposed in step S108 is not a simple empirical design, but is constructed based on complex mathematical derivation and system theory analysis. Its stability will be explained in detail in the subsequent step S110.

[0143] In other words, in order to theoretically guarantee the stability of the system under uncertain conditions, the designed controller can be further subjected to stochastic stability analysis.

[0144] Step S110: Perform stochastic stability analysis on the uncertain adaptive control law, and use the uncertain adaptive control law obtained through stochastic stability analysis to generate joint motor drive torque commands; the joint motor drive torque commands are used to control the movement of each joint of the robotic arm to achieve trajectory tracking.

[0145] In one embodiment, the method for performing stochastic stability analysis on an uncertain adaptive control law may include: substituting a deterministic adaptive control law into a robotic arm mechanism model to obtain a closed-loop system equation containing stochastic terms, and expressing it in the form of a standard Ito stochastic differential equation; determining the final boundedness of the error manifold based on the stochastic Lyapunov function and the Ito lemma; and determining the final boundedness of the semi-global exponential mean square exponent of the tracking error based on the final boundedness of the error manifold, so as to prove the stochastic stability of the closed-loop system.

[0146] Preferably, to ensure the theoretical feasibility of the control law designed in step S108 on a high-degree-of-freedom robotic arm, this embodiment performs stochastic stability analysis on the control law. The control law combines mechanistic model predictions, Bayesian neural network probability predictions, and uncertainty adaptive gains, resulting in complex closed-loop behavior. Therefore, its stability needs to be guaranteed through rigorous nonlinear control theory and differential dynamics system analysis.

[0147] We can first make the following assumption: Bayesian neural networks predict the mean. For the deterministic part of the residuals of the mechanistic model The approximation error is bounded within a certain compact set, i.e., there exists a compact set. With finite positive numbers This makes the approximation error satisfy Due to the approximation capabilities of neural networks, the bounded approximation error of the above assumption within compact sets is reasonable and generally accepted.

[0148] Furthermore, to obtain the expression for the closed-loop system (controlled system), the uncertainty adaptive control law generated in step S108 can be substituted into the robotic arm system in step S102, resulting in:

[0149] ;

[0150] Based on the relationship between the variables given in step S104, we can obtain:

[0151] ;

[0152] Furthermore, based on the definition of mean learning error in the hypothesis and in step S12... The definitions are as follows:

[0153] ;

[0154] The closed-loop system can then be simplified to:

[0155]

[0156] Due to white noise process The existence of closed-loop systems means that they are stochastic systems, rather than the deterministic systems described by ordinary differential equations that are the focus of typical control systems, which poses challenges to theoretical analysis and stability guarantees.

[0157] Furthermore, the white noise process can be written as Ito and explained as follows: ,in It is an n-dimensional standard Brownian motion. Therefore, the dynamics of the stochastic closed-loop system are:

[0158]

[0159] It can be written in the form of a standard Ito stochastic differential equation:

[0160]

[0161] Take a random Lyapunov function By the Ito lemma, its Ito generating operator (infinitesimalgenerator) is:

[0162]

[0163] in, That is, random torque The F-norm of the variance, It identifies the maximum / minimum eigenvalues ​​of the matrix and also utilizes the positive definiteness and boundedness of the inertia matrix. Then we have:

[0164] ,

[0165] Based on the solutions and comparison lemma of linear differential equations, we can obtain the upper bound of the Lyapunov function:

[0166]

[0167] Furthermore, the upper bound of the error manifold s can be obtained:

[0168]

[0169] This indicates that the error manifold s is a semi-global exponential mean square exponent that is eventually bounded. That is, in a semi-global sense (with joint positions and velocities within a sufficiently large range), the error manifold mean square (second-order statistical moment) exponent (an exponential function less than one time) converges to a bounded error sphere.

[0170] According to the definition The error manifold s(t) can be the Hurwitz polynomial of the tracking error e(t), which leads to the eventual boundedness of the semi-global exponent mean square exponent of the tracking error e(t). Therefore, the stochastic stability of the closed-loop system can be proved.

[0171] The advantages of the robotic arm uncertainty adaptive control method and system based on joint modeling of mechanism and Bayesian learning provided by this invention are as follows: By combining the mechanism model with the Bayesian neural network, the uncertainty of the robotic arm dynamic residual can be quantified, which can effectively compensate for the model error; the controller adopts a data-driven uncertainty adaptive design without acceleration signal, which can dynamically adjust the feedback gain and achieve compliant interaction while ensuring trajectory tracking accuracy; in addition, the above-mentioned method provided by this invention has theoretical interpretability, the modeling error can be quantified by the posterior variance, and the stability of the control system can be proved by stochastic stability analysis, thus taking into account accuracy, safety and theoretical guarantee.

[0172] To verify the effectiveness of the proposed method in a real-world robotic system, this embodiment of the invention also provides an application example of a robotic arm control method based on mechanistic-Bayesian joint modeling. This embodiment uses a standard FrankaEmika Panda seven-DOF robotic arm for experiments to verify the effectiveness of the method in trajectory tracking accuracy and compliance. This embodiment is only intended to illustrate the application effect of the method in a real-world robotic system and is not intended to limit the scope of protection.

[0173] See Figure 2 The diagram shown illustrates an uncertainty adaptive control principle based on joint modeling of mechanism and Bayesian learning. This method mainly includes the following steps:

[0174] Step S1, Mechanism-Bayes joint modeling;

[0175] This embodiment proposes a mechanism-Bayes learning joint modeling framework for the dynamic control problem of high-degree-of-freedom robotic arms, which is used to compensate for complex dynamic errors in the system.

[0176] Step S11: Establishment and regression of the mechanistic model;

[0177] A general mechanism model applicable to high-degree-of-freedom robotic arms is established, and the model parameters are estimated using the standard regression method to form a preliminary dynamic prediction of the mechanism model.

[0178] Step S12: Stochastic mathematical model of the residuals of the mechanistic model;

[0179] A systematic analysis of the error in the mechanistic model was conducted to identify the main physical factors affecting the residuals and their mathematical representations. Based on actual measurement data, a stochastic mathematical representation of the residuals in the mechanistic model was constructed.

[0180] Step S13: Probabilistic learning based on Bayesian neural networks;

[0181] To address the residual model with stochastic uncertainty characteristics constructed in step S12, a Bayesian neural network implementation method suitable for high-degree-of-freedom robotic arms is proposed to achieve probabilistic prediction of the residuals of high-dimensional mechanistic models.

[0182] In this embodiment, the mechanism-Bayesian model in step S1 can be obtained through the following process: First, according to the method described in step S11, a commonly used multi-frequency combined signal (each joint is excited by a sine wave with different amplitude and frequency) is used to drive the robotic arm to collect the excitation trajectory. Simultaneously, joint position, velocity, and torque data are collected through the interface provided by the robot manufacturer. Joint acceleration is obtained through numerical differentiation and filtering. Then, all data is preprocessed by smoothing and interpolation. These data are used to identify the parameters of the robotic arm's mechanism model, obtaining a preliminary estimate of the mechanism model. Subsequently, according to step S12, a stochastic mathematical model of the mechanism model residual is established by combining the observed data of the motor driving torque with the mechanism model estimate. In step S13, to train the Bayesian neural network used by the controller, the following control-related trajectory is used as a reference trajectory. Data is collected for 10 seconds, and residual data is collected through a tracking experiment using the nominal controller as the training target:

[0183] ;

[0184] Where A is the maximum amplitude and T is the length of the control time domain. The initial positions of each joint are set (adjusting the initial positions to prevent collisions). The purpose of selecting this trajectory is to ensure that the training data is highly correlated with the control task, and at the same time to provide a basis for subsequent verification of the controller's ability to adapt to uncertainties under a reference trajectory that significantly exceeds the training domain.

[0185] A Bayesian neural network is trained based on the acceleration-free dataset constructed in step S13. During training, the Bayesian neural network can consist of six fully connected neural networks with a layer structure of 21-30-15-7. The hidden layers use the hyperbolic tangent activation function, and the output layer uses a linear activation function. The network training can use the ADAM optimizer with a learning rate of 0.001 and a regularization coefficient of 0.01. After training, the resulting Bayesian neural network can infer the random distribution of the residuals of the mechanistic model in the form of predicted mean and variance.

[0186] Step S2: Design and analysis of a data-driven controller for uncertainty adaptation;

[0187] Based on the mechanism – Bayesian model and its uncertainty quantification results obtained in step S1, a data-driven uncertainty adaptive controller is designed to achieve a balance between trajectory tracking accuracy and compliant interaction.

[0188] Step S21: Control law design;

[0189] By using the mean predicted by the mechanistic model and Bayesian neural network to compensate for the dynamic residuals, and dynamically adjusting the feedback gain according to the prediction variance, a data-driven uncertainty adaptive control law that does not depend on the acceleration signal is designed.

[0190] Step S22: Closed-loop system stability analysis;

[0191] A stochastic stability analysis is performed on the designed controller to theoretically guarantee the stability of the system under uncertain conditions.

[0192] In step S2 above, to verify the actual effect of the control law designed in step S21, this embodiment can use the following experimental scheme for verification:

[0193] (1) Trajectory tracking verification:

[0194] In this experiment, in addition to the aforementioned trajectory used to train the neural network, to verify the controller's ability to adapt to uncertainty under a reference trajectory that significantly exceeds the training domain, a more complex reference trajectory can be introduced during the experimental time interval of 10-18 seconds:

[0195]

[0196] Among them, parameters A, T and Consistent with the aforementioned training trajectory, this reference trajectory design features rich amplitude and velocity variation characteristics, covering a wide range of joint motions and dynamic conditions. This provides representative general test conditions for experimental verification of the tracking accuracy and compliance performance of the control law under different motion states.

[0197] The results of the tracking control experiment are as follows Figure 3 and Figure 4 As shown. Figure 3 The position tracking curves for the seven joints and the tracking errors for each joint are presented. To more intuitively illustrate the overall level and trend of the errors, Figure 4 The L2 norm of the error vector is given. The gray shaded area in the figure ( The data model operated by the controller is located in a state space significantly different from the training data. Nevertheless, since the model in step S1 can characterize the uncertainty of the prediction result, combined with the uncertainty adaptation gain adjustment method of the control law in S2, the control law proposed in this invention maintains a stable tracking error level (close to the training domain) in the gray shaded area, thereby verifying the accuracy and robustness of the control law under generalized task conditions.

[0198] (2) Flexibility verification:

[0199] Considering that modern manipulation tasks are often performed in complex operating environments or human-computer interaction scenarios, the controller must not only ensure trajectory tracking accuracy but also be able to achieve safe and compliant interaction with external forces. Unlike general high-gain controllers or adaptive controllers, which may sacrifice compliance when improving tracking accuracy, the control law proposed in this embodiment of the invention can maintain good compliance performance under external disturbances.

[0200] To verify the compliance performance, this embodiment applies an external disturbance torque under two experimental conditions: first, in a relatively simple but intuitive stabilization task, the robotic arm is kept in its initial position; second, in a more challenging complex trajectory tracking task, the reference trajectory defined in Part (1) above is used. The response of the robotic arm's closed-loop system is observed under both conditions. Good compliance control should result in a consistent trajectory deviation in response to changes in the external torque, and a rapid recovery to the reference trajectory after the disturbance is eliminated. To ensure the controllability of the experimental conditions and the quantifiability of the disturbance torque, the external disturbance torque is simulated by inputting a slowly varying sinusoidal signal to the actuator, rather than being applied through actual physical interaction.

[0201] During the stabilization task, the reference trajectory remains at its initial position, while a slowly varying sinusoidal disturbance torque is applied to joint 1. Nm, with an effect duration of 2-10 seconds. The docility effect under calming conditions is as follows: Figure 5 As shown (the top shows the effect corresponding to joint 1, and the bottom shows the effect corresponding to the external torque). In the trajectory tracking task, the reference trajectory defined in Experiment 1 is used, and slowly varying sinusoidal disturbance torques are applied simultaneously to multiple joints (3, 5, 6). Nm, The duration of action is also 2-10 seconds. The smoothness effect in tracking tasks is as follows: Figure 6 As shown (the top shows the effect corresponding to the joint tracking error norm, and the bottom shows the effect corresponding to the external torque). Experimental results show that, under both experimental conditions, the control law proposed in this invention can generate a trajectory deviation consistent with the trend of the disturbance torque under external disturbance, and quickly recover to the reference trajectory after the disturbance is eliminated, verifying that the control law has good compliance performance.

[0202] Based on the same inventive concept, this invention also provides a robotic arm control system based on mechanism-Bayesian joint modeling, which mainly includes the following parts:

[0203] The dynamics prediction generation module is used to estimate the parameters of a pre-built robotic arm mechanism model and generate preliminary dynamics predictions.

[0204] The stochastic mathematical model building module is used to establish a stochastic mathematical model of the mechanism model residuals based on the deviation between the preliminary dynamic prediction and the observed data of the joint motor driving torque, through parameter identification and stochastic processes; the stochastic mathematical model is used to represent the mechanism model residuals, including deterministic and stochastic parts;

[0205] The probability learning module is used for stochastic mathematical models based on mechanistic model residuals. It employs a Bayesian neural network to perform probability learning on the mechanistic model residuals to output the predicted mean and predicted variance of the mechanistic model residuals.

[0206] The control law generation module is used to design a data-driven adaptive control law for uncertainties of acceleration-free signals by utilizing preliminary dynamic predictions, the predicted mean and predicted variance of residuals.

[0207] The stability analysis module is used to perform stochastic stability analysis on the uncertain adaptive control law and generate joint motor drive torque commands using the uncertain adaptive control law obtained through stochastic stability analysis. The joint motor drive torque commands are used to control the movement of each joint of the robotic arm to achieve trajectory tracking.

[0208] The system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0209] Based on the same inventive concept, embodiments of the present invention also provide an electronic device, specifically, the electronic device includes a processor and a storage device; the storage device stores a computer program, and the computer program, when run by the processor, executes the method described in any of the above embodiments.

[0210] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device 400 includes: a processor 410, a memory 420, a communication interface 430, and a bus 440. The memory 420 stores machine-readable instructions that can be executed by the processor 410. When the electronic device is running, the processor 410 communicates with the memory 420 through the bus 440. The processor 410 executes the machine-readable instructions to perform the steps of the method described above.

[0211] Specifically, the memory 420 and processor 410 can be general-purpose memory and processor, without any specific limitations. When the processor 410 runs the computer program stored in the memory 420, it can execute the above method.

[0212] Processor 410 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 410 or by instructions in software form. The processor 410 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium 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 420, and processor 410 reads the information from memory 420 and, in conjunction with its hardware, completes the steps of the above method.

[0213] Corresponding to the above method, this embodiment of the invention also provides a computer-readable storage medium storing machine-executable instructions. When the computer-executable instructions are called and run by a processor, the computer-executable instructions cause the processor to perform the steps of the above method.

[0214] The system provided in this embodiment of the invention can be specific hardware on a device or software or firmware installed on the device. The system provided in this embodiment of the invention has the same implementation principle and technical effects as the foregoing method embodiments. For the sake of brevity, any parts not mentioned in the system embodiments can be referred to the corresponding content in the foregoing method embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can all be referred to the corresponding processes in the above method embodiments, and will not be repeated here.

[0215] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0216] For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0217] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0218] In addition, the functional units in the embodiments provided by the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0219] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0220] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0221] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of this invention is in use. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention. In addition, the terms "first," "second," "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0222] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0223] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. All should be covered within the scope of protection of the present invention.

Claims

1. A method for controlling a robot arm based on mechanism-Bayesian joint modeling, characterized in that, The method comprises: estimating the parameters of the pre-constructed mechanical arm mechanism model to generate a preliminary dynamics prediction; based on the deviation between the preliminary dynamics prediction and the observed data of joint motor driving torque, a stochastic mathematical model of mechanism model residual is established by parameter identification and random process, the stochastic mathematical model is used to represent the mechanism model residual, and the stochastic mathematical model comprises a deterministic part and a randomness part; based on the stochastic mathematical model of the mechanism model residual, the mechanism model residual is probabilistically learned by using a Bayesian neural network to output the predicted mean and predicted variance of the mechanism model residual; using the preliminary dynamics prediction, the predicted mean and predicted variance of the residual, a data-driven uncertainty adaptive control law without acceleration signal is designed; the uncertainty adaptive control law is subjected to random stability analysis, and the joint motor driving torque command is generated by using the uncertainty adaptive control law subjected to random stability analysis; the joint motor driving torque command is used to control the movement of each joint of the mechanical arm to realize trajectory tracking.

2. The method of claim 1, wherein, The method further comprises: constructing a mechanical arm mechanism model based on Euler-Lagrange equation; the mechanical arm is an open kinematic chain composed of n joints; the dynamics expression of the mechanical arm is: ; where q represents joint position, represents joint velocity, represents joint acceleration; M(q) represents inertia matrix, represents Coriolis matrix, g(q) represents gravity vector; represents complex physical factor item not described by mechanism model; represents driving torque of joint motor.

3. The method of claim 2, wherein, estimating the parameters of the mechanical arm mechanism model, comprising: controlling the mechanical arm to move along a multi-frequency combined sinusoidal excitation trajectory, and collecting joint position, joint speed, joint torque measurement data, and joint acceleration generated based on the joint speed to form a first data set; based on the first data set, the unknown parameters of the mechanism model are estimated by using a regression method to generate the estimated value of the unknown parameters of the mechanism model.

4. The method of claim 1, wherein, based on the preliminary dynamics prediction and the observed data of joint motor driving torque, a stochastic mathematical model of mechanism model residual is established, comprising: based on the driving torque of the joint motor, the regression matrix and the estimated value of the unknown parameters, the dynamics expression of the mechanical arm of the mechanism model residual is determined; based on the deterministic part and the randomness part, the dynamics expression of the mechanical arm of the mechanism model residual is converted into the stochastic mathematical model of the mechanism model residual: ; wherein, represents a deterministic part comprising parameter identification errors, friction effects and joint flexibility; represents a stochastic part comprising random disturbances and acceleration measurement errors.

5. The method of claim 1, wherein, the way of probabilistically learning the mechanism model residual by using a Bayesian neural network to output the predicted mean and predicted variance of the mechanism model residual, comprising: the second data set composed of the collected joint position, joint speed and joint torque measurement data is used as the input of the Bayesian neural network, the parameters of the Bayesian neural network are marginalized by using the Bayesian model averaging method to obtain the prediction distribution of the mechanism model residual; the predicted mean and predicted variance of the mechanism model residual are calculated and generated according to the prediction distribution.

6. The method of claim 5, wherein, The Bayesian neural network is trained by using an improved regularization loss function; the loss function is constructed based on the prior distribution of neural network parameters and the likelihood function of the second data set, and is optimized by using a stochastic gradient descent algorithm; the improved regularization loss function is: ; wherein W represents a neural network parameter, represents an output vector of the neural network, is the observed data of the mechanism model residual, N D represents the number of points in the data set.

7. The method of claim 1, wherein, An uncertainty adaptive control law of the data-driven acceleration-free signal is designed by using the preliminary dynamics prediction, the predicted mean and the predicted variance of the residual error, including defining an auxiliary variable: ; wherein, is the tracking error, q is the joint position, q d is the desired trajectory; s is the error manifold, Λ is a positive definite matrix; The uncertainty adaptive control law is determined by the following formula: wherein is a regression matrix determined based on auxiliary variables is a regression matrix determined based on auxiliary variables denotes an estimate of the parameter denotes a predicted mean of the residual is a feedback gain term The feedback gain term is adjusted in a manner that ; wherein, is a covariance of residuals output by the Bayesian neural network, and are a preset minimum feedback gain matrix and a maximum feedback gain matrix, respectively, is an adjustable diagonal positive definite matrix.

8. The method of claim 7, wherein, A manner of performing random stability analysis on the uncertainty adaptive control law of the data-driven acceleration-free signal includes: The deterministic adaptive control law is substituted into the mechanism model of the robot arm to obtain a closed-loop system equation containing a random term, and expressed in the form of a standard Ito stochastic differential equation; Based on a random Lyapunov function and an Ito lemma, the ultimate boundedness of an error manifold is determined; According to the ultimate boundedness of the error manifold, a semi-global exponential mean-square ultimate boundedness of a tracking error is determined to determine the random stability of the closed-loop system.

9. A mechanism-Bayesian joint modeling based robot control system, characterized in that, The system includes: A dynamics prediction generation module is configured to estimate parameters of a pre-constructed mechanism model of a robot arm to generate a preliminary dynamics prediction; A random mathematical model establishment module is configured to establish a random mathematical model of a residual error of the mechanism model based on a deviation between the preliminary dynamics prediction and observed data of a joint motor driving torque, by parameter identification and a random process; the random mathematical model is used to represent the residual error of the mechanism model, including a deterministic part and a random part; A probability learning module is configured to perform probability learning on the residual error of the mechanism model based on the random mathematical model of the residual error of the mechanism model, by using a Bayesian neural network, to output a predicted mean and a predicted variance of the residual error of the mechanism model; A control law generation module is configured to design an uncertainty adaptive control law of a data-driven acceleration-free signal by using the preliminary dynamics prediction, the predicted mean and the predicted variance of the residual error; A stability analysis module is configured to perform random stability analysis on the uncertainty adaptive control law, and generate a joint motor driving torque instruction by using the uncertainty adaptive control law that passes the random stability analysis; the joint motor driving torque instruction is used to control movement of each joint of the robot arm to achieve trajectory tracking.

10. An electronic device comprising a memory, a processor, the memory having stored therein a computer program executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method of any one of claims 1 to 8. The processor executes the computer program to implement the steps of the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Mechanical arm tactile external force estimation method based on mechanism data hybrid model

    CN114367990A

  • Heavy-load mechanical arm trajectory tracking and control method and system under dynamic working condition

    CN120116215A