A supervised training-based method for detecting foot contact of quadruped robots

CN111753924BActive Publication Date: 2024-11-22常州傲谷智控科技有限公司
View PDF -1 Cites 0 Cited by

Patent Information

Application Number
CN202010631952.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-03
Publication Date
2024-11-22
Estimated Expiration
2040-07-03

Smart Images

  • Figure CN111753924B_ABST
    Figure CN111753924B_ABST
Patent Text Reader

Abstract

The present invention provides a method for detecting foot contact of a quadruped robot based on supervised training, wherein an acceleration sensor is provided at the foot of the quadruped robot, and the detection method comprises the following steps: step S1, controlling the foot of the quadruped robot to contact the ground as expected, obtaining acceleration sensor data and performing normalization processing, calibrating corresponding labels, and making a training data set; step S2, training the training data set to obtain a network model; step S3, running the supervised training network model, and performing foot contact recognition based on input acceleration data. The detection method is implemented based on a non-contact acceleration sensor, does not require complex structural design, is simple and reliable, has high precision, and has strong anti-interference performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the field of robot-related technologies, and in particular to a method for detecting foot contact of a quadruped robot based on supervised training. Background Art

[0002] The foot contact detection of quadruped robots is an important part of gait control. The commonly used foot force detection methods are as follows:

[0003] 1. Force sensor detection. A force sensor is installed at the foot end. Commonly used ones are: a. pressure strain gauge, b. thin film pressure sensor. The detection principle of this method is simple and clear. The pressure sensor is a contact detection, that is, it needs strong squeezing at the force point to detect, which is easy to cause damage.

[0004] 2. Air pressure detection: A hollow ball is used as a container to measure the internal air pressure, and it can provide a shock-absorbing function. However, when the foot repeatedly touches the ground, the air is continuously compressed, the temperature rises, and interference occurs, resulting in reduced measurement accuracy. In addition, a sealing structure needs to be designed (to prevent air leakage), and the design is relatively complicated. Summary of the invention

[0005] In order to address the shortcomings of current technology, the present invention combines the existing technology and, starting from practical applications, provides a quadruped robot foot touchdown detection method based on supervised training. This detection method is based on a non-contact acceleration sensor, does not require complex structural design, is simple and reliable, has high precision, and has strong anti-interference ability.

[0006] The technical solution of the present invention is as follows:

[0007] A method for detecting the foot contact of a quadruped robot based on supervised training, wherein an acceleration sensor is provided at the foot end of the quadruped robot, and the detection method comprises the following steps:

[0008] Step S1, controlling the foot end of the quadruped robot to touch the ground as expected, obtaining acceleration sensor data and normalizing and calibrating corresponding labels to create a training data set;

[0009] Step S2: training the training data set to obtain a network model;

[0010] Step S3: Run the supervised training network model to perform foot contact recognition based on the input acceleration data.

[0011] Further, in step S1, the acceleration sensor data includes sampling frequency points and corresponding acceleration values, and the acceleration values ​​include the acceleration value when the foot starts to move downward, the acceleration value when the foot touches the ground, and the peak value of the foot acceleration.

[0012] Furthermore, in step S1, the motor at the foot end of the quadruped robot is controlled in a closed loop so that the foot end of the quadruped robot touches the ground as expected.

[0013] Further, step S1 specifically includes:

[0014] The acquired acceleration sensor data is normalized and calibrated with a LAND I NG label or a N-LAND I NG label to obtain a data set X, where X is an n*m-dimensional matrix, the number of rows n is the number of training samples, n=500, and the number of columns m is the eigenvalue, m=100.

[0015] The set of labels LAND I NG and N-LAND I NG is represented by L, where the expressions of X and L are:

[0016]

[0017]

[0018] Further, step S2 specifically includes:

[0019] Step S21: weighted summation of the training data set X, the expression is:

[0020] z=∑W·x+bias (3)

[0021] The parameter W is the weight, and the parameter bias is the bias. W and bias are initialized with uniform distribution, and the initial value range is between 0 and 1. The process of training the model is to find the appropriate W and bias values;

[0022] Step S22, z is transformed nonlinearly, and the activation function is softmax. Since the labels are LANDING or N-LANDING, the value of i is 1 or 2, where z i Calculate the value of the linear transformation for the first or second group of sample data, z j is the corresponding cumulative sum value, that is for The accumulated sum of the two types of output values ​​can be converted into a probability distribution in the range of [0,1] and with a sum of 1 through the Softmax function. The expression is:

