A Robotic Method for Detecting Lateral Impacts Based on Impact Sensing Neural Networks

By using an impact-sensing neural network-based method, the problem of misjudgment in lateral displacement detection when a robot moves on a low-friction surface was solved, improving detection efficiency and accuracy, and a lightweight neural network model was constructed.

CN117325158BActive Publication Date: 2026-05-05AMICRO SEMICONDUCTOR CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
AMICRO SEMICONDUCTOR CO LTD
Filing Date
2023-09-28
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In complex dynamic environments, when a robot moves on a low-friction surface, the low tire adhesion can easily lead to sideslip. The inertial measurement unit cannot accurately sense the lateral displacement, resulting in misjudgment of lateral displacement under the Kalman filter framework.

Method used

An impact-sensing neural network-based approach is adopted. Raw pose data is collected through a sensing device, and the trained impact-sensing neural network is used to classify the measurement value sequence to determine whether the robot has been subjected to lateral impact. This reduces Kalman filter interference and improves detection efficiency and accuracy.

Benefits of technology

This improves the accuracy and efficiency of robot detection of lateral impacts, reduces reliance on computing resources, shortens training time, and enables the construction of lightweight neural network models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117325158B_ABST
    Figure CN117325158B_ABST
Patent Text Reader

Abstract

This application discloses a method for detecting lateral impacts in robots based on an impact-sensing neural network, comprising: Step A, controlling the robot's sensing device to collect raw pose data and extracting a sequence of measurement values ​​to be sensed from the raw pose data; Step B, classifying the sequence of measurement values ​​to be sensed using a trained impact-sensing neural network to obtain a first target prediction probability and a second target prediction probability; Step C, determining whether the first target prediction probability is greater than the second target prediction probability. If so, it is determined that the robot has detected a lateral impact; otherwise, it is determined that the robot has detected no lateral impact. This method avoids stopping the use of the neural network for classification and recognition after validating the raw pose data collected in real time by the sensing device, and also avoids starting the neural network for classification and recognition only after performing Kalman filtering on the raw pose data collected in real time by the sensing device, thus improving the efficiency of the robot in detecting lateral impacts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control algorithms, specifically a method for detecting lateral impacts in robots based on an impact-sensing neural network. Background Technology

[0002] In complex dynamic environments, robots are prone to sideslip when moving on low-friction surfaces if their tires have low traction. Robot sideslip generally refers to lateral displacement (i.e., axial displacement) of the robot wheels, which is considered an impact. The robot is instantly moved to another position without being detected by sensors. The rotary encoders mounted on the wheels cannot detect the lateral displacement caused by the impact. In this case, the robot's actual pose is calculated using sensing data from an inertial measurement unit (IMU).

[0003] There are roughly three scenarios in which the robot is not impacted: (1) the robot moves on a smooth surface; (2) the robot actively collides with an obstacle; and (3) the robot crosses the obstacle and vibrates. In scenarios (2) and (3), the acceleration measurement value sensed by the inertial measurement unit will change significantly, which will easily lead to misjudgment when the robot determines lateral displacement using the predicted pose result under the extended Kalman filter (EKF) framework. Summary of the Invention

[0004] This application discloses a method for detecting lateral impacts in robots based on an impact-sensing neural network. The specific technical solution is as follows:

[0005] A robot lateral impact detection method based on an impact-sensing neural network includes the following steps: Step A: Controlling the robot's sensing device to collect raw pose data and extracting a sequence of measurement values ​​to be sensed from the raw pose data; Step B: Classifying the sequence of measurement values ​​to be sensed using a trained impact-sensing neural network to obtain a first target prediction probability and a second target prediction probability; Step C: Determining whether the first target prediction probability is greater than the second target prediction probability. If it is, the robot is determined to have detected a lateral impact; otherwise, the robot is determined not to have detected a lateral impact. The first target prediction probability is the probability that the sequence of measurement values ​​to be sensed is classified as the sequence of measurement values ​​extracted under the robot's current lateral impact state; the second target prediction probability is the probability that the sequence of measurement values ​​to be sensed is classified as the sequence of measurement values ​​extracted under the robot's current state of not experiencing a lateral impact.

[0006] Compared with existing technologies, this application reduces interference from Kalman filtering or other filtering information, allowing the trained impact sensing neural network to classify all the collected raw and comprehensive sample data as much as possible. This also speeds up the efficiency of training and classification. The neural network will not stop being used for classification and recognition after the validity of the raw pose data collected in real time by the sensing device is judged, nor will it start using the neural network for classification and recognition only after Kalman filtering of the raw pose data collected in real time by the sensing device. This improves the efficiency of the robot in detecting lateral impacts.

[0007] Further, the method for constructing the trained impact-sensing neural network includes: Step 1, extracting a pre-sensing measurement value sequence from pre-collected pose data using a sliding window, wherein the length of the pre-sensing measurement value sequence is the window length of the sliding window; Step 2, connecting the pre-sensing measurement value sequence along channels of the corresponding dimension to generate a first input feature; Step 3, controlling the first input feature to undergo multi-layer convolution and one-layer pooling operations within the pre-constructed impact-sensing neural network to obtain the feature to be classified; wherein the impact-sensing neural network is a neural network model constructed according to the construction method of a convolutional neural network, and the impact-sensing neural network includes multiple consecutively stacked convolutional layers and one pooling layer; Step 4, classifying the feature to be classified using the softmax algorithm to obtain a first impact prediction probability and a second impact prediction probability. Impact prediction probability; Step 5: Based on the loss function, calculate the loss value of the impact sensing neural network using the first impact prediction probability and the second impact prediction probability; and based on the loss function, update the weights of the impact sensing neural network using gradient descent, and then update the weighted impact sensing neural network to the impact sensing neural network; wherein, the loss function is the binary cross-entropy, and the first impact prediction probability and the second impact prediction probability are the prediction results of the two categories in the loss function; the currently updated weights are the weights of the convolutional layer; Step 6: Repeat steps 2 to 5 to input the pre-sensing measurement value sequence into the weighted impact sensing neural network until the latest calculated loss value is less than the preset loss threshold, and mark the weighted impact sensing neural network as the trained impact sensing neural network.

[0008] After executing steps 1 to 6 above, this application successively performs multi-layer convolution operations, pooling operations, softmax algorithm classification processing, calculates loss values ​​and updates weights to train the trained impact sensing neural network. This not only improves the extraction accuracy and classification accuracy of pose features, but also reduces the order of magnitude of the parameters of the convolutional neural network (or the impact sensing neural network). The trained impact sensing neural network thus forms a lightweight network model, accelerating the detection of robot impact.

[0009] Furthermore, the softmax algorithm occupies an output layer in the impact sensing neural network as a softmax classifier; the softmax classifier is used to calculate a first impact prediction probability and a second impact prediction probability using the feature to be classified; wherein, the feature to be classified is the information output by the two nodes connected to it after multiple convolution and pooling operations; wherein, the first impact prediction probability is the probability that the feature to be classified is classified as originating from the measurement value sequence extracted from the robot under lateral impact, thus forming the first classification generated by the softmax algorithm; wherein, the second impact prediction probability is the probability that the pre-sensing measurement value sequence or the feature to be classified is classified as originating from the measurement value sequence extracted from the robot under non-lateral impact, thus forming the second classification generated by the softmax algorithm.

