Robot arm stability control method and system based on causal inference and quantum machine learning

By using causal inference and quantum machine learning methods, the core features of the robotic arm were screened out and a quantum machine learning model was constructed, which solved the problem of control stability of the robotic arm under complex working conditions and achieved high-precision and real-time control effects.

CN122033969APending Publication Date: 2026-05-15NANTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANTONG UNIV
Filing Date
2026-03-26
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing robotic arm stabilization control methods struggle to guarantee control stability under complex operating conditions. Feature selection, based solely on correlation analysis, cannot distinguish between causal and spurious correlations, leading to decreased accuracy in control deviation prediction and impacting control stability.

Method used

A method based on causal inference and quantum machine learning is adopted. Core features are screened through causal inference using LinearDML, and quantum machine learning models of QSVM and QRF are constructed to realize real-time control deviation prediction of the robotic arm. A hierarchical feedback adjustment strategy is adopted to generate stable control commands.

Benefits of technology

It significantly improves the control stability and deviation prediction accuracy of the robotic arm under complex working conditions, avoids motion overshoot and jitter, and improves operation accuracy and control real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122033969A_ABST
    Figure CN122033969A_ABST
Patent Text Reader

Abstract

The invention discloses a robotic arm stability control method and system based on causal inference and quantum machine learning, and the method comprises the steps: collecting historical robotic arm operation data, carrying out the preprocessing of the data, and obtaining a standardized data set; performing causal inference analysis on the standardized data set based on a linear double-machine learning model LinearDML, screening out core features, and constructing a core feature data set; constructing a quantum machine learning model fusing a quantum support vector machine QSVM and a quantum random forest QRF, and training to obtain a fusion model; acquiring and processing core feature data of a target robotic arm, inputting the trained fusion model, and outputting a real-time control deviation prediction result of the robotic arm; a stable control instruction is generated by adopting a hierarchical feedback adjustment strategy according to a control deviation prediction result, and real-time correction of motion parameters of the robotic arm is achieved; according to the invention, real-time, stable and high-precision control of the robotic arm under complex working conditions can be realized, and meanwhile, the transformation cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial robot control technology, and in particular relates to a method and system for stable control of a robotic arm based on causal inference and quantum machine learning. Background Technology

[0002] As the core execution equipment in intelligent manufacturing, the control stability of robotic arms directly determines the accuracy, efficiency and safety of operation. They are widely used in fields such as precision electronic assembly, automotive parts processing, intelligent logistics sorting, and aerospace component manufacturing.

[0003] Traditional robotic arm stabilization control methods mainly include classical PID control and traditional machine learning control. Their core is to collect robotic arm operational characteristic data, establish a correlation model between these characteristics and control deviations, and then adjust the robotic arm's motion parameters based on feedback. However, existing technologies have many technical shortcomings in practical applications, making it difficult to guarantee control stability under complex working conditions. Feature selection based solely on correlation analysis cannot distinguish between causal and spurious correlations between perceived features and control deviations. The introduction of numerous non-core relevant features increases the model's computational load and introduces feature interference, leading to decreased control deviation prediction accuracy and affecting control stability. Under complex working conditions, this can easily result in large prediction deviations and delayed control response. Summary of the Invention

[0004] Purpose of the invention: The purpose of this invention is to provide a stable control method and system for robotic arms based on causal inference and quantum machine learning, which enables high-precision control of robotic arms.

[0005] Technical solution: The present invention provides a method for stable control of a robotic arm based on causal inference and quantum machine learning, comprising:

[0006] Step 1: Collect historical robotic arm operation data, including data of each sensing feature and corresponding control deviation data. Preprocess the data to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization.

[0007] Step 2: Perform causal inference analysis on the standardized dataset based on the LinearDML machine learning model, calculate the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, select perceptual features with positive average causal contribution as core features, remove perceptual features without causal relationship, and construct the core feature dataset.

[0008] Step 3: Construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). Divide the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, and obtain the integrated model.

[0009] The core feature data of the target robotic arm is obtained by performing steps 1 to 2 on the target robotic arm and input into the trained fusion model to output the real-time control deviation prediction result of the robotic arm.

[0010] Step 4: Based on the control deviation prediction results, a hierarchical feedback adjustment strategy is adopted to generate stable control commands, which are then transmitted to the motion controller to achieve real-time correction of the robot arm's motion parameters.

[0011] Furthermore, in step 1, the preprocessing also includes using linear interpolation to complete consecutive missing data in the acquisition results;

[0012] The outlier removal process employs... Outliers should be removed using principles or the quartile method.

[0013] The feature encoding, wherein non-numerical features are encoded in binary;

[0014] The normalization process uses Min-Max normalization to map the data to... Interval.

[0015] Further, step 2 includes:

[0016] Define processing variables For data with single-dimensional perceptual features, the outcome variable To control for biased data, confounding variables In addition to the current analysis All other perceptual feature data; the standardized dataset is represented as , For the sample size; Randomly divided into subsets according to a preset ratio. and subsets ;

[0017] In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is Calculate the residuals of the processing variables , ;

[0018] In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is: Calculate the variable residuals : ;

[0019] In subset Above, for residuals and Perform linear regression, the formula is: ;