[0023]

[0024] get The predicted value of the classification label is calculated by combining (3) and (4):

[0025]

[0026] in, They represent the predicted probabilities of the labels LAND I NG and N-LAND I NG, respectively, and w 1,1 ,w 1, 2...w 1,100 is the weight parameter of the label LAND I NG, where the left subscript 1 is the data of the label LAND I NG and the right subscript 1-100 is the number of training data; w 2,1 ,w 2,2 ... 2,100 is the weight parameter of the label N-LAND I NG, where the left subscript 2 is the data of the label N-LAND I NG, and the right subscript 1-100 is the number of training data; x1,x2,x3...x 100 is the processed data set, where subscripts 1-100 are the 1st to 100th numbers in the data set; bias1 and bias2 are the bias parameters corresponding to the labels LAND I NG and N-LAND I NG respectively; where subscript 1 represents the label LAND I NG and 2 represents the label N-LAND I NG;

[0027] Step S23: Calculate the deviation between the label value and the predicted value through the loss function. The expression of the loss function is:

[0028]

[0029] Among them, m is the number of samples, the loss function uses logarithmic loss, L i is the label value of the i-th data in the sample, whose label N-LAND I NG is 0 and LAND I NG is 1. i,j 、bias i The initial value of and the value obtained in step S22 And the label value L i Input into the loss function to calculate the deviation value;

[0030] In step S22, the formula (5) Abbreviated as W i,j ,

[0031]

[0032] Abbreviated as bias i , randomly set W i,j 、bias i The initial value of and the initial value range is between 0-1;

[0033] Step S24: Set the target value of the network model detection. When the deviation value is greater than the target value, that is, the recognition rate does not meet the expected requirements, the parameter W is iterated by the gradient descent method.i,j 、bias i , find the partial derivative of W and bias of the loss function

[0034] Step S25, setting the learning rate α=0.001;

[0035] Step S26: Update the parameter W by Update the bias parameter;

[0036] Step S27, substitute the updated W,bias into step S21, and train the network model in a loop until the loss value is lower than the target threshold, completing the model training.

[0037] Beneficial effects of the present invention:

[0038] The present invention uses an acceleration sensor for non-contact detection. When the foot touches the ground, the foot is subjected to a vector force in the opposite direction of the movement speed, causing it to stop moving quickly. This process generally takes a short time, generally a few hundred milliseconds. The acceleration data of this process is collected, and a training set is prepared and supervised training is performed to obtain a data model. The model is used for ground contact recognition, and the practical effects thereof include:

[0039] 1. The network model calculated through supervised training has high accuracy and strong anti-interference ability. It can be applied to robot foot contact detection and effectively improve the detection accuracy.

[0040] 2. The use of acceleration sensors is low-cost and not easily damaged by non-contact detection;

[0041] 3. No need for complex structural design, the hardware is simple and reliable, and easy to implement. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Attached Figure 1 This is a schematic diagram of the foot structure of the robot in the present invention;

[0043] Attached Figure 2 This is a diagram of the SoftMax supervised training network structure in the present invention;

[0044] Attached Figure 3 It is a flow chart of the scheme of the present invention;

[0045] Attached Figure 4 A set of acceleration sampling data collected by the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the application.

[0047] like Figure 1-4 , which are related drawings of a method for detecting foot contact of a quadruped robot based on supervised training provided in an embodiment of the present invention.

[0048] In the detection method provided in this embodiment, the hardware structure used mainly includes a microcontroller MCU and an acceleration sensor, such as Figure 1 As shown, it includes a thigh connecting rod 1, a calf connecting rod 2, a circuit module 3 composed of a microcontroller MCU and an acceleration sensor. The detection method of this embodiment mainly includes the following steps:

[0049] Step S1, collect data, manually control the rotation of the motor transmission mechanism, so that the foot of the quadruped robot can touch the ground as expected, normalize and calibrate the acquired acceleration sensor data, and prepare training set data;

[0050] Step S2: training the training set data to obtain a network model;

[0051] Step S3: Run the supervised training network model to identify the foot contact through the input acceleration data.

[0052] The network structure diagram is as follows Figure 2 As shown; Program process Figure 3 shown.

[0053] In the specific implementation of this embodiment, the specific steps are as follows:

[0054] Step S1: Data collection:

[0055] S11. First, fix the circuit module 3 composed of the microcontroller MCU and the acceleration sensor on the foot end. Specifically, the acceleration sensor chip is selected to be 3mm*3mm in size, which is very small and the fixing method is relatively simple. The microcontroller MCU can read the real-time acceleration of the motor movement direction through the I2C bus. The sampling period is set to 20ms. The acceleration chip has a fast dynamic response and a response time of milliseconds, which can quickly respond to the acceleration changes during the ground contact process.

[0056] S12, perform position closed-loop control on the motor to control the foot end to touch the ground. At the same time, read the acceleration value at a sampling frequency of 50Hz (20ms cycle) and save it, such as Figure 4The figure shows a set of sampled acceleration data, where the horizontal axis is the sampling frequency point, each point is 20ms apart, the vertical axis is the gravitational acceleration, unit is g, point A is the beginning of the downward movement of the foot, point B is the moment of contact with the ground, and point C is the peak acceleration; the data corresponding to point A, point B, and point C are calibrated as one of the training set data.

[0057] S13. Normalize the acquired acceleration sensor data and calibrate it with a LANDING label or an N-LANDING label to obtain a data set X, where X is an n*m-dimensional matrix, the number of rows n is the number of training samples, n=500, and the number of columns m is the eigenvalue, m=100.

[0058] The set of labels LAND I NG and N-LAND I NG is represented by L, where the expressions of X and L are:

[0059]

[0060]

[0061] Step S2 trains the network model:

[0062] Step S21: weighted summation of the training data set X, the expression is:

[0063] z=∑W·x+bias (3)

[0064] The parameter W is the weight, and the parameter bias is the bias. W and bias are initialized with uniform distribution, and the initial value range is between 0 and 1. The process of training the model is to find the appropriate W and bias values;

[0065] Step S22: Perform nonlinear transformation on z, and the activation function is softmax. Since the labels are LANDING or N-LANDING, the value of i is 1 or 2, where z i Calculate the value of the linear transformation for the first or second group of sample data, z j is the corresponding cumulative sum value, that is for The accumulated sum of the two types of output values ​​can be converted into a probability distribution in the range of [0,1] and with a sum of 1 through the Softmax function. The expression is:

[0066]

[0067] get The predicted value of the classification label is calculated by combining (3) and (4):

[0068]

[0069] in, They represent the predicted probabilities of the labels LAND I NG and N-LAND I NG, respectively, and w 1,1 ,w 1, 2...w 1,100 is the weight parameter of the label LAND I NG, where the left subscript 1 is the data of the label LAND I NG and the right subscript 1-100 is the number of training data; w 2,1 ,w 2,2 ... 2,100 is the weight parameter of the label N-LAND I NG, where the left subscript 2 is the data of the label N-LAND I NG, and the right subscript 1-100 is the number of training data; x1,x2,x3...x 100 is the processed data set, where subscripts 1-100 are the 1st to 100th numbers in the data set; bias1 and bias2 are the bias parameters corresponding to the labels LAND I NG and N-LAND I NG respectively; where subscript 1 represents the label LAND I NG and 2 represents the label N-LAND I NG;

[0070] Step S23: The deviation between the label value and the predicted value can be calculated by the loss function. The expression of the loss function is:

[0071]

[0072] Among them, m is the number of samples, the loss function uses logarithmic loss, L i is the label value of the i-th data in the sample, whose label N-LAND I NG is 0 and LAND I NG is 1. i,j 、bias i The initial value of and the value obtained in step S22 And the label value L i Input into the loss function to calculate the deviation value;

[0073] In step S22, the formula (5) Abbreviated as W i,j ,

[0074]

[0075] Abbreviated as bias i , randomly set W i,j 、bias i The initial value of and the initial value range is between 0-1;

[0076] Step S24: Set the target value of the network model detection. When the deviation value is greater than the target value, that is, the recognition rate does not meet the expected requirements, the parameter W is iterated by the gradient descent method. i,j 、bias i , find the partial derivative of W and bias of the loss function

[0077] Step S25, setting the learning rate α=0.001;

[0078] Step S26: Update the parameter W by Update the bias parameter;

[0079] Step S27: Substitute the updated W,bias into step S21, and repeat the training of the network model until the loss value is lower than the target threshold value, thus completing the training of the model. The obtained network model can perform high-precision ground contact recognition.

[0080] Practice has proved that the present invention uses an acceleration sensor for non-contact detection. When the foot touches the ground, the foot is subjected to a vector force in the opposite direction of the movement speed, causing it to stop moving quickly. This process generally occurs in a short time, generally a few hundred milliseconds. The acceleration data of this process is collected, and a training set is made and then supervised training is performed to obtain a data model. This model is used for ground contact recognition, which has strong anti-interference ability, high detection accuracy, and is stable and reliable to use and not easy to damage.

Claims

1. A method for detecting foot contact of a quadruped robot based on supervised training, characterized in that: The foot end of the quadruped robot is provided with an acceleration sensor, and the detection method comprises the following steps: Step S1, controlling the foot end of the quadruped robot to touch the ground as expected, obtaining acceleration sensor data and normalizing and calibrating corresponding labels to create a training data set; Step S2: training the training data set to obtain a supervised training network model; Step S3, running the supervised training network model to perform foot contact recognition based on the input acceleration data; Wherein, step S2 specifically includes: Step S21: weighted summation of the training data set X, the expression is: z=∑W·x+bias (3) The parameter W is the weight, and the parameter bias is the bias. W and bias are initialized with uniform distribution, and the initial value range is between 0 and 1. The process of training the model is to find the appropriate W and bias values; Step S22: Perform nonlinear transformation on z, and the activation function is softmax. Since the labels are LANDING or N-LANDING, the value of i is 1 or 2, where z i Calculate the value of the linear transformation for the first or second group of sample data, z j is the corresponding cumulative sum value, that is for e Z1 +e Z2 The accumulated sum of the two types of output values ​​can be converted into a probability distribution in the range of [0,1] and with a sum of 1 through the Softmax function. The expression is: get The predicted value of the classification label is calculated by combining (3) and (4): in, Respectively represent the predicted probabilities of the labels LANDING and N-LANDING, w 1,1 ,w 1,2 ... 1,100 is the weight parameter of the label LANDING, where the left subscript 1 is the data of the label LANDING and the right subscript 1-100 is the number of training data; w 2,1 ,w 2,2 ... 2,100 is the weight parameter of the label N-LANDING, where the left subscript 2 is the data of the label N-LANDING, and the right subscript 1-100 is the number of training data; x1,x2,x3...x 100 is the processed data set, where subscripts 1-100 are the 1st to 100th numbers in the data set; bias1 and bias2 are the bias parameters corresponding to the labels LANDING and N-LANDING respectively; where subscript 1 represents the label LANDING and 2 represents the label N-LANDING; Step S23: Calculate the deviation between the label value and the predicted value through the loss function. The expression of the loss function is: Among them, m is the number of samples, the loss function uses logarithmic loss, L i is the label value of the i-th data in the sample, whose label N-LANDING is 0 and LANDING is 1. i,j 、bias i The initial value of Z obtained in step S22 i , and the label value L i Input into the loss function to calculate the deviation value; In step S22, the formula (5) Abbreviated as W i,j , Abbreviated as bias i , randomly set W i,j 、bias i The initial value of and the initial value range is between 0-1; Step S24: Set the target value of the network model detection. When the deviation value is greater than the target value, that is, the recognition rate does not meet the expected requirements, the parameter W is iterated by the gradient descent method. i,j 、bias i , find the partial derivative of W and bias of the loss function Step S25, setting the learning rate α=0.001; Step S26: Update the parameter W by Update the bias parameter; Step S27, substitute the updated W, bias into step S21, and train the network model in a loop until the loss value is lower than the target threshold, that is, find the appropriate W, bias values ​​to complete the model training.

2. The method for detecting foot contact of a quadruped robot based on supervised training according to claim 1, characterized in that: In step S1, the acceleration sensor data includes sampling frequency points and corresponding acceleration values, and the acceleration values ​​include the acceleration value when the foot starts to move downward, the acceleration value when the foot touches the ground, and the peak value of the foot acceleration.

3. The method for detecting foot contact of a quadruped robot based on supervised training according to claim 1, characterized in that: In step S1, the motor at the foot end of the quadruped robot is controlled in a closed loop so that the foot end of the quadruped robot touches the ground as expected.

4. The method for detecting foot contact of a quadruped robot based on supervised training according to claim 1, 2 or 3, characterized in that: Step S1 specifically includes: The acquired acceleration sensor data is normalized and labeled with a LANDING label or an N-LANDING label to obtain a data set X, where X is an n*m-dimensional matrix, the number of rows n is the number of training samples, n=500, and the number of columns m is the eigenvalue, m=100; The set of labels LANDING and N-LANDING is represented by L, where the expressions of X and L are: