Scanning laser welding forming monitoring method based on time sequence visual signals and cross attention

Through a deep learning model based on time-series visual signals and cross-attention, the keyhole and molten pool time-series features in the scanning laser welding process are extracted, which solves the problem of limited accuracy of welding formation prediction in the existing technology and realizes the scanning laser welding process. High accuracy monitoring of welded joints.

CN118799299APending Publication Date: 2024-10-18HARBIN INST OF TECH AT WEIHAI +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411024520.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing welding form prediction methods are difficult to effectively utilize the highly dynamic visual signals in the scanning laser welding process, especially the temporal characteristics of keyholes and molten pools, resulting in limited accuracy in welding joint form prediction.

Method used

A deep learning model based on temporal visual signals and cross-attention is used to construct a temporal visual signal data set through semantic segmentation and channel separation. It combines the multi-head attention mechanism and the cross-attention mechanism to extract the temporal characteristics of keyholes and melt pools to achieve Accurate prediction of welded joints.

Benefits of technology

It can accurately extract dynamic features in laser welding, improve the accuracy and stability of welding formation monitoring, overcome the limitations of traditional methods in scanning laser welding, and improve the stability and production efficiency of the welding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799299A_ABST
    Figure CN118799299A_ABST
Patent Text Reader

Abstract

The invention discloses a scanning laser welding forming monitoring method based on time sequence visual signals and cross attention, and belongs to the field of material processing engineering. A semantic segmentation method based on deep learning is adopted to distinguish keyhole and molten pool areas in the visual signals, and a sequential visual database with high-speed movement keyholes and dynamic flow molten pools is constructed. The method comprises the following steps: designing a Transform type sequential neural network model with double branches, wherein the Transform type sequential neural network model comprises two branches, namely a keyhole and a molten pool; a multi-head attention mechanism is adopted to perform feature extraction and learning on time sequence image information of a keyhole and a molten pool, and a cross attention mechanism is adopted to perform feature fusion to improve the feature extraction capability of a model. The prediction precision of scanning laser welding seam forming based on a time sequence visual signal and a cross attention deep learning model exceeds 99%. The welding quality can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of material processing engineering, and in particular relates to a scanning laser welding forming monitoring method based on time-series visual signals and cross-attention. Background Art

[0002] With the rapid advancement of industrial automation technology, the speed of technological iteration has accelerated dramatically. In addition, the service environment of products has become increasingly harsh, which has put forward more stringent requirements on the production efficiency and welding quality of industrial products. In this context, ensuring the stability of the forming of scanning laser welding joints has become one of the important factors affecting the performance, service life and production capacity of industrial products. In order to overcome the cost increase and reduced production efficiency brought about by traditional non-online post-weld inspection. Online monitoring technology, as a key link in the closed-loop production process control of products, can not only effectively ensure the stability of scanning welding quality, reduce rework and waste caused by quality problems, significantly improve overall production efficiency, but also reduce production costs.

[0003] The combination of advanced intelligent technology and precise sensing technology provides a new idea for online detection of welding quality. By using intelligent technology to extract and learn the collected visual information of the welding process, the intelligent sensing system has the ability to identify welding information that forms different weld joint morphologies. This can replace the traditional subjective judgment that relies heavily on professional knowledge. The intelligent monitoring algorithm can realize the judgment of welding formation in real time online, thereby improving the stability of the welding process and the strength of the weld joint at the workpiece connection.