[0020] in, It is the average causal effect. This indicates that the current perceived features positively influence the control deviation data, and are therefore core features. The perceptual feature indicates no causal relationship and is therefore considered a distractor feature. The regression residuals follow a normal distribution. ;

[0021] Solve using the least squares method The estimated value : ;

[0022] The Individual Causal Effect (ITE) reflects the causal influence of the current feature on control bias in a single sample. The formula is as follows: ;

[0023] Using LinearDML, the calculation steps are repeated several times for each perceptual feature, and the dataset partitioning method is changed. The average value is used as the final causal contribution. ;

[0024] Iterate through all perceptual features and calculate the final causal contribution of each perceptual feature. ,reserve Features, remove and The characteristics, the core feature data after screening, and the control deviation data are compared. Combining, forming dimensions The core dataset, in which The number of core features.

[0025] Further, step 3 includes:

[0026] The core feature dataset is randomly divided into training sets according to a preset ratio. and test set ;

[0027] Let the number of core features be The training set dimension is , The training sample size is represented by the last column, which contains the control bias labels. The test set dimension is [dimension number missing]. ;

[0028] ZZFeatureMap, using the Qiskit framework, maps core feature data to a high-dimensional quantum Hilbert space. Let the classical core feature vector be... ,in It is the first Normalized values ​​of the core features; the quantum feature mapping function is , indicating that the vector The operation of mapping to a quantum state; then the mapped quantum state is:

[0029]

[0030] in, This is a Hadamard gate, used to achieve quantum superposition. It is a Z-axis revolving door. Will Encoded as quantum phase; It is a two-bit ZZ interaction gate that captures the coupling relationship between features; For the initial quantum state, All qubits are in the 0 state; For tensor products, used to construct multi-qubit states;

[0031] Quantum Support Vector Machine (QSVM) improves nonlinear fitting ability by replacing the kernel function of classical SVM with a quantum kernel function. The formula is as follows:

[0032]

[0033] in, It is the inner product of two quantum states, reflecting the quantum similarity between features;

[0034] Construct a pre-computed kernel SVM model, using the quantum kernel matrix as input, and complete the training by minimizing the following objective function:

[0035]

[0036] Constraints:

[0037] in, and For Lagrange multipliers; and Control bias labels for the training set; This is a penalty coefficient used to control the degree of overfitting in the model;

[0038] Optimize with 5-fold cross-validation The range of values ​​is The depth of the quantum feature mapping ranges from 1 to 3, and the evaluation metric is the mean square error. :

[0039]

[0040] in, To determine the number of samples in the validation set, These are the model's predicted values;

[0041] Quantum Random Forest (QRF) builds upon classical random forest by introducing quantum parallelism to evaluate decision tree splitting paths. Specifically, it uses a quantum probability distribution instead of the classical Gini coefficient.

[0042] eigenvalues ​​of decision nodes Quantum states are obtained through quantum feature mapping. Measure the probability distribution of each qubit Then the quantum Gini coefficient for:

[0043]

[0044] The smaller the value, the higher the purity of the characteristic splitting.

[0045] Constructing a decision tree ensemble with quantum shallow circuit constraints: Setting a depth threshold for the decision tree The number of decision trees is ;

[0046] For each decision tree, a subset of the dataset is generated by randomly sampling from the training set;

[0047] For each decision node, calculate the quantum Gini coefficient for all candidate features. ,choose The smallest feature is used as the splitting feature;

[0048] Repeat until the decision tree reaches the depth threshold. Or the number of node samples is less than the threshold;

[0049] Integrate the predictions from all decision trees, and take the mean for the regression task: , For the first The predicted values ​​of each decision tree;

[0050] Optimize the number of decision trees using 5-fold cross-validation. Value, depth threshold The evaluation index is the coefficient of determination. :

[0051]

[0052] in, To validate the mean of the set labels, The closer the model is to 1, the better the model fit.

[0053] Combining QSVM and QRF, a weighted fusion method is used to obtain the final predicted value:

[0054]

[0055] in, These are the predicted weights for the quantum support vector machine (QSVM) model. This represents the predicted control bias of the QSVM model for the input samples. These are the prediction weights for the quantum random forest (QRF) model. The weights are determined through verification on the test set;

[0056] The root mean square error and mean absolute error of the fusion model are calculated on the test set. The model training is complete when the root mean square error and mean absolute error are less than their respective preset thresholds.

[0057] Performing steps 1 and 2 on the target robotic arm yields the core feature data of the target robotic arm. ,Will Input the trained model, output the predicted control deviation value. .

[0058] Further, step 4 includes: setting a deviation threshold. Real-time control deviation prediction Divided into three levels: minor deviation , medium deviation and large deviations ;

[0059] For different deviation levels, the corresponding adjustment amount of the motion parameters is calculated using the following formula:

[0060]

[0061] in, For the first The angular adjustment range of each joint; This is the level adjustment coefficient; For real-time prediction of control deviation; This is the basic adjustment step length for this joint.

[0062] Furthermore, step 4 also includes continuously collecting the adjusted operational data, supplementing it to the core feature dataset, and periodically performing incremental training on the model to achieve model self-optimization iteration and ensure long-term stable control of the robotic arm.

