Moxibustion robot mechanical arm real-time compliant control method and system based on state estimation

CN120422229BActive Publication Date: 2026-10-27LINGDONG INTELLIGENT ROBOT (HENAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510576639.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2026-10-27
Estimated Expiration
2045-05-06

AI Technical Summary

Technical Problem

[0009]本发明旨在解决传统机械臂柔顺控制中依赖高成本力矩传感器、动态响应滞后、环境适应性差以及模型误差导致的碰撞检测不可靠等问题,提出一种基于状态估计的艾灸机器人机械臂实时柔顺控制方法及系统,实现了机械臂在无需力矩传感器的条件下,通过智能算法实时精准检测碰撞并自适应调整柔顺控制,显著提升了安全性、响应速度和环境适应性

Benefits of technology

[0050]1、无力矩传感器设计:仅依赖电机电流和编码器数据,结合混合卷积LSTM(MC-LSTM)实现高精度力矩残差估计,通过消除对高精度力矩传感器的依赖,降低硬件成本、减少系统复杂度并提升可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120422229B_ABST
    Figure CN120422229B_ABST
Patent Text Reader

Abstract

The present application relates to moxibustion robot technical field, especially in kind of based on state estimation's moxibustion robot mechanical arm real-time compliance control method and system, through motor current data, encoder data and mechanical arm dynamics model calculation predicted torque and actual torque, and get residual torque;Collision trigger condition is defined based on at least one of static threshold condition, dynamic threshold condition and frequency domain analysis condition;Adaptive adjustment of the weight coefficients of static threshold condition, dynamic threshold condition and frequency domain analysis condition is generated by using mixed convolution long short-term memory network combined with elastic weight solidification constraint, and comprehensive trigger confidence is generated;Whether collision occurs is judged according to comprehensive trigger confidence, and the motion trajectory of the robot arm is adjusted through admittance controller when collision is detected.The present application realizes high-precision collision detection and adaptive compliant control of the robot arm in full speed range by intelligently fusing dynamic threshold, frequency domain analysis and static threshold, combining admittance control with real-time trajectory optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of moxibustion robot technology, and in particular to a real-time compliant control method and system for a moxibustion robot robotic arm based on state estimation. Background Technology

[0002] Real-time compliant control technology for the robotic arm of a moxibustion robot is crucial for achieving safe human-machine interaction, precision assembly, and dynamic environmental adaptation. Traditional solutions typically rely on torque sensors (such as six-dimensional force sensors) to directly detect external collisions or contact forces, but such solutions have the following drawbacks:

[0003] High hardware costs: High-precision torque sensors are expensive and need to be installed separately at the end of the robotic arm or joints, increasing system complexity and maintenance costs.

[0004] Dynamic response lag: Sensor signals need to be filtered and processed, which leads to delays in the control loop and makes it difficult to meet the real-time requirements of high-speed motion scenarios.

[0005] Poor environmental adaptability: Fixed threshold collision detection methods (such as static force threshold) cannot adapt to load changes or inertial interference under high-speed motion, which can easily lead to false triggering or missed detection.

[0006] Furthermore, while existing model-based torque estimation methods (such as Lagrangian dynamics) can reduce reliance on sensors, they suffer from the following problems:

[0007] Model error accumulation: Inaccurate calibration of robotic arm dynamic parameters (such as friction and inertia) can lead to deviations in residual torque calculation, reducing the reliability of collision detection.

[0008] Lack of continuous learning ability: Traditional neural networks are prone to "catastrophic forgetting" when tasks change, and cannot dynamically adjust threshold weights to adapt to new scenarios. Summary of the Invention

[0009] This invention aims to solve the problems of reliance on high-cost torque sensors, lag in dynamic response, poor environmental adaptability, and unreliable collision detection caused by model errors in the compliant control of traditional robotic arms. It proposes a real-time compliant control method and system for moxibustion robot robotic arms based on state estimation. This method enables the robotic arm to detect collisions accurately in real time and adaptively adjust compliant control without the need for torque sensors, significantly improving safety, response speed, and environmental adaptability.

[0010] To achieve the above objectives, the technical solution adopted is:

[0011] This invention provides a real-time compliant control method for a moxibustion robot arm based on state estimation, comprising the following steps:

[0012] Step 1: Calculate the predicted torque τ using motor current data, encoder data, and the robotic arm's dynamics model. estimated and actual torque τ actual And obtain the residual torque Δτ=τ actual -τ estimated ;

[0013] Step 2: Define collision triggering conditions based on at least one of static threshold conditions, dynamic threshold conditions, and frequency domain analysis conditions;

[0014] Step 3: Using a hybrid convolutional long short-term memory network combined with elastic weights to fix constraints, the weight coefficients α, β, and γ of the static threshold conditions, dynamic threshold conditions, and frequency domain analysis conditions are adaptively adjusted to generate a comprehensive trigger confidence score. Among them, C static C represents the confidence level of the static threshold condition. dynamic This indicates the confidence level of the dynamic threshold condition. Indicates the confidence level of the frequency domain analysis conditions;

[0015] Step 4: Determine whether a collision has occurred based on the comprehensive trigger confidence level C, and adjust the motion trajectory of the robotic arm through the admittance controller when a collision is detected.

[0016] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, further, in step 1, the predicted torque τ estimated Calculated using the following kinetic equations:

[0017]

[0018] Where M(q) is the inertia matrix, Here is the matrix of Coriolis force and centrifugal force, and G(q) is the gravity compensation term. This is a friction model, where q represents the position coordinates of each joint of the robotic arm, obtained directly by an encoder. This indicates the instantaneous velocity of the joint.

[0019] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, further, in step 1, the actual torque τ actual Calculated using the following formula:

[0020] τ actual =k t *i actual *N*η-τ friction -τ inertia

[0021] Where, k t Let i be the motor torque constant. actualWhere N is the actual phase current of the motor, η is the gear ratio of the reducer, and τ is the transmission efficiency. friction τ is the frictional torque of the transmission chain. inertia This is the equivalent inertial torque of the motor rotor and the reducer.

[0022] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the static threshold condition in step 2 is further defined as follows:

[0023]

[0024] Where, τ static This is a static threshold, suitable for collision detection at low speeds or when stationary.

[0025] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the dynamic threshold condition in step 2 is further defined as follows:

[0026]

[0027] Where, τ dynamic It is a dynamic threshold, suitable for collision detection under high-speed dynamic conditions;

[0028] τ dynamic The calculation formula is: Where β0 is the basic threshold offset, and β1 is the velocity weighting coefficient. β1 is the instantaneous acceleration of the joint, β2 is the acceleration weighting coefficient, β3 is the gravitational torque weighting coefficient, and G(q) is the gravity compensation term.

[0029] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the frequency domain analysis conditions in step 2 are further as follows:

[0030]

[0031] Among them, E i E represents the energy of joint i at the current collision frequency band. th,i Let Δt be the frequency domain energy threshold for joint i. over T is the time during which the energy continuously exceeds a threshold. min It has the shortest duration and is suitable for high-frequency impact collision detection.

[0032] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the hybrid convolutional long short-term memory network further includes the following layers:

[0033] Input layer: Receives and preprocesses multivariate time series data, which includes real-time residual torque Δτ and high-frequency energy E. highSliding mean of residual torque Predicted torque τ estimated Instantaneous velocity of joints Trajectory target and trajectory error;

[0034] Convolutional layers: extract spatial features through multiple filters;

[0035] LSTM layer: captures time dependencies and generates dynamic weight coefficients α, β, γ;

[0036] Output layer: Outputs the overall trigger confidence level C.

[0037] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the elastic weight solidification constraint in step 3 is further implemented through the following loss function:

[0038] L total =L new +λL EWC

[0039] Among them, L EWC =0.5*∑ i Ω i (w i -w i * ) 2 Ω i For weight w i The importance of w i w represents the weights used in training for the new task. i * The weights are the weights after training on the old task, λ is the regularization strength, and L is the weights. new This is a routine loss for new tasks.

[0040] According to the real-time compliant control method for the moxibustion robot arm based on state estimation of the present invention, the design of the admittance controller in step 4 is further based on the following target dynamic equation:

[0041]

[0042] Among them, M d D d K d These represent the virtual mass, damping, and stiffness matrices, respectively, F. ext For external forces, Indicates the reference speed of the end effector. denoted by , where x represents the reference acceleration of the end effector, and x represents the displacement deviation of the end effector.

[0043] Furthermore, the present invention also provides a real-time compliant control system for a moxibustion robot arm based on state estimation, used to implement the above-mentioned real-time compliant control method for a moxibustion robot arm based on state estimation, comprising:

[0044] Data acquisition module: used to acquire motor current, joint position and speed data;

[0045] Torque Calculation Module: Used to calculate predicted torque and actual torque, and generate residual torque;

[0046] Collision detection module: Detects collisions based on static thresholds, dynamic thresholds, and frequency domain analysis conditions;

[0047] MC-LSTM network module: used to adaptively adjust weight coefficients and generate comprehensive trigger confidence;

[0048] Admittance control module: Adjusts the movement trajectory of the robotic arm based on the collision detection results.

[0049] The beneficial effects achieved by adopting the above technical solution are:

[0050] 1. No torque sensor design: Relying only on motor current and encoder data, high-precision torque residual estimation is achieved by combining hybrid convolutional LSTM (MC-LSTM). By eliminating the dependence on high-precision torque sensors, hardware costs are reduced, system complexity is reduced, and reliability is improved.

[0051] 2. Dynamic threshold fusion: This invention uses MC-LSTM to adaptively generate static, dynamic, and frequency domain weight coefficients (α, β, γ), and innovates a dynamic threshold mechanism (α, β, γ weights are adaptive) to greatly reduce the false alarm rate, maintain high collision detection accuracy in variable load and variable speed scenarios, and solve the problem of poor adaptability of fixed threshold.

[0052] 3. Elastic Weight Consolidation (EWC): Prevents the model from forgetting old knowledge in continuous tasks and ensures the long-term stability of collision detection.

[0053] 4. Enhanced safety: Frequency domain energy monitoring can identify instantaneous impacts at the 0.1ms level, and with admittance control, the peak impact force is limited to below 80N. Attached Figure Description

[0054] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments of the present invention will be briefly described below. The drawings are merely illustrative of some embodiments of the present invention and are not intended to limit the scope of the present invention to all embodiments.

[0055] Figure 1 This is a flowchart illustrating the real-time compliant control method for a moxibustion robot arm based on state estimation, according to an embodiment of the present invention.

[0056] Figure 2 This is a schematic diagram of the layer structure of the hybrid convolutional LSTM according to an embodiment of the present invention;

[0057] Figure 3 This is a schematic diagram of the hierarchical structure of EWC according to an embodiment of the present invention. Detailed Implementation

[0058] The exemplary solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Unless otherwise defined, the technical or scientific terms used in this invention should have the ordinary meaning understood by one of ordinary skill in the art.

[0059] This embodiment discloses a real-time compliant control method for a moxibustion robot robotic arm based on state estimation, such as... Figure 1 As shown, it includes the following steps:

[0060] Step S1: Hardware Data Acquisition and Preprocessing

[0061] (1) Current signal acquisition:

[0062] The q-axis motor current i is sampled through the motor driver. q (Torque component in vector control) High-frequency noise is filtered out using a Butterworth low-pass filter:

[0063]

[0064] Where H(s) represents the filter transfer function, s represents the complex frequency variable (unit: rad / s), and w c This indicates the cutoff angular frequency (unit: rad / s).

[0065] (2) Acquisition of joint motion status

[0066] The position (angle or displacement) coordinates q of each joint of the robotic arm are measured using a multi-turn absolute encoder.

[0067] Instantaneous velocity of the joint The improved finite difference method is used to calculate the speed and direction of joint movement. Velocity is obtained by subtracting position differences using Kalman filtering.

[0068]

[0069] in, Let q represent the velocity estimate at time k. k The value represents the joint position measurement at time k, Δt represents the sampling time interval, and α represents the filter gain coefficient. dq represents the velocity estimate at time k-1. k-1This represents the direct difference velocity at time k-1.

[0070] Step S2: Real-time residual torque calculation.

[0071] ① Predicted torque from the dynamic equations

[0072] Using the Lagrange method and considering nonlinear friction, the dynamic model predicts the torque:

[0073]

[0074] Where, τ estimated The torque is estimated from the dynamic model, M(q) is the inertia matrix, calibrated using CAD parameters, and its unit is Nm*s. 2 / q; G(q) is the gravity compensation term, which is updated online to adapt to load changes, in Nm. This represents the Coriolis force and centrifugal force matrix, in Nm*s / rad. F friction This is a friction force model, with units of Nm.

[0075] Friction model:

[0076]

[0077] Among them, F c It is Coulomb friction (static friction), F v It is the viscous friction coefficient (related to the speed of the robotic arm), and sign() is the sign function.

[0078] ② Calculation of actual torque

[0079] The actual torque calculation is determined by the motor current and mechanical transmission parameters:

[0080] τ actual =k t *i actual *N*η-τ friction -τ inertia

[0081] Where, k t The torque constant of the motor (torque per unit current), in Nm / A; i actual The actual phase current of the motor (requires filtering and noise reduction), in amperes (A); N is the gear ratio of the reducer (e.g., for a 100:1 reduction ratio, N = 100); η is the transmission efficiency, τ friction τ is the frictional torque of the transmission chain. inertia This is the equivalent inertial torque of the motor rotor and the reducer.

[0082] τ friction The calculation formula is:

[0083]

[0084] Where, τ Coulomb This is the Coulomb friction force, which differs from the estimated torque.

[0085] τ coulomb =K t *I breakaway *η*N

[0086] Among them, K t η is the motor torque constant (torque per unit current), in Nm / A; η is the transmission efficiency; N is the gear ratio of the reducer; I breakaway This is the critical phase current of the motor (filtered for noise reduction), in amperes (A).

[0087] τ viscous Viscous friction:

[0088]

[0089] Among them, F v It is the coefficient of viscous friction. It is the rotational speed of the motor shaft.

[0090] τ inertia The equivalent inertial torque of the motor rotor and the reducer:

[0091]

[0092] Among them, J rotor It is the rotor inertia of the motor, J gears It is the equivalent inertia of the speed reducer.

[0093] ③ Calculation of residual moment

[0094] Definition of residual moment:

[0095] Δτ=τ actual -τ estimated

[0096] Where, τ actual For the actual torque, τ estimated To predict torque.

[0097] Calibration errors in the dynamic parameters of the robotic arm (such as link mass and center of mass position) may cause τ estimated Since steady-state error exists, static compensation is needed for the residuals. Static compensation for residuals:

[0098] Record the steady-state residual τ when there is no collision offset =E[Δτ], let the actual residual be:

[0099] Δτ net =Δτ-τoffect .

[0100] Step S103: Collision detection conditions are generated, providing three types of original detection conditions.

[0101] ① Static threshold condition

[0102] Static threshold conditions are applicable to low-speed motion scenarios. Or the robotic arm is stationary.

[0103] Triggering conditions:

[0104]

[0105] Where, τ static Set static thresholds for different joints:

[0106]

[0107] Where, σ i,noise Let σ be the standard deviation of the residual noise when the i-th joint is at rest. i,estimated It is the standard deviation of the model uncertainty, k i,safe This is for the safety factor.

[0108] ② Dynamic threshold condition

[0109] Dynamic threshold conditions are applicable to high-speed motion scenarios.

[0110] Triggering conditions:

[0111]

[0112] Where, τ dynamic For dynamic threshold, τ dynamic Dynamically adjust based on the speed, acceleration, and gravitational torque of the robotic arm:

[0113]

[0114] Where β0 is the basic threshold offset, β1 is the velocity weighting coefficient, β2 is the acceleration weighting coefficient, β3 is the gravitational torque weighting coefficient, and G(q) is the gravity compensation term. This refers to the instantaneous acceleration of the joint.

[0115] The reason for setting the adjustment coefficient is that, at high speeds, the torque fluctuations caused by system inertia may be greater, therefore the threshold needs to be widened as the speed increases. Dynamic threshold τ dynamic By linearly combining the motion state (velocity, acceleration) and load characteristics (gravitational torque) of the robotic arm, real-time adaptive adjustment is achieved, balancing collision detection sensitivity and anti-interference capability.

[0116] ③ Frequency domain analysis conditions

[0117] Applicable scenarios for frequency domain analysis conditions: Frequency domain analysis is used to detect the high-frequency energy of residual torque, and is suitable for rapid impact.

[0118] Triggering conditions:

[0119]

[0120] Among them, E i E represents the energy of joint i at the current collision frequency band. th,i Let Δt be the frequency domain energy threshold for joint i. over T is the time during which the energy continuously exceeds a threshold. men This represents the shortest duration.

[0121] Frequency domain analysis parameter calculations include:

[0122] ① Experimental calibration of collision frequency band

[0123] By conducting hammer impact or collision experiments, the spectral characteristics of the joints are recorded, and the target frequency band [f] of each joint is output. i,low ,f i,high For example, rigid collisions (robotic arm hitting metal): 50-200Hz. Flexible collisions (contact with a human arm): 10-50Hz.

[0124] ② Energy threshold calculation

[0125] Collect at least ten minutes of steady-state data under collision-free conditions and calculate the 95th quantile E of the target frequency band energy. i,95 Set the energy threshold to E th,i =3*E i,95 .

[0126] ③ Anti-aliasing filter

[0127] Filter cutoff frequency:

[0128] sampling frequency f s The Nyquist theorem (f) must be satisfied. s >=2*f high ).