[0004] Research has shown that there is a close connection between the molten pool and keyhole information in the actual welding process and the weld formation, and the formation prediction based on visual signals has become a research hotspot in related fields. Chinese patent application CN117787480A discloses a real-time prediction method for weld formation quality based on Res-LSTM, which uses a CNN model trained on a public data set to extract features from the arc welding molten pool vision, and then inputs it into the Res-LSTM model to predict the arc weld formation state. However, the arc welding process is stable and the visual signal quality is high. The Res-LSTM model proposed in the patent can easily extract important information from the molten pool information input into the model. The deep learning model based on temporal visual signals and cross-attention feature fusion proposed in the present invention can extract more detailed and critical features from laser welding with more drastic changes in the molten pool visual signal and poor quality, and also makes up for the fact that LSTM does not have the ability to predict long sequences. Chinese patent CN113828947B discloses a BP neural network laser welding weld formation prediction method based on dual optimization. This method requires the extraction of the size of the molten pool, and then uses the size characteristics and welding process parameters of the laser welding molten pool as input to achieve the prediction of the formation of the welded joint. The method uses the obtained one-dimensional molten pool size as input, which will ignore a lot of important information, such as the brightness of the molten pool, the flow of the molten pool and other information. The present invention uses the time-series original visual image signal to contain not only the size information of the molten pool, but also dynamic information such as the flow of the molten pool. Chinese patent CN109447939B discloses a weld width prediction method before the molten pool is formed based on mixed spectral vision. This method uses pixel gradients to extract the molten pool contour, and then uses the molten pool width to predict the weld width. In the actual welding process, the molten pool width is the weld width. And this method is suitable for arc welding with stable molten pool visual signals, and is not suitable for laser welding with sudden changes in visual signals and uneven brightness distribution in the picture.

[0005] Current research shows that the use of visual signals and deep learning methods can achieve the prediction of welding formation, but the relevant invention methods are all focused on arc and traditional laser welding (no scanning laser). Relevant research literature has proved that compared with these welding technologies, the laser beam of scanning welding technology stirs the molten pool at a frequency of hundreds of Hz, resulting in drastic changes in the molten pool morphology and surface state in the visual signal. At the same time, the rate of change of the molten pool state is faster and the difference is greater. This has brought great limitations to the application of traditional image processing and BP networks and CNN networks in deep learning in the prediction of scanning laser welding formation. Relevant literature also proves that compared with arc welding and laser welding, due to the scanning motion of the laser beam, the same welding position will be heated periodically and repeatedly, so the visual signals at different times are related. The model should consider the temporal relationship of the visual signal. The BP and CNN networks in deep learning do not have the ability to extract and learn the temporal relationship of visual signals. Therefore, the application of these methods to the prediction of scanning laser formation is further limited. In addition, during the scanning laser welding process, there is a unique phenomenon in the visual signal, that is, the keyhole exhibits periodic changes and movements, which is also an important feature for predicting weld formation. These methods do not effectively utilize the keyhole feature information in the visual signal. Summary of the invention

[0006] In order to overcome the shortcomings of the prior art, the present invention proposes a scanning laser welding formation monitoring method based on temporal visual signals and cross-attention, which can fully extract and learn the highly dynamic keyhole and molten pool features during the welding process, and accurately learn the temporal characteristics of the keyhole and molten pool visual signals at different times, respectively, and adopt the method of attention mechanism to fuse the characteristics of the keyhole and molten pool, thereby realizing the accurate prediction of the scanning laser welding joint formation.

[0007] In order to achieve the above object, the present invention adopts the following technical scheme: A scanning laser welding forming monitoring method based on time-series visual signals and cross-attention includes the following steps: S1: Before welding, a scanning laser welding experiment with different welding process parameters is designed to obtain sufficient visual signals. The welding process parameters include scanning form, welding power, welding speed, scanning amplitude, and scanning frequency; S2: Perform scanning laser welding according to the scanning laser welding process parameters designed in S1, and collect visual signals under different welding process parameters; then perform semantic segmentation on the visual signals of the molten pool and keyhole with different parameters to obtain segmented visual signals, and then perform channel separation, and then perform mask operation together with the original visual signal after grayscale conversion to construct temporal molten pool visual signals and temporal keyhole visual signals under different parameters to form a temporal visual signal data set; at the same time, prepare metallographic samples and obtain formed photos of the welded joints after welding; then classify the temporal visual signal data set according to the formed morphology of the welded joints, and assign corresponding weld formation labels; then divide the temporal visual signal data set into a training set, a validation set, and a test set, with the visual signal as input and the weld formation label as output of the model; S3: Construct a scanning laser welding formation monitoring model based on temporal visual signals and cross-attention, which consists of two identical model structure branches with the ability to learn temporal features, including keyhole and molten pool branches, and is composed of L layers of scanning laser welding joint formation prediction units stacked together.

