Magnetic adsorption cleaning robot end-to-end trajectory planning algorithm

By combining a multimodal perception backbone network and a Transformer model, an end-to-end trajectory planning algorithm was designed to solve the trajectory planning problem of magnetic adsorption cleaning robots in complex oil storage tanks, thus achieving efficient and safe cleaning tasks.

CN119472664BActive Publication Date: 2025-12-12CHINA YANGTZE POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411584697.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-12-12
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

Existing trajectory planning algorithms for magnetic adsorption cleaning robots in large oil storage tanks struggle to effectively handle obstacles and dynamic changes in complex environments, resulting in insufficient cleaning efficiency and safety.

Method used

An end-to-end trajectory planning algorithm is designed by combining a multimodal perception backbone network with a Transformer model. Visual, ultrasonic, and LiDAR data are fused through a multi-head attention mechanism, control commands are generated using a Decoder network, and the model is optimized through a step-by-step training strategy.

Benefits of technology

This improves the cleaning robot's understanding and adaptability to the environment, ensures the accuracy of trajectory planning and rapid response to dynamic environments, and enhances the safety and efficiency of cleaning operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119472664B_ABST
    Figure CN119472664B_ABST
Patent Text Reader

Abstract

An end-to-end trajectory planning algorithm for magnetic adsorption cleaning robots aims to improve the autonomous navigation and cleaning efficiency of the robot in complex environments. The algorithm first extracts environmental features by fusing visual, ultrasonic and lidar data using a multi-modal perception backbone network and a Transformer model. Then, based on the Transformer-based Decoder design, the robot control quantities (linear velocity, angular velocity and electromagnet opening) are embedded into the decoding process to achieve precise trajectory planning and electromagnet control. To ensure the stability and performance of the model, a step-by-step training strategy is adopted, first fixing the perception network parameters to train the decoder, and then performing end-to-end joint training. By introducing position encoding, regularization methods, early stopping strategies and gradient clipping techniques, the generalization ability and training efficiency of the model are improved. The invention shows significant advantages in multi-modal data fusion, environmental feature representation, trajectory planning and control, and is suitable for cleaning operations in various complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of intelligent robot trajectory planning, and particularly relates to a kind of end-to-end trajectory planning algorithm for magnetic adsorption cleaning robot. BACKGROUND

[0002] Intelligent cleaning robots using magnetic adsorption technology perform well in maintenance and cleaning tasks on vertical or inclined metal surfaces, which can significantly reduce the cost of cleaning large storage tank equipment. The ability of the robot to clean autonomously is directly related to the adaptability of the trajectory planning algorithm, and there are significant differences in path planning and ideal cylindrical navigation in the oil collection tank inside the large oil storage tank. The internal structure of large oil storage facilities is complex, and there are obstacles such as valves, sensors, and reinforcing ribs that affect the robot's progress; during the cleaning process, the environment will change dynamically due to changes in the medium on the inner surface of the tank, and uncleaned oil droplets will fall. The above factors pose challenges to the trajectory planning algorithm of the intelligent agent, and higher requirements are put forward for the cumulative error processing ability, real-time reaction ability and cleaning task efficiency optimization. SUMMARY

[0003] The technical problem to be solved by the present application is to provide an end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot, which uses artificial intelligence end-to-end model technology, processes the input from the multi-modal sensor through the model, and directly outputs the planned trajectory and control instructions for the magnetic adsorption electromagnet. In this process, the perception results are transmitted in the form of features, and the model remembers, learns and predicts the future environment and behavior prediction, and finally the planned trajectory and electromagnet control instructions are directly output from the decoded prediction information.

[0004] To solve the above technical problems, the technical scheme adopted by the present application is:

[0005] An end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot, comprising the following steps:

[0006] Step 1, training a multi-modal perception backbone network, using multi-modal sensor data collected by a magnetic adsorption cleaning robot, using a Transformer model to extract environmental features , wherein the Transformer model is a deep learning model;

[0007] Step 2, design a Transformer-based Decoder network, responsible for embedding robot control quantities into existing encoded information, and generating output sequences suitable for the current environmental features . Decoder will calculate based on the previously generated output sequence (i.e. control instructions at the previous time step) to generate a new output sequence;

[0008] Step 3: Design a Transformer-based regression output head network to map the last layer features in the Decoder's sequence output to the target trajectory of the agent and the target strength of the magnetically attracted electromagnet.

[0009] Step 4: Implement the training process using a step-by-step training strategy to obtain the optimal end-to-end trajectory of the magnetic adsorption cleaning robot.

[0010] Preferably, in step 1, environmental features are extracted using the multimodal sensor data collected by the magnetic adsorption cleaning robot and a Transformer model. The training process of the multimodal perception backbone network is as follows:

[0011] The raw input to a multimodal sensor is a time-series data set, representing visual data respectively. ,ultrasound and lidar data The data in each set exists at different time steps. The data is recorded, and the dimension of each sensor's data depends on the characteristics of its type. For image data... Dependent on one The tensors represent the image height, width, and number of channels (3 for RGB); for ultrasound data... It is a dimension The vector represents the reading value from the ultrasonic sensor; for lidar data... It is The matrix, where Represents the number of points on the lidar. The feature dimensions representing each point (spatial coordinates and reflection intensity, usually 4-dimensional)

[0012] ;

[0013] ;

[0014] ;

[0015] Different networks were used to extract the temporal features of the time series data sets of each of the above modalities. Features below Each set of features has different dimensions. For example, vision uses convolutional neural networks (CNNs) and... As the parameter set of the CNN, the final result was obtained. The feature set; similarly, for the ultrasonic range field, a fully connected network (FC) is used and... As a parameter set, the LiDAR point cloud uses the more mature pre-trained point cloud processing network PointNet. As a parameter:

[0016] ;

[0017] ;

[0018] ;

[0019] Features of each modality Mapped to a space of the same dimension, assuming the target dimension is... Each modality has a feature mapping matrix. and bias vector And can be combined to represent a single sequence. :

[0020] ;

[0021] ;

[0022] ;

[0023] Constructing a query fusion of multi-head attention mechanisms ,key ,value Matrix, each matrix is ​​composed of features Multiply by their respective weight matrices , and "Get" and "obtain" respectively indicate "through". , and Projected query, key, and value matrix:

[0024] ;

[0025] ;

[0026] ;

[0027] Constructing multi-head attention computation equations It represents A person's attention Output: The similarity between the query and the key is reflected by calculating the dot product of the query and the key, divided by... To avoid gradient instability, by The function converts similarity scores into a probability distribution, and then modifies it with the value matrix. Multiplying them yields a weighted output. representing the number of heads of queries, keys, values matrices, , is the number of attention heads.

[0028] ;

[0029] Further, the output of each attention head is concatenated and multiplied by an output projection matrix to obtain multi-head attention output , i.e., the fused feature ;

[0030] ;

[0031] ;

[0032] After obtaining the fused feature , the original feature is added to the fused feature through multiple residual connections, and layer normalization is further implemented to alleviate gradient vanishing, and a feed-forward neural network is applied to each modality position in the process for further processing fusion to enhance nonlinear expression capability, and modality dimension average pooling is performed to obtain a unified feature representation:

[0033] ;

[0034] ;

[0035] ;

[0036] ;

[0037] Position encoding is added to the feature to preserve time series information, and further, all time step embedding vectors are composed into a complete time series (input sequence) :

[0038] ;

[0039] ;

[0040] The embedding sequence is input to obtain an environmental feature representation , i.e., the output feature of the Encoder, and the supervised signal (Expected Label) Design Loss Function This function measures how well the model's output matches the target, using cross-entropy loss to supervise the training process.

[0041] ;

[0042] .

[0043] Preferably, in step 2, the obtained environmental feature representation The input sequence used as the decoder Part of it, it provides contextual information about the environment. The Decoder input sequence includes the output sequence of the previous time step. And it is embedded and position-encoded. Mapped to 3D vector space:

[0044] ;

[0045] It is position encoding, using the following design to encode the robot's control inputs. That is, including linear velocity Orientation angle and electromagnet opening Trajectory embedding sequences are used to enhance the correlation between trajectory planning and electromagnet control.

[0046] ;

[0047] ;

[0048] ;

[0049] ;

[0050] The positional encoding update and the final embedding equation are then expressed as follows: Where... Represents traditional sine and cosine position coding;

[0051] ;

[0052] ;

[0053] ;

[0054] ;

[0055] For each layer of the decoder based on the Transformer architecture, the following modules are included: a masked multi-head self-attention layer , an encoder-decoder attention layer (using the output from step 2 in this layer ), a feed-forward neural network layer , a residual connection, and layer normalization (Here and are the standard deviation and variance, respectively, and are learnable parameters); by stacking multiple such layer structures, the decoder is able to effectively process the input sequence and generate the output:

[0056] ;

[0057] ;

[0058] ;

[0059] ;

[0060] ;

[0061] ;

[0062] ;

[0063] .

[0064] Preferably, the sub-steps of step 3 are:

[0065] First, define the trajectory information to include the heading angle , the linear velocity , the electromagnet control signal , then it is obvious that the dimension of the output layer is ;

[0066] Use a linear layer to map the output of the decoder to the required output dimension:

[0067]

[0068]

[0069]

[0070]

[0071]

[0072] wherein denotes the output vector of the decoder at the t-th time step; is the weight matrix of the output layer, is the bias vector, is the output without activation function;

[0073] Since the value range and nature of each output are different, a suitable activation function needs to be selected for each output, wherein represents :

[0074] ;

[0075] ;

[0076] ;

[0077] Then the final control vector is:

[0078] ;

[0079] The loss function is calculated, respectively, the angle loss , using the angle difference calculation, ensuring the continuity of the angle error, using the mean square error to calculate the angle loss , the speed loss and the electromagnet strength loss :

[0080] ;

[0081] ;

[0082] ;

[0083] ;

[0084] The trajectory and electromagnet control output end loss function is obtained, and the optimal weight term is measured by multiple experiments:

[0085] .

[0086] Preferably, in step 4, the process of the step-by-step training strategy is as follows:

[0087] (1) On the basis of freezing the trained Transformer perception network parameters, the extracted environmental features, the decoder and the output layer are used to train the decoder in combination with the defined loss function;

[0088] (2) At each time step t, the frozen perception network is used to extract environmental features as input to the decoder; at the same time, the decoder receives the control quantity information of the previous time step; the control quantity information includes linear velocity, angular velocity and electromagnet opening, which is embedded and fused into the decoder input; the control quantity is mapped to the same dimension as the position encoding through linear transformation, and then weighted and added with the position encoding to form a new position encoding;

[0089] (3) During training, a comprehensive loss function is defined to measure the difference between the model's predicted control instructions and the true values, including the errors of linear velocity, angular velocity and electromagnet opening, and a weight coefficient is set for each loss term to balance the contribution of each part to the total loss; by minimizing the total loss function, the parameters of the decoder and the output layer are optimized, so that the model can accurately generate control instructions;

[0090] (4) The perception network is unfrozen and jointly trained with the decoder in an end-to-end manner, optimizing the parameters of the perception network and the decoder to minimize the total loss function.

[0091] Preferably, in the step-by-step training strategy, the entire training process adopts a teacher forcing strategy, which uses the real target sequence as the input of the next time step when training the sequence generation model, accelerating the convergence of the model and improving the training efficiency; at the same time, the gradient clipping method is adopted to ensure the stability of the model training.

[0092] The present application can achieve the following beneficial effects:

[0093] 1. The present application adopts a multi-modal perception backbone network, which can effectively integrate visual, ultrasonic wave and laser radar and other multi-sensor data, improving the understanding ability and adaptability of the cleaning robot to the environment. Different networks (such as convolutional neural network, fully connected network, point cloud processing network) are used to extract features from different modal data, and a multi-head attention mechanism is used for deep fusion, ensuring that the model can comprehensively understand the surrounding environment from multiple angles.

[0094] 2. Through the use of the Transformer model, the present application can more efficiently capture long-term dependencies in time series data, which is crucial for path planning of the cleaning robot. Especially by adding position encoding, the information of time series is maintained, which helps the robot better understand the changes in dynamic environment.

[0095] 3. The Decoder design based on Transformer allows the robot's control quantities (such as linear velocity, angular velocity and electromagnet opening) to be embedded into the decoding process, enhancing the relevance between trajectory planning and electromagnet control. This design not only improves the accuracy of trajectory planning, but also ensures that the robot can respond quickly to environmental changes, improving the safety and efficiency of cleaning operations.

[0096] 4. The method of step-by-step training is adopted, the decoder is trained by fixing the perception network parameters first, and then the end-to-end joint training is performed, which effectively solves the instability problem that may be encountered at the initial stage of model training. This method helps to gradually improve the overall performance of the model, and also facilitates the adjustment and optimization of each component, avoiding the occurrence of overfitting phenomenon. BRIEF DESCRIPTION OF DRAWINGS

[0097] The application will be further described below in conjunction with the drawings and examples:

[0098] Fig. 1 A schematic diagram of the cleaning robot and multi-modal data source of the application;

[0099] Fig. 2 An end-to-end deep neural network model architecture of the application;

[0100] Fig. 3 A schematic diagram of the results of robot trajectory planning (simulation environment) of the application. DETAILED DESCRIPTION

[0101] The preferred scheme is as shown in Figs. 1 to 3 A magnetic adsorption cleaning robot end-to-end trajectory planning algorithm is designed to improve the autonomous navigation and cleaning efficiency of the robot in complex environments. The algorithm first uses a multi-modal perception backbone network to fuse visual, ultrasonic and laser radar data using a Transformer model to extract environmental features. Then, based on the Transformer-based Decoder design, the robot control quantities (linear speed, angular speed and electromagnet opening) are embedded in the decoding process to achieve precise trajectory planning and electromagnet control. To ensure the stability and performance of the model, a step-by-step training strategy is adopted, the decoder is trained by fixing the perception network parameters first, and then the end-to-end joint training is performed. By introducing position encoding, regularization method, early stopping strategy and gradient clipping technology, the generalization ability and training efficiency of the model are improved. The application shows significant advantages in multi-modal data fusion, environmental feature representation, trajectory planning and control, and is suitable for cleaning operations in various complex environments. The specific method is as follows:

[0102] Step 1: Train the multi-modal perception backbone network. Use the multi-modal sensor data collected by the magnetic adsorption cleaning robot to extract environmental features using the Transformer model The mathematical description of the multi-modal perception backbone network is as follows.

[0103] The original input of the multi-modal sensor is a set of time series data, representing visual, ultrasonic and laser radar data respectively. The data in each set is at different time steps The recorded data and the dimension of each sensor data depends on the characteristics of its type:

[0104] ;

[0105] ;

[0106] ;

[0107] The time series data set of each modality is used to extract its features in time domain , each set of features has different dimensions For example, vision uses convolutional neural network (CNN) and uses as the parameter set of CNN, and finally gets the feature set of Similarly, for the ultrasound distance field, a fully connected network (FC) is used, and is used as the parameter set, while the laser radar point cloud uses a more mature pre-trained point cloud processing network PointNet, and is used as the parameter:

[0108] ;

[0109] ;

[0110] ;

[0111] Map the features of each modality to the same dimensional space, assuming the target dimension is , each modality has a feature mapping matrix and a bias vector , and can be combined to represent a sequence :

[0112] ;

[0113] ;

[0114] ;

[0115] Construct a multi-head attention mechanism fusion query , key , value matrix, each matrix is obtained by multiplying the feature by the respective weight matrix , and , respectively representing the passage through ,​ and Projected query, key, and value matrix:

[0116] ;

[0117] ;

[0118] ;

[0119] Constructing multi-head attention computation equations It represents A person's attention Output: The similarity between the query and the key is reflected by calculating the dot product of the query and the key, divided by... To avoid gradient instability, by The function converts similarity scores into a probability distribution, and then modifies it with the value matrix. Multiplying them yields a weighted output. Represents the first The query, key, and value matrix of the size. , It refers to the number of heads to focus on.

[0120] ;

[0121] Furthermore, each attention head can be... output connection And multiply by an output projection matrix Receive multi-head attention output That is, to obtain the fused features ;

[0122] ;

[0123] ;

[0124] Obtain fusion features Then, multiple residual connections are performed to combine the original features. Add to fusion features Further implement layer normalization To mitigate gradient vanishing, a feedforward neural network is applied to the position of each mode during the process. Further processing and fusion are performed to enhance nonlinear expressive power, and average pooling is applied to the modal dimension. To obtain a unified feature representation:

[0125] ;

[0126] ;

[0127] ;

[0128] ;

[0129] Adding positional encoding to features to preserve temporal sequence information and further compose the embedding vectors of all time steps into a complete time sequence (input sequence) :

[0130] ;

[0131] ;

[0132] Embedding sequence input to get the environment feature representation , i.e. the output feature of the Encoder, and design a loss function for the supervised signal , i.e. the expected label, which is used to measure the matching degree between the model output and the target, and supervise the training process through cross-entropy loss.

[0133] ;

[0134] .

[0135] Second step: design a Transformer-based Decoder to embed the robot control quantities and generate a new output sequence according to the encoded environment features and the previous output sequence.

[0136] The obtained environment feature representation is used as part of the input sequence of the Decoder , providing the context information of the environment. The Decoder input sequence includes the output sequence of the previous time steps, which is mapped to a vector space of dimensions through embedding and positional encoding (PositionEmbed) :

[0137] ;

[0138] is the positional encoding, which is designed as follows to embed the robot control quantities , i.e. including linear velocity , heading angle , and electromagnet opening Trajectory embedding sequence to enhance the correlation between trajectory planning and electromagnet control:

[0139] ;

[0140] ;

[0141] ;

[0142] ;

[0143] Then the update of position encoding and the final embedding equation are represented as. Where represents the traditional sine-cosine position encoding;

[0144] ;

[0145] ;

[0146] ;

[0147] ;

[0148] For each layer of the decoder based on the Transformer architecture, the following modules are included: a masked multi-head self-attention layer , an encoder-decoder attention layer (using the obtained in step 2 in this layer), a feed-forward neural network layer , a residual connection, and layer normalization (here and are the standard deviation and variance, and are learnable parameters); by stacking multiple such layer structures, the decoder can effectively process the input sequence and generate the output:

[0149] ;

[0150] ;

[0151] ;

[0152] ;

[0153] ;

[0154] ;

[0155] ;

[0156] .

[0157] Third step: design a Transformer-based Header to convert the sequence output of the Decoder into the target trajectory of the agent and the target strength of the magnetic attraction electromagnet.

[0158] First, define the trajectory information to include the heading angle , linear velocity , and electromagnet control signal . Obviously, the dimension of the output layer is ;

[0159] Use a linear layer to map the output of the Decoder to the required output dimension:

[0160]

[0161]

[0162]

[0163]

[0164]

[0165] where is the output vector of the Decoder at the t-th time step; is the weight matrix of the output layer, is the bias vector, is the output before the activation function;

[0166] Since the value range and properties of each output are different, we need to choose a suitable activation function for each output, where represents :

[0167] ;

[0168] ;

[0169] ;

[0170] Then the final control vector is:

[0171] ;

[0172] Calculate the loss function, which is the angle loss , calculated using the angle difference to ensure the continuity of the angle error, and the mean square error to calculate the angle loss , speed loss and electromagnet strength loss :

[0173] ;

[0174] ;

[0175] ;

[0176] ;

[0177] The trajectory and electromagnet control output loss function is obtained, and the optimal weight term is measured by multiple experiments:

[0178] .

[0179] Fourth step: implement the training process using a step-by-step training strategy.

[0180] To ensure the stability of the model and improve performance, we use a step-by-step training strategy. First, based on the frozen parameters of the trained Transformer perception network, we use the environment features extracted in the previous steps, the decoder and the output layer, and combine them with the defined loss function to train the decoder.

[0181] At each time step t, the frozen perception network is used to extract environmental features as input to the decoder. At the same time, the decoder receives the control quantity information (linear velocity, angular velocity and electromagnet opening) of the previous time step, which is embedded and fused into the decoder input. Specifically, the control quantity is mapped to the same dimension as the position encoding through linear transformation, and then added to the position encoding with a weight to form a new position encoding. This allows the model to utilize not only the time position information but also the previous control quantity information during decoding, improving the modeling ability of the control instruction sequence.

[0182] During training, a comprehensive loss function is defined to measure the difference between the model's predicted control instructions and the true values, including the errors of linear velocity, angular velocity and electromagnet opening. Weight coefficients are set for each loss term to balance the contribution of each part to the total loss. By minimizing the total loss function, the parameters of the decoder and output layer are optimized, allowing the model to accurately generate control instructions.

[0183] Next, the perception network is thawed, and the decoder is jointly trained end-to-end, optimizing the parameters of both the perception network and the decoder to minimize the total loss function. In this way, the various parts of the model can work together to further improve overall performance. To prevent overfitting, we use early stopping strategies during training, stopping training early when validation set performance no longer improves, and using regularization methods such as weight decay and Dropout to enhance the model's generalization ability.

[0184] Throughout the training process, a teacher forcing strategy is adopted, using the real target sequence as the input for the next time step when training the sequence generation model, accelerating the convergence of the model and improving training efficiency. At the same time, attention is paid to the problem of gradient vanishing or explosion, and techniques such as gradient clipping are used to ensure the stability of model training.

[0185] Receiving multi-modal sensor input: the algorithm receives multi-modal input data from different sensors, including camera image input, inertial navigation data, near-field ultrasonic data, lidar data, etc. These inputs implicitly provide context information about the robot and its environment;

[0186] Feature extraction network: input the data of each modality into the corresponding feature extraction network to extract high-dimensional features of each modality;

[0187] Environment feature BEV representation: the feature output through step 2 is reorganized into a BEV-based environment representation Z using a Transformer Encoder module with multi-head attention mechanism. This representation provides a context for an environment;

[0188] Trajectory and environment Transformer module: at this point, the trajectory Transformer and environment Transformer modules receive the encoded environment representation Z. The environment Transformer module extracts key spatial features from Z, while the trajectory Transformer focuses on path planning information through the self-attention mechanism of Transformer, and these modules can capture the complex relationship between the environment and the path.

[0189] Control Transformer module: the control Transformer receives output features from the trajectory Transformer and environment Transformer, and combines the robot's current action query to generate a control prediction containing time series information.

[0190] Control sequence decoder: The output of the control Transformer is passed to the control sequence decoder head, generating time-step-wise control sequences. These sequences represent specific action instructions that the robot should take at the next time step, including movement direction, speed, and adjustment of magnetic attraction strength.

[0191] Robot control output: Finally, the output of the control sequence decoder is converted into actual robot control signals, driving the robot to perform cleaning tasks in the environment. Through end-to-end planning and control, the robot is able to achieve autonomous path planning based on sensor data, avoiding obstacles and cleaning specific areas in magnetic attraction mode.

[0192] The above-described embodiments are merely preferred technical solutions of the present application, and should not be regarded as limitations on the present application. The protection scope of the present application should be based on the technical solutions recited in the claims, including equivalent replacement solutions of the technical features recited in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present application.

Claims

1. A magnetic suction cleaning robot end-to-end trajectory planning algorithm, characterized in that The method comprises the following steps: Step 1, training a multi-modal perception backbone network, using multi-modal sensor data collected by a magnetic adsorption cleaning robot, using a Transformer model to extract environmental features , the Transformer model is a deep learning model; Step 2, design a Transformer-based Decoder network, which is responsible for embedding the robot control amount into the existing encoded information and generating an output sequence suitable for the current environmental characteristics ; the Decoder calculates based on the previously generated output sequence to generate a new output sequence; Step 3, a Transformer-based regression output header network is designed, which is responsible for mapping the last layer features in the sequence output of the decoder to the target trajectory of the agent and the target strength of the magnetic adsorption electromagnet; Step 4, a step-by-step training strategy is used to implement the training process to obtain the optimal end-to-end trajectory of the magnetic adsorption cleaning robot.

2. The end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot according to claim 1, wherein: In step 1, using the multi-modal sensor data collected by the magnetic-attraction cleaning robot, an environment feature is extracted using a Transformer model The multi-modal perception backbone network training process is as follows: The raw input of the multi-modal sensor is a set of time series data, representing visual , ultrasonic , and lidar data respectively; the data in each set is recorded at different time steps , and the dimension of each sensor data depends on the characteristics of its type; for image data , it is a tensor of , representing the height, width, and channel number of the image, i.e. 3 for RGB; for ultrasonic data , it is a vector of , representing the reading values of the ultrasonic sensor; for lidar data , it is a matrix of , where represents the number of points of the lidar, and represents the feature dimension of each point: ; ; ; Different networks were used to extract the temporal features of the time series data sets of each of the above modalities. Features below Each set of features has different dimensions. Visual recognition uses a convolutional neural network (CNN) and... As the parameter set of the CNN, the final result was obtained The feature set; for the ultrasonic range field, a fully connected network (FC) is used and... As a parameter set, the LiDAR point cloud uses the pre-trained PointNet point cloud processing network. As a parameter: ; ; ; Features of each modality Mapped to a space of the same dimension, assuming the target dimension is... Each modality has a feature mapping matrix. and bias vector And can be combined to represent a single sequence. : ; ; ; Constructing multi-head attention mechanism fused query , key , value matrices, each matrix multiplied by a respective weight matrix , , and resulting in query, key and value matrices projected through , and respectively: ; ; ; Constructing multi-head attention computation equation , which represents the output of the th attention head: the similarity between the query and the key is reflected by the dot product result of the query and the key, divided by to avoid gradient instability, the similarity score is converted into a probability distribution through function, and then multiplied by the value matrix to obtain the weighted output; wherein represents the query, key, and value matrix of the th head, , is the number of attention heads: ; The output of each attention head is connected and multiplied by an output projection matrix to obtain the multi-head attention output , that is, the fused features ; ; ; get fused features After that, multiple residual connections are performed to add the original features to the fused features On top, layer normalization is implemented to alleviate gradient vanishing, a feed-forward neural network is applied to the location of each modality in the process Further processing fusion is performed to enhance the non-linear representation capability and average pooling is performed on the modality dimension to get the unified feature representation: ; ; ; ; Adding positional encoding to features to preserve the temporal sequence information, and further to compose the embedding vectors of all time steps into a complete time sequence : ; ; Will Input Obtain an environmental feature representation , i.e., the output feature of the Encoder, and for the supervised signal Design a loss function , which is used to measure the matching degree of the model output and the target, and supervise the training process through cross-entropy loss; ; 。 3. The end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot according to claim 1, wherein: In step 2, the obtained environmental feature representation The input sequence used as the decoder Part of it, providing contextual information about the environment; the Decoder input sequence includes the output sequence of the previous time step. And it is encoded through embedding and position. Mapped to 3D vector space: ; is the position encoding, using the following design to encode the control quantities of the robot , i.e. containing linear velocity , orientation angle and electromagnet opening trajectory embedding sequence to enhance the correlation between trajectory planning and electromagnet control: ; ; ; ; The update of the position encoding and the final embedding equation is then represented as; where represents the conventional sine-cosine position encoding; ; ; ; ; For each layer of the Transformer architecture-based decoder, the following modules are included: a masked multi-head self-attention layer an encoder-decoder attention layer a feed-forward neural network layer a residual connection, and layer normalization where and are the standard deviation and variance, respectively, and are learnable parameters; by stacking multiple such layer structures, the decoder is able to effectively process the input sequence and generate the output: ; ; ; ; ; ; ; 。 4. The end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot according to claim 1, wherein: The sub-steps of step 3 are: First, define the trajectory information contains the angle of orientation , linear velocity , electromagnet control signal , then the output layer dimension is obviously ; A linear layer is used to map the output of the decoder to the required output dimension: ; ; ; ; ; wherein denotes the output vector of the decoder at time step t; is a weight matrix of the output layer, is a bias vector, is the output without activation function. Because the value range and nature of each output are different, a suitable activation function needs to be selected for each output, wherein represents : ; ; ; Then the final control vector is: ; The loss function is calculated, respectively, the angle loss , using the angle difference calculation, ensure the continuity of the angle error, using the mean square error calculation angle loss , speed loss and electromagnet strength loss : ; ; ; ; The output end loss function of the trajectory and the electromagnet control is obtained, and the optimal weight term is measured by multiple experiments: 。 5. The end-to-end trajectory planning algorithm for a magnetic adsorption cleaning robot according to claim 1, wherein: In step 4, the process of the step-by-step training strategy is as follows: (1) On the basis of freezing the parameters of the trained Transformer perception network, the extracted environmental features, the decoder and the output layer are used to train the decoder combined with the defined loss function; (2) At each time step t, the frozen perception network is used to extract environmental features as input to the decoder; at the same time, the decoder receives the control quantity information of the previous time step; the control quantity information includes linear velocity, angular velocity and electromagnet opening, which is embedded and fused into the decoder input; Through linear transformation, the control quantity is mapped to the same dimension as the position encoding, and then weighted and added to the position encoding to form a new position encoding; (3) During the training process, a comprehensive loss function is defined to measure the difference between the predicted control instructions and the true values, including the errors of linear velocity, angular velocity and electromagnet opening; set the weight coefficient of each loss term to balance the contribution of each part to the total loss; by minimizing the total loss function, the parameters of the decoder and the output layer are optimized to make the model accurately generate control instructions; (4) Unfreeze the perception network and jointly train the decoder end-to-end to optimize the parameters of the perception network and the decoder to minimize the total loss function.

6. The end-to-end trajectory planning algorithm for a magnetic-adsorption cleaning robot according to claim 5, wherein: In the step-by-step training strategy, the whole training process adopts a teacher forcing strategy, which uses the real target sequence as the input of the next time step when training the sequence generation model, accelerates the convergence of the model and improves the training efficiency; at the same time, the gradient clipping method is used to ensure the stability of the model training.

Citation Information

Patent Citations

  • Transformer substation fault early warning method and system based on multi-modal data sensing equipment

    CN118314485A

  • Trajectory prediction method and apparatus, and computer device and storage medium

    WO2022222095A1