[0129] The signal processing flow is as follows:

[0130] (1) Signal acquisition and preprocessing

[0131] DC offset removal: Eliminate sensor zero-point drift.

[0132] τ res id ual (t)=τ raw (t)-μt (t)

[0133] Where, τ residual It is the residual signal after DC removal, which directly serves high-frequency event (such as collision) detection; τ raw For the original signal, μ t This is the dynamic mean.

[0134] (2) Frame division and windowing

[0135] The purpose of framing is to divide a continuous signal into segments: this is based on the short-time stationary assumption applicable to spectral analysis.

[0136] Frame length N1: a trade-off between time and frequency resolution, for example, choosing 256 points (25.6ms@1kHz).

[0137] Frame shift: usually half the frame length (e.g., 128 points, with 50% overlap), to ensure that the starting point of a sudden collision does not happen to fall between two frames.

[0138] The purpose of adding the Hanning window is to reduce spectral leakage. The Hanning window function is:

[0139]

[0140] Where n is the index of the sampling point of the window function, and N is the total length of the window function (frame length).

[0141] (3) Frequency domain transformation and energy calculation

[0142] ① Fast Fourier Transform (FFT)

[0143] The core function of FFT is to convert a time-domain signal into a frequency-domain signal, as shown in the formula:

[0144]

