Online moment compensation and control method and system for elastic joint
By adopting distributed clock synchronization, low-pass filtering and adaptive filtering algorithms in elastic joints, combined with nonlinear error compensation of RBF neural network, the problems of data fluctuations and delays in elastic joint torque control are solved, and accurate real-time torque control effect is achieved.
Patent Information
- Application Number
- CN202510069457.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2045-01-16
AI Technical Summary
The existing elastic joints have problems such as large data fluctuations and poor repeatability in torque control. The phase delay and physical delay brought by traditional filtering methods increase system delay, making it difficult to achieve accurate real-time torque control.
Data synchronization based on distributed clocks is adopted, combined with low-pass filtering and adaptive filtering algorithms, signal processing is performed through discrete Fourier transform and recursive least squares algorithm to eliminate the sinusoidal distribution error of the angle residual, and a nonlinear error compensation model is established using the RBF neural network to achieve accurate compensation of torque data.
It effectively eliminates data volatility, improves the accuracy of torque identification, and realizes accurate real-time torque control of elastic joints.
Smart Images

Figure CN119704199A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of robot joint precision control, and in particular to an elastic joint online torque compensation and control method and system. Background Art
[0002] Elastic joints represented by series elastic actuators have been widely studied due to their compact structure, impact resistance, low mechanical impedance and other advantages, and have been applied to many experimental robot platforms. Unlike the traditional method of measuring the output torque of robot joints through torque sensors, elastic joints calculate the torque output by measuring the displacement of elastic elements, which can achieve precise torque control and have broad application prospects in human-computer interaction and collaboration in unstructured environments. Due to the mechanical characteristics of the elastic joints themselves and the errors caused by mechanical installation, the collected data fluctuates greatly and has poor repeatability.
[0003] Signal decomposition methods such as Gaussian filtering can effectively reduce noise and improve the accuracy of torque calibration, but it will cause phase delays that are difficult to correct. At the same time, the elastic element is connected in series with the output end of the reducer, which has a certain physical delay and greatly increases the delay of the system. Therefore, ordinary filtering methods are only applicable to offline situations. At the same time, non-specific factors such as fluctuations in control bandwidth and frequency, current fluctuations, and torque pulsations will lead to errors that are difficult to estimate. Therefore, how to obtain the time-varying angle signal value through adaptive filtering methods, how to predict the fluctuation of angle measurement values through neural network methods, and accurately compensate for the error value of output torque in real time are the keys to achieving precise torque control. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, eliminate the volatility of data, and improve the accuracy of torque identification, the present invention adopts the following technical solutions:
[0005] An online torque compensation method for an elastic joint comprises the following steps:
[0006] Step 1: Collect the angle data and torque data of the motor end of the elastic joint and the output end of the elastic element respectively, and synchronize the data based on the distributed clock;
[0007] Step 2: Calibrate the encoder angle error offline based on low-pass filtering;
[0008] Step 3: The linear component in the angle residual after sinusoidal compensation presents a sinusoidal distribution, but its 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, and the transformed signal is normalized by the square root of its energy. Adaptive filtering is performed based on the recursive least squares algorithm (RLS) to solve the vertical component of the corresponding sinusoidal function, and then the linear component of the angle residual data is compensated twice 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, that is, the compensated encoder angle data;
[0009] Step 4: Collect the compensated angle, speed and torque data, establish a nonlinear error compensation model based on the RBF neural network, find the optimal number of network layers and weights, ensure the solution accuracy and numerical stability, train the nonlinear error compensation model through the collected data, output the nonlinear error compensation data, adaptively predict and compensate the nonlinear error of the encoder angle data, and verify the accuracy of torque identification through the torque sensor.
[0010] Furthermore, in step 1, the elastic joint is connected in series with the torque sensor and the servo motor in sequence, and 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 of the joint output 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 data synchronization is performed based on a distributed clock.
[0011] Furthermore, in step 2, due to the presence of a reducer and a spring element between the dual encoders, the collected angle data is greatly affected by impact and vibration. Therefore, a Butterworth low-pass filter is used to preprocess and enhance the encoder angle data to remove high-frequency information, thereby eliminating the influence of high-frequency noise. The low-frequency signal is error-superimposed according to the rotation angle, and the average error value during multiple rotations is calculated. Then, the combined error of the two encoder angles is sinusoidally compensated using a B-spline curve smooth interpolation.
[0012] Furthermore, in step 3, the discrete Fourier transform formula is as follows:
[0013] Since the linear convolution and linear correlation operations in the time domain adaptive filtering algorithm are large, resulting in increased computational complexity, the signal is transformed into the frequency domain through discrete Fourier transform, and convolution and other operations are replaced by frequency domain multiplication:
[0014]
[0015] Where x represents the time domain signal, N represents the length of the transformation interval, and k represents the frequency;
[0016] Through frequency domain transformation, the adaptive filter of a certain length is divided into sub-blocks which are integer multiples of the FFT length N, and the recursive least squares algorithm RLS in the frequency domain is performed on each sub-block of the input signal X.
[0017] Furthermore, in step 3, for each sub-block, the recursive steps in the transform domain are as follows:
[0018] Step 3.1: Set the objective function:
[0019]
[0020] Where d(n) represents the expected output signal, which is obtained by preprocessing and averaging, λ represents the forgetting factor, w(n) represents the filter coefficient, and n represents the order;
[0021] Step 3.2: Derivative the objective function with respect to w to make the gradient equal to 0, and obtain the formula for the filter coefficient:
[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, which is continuously updated according to the gain vector at each step. The time recursive formula is:
[0026] P(n)=R -1 (n) = (λR(n-1) + x(n)x T (n)) -1
[0027] Derived from matrix inversion:
[0028]
[0029] Step 3.4: Calculate the gain vector k(n):
[0030]
[0031] Step 3.5: Update filter coefficients:
[0032] w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)]
[0033] Set the initial filter coefficient w(0) to 0, P(0) = δ -1 IP(0)=δ-1 I, δ represents a small positive number, and I represents the unit matrix; for each moment n, the iterative prior error, gain vector, inverse covariance matrix and filter coefficient are repeatedly calculated, so that the corresponding filter has a 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 nodes in the hidden layer of the neural network; N represents the number of non-geometric error data samples; β i represents the weight between the input and output layers; c i and σ i They represent 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 posture, and y represents the nonlinear error compensation value. The neural network uses Bayesian regularization to limit the weight of the network to improve the generalization of the network.
[0039] A control method for online torque compensation of elastic joints, based on the above-mentioned online torque compensation method for elastic joints, also includes step 5: using the collected angle data as controller input, using the calculated torque data as a reference value for feedforward compensation, and performing precise torque control on the elastic joint through a torque control algorithm.
[0040] Furthermore, in step 5, the desired output torque value T d As the control input, combined with the spring calibrated stiffness coefficient k s and the adjusted PID controller C(s). Since both the motor-reducer and the motor-driver can be regarded as a model with a first-order delay characteristic, t0 and t1 are designed as the first-order delay function of the system. The angle data of the load end can not only be measured by the encoder, but also based on the inertia J of the load end. l And the calculated load end torque T l , can also be calculated through the dynamic model of the load end, and the angle data of the encoder measurement feedback and the angle data corresponding to the expected torque are added to the control loop, and the feedback control is combined with the feedforward control to perform precise torque control of the elastic joint.
[0041] A control system for online torque compensation of an elastic joint comprises an elastic joint, a torque sensor and a servo motor connected in sequence, wherein the elastic joint comprises 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 data synchronization is performed based on a distributed clock.
[0042] The advantages and beneficial effects of the present invention are:
[0043] An online torque compensation and control method for elastic joints of the present invention aims at the problems that traditional filtering methods have large delay, poor noise elimination effect and low torque control accuracy. After sinusoidal calibration is performed on the collected data, the online torque calibration of the elastic joints is performed through adaptive filtering decomposition and RBF neural network, and the residual is compensated twice, thereby eliminating the volatility of the data and improving the accuracy of torque identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flow chart of a method according to an embodiment of the present invention.
[0045] Figure 2 Schematic diagram of the system structure of an embodiment of the present invention.
[0046] Figure 3 It is the original measurement data in the embodiment of the present invention.
[0047] Figure 4 It is a flow chart of adaptive filtering in an embodiment of the present invention.
[0048] Figure 5 4 is a graph showing the neural network compensation result in an embodiment of the present invention.
[0049] Figure 6 2 is a comparison diagram of torque calibration results in an embodiment of the present invention.
[0050] Figure 7 4 is a flow chart of torque control in an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.
[0052] like Figure 1 As shown, an online torque compensation and control method for an elastic joint comprises the following steps:
[0053] Step 1: Figure 2As shown, an experimental bench system is designed, in which a servo motor 3, a torque sensor 2, and an elastic joint 1 are connected in series through a coupling, and the servo motor serves as an 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 which are connected in sequence. The elastic element 12 is connected in series with the reducer output end. 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 and the value of the torque sensor are measured respectively, and data synchronization is performed based on the distributed clock;
[0056] Step 2: The encoder is a magnetic encoder. The Butterworth low-pass filter is used to preprocess and enhance the angle data of the magnetic encoder. Since the integrated joint contains an elastic element 12 (spring element), the collected angle data is greatly affected by shock and vibration. Therefore, a low-pass filter is used to remove high-frequency information, and then the error of the low-frequency signal is superimposed according to the rotation angle to obtain the average error during multiple rotations. The comprehensive error of the two encoders is then smoothed and interpolated by a B-spline curve to perform sinusoidal compensation, as shown in Figure 3 shown.
[0057] Step 3: After sinusoidal compensation, the linear component in the angle residual presents a sinusoidal distribution, but its amplitude and phase change dynamically. 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 through discrete Fourier transform. The transformed signal is normalized by the square root of its energy, and adaptive filtering is performed based on the recursive least squares algorithm (RLS) to solve the vertical component of the corresponding sine function, and then the linear component of the residual data is compensated quadratically in real time. The discrete Fourier transform formula is as follows:
[0058] Since the linear convolution and linear correlation operations in the time domain adaptive filtering algorithm are large, resulting in increased computational complexity, the signal is transformed into the frequency domain through discrete Fourier transform, and convolution and other operations are replaced by frequency domain multiplication:
[0059]
[0060] Among them, x represents the time domain signal, N represents the length of the transformation interval, and k represents the frequency.
[0061] Through frequency domain transformation, an adaptive filter of a certain length is divided into sub-blocks which are integer multiples of the FFT length N, and an RLS algorithm in the frequency domain is performed on each sub-block of the input signal X.
[0062] For each sub-block, the recursive steps in the transform domain are as follows:
[0063] Step 3.1: Set the objective function:
[0064]
[0065] Among them, d(n) represents the expected output signal, which is obtained by preprocessing and averaging, λ represents the forgetting factor, w(n) represents the filter coefficient, and n represents the order.
[0066] Step 3.2: Let the objective function be differentiated with respect to w, so that the gradient is 0, and the formula for the filter coefficient is obtained:
[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, which is continuously updated according to the gain vector at each step. The time recursive formula is:
[0071] P(n)=R -1 (n) = (λR(n-1) + x(n)x T (n)) -1 (4)
[0072] Derived from matrix inversion:
[0073]
[0074] Step 3.4: Calculate the gain vector k(n):
[0075]
[0076] Step 3.5: Update filter coefficients:
[0077] w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)] (7)
[0078] Set the initial filter coefficient w(0) to 0, P(0) = δ -1 I, where δ is a very small positive number and I is the unit matrix; for each moment n, the iterative prior error, gain vector, inverse covariance matrix and filter coefficient are repeatedly calculated so that the corresponding filter has a faster convergence speed and tracking performance.
[0079] Perform inverse Fourier transform and sum the filtered sampled signals of different frequency components to obtain the filtered time domain signal, that is, the encoder angle information:
[0080]
[0081] Step 4: Collect the compensated angle information and torque information and calculate the speed information. Adaptively predict and compensate the nonlinear error of the encoder angle based on the RBF neural network, and verify the accuracy of the torque identification through the torque sensor. The nonlinear error compensation model established based on the RBF neural network is as follows:
[0082]
[0083] Among them, h represents the number of hidden layer nodes of the network model; M represents the number of non-geometric error data samples; β i represents the weight between the input and output layers; c i and σ i Respectively represent the center and width of the radial basis function; g represents the sigmoid activation function; θ represents the actual measured angle value of the joint posture, and y represents the nonlinear error compensation value. The neural network uses Bayesian regularization to restrict the weight of the network to improve the generalization of the network. The nonlinear error compensation results of the neural network are shown in Figure 5 shown.
[0084] Combine the linear error compensation result and the nonlinear error compensation result data to perform joint error compensation. The compensation data results are as follows: Figure 6 shown.
[0085] Step 5: Use the collected angle information as the controller input, use the calculated torque value as the reference value for feedforward compensation, and design the torque control algorithm. The specific control block diagram is as follows: Figure 7 As shown, the desired output torque value T d As the input of the control, k s is the spring stiffness coefficient after calibration, C(s) is the adjusted PID controller, since both the motor-reducer and the motor-driver can be regarded as a model with a first-order delay characteristic, t0 and t1 are designed as the first-order delay function of the system, and the angle of the load end can not only be measured by the encoder, but also calculated by the dynamic model of the load end, where J l is the inertia of the load end, T l is the calculated load end torque. The angle value fed back by the encoder and the angle value corresponding to the expected torque are added to the control loop, and the feedback control is combined with the feedforward control to achieve precise torque control of the elastic joint.
[0086] Aiming at the problem of joint torque fluctuation after low-pass filtering and sinusoidal calibration, the present invention proposes an online torque error compensation method for elastic joints based on adaptive filtering and neural networks, and realizes precise torque control based on compensated torque measurement information. For the linear components after data preprocessing, a transform domain adaptive filter is designed to compensate; for the nonlinear components that are difficult to predict and model, an RBF neural network is designed to adaptively predict and compensate for the nonlinear errors. The stiffness of the elastic element is solved, and the accuracy of the torque identification is verified by a torque sensor. Finally, the solved torque value is used as a reference input, and an elastic joint torque control algorithm is designed to realize high-precision torque control.
[0087] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An online torque compensation method for elastic joints, characterized in that The steps include: Step 1: Collect the angle data and torque data of the motor end of the elastic joint and the output end of the elastic element respectively, and synchronize the data based on the 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, convert the time domain signal of the angle residual after sine calibration into a frequency domain signal in real time through discrete Fourier transform, normalize it, perform adaptive filtering based on the recursive least squares algorithm, solve the vertical component of the corresponding sine function, and then perform quadratic compensation on the linear component of the angle residual data in real time; perform inverse Fourier transform, sum the filtered sampling signals of different frequency components, and obtain the filtered time domain signal, that is, the compensated angle data; Step 4: Collect the compensated angle, speed and torque data, establish a nonlinear error compensation model based on the neural network, find the optimal number of network layers and weights, ensure the solution accuracy and numerical stability, train the nonlinear error compensation model through the collected data, output the nonlinear error compensation data, adaptively predict and compensate the nonlinear error of the angle data, and verify the accuracy of the torque identification.
2. The method for online torque compensation of an elastic joint according to claim 1, characterized in that: In the step 1, the elastic joint (1) is sequentially connected in series with the torque sensor (2) and the servo motor (3); the elastic joint (1) comprises a joint motor end encoder (11), an elastic element (12) and an elastic element output end encoder (13) which are sequentially connected; 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 data synchronization is performed based on a distributed clock.
3. The method for online torque compensation of 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, perform error superposition on the low-frequency signal according to the rotation angle, calculate the average error during multiple rotations, and then perform B-spline curve smoothing interpolation sinusoidal compensation on the comprehensive angle error.
4. The method for online torque compensation of 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; Through frequency domain transformation, an adaptive filter of a certain length is divided into sub-blocks which are integer multiples of the FFT length N, and a recursive least squares algorithm in the frequency domain is performed on each sub-block of the input signal X.
5. The method for online torque compensation of an elastic joint according to claim 4, characterized in that: In step 3, for each sub-block, the recursive steps in the transform domain are as follows: Step 3.1: Set the objective function: Where d(n) represents the expected output signal, which is obtained by preprocessing and averaging, λ represents the forgetting factor, w(n) represents the filter coefficient, and n represents the order; Step 3.2: Derivative the objective function with respect to w to make the gradient equal to 0, and obtain the formula for the filter coefficient: 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, which is continuously updated according to the gain vector at each step. The time recursive formula is: P(n)=R -1 (n)=(λR(n-1)+x(n)x T (n)) -1 Derived from matrix inversion: Step 3.4: Calculate the gain vector k(n): Step 3.5: Update filter coefficients: w(n)=w(n-1)+k(n)[d(n)-x T (n)w(n-1)] Set the initial filter coefficient w(0) to 0, P(0) = δ -1 IP(0)=δ -1 I, δ represents a small positive number, and I represents the identity matrix; for each time instant n, the iterative prior error, gain vector, inverse covariance matrix, and filter coefficients are repeatedly calculated.
6. The method for online torque compensation of an elastic joint according to claim 1, characterized in that: In step 3, the inverse Fourier transform formula is as follows:
7. The method for online torque compensation of 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 nodes in the hidden layer of the neural network; N represents the number of non-geometric error data samples; β i represents the weight between the input and output layers; c i and σ i They represent the center and width of the radial basis function respectively; g represents the activation function; θ represents the actual measured angle data of the joint posture, 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 is based on an online torque compensation method for elastic joints as described in claim 1, and also includes step 5: using the collected angle data as controller input, using the calculated torque data as a reference value for feedforward compensation, and performing torque control on the elastic joint through a torque control algorithm.
9. The control method according to claim 8, characterized in that: In step 5, the desired output torque value T d As the control input, combined with the spring calibrated stiffness coefficient k s and the adjusted PID controller C(s), design the first-order delay function of the t0 and t1 systems, the angle data is obtained by measurement, and at the same time, based on the inertia J at the load end l And the calculated load end torque T l , calculated through the dynamic model of the load end, the angle data of the measured feedback and the angle data corresponding to the expected torque are added to the control loop, and the feedback control is combined with the feedforward control to perform the torque control of the elastic joint.
10. A control system based on the control method of online torque compensation of an elastic joint according to 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) comprises a joint motor end encoder (11), an elastic element (12) and an elastic element output end encoder (13) which are connected in sequence, and torque data output by the joint is calculated by measuring the displacement of the elastic element (12), and data synchronization is performed based on a distributed clock by measuring the angle data of the elastic joint motor end encoder (11) and the elastic element output end encoder (13).
Citation Information
Patent Citations
Torque-sensor-free dragging teaching method for robot
CN114310851A
Robot kinetic model identification method, terminal and medium
CN118050988A
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
Parameter identification for robots with a fast and robust trajectory design approach
KR1020170008486A
Cited By
Robot precision force control method and system based on deep learning
CN121403417A
Method and system for improving livestock and poultry meat segmenting and slitting precision through contour dynamic springback compensation
CN122194708A
A method and system for improving the cutting accuracy of livestock and poultry meat by contour dynamic rebound compensation
CN122194708B