[0008] Preferably, in S1, the welding process parameters are: scanning amplitude of 0 mm-5 mm, scanning frequency of 0-500 Hz, laser welding power of 2000-6000 W, welding speed of 10-50 mm / s, and laser defocus of 0 mm.

[0009] Preferably, in S2, a high-speed camera or an industrial camera may be used to collect visual information of the welding process, including: Fix the high-speed camera or industrial camera on the tripod, set the sampling parameters of the high-speed camera or industrial camera according to the actual sampling requirements, and obtain visual signals from a bird's-eye view; sort the molten pool and keyhole photos according to the order of the collected photos, and construct a molten pool and keyhole data signal dataset with a time sequence relationship.

[0010] Preferably, in S2, the welding method can be butt welding, fillet welding, lap welding, and when clamping the sample to be welded, it is necessary to avoid clamping problems such as misalignment and excessive gap.

[0011] Preferably, in S2, after welding, wire cutting or CNC processing equipment is used to make a weld metallographic part perpendicular to the weld, and then the metallographic part is polished using sandpaper and polishing liquid successively, and metallographic corrosion is performed using metallographic reagents, and then an optical microscope is used to photograph the macroscopic morphology of the weld cross section, and the weld can be classified according to the morphological characteristics of the weld.

[0012] Preferably, in S2, firstly, the temporal keyhole and molten pool visual signals are divided into several types according to the weld formation morphology photos; then, the temporal keyhole and molten pool visual signals under each type are divided into a training set, a validation set and a test set according to a certain ratio.

[0013] Preferably, in S3, the scanning laser welding weld formation monitoring model includes two identical branches of the model structure having the ability to learn temporal characteristics, which are respectively used to extract the keyhole and molten pool photo features of the time series.

[0014] Preferably, in S3, the training set and the validation set are used alternately to train and validate the model, including: K consecutive melt pool image photos are input into the model in the order of time series, the keyhole and melt pool photos in the time series are segmented by a feature extraction module, and then mapped into a one-dimensional tensor, and a classification label is spliced ​​behind the tensor, and then a learnable position code is added to the obtained tensor; and then the obtained one-dimensional feature tensor of the keyhole and the melt pool is input into the Encoder module of the Transformer, in which the multi-head attention mechanism will respectively focus on the features of the keyhole and the melt pool and the photos at different times. The feature relationship is extracted; then the extracted time-series features are input into the cross attention module, so that the molten pool branch can extract the keyhole features, and the keyhole branch can also extract the molten pool features. At this time, both branches have the information of the keyhole and the molten pool. The classification labels in the two branches are added together, and the model's ability to extract keyhole and molten pool features is enhanced through complementarity; then the addition result is input into the multi-layer perceptron layer, and the predicted result is output, and then the loss is calculated with the label value of the actual weld joint forming morphology, and the hyperparameters of the model are optimized by reverse gradient solution, and the optimal model that can accurately predict the scanning laser welding forming is saved. Then the test set is used to test the actual monitoring accuracy of the saved optimal model, verify the generalization ability of the model, and then realize the real-time monitoring of the scanning laser welding forming.

[0015] The present invention can realize online real-time monitoring of scanning laser welding forming features, and has the following beneficial effects compared with BP and CNN neural network methods for predicting weld formation: 1. Because of the multi-head and cross-attention mechanism, the weights between different pixels in the image can be calculated, the relationship between different features can be found, and more detailed information in the image information can be extracted. More intense and detailed features in the visual signal will not be ignored. Therefore, the present invention can not only accurately extract the dynamic features of the molten pool, but also accurately extract the highly dynamic keyhole features of small targets.

[0016] 2. The present invention uses position coding information to perform temporal sorting of signal features, which can enable the multi-head and cross-attention mechanisms to accurately extract the temporal features between the molten pool and the keyhole at different times during feature extraction.

[0017] 3. The dual-branch structure and cross-attention mechanism designed in the present invention can more fully extract the information of the keyhole and the molten pool at the same time. The two branches complement each other and jointly enhance the feature extraction capability of the keyhole and the molten pool related to the formation of the scanning laser welding joint, thereby obtaining a higher accuracy of weld formation monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flow chart of a scanning laser welding forming monitoring method based on time-series visual signals and cross-attention of the present invention.

[0019] Figure 2 Flow chart of the construction of the keyhole and molten pool temporal data set of the present invention; Figure 3 A schematic diagram of the principle of a scanning laser welding forming monitoring model structure based on temporal visual signals and cross attention according to the present invention; Figure 4 Time series visual signal photos corresponding to welded joints with different forming characteristics; a-a3 represents continuous visual signals under keyhole mode at different times T-T+3 milliseconds, b-b3 represents continuous visual signals under transition mode at different times T-T+4 milliseconds, c-c3 represents continuous visual signals under conduction at different times T-T+3 milliseconds; Figure 5 Different types of welded joint cross-sectional morphology diagrams; a is a schematic diagram and weld photo of the keyhole mode, b is a schematic diagram and weld photo of the transition mode, and c is a schematic diagram and weld photo of the conduction mode; Figure 6 Accuracy and loss plots during model training and validation; Figure 7 The prediction results and classification results of the model test set; Figure 8 Three different weld formation visual feature result diagrams extracted by the model designed by the present invention. DETAILED DESCRIPTION

[0020] In order to make the features, technical solutions and advantages of the present invention more understandable, the present invention is further described in detail in conjunction with the accompanying drawings and specific implementation schemes. In addition, the specific implementation schemes described herein are only used to explain the main points of the present invention and are not used to limit the present invention. The present invention can be appropriately improved according to specific actual use conditions.

[0021] like Figure 1 As shown, a scanning laser welding forming monitoring method based on time-series visual signals and cross-attention of the present invention comprises the following steps: S1: Before welding, design a scanning laser welding experiment with different welding process parameters, and then obtain sufficient visual signals to ensure that the present invention has sufficient generalization ability. The welding process parameters include scanning form, welding power, welding speed, scanning amplitude, scanning frequency, etc.; S2: Perform scanning laser welding according to the scanning laser welding process parameters designed in S1, and collect visual signals under different welding process parameters. Figure 2 As shown, the original visual signals with different parameters are semantically segmented to obtain segmented visual signals, and then channel separation is performed, and then a mask operation is performed together with the original visual signals after grayscale conversion to construct temporal molten pool visual signals and temporal keyhole visual signals under different parameters to form a temporal visual signal data set; at the same time, metallographic specimens are prepared to obtain the forming morphology photos of the welded joints after welding; then, according to the morphology photos of the welded joints, the temporal visual signal data set is classified and assigned corresponding labels; then the temporal visual signal data set is divided into a training set, a validation set, and a test set, with the visual signal as input and the weld formation label as the output of the scanning laser welding weld formation prediction model.

[0022] S3: Construct a scanning laser welding formation monitoring model based on temporal visual signals and cross-attention, which consists of two branches of the same structure with temporal learning ability, including keyhole and molten pool branches, and is stacked by L layers of scanning laser welding joint formation prediction units.

[0023] Each branch includes: feature extraction module, which performs time series photo segmentation operation, Transformer Encoder module, cross attention module; classification result output module, including multi-layer perceptron layer (MLP). Through continuous alternating training and verification, the optimal model structure and weight parameters are optimized and saved.

[0024] Specifically, in S2, a high-speed camera or an industrial camera may be used to collect visual information of the welding process, and the specific steps are as follows: Fix the high-speed camera or industrial camera on the tripod, set the sampling parameters of the high-speed camera or industrial camera according to the actual sampling requirements, and obtain visual signals from a bird's-eye view; sort the molten pool and keyhole photos according to the order of the collected photos, construct a temporal molten pool and keyhole visual signal dataset with a time sequence relationship, and classify the photos according to the morphology of the weld.

[0025] Specifically, in S2, after welding, wire cutting or CNC processing equipment is used to make weld metallographic parts perpendicular to the weld, and then sandpaper and polishing liquid are used to polish the metallographic parts successively, and metallographic etching reagents are used to perform metallographic etching, and then an optical microscope is used to photograph the macroscopic morphology of the weld cross section. The welds can be classified according to their morphological characteristics.

[0026] Specifically, in S3, Figure 3 As shown, it includes two branches of the same model structure with the ability to learn temporal features, including keyhole and melt pool branches, which are used to extract the features of keyhole and melt pool photos of the time series respectively.

[0027] Specifically, in S3, the training and verification of the model are performed alternately using the training set and the verification set, which mainly includes: K consecutive molten pool image photos are input into the scanning laser welding weld formation monitoring model in the order of time series, and the keyhole and molten pool photos of the time series are segmented by using the feature extraction module, and then mapped into a one-dimensional tensor, and a classification label is spliced ​​behind the tensor, and then a learnable position code is added to the obtained tensor; then the obtained one-dimensional feature tensor of the keyhole and the molten pool is input into the Encoder module of the Transformer, and the multi-head attention mechanism thereof will respectively extract the features of the keyhole and the molten pool and the feature relationship of the photos at different times; then the extracted time-series features are input into the cross attention module, so that the molten pool branch can extract the features of the keyhole, and the keyhole branch can also extract the features of the molten pool, and at this time, both branches have the information of the keyhole and the molten pool; then the classification labels in the two branches are added, and the model's ability to extract the features of the keyhole and the molten pool is enhanced through complementarity; then the addition result is input into the multi-layer perceptron layer ( Figure 3 The prediction result is outputted in the MLP Head, and the loss is calculated with the label value of the actual weld joint morphology. The hyperparameters of the model are optimized by reverse gradient solution, and the optimal model that can accurately predict the scanning laser welding formation is saved. Then the test set is used to test the actual monitoring accuracy of the saved optimal model, verify the generalization ability of the model, and realize the real-time monitoring of the scanning laser welding formation.

[0028] Specifically, in S3, since the operations of the keyhole branch and the molten pool branch are the same, the molten pool branch is taken as an example, which mainly includes the following steps: The operations of photo segmentation and position encoding are as follows: First, K consecutive melt pool images ( ) The photos are input into the model in chronological order, and then segmented to obtain multiple images of size small photos and maps them into a one-dimensional tensor ( ), and then a label tensor Splice in Later, with a learnable positional encoding Add together to get a tensor , so that the molten pool photo information has the characteristics of time sequence.

[0029] The step S3 then obtains the tensor The image is sent to a neural network module composed of N stacked Transformer encoder modules, and the multi-head self-attention mechanism is used to extract and learn the features of the time series melt pool image. At this time, the label Gradually obtain the classification information of the melt pool image. Since the multi-head attention mechanism can calculate the relationship weights between different features, it can extract more detailed information from the image information, so the label information used for classification features are more accurate.

[0030] The cross attention module is used to enhance the learning ability of the model, and at the same time enable the melt pool branch to learn the characteristics of the keyhole; the label with melt pool information A 1D tensor with melt pool image information from the keyhole branch Splicing is performed and cross-attention mechanism operation is performed. At this time, the label tensor obtained by the melting pool branch There will be both weld pool features and keyhole features.

[0031] The main function of the multi-layer perceptron layer used for classification in the model is to transform the label feature tensors from the melting pool branch and the keyhole branch into , The input is sent to the multi-layer perceptron layer. The multi-layer perceptron layer further transforms and aggregates through its fully connected layer structure to extract higher-level features. Finally, a prediction value indicating whether the image belongs to each category is output. , and then use the cross entropy loss function , find the predicted value and the true label value Previous losses: .

[0032] Wherein, i is the index value, and n is the length of the temporal visual signal input into the scanning laser welding forming prediction model each time.

[0033] It should be pointed out that the welding parameters of the present invention cooperate and interact with each other; the input of the model, the cutting size of the photo, and the number of layers of each module in the model need to be designed and optimized according to the actual acquired data set to ensure that the model can have the fastest prediction rate and the highest accuracy, and to ensure that the scanning laser weld formation morphology can be accurately predicted.

[0034] Embodiment 1: This embodiment constructs an aluminum alloy scanning laser welding forming monitoring method based on temporal visual signals and cross-attention mechanism, including: First, the scanning laser welding experimental parameters with different laser powers, welding speeds, swing amplitudes, and swing frequencies were designed. The specific parameter matching is shown in Table 1 (Welding process parameter table of scanning laser welding experiment). At the same time, an aluminum alloy with a thickness of 8 mm was selected, and an angle grinder was used for mechanical grinding and roughening. At the same time, the oxide film on the surface of the aluminum alloy to be welded was removed, and then sandpaper was used to remove the burrs of the sample to be welded.

[0035] Table 1

[0036] Secondly, the cleaned aluminum alloy welding specimens are fixed and clamped on the welding workbench in a butt-jointed manner to avoid excessive misalignment and gap errors and ensure clamping accuracy.

[0037] Then, the high-speed camera was fixed on a tripod, and the actual sampling frequency of the high-speed camera was set to 3000 Hz. Then, the welding experiment was performed to obtain the visual signal of the welding process from a bird's-eye view. The number of photos obtained in each group of experiments is shown in Table 1.

[0038] Then, after welding, wire cutting equipment is used to make weld metallographic parts perpendicular to the weld, and then sandpaper and polishing liquid are used to polish the metallographic parts one by one, and Keeler reagent is used for metallographic etching, and then an optical microscope is used to capture the macroscopic morphology of the weld cross section.

[0039] Further, according to the size and depth of the keyhole in the collected visual photos and the morphological characteristics of the weld: keyhole mode (nail shape), transition (U shape), and conduction (semi-ellipse), the visual signals and welds can be divided into three categories: keyhole mode, transition mode, and conduction mode, such as Figure 4 middle, Figure 4 a-a3 represent continuous visual signals in the keyhole mode at different times T-T+3 milliseconds. Figure 4 b-b3 represent continuous visual signals in the transition mode of T-T+4 milliseconds at different times. Figure 4 c-c3 represent continuous visual signals under the conduction of T-T+3 milliseconds at different times; Figure 5 a is a schematic diagram and weld photo under keyhole mode. Figure 5 b is a schematic diagram and weld formation photo in transition mode. Figure 5 Figure c is a schematic diagram and a photo of weld formation in conduction mode.

[0040] Preferably, in S2, according to the classification results of the weld morphology, the temporal keyhole and molten pool visual signal data under each classification result are divided into a training set, a validation set and a test set in a ratio of 8:1:1.

[0041] Next, we designed and constructed an aluminum alloy scanning laser welding formation monitoring model based on temporal visual signals and cross-attention mechanism, and sequentially cross-input the training set and validation set into the model to train and optimize the weld formation monitoring model and save the most accurate optimal model. Because the keyhole branch and the molten pool branch have the same operation, we will take the molten pool branch as an example to introduce the operation process of model optimization: First, the model is trained: 10 consecutive keyhole and molten pool photos in the training set are input into the model; each photo is first divided into 16 16-pixel image, and flatten it into a 1D tensor after mapping, and splice a tensor for classification behind this 1D tensor to obtain a total tensor containing image information and classification labels, and add a learnable position encoding tensor of the same dimension to this total tensor.

[0042] Subsequently, the encoder module and the cross-attention module extract image features and continuously update the label tensor information. Finally, the classification label tensor of the melt pool branch contains the feature information of the keyhole and the melt pool.

[0043] At the same time, the keyhole branch also has the characteristic information of the keyhole and the molten pool. Then the column label tensors of the two are added together, and then the multi-layer perceptron calculates and outputs the final classification prediction label value, and uses the cross entropy loss function to find the difference between the predicted value and the actual label value. Then the model enters the gradient solution and updates the network weights. If the monitoring accuracy of the model at this time is greater than the monitoring accuracy of the previous training, the optimal model structure and weight parameters are saved, and the monitoring accuracy and loss value of the model are recorded. Then a verification test of the model is performed, and the data of the verification set is input into the saved optimal model using the same operation as the training set, and the verification accuracy and loss value are recorded. The results are as follows: Figure 6 shown.

[0044] The model weights are updated in a loop by alternating training, validation, and iteration. The model with the highest accuracy is saved during the iteration process. The structure and main hyperparameters of the optimal model are as follows: the number of stacked layers (L) of the shaping prediction model is set to 1, the number of stacked layers of the Encoder module of the Transformer is 1, the number of layers of the cross attention module is 1, the number of heads of the multi-head attention is 12, the dimension of the multi-layer perceptron is 768, etc.

[0045] By Figure 6It can be observed that the accuracy and loss of the proposed model training set are close to the accuracy and loss of the validation set, respectively, which proves that our proposed model has good generalization ability and can well predict the scanning laser weld formation.

[0046] Finally, we use the same operation as the validation set to input the test set data into the saved optimal model, and the classification results are as follows: Figure 7 As shown, it was found that the weld shape classification results under the three forms were all over 99%.

[0047] At the same time, in order to verify the effectiveness of the scanning laser welding prediction method we proposed, the weight matrix of the molten pool and keyhole at any time T, T+2ms and T+3ms extracted by the model is visualized. The results are as follows: Figure 8 As shown in the figure, the brighter the image is, the greater the weight value assigned by the model is, and the more accurately the model can extract the features of the relevant area from the visual signal. From the feature extraction results of the keyhole and molten pool branches, it can be observed that the proposed method can accurately extract the features of the keyhole and the molten pool. And the keyholes at different moments of continuous motion can also be accurately extracted, which also proves that the proposed method can accurately extract the temporal characteristics of the visual signal.

[0048] Example 2: This example constructs a magnesium alloy scanning laser welding forming monitoring method based on temporal visual signals and cross-attention mechanism: First, design the linear scanning laser welding experimental parameters with different laser power, welding speed, swing amplitude, and swing frequency. The specific parameter matching is as follows: The welding process parameter window was initially obtained, in which the scanning amplitude was 0mm-3mm, the scanning frequency was 0-400Hz, the laser welding power was 2500-4000W, the welding speed was 10-25mm / s, and the laser defocus was 0mm.

[0049] At the same time, a magnesium alloy with a thickness of 6 mm was selected, and an angle grinder was used for mechanical grinding and roughening. At the same time, the oxide film on the surface of the aluminum alloy to be welded was removed, and then sandpaper was used to remove the burrs on the sample to be welded.

[0050] Secondly, the cleaned aluminum alloy welding specimens are fixed and clamped on the welding workbench in a butt-jointed manner to avoid excessive misalignment and gap errors and ensure clamping accuracy.

[0051] Then fix the high-speed camera on the tripod, and set the actual sampling frequency of the high-speed camera to 4000Hz. Obtain the visual signal of the welding process from a bird's-eye view. Then perform the welding experiment and take pictures to obtain the visual signal; sort the photos according to the order in which the photos are obtained, and construct a visual signal data set with a time sequence relationship; after welding, use wire cutting equipment to make weld metallographic parts perpendicular to the weld, and then use sandpaper and polishing liquid to polish the metallographic parts one by one, and use picric acid corrosion reagent for metallographic corrosion, and then use an optical microscope to take the macroscopic morphology of the weld cross section; and classify the photos according to the morphology of the weld, and divide the temporal keyhole and molten pool visual signal data set under each classification into training set, verification set and test set according to the ratio of 7:2:1.

[0052] In the above-mentioned Example 2, the process of model training, verification and testing is the same as that of Example 1, and can achieve the technical effect of the present invention, and the effect is similar to that of Example 1.

[0053] The present invention does not elaborate on some of the common technologies of those skilled in the art. The above-described embodiments are only descriptions of preferred implementations of the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementations described. Without departing from the design spirit of the present invention, various modifications and improvements made by ordinary technicians in this field to the technical solution of the present invention should fall within the scope of protection determined by the claims of the present invention.

Claims

1. A scanning laser welding formation monitoring method based on temporal visual signals and cross attention, characterized in that: The following steps are involved: S1: Before welding, a scanning laser welding experiment with different welding process parameters is designed to obtain sufficient visual signals. The welding process parameters include scanning form, welding power, welding speed, scanning amplitude, and scanning frequency; S2: Scanning laser welding is performed according to the scanning laser welding process parameters designed in S1, and visual signals under different welding process parameters are collected; then the visual signals of the molten pool and keyhole with different parameters are semantically segmented to obtain segmented visual signals, and then channel separation is performed, and then masking operation is performed together with the original visual signal after grayscale conversion to construct temporal molten pool visual signals and temporal keyhole visual signals under different parameters to form a temporal visual signal data set; at the same time, metallographic specimens are prepared to obtain formed photos of the welded joints after welding; then the temporal visual signal data set is classified according to the formed morphology of the welded joints, and the corresponding weld formation labels are assigned; then the temporal visual signal data set is divided into a training set, a validation set, and a test set, with the visual signal as input and the weld formation label as the output of the model; S3: Construct a scanning laser welding formation monitoring model based on temporal visual signals and cross-attention, which consists of two identical model structure branches with the ability to learn temporal features, including keyhole and molten pool branches, and is composed of L layers of scanning laser welding joint formation prediction units stacked together.

2. According to claim 1, a scanning laser welding formation monitoring method based on time-series visual signals and cross-attention is characterized in that: The welding process parameters are: scanning amplitude of 0mm-5mm, scanning frequency of 0-500Hz, laser welding power of 2000-6000W, welding speed of 10-50mm / s, and laser defocus of 0mm.

3. According to claim 1, a scanning laser welding formation monitoring method based on time-series visual signals and cross-attention is characterized in that: The collected visual signals are K consecutive keyhole and molten pool visual signals in time sequence as the input of the model.

4. The scanning laser welding forming monitoring method based on time-series visual signals and cross-attention according to claim 1 is characterized in that: The scanning laser welding formation monitoring model includes: a feature extraction module, including a time series photo segmentation operation, a Transformer encoder module, and a cross attention module; a classification result output module, including a multi-layer perception machine layer; and through continuous alternating training and verification, the optimal model structure and weight parameters are optimized and saved.

5. The scanning laser welding forming monitoring method based on time-series visual signals and cross-attention according to claim 1 is characterized in that: The training set and validation set are used alternately to train and validate the model, including: K consecutive keyhole and melt pool photos are input into the model in time series order, the time series keyhole and melt pool photos are segmented by the feature extraction module, and then mapped into a one-dimensional tensor, and a classification label is spliced ​​behind this tensor, and then a learnable position code is added to the obtained tensor; then the obtained one-dimensional feature tensor of the keyhole and melt pool is input into the Encoder module of the Transformer, and the multi-head attention mechanism will respectively focus on the features of the keyhole and melt pool and the photos between different moments. The feature relationship is extracted; then the extracted temporal features are input into the cross attention module, so that the molten pool branch can extract the features of the keyhole, and the keyhole branch can also extract the features of the molten pool. At this time, both branches have information about the keyhole and the molten pool. The classification labels in the two branches are added together, and the model's ability to extract keyhole and molten pool features is enhanced through complementarity; the addition result is then input into the multi-layer perceptron layer, and the predicted result is output. The loss is calculated with the label value of the actual welding joint forming morphology, and the weight of the optimization model is solved by reverse gradient, thereby improving the prediction accuracy of the model.

6. The scanning laser welding forming monitoring method based on time-series visual signals and cross-attention according to claim 5 is characterized in that: By continuously executing model training and verification in a cycle, the model weights are optimized and the prediction accuracy of the model is continuously improved. The scanning laser welding formation monitoring model with the highest prediction accuracy in this process is obtained and saved. Finally, the test set is used to test the actual monitoring accuracy of the saved model, thereby realizing real-time monitoring of scanning laser welding formation.

Citation Information

Cited By

  • Error correction method and system for laser welding penetration based on OCT (optical coherence tomography)

    CN119733974A

  • Method for automatically controlling height of molten pool in double-roller thin-strip continuous casting production process

    CN120828117A

  • Device and method for separating macrobrachium rosenbergii individuals in molting stage and non-molting stage

    CN121128660A

  • Method and system for identifying defocusing amount of two channels of laser coaxial powder feeding and material increasing

    CN122023943A