Compensation control method of robot flexible joints based on GRU neural network with feedback correction
By introducing feedback structure and Kalman filtering processing into the GRU neural network, a hysteresis model of flexible joints of light industrial robots was established, which solved the problem that the existing technology could not accurately describe complex hysteresis characteristics and achieved high-precision joint control.
Patent Information
- Application Number
- CN202211137827.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-09-19
AI Technical Summary
Existing hysteresis modeling methods cannot accurately describe the complex hysteresis characteristics of flexible joints of light industrial robots, especially in the case of no-load torque sensors.
A GRU neural network based on feedback correction is adopted to process input current through Kalman filtering, combine historical output signals and modeling errors, establish a hysteresis model, and correct the output value through feedback structure to improve modeling accuracy.
It effectively compensates for the hysteresis characteristics of flexible joints and improves joint angle execution accuracy. It is suitable for low-cost, high-precision light industrial robot applications.
Smart Images

Figure CN115319755B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a GRU (Gated Recurrent Unit) neural network robot flexible joint compensation control method based on feedback correction. Background Art
[0002] Light industrial robots are increasingly being used in 3C, welding, medical, parts assembly, and unmanned retail due to their safety, ease of use, and flexibility. The structural design of the joints and arms of light industrial robots usually enables the robot to obtain the highest possible load ratio with a light weight, meeting the needs of miniaturization and refinement while also bringing flexibility. The flexibility of the joints and arms leads to a decrease in the stability of the robot during movement, among which the flexible joints play a decisive role in the robot's dynamic performance, positioning accuracy, and motion smoothness. However, due to the presence of factors such as elastic deformation, nonlinear friction, backlash, and assembly errors, the input and output of the flexible joints exhibit complex hysteresis characteristics, which seriously affects the robot's dynamic performance and control accuracy.
[0003] With the development of artificial intelligence technology, data-driven modeling methods have been widely used in various fields. Among them, machine learning methods have become the mainstream data-driven methods with their powerful nonlinear fitting capabilities, and have been applied in the field of hysteresis modeling. The multi-value correspondence relationship shown by the hysteresis characteristics makes traditional feedforward neural networks powerless. The common method is to map the input-output relationship into a single-value correspondence problem by expanding the input space, and then use the neural network to fit. However, since the flexible joints of light industrial robots exhibit strong nonlinear, asymmetric and complex hysteresis characteristics, the existing hysteresis models are difficult to accurately describe their unique hysteresis characteristics. In addition, low-cost joint actuators without load torque sensors also bring difficulties to the modeling and compensation of hysteresis characteristics. Summary of the invention
[0004] Aiming at the problem that the existing hysteresis modeling method cannot accurately describe the special complex hysteresis characteristics of joints when there is no load torque sensor, the present invention provides a GRU neural network robot flexible joint compensation control method based on feedback correction.
[0005] To solve the above problems, the present invention is achieved through the following technical solutions:
[0006] The GRU neural network robot flexible joint compensation control method based on feedback correction includes the following steps:
[0007] Step 1: Input current i of the robot's flexible joint at time t <t>< / t> Perform Kalman filtering Kalman(i <t>< / t>) is used as the first input signal of the input layer of the improved GRU neural network at time t; at the same time, the output signal Δθ of the improved GRU neural network at time t-1 is <t-1>< / t-1> As the second input signal of the input layer of the improved GRU neural network at time t;
[0008] Step 2: First set the angle value of the robot's flexible joint at time t-1 The angle measurement value with the robot's flexible joint at time t-1 Subtract and obtain the torsion angle Δθ of the robot's flexible joint at time t-1 d <t-1>< / t-1> , where Δθ d <t-1>< / t-1> =θ d <t-1>< / t-1> -θ c <t-1>< / t-1> ; Then the torsion angle Δθ of the robot's flexible joint at time t-1 is d <t-1>< / t-1> And the output signal Δθ of the improved GRU neural network at time t-1 <t-1>< / t-1> By subtracting, we can get the modeling error e of the torsion angle at time t-1. <t-1>< / t-1> , where e <t-1>< / t-1> =Δθ d <t-1>< / t-1> -Δθ <t-1>< / t-1> ; Then the modeling error of the torsion angle at time t-1 is e <t-1>< / t-1> As the output compensation signal of the improved GRU neural network at time t;
[0009] Step 3: Based on the first input signal, the second input signal and the output compensation signal of the input layer of the improved GRU neural network at time t, the hidden layer of the improved GRU neural network establishes an association between the input current (first input signal) and the historical information of the output torsion angle (second input signal), and corrects the output of the improved GRU neural network by modeling the error (output compensation signal), and obtains the output signal Δθ of the output layer of the improved GRU neural network at time t <t>< / t> , to improve the joint modeling accuracy of the improved GRU neural network;
[0010] Step 4: Use the output signal Δθ of the output layer of the improved GRU neural network at time t <t>< / t> The angle setting value of the robot's flexible joint at time t Compensate and obtain the angle setting value of the robot's flexible joint after compensation at time t in And set the angle of the robot's flexible joint after compensation at time t Provided to the control end of the robot's flexible joints to achieve the purpose of improving the execution accuracy of the joint angles.
[0011] The mathematical model of the improved GRU neural network is as follows:
[0012]
[0013] Among them, Δθ <t>< / t> represents the output signal of the improved GRU neural network at time t, Δθ y <t>< / t> represents the intermediate output signal of the improved GRU neural network at time t, β represents the compensation coefficient, and e <t-1>< / t-1> represents the output compensation signal of the improved GRU neural network at time t, represents the update gate state of the improved GRU neural network at time t, represents the reset gate state of the improved GRU neural network at time t, represents the hidden state of the improved GRU neural network at time t, represents the first input signal of the improved GRU neural network at time t, represents the second input signal of the improved GRU neural network at time t, represents the intermediate output signal of the improved GRU neural network at time t-1, W z1 , W r1 and W 1 Represent the update gate, reset gate and hidden state respectively with the first input signal The corresponding weight, W z2 , W r2 and W 2 Represent the update gate, reset gate and hidden state respectively with the second input signal The corresponding weight, U z , U r and U represent the update gate, reset gate, and intermediate output signal in the hidden state, respectively. The corresponding weights; and b y They represent the update gate, reset gate and bias vector of the hidden state respectively; σ(·) represents the sigmoid activation function; tanh(·) represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product.
[0014] Compared with the prior art, the present invention describes the hysteresis characteristics of the joint under different loads by reflecting the characteristics between the motor drive current and the joint torsion angle that change with the load size in the case of a load torque sensor, and proposes a robot flexible joint hysteresis model based on a GRU neural network with feedback correction. The feedback structure is introduced on the basis of the GRU neural network, and the error between the model output value and the expected output value is used to form a compensation amount, which is fed back to the GRU neural network model to correct the output value of the GRU neural network model to improve the accuracy of the GRU neural network model of the joint. The flexible joint hysteresis model predicts the torsion angle that changes with the load as a compensation amount, modifies the angle setting value of the joint, and indirectly realizes effective compensation for the error caused by the joint hysteresis characteristics from the joint input end. The present invention is a low-cost compensation control method, which is conducive to the widespread popularization of low-cost, high-precision, lightweight industrial robots in high-end intelligent manufacturing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is the hysteresis curve between current and torsion angle.
[0016] Figure 2 This is the GRU unit structure diagram.
[0017] Figure 3 This is the structure diagram of the GRU neural network.
[0018] Figure 4 Block diagram of the GRU neural network hysteresis model based on feedback correction.
[0019] Figure 5 This is the schematic diagram of the GRU neural network robot flexible joint compensation control method based on feedback correction. DETAILED DESCRIPTION
[0020] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific examples.
[0021] In order to model the hysteresis characteristics between the motor drive current and the joint torsion angle reflecting the load change in the absence of a load torque sensor, and to describe the complex hysteresis characteristics of the joint as the load changes, the present invention proposes a flexible joint hysteresis modeling method based on a feedback-corrected GRU (Gated Recurrent Unit) neural network. Based on the hysteresis model, the joint drive current is compensated and controlled through feedforward compensation control. Under low-cost conditions, the hysteresis characteristics of the joint with load changes are effectively compensated, thereby improving the output accuracy of the joint angle.
[0022] The motor drive current reflects the change in load size and indirectly determines the motor output torque. In the absence of a load torque sensor, by establishing a model to describe the hysteresis characteristics between the motor drive current and the output torsion angle, it will help to achieve low-cost hysteresis modeling and compensation. The current is obtained by the current sensor inside the joint, and the torsion angle is defined as:
[0023] Δθ=θ d -θ c (1)
[0024] Among them, θ d is the theoretical output angle (i.e. angle setting value), θ c is the actual output angle (i.e. the angle measurement value), and Δθ is the deviation between the theoretical output angle and the actual output angle, i.e. the torsion angle.
[0025] Figure 1 The hysteresis characteristic curve between the joint motor drive current and the joint torsion angle obtained in the experiment reveals that the fluctuation of the input current causes the curve to show serious nonlinearity and multi-value correspondence, which increases the difficulty of joint modeling. Figure 1 It is known that the hysteresis characteristic is comprehensively manifested in the joint actuator as the output at the current moment is not only related to the input data at the current moment, but also related to the historical input data of the system, which is consistent with the description of the time series problem. Therefore, this invention constructs a hysteresis model based on the GRU neural network with long-term memory capability.
[0026] Gated recurrent unit (GRU) is a variant of traditional RNN (recurrent neural network), which solves the problem of RNN's weak long-term memory ability. Compared with long short-term memory network (LSTM), both can effectively learn the intrinsic relationship in long time series, but GRU has fewer gate structures, fewer parameters to learn, and relatively faster learning speed. Studies have shown that GRU performs better than LSTM in some cases with small amounts of data. The GRU unit structure is shown in the figure below. Figure 2 As shown, its mathematical model is as follows:
[0027]
[0028] in, represents the update gate state of the j-th GRU unit at time t, represents the reset gate state of the j-th GRU unit at time t, represents the hidden state of the jth GRU unit at time t, and They represent the output signals of the jth GRU unit at time t and the moment before time t, i.e., time t-1, respectively. <t>< / t> represents the input signal at time t; W z , Wr , W represent the update gate, reset gate and hidden state respectively <t>< / t> The corresponding weight; U z , U r , U represent the update gate, reset gate and hidden state respectively The corresponding weights; b j They represent the update gate, reset gate and bias vector of the hidden state respectively; σ(·) represents the sigmoid activation function; tanh(·) represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product, which refers to the multiplication of elements in corresponding positions.
[0029] Update Gate Determine the output of the GRU unit at the current time t The degree of historical information that needs to be forgotten and the new information that needs to be added, reset the gate Determine hidden state The degree of forgetting historical information. The two gate structures have the functions of selecting and storing historical information, which together determine the GRU unit's ability to process time series data.
[0030] The output of the hysteresis characteristic is not only related to the input signal at the current moment, but also affected by the historical input signal. In order to solve the problem of hysteresis modeling's dependence on historical data, the GRU neural network can effectively learn the potential correlation of the input time series. A single GRU unit can adaptively capture relevant information at different time scales. Connecting multiple GRU units in parallel as part of the hidden layer of the neural network can further enhance the learning ability of the neural network under strong interference. Figure 3 As shown, multiple GRU units are connected in parallel as the hidden layer of the GRU neural network. The input layer of the GRU neural network is represented by x <t>< / t> Represents the input time series. Each recurrent unit in the hidden layer of the GRU neural network represents a GRU unit, and the gate represents the number of GRU units. After many experiments, the network will obtain good results when n is 20. The output layer of the GRU neural network y <t>< / t> =W y h <t>< / t> , W y is the output layer weight vector, Where T is the transposition operation. The loss function at time t is as follows:
[0031]
[0032] Among them, y <t>< / t> is the output value of the GRU neural network at time t; is the target value at time t; the total loss function is The GRU neural network uses back propagation through time (BPTT) to train the weights of each layer.
[0033] In order to further improve the modeling accuracy of the GRU neural network for complex hysteresis curves, the present invention uses the idea of feedback error elimination to introduce a feedback structure into the hysteresis model, and adds a compensation amount composed of the model's prediction error on the basis of the general GRU neural network. Since there is a certain deviation between the predicted value of the torsion angle of the neural network and the actual output torsion angle of the joint, the error of the model is obtained by comparing the measured value of the joint torsion angle with the output value of the model, and then the model error is used to correct the predicted value of the model at the next moment. Through this error compensation, the error of the model is reduced or even eliminated, thereby achieving the purpose of improving modeling accuracy. GRU neural network hysteresis model based on feedback correction is as follows: Figure 4 shown.
[0034] Since the prediction error is large in the early stage of neural network training, the tanh hyperbolic tangent function is used to limit the compensation amount. Therefore, the output layer formula of the GRU neural network based on feedback correction is as follows (4):
[0035] Δθ <t>< / t> =Δθ y <t>< / t> +βtanh(e <t-1>< / t-1> ) (4)
[0036] Δθ y <t>< / t> =W y h (5)
[0037] e <t-1>< / t-1> =Δθ d <t-1 >-Δθ <t-1>< / t-1> (6)
[0038] Δθ d <t-1 > = θ d <t-1 >-θ c <t-1>< / t-1> (7) Where Δθ y <t>< / t> represents the intermediate output signal of the improved GRU neural network at time t, as shown in formula (5); e <t-1>< / t-1> is the modeling error of the torsion angle at the previous moment, as shown in formula (6), from the measured value Δθ of the torsion angle at the previous moment d <t-1>< / t-1> The torsion angle Δθ output by the neural network <t-1>< / t-1> Subtracting them gives us Δθ d <t-1>< / t-1> is the measured value of the joint torsion angle at the previous moment, as shown in formula (7), and the angle θ is output by the joint theoryd <t-1>< / t-1> The actual output angle θ c <t-1>< / t-1> Subtract the modeling error of the torsion angle at the previous moment e <t-1>< / t-1> After being limited by the tanh function and multiplied by the compensation coefficient β, it constitutes the compensation amount for feedback correction of the output layer of the GRU neural network. β is obtained by self-learning of the neural network and the compensation amount is adaptively adjusted.
[0039] The modeling process of joint hysteresis characteristics is:
[0040] (1) Formula (8) uses Kalman filtering to suppress the input current data i <t>< / t> Gaussian white noise in;
[0041] (2) The filtered current signal is used as the input signal of the GRU neural network At the same time, the input signal of the neural network also includes the output Δθ of the model at the previous moment <t-1>< / t-1> ,Right now
[0042] (3) After the calculation of the GRU neural network, a feedback structure is added after the output layer to convert the model error e at the previous moment <t-1>< / t-1> Feedback is sent to the output layer as compensation, and the neural network output Δθ is obtained <t>< / t> ;
[0043] (4) Δθ <t>< / t> Introduce the neural network input layer and perform the next cycle. The output value Δθ of the neural network at time t-1 <t- 1 > As the input of the neural network at time t, increasing the dimension of the input information and associating the input current signal with the historical information of the output torsion angle can help improve the prediction accuracy of the model.
[0044] x <t>< / t> =Kalman(i <t>< / t> ) (8)
[0045] Δθ <t>< / t> =GRU_g(x <t>< / t> , Δθ <t-1>< / t-1> , c <t-1>< / t-1> ) (9)
[0046] Among them, Kalman(.) represents linear Kalman filtering, and GRU_g(.) represents equation (2) and equation (4).
[0047] The design principle of low-cost joint actuators makes the actuators have no load torque sensor, and only have encoders at the motor end, and no encoders at the reducer output end. Among them, the magnitude of the motor drive current can effectively reflect the change of the load, and becomes an important data for low-cost hysteresis compensation without a load torque sensor. In order to solve the problem that the torsion angle cannot be obtained due to the lack of an encoder at the reducer output end, the experiment starts from the perspective of overall joint modeling and establishes a joint model with a feedback structure. Among them, is the theoretical value of the joint output angle (angle setting value); is the actual value of the joint output angle (i.e. the angle measurement value). The torsion angle is obtained by subtracting the angle measurement value from the joint angle setting value, i.e.
[0048] In the absence of load torque sensors and reducer output encoders, the hysteresis model of current and torsion angle is constructed through the limited data obtained from the joint current sensor and the motor end encoder. This can effectively describe the hysteresis phenomenon caused by the current change on the difference between the actual joint output angle and the target output angle under low-cost joint actuators, thereby reducing the cost of hysteresis modeling and compensation. The error compensation of the joint angle setting value is:
[0049]
[0050] in, is the joint angle setting value after compensation, which is equal to the sum of the joint angle setting value and the torsion angle predicted by the model. Angle after dynamic compensation As the joint angle setting value.
[0051] Based on the above analysis, the present invention proposes a GRU neural network robot flexible joint compensation control method based on feedback correction, such as Figure 5 As shown, it includes the following steps:
[0052] Step 1: Input current i of the robot's flexible joint at time t <t>< / t> After Kalman filtering, it is used as the first input signal of the input layer of the improved GRU neural network at time t; at the same time, the output signal Δθ of the improved GRU neural network at time t-1 is <t-1>< / t-1> As the second input signal of the input layer of the improved GRU neural network at time t;
[0053] Step 2: First set the angle value of the robot's flexible joint at time t-1 The angle measurement value with the robot's flexible joint at time t-1 Subtract and obtain the torsion angle Δθ of the robot's flexible joint at time t-1 d <t-1>< / t-1> , where Δθd <t-1>< / t-1> =θ d <t-1>< / t-1> -θ c <t-1>< / t-1> ; Then the torsion angle Δθ of the robot's flexible joint at time t-1 is d <t-1>< / t-1> And the output signal Δθ of the improved GRU neural network at time t-1 <t-1>< / t-1> By subtracting, we can get the modeling error e of the torsion angle at time t-1. <t-1>< / t-1> , where e <t-1>< / t-1> =Δθ d <t-1>< / t-1> -Δθ <t-1>< / t-1> ; Then the modeling error of the torsion angle at time t-1 is e <t-1>< / t-1> As the output compensation signal of the improved GRU neural network at time t;
[0054] Step 3: Based on the first input signal, the second input signal and the output compensation signal of the input layer of the improved GRU neural network at time t, the hidden layer of the improved GRU neural network associates the input current with the historical information of the output torsion angle, and corrects the output of the improved GRU neural network through the modeling error to obtain the output signal Δθ of the output layer of the improved GRU neural network at time t. <t>< / t> ;
[0055] The mathematical model of the improved GRU neural network is as follows:
[0056]
[0057] Among them, Δθ <t>< / t> represents the output signal of the improved GRU neural network at time t, Δθ y <t>< / t> represents the intermediate output signal of the improved GRU neural network at time t, β represents the compensation coefficient, and e <t-1>< / t-1> represents the output compensation signal of the improved GRU neural network at time t, represents the update gate state of the improved GRU neural network at time t, represents the reset gate state of the improved GRU neural network at time t, represents the hidden state of the improved GRU neural network at time t, represents the first input signal of the improved GRU neural network at time t, represents the second input signal of the improved GRU neural network at time t, represents the intermediate output signal of the improved GRU neural network at time t-1, W z1 , W r1 and W 1Represent the update gate, reset gate and hidden state respectively with the first input signal The corresponding weight, W z2 , W r2 and W 2 Represent the update gate, reset gate and hidden state respectively with the second input signal The corresponding weight, U z , U r and U represent the update gate, reset gate, and intermediate output signal in the hidden state, respectively. The corresponding weights; and b y They represent the update gate, reset gate and bias vector of the hidden state respectively; σ(·) represents the sigmoid activation function; tanh(·) represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product.
[0058] Step 4: Use the output signal Δθ of the output layer of the improved GRU neural network at time t <t>< / t> The angle setting value of the robot's flexible joint at time t Compensate and obtain the angle setting value of the robot's flexible joint after compensation at time t in And set the angle of the robot's flexible joint after compensation at time t Provided to the control end of the robot's flexible joints.
[0059] It should be noted that although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention, and therefore the present invention is not limited to the above specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.
Claims
1. A GRU neural network robot flexible joint compensation control method based on feedback correction, characterized in that: It includes the following steps: Step 1: Input current i of the robot's flexible joint at time t <t>< / t> After Kalman filtering, it is used as the first input signal of the input layer of the improved GRU neural network at time t; at the same time, the output signal Δθ of the improved GRU neural network at time t-1 is <t-1>< / t-1> As the second input signal of the input layer of the improved GRU neural network at time t; Step 2: First set the angle value of the robot's flexible joint at time t-1 The angle measurement value with the robot's flexible joint at time t-1 Subtract and obtain the torsion angle Δθ of the robot's flexible joint at time t-1 d <t-1>< / t-1> , where Δθ d <t-1>< / t-1> =θ d <t-1>< / t-1> -θ c <t-1>< / t-1> ; Then the torsion angle Δθ of the robot's flexible joint at time t-1 is d <t-1>< / t-1> And the output signal Δθ of the improved GRU neural network at time t-1 <t-1>< / t-1> By subtracting, we can get the modeling error e of the torsion angle at time t-1. <t-1>< / t-1> , where e <t-1>< / t-1> =Δθ d <t-1>< / t-1> -×θ <t-1>< / t-1> ; Then the modeling error of the torsion angle at time t-1 is e <t-1>< / t-1> As the output compensation signal of the improved GRU neural network at time t; Step 3: Based on the first input signal, the second input signal and the output compensation signal of the input layer of the improved GRU neural network at time t, the hidden layer of the improved GRU neural network associates the input current with the historical information of the output torsion angle, and corrects the output of the improved GRU neural network by modeling error, so as to obtain the output signal Δθ of the output layer of the improved GRU neural network at time t. <t>< / t> ; Step 4: Use the output signal Δθ of the output layer of the improved GRU neural network at time t <t>< / t> The angle setting value of the robot's flexible joint at time t Compensation is performed to obtain the angle setting value of the robot's flexible joint after compensation at time t in And set the angle of the robot's flexible joint after compensation at time t Provided to the control end of the robot's flexible joints; The mathematical model of the above improved GRU neural network is as follows: Among them, Δθ <t>< / t> represents the output signal of the improved GRU neural network at time t, Δθ y <t>< / t> represents the intermediate output signal of the improved GRU neural network at time t, β represents the compensation coefficient, and e <t-1>< / t-1> represents the output compensation signal of the improved GRU neural network at time t, represents the update gate state of the improved GRU neural network at time t, represents the reset gate state of the improved GRU neural network at time t, represents the hidden state of the improved GRU neural network at time t, represents the first input signal of the improved GRU neural network at time t, represents the second input signal of the improved GRU neural network at time t, represents the intermediate output signal of the improved GRU neural network at time t-1, W z1 , W r1 and W1 represent the update gate, reset gate, and hidden state respectively with the first input signal The corresponding weight, W z2 , W r2 and W2 represent the update gate, reset gate, and hidden state respectively, and the second input signal The corresponding weight, U z , U r and U represent the update gate, reset gate, and intermediate output signal in the hidden state, respectively. The corresponding weights; and b y They represent the update gate, reset gate and bias vector of the hidden state respectively; σ(·) represents the sigmoid activation function; tanh(·) represents the hyperbolic tangent activation function; ⊙ represents the Hadamard product.
Citation Information
Patent Citations
Transfer error compensation control method for flexible joint containing harmonic reducer
CN111515962A
Hysteresis error compensation control method for flexible joint of industrial robot based on LSTM
CN112171677A