[0010] This reduces reliance on computer storage resources, effectively reduces training time, improves the classification accuracy of pose feature information within the impact sensing neural network, and evaluates only the model probabilities of two classification cases (first impact prediction probability and second impact prediction probability), thus balancing the three requirements of detection efficiency, computing resources, and detection accuracy of the impact sensing neural network.

[0011] Furthermore, during the repeated execution of steps 2 to 5, each time step 5 is executed, before calculating the loss value using the loss function, it is determined whether the first impact prediction probability obtained in step 4 is greater than the second impact prediction probability obtained in step 4. If so, the true value of the label required by the loss function is set to 1, and the robot being subjected to a lateral impact is determined to be the current prediction result; otherwise, the true value of the label required by the loss function is set to 0, and the robot not being subjected to a lateral impact is determined to be the current prediction result. Thus, the robot's impact status derived from the relationship between the first and second impact prediction probabilities is a coarse judgment result, i.e., the current prediction result. Therefore, the process of the calculated loss value changing from being greater than or equal to a preset loss threshold to being less than the preset loss threshold is considered as the process of training the impact-aware neural network, and also as the process of updating the weights, the first impact prediction probability, the second impact prediction probability, the relevant model parameters of the convolutional layer, and the relevant model parameters of the pooling layer.

[0012] Further, in step 2, the method of constructing the impact-aware neural network includes: sequentially connecting four 1D convolutional layers, followed by a pooling layer, configuring the kernel length of each 1D convolutional layer to 3, configuring the stride of the convolutional filters in each 1D convolutional layer to 1, and configuring the pooling operation in the pooling layer to take the average value, thereby constructing the impact-aware neural network; wherein, the original values ​​of the weights of the convolutional layers are randomly generated and can be updated by the gradient descent method based on the determined loss function; the input features and the weights of the convolutional layers are configured to perform convolution operations in the convolutional layers. Thus, the impact-aware neural network is constructed layer by layer according to the construction method of the convolutional neural network, forming a multi-layer convolutional neural network with stacked and connected convolutional layers.

[0013] Further, the operation method of step 3 includes: controlling the first input feature generated in step 2 to perform convolution operations sequentially in the four 1D convolutional layers to obtain a first discriminant feature, and determining that the first discriminant feature is the encoding result in the four 1D convolutional layers; then inputting the first discriminant feature into a pooling layer; then controlling the first discriminant feature to undergo average pooling processing in the pooling layer to obtain the feature to be classified. This integrates the convolution results from the four 1D convolutional layers and the average value taken by the pooling layer into the feature to be classified, reducing the order of magnitude of the model parameters of the impact perception neural network and forming a lightweight neural network model.

[0014] Further, the four 1D convolutional layers are sequentially represented as a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer. The depth of the input layer in the first convolutional layer is 8, and the depth of the input layer in the first convolutional layer is equal to the width of the input feature, which is the dimension of the column elements of the feature matrix containing the input feature. The depth of the output layer in the first convolutional layer is equal to the depth of the input layer in the second convolutional layer, the depth of the output layer in the second convolutional layer is equal to the depth of the input layer in the third convolutional layer, and the depth of the output layer in the third convolutional layer is equal to the depth of the input layer in the fourth convolutional layer, so that the first, second, third, and fourth convolutional layers are sequentially connected. The depth of the output layer in the fourth convolutional layer is 2. This facilitates the calculation of the first target prediction probability and the second target prediction probability using the softmax algorithm within the trained impact perception neural network. It can reduce the number of channels between the convolutional layers and the pooling layers.

[0015] Further, in step 5, the method for calculating the loss value of the shock-sensing neural network based on the loss function using the first shock prediction probability and the second shock prediction probability includes: ,in, It is the loss value of the impact sensing neural network; It is the actual value of the label. When =1, it means that the current prediction is that the robot will be impacted; It is the first predicted probability of being impacted. The second predicted impact probability; wherein, the loss function is binary cross-entropy, to design the impact-sensing neural network as a binary classification network. Thus, the impact-sensing neural network is designed as a binary classification network. When the first predicted impact probability... and the second predicted probability of impact When changes occur, the actual value of the label Changes may occur, causing the loss value to adapt according to the loss function; thus, during the process of updating the weights using the gradient descent algorithm (Adam algorithm), the loss value decreases, thereby improving the optimization effect of the loss function on the impact sensing neural network.

[0016] Further, in step 2, the method of connecting the pre-sensing measurement value sequence along the corresponding dimensional channel includes: connecting the pre-sensing measurement value sequences of each type along the corresponding dimensional channel according to the type of data collected by the robot's sensing device, to synthesize the first input feature; wherein, the pre-sensing measurement value sequence is a 3-axis angular velocity measurement value sequence, a 3-axis acceleration measurement value sequence, a 1-axis left wheel rotation measurement value sequence, or a 1-axis right wheel rotation measurement value sequence, so that the dimension of the input feature is at least equal to 8; the inertial measurement unit installed in the robot's body is used to collect the 3-axis angular velocity measurement value sequence and the 3-axis acceleration measurement value sequence; the rotary encoders installed on both sides of the robot are used to collect the 1-axis left wheel rotation measurement value sequence and the 1-axis right wheel rotation measurement value sequence, respectively. Thus, multiple types of measurement value sequences to be sensed can be sequentially connected to the same channel within the impact sensing neural network to synthesize the first input feature.

[0017] Further, in step B, the method of classifying the sequence of measured values ​​to be perceived using a trained impact-sensing neural network includes: inputting the sequence of measured values ​​to be perceived into the trained impact-sensing neural network, and controlling the sequence of measured values ​​to be perceived to be connected along channels of the corresponding dimension to generate a second input feature; within the trained impact-sensing neural network, the sequence of measured values ​​to be perceived is updated to the pre-sensing measurement sequence; controlling the second input feature to perform four convolutional operations and one pooling operation within the trained impact-sensing neural network to obtain target classification features; then using the softmax algorithm to classify the target classification features to obtain the first target prediction probability and the second target prediction probability; and then executing step C. In summary, this application uses the trained impact-sensing neural network for robot impact detection, which can reduce the dependence on computer storage resources, effectively reduce training time, improve the classification accuracy of pose feature information within the trained impact-sensing neural network, and only evaluate the model probabilities of two classification cases (the first target prediction probability and the second target prediction probability), balancing the three requirements of efficiency, computing resources, and robot impact detection accuracy of the trained impact-sensing neural network for robot impact detection. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating a robot lateral impact detection method based on an impact sensing neural network, as disclosed in an embodiment of this application. Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described below are merely illustrative of the invention and are not intended to limit the invention. Furthermore, it should be understood that for those skilled in the art, modifications to the design, manufacturing, or production processes disclosed in this invention are merely conventional technical means and should not be construed as insufficient disclosure of the invention.

[0020] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” etc., used in this application do not indicate quantity limitation and may represent singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof, used in this application, are intended to cover non-exclusive inclusion, such as: a process, method, system product, or device that includes a series of steps or modules is not limited to the listed steps or units, but may also include steps or modules not listed, or may also include other steps or units inherent to these processes, methods, products, or devices. The terms “first,” “second,” “third,” etc., used in this application are merely used to distinguish similar correspondences and do not represent a specific ordering of objects.