[0063] Furthermore, the continuous collection and feedback of operational data, supplementing the core feature dataset and periodically performing incremental training on the model, enables self-optimization and iteration, ensuring long-term stable control of the robotic arm. Specifically:

[0064] Collect actual operational data of the robotic arm and supplement it to the core feature dataset;

[0065] Supplemented core feature data +Actual control deviation Adjustment batches and deviation levels are labeled by timestamp to construct an incremental dataset. ,when The number of samples reached the original core dataset The preset percentage triggers incremental training;

[0066] Establish the loss function:

[0067] in, This represents the number of samples in the incremental dataset. This represents the model's prediction for the incremental samples; The L2 regularization coefficient has a value of [value missing]. To prevent overfitting; For the set of updatable parameters of the model;

[0068] Configure parameter update rules:

[0069] in, For the learning rate, incremental training uses a small learning rate to avoid parameter oscillations. These are the original parameters of the model. The updated parameters;

[0070] Load the fusion model, freeze the model structure, and add the incremental dataset. The samples are mixed with a predetermined proportion of the original training set to form an incremental training set. The model parameters are iteratively updated according to the loss function and parameter update rules for a predetermined number of iterations. The root mean square error (RMSE) of the updated model is calculated using the test set. If it is less than the RMSE of the fused model, the new parameters are retained; otherwise, the original parameters are reverted to the original set.

[0071] After incremental training is complete, the updated model is deployed as a real-time prediction model; new operational data is continuously collected, and the above process is repeated, with the iteration cycle set according to the frequency of changes in operating conditions; continuous calculations are performed. Average deviation of each batch ,like The model is determined to be in an optimal state; if This triggers emergency incremental training; For the first Predicted real-time control deviation values ​​for each batch.

[0072] Based on the same inventive concept, this invention also provides a robotic arm stability control system based on causal inference and quantum machine learning, comprising:

[0073] An initialization module is used to collect historical robotic arm operation data, including data of various sensing features and corresponding control deviation data. The data is preprocessed to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization.

[0074] The dataset module is used to perform causal inference analysis on standardized datasets based on the LinearDML linear dual machine learning model. It calculates the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, selects perceptual features with positive average causal contribution as core features, removes perceptual features without causal relationship, and constructs the core feature dataset.

[0075] The fusion prediction module is used to construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). It divides the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, resulting in a fusion model. The module performs the initialization and dataset operations on the target robotic arm to obtain the core feature data of the target robotic arm, which is then input into the trained fusion model, and the module outputs the real-time control deviation prediction results of the robotic arm.

[0076] The correction module is used to generate stable control commands based on the control deviation prediction results using a hierarchical feedback adjustment strategy, and transmits them to the motion controller to realize real-time correction of the robot arm's motion parameters.

[0077] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories, and one or more programs, the programs being stored in the memory and configured to be executed by the processor, wherein when the programs are loaded onto the processor, they implement the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning as described in any of the preceding claims.

[0078] Based on the same inventive concept, the present invention also provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning as described in any of the preceding claims.

[0079] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: 1. By eliminating interference features without causal correlation through LinearDML causal inference, the influence of spurious correlations is avoided from the data source, greatly improving the control stability of the robotic arm under complex working conditions such as load fluctuations and changes in environmental resistance; 2. By integrating the quantum machine learning model of QSVM and QRF, the complex nonlinear correlation between features and control deviations is captured by quantum feature mapping, which greatly improves the deviation prediction accuracy compared with classical models, providing a reliable basis for precise control; 3. Differentiated adjustment strategies are matched according to the deviation level, realizing fine-tuning of small deviations and rapid correction of large deviations, effectively avoiding overshoot and jitter problems of robotic arm motion, balancing control real-time performance and smoothness, and improving operational accuracy. Attached Figure Description

[0080] Figure 1 This is a flowchart of a method according to an embodiment of the present invention;

[0081] Figure 2 This is a diagram showing the average causal contribution of each sensing feature to the control deviation in an embodiment of the present invention.

[0082] Figure 3 This is a comparison chart of the actual deviation and the model prediction deviation in an embodiment of the present invention;

[0083] Figure 4 This is a graph showing the change in accuracy of the model after incremental training in an embodiment of the present invention.

[0084] Figure 5 This is a comparison diagram of the deviation before and after the graded feedback adjustment in an embodiment of the present invention. Detailed Implementation

[0085] To enable those skilled in the art to better understand the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.

[0086] As attached Figure 1 As shown, the robotic arm stability control method based on causal inference and quantum machine learning in this embodiment includes:

[0087] Step 1: Collect historical robotic arm operation data, including data of each sensing feature and corresponding control deviation data. Preprocess the data to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization.

[0088] Step 2: Perform causal inference analysis on the standardized dataset based on the LinearDML machine learning model, calculate the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, select perceptual features with positive average causal contribution as core features, remove perceptual features without causal relationship, and construct the core feature dataset.

[0089] Step 3: Construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). Divide the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, and obtain the integrated model.

[0090] The core feature data of the target robotic arm is obtained by performing steps 1 to 2 on the target robotic arm and input into the trained fusion model to output the real-time control deviation prediction result of the robotic arm.