[0145] Where x(n) is the discrete-time signal, and X(k) is the complex sequence in the frequency domain, representing the signal at frequency... Amplitude / phase at f s Where N is the sampling rate, and N is the number of FFT points.

[0146] ② Target frequency band energy calculation

[0147] Calculate the energy integral of the target frequency band:

[0148]

[0149] Index corresponding to the target frequency:

[0150]

[0151] Where Δf is the frequency resolution of the FFT:

[0152] To improve the robustness of collision detection, the above three conditions need to be combined appropriately. The complementary relationship among the three methods is as follows:

[0153] Static threshold: mainly used for contact detection at low speeds or when stationary, to prevent the detection of minute pressures due to excessively high constant thresholds.

[0154] Dynamic threshold: The threshold is dynamically adjusted during high-speed motion to avoid false alarms caused by inertia and model errors.

[0155] Frequency domain analysis: independent of amplitude for rapid impact detection (such as hammering, instantaneous collisions), and capable of handling concealed collisions with high frequency and low amplitude.

[0156] Step S104: Using a hybrid convolutional long short-term memory network (MC-LSTM) combined with elastic weight fixation (EWC) constraints, the weight coefficients α, β, and γ of the static threshold condition, dynamic threshold condition, and frequency domain analysis condition are adaptively adjusted to generate a comprehensive trigger confidence score. Among them, C static C represents the confidence level of the static threshold condition. dynamic This indicates the confidence level of the dynamic threshold condition. This indicates the confidence level of the frequency domain analysis conditions.

[0157] A hybrid convolutional LSTM (MC-LSTM) virtual force sensor method is proposed for efficient collision detection in moxibustion robots. By combining the local feature extraction capabilities of convolutional neural networks (CNNs) with the time-series modeling advantages of LSTMs, MC-LSTM performs excellently in dynamic environments and under multiple load conditions. The structure of MC-LSTM is as follows: Figure 2 As shown, it includes an input layer, a convolutional layer, an LSTM layer, and an output layer.

[0158] Input layer:

[0159] Multivariate time series data: The MC-LSTM model first receives time series data with multiple variables.

[0160] Data preprocessing: Standardize and normalize the input data to ensure consistent data distribution.

[0161] Feature extraction: Extracting preliminary features from the data to prepare for subsequent convolutional processing.

[0162] Batch processing: Divide the data into multiple batches and perform batch training to improve efficiency.

[0163] Convolutional layers:

[0164] Multiple filters: Apply multiple filters of different sizes or types to capture different spatial features in the data.

[0165] Feature map: Each filter generates a feature map, which records the feature response at different locations.

[0166] Activation functions (such as ReLU): Introducing nonlinearity through activation functions enhances the expressive power of the model.

[0167] Pooling: Downsampling the feature map reduces computation and enhances the robustness of the model.

[0168] LSTM layer:

[0169] Input Gate: Controls how the current input information updates the cell state.

[0170] Forget Gate: Determines how much information about the previous cell state is retained or forgotten.

[0171] Cell State: The memory unit that maintains the LSTM and is the main carrier of information.

[0172] Output Gate: Controls how information about the cell state is output as the current state.

[0173] Hidden State: Outputs the current LSTM cell state for use in the next time step or subsequent processing.

[0174] Output layer:

[0175] Fully connected layer: Maps the output of the LSTM layer to the final prediction result space.

[0176] Activation function (such as sigmoid or softmax): Select an appropriate activation function based on the task type to obtain the prediction result.

[0177] Prediction output: The final prediction result of the model, used for subsequent evaluation and feedback.

[0178] The MC-LSTM network uses a hierarchical structure to process input data at different time granularities. The calculation process of each layer's input and the corresponding network structure are as follows:

[0179] ① Level 1 (High-Frequency Detection Layer)

[0180] To capture transient collision pulses, the high-frequency detection layer inputs the following data: real-time residual torque Δτ with a 10ms granularity and high-frequency energy E. high (Energy integral from 50 to 200 Hz calculated by FFT).

[0181] The network architecture used in this layer includes convolutional layers (CNN) and lightweight LSTM units:

[0182] 1) Convolutional layers (CNN):

[0183] Multiple one-dimensional convolutional kernels (such as 3×1, 5×1) are used to extract local features of residual signals and high-frequency energy (such as abrupt peaks).

[0184] Activation function: ReLU, which enhances nonlinear expressive power.

[0185] Output: Spatial feature map (capturing the pulse pattern of transient collisions).

[0186] 2) Lightweight LSTM unit:

[0187] Input: Feature sequence output by the convolutional layer.

[0188] Structure: Single-layer LSTM (hidden_dim=32), capturing short-term time dependencies of high-frequency signals.

[0189] Output: High-frequency feature code h fast (For subsequent fusion).

[0190] ② Level Two (Load Adaptive Layer)

[0191] Input data: Moving average of residual torque at a 100ms granularity Predicted torque τ estimated Joint velocity

[0192] The network architecture used in this layer is a bidirectional LSTM (Bi-LSTM):

[0193] Input: The time series sequence of the above features (100ms window).

[0194] Structure: Two-layer bidirectional LSTM (hidden_dim=64), with forward and backward branches modeling the historical and future contexts respectively, capturing the long-term dependencies between load and residuals.

[0195] Output: Load dynamic encoding h mid .

[0196] ③ Level 3 (Task Context Layer)

[0197] Input data: 1-second granularity motion trajectory planning target (e.g., desired end pose) and actual trajectory error.

[0198] The network structure used in this layer is a fully connected encoder:

[0199] Input: The difference vector between the trajectory planning target and the error.

[0200] Structure: Two-layer fully connected (FC) network (hidden_dim=16), activation function is Tanh.

[0201] Output: Task phase code h slow (e.g., acceleration, constant speed, and precise positioning stages).

[0202] ④ Dynamic weight generation layer

[0203] Input feature concatenation:

[0204]

[0205] The network structure used in this layer is a fully connected layer + Softmax:

[0206] Input: Multi-level feature concatenation vector h fused ;

[0207] Output: Dynamic weights w t = [α,β,γ] (Softmax normalization).

[0208] Comprehensive trigger confidence calculation:

[0209] In neural networks, certain parameters are crucial for older tasks. Significantly modifying these parameters can lead to performance degradation on older tasks. When training new tasks, adding regularization terms limits the variation range of these important parameters, bringing them closer to their optimized values ​​for older tasks. Elastic Weight Consolidation (EWC) is a method for continuous learning designed to prevent the model from forgetting knowledge from older tasks when learning new ones. The implementation steps are as follows:

[0210] (1) Training and parameter saving of old tasks

[0211] The model is trained using the dataset from the old task, yielding the parameters w after training on the old task. * .

[0212] After training is complete, these weight parameters are saved to prepare for subsequent calculations of weight importance.

[0213] (2) Parameter importance quantification

[0214] Using the pre-trained model, the importance of each weight parameter is calculated. This is typically done by calculating Fisher information or the second derivative of the loss function with respect to the weights. Fisher information measures the sensitivity of each parameter to the loss function of the old task; the more important the weight, the greater its impact on the old task. The Fisher information matrix is ​​approximated by the mean of the squared gradients from the old task dataset.

[0215]

[0216] Among them, F i The larger the value, the greater the value of parameter θ. i The more important the old task.

[0217] (3) Define the EWC loss function

[0218] When training a new task, the total loss function is:

[0219] L total =L new +λL EWC

[0220] The EWC regularization term takes the form of:

[0221]

[0222] Among them, Ω i For weight w i The importance of w i w represents the weights used in training for the new task. i * The weights are the weights after training on the old task, λ is the regularization strength, and L is the weights. new The standard loss for new tasks (such as cross-entropy).

[0223] (4) Continuous expansion

[0224] After each task is completed, the Fisher information matrix and parameter anchors are updated, gradually accumulating multi-task constraints.

[0225] EWC constraints ensure that the weight coefficients of α, β, and γ generated in MC-LSTM remain stable during task switching, avoiding the forgetting of weight strategies from old scenarios.

[0226] Step S105: Determine whether a collision has occurred based on the comprehensive trigger confidence C, and adjust the motion trajectory of the robotic arm through the admittance controller when a collision is detected.

[0227] The overall trigger confidence threshold in this embodiment needs to be set according to the specific application scenario and security requirements. Each sub-confidence ∈ [0,1] (0 indicates no collision risk, 1 indicates a certain collision). In practical applications, the recommended threshold is [0.6,0.9]. The specific value needs to be calibrated through experiments.

[0228] When a collision is detected, F ext The reference trajectory will be adjusted by the input admittance controller.

[0229] The admittance controller is designed based on the following target dynamic equations:

[0230]

[0231] Among them, M d D d K d These represent the virtual mass, damping, and stiffness matrices, respectively, F. ext For external forces, Indicates the reference speed of the end effector. Let x represent the reference acceleration of the end effector, and let x represent the displacement deviation of the end effector. The desired reference acceleration of the end effector is calculated using the above formula. The original trajectory is then corrected using the desired reference acceleration.

[0232] The motor responds quickly through a PID controller, enabling the actual position to track the corrected trajectory.

[0233] Corresponding to the above method, this embodiment also discloses a real-time compliant control system for a moxibustion robot arm based on state estimation, comprising:

[0234] Data acquisition module: used to acquire motor current, joint position and speed data.

[0235] Torque Calculation Module: Used to calculate predicted torque and actual torque, and generate residual torque.

[0236] Collision detection module: Detects collisions based on static thresholds, dynamic thresholds, and frequency domain analysis conditions.

[0237] MC-LSTM network module: used to adaptively adjust weight coefficients and generate comprehensive trigger confidence.

[0238] Admittance control module: Adjusts the movement trajectory of the robotic arm based on the collision detection results.

[0239] Unless otherwise specifically stated, the components, steps, numerical expressions, and values ​​described in these embodiments do not limit the scope of the invention.

[0240] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0241] The units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations are not considered to be beyond the scope of this invention.

[0242] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This invention is not limited to any particular combination of hardware and software.

[0243] Finally, it should be noted that the above-described 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 the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features within the technical scope disclosed in the present invention; and these modifications 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, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A real-time compliant control method for a moxibustion robot arm based on state estimation, characterized in that, Includes the following steps: Step 1: Calculate the predicted torque using motor current data, encoder data, and the robotic arm's dynamics model. and actual torque And obtain the residual torque. ; Step 2: Define collision triggering conditions based on static threshold conditions, dynamic threshold conditions, and frequency domain analysis conditions; where the static threshold condition is: ,in, This is a static threshold, suitable for collision detection at low speeds or when stationary. Different static thresholds can be set for different joints: ,in, Let be the residual noise standard deviation when the i-th joint is at rest. It is the standard deviation of the model uncertainty. The safety factor; the dynamic threshold condition is: ,in, This is a dynamic threshold, suitable for collision detection under high-speed dynamic conditions. The calculation formula is: ,in, Based on the threshold offset, For speed weighting coefficients, This indicates the position coordinates of each joint of the robotic arm. Indicates the instantaneous velocity of the joint. The instantaneous acceleration of the joint. For acceleration weighting coefficients, This is the gravitational torque weighting coefficient. This is the gravity compensation term; the frequency domain analysis conditions are: ,in, Let i be the energy of joint i in the collision frequency band at the current moment. Let be the frequency domain energy threshold for joint i. The duration for which energy exceeds a threshold. For the shortest duration, it is suitable for high-frequency impact collision detection; Step 3: Employ a hybrid convolutional long short-term memory (MC-LSTM) network combined with elastic weights to solidify EWC constraints, adaptively adjusting the weight coefficients α, β, and γ of static threshold conditions, dynamic threshold conditions, and frequency domain analysis conditions to generate a comprehensive trigger confidence score. ,in, This represents the confidence level of the static threshold condition. This indicates the confidence level of the dynamic threshold condition. This represents the confidence level of the frequency domain analysis conditions; the hybrid convolutional long short-term memory network contains the following layers: Input layer: Receives and preprocesses multivariate time series data, which includes real-time residual torques. High-frequency energy Sliding mean of residual torque Predicted torque Instantaneous velocity of joints Trajectory target and trajectory error; Convolutional layers: extract spatial features through multiple filters; LSTM layer: captures time dependencies and generates dynamic weight coefficients α, β, γ; Output layer: Output overall trigger confidence level ; Step 4: Based on the overall trigger confidence level It determines whether a collision has occurred and adjusts the robotic arm's trajectory via the admittance controller when a collision is detected.

2. The real-time compliant control method for a moxibustion robot arm based on state estimation according to claim 1, characterized in that, Predicting torque in step 1 Calculated using the following kinetic equations: ,in, The inertia matrix, The matrix represents the Coriolis force and the centrifugal force. For gravity compensation, For friction force model, The position coordinates of each joint of the robotic arm are directly measured by the encoder. Indicates the instantaneous velocity of the joint. This refers to the instantaneous acceleration of the joint.

3. The real-time compliant control method for a moxibustion robot arm based on state estimation according to claim 1, characterized in that, Actual torque in step 1 Calculated using the following formula: ,in, The torque constant of the motor is... This represents the actual phase current of the motor. The gear ratio of the reducer. For transmission efficiency, For the frictional torque of the transmission chain, This is the equivalent inertial torque of the motor rotor and the reducer.

4. The real-time compliant control method for a moxibustion robot arm based on state estimation according to claim 1, characterized in that, In step 3, the elastic weight solidification constraint is implemented through the following loss function: ,in, , For weight The importance of As the weights in the current new task training, The weights are the weights after training on the old task. For regularization strength, This is a routine loss for new tasks.

5. The real-time compliant control method for a moxibustion robot arm based on state estimation according to claim 1, characterized in that, The design of the admittance controller in step 4 is based on the following target dynamic equation: M d + D d +K d x=F ext , of which M d D d K d These represent the virtual mass, damping, and stiffness matrices, respectively, F. ext For external forces, Indicates the reference speed of the end effector. denoted by , where x represents the reference acceleration of the end effector, and x represents the displacement deviation of the end effector.

6. A real-time compliant control system for a moxibustion robot arm based on state estimation, characterized in that, A method for implementing the real-time compliant control of a moxibustion robot arm based on state estimation as described in any one of claims 1-5 includes: Data acquisition module: used to acquire motor current, joint position and speed data; Torque Calculation Module: Used to calculate predicted torque and actual torque, and generate residual torque; Collision detection module: Detects collisions based on static thresholds, dynamic thresholds, and frequency domain analysis conditions; MC-LSTM network module: used to adaptively adjust weight coefficients and generate comprehensive trigger confidence; Admittance control module: Adjusts the movement trajectory of the robotic arm based on the collision detection results.

Citation Information

Patent Citations

  • Mechanical arm safety collision strategy based on external force observer

    CN108772838A

  • Urban short-term traffic flow prediction method and system based on hybrid convolution LSTM

    CN114360242A