Elastic joint online torque compensation and control method and system
By combining adaptive filtering and RBF neural networks, the problem of data fluctuation in elastic joints under unstructured environments was solved, achieving precise torque control.
Patent Information
- Application Number
- CN202510069457.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-01-16
AI Technical Summary
In human-computer interaction collaboration in unstructured environments, elastic joints exhibit large data fluctuations and poor repeatability. Traditional filtering methods suffer from large delays and poor noise reduction, resulting in low torque control accuracy.
An adaptive filtering method combined with an RBF neural network is adopted. By synchronizing data with a distributed clock, sinusoidal calibration and frequency domain transformation are performed. Linear compensation is performed using a recursive least squares algorithm, and nonlinear errors are predicted by a neural network. Precise torque control is achieved by combining feedback and feedforward control.
It effectively eliminates data fluctuations, improves the accuracy of torque identification and control precision, and realizes precise torque control of elastic joints.
Smart Images

Figure CN119704199B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot joint precision control technology, and in particular to a method and system for online torque compensation and control of elastic joints. Background Technology
[0002] Elastic joints, represented by series elastic actuators, have been widely studied and applied in many experimental robot platforms due to their advantages such as small size, impact resistance, and low mechanical impedance. Unlike traditional robot joints that measure output torque using torque sensors, elastic joints calculate the joint's output torque by measuring the displacement of the elastic element, enabling precise torque control and showing broad application prospects in human-robot interaction and collaboration in unstructured environments. However, due to the inherent mechanical characteristics of elastic joints and errors caused by mechanical installation and fitting, the collected data exhibits large fluctuations and poor repeatability.
[0003] Signal decomposition methods such as Gaussian filtering can effectively reduce noise and improve the accuracy of torque calibration, but they introduce difficult-to-correct phase delays. Furthermore, the series connection between the elastic element and the reducer output introduces a physical delay, significantly increasing system latency. Therefore, ordinary filtering methods are only suitable for offline applications. Meanwhile, non-specific factors such as fluctuations in control bandwidth and frequency, current fluctuations, and torque pulsations can all lead to unpredictable errors. Therefore, the key to achieving precise torque control lies in obtaining time-varying angle signal values through adaptive filtering methods and predicting fluctuations in angle measurements using neural networks to accurately compensate for output torque errors in real time. Summary of the Invention
[0004] To address the shortcomings of existing technologies and achieve the goal of eliminating data fluctuations and improving the accuracy of torque identification, this invention adopts the following technical solution:
[0005] A method for online torque compensation of an elastic joint includes the following steps:
[0006] Step 1: Collect angle and torque data from the motor end and the output end of the elastic element of the elastic joint respectively, and synchronize the data based on a distributed clock;
[0007] Step 2: Based on low-pass filtering, calibrate the encoder angle error offline;
[0008] Step 3: The linear components in the angle residual after sinusoidal compensation exhibit a sinusoidal distribution, but their amplitude and phase change dynamically. Therefore, an adaptive filtering algorithm based on the transform domain is constructed. The time-domain signal of the angle residual after sinusoidal calibration is converted into a frequency-domain signal in real time through discrete Fourier transform. The transformed signal is normalized using the square root of its energy. Adaptive filtering is performed based on the recursive least squares (RLS) algorithm to solve for the vertical component of the corresponding sinusoidal function, and then the linear components of the angle residual data are compensated in real time. An inverse Fourier transform is performed to sum the filtered sampled signals of different frequency components to obtain the filtered time-domain signal, i.e., the compensated encoder angle data.
[0009] Step 4: Collect the compensated angle, velocity, and torque data, establish a nonlinear error compensation model based on the RBF neural network, find the optimal number of network layers and weights to ensure solution accuracy and numerical stability, train the nonlinear error compensation model with the collected data, output nonlinear error compensation data, adaptively predict and compensate for the nonlinear error of the encoder angle data, and verify the accuracy of torque identification through a torque sensor.
[0010] Further, in step 1, the elastic joint is connected in series with the torque sensor and the servo motor. The elastic joint includes a joint motor end encoder, a motor and a reducer, an elastic element and an elastic element output end encoder connected in sequence. The torque data output by the joint is calculated by measuring the displacement of the elastic element. The angle data of the elastic joint motor end encoder and the elastic element output end encoder are measured and synchronized based on a distributed clock.
[0011] Furthermore, in step 2, since there is a reducer and spring element in the middle of the dual encoders, the collected angle data is greatly affected by impact and vibration. Therefore, Butterworth low-pass filtering is used to preprocess and enhance the encoder angle data, remove high-frequency information, thereby eliminating the influence of high-frequency noise. The low-frequency signal is superimposed according to the rotation angle to calculate the average error during multiple rotations. Then, B-spline curve smoothing interpolation sine compensation is performed on the comprehensive error of the two encoder angles.
[0012] Furthermore, in step 3, the discrete Fourier transform formula is as follows:
[0013] Because the linear convolution and linear correlation operations in the time-domain adaptive filtering algorithm are computationally intensive, leading to increased computational complexity, the discrete Fourier transform is used to transform the signal to the frequency domain, and frequency domain multiplication is used to replace convolution and other operations.
[0014]
[0015] Where x represents the time-domain signal, N represents the length of the transformation interval, and k represents the frequency;
[0016] By transforming the frequency domain, the adaptive filter of a certain length is divided into sub-blocks that are integer multiples of the FFT length N. The recursive least squares (RLS) algorithm in the frequency domain is then applied to each sub-block of the input signal X.
[0017] Furthermore, in step 3, the recursive steps for the transform domain of each sub-block are as follows:
[0018] Step 3.1: Define the objective function:
[0019]
[0020] Where d(n) represents the desired output signal, which is obtained by averaging through preprocessing, λ represents the forgetting factor, w(n) represents the filter coefficients, and n represents the order;
[0021] Step 3.2: Differentiate the objective function with respect to w to make the gradient zero, and obtain the formula for the filter coefficients:
[0022]
[0023] R(n)=λR(n-1)+x(n)x T (n)
[0024] r(n) = λr(n-1) + x(n)d(n)
[0025] Step 3.3: Calculate the inverse covariance matrix. This is continuously updated at each step based on the gain vector. The time recursion formula is as follows:
[0026] P(n) = R -1 (n)=(λR(n-1)+x(n)x T (n)) -1
[0027] Derivation based on matrix inversion:
[0028]
[0029] Step 3.4: Calculate the gain vector k(n):
[0030]
[0031] Step 3.5: Update the filter coefficients:
[0032] w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)]
[0033] Set the initial filter coefficients w(0) to 0, and P(0) = δ -1 IP(0)=δ-1 I, δ represents a small positive number, and I represents the identity matrix; for each time n, the iterative prior error, gain vector, inverse covariance matrix and filter coefficients are repeatedly calculated to enable the corresponding filter to have faster convergence speed and tracking performance.
[0034] Furthermore, in step 3, the inverse Fourier transform formula is as follows:
[0035]
[0036] Furthermore, the neural network structure in step 4 is as follows:
[0037]
[0038] Where h represents the number of hidden layer nodes in the neural network; N represents the number of non-geometric error data samples; β i Indicates the weights between the input and output layers; c i and σ i θ represents the center and width of the radial basis function, respectively; g represents the sigmoid activation function; θ represents the actual measured angle data of the joint pose; and y represents the nonlinear error compensation value. The neural network uses Bayesian regularization to restrict the weights of the network, thereby improving the network's generalization ability.
[0039] A control method for online torque compensation of an elastic joint, based on the aforementioned online torque compensation method for an elastic joint, further includes step 5: using the collected angle data as the controller input, using the calculated torque data as the reference value for feedforward compensation, and using a torque control algorithm to perform precise torque control on the elastic joint.
[0040] Furthermore, in step 5, the desired output torque value T is... d As the input for control, it is combined with the stiffness coefficient k after spring calibration. s The adjusted PID controller C(s) is used because both the motor-reducer and motor-driver can be considered as models with first-order delay characteristics. Therefore, t0 and t1 are designed as the first-order delay functions of the system. The angle data at the load end can be obtained not only through encoder measurement but also based on the load end's inertia J. l and the calculated load-end torque T l Alternatively, it can be calculated through the dynamic model of the load end. The angle data measured and fed back by the encoder and the angle data corresponding to the desired torque are added to the control loop, and the feedback control and feedforward control are combined to achieve precise torque control of the elastic joint.
[0041] A control system for online torque compensation of an elastic joint includes an elastic joint, a torque sensor, and a servo motor connected in sequence. The elastic joint includes a joint motor end encoder, a motor and a reducer, an elastic element, and an elastic element output end encoder connected in sequence. The torque data output by the joint is calculated by measuring the displacement of the elastic element, and the angle data of the elastic joint motor end encoder and the elastic element output end encoder are measured and synchronized based on a distributed clock.
[0042] The advantages and beneficial effects of this invention are as follows:
[0043] This invention provides an online torque compensation and control method for elastic joints. Addressing the issues of large delays, poor noise reduction, and low torque control accuracy associated with traditional filtering methods, this method performs sinusoidal calibration on the collected data, then uses adaptive filtering decomposition and RBF neural network-based online torque calibration of the elastic joint to perform secondary compensation on the residuals. This eliminates data fluctuations and improves the accuracy of torque identification. Attached Figure Description
[0044] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of the system structure according to an embodiment of the present invention.
[0046] Figure 3 These are the original measurement data in the embodiments of the present invention.
[0047] Figure 4 This is an adaptive filtering flowchart in an embodiment of the present invention.
[0048] Figure 5 This is a diagram showing the neural network compensation result in an embodiment of the present invention.
[0049] Figure 6 This is a comparison chart of torque calibration results in embodiments of the present invention.
[0050] Figure 7 This is a flowchart of torque control in an embodiment of the present invention. Detailed Implementation
[0051] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0052] like Figure 1 As shown, an online torque compensation and control method for an elastic joint includes the following steps:
[0053] Step 1: As Figure 2As shown, an experimental platform system is designed, in which a servo motor 3, a torque sensor 2, and an elastic joint 1 are connected in series via a coupling. The servo motor serves as the input power source to provide power to drive the elastic joint to rotate.
[0054] The elastic joint 1 includes a joint motor end encoder 11, a motor and a reducer, an elastic element 12 and an elastic element output end encoder 13 connected in sequence. The elastic element 12 is connected in series with the output end of the reducer. The torque output by the joint is calculated by measuring the displacement of the elastic element 12.
[0055] The angle values of the encoder 11 at the motor end of the elastic joint and the encoder 13 at the output end of the elastic element are measured respectively, and the values of the torque sensor are synchronized based on a distributed clock.
[0056] Step 2: The encoder is a magnetic encoder. Butterworth low-pass filtering is used to preprocess and enhance the angle data of the magnetic encoder. Since the integrated joint contains elastic element 12 (spring element), the acquired angle data is significantly affected by impact and vibration. Therefore, low-pass filtering is used to remove high-frequency information. Then, the low-frequency signal is summed according to the rotation angle error to calculate the average error over multiple rotations. Finally, B-spline curve smoothing interpolation sine compensation is applied to the combined error of the two encoders. Figure 3 As shown.
[0057] Step 3: After sinusoidal compensation, the linear components in the angular residual exhibit a sinusoidal distribution, but their amplitude and phase change dynamically. For example... Figure 4 As shown, an adaptive filtering algorithm based on the transform domain is designed. The time-domain signal of the angle residual is converted into a frequency-domain signal in real time using the Discrete Fourier Transform (DFT). The transformed signal is normalized using the square root of its energy, and adaptive filtering is performed based on the Recursive Least Squares (RLS) algorithm to solve for the vertical component of the corresponding sine function. Then, the linear component of the residual data is compensated in real time. The DFT formula is as follows:
[0058] Because the linear convolution and linear correlation operations in the time-domain adaptive filtering algorithm are computationally intensive, leading to increased computational complexity, the discrete Fourier transform is used to transform the signal to the frequency domain, and frequency domain multiplication is used to replace convolution and other operations.
[0059]
[0060] Where x represents the time-domain signal, N represents the length of the transformation interval, and k represents the frequency.
[0061] By transforming the frequency domain, the adaptive filter of a certain length is divided into sub-blocks that are integer multiples of the FFT length N. The RLS algorithm in the frequency domain is then applied to each sub-block of the input signal X.
[0062] For each sub-block, the recursive steps for its transform domain are as follows:
[0063] Step 3.1: Define the objective function:
[0064]
[0065] Where d(n) represents the desired output signal, which is obtained by averaging through preprocessing, λ represents the forgetting factor, w(n) represents the filter coefficients, and n represents the order.
[0066] Step 3.2: Differentiate the objective function with respect to w to make the gradient zero, and obtain the formula for the filter coefficients:
[0067]
[0068] R(n)=λR(n-1)+x(n)x T (n)
[0069] r(n) = λr(n-1) + x(n)d(n)
[0070] Step 3.3: Calculate the inverse covariance matrix. This is continuously updated at each step based on the gain vector. The time recursion formula is as follows:
[0071] P(n) = R -1 (n)=(λR(n-1)+x(n)x T (n)) -1 (4)
[0072] Derivation based on matrix inversion:
[0073]
[0074] Step 3.4: Calculate the gain vector k(n):
[0075]
[0076] Step 3.5: Update the filter coefficients:
[0077] w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)] (7)
[0078] Set the initial filter coefficients w(0) to 0, and P(0) = δ -1 I, where δ is a very small positive number, and I is the identity matrix; for each time n, the iterative prior error, gain vector, inverse covariance matrix and filter coefficients are repeatedly calculated to enable the corresponding filter to have faster convergence speed and tracking performance.
[0079] Performing an inverse Fourier transform, summing the filtered sampled signals of different frequency components, yields the filtered time-domain signal, i.e., the encoder angle information:
[0080]
[0081] Step 4: Collect the compensated angle and torque information and calculate the speed information. Adaptively predict and compensate for the nonlinear error of the encoder angle based on the RBF neural network. Verify the accuracy of torque identification using a torque sensor. The nonlinear error compensation model established based on the RBF neural network is shown below:
[0082]
[0083] Where h represents the number of hidden layer nodes in the network model; M represents the number of non-geometric error data samples; β i Indicates the weights between the input and output layers; c i and σ i Let represent the center and width of the radial basis function, respectively; g represents the sigmoid activation function; θ represents the actual measured angle value of the joint pose; and y represents the nonlinear error compensation value. The neural network uses Bayesian regularization to constrain the network weights, improving the network's generalization ability. The nonlinear error compensation result of the neural network is as follows: Figure 5 As shown.
[0084] Joint error compensation is performed by combining the results of linear and nonlinear error compensation. The results of the compensation data are as follows: Figure 6 As shown.
[0085] Step 5: Use the acquired angle information as the controller input and the calculated torque value as the reference value for feedforward compensation to design the torque control algorithm. The specific control block diagram is shown below. Figure 7 As shown, the desired output torque value T d As the input to control, where k s Let J be the stiffness coefficient of the spring after calibration, and C(s) be the adjusted PID controller. Since both the motor-reducer and the motor-driver can be considered as a model with first-order delay characteristics, t0 and t1 are designed as the first-order delay functions of the system. The angle at the load end can be measured not only by the encoder but also calculated by the dynamic model of the load end, where J... l T is the inertia of the load end. l The calculated load-end torque is used. The angle value fed back by the encoder and the angle value corresponding to the desired torque are added to the control loop, combining feedback control and feedforward control to achieve precise torque control of the elastic joint.
[0086] This invention addresses the problem of joint torque fluctuations after low-pass filtering and sinusoidal calibration by proposing an online torque error compensation method for elastic joints based on adaptive filtering and neural networks. Precise torque control is achieved based on the compensated torque measurement information. Specifically, a transform domain adaptive filter is designed to compensate for the linear components after data preprocessing; for the nonlinear components that are difficult to predict and model, an RBF neural network is designed to adaptively predict and compensate for nonlinear errors. The stiffness of the elastic element is solved, and the accuracy of torque identification is verified using a torque sensor. Finally, the solved torque value is used as a reference input to design an elastic joint torque control algorithm, achieving high-precision torque control.
[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for online torque compensation of an elastic joint, characterized in that... Includes the following steps: Step 1: Collect angle and torque data from the motor end and the output end of the elastic element of the elastic joint respectively, and synchronize the data based on a distributed clock; Step 2: Calibrate the angle error based on low-pass filtering; Step 3: Construct an adaptive filtering algorithm based on the transform domain. In real time, the time-domain signal of the angle residual after sinusoidal calibration is converted into a frequency-domain signal through discrete Fourier transform and normalized. Adaptive filtering is performed based on the recursive least squares algorithm to solve for the vertical component of the corresponding sinusoidal function, and then the linear component of the angle residual data is compensated in real time. Inverse Fourier transform is performed to sum the filtered sampled signals of different frequency components to obtain the filtered time-domain signal, i.e., the compensated angle data. Step 4: Collect the compensated angle, velocity, and torque data, establish a nonlinear error compensation model based on a neural network, find the optimal number of network layers and weights to ensure solution accuracy and numerical stability, train the nonlinear error compensation model by collecting data, output nonlinear error compensation data, adaptively predict and compensate for the nonlinear error of the angle data, and verify the accuracy of torque identification.
2. The online torque compensation method for an elastic joint according to claim 1, characterized in that: In step 1, the elastic joint (1) is connected in series with the torque sensor (2) and the servo motor (3). The elastic joint (1) includes a joint motor end encoder (11), an elastic element (12) and an elastic element output end encoder (13) connected in series. The torque data output by the joint is calculated by measuring the displacement of the elastic element (12). The angle data of the elastic joint motor end encoder (11) and the elastic element output end encoder (13) are measured and the data is synchronized based on a distributed clock.
3. The online torque compensation method for an elastic joint according to claim 1, characterized in that: In step 2, Butterworth low-pass filtering is used to preprocess and enhance the angle data, remove high-frequency information, and superimpose the low-frequency signal according to the rotation angle to calculate the average error during multiple rotations. Then, B-spline curve smoothing interpolation sine compensation is performed on the comprehensive angle error.
4. The online torque compensation method for an elastic joint according to claim 1, characterized in that: In step 3, the discrete Fourier transform formula is as follows: Where x represents the time-domain signal, N represents the length of the transformation interval, and k represents the frequency; By transforming the frequency domain, the adaptive filter of a certain length is divided into sub-blocks that are integer multiples of the FFT length N. The recursive least squares algorithm in the frequency domain is then applied to each sub-block of the input signal X.
5. The online torque compensation method for an elastic joint according to claim 4, characterized in that: In step 3, for each sub-block, the recursive steps for its transform domain are as follows: Step 3.1: Define the objective function: Where d(n) represents the desired output signal, which is obtained by averaging through preprocessing, λ represents the forgetting factor, w(n) represents the filter coefficients, and n represents the order; Step 3.2: Differentiate the objective function with respect to w to make the gradient zero, and obtain the formula for the filter coefficients: R(n)=λR(n-1)+x(n)x T (n) r(n) = λr(n-1) + x(n)d(n) Step 3.3: Calculate the inverse covariance matrix. This is continuously updated at each step based on the gain vector. The time recursion formula is as follows: P(n)=R -1 (n)=(λR(n-1)+x(n)x T (n)) -1 Derivation based on matrix inversion: Step 3.4: Calculate the gain vector k(n): Step 3.5: Update the filter coefficients: w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)] Set the initial filter coefficients w(0) to 0, and P(0) = δ -1 IP(0)=δ -1 I, δ represents a small positive number, and I represents the identity matrix; for each time n, the iterative prior error, gain vector, inverse covariance matrix, and filter coefficients are repeatedly calculated.
6. The online torque compensation method for an elastic joint according to claim 1, characterized in that: In step 3, the inverse Fourier transform formula is as follows:
7. The online torque compensation method for an elastic joint according to claim 1, characterized in that: The neural network structure in step 4 is as follows: Where h represents the number of hidden layer nodes in the neural network; N represents the number of non-geometric error data samples; β i Indicates the weights between the input and output layers; c i and σ i θ represents the center and width of the radial basis function, respectively; g represents the activation function; θ represents the actual measured angle data of the joint pose; and y represents the nonlinear error compensation value.
8. A control method for online torque compensation of an elastic joint, characterized in that: The control method, based on the online torque compensation method for an elastic joint as described in claim 1, further includes step 5: using the collected angle data as the controller input, using the calculated torque data as the reference value for feedforward compensation, and using a torque control algorithm to perform torque control on the elastic joint.
9. The control method according to claim 8, characterized in that: In step 5, the desired output torque value T d As the input for control, it is combined with the stiffness coefficient k after spring calibration. s With the adjusted PID controller C(s), design the first-order delay function of the system at t0 and t1. The angle data is obtained through measurement. Simultaneously, based on the load's inertia J... l and the calculated load-end torque T l The torque control of the elastic joint is achieved by calculating the angle data obtained through the dynamic model of the load end, adding the angle data corresponding to the measured feedback and the desired torque into the control loop, and combining feedback control with feedforward control.
10. A control system based on the online torque compensation control method for an elastic joint as described in claim 8, comprising an elastic joint (1), a torque sensor (2), and a servo motor (3) connected in sequence, characterized in that: The elastic joint (1) includes a joint motor end encoder (11), an elastic element (12), and an elastic element output end encoder (13) connected in sequence. The torque data output by the joint is calculated by measuring the displacement of the elastic element (12), and the angle data of the elastic joint motor end encoder (11) and the elastic element output end encoder (13) are measured and the data is synchronized based on a distributed clock.
Citation Information
Patent Citations
Disc type permanent magnet motor control method and system with self-adaptive dead zone compensation
CN119134986A
Neural network-based Wollaston series nonlinear compensation method
CN119210593A