[0091] Step 4: Based on the control deviation prediction results, a hierarchical feedback adjustment strategy is adopted to generate stable control commands, which are then transmitted to the motion controller to achieve real-time correction of the robot arm's motion parameters.

[0092] Specifically, in step 1, a multi-source sensing and acquisition system for the robotic arm is built to collect sensing feature data such as pose, speed, torque, joint angle, and environmental resistance during operation, as well as corresponding control deviation data. After data cleaning, outlier removal, feature encoding, and normalization, a standardized dataset is obtained.

[0093] A multi-source sensing and acquisition system for the robotic arm was built, consisting of a laser pose sensor, a torque sensor, a photoelectric speed sensor, a joint angle encoder, and an environmental resistance sensor.

[0094] The data acquisition frequency is 100-500Hz, and the acquisition duration covers the entire operation cycle of the robotic arm, ensuring that the data includes features under all working conditions. Sensing feature data includes X / Y / Z three-axis pose (mm), joint rotation angles (°), joint torques (N·m), motion speed (mm / s), environmental resistance (N), and end effector pressure (MPa). Control deviation data includes pose deviation, velocity deviation, and torque deviation, all of which are absolute differences in their respective dimensions. Data storage and matching: Sensing feature data and control deviation data are matched one-to-one according to timestamps and stored as a structured dataset. Each data entry contains a "feature column + deviation result column".

[0095] The data preprocessing workflow consists of four steps: data cleaning, outlier removal, feature encoding, and normalization.

[0096] (1) Data cleaning

[0097] First, remove null data caused by sensor malfunction / signal loss. Then, use linear interpolation to fill in continuously missing data to avoid data gaps affecting subsequent analysis.

[0098] Let the missing data points be The valid data points before and after are (timestamp) ), (timestamp) ),but .

[0099] in, For the timestamps of missing data points, This is the value padded after interpolation.

[0100] (2) Outlier removal

[0101] use The principle (Raida criterion) identifies and removes outliers. It is applicable to perceptual features where the data follows a normal distribution. For non-normally distributed features, the interquartile range (IQR) method is used to remove outliers.

[0102] Calculate the mean of the feature data and standard deviation If data points satisfy If it is an outlier, it will be removed. , ,in, This represents the number of samples for the feature data.

[0103] Calculate the lower quartiles (25th percentile), upper quartile (75th percentile) to determine the range of outliers Values ​​outside this range are considered outliers. .

[0104] (3) Feature encoding

[0105] For non-numerical features in the dataset, binary encoding is used to convert them into numerical features, which facilitates model calculation.

[0106] (4) Normalization

[0107] All sensory features and control bias data are mapped using min-max normalization. Intervals are used to eliminate the influence of dimensional differences on the model.

[0108]

[0109] in, The value is the normalized value. For the original feature / bias data, The minimum value of this feature column. This is the maximum value of this feature column.

[0110] After the above steps, all data has been cleaned, denoised, encoded, and normalized, resulting in a standardized dataset with no null values, no outliers, and no dimension differences. The dataset has the following dimensions: , For the sample size, The number of feature columns plus the number of deviation result columns can be directly input into the causal inference module for subsequent analysis.

[0111] In step 2, causal inference analysis is performed on the standardized dataset based on the Linear Dual Machine Learning (LinearDML) model. The individual causal effect and average causal contribution of each perceptual feature to the control bias are calculated. Core features with positive average causal contribution are selected to construct a core feature dataset and interference features without causal relationship are removed.

[0112] Define variables: process variables Single-dimensional perceptual features; outcome variables Robotic arm control deviation; confounding variables In addition to the current analysis In addition, all other perceptual features are optimized to eliminate mutual interference between multiple features; the dataset is standardized. , The sample size is used to randomly divide the standardized dataset into two independent subsets. and (Ratio 1:1), used to fit the "processing model" and the "result model" respectively.

[0113] In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is Calculate the residuals of the processing variables , ;

[0114] In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is: Calculate the variable residuals : ;

[0115] In subset Above, for residuals and To perform linear regression and estimate the causal effect coefficient, the core formula is: ;

[0116] in, The average causal effect (ATE) is the average causal contribution of this perceived characteristic to the control bias. This indicates that the feature has a positive impact on control deviation and is a core feature. This indicates a lack of causal relationship and is a characteristic of interference. The regression residuals follow a normal distribution. ;

[0117] Solve using the least squares method The estimated value : .

[0118] Individual causal effect (ITE) reflects the causal impact of a characteristic on control bias in a single sample, and is expressed by the formula: .

[0119] The distribution of causal contribution of features can be plotted using ITE, which helps to determine the stability of features.

[0120] Implement LinearDML using Python's EconML library, repeating the above calculation three times for each feature, and changing the dataset partitioning method. The average value is used as the final causal contribution to avoid errors caused by random partitioning.

[0121] Traverse all perceptual features and calculate the average causal contribution of each feature. ,reserve Features, remove and The characteristics, the core features selected, and the control deviations are compared. Combining, forming dimensions The core dataset shows the distribution of the average causal contribution of each perceptual feature to control bias as follows: Figure 2 As shown. Among them This represents the number of core features, typically 40%-60% of the number of original features.

[0122] In step 3, a quantum machine learning model integrating quantum support vector machine (QSVM) and quantum random forest (QRF) is constructed. The core feature dataset is divided into training and testing sets to complete model training and hyperparameter tuning. The core feature data, which is collected in real time from the target robotic arm and preprocessed, is input into the trained model to output the real-time control deviation prediction results of the target robotic arm.

[0123] The core feature dataset obtained in step 2 is randomly divided into a training set in a 7:3 ratio. and test set The training set is used for model parameter learning, and the test set is used for performance verification. Data distribution consistency is ensured during the partitioning process.

[0124] Let the number of core features be The training set dimension is , The training sample size is represented by the last column, which contains the control bias labels. The test set dimension is [dimension number missing]. .

[0125] Mapping classical core feature data to a high-dimensional quantum Hilbert space is a core pre-operation in quantum machine learning, implemented using the ZZFeatureMap framework of Qiskit:

[0126] Let the classical core eigenvector be and the quantum eigenmap function be , then the mapped quantum state is:

[0127]

[0128] in, For the Hadham Gate, quantum superposition is achieved; It is a Z-axis revolving door. Encode classical eigenvalues ​​into quantum phases; It is a two-bit ZZ interaction gate that captures the coupling relationship between features; For the initial quantum state, All qubits are in the 0 state; Using tensor products, we can construct multi-qubit states.

[0129] QSVM improves nonlinear fitting ability by replacing the kernel function of classical SVM with a quantum kernel function. The core formula is:

[0130]

[0131] in, This inner product of two quantum states reflects the quantum similarity between features. Overstate vector simulation calculates this inner product, avoiding dependence on actual quantum hardware.

[0132] Construct a pre-computed kernel SVM model, using the quantum kernel matrix as input, and complete the training by minimizing the following objective function:

[0133]

[0134] Constraints:

[0135] in, For Lagrange multipliers; Control bias labels for the training set; This is the penalty coefficient, used to control the degree of overfitting in the model.

[0136] Optimize with 5-fold cross-validation The range of values ​​is The depth of the quantum feature mapping ranges from 1 to 3, and the evaluation metric is the mean squared error (MSE).

[0137]

[0138] in, To determine the number of samples in the validation set, These are the model's predicted values.

[0139] QRF, based on classical random forest, introduces quantum parallelism to evaluate the splitting path of the decision tree. The core is to replace the classical Gini coefficient with a quantum probability distribution:

[0140] eigenvalues ​​of decision nodes Quantum states are obtained through quantum feature mapping. Measure the probability distribution of each qubit Then the quantum Gini coefficient is:

[0141]

[0142] The smaller the value, the higher the purity of the eigenvalue split.

[0143] Constructing a decision tree ensemble with quantum shallow circuit constraints: Setting a decision tree depth threshold Number of decision trees .

[0144] Training process:

[0145] 1. For each decision tree, generate a subset of the dataset by randomly sampling from the training set (bootstrap sampling);

[0146] 2. For each decision node, calculate the quantum Gini coefficient for all candidate features. ,choose The smallest feature is used as the splitting feature;

[0147] 3. Repeat until the decision tree reaches the depth threshold or the number of node samples is < 5;

[0148] 4. Integrate the prediction results from all decision trees, and take the mean for the regression task: , For the first The predicted values ​​of each decision tree.

[0149] Optimize the number of decision trees using 5-fold cross-validation. (50-200) value, depth threshold (4-12), the evaluation index is the coefficient of determination. :

[0150]

[0151] in, To validate the mean of the set labels, The closer the value is to 1, the better the model fit.

[0152] Combining the high accuracy of QSVM with the stability of QRF, a weighted fusion method is used to obtain the final predicted value:

[0153]

[0154] in, These are the predicted weights for the quantum support vector machine (QSVM) model. This represents the predicted control bias of the QSVM model for the input samples. These are the prediction weights for the quantum random forest (QRF) model. The weights are determined through verification using the test set.

[0155] Calculate key metrics for the fusion model on the test set:

[0156] Root Mean Square Error (RMSE): .

[0157] Mean Absolute Error (MAE): .

[0158] The model training is complete if RMSE ≤ 0.005mm and MAE ≤ 0.003mm are met. Comparison of actual control bias and model prediction bias is shown below. Figure 3 As shown.

[0159] Real-time acquisition of core feature data of the robotic arm, followed by preprocessing in step 1 to obtain real-time feature vectors. ,Will Input the trained fusion model, perform rapid computation via quantum simulation (time ≤ 5ms), and output the predicted control deviation value. .

[0160] In step 4, a tiered feedback adjustment strategy is used to generate stable control commands based on the control deviation prediction results, which are then transmitted to the motion controller to achieve real-time correction of the robot arm's motion parameters.

[0161] It also includes continuously collecting operational data after feedback and adjustment, supplementing it to the core feature dataset, and periodically performing incremental training on the model to achieve model self-optimization and iteration, ensuring long-term stable control of the robotic arm.

[0162] Set a control deviation threshold to predict the control deviation in real time. Divided into three levels:

[0163] Micro deviation , medium deviation , large deviation .

[0164] For different deviation levels, calculate the corresponding adjustment amount of the motion parameters. The core formula is:

[0165]

[0166] in, for The angle adjustment of the first joint; This is the level adjustment coefficient; For real-time prediction of control deviation; This is the deviation threshold; This is the basic adjustment step length for this joint.

[0167] Collect actual operating data of the robotic arm and supplement it to the core feature dataset.

[0168] Adjusted core feature data +Actual control deviation An incremental dataset is constructed by labeling "adjustment batch" and "deviation level" with timestamps. ,when The number of samples reached the original core dataset At 10%-20%, incremental training is triggered, and the prediction accuracy of the trained model changes as follows: Figure 4 As shown.

[0169] Loss function:

[0170] in, This represents the model's prediction for the incremental samples; The L2 regularization coefficient has a value of [value missing]. To prevent overfitting; This is the set of parameters that can be updated for the model.

[0171] Parameter update rules:

[0172] in, For the learning rate, incremental training uses a small learning rate to avoid parameter oscillations. These are the original parameters of the model. These are the updated parameters.

[0173] Load the trained baseline model (the fusion model from step 3), freeze the model structure (quantum kernel mapping for QSVM, number of decision trees in QRF), and add the incremental dataset. Mixed with 10% of the original training set samples, this becomes the incremental training set. A comparison of the robotic arm control deviation before and after hierarchical feedback adjustment is shown below. Figure 5 As shown. Following the loss function and parameter update rules described above, iteratively update the model parameters for 50-100 iterations. Calculate the RMSE of the updated model using the test set. If... If the new parameter is correct, then retain the new parameter; otherwise, revert to the original parameter.

[0174] After incremental training is complete, the new model is deployed as a real-time prediction model. New operational data is continuously collected, the process is repeated, and the iteration cycle is set according to the frequency of changes in operating conditions. Continuous calculations are performed. Average deviation of each batch ,like The model is determined to be in an optimal state; if This triggers emergency incremental training.

[0175] Example 2, taking a 6-axis industrial robotic arm applied to a precision semiconductor component assembly scenario as an example (assembly accuracy requirement ±0.01mm, environmental resistance fluctuation 0-5N, working load 50-200g), the specific implementation is as follows.

[0176] A multi-source sensing system consisting of a laser pose sensor, a torque sensor, and a joint angle encoder was built. The acquisition frequency was set to 300Hz, and a total of 12,000 sets of data were collected (including 16 sensing features such as X / Y / Z pose, 6 joint rotation angles / torques, environmental resistance, and pose / velocity control deviations).

[0177] Use linear interpolation to complete 42 sets of consecutive missing data. The criteria eliminated 96 outliers, encoded the non-numerical feature of "component material" into binary, and mapped the data using Min-Max normalization. The interval is used to obtain a standardized dataset.

[0178] The average causal contribution of 16 features was calculated based on the LinearDML model, and 8 core features (average causal contribution > 0) were selected: X / Y / Z pose, motion velocity, joint rotation angle, end pressure, and environmental drag. The core feature dataset has a dimension of 12000×9.

[0179] The core dataset is divided into a 7:3 ratio, with 8400 training sets and 3600 test sets.

[0180] The quantum feature map uses ZZFeatureMap with a feature dimension of 8 and a depth of 2. The QSVM quantum kernel parameter is set to 2, and the number of QRF decision trees is 100 with a depth threshold of 8.

[0181] Weighted fusion, with QSVM weights of 0.55 and QRF weights of 0.45, achieved a pose deviation prediction accuracy of 98.2% and a velocity deviation prediction accuracy of 97.6% on the test set, with real-time prediction time ≤4ms.

[0182] Deviation threshold Grading rules: Micro deviation < 0.0005 mm, Medium deviation 0.0005-0.002 mm, Large deviation > 0.002 mm. Adjustment coefficient, Micro deviation , medium deviation , large deviation The basic joint adjustment step length is 0.001°;

[0183] For every 1200 new sets of data accumulated, 10% of the original core dataset is used to start incremental training. After 4 iterations, the model prediction accuracy is improved to 98.9%. During the assembly process, the control deviation of the robotic arm is stabilized within ±0.008mm, with no overshoot or jitter.

[0184] Example 3, based on the same inventive concept, also provides a robotic arm stability control system based on causal inference and quantum machine learning, including:

[0185] An initialization module is used to collect historical robotic arm operation data, including data of various sensing features and corresponding control deviation data. The data is preprocessed to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization.

[0186] The dataset module is used to perform causal inference analysis on standardized datasets based on the LinearDML linear dual machine learning model. It calculates the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, selects perceptual features with positive average causal contribution as core features, removes perceptual features without causal relationship, and constructs the core feature dataset.

[0187] The fusion prediction module is used to construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). It divides the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, resulting in a fusion model. The module performs the initialization and dataset operations on the target robotic arm to obtain the core feature data of the target robotic arm, which is then input into the trained fusion model, and the module outputs the real-time control deviation prediction results of the robotic arm.

[0188] The correction module is used to generate stable control commands based on the control deviation prediction results using a hierarchical feedback adjustment strategy, and transmits them to the motion controller to realize real-time correction of the robot arm's motion parameters.

[0189] Example 4, based on the same inventive concept, also provides a computing device, including: one or more processors, one or more memories, and one or more programs, the programs being stored in the memory and configured to be executed by the processor, the programs being loaded onto the processor to implement the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning as described in any of the preceding embodiments.

[0190] Example 5, based on the same inventive concept, also provides a storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning as described in any of the preceding embodiments.

[0191] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention.

Claims

1. A method for stabilizing and controlling a robotic arm based on causal inference and quantum machine learning, characterized in that, include: Step 1: Collect historical robotic arm operation data, including data of each sensing feature and corresponding control deviation data. Preprocess the data to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization. Step 2: Perform causal inference analysis on the standardized dataset based on the LinearDML machine learning model, calculate the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, select perceptual features with positive average causal contribution as core features, remove perceptual features without causal relationship, and construct the core feature dataset. Step 3: Construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). Divide the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, and obtain the integrated model. The core feature data of the target robotic arm is obtained by performing steps 1 to 2 on the target robotic arm and input into the trained fusion model to output the real-time control deviation prediction result of the robotic arm. Step 4: Based on the control deviation prediction results, a hierarchical feedback adjustment strategy is adopted to generate stable control commands, which are then transmitted to the motion controller to achieve real-time correction of the robot arm's motion parameters.

2. The robotic arm stability control method based on causal inference and quantum machine learning according to claim 1, characterized in that, In step 1, the preprocessing also includes using linear interpolation to complete consecutive missing data in the collected results; The outlier removal process employs... Outliers should be removed using principles or the quartile method. The feature encoding, wherein non-numerical features are encoded in binary; The normalization process uses Min-Max normalization to map the data to... Interval.

3. The robotic arm stability control method based on causal inference and quantum machine learning according to claim 1, characterized in that, Step 2 includes: Define processing variables For data with single-dimensional perceptual features, the outcome variable To control for biased data, confounding variables In addition to the current analysis All other perceptual feature data; the standardized dataset is represented as , For the sample size; Randomly divided into subsets according to a preset ratio. and subsets ; In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is Calculate the residuals of the processing variables , ; In subset Above, a random forest regression model was used to fit the data. right The mapping relationship is used to obtain the predicted value. The formula is: Calculate the variable residuals : ; In subset Above, for residuals and Perform linear regression, the formula is: ; in, It is the average causal effect. This indicates that the current perceived features positively influence the control deviation data, and are therefore core features. The perceptual feature indicates no causal relationship and is therefore considered a distractor feature. The regression residuals follow a normal distribution. ; Solve using the least squares method The estimated value : ; The Individual Causal Effect (ITE) reflects the causal influence of the current feature on control bias in a single sample. The formula is as follows: ; Using LinearDML, the calculation steps are repeated several times for each perceptual feature, and the dataset partitioning method is changed. The average value is used as the final causal contribution. ; Iterate through all perceptual features and calculate the final causal contribution of each perceptual feature. ,reserve Features, remove and The characteristics, the core feature data after screening, and the control deviation data are compared. Combining, forming dimensions The core dataset, in which The number of core features.

4. The robotic arm stability control method based on causal inference and quantum machine learning according to claim 1, characterized in that, Step 3 includes: The core feature dataset is randomly divided into training sets according to a preset ratio. and test set ; Let the number of core features be The training set dimension is , The training sample size is represented by the last column, which contains the control bias labels. The test set dimension is [dimension number missing]. ; ZZFeatureMap, using the Qiskit framework, maps core feature data to a high-dimensional quantum Hilbert space. Let the classical core feature vector be... ,in It is the first Normalized values ​​of the core features; the quantum feature mapping function is , indicating that the vector The operation of mapping to a quantum state; then the mapped quantum state is: ; in, This is a Hadamard gate, used to achieve quantum superposition. It is a Z-axis revolving door. Will Encoded as quantum phase; It is a two-bit ZZ interaction gate that captures the coupling relationship between features; For the initial quantum state, All qubits are in the 0 state; For tensor products, used to construct multi-qubit states; Quantum Support Vector Machine (QSVM) improves nonlinear fitting ability by replacing the kernel function of classical SVM with a quantum kernel function. The formula is as follows: ; in, It is the inner product of two quantum states, reflecting the quantum similarity between features; Construct a pre-computed kernel SVM model, using the quantum kernel matrix as input, and complete the training by minimizing the following objective function: ; Constraints: ; in, and For Lagrange multipliers; and Control bias labels for the training set; This is a penalty coefficient used to control the degree of overfitting in the model; Optimize with 5-fold cross-validation The range of values ​​is The depth of the quantum feature mapping ranges from 1 to 3, and the evaluation metric is the mean square error. : ; in, To determine the number of samples in the validation set, These are the model's predicted values; Quantum Random Forest (QRF) builds upon classical random forest by introducing quantum parallelism to evaluate decision tree splitting paths. Specifically, it uses a quantum probability distribution instead of the classical Gini coefficient. eigenvalues ​​of decision nodes Quantum states are obtained through quantum feature mapping. Measure the probability distribution of each qubit Then the quantum Gini coefficient for: ; The smaller the value, the higher the purity of the characteristic splitting. Constructing a decision tree ensemble with quantum shallow circuit constraints: Setting a depth threshold for the decision tree The number of decision trees is ; For each decision tree, a subset of the dataset is generated by randomly sampling from the training set; For each decision node, calculate the quantum Gini coefficient for all candidate features. ,choose The smallest feature is used as the splitting feature; Repeat until the decision tree reaches the depth threshold. Or the number of node samples is less than the threshold; Integrate the predictions from all decision trees, and take the mean for the regression task: , For the first The predicted values ​​of each decision tree; Optimize the number of decision trees using 5-fold cross-validation. Value, depth threshold The evaluation index is the coefficient of determination. : ; in, To validate the mean of the set labels, The closer the model is to 1, the better the model fit. Combining QSVM and QRF, a weighted fusion method is used to obtain the final predicted value: ; in, These are the predicted weights for the quantum support vector machine (QSVM) model. This represents the predicted control bias of the QSVM model for the input samples. These are the prediction weights for the quantum random forest (QRF) model. The weights are determined through verification on the test set; The root mean square error and mean absolute error of the fusion model are calculated on the test set. The model training is complete when the root mean square error and mean absolute error are less than their respective preset thresholds. Performing steps 1 and 2 on the target robotic arm yields the core feature data of the target robotic arm. ,Will Input the trained model, output the predicted control deviation value. .

