Flexible joint hysteresis modeling and compensation control method for gru
Patent Information
- Application Number
- CN202310244604.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-03-14
AI Technical Summary
[0005]本发明针对未配置负载转矩传感器的低成本、轻型工业机器人柔性关节表现出的复杂迟滞特性高精度补偿控制问题,提供一种GRU的柔性关节迟滞特性建模与补偿控制方法
[0021] 1. Unlike the joint hysteresis modeling method between torque and reducer end torsion angle, this paper proposes a flexible joint hysteresis model that integrates forward and reverse stroke features of GRU neural network to indirectly describe the joint hysteresis characteristics of low-cost industrial robots equipped with only a single encoder and without load torque sensor.
Smart Images

Figure CN116100554B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, specifically to a method for modeling and compensating for the hysteresis characteristics of flexible joints in a GRU. Background Technology
[0002] In fields such as 3C (computers, communications, and consumer electronics), medical devices, and unmanned retail, flexibility is required in lightweight industrial robots to ensure safety when working in unknown environments. However, the complex hysteresis characteristics exhibited by the flexible joint actuators of lightweight industrial robots severely affect the dynamic performance and transmission accuracy of the joints. There are many reasons for the hysteresis characteristics of lightweight industrial robot joints, such as joint flexibility, nonlinear friction, gear backlash, and assembly errors. Because the hysteresis characteristics of flexible joints are highly nonlinear due to the influence of numerous factors, classical hysteresis modeling methods struggle to address all influencing factors.
[0003] Data-driven modeling methods, by studying relevant system data, can extract patterns and effectively describe complex hysteresis characteristics caused by multiple factors. Machine learning algorithms, with their powerful nonlinear mapping and generalization capabilities, can learn abstract patterns hidden behind data, making them a mainstream data-driven approach and finding application in hysteresis modeling. However, directly applying neural networks to hysteresis modeling cannot accurately describe hysteresis characteristics. Some literature proposes a multi-branch BP neural network model to effectively avoid overfitting in neural network hysteresis modeling; others, based on recurrent neural networks, divide the hysteresis model into a hysteresis sub-model and a frequency sub-model, enabling the model to accurately describe the frequency correlation of hysteresis characteristics. However, these studies do not directly consider the multi-valued correspondence and extreme point characteristics (non-smooth features) exhibited by hysteresis, but rather consider hysteresis correlation characteristics indirectly, resulting in complex hysteresis models that are not conducive to engineering implementation and application.
[0004] Furthermore, current modeling of robot joint hysteresis characteristics relies on the support of multiple sensors. Some literature constructs a nonlinear hysteresis relationship between joint output angle and joint output torque to describe joint output torque under different stiffnesses. Other literature addresses the hysteresis characteristics exhibited in robot joints by constructing the nonlinear hysteresis characteristics between current and torque in a magnetorheological clutch and proposing a torque compensation algorithm to improve the control accuracy of flexible joints. However, the joint hysteresis characteristic modeling methods in the aforementioned literature all presuppose the robot joint is equipped with a torque sensor. But for low-cost, lightweight industrial robot flexible joints without a load torque sensor, high-precision modeling of hysteresis characteristics and model-based compensation control to improve the transmission accuracy of low-cost, lightweight industrial robot joints remains a pressing engineering problem. Summary of the Invention
[0005] This invention addresses the problem of high-precision compensation and control of the complex hysteresis characteristics exhibited by the flexible joints of low-cost, lightweight industrial robots without load torque sensors, by providing a method for modeling and compensating for the hysteresis characteristics of flexible joints in GRUs.
[0006] To solve the above problems, the present invention is achieved through the following technical solution:
[0007] The method for modeling and compensating for the hysteresis characteristics of flexible joints in GRUs includes the following steps:
[0008] Step 1: The joint current sensor samples the motor drive current x(k) of the robot's flexible joint at the current time k.
[0009] Step 2: Perform Kalman filtering on the motor drive current x(k) at the current time k to obtain the preprocessed current signal x at the current time k. f (k);
[0010] Step 3: Preprocess the current signal x at time k. f (k) Perform Kalman filtering to obtain the filtered current signal x at time k. ff (k);
[0011] Step 4: Calculate the filtered current signal x at time k. ff (k) The filtered current signal x relative to the previous time k-1. ff The change in (k-1) Δx ff (k), and the change Δx of the filtered current signal at time k. ff (k) Perform Kalman filtering to obtain the hysteresis forward and backward variation characteristics x at the current time k. c (k);
[0012] Step 5: Take the preprocessed current signal x at time k obtained in Step 2. f (k) The hysteresis forward and reverse stroke variation characteristics at time k obtained in step 4. c (k), and the output Δθ of the GRU neural network hysteresis model at the previous time k-1. p (k-1) is fed into the GRU neural network hysteresis model to obtain the output Δθ of the GRU neural network hysteresis model at time k. p (k);
[0013] Step 6: Utilize the GRU neural network hysteresis model obtained in Step 5 to output Δθ at the current time k. p(k) The control angle setpoint θ at the motor end at the current time k. p (k) Perform compensation to obtain the motor end compensated control angle setpoint at time k. The control angle setpoint after compensation at time k is used as the current time. Provided to the motor drive end of the robot's flexible joint.
[0014] In step 4 above, the change Δx of the filtered current signal at time k is... ff (k) is:
[0015] Δx ff (k)=x ff (k)-x ff (k-1)
[0016] Where, x ff (k) represents the filtered current signal at time k, x ff (k-1) represents the filtered current signal from the previous time k-1.
[0017] In step 6 above, the motor end compensated control angle setpoint at time k is... for:
[0018]
[0019] Where, θ p (k) represents the control angle setpoint at time k, Δθ. p (k) represents the output of the GRU neural network hysteresis model at time k.
[0020] Compared with the prior art, the present invention has the following characteristics:
[0021] 1. Unlike the joint hysteresis modeling method between torque and reducer end torsion angle, this paper proposes a flexible joint hysteresis model that integrates forward and reverse stroke features of GRU neural network to indirectly describe the joint hysteresis characteristics of low-cost industrial robots equipped with only a single encoder and without load torque sensor.
[0022] 2. The unique characteristics of forward and reverse strokes in the joint hysteresis characteristics are incorporated into the GRU neural network hysteresis model. Using the current increment obtained after Kalman filtering, the features of the forward and reverse strokes are extracted to describe the multi-valued characteristics exhibited by the forward and reverse strokes in the current-motor end torsional angle hysteresis characteristics.
[0023] 3. Using historical information as the model input signal, a dynamic GRU neural network hysteresis model with memory and nonlinear mapping capabilities is constructed. Based on the compensation control of the hysteresis model, effective compensation for joint transmission errors is achieved. Attached Figure Description
[0024] Figure 1 This is a diagram of the GRU unit structure.
[0025] Figure 2 This is a structural diagram of the GRU neural network hysteresis model.
[0026] Figure 3 This is a schematic diagram of the multi-valued correspondence of hysteresis characteristics.
[0027] Figure 4 Using the input signal increment as the forward and reverse stroke characteristics, (a) is the time-varying plot of the input signal, and (b) is the increment feature plot of the input signal.
[0028] Figure 5 This is a comparison chart showing the changes in the increment before and after the second Kalman filter.
[0029] Figure 6 This is a comparison chart of the incremental signal before and after Kalman filtering.
[0030] Figure 7 A block diagram of a GRU neural network hysteresis model that integrates forward and reverse process features. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific examples.
[0032] The hysteresis characteristic of flexible joint actuators in lightweight industrial robots refers to the multi-valued correspondence between the output torque and the torsional angle at the motor end during reciprocating motion. Since this multi-valued correspondence is affected by the maximum or minimum values of historical input signals, it has memory properties. Therefore, neural network models with a certain memory capacity are suitable for modeling hysteresis characteristics.
[0033] A Gate Recurrent Unit (GRU) is a neural network model with a certain amount of memory. Its unique reset and update gates can remember or forget historical data, avoiding the expansion of the input space during hysteresis modeling. When dealing with long-term sequence problems, GRU has a longer memory and is less prone to gradient explosion or vanishing. GRU has fewer gate structures than the commonly used LSTM (Long Short-Term Memory), achieving the same effect as LSTM with less computation.
[0034] GRU unit structure as follows Figure 1 As shown, each GRU unit has two gate structures, namely the update gate z. j (k) and reset gate r j (k), and a hidden state These factors collectively determine the memory capacity of the GRU unit. Let the input signal... Let m be the input signals at time k. Then the mathematical expression of the GRU unit is as shown in formulas (1)-(4).
[0035] Update Gate Z j (k) is shown in formula (1):
[0036]
[0037] Among them, z j h(k) represents the output value of the updated gate at time k, and h(k-1) represents the n-dimensional vector consisting of the output values of the n GRU units at time k-1, i.e., h(k) = (h1(k), h2(k), ..., h j (k),...,h n (k)) T ,in and This represents the weight matrix of the updated gate. This represents the bias of the update gate, σ represents the sigmoid function, and (·) j This represents the j-th element.
[0038] Reset door r j (k) is shown in formula (2):
[0039]
[0040] Where, r j (k) indicates that the gate's output value is reset at time k. and This represents the weight matrix of the reset gate. This indicates the amount of offset to reset the door.
[0041] Hidden state As shown in formula (3):
[0042]
[0043] in, This represents the hidden state of the j-th GRU unit at time k. and Let tanh represent the weight matrix of the hidden state, and let tanh denote the hyperbolic tangent function. This represents the Hadamard product, which is the product of corresponding elements, b. jThis represents the bias of the hidden state.
[0044] GRU unit output h j (k) is shown in formula (4):
[0045]
[0046] Among them, h j (k) represents the output value of the j-th GRU unit at time k.
[0047] Figure 2 This is a structure diagram of a single-input, single-output GRU neural network (GRUNN) hysteresis model. The output values of n GRU units are weighted and summed to form the output layer of the GRU neural network hysteresis model, as shown in formula (5):
[0048] Δθ p (k)=W y h(k) (5)
[0049] Where, Δθ p (k) represents the output value of the output layer of the GRU neural network hysteresis model at time k, which is the predicted value of the motor end torsion angle of the GRU neural network hysteresis model. This represents the weights of the output layer.
[0050] The weights are updated using a backpropagation algorithm, and the loss function is shown in equation (6):
[0051] Where E(k) represents the loss function value at time k, Δθ(k) represents the target value of the model learning at time k, is the actual torsion angle at the joint motor end, and E represents the total loss function value of the training data.
[0052] Based on the GRU neural network hysteresis model, further consideration is given to the forward and reverse strokes and extreme value information of hysteresis characteristics, and the unique hysteresis features of the joint are incorporated into it, which becomes the key to high-precision modeling of the hysteresis characteristics of flexible joints.
[0053] Figure 3 This diagram illustrates the multi-valued correspondence of hysteresis characteristics. The arrows represent the trend of hysteresis characteristics changing with time. An increase in the input signal with time is called the positive stroke of the hysteresis characteristic, while a decrease is called the negative stroke. Specifically, the input signals at point p1 in the positive stroke and point p2 in the negative stroke are equal in magnitude, both x1, but the output signals correspond to two different values, y1 and y2. This situation, where the hysteresis characteristic corresponds to different output values y1 and y2 for the same input value x1, is called multi-valued correspondence.
[0054] 1) Feature extraction of multi-valued correspondences
[0055] The increment of the input signal is used as a feature to distinguish the different trends of the input signal during the forward and reverse strokes with hysteresis characteristics. The same input signal at different times is distinguished by different increments, and these are used as features of the input signal and input into the neural network.
[0056] Will Figure 3 After the input signal is expanded along the time axis, it is as follows: Figure 4 As shown in (a), let p′1 and p′2 represent the amplitude of this point. Since the amplitudes of points p′1 and p′2 are the same, i.e., p′1 = p′2, they cannot be distinguished without forward and backward stroke (time information) information, which also represents a kind of uncertainty. Points p′1 and p′2 after fusing forward and backward stroke features correspond to... Figure 4 (b) Points p″1 and p″2: 1) Point p′1 is at the positive end of the hysteresis characteristic curve, and the increment of the input signal is positive, corresponding to... Point 2) Point p′2 is located on the reverse stroke of the hysteresis characteristic curve, and the increment of the input signal is negative, corresponding to... Due to the correct process Reverse x Cp2 <0, that is Therefore, by using the increment of the input signal as the input feature of the neural network, points p′1 and p′2 with the same amplitude can be distinguished, that is, through the positive process... Reverse x Cp2 <0 indicates multiple values corresponding to different features.
[0057] 2) Weakening of the non-smoothness characteristics of extreme points
[0058] At the inflection point of the hysteresis characteristic curve, such as Figure 3 Point p3 in the model is considered an extreme point of the hysteresis characteristic, typically a location with significant modeling errors. The incremental characteristics of the input signal are used to map point p3 to... Figure 4 (b) At point p3″, the increment characteristic of the input signal in the positive and negative strokes of the same period is that the maximum point is formed by the positive increment of the input signal gradually changing to zero, while the minimum point is formed by the negative increment of the input signal gradually changing to zero. The positive and negative increments distinguish the different trends of the maximum and minimum values in the hysteresis characteristic curve. The continuously changing increments reduce the non-smoothness at the extreme points, making the poles tend to be differentiable.
[0059] Low-cost robotic flexible joint actuators without load torque sensors cannot use the relationship between torque and motor torsion angle to describe joint hysteresis characteristics. Considering the characteristic that motor drive current changes with load, the hysteresis characteristic between joint motor drive current and motor torsion angle is selected as modeling data to indirectly describe the hysteresis characteristics caused by load changes and the unique structure of the flexible joint itself.
[0060] The motor drive current sampled by the current sensor contains interference information introduced by the measurement. In order to extract the forward and reverse stroke characteristics of the hysteresis between the robot's flexible joint current and the motor end torsion angle, the actual sampled input current signal needs to be preprocessed.
[0061] x f (k)=KF(x(k)) (7)
[0062] In formula (7), KF(·) represents Kalman filtering, and the filtered value is x. f (k). The filtered residual signal (x(k)-x) f Frequency domain analysis of x(k) reveals that the signal sampled by the current sensor contains Gaussian white noise, making it difficult for the neural network to stabilize to the desired output, thus reducing modeling accuracy. Kalman filtering, a method for preprocessing the data, effectively removes Gaussian white noise from the input current signal. To obtain clear incremental features from the input current signal, the filtered result needs further processing.
[0063] x ff (k)=KF(x f (k)) (8)
[0064] Δx ff (k)=x ff (k)-x ff (k-1) (9)
[0065] In formula (8), KF(·) represents Kalman filtering, x ff (k) represents the result after the second Kalman filtering, and formula (9) represents the result after x. ff (k) Calculate the increment, and the result is expressed as Δx. ff (k). In order to obtain effective incremental characteristics from the input current signal, x f (k) It is then processed again using a Kalman filter. For example... Figure 5 As shown in the figure, a comparison of the changes in signal increment characteristics before and after the second Kalman filtering process reveals that the second Kalman filtering effectively smooths out x. f The fluctuation of the incremental feature in (k) is considered. However, calculating the increment of the signal amplifies high-frequency interference and introduces unnecessary noise, requiring further analysis of the incremental feature Δx. ff (k) processing.
[0066] x c (k)=KF(Δx ff (k)) (10)
[0067] In formula (10), KF(·) represents Kalman filtering, x c (k) represents an incremental feature with hysteresis forward and reverse stroke characteristics. Using x...ff The increment Δx of (k) ff (k) Describes the different trends of the input signal during the forward and reverse hysteresis strokes, and assigns Δx to... ff (k) Processing is performed using Kalman filtering. Kalman filtering can effectively filter out high-frequency noise introduced by the calculation increment, using the obtained x... c (k) is used as the feature input to the neural network to describe the hysteresis forward and backward changes. The results are as follows: Figure 6 As shown.
[0068] The overall block diagram of the GRU neural network hysteresis model integrating forward and reverse feature extraction is as follows: Figure 7 As shown. The hysteresis model proposed in this invention has three input signals, namely: 1) the input signal x representing the forward and retrace characteristics. c (k) is used to extract the different trends of the input current signal during the forward and reverse strokes; 2) Current signal x after data preprocessing f (k) is used to input the current signal with Gaussian white noise removed into the GRU neural network; 3) The historical value Δθ of the motor end torsion angle prediction information of the GRU neural network hysteresis model. p (k-1). The above three signals are used as inputs to the neural network to construct a dynamic GRU neural network hysteresis model. In the GRU neural network hysteresis model, this invention incorporates the multi-valued characteristics and non-smooth characteristics of extreme points unique to flexible joint hysteresis, which is the key to achieving high-precision modeling of joint hysteresis characteristics.
[0069] Figure 7 In the GRU neural network hysteresis model, parameter learning is achieved by comparing the actual motor end torsion angle Δθ(k) of the joint with the model output Δθ. p The deviation of (k) is calculated using the gradient descent method. x(k) represents the motor drive current sampled by the joint current sensor, x f (k) represents the current signal of x(k) after data preprocessing, x ff (k) represents x f (k) The result after Kalman filtering, Δx ff (k) represents x ff The change in (k), i.e., Δx ff (k)=x ff (k)-x ff (k-1), x c (k) represents the hysteresis forward and reverse stroke variation characteristics, and Δθ(k) represents the actual output motor-end torsion angle of the joint. Specifically, Δθ(k) is the difference between the set angle at the motor end and the measured angle at the actual motor end. p (k) represents the motor end torsion angle prediction result of the GRU neural network hysteresis model.
[0070] The compensation control methods are as follows:
[0071] The robot joint consists of a motor and a harmonic reducer. Based on the established joint model, the torsional angle Δθ at the motor end under varying loads is obtained. p (k). Let the control angle setting value at the motor end be θ. p (k), the control angle setting value of the compensated motor end is
[0072]
[0073] The impact of load variations on joint transmission errors is output through the joint model, specifically the torsional angle Δθ at the motor end. p (k) is reflected in this, and through Δθ. p (k) To achieve compensation control of the control angle setpoint at the motor end, and to achieve high-precision angle transmission of the robot joint.
[0074] Based on the above analysis, the present invention proposes a method for modeling and compensating for the hysteresis characteristics of a GRU's flexible joint, comprising the following steps:
[0075] Step 1: The joint current sensor samples the motor drive current x(k) of the robot's flexible joint at the current time k.
[0076] Step 2: Perform Kalman filtering on the motor drive current x(k) at the current time k to obtain the preprocessed current signal x at the current time k. f (k);
[0077] Step 3: Preprocess the current signal x at time k. f (k) Perform Kalman filtering to obtain the filtered current signal x at time k. ff (k);
[0078] Step 4: Calculate the filtered current signal x at time k. ff (k) The filtered current signal x relative to the previous time k-1. ff The change in (k-1) Δx ff (k), where Δx ff (k)=x ff (k)-x ff (k-1), and the change Δx of the filtered current signal at time k. ff (k) Perform Kalman filtering to obtain the hysteresis forward and backward variation characteristics x at the current time k. c (k);
[0079] Step 5: Take the preprocessed current signal x at time k obtained in Step 2.f (k) The hysteresis forward and reverse stroke variation characteristics at time k obtained in step 4. c (k), and the output Δθ of the GRU neural network hysteresis model at the previous time k-1. p (k-1) is fed into the GRU neural network hysteresis model to obtain the output Δθ of the GRU neural network hysteresis model at time k. p (k);
[0080] Step 6: Utilize the GRU neural network hysteresis model obtained in Step 5 to output Δθ at the current time k. p (k) The control angle setpoint θ at the motor end at the current time k. p (k) Perform compensation to obtain the motor end control angle setpoint after compensation at the current time k. in The control angle setpoint after compensation at time k is used as the current time. Provided to the motor drive end of the robot's flexible joint.
[0081] This invention addresses the hysteresis characteristics of low-cost, lightweight industrial robot flexible joints without load torque sensors. It employs a method where the motor drive current and motor-end torsion angle indirectly describe joint hysteresis characteristics, and proposes a flexible joint hysteresis model integrating forward and reverse stroke features using a GRU neural network. The model incorporates the unique forward and reverse stroke characteristics of the joint hysteresis into the GRU neural network hysteresis model. Utilizing Kalman filtering-based current increments, it extracts features from both forward and reverse strokes, describing the multi-valued characteristics exhibited by the forward and reverse strokes in the current-motor-end torsion angle hysteresis. Historical values predicted by the model are used as input to construct a dynamic GRU neural network hysteresis model with memory and nonlinear mapping capabilities, obtaining the motor-end torsion angle, which represents the compensation amount for the motor-end control angle setpoint. Based on the hysteresis model, effective compensation control of the motor-end control setpoint angle is achieved, enabling high-precision transmission of joint angles and reducing the impact of joint structure and load on joint performance.
[0082] It should be noted that although the embodiments described above are illustrative, they are not intended to limit the invention. Therefore, the invention is not limited to the specific embodiments described above. Any other embodiments obtained by those skilled in the art under the guidance of this invention without departing from its principles are considered to be within the protection scope of this invention.
Claims
1. A method for modeling and compensating for the hysteresis characteristics of flexible joints in GRUs, characterized by: The steps include the following: Step 1: The joint current sensor samples the motor drive current x(k) of the robot's flexible joint at the current time k. Step 2: Perform Kalman filtering on the motor drive current x(k) at the current time k to obtain the preprocessed current signal x at the current time k. f (k); Step 3: Preprocess the current signal x at time k. f (k) Perform Kalman filtering to obtain the filtered current signal x at time k. ff (k); Step 4: Calculate the filtered current signal x at time k. ff (k) The filtered current signal x relative to the previous time k-1. ff The change in (k-1) Δx ff (k), and the change Δx of the filtered current signal at time k. ff (k) Perform Kalman filtering to obtain the hysteresis forward and backward variation characteristics x at the current time k. c (k); Step 5: Take the preprocessed current signal x at time k obtained in Step 2. f (k) The hysteresis forward and reverse stroke variation characteristics at time k obtained in step 4. c (k), and the output Δθ of the GRU neural network hysteresis model at the previous time k-1. p (k-1) is fed into the GRU neural network hysteresis model to obtain the output Δθ of the GRU neural network hysteresis model at time k. p (k); Step 6: Utilize the GRU neural network hysteresis model obtained in Step 5 to output Δθ at the current time k. p (k) The control angle setpoint θ at the motor end at the current time k. p (k) Perform compensation to obtain the motor end compensated control angle setpoint at time k. The control angle setpoint after compensation at time k is used as the current time. Provided to the motor drive end of the robot's flexible joint.
2. The method for modeling and compensating for the hysteresis characteristics of flexible joints in a GRU according to claim 1, characterized in that, In step 4, the change Δx of the filtered current signal at time k is... ff (k) is: Δx ff (k)=x ff (k)-x ff (k-1) Where, x ff (k) represents the filtered current signal at time k, x ff (k-1) represents the filtered current signal from the previous time k-1.
3. The method for modeling and compensating for the hysteresis characteristics of flexible joints in a GRU according to claim 1, characterized in that, In step 6, the motor end compensated control angle setpoint at time k is... for: Where, θ p (k) represents the control angle setpoint at time k, Δθ. p (k) represents the output of the GRU neural network hysteresis model at time k.
Citation Information
Patent Citations
Electric current force control system and method for flexible multi-joint robot
CN109202889A
Spatial rotation mechanism gravity unloading device and method based on Kalman filtering
CN114771886A