[0021] As one embodiment, a robot lateral impact detection method based on an impact-sensing neural network is disclosed. The executing entity of the robot lateral impact detection method is a robot equipped with sensing devices. To save design and manufacturing costs, the sensing devices include an inertial measurement unit (IMU) and a rotary encoder. The executing entity is a robot with an IMU mounted on its body and rotary encoders mounted on both left and right wheels. Essentially, it is a wheeled robot equipped with two types of odometers, which respectively sense the pose state generated by the body's movement and the rotation state of the wheel axles on both sides of the body. Figure 1 As shown, the robot detection method for lateral impact includes:

[0022] Step A: Control the robot's sensing device to collect raw pose data and extract the sequence of measurement values ​​to be sensed from the raw pose data, then execute Step B. This extraction can be achieved using a sliding window technique for ordered scanning. Generally, the extraction is performed by sliding along the robot's motion time axis, sequentially obtaining multiple sequences of measurement values ​​to be sensed. Thus, within the currently traversed area, a sliding window can extract the latest preset number of measurement values ​​to be sensed from the raw pose data, forming a sequence of measurement values ​​to be sensed.

[0023] Preferably, both the sequence of measurements to be sensed and the original pose data include pose size and pose direction, existing in vector form; the robot's sensing devices include an inertial measurement unit (IMU) and a rotary encoder (equivalent to a wheeled odometer), both of which are robot proprioceptive sensors. The sequence of measurements to be sensed includes a sequence of angular velocity measurements around each coordinate axis, a sequence of acceleration measurements pointing in each coordinate axis direction, a sequence of left wheel rotation measurements, and a sequence of right wheel rotation measurements. The angular velocity measurement sequence is acquired by the gyroscope in the IMU, the acceleration measurement sequence is acquired by the accelerometer in the IMU, the left wheel rotation measurement sequence is acquired by the rotary encoder mounted on the robot's left wheel, and the right wheel rotation measurement sequence is acquired by the rotary encoder mounted on the robot's right wheel.

[0024] Step B: Classify the sequence of impact measurement values ​​to be perceived using the trained impact sensing neural network to obtain the prediction probability of the first target and the prediction probability of the second target; then proceed to step C. In this embodiment, the impact sensing neural network is first trained using the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the sequence of the first target and the prediction probability of the second target. In this process, the validity judgment or screening of the original pose data collected in real time by the sensing device is not performed in advance. Instead, whenever the original pose data is collected, the sequence of ...

[0025] Based on this, the relationship between the predicted probability of the first target and the predicted probability of the second target is determined, and then step C is executed. In this embodiment, the first predicted probability of the robot being impacted at the current moment is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted when the robot is currently experiencing a lateral impact; the second predicted probability of the robot being impacted at the current moment is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted when the robot is currently not experiencing a lateral impact.

[0026] Step C: Determine if the predicted probability of the first target is greater than the predicted probability of the second target. If the predicted probability of the first target is greater than the predicted probability of the second target, it is determined that the robot has detected a lateral impact and that the robot has undergone lateral displacement. This can be considered as completing the lateral impact detection of the robot at the current moment. If the predicted probability of the first target is less than or equal to the predicted probability of the second target, it is determined that the robot has detected that it has not been subjected to a lateral impact.

[0027] The first target prediction probability is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted from the robot under the current lateral impact state; the second target prediction probability is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted from the robot under the current non-lateral impact state.

[0028] This allows for judgment based on the relationship between two predicted probabilities classified by the trained impact sensing neural network, overcoming the misjudgment problem caused by sudden changes in the measurement values ​​of the inertial measurement unit and improving the accuracy of impact detection.

[0029] It should be noted that the state in which the robot is not subjected to lateral impact can be roughly divided into three scenarios: (1) the robot moves on a smooth surface; (2) the robot actively collides with an obstacle; and (3) the robot crosses the obstacle and experiences body vibration. In scenarios (2) and (3), the acceleration measurement value sensed by the inertial measurement unit will change significantly, that is, the measurement value will change abruptly; this will cause the robot to misjudge whether lateral displacement has occurred by using the predicted pose result under the extended Kalman filter (EKF) framework.

[0030] Compared with existing technologies, this application reduces interference from Kalman filtering or other filtering information, allowing the trained impact sensing neural network to classify all the collected raw and comprehensive sample data as much as possible. This also speeds up the efficiency of training and classification. The neural network will not stop being used for classification and recognition after the validity of the raw pose data collected in real time by the sensing device is judged, nor will it start using the neural network for classification and recognition only after Kalman filtering of the raw pose data collected in real time by the sensing device. This improves the efficiency of the robot in detecting lateral impacts.

[0031] It should be noted that in the robot detection lateral impact method disclosed in this application, the execution order of steps A to C is as follows: first, step A is executed; after extracting the sequence of measurement values ​​to be sensed in step A, step B is executed; after obtaining the first target prediction probability and the second target prediction probability in step B, step C is executed; and then step C determines whether the robot has detected that it has been subjected to a lateral impact or not.

[0032] As one embodiment, the method for constructing the trained impact-sensing neural network includes:

[0033] Step 1: Extract the pre-sensing measurement value sequence from the original pose data using a sliding window, and then proceed to Step 2. The length of the pre-sensing measurement value sequence is the window length of the sliding window.

[0034] Step 1 extraction is achieved through ordered scanning using a sliding window technique, typically by sliding along the robot's motion timeline to sequentially obtain multiple pre-sensor measurement value sequences. Each pre-sensor measurement value sequence scanned by the sliding window represents a type of sensor-specific pre-sensor measurement value sequence. Specifically, as the sliding window traverses the original pose data, it sequentially extracts multiple pre-sensor measurement value sequences according to the acquisition order. The length of each pre-sensor measurement value sequence is preferably the window length of the sliding window, ensuring that one sliding window frames at least one pre-sensor measurement value sequence within the original pose data, representing at least one type of pre-sensor measurement value sequence. Pre-sensor measurement value sequences of the same type contain measurements in at least one dimension (coordinate axis dimension). Therefore, the robot can sequentially extract multiple types of pre-sensor measurement value sequences (i.e., multiple sensor-type pre-sensor measurement value sequences) using a single sliding window, or it can extract pre-sensor measurement value sequences corresponding to a single type using multiple sliding windows.

[0035] For example, starting from the initial moment, the robot measures and records the original pose data through the sensing device at every acquisition cycle, that is, it acquires the original pose data; during this acquisition process, given the length of the sliding window, the number of original pose data contained in the sliding window is N; whenever the number of original pose data recorded by the same sensor is equal to N, a sequence of pre-sensing measurement values ​​is extracted, wherein the length of the given sliding window is generally equal to N.

[0036] This can also be understood as follows: within the currently traversed area, the sliding window can extract the same type of measurement values ​​to be sensed from the latest preset number of frames cached by the sensing device in the original pose data, forming a sequence of pre-sensing measurement values.