5. The robotic arm stabilization control method based on causal inference and quantum machine learning according to claim 1, characterized in that, Step 4 includes: setting a deviation threshold. Real-time control deviation prediction Divided into three levels: minor deviation , medium deviation and large deviations ; For different deviation levels, the corresponding adjustment amount of the motion parameters is calculated using the following formula: ; in, For the first The angular adjustment range of each joint; This is the level adjustment coefficient; For real-time prediction of control deviation; This is the basic adjustment step length for this joint.

6. The robotic arm stability control method based on causal inference and quantum machine learning according to claim 1, characterized in that, Step 4 also includes continuously collecting the adjusted operation data, supplementing it to the core feature dataset, and periodically performing incremental training on the model to achieve model self-optimization and iteration, ensuring long-term stable control of the robotic arm.

7. The robotic arm stability control method based on causal inference and quantum machine learning according to claim 6, characterized in that, The continuous collection and feedback of operational data, supplemented to the core feature dataset, and periodically incrementally trained on the model, enables self-optimization and iteration, ensuring long-term stable control of the robotic arm. Specifically: Collect actual operational data of the robotic arm and supplement it to the core feature dataset; Supplemented core feature data +Actual control deviation Adjustment batches and deviation levels are labeled by timestamp to construct an incremental dataset. ,when The number of samples reached the original core dataset The preset percentage triggers incremental training; Establish the loss function: ; in, This represents the number of samples in the incremental dataset. This represents the model's prediction for the incremental samples; The L2 regularization coefficient has a value of [value missing]. To prevent overfitting; For the set of updatable parameters of the model; Configure parameter update rules: ; in, For the learning rate, incremental training uses a small learning rate to avoid parameter oscillations. These are the original parameters of the model. The updated parameters; Load the fusion model, freeze the model structure, and add the incremental dataset. The samples are mixed with a predetermined proportion of the original training set to form an incremental training set. The model parameters are iteratively updated according to the loss function and parameter update rules for a predetermined number of iterations. The root mean square error (RMSE) of the updated model is calculated using the test set. If it is less than the RMSE of the fused model, the new parameters are retained; otherwise, the original parameters are reverted to the original set. After incremental training is complete, the updated model is deployed as a real-time prediction model; new operational data is continuously collected, and the above process is repeated, with the iteration cycle set according to the frequency of changes in operating conditions; continuous calculations are performed. Average deviation of each batch ,like The model is determined to be in an optimal state; if This triggers emergency incremental training; For the first Predicted real-time control deviation values ​​for each batch.

8. A robotic arm stability control system based on causal inference and quantum machine learning, characterized in that, include: An initialization module is used to collect historical robotic arm operation data, including data of various sensing features and corresponding control deviation data. The data is preprocessed to obtain a standardized dataset. The preprocessing includes data cleaning, outlier removal, feature encoding and normalization. The dataset module is used to perform causal inference analysis on standardized datasets based on the LinearDML linear dual machine learning model. It calculates the individual causal effect and average causal contribution of each perceptual feature to the control deviation data, selects perceptual features with positive average causal contribution as core features, removes perceptual features without causal relationship, and constructs the core feature dataset. The fusion prediction module is used to construct a quantum machine learning model that integrates quantum support vector machine (QSVM) and quantum random forest (QRF). It divides the core feature dataset into training and testing sets to complete the training and hyperparameter tuning of the quantum machine learning model, resulting in a fusion model. The module performs the initialization and dataset operations on the target robotic arm to obtain the core feature data of the target robotic arm, which is then input into the trained fusion model, and the module outputs the real-time control deviation prediction results of the robotic arm. The correction module is used to generate stable control commands based on the control deviation prediction results using a hierarchical feedback adjustment strategy, and transmits them to the motion controller to realize real-time correction of the robot arm's motion parameters.

9. A computing device, characterized in that, include: One or more processors, one or more memories, and one or more programs, said programs being stored in the memory and configured to be executed by the processor, said programs being loaded onto the processor to implement the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a computer program, which includes program instructions that, when executed by a processor, cause the processor to perform the steps of the robotic arm stabilization control method based on causal inference and quantum machine learning according to any one of claims 1 to 7.