[0037] Preferably, both the pre-sensing measurement value sequence and the original pose data include vector magnitude and vector direction angle; the robot's sensing device includes an inertial measurement unit and a rotary encoder (equivalent to a wheeled odometer), both of which are robot proprioceptive sensors. The pre-sensing measurement value sequence is a sequence of angular velocity measurements around each coordinate axis, a sequence of acceleration measurements pointing in each coordinate axis direction, a sequence of left wheel rotation measurements, or a sequence of right wheel rotation measurements. The angular velocity measurement value sequence is acquired by the gyroscope in the inertial measurement unit, the acceleration measurement value sequence is acquired by the accelerometer in the inertial measurement unit, the left wheel rotation measurement value sequence is acquired by the rotary encoder installed on the robot's left wheel, and the right wheel rotation measurement value sequence is acquired by the rotary encoder installed on the robot's right wheel.

[0038] Step 2: Connect the pre-sensory measurement value sequence along the corresponding dimensional channels to generate the first input feature, thereby starting to input the pre-sensory measurement value sequence into the impact sensing neural network, and then execute Step 3. In some embodiments, the robot connects all types of pre-sensory measurement value sequences currently extracted by the sliding window along the corresponding dimensional channels respectively, merges them into the first input feature, and inputs it into the impact sensing neural network.

[0039] Each type of pre-sensing measurement value sequence is a sequence of pre-sensing measurement values ​​of the same sensor type collected within a time period, which may include measurement values ​​of multiple dimensions; a type of pre-sensing measurement value sequence can be transmitted through a channel of one dimension, and multiple types of pre-sensing measurement value sequences can be sequentially connected to the same channel to synthesize one input feature; then all types of pre-sensing measurement value sequences within a time period can be regarded as synthesizing one input feature; preferably, the length of a time period is the window length of a sliding window, which is the length of a pre-sensing measurement value sequence.

[0040] Step 3: Control the first input feature to undergo multiple convolutional operations and one pooling operation within the pre-constructed impact sensing neural network to obtain the feature to be classified, and then execute Step 4. The pre-constructed impact sensing neural network includes multiple convolutional layers and one pooling layer. The convolutional operation of each convolutional layer involves controlling the angular velocity matrix, acceleration matrix, and left and right wheel rotation distance matrix formed by the first input feature to perform convolution operations with the corresponding weight matrix. Mathematically, this is equivalent to multiplying each element of the vector in the corresponding convolutional layer with the weight of the same convolutional layer to obtain a matrix of measurement values ​​in each dimension (equivalent to training samples within the impact sensing neural network). The feature output from the last convolutional layer is transmitted to the pooling layer for a pooling operation. The feature to be classified obtained from the pooling operation is the matrix to be classified.

[0041] The impact sensing neural network is a neural network model constructed using the construction method of a convolutional neural network. The impact sensing neural network includes multiple convolutional layers and one pooling layer. The multiple convolutional layers are connected sequentially, ensuring that the output and input layers of adjacent convolutional layers are aligned and connected (the depth between connected output and input layers is equal). In this embodiment, the impact sensing neural network is a convolutional neural network. The impact sensing neural network also includes connection layers. Before inputting all pre-sensing measurement value sequences into the impact sensing neural network, the pre-sensing measurement value sequences of all dimensions from the inertial measurement unit and the pre-sensing measurement value sequences of all dimensions from the rotary encoder are connected along the corresponding dimensional channels to generate the first input feature, which can constitute the connection layer in the convolutional neural network. After generating the input features, it can be understood that the pre-sensor measurement value sequence is input into the impact sensing neural network. This can be understood as the labeled samples to be classified being input into the first convolutional layer through the corresponding dimensional channels, thereby adapting to the first convolutional layer of the impact sensing neural network. Here, the adaptation to the input includes the depth adaptation of the network layers of the convolutional neural network and the channel adaptation of each dimension connection. Based on this, the impact sensing neural network is constructed layer by layer according to the construction method of the convolutional neural network, forming a convolutional neural network formed by stacking and connecting multiple convolutional layers.

[0042] When the angular velocity measurement sequence, acceleration measurement sequence, left wheel rotation measurement sequence, and right wheel rotation measurement sequence are input into the impact sensing neural network in parallel, at least four dimensions of channels need to be designed in the convolutional neural network and connected to the pre-sensing measurement sequence. In this case, the pre-sensing measurement sequence connected to the corresponding dimension channels forms the first input feature, which is equivalent to the inertial pose feature measurement value sensed by the inertial measurement unit and / or the wheel rotation distance feature measurement value sensed by the rotary encoder, and is labeled as the sample set recognized by the convolutional neural network. Further, if the angular velocity measurement sequence includes one dimension of angular velocity obtained by rotating around the robot's yaw angle, one dimension of angular velocity obtained by rotating around the roll angle, and one dimension of angular velocity obtained by rotating around the pitch angle, then the dimension of the channels designed in the impact sensing neural network will increase, and the dimension of the first input feature will also increase.

[0043] Specifically, step 3 controls the first input feature to undergo convolution operations sequentially within the four 1D convolutional layers to obtain the first discriminative feature. It determines that four convolutional operations are completed within the impact sensing neural network, and that the first discriminative feature is the encoding result within the four 1D convolutional layers, i.e., the result of continuous multi-layer convolutional operations. The four 1D convolutional layers are sequentially represented as the first convolutional layer (considered as the first convolutional layer within the impact sensing neural network), the second convolutional layer (considered as the second convolutional layer within the impact sensing neural network), the third convolutional layer (considered as the third convolutional layer within the impact sensing neural network), and the fourth convolutional layer (considered as the fourth convolutional layer within the impact sensing neural network). The first, second, and third convolutional layers output intermediate variables, producing sub-encoding results for the corresponding output layers. The fourth convolutional layer outputs the encoding result as the first discriminative feature, existing in matrix form. The first discriminative feature is then input into a pooling layer, where it undergoes average pooling to obtain the feature to be classified. Mathematically, this involves averaging the elements of the matrix containing the first discriminative feature. The pooling operation is performed within the impact perception neural network by integrating four convolutional layers and a pooling layer. This integrates the convolution results from four 1D convolutional layers and the average value from one pooling layer into the feature to be classified, reducing the order of magnitude of neural network parameters and creating a lightweight neural network model.

[0044] This embodiment selects an appropriate number of convolutional layers and pooling layers, the size of the convolutional layer filters, the stride of the convolutional layer filters, and the pooling operation method based on the dimension of the pre-sensing measurement value sequence (including the components of the same dimension vector in each coordinate axis direction or the rotation components around each coordinate axis) to construct the impact sensing neural network. The pooling operation has two modes: taking the maximum value and taking the average value. Preferably, the impact sensing neural network belongs to common network structure models in the field of convolutional neural networks such as LeNet, AlexNet, VggNet, and ResNet. These models have certain differences in their construction methods and are suitable for pre-sensing measurement value sequences of different dimensions (e.g., angular velocity measurement value sequences, acceleration measurement value sequences, left wheel rotation measurement value sequences, right wheel rotation measurement value sequences, etc.).

[0045] Step 4: Classify the features to be classified using the softmax algorithm to obtain the first impact prediction probability and the second impact prediction probability. Connect the features to be classified to the two nodes. This classification process includes probability prediction for each classification case, where each classification case is either a pre-sensory measurement value sequence or the case where the features to be classified are assigned to a corresponding category by the softmax algorithm. Then, execute Step 5. The softmax algorithm in Step 4 divides the features to be classified into two categories and fully connects the output matrix after multiple convolutions and one pooling operation to the two nodes.

[0046] Specifically, in step 4, the softmax algorithm is configured as a softmax classifier in the impact sensing neural network. The softmax classifier is used to calculate a first impact prediction probability and a second impact prediction probability using the feature to be classified. The feature to be classified is the information output by the two nodes it is connected to after multiple convolution and pooling operations. The two nodes include a first node (representing the position point of the robot in the impact state, belonging to the positive samples required for training the impact sensing neural network) and a second node (representing the position point of the robot in the non-impact state, belonging to the negative samples required for training the impact sensing neural network). In this embodiment, the first impact prediction probability is the probability that the feature to be classified is classified as originating from the measurement value sequence extracted from the robot in the lateral impact state, forming the first classification generated by the softmax classifier, and is also the probability that the robot's pose falls into the first node; the second impact prediction probability is the probability that the feature to be classified is classified as originating from the measurement value sequence extracted from the robot in the current non-lateral impact state, forming the second classification generated by the softmax classifier, and is also the probability that the robot's pose falls into the second node. This reduces reliance on computer storage resources, effectively reduces training time, improves the classification accuracy of pose feature information within the impact sensing neural network, and evaluates only the model probabilities of two classification cases (first impact prediction probability and second impact prediction probability), thus balancing the three requirements of detection efficiency, computing resources, and detection accuracy of the impact sensing neural network.

[0047] Step 5: Based on the loss function, calculate the loss value of the shock-sensing neural network using the first and second shock prediction probabilities; and based on the loss function, update the weights of the shock-sensing neural network using gradient descent, then update the weighted shock-sensing neural network to the desired shock-sensing neural network; then execute Step 6. Here, the weights to be updated in Step 5 are the weights of the convolutional layers, i.e., the network weights. The loss function is binary cross-entropy, where the first and second shock prediction probabilities represent the prediction results for the two classifications, respectively; thus, the shock-sensing neural network is designed as a binary classification network. Compared with existing technologies, the classification results of the convolutional neural network trained in this embodiment are simplified.

[0048] In step 5, the method of updating the weights of the impact-sensing neural network based on the loss function includes using the Adam algorithm to update the weights, i.e., using the gradient descent algorithm to update the weight matrix. The weights are iteratively solved using gradient descent to update the impact-sensing neural network, thereby obtaining the minimum loss value in step 6. Furthermore, deviation correction is performed on the pre-sensing measurement sequence and the weights. This improves the feature extraction accuracy of the impact-sensing neural network, and thus enhances the feasibility of using the impact-sensing neural network to detect whether the robot has been impacted.

[0049] In the process of introducing specific variables for function calculation, the loss function includes: ,in, It is the loss value, configured as the loss value of the impact sensing neural network; It is the actual value of the label. When =1, it means that the current prediction is that the robot will be impacted; It is the first predicted probability of being impacted. This is the second predicted impact probability; when the first predicted impact probability obtained in step 4... and the second predicted probability of impact When changes occur, the actual value of the label Changes may occur, causing the loss value to adapt according to the loss function; thus, during the process of updating the weights using the gradient descent algorithm (Adam algorithm), the loss value decreases, thereby improving the optimization effect of the loss function on the impact sensing neural network.

[0050] Step 6: Repeat steps 2 to 5 to update the impact sensing neural network by inputting the input features generated from each of the pre-sensory measurement value sequences into the weighted input features until the latest calculated loss value is less than a preset loss threshold. Then, update the weighted impact sensing neural network to the current impact sensing neural network. Specifically, the impact sensing neural network is updated once when the weights are updated. The updated impact sensing neural network is trained using the same pre-sensory measurement value sequence or its generated input features, including: performing multi-layer convolution and pooling operations; performing classification processing using the softmax algorithm to calculate the latest first impact prediction probability and the latest second impact prediction probability; and calculating the loss value based on the loss function. Step 6, by repeating steps 3 to 5, preferably minimizing the loss function, marks the latest impact sensing neural network updated in step 5 as the trained impact sensing neural network.

[0051] During the repeated execution of steps 2 to 5, each time step 5 is executed, before calculating the loss value using the loss function, it is determined whether the first predicted impact probability obtained in step 4 is greater than the second predicted impact probability obtained in step 4. If so, the true value of the label required by the loss function is set to 1, and the robot being impacted is determined to be the current prediction result. Otherwise, the true value of the label required by the loss function is set to 0, and the robot not being impacted is determined to be the current prediction result. It is worth noting that before the calculated loss value is less than the preset loss threshold, the robot impact situation derived from the relationship between the first and second predicted impact probabilities is a coarse judgment result, i.e., the current prediction result. Therefore, the process of the calculated loss value changing from being greater than or equal to the preset loss threshold to being less than the preset loss threshold is regarded as the process of training the impact-aware neural network, and also the process of updating the weights, the first predicted impact probability, the second predicted impact probability, the relevant model parameters of the convolutional layer, and the relevant model parameters of the pooling layer.

[0052] In some training embodiments, to perform rigorous model analysis, the learning rate of the network and the number of vectors in each dimension within the pre-perceived measurement sequence are adjusted. With a learning rate set to 0.001, a sample size of 8711 within a single pre-perceived measurement sequence, and 228,176 consecutive pre-perceived measurement sequences collected, the aforementioned weight updates can be iterated 140 times. Based on this, the impact perception neural network exhibits the highest precision and recall. The number of iterations can be appropriately increased or decreased depending on the need to improve accuracy and to consider time costs.

[0053] After executing steps 1 to 6 above, this application successively performs multi-layer convolution operations, pooling operations, softmax algorithm classification processing, calculates loss values ​​and updates weights to train the trained impact sensing neural network. This not only improves the extraction accuracy and classification accuracy of pose features, but also reduces the order of magnitude of the parameters of the convolutional neural network (or the impact sensing neural network). The trained impact sensing neural network thus forms a lightweight network model, accelerating the detection of robot impact.

[0054] It should be noted that, in the process of constructing the trained impact sensing neural network, the execution order of steps 1 to 6 includes:

[0055] If the robot's sensing device collects raw pose data (which may be collected before step A), first execute step 1. After extracting the pre-sensing measurement value sequence in step 1, execute step 2. After generating input features in step 2, execute step 3. After obtaining the features to be classified in step 3, execute step 4. After obtaining the first impact prediction probability and the second impact prediction probability in step 4, execute step 5. After updating the impact sensing neural network in step 5, execute step 6 to update the trained impact sensing neural network.

[0056] In each execution of step 6, it is first determined that the latest calculated loss value is less than a preset loss threshold. If the latest calculated loss value is greater than or equal to the preset loss threshold, the execution of step 2 is returned from the latest executed step 5. Then, steps 2, 3, 4, and 5 are executed in sequence to form a round of repeated execution of steps 2 to 5. Then, the weights of the impact sensing neural network are updated again. Then, step 6 is executed. This process of executing steps 2 to 5 is repeated until the latest calculated loss value is determined to be less than the preset loss threshold. The impact sensing neural network with the updated weights obtained in the latest executed step 5 is then marked as the trained impact sensing neural network described in step B.

[0057] As one embodiment, step 2, the method of constructing the impact-sensing neural network includes: sequentially connecting four 1D convolutional layers to form four continuously stacked convolutional layers, then connecting one pooling layer, configuring the kernel length of each 1D convolutional layer to 3, configuring the stride of the convolutional layer filters in each 1D convolutional layer to 1, and configuring the pooling operation in the pooling layer to take the average value, thereby constructing the impact-sensing neural network. The original values ​​of the weights of the convolutional layers are randomly generated; the input features and the weights of the convolutional layers are configured to perform convolution operations in the convolutional layers. Specifically, the four convolutional layers are connected sequentially, ensuring that the output and input layers of adjacent convolutional layers are aligned (the depth between the connected output and input layers is equal). The impact-sensing neural network constructed in this embodiment belongs to a convolutional neural network. The impact-sensing neural network also includes a connection layer to integrate and connect the pre-sensing measurement value sequence of the same dimension and generate the input features. Thus, the impact-sensing neural network is constructed layer by layer according to the construction method of the convolutional neural network, forming a multi-layer convolutional neural network with stacked and connected convolutional layers.

[0058] Based on this, this embodiment can train the trained impact sensing neural network by executing steps 1 to 6, according to the dimension of the pre-sensing measurement value sequence (including the number of components of the same dimension vector in each coordinate axis direction or the number of rotation components around each coordinate axis), selecting an appropriate number of convolutional layers and pooling layers, the size of the convolutional layer filter, the stride of the convolutional layer filter, and the pooling operation mode. This network can adapt to pre-sensing measurement value sequences of different dimensions (e.g., angular velocity measurement value sequences, acceleration measurement value sequences, left wheel rotation measurement value sequences, right wheel rotation measurement value sequences, etc.).

[0059] Preferably, the four 1D convolutional layers are sequentially represented as a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer; the depth of the input layer in the first convolutional layer is 8; the depth of the input layer in the first convolutional layer is equal to the number of column elements of the input feature, wherein the input feature is a vector combination containing the measurement values ​​of each coordinate axis in the form of a matrix. The depth of the output layer in the first convolutional layer is equal to the depth of the input layer in the second convolutional layer, the depth of the output layer in the second convolutional layer is equal to the depth of the input layer in the third convolutional layer, and the depth of the output layer in the third convolutional layer is equal to the depth of the input layer in the fourth convolutional layer, so that the first, second, third, and fourth convolutional layers are sequentially connected to form four continuously stacked convolutional layers in a three-dimensional coordinate system.

[0060] In this preferred embodiment, the ratio between the depth of the input layer and the depth of the output layer in the first convolutional layer is less than the ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer; the ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer is less than the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer; and the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer is less than the ratio between the depth of the input layer and the depth of the output layer in the fourth convolutional layer. The reciprocal of the ratio between the depth of the input layer and the depth of the output layer in the second convolutional layer is the ratio between the depth of the input layer and the depth of the output layer in the third convolutional layer.

[0061] Schematic illustration: the input layer depth of the first convolutional layer is 8, the output layer depth of the first convolutional layer is 64, the input layer depth of the second convolutional layer is 64, the output layer depth of the second convolutional layer is 128, the input layer depth of the third convolutional layer is 128, the output layer depth of the third convolutional layer is 64, the input layer depth of the fourth convolutional layer is 64, and the output layer depth of the fourth convolutional layer is 2. This can be understood as facilitating the calculation of the first and second target prediction probabilities using the softmax algorithm within the trained impact sensing neural network. It also reduces the number of channels between the convolutional layers and pooling layers.

[0062] In step 1, the sliding window maintains a constant window length while traversing the original pose data. Within the sliding window, the traversal time at its right end is consistent with the current time, while the traversal time at its left end is determined by the window length, thus configuring the pre-sensing measurement value sequence as a time series. To align the two time points of a pre-sensing measurement value sequence with the two ends of the sliding window, the length of the pre-sensing measurement value sequence is configured to be equal to the window length of the sliding window, thereby improving the effectiveness of the sliding window in extracting the pre-sensing measurement value sequence and reducing the introduction of excessive invalid data.

[0063] It should be noted that the original pose data includes acceleration measurements and acceleration direction sensed by the accelerometer, angular velocity measurements and angular velocity direction sensed by the gyroscope, left wheel rotation measurements sensed by the left rotary encoder, and right wheel rotation measurements sensed by the right rotary encoder; the left wheel rotation measurements include the robot's left wheel rotation distance or left wheel rotation rate; the right wheel rotation measurements include the robot's right wheel rotation distance or right wheel rotation rate.

[0064] Preferably, the window length of the sliding window is 30, which serves as the optimal sequence length for the pre-sensing measurement value sequence to achieve the best balance between the training efficiency and classification accuracy of the impact sensing neural network. Here, the window length represents the number of samples bounded by the sliding window within the time axis. The training efficiency refers to the efficiency of training the impact sensing neural network using the pre-sensing measurement value sequence in steps 1 to 6; the classification accuracy refers to the accuracy of the trained impact sensing neural network in classifying the pre-sensing measurement value sequence or corresponding training features.

[0065] In summary, by inputting a pre-sensing measurement value sequence of length 30 into the impact sensing neural network and executing steps 1 to 6 above, the trained impact sensing neural network is trained. Then, the measurement value sequence to be sensed is input into the trained impact sensing neural network for classification processing, and the model probability information of the first target prediction probability and the second target prediction probability is calculated. Compared with the prior art, the required neural network parameters are reduced by an order of magnitude, and the trained impact sensing neural network occupies less storage space, forming a lightweight network model that can be deployed in resource-constrained embedded systems, thereby improving the efficiency of robot detection of lateral impacts.

[0066] As one embodiment, in step 2, the method of connecting the pre-sensing measurement value sequence along the corresponding dimension channel includes: connecting the pre-sensing measurement value sequences of each type along the corresponding dimension channel according to the type of data collected by the robot's sensing device (sensor type) to generate the first input feature; specifically, during the sliding window's traversal of the original pose data, multiple pre-sensing measurement value sequences are extracted sequentially according to the order of acquisition. The length of the pre-sensing measurement value sequence is preferably the window length of the sliding window, such that one sliding window frames one pre-sensing measurement value sequence within the original pose data, i.e., a type of pre-sensing measurement value sequence; and within the same type of pre-sensing measurement value sequence, there are measurement values ​​in at least one dimension (coordinate axis dimension). Based on this, the robot connects all the currently extracted types of pre-sensing measurement value sequences along the corresponding dimensional channels and merges them into the first input feature, which is then input into the impact sensing neural network. Each type of pre-sensing measurement value sequence is a sequence of pre-sensing measurement values ​​of the same sensor type collected within a time period, which may include measurement values ​​of multiple dimensions. A type of pre-sensing measurement value sequence can be transmitted through a channel of one dimension, and multiple types of pre-sensing measurement value sequences can be sequentially connected to the same channel to synthesize the first input feature. Thus, all types of pre-sensing measurement value sequences within a time period can be regarded as synthesizing one first input feature. Preferably, the length of a time period is the window length of a sliding window, which is the length of a pre-sensing measurement value sequence.

[0067] In this embodiment, the robot's sensing device includes an inertial measurement unit (IMU) and a rotary encoder. The IMU includes an accelerometer for sensing acceleration measurements and a gyroscope for sensing angular velocity measurements. The rotary encoder includes a left rotary encoder for sensing left wheel rotation measurements and a right rotary encoder for sensing right wheel rotation measurements. Therefore, the pre-sensing measurement value sequence is a 3-axis angular velocity measurement value sequence, a 3-axis acceleration measurement value sequence, a 1-axis left wheel rotation measurement value sequence, or a 1-axis right wheel rotation measurement value sequence, such that the dimension of the input features is at least 8. The input features are set in matrix form. Specifically, for a pre-sensing measurement value sequence, especially within the 3-axis angular velocity measurement value sequence and the 3-axis acceleration measurement value sequence, the 1-axis measurement value sequence is connected to the impact sensing neural network along a one-dimensional channel. The 1-axis measurement value sequence is a sequence of measurements obtained in the robot's yaw angle direction, roll angle direction, or pitch angle direction. The 1-axis measurement value sequence is a vector sequence, where both the angular velocity and acceleration measurements are set in vector form and arranged into a time series according to a certain timeline. Thus, by aligning with the timestamps of the pre-sensing measurement value sequence acquired in real time by the sensing device, steps A to D are performed to mark a pre-sensing measurement value sequence as either impacted or not impacted.

[0068] Based on the above embodiments, in step B, the method of classifying the sequence of measurement values ​​to be perceived using a trained impact sensing neural network includes: inputting the sequence of measurement values ​​to be perceived into the trained impact sensing neural network, and controlling the sequence of measurement values ​​to be perceived to be connected along channels of the corresponding dimension to generate a second input feature; within the trained impact sensing neural network, the sequence of measurement values ​​to be perceived is updated to the pre-perceived measurement value sequence; wherein, the trained impact sensing neural network includes a connection layer, and the sequence of measurement values ​​to be perceived generates the second input feature within the connection layer.

[0069] The second input feature is controlled to undergo four convolutional layers and one pooling layer within the trained shock-sensing neural network to obtain target classification features. Then, the softmax algorithm is used to classify the target classification features, obtaining the first target prediction probability and the second target prediction probability. Then, step C is executed. Specifically, within the trained shock-sensing neural network, convolutional operations are performed sequentially within four convolutional layers to obtain the second discriminative feature. This is equivalent to controlling the input feature to be encoded within a series of consecutively stacked convolutional layers to obtain the second discriminative feature. This second discriminative feature is the encoded result output from either the last convolutional layer (traversing layer by layer in a series of consecutively stacked convolutional layers) or the last convolutional layer (traversing in the direction of sequential connection of multiple convolutional layers), and exists in matrix form. Then, the second discriminative feature is input into the pooling layer; then, the second discriminative feature is controlled to undergo average pooling processing within the pooling layer (mathematically understood as averaging the elements in the matrix containing the discriminative feature) to obtain the target classification feature. The trained impact-sensing neural network calculates the target classification feature by integrating the trained parameters of multiple convolutional layers and the trained parameters of a pooling layer. The target classification feature is equivalent to the target state of the feature to be classified. Then, the softmax algorithm is used to classify the target classification feature, obtaining the first target prediction probability and the second target prediction probability. Then, the softmax algorithm is used to classify the target classification feature, obtaining the first prediction probability and the second prediction probability of the robot being impacted at the current moment, connecting the target classification feature to two nodes. Here, the classification process includes probability prediction for each classification case, where each classification case is either the sequence of the measured values ​​to be sensed or the case where the feature to be classified is assigned to a corresponding category by the softmax algorithm. Then, step C disclosed in the aforementioned embodiment is executed to determine whether the robot is experiencing a lateral impact at the current moment.

[0070] In this embodiment, the softmax algorithm is configured as a softmax classifier within the trained impact-sensing neural network. The softmax classifier is used to calculate the first target prediction probability and the second target prediction probability using the target classification features. The target classification features are the information output by the two nodes connected to it after multiple convolution and pooling operations. The two connected nodes include a first node (representing the position point of the robot in the impact state, belonging to the positive samples required for training the trained impact-sensing neural network) and a second node (representing the position point of the robot in the non-impact state, belonging to the negative samples required for training the trained impact-sensing neural network). In this embodiment, the first target prediction probability can be understood as the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted from the robot in its current lateral impact state, forming the probability of the first classification generated by the softmax classifier, and also the probability that the robot's current position falls into the first node. The second target prediction probability can be understood as the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted from the robot in its current non-lateral impact state, forming the probability of the second classification generated by the softmax classifier, and also the probability that the robot's current position falls into the second node. This improves the feature extraction capability of the trained impact perception neural network and reduces misjudgment.

[0071] In summary, the aforementioned embodiments, which use the trained impact-sensing neural network for robot impact detection, can reduce reliance on computer storage resources, effectively reduce training time, improve the classification accuracy of pose feature information within the trained impact-sensing neural network, and evaluate only the model probabilities of two classification cases (the predicted probability of the first target and the predicted probability of the second target), thus balancing the three requirements of efficiency, computing resources, and accuracy of the trained impact-sensing neural network for robot lateral impact detection.

[0072] When a robot climbs over low obstacles such as chair legs or table legs, it may only vibrate without experiencing lateral impact. In the time series of sensor data collected by the robot, the acceleration (sensed by the inertial measurement unit) or angular velocity may change significantly within a short time series, causing noticeable changes in the measurement value series of related dimensions. Under the extended Kalman filter (EKF) framework, this could be misjudged as a lateral impact. To detect lateral impact in scenarios involving both climbing over low obstacles and lateral displacement due to lateral impact, this application utilizes the trained impact-sensing neural network disclosed in the aforementioned embodiments to classify the measurement value series to be sensed, obtaining a first target prediction probability and a second target prediction probability. When the first target prediction probability is greater than the second target prediction probability, it is determined that the robot has experienced a lateral impact. This achieves accurate detection of whether the robot has undergone lateral displacement, building upon the accuracy achieved by the trained impact-sensing neural network.

[0073] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for detecting lateral impacts in robots based on an impact-sensing neural network, characterized in that, Methods for detecting lateral impacts using robots include: Step A: Control the robot's sensing device to collect raw pose data and extract the sequence of measurement values ​​to be sensed from the raw pose data; Step B: Use the trained impact sensing neural network to classify the sequence of measurement values ​​to be sensed, and obtain the prediction probability of the first target and the prediction probability of the second target. Step C: Determine whether the predicted probability of the first target is greater than the predicted probability of the second target. If yes, determine that the robot has detected that it has been subjected to a lateral impact; otherwise, determine that the robot has detected that it has not been subjected to a lateral impact. Wherein, the first target prediction probability is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted when the robot is currently subjected to lateral impact; the second target prediction probability is the probability that the sequence of measurements to be sensed is classified as the sequence of measurements extracted when the robot is currently not subjected to lateral impact. The method for constructing the trained shock-sensing neural network includes: Step 1: Extract the pre-sensing measurement value sequence from the pre-acquired pose data using a sliding window, wherein the length of the pre-sensing measurement value sequence is the window length of the sliding window; Step 2: Connect the pre-sensory measurement value sequence along the channels of the corresponding dimensions to generate the first input feature; Step 3: Control the first input feature to perform multiple convolutional operations and one pooling operation within the pre-constructed impact sensing neural network to obtain the feature to be classified; wherein, the impact sensing neural network is a neural network model constructed according to the construction method of the convolutional neural network, and the impact sensing neural network includes multiple consecutively stacked convolutional layers and one pooling layer. Step 4: Use the softmax algorithm to classify the features to be classified, and obtain the first impact prediction probability and the second impact prediction probability; Step 5: Based on the loss function, calculate the loss value of the shock-sensing neural network using the first and second shock prediction probabilities; and based on the loss function, update the weights of the shock-sensing neural network using gradient descent to obtain the weight-updated shock-sensing neural network; wherein, the loss function is the binary cross-entropy, and the first and second shock prediction probabilities are the prediction results of the two categories in the loss function; the currently updated weights are the weights of the convolutional layer. Step 6: Repeat steps 2 to 5 to input the pre-sensing measurement value sequence into the weighted and updated shock sensing neural network until the latest calculated loss value is less than the preset loss threshold, and mark the weighted and updated shock sensing neural network as the trained shock sensing neural network.

2. The robot method for detecting lateral impact according to claim 1, characterized in that, The softmax algorithm in the impact sensing neural network occupies an output layer in the manner of a softmax classifier. The softmax classifier is used to calculate the first impact prediction probability and the second impact prediction probability using the features to be classified; wherein, the features to be classified are the information output by the two nodes to which they are connected after multiple convolution and pooling operations; Wherein, the first impact prediction probability is the probability that the feature to be classified is classified as originating from the sequence of measurement values ​​extracted from the robot under lateral impact, so as to form the probability of the first classification generated by the softmax algorithm; The second impact prediction probability is the probability that the pre-sensory measurement sequence or the feature to be classified is classified as a measurement sequence extracted from the robot under conditions where it is not subject to lateral impact, thus forming the probability of the second classification generated by the softmax algorithm.

3. The robot method for detecting lateral impacts according to claim 2, characterized in that, During the repeated execution of steps 2 to 5, each time step 5 is executed, before using the loss function to calculate the loss value, it is determined whether the first impact prediction probability obtained in step 4 is greater than the second impact prediction probability obtained in step 4. If so, the true value of the label required by the loss function is set to 1 and it is determined that the robot is subjected to lateral impact as the current prediction result. Otherwise, the true value of the label required by the loss function is set to 0 and it is determined that the robot is not subjected to lateral impact as the current prediction result.

4. The robot method for detecting lateral impacts according to claim 1, characterized in that, In step 2, the methods for constructing the impact sensing neural network include: Four 1D convolutional layers are connected sequentially, followed by a pooling layer. The kernel length of each 1D convolutional layer is configured to be 3, the stride of the convolutional filter in each 1D convolutional layer is configured to be 1, and the pooling operation in the pooling layer is configured to take the average value, so as to construct the impact sensing neural network. The original values ​​of the weights of the convolutional layer are randomly generated and can be updated by the gradient descent method based on the determined loss function; the first input feature and the weights of the convolutional layer are configured to perform convolution operations in the convolutional layer.

5. The robot method for detecting lateral impacts according to claim 4, characterized in that, The operation method of step 3 includes: The first input feature generated in control step 2 is sequentially convolved in the four 1D convolutional layers to obtain the first discriminative feature, and it is determined that the first discriminative feature is the encoding result in the four 1D convolutional layers; then the first discriminative feature is input into the pooling layer. Then, the first discriminative feature is controlled to undergo average pooling within the pooling layer to obtain the feature to be classified.

6. The robot method for detecting lateral impacts according to claim 5, characterized in that, The four 1D convolutional layers are referred to as the first convolutional layer, the second convolutional layer, the third convolutional layer, and the fourth convolutional layer, respectively. The depth of the input layer in the first convolutional layer is 8, and the depth of the input layer in the first convolutional layer is equal to the width of the first input feature. The width of the first input feature is the dimension of the column elements of the feature matrix in which the first input feature is located. The depth of the output layer in the first convolutional layer is equal to the depth of the input layer in the second convolutional layer, the depth of the output layer in the second convolutional layer is equal to the depth of the input layer in the third convolutional layer, and the depth of the output layer in the third convolutional layer is equal to the depth of the input layer in the fourth convolutional layer, so that the first convolutional layer, the second convolutional layer, the third convolutional layer and the fourth convolutional layer are connected in sequence. The depth of the output layer in the fourth convolutional layer is 2.

7. The robot method for detecting lateral impacts according to claim 4, characterized in that, In step 5, the method for calculating the loss value of the shock-sensing neural network based on the loss function using the first shock prediction probability and the second shock prediction probability includes: ,in, It is the loss value of the impact sensing neural network; It is the actual value of the label. When =1, it means that the current prediction is that the robot will be impacted; It is the first predicted probability of being impacted. This is the second predicted probability of being impacted; The loss function is binary cross-entropy, which is used to design the shock-sensing neural network as a binary classification network.

8. The robot method for detecting lateral impacts according to claim 4, characterized in that, In step 2, the method of connecting the pre-sensor measurement value sequence along the channels of the corresponding dimension includes: According to the type of data collected by the robot's sensing device, the pre-sensing measurement value sequences of each type are connected along the corresponding dimensional channels to synthesize the first input feature; wherein, the pre-sensing measurement value sequence is a 3-axis angular velocity measurement value sequence, a 3-axis acceleration measurement value sequence, a 1-axis left wheel rotation measurement value sequence, or a 1-axis right wheel rotation measurement value sequence, so that the dimension of the first input feature is at least equal to 8; The inertial measurement unit installed inside the robot is used to collect the 3-axis angular velocity measurement value sequence and the 3-axis acceleration measurement value sequence; the rotary encoders installed on both sides of the robot are used to collect the 1-axis left wheel rotation measurement value sequence and the 1-axis right wheel rotation measurement value sequence, respectively.

9. The robot method for detecting lateral impact according to claim 8, characterized in that, In step B, the method of classifying the sequence of shock-sensing measurements using a trained shock-sensing neural network includes: The sequence of measurement values ​​to be sensed is input into the trained impact sensing neural network, and the sequence of measurement values ​​to be sensed is controlled to be connected along the channels of the corresponding dimension to generate a second input feature; within the trained impact sensing neural network, the sequence of measurement values ​​to be sensed is updated to the pre-sensing measurement value sequence. The second input feature is controlled to undergo four convolutional layers and one pooling layer within the trained impact perception neural network to obtain target classification features; then, the target classification features are classified using the softmax algorithm to obtain the first target prediction probability and the second target prediction probability; then, step C is executed.

Citation Information

Patent Citations

  • Path tracking control method of transfer robot based on neural network

    CN111624992A

  • Anti-impact scanning matching method and system based on multi-sensor decision fusion

    CN113566828A

  • Robot impact detection method, chip and robot

    